/* Shared app styles (mobile-first). Default theme: DARK */

:root{
  --bg:#0b0f14;
  --card:#0f1620;
  --text:#e8eef7;
  --muted:#a3b1c6;
  --border:#1f2a3a;
  --shadow:0 1px 2px rgba(0,0,0,.35);

  --radius: 12px;
  --header-h: 56px;
}

/* Light theme overrides */
html[data-theme="light"]{
  --bg:#fbfbfb;
  --card:#ffffff;
  --text:#111111;
  --muted:#6b7280;
  --border:#e5e7eb;
  --shadow:0 1px 2px rgba(0,0,0,.04);
}

html, body { height: 100%; }
*{ box-sizing: border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}

a{ color: inherit; text-decoration: none; }
.muted{ color: var(--muted); }

.container{
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 18px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--card) 92%, transparent);
  box-shadow: var(--shadow);
  font-weight: 650;
  user-select:none;
}

.btn:active{ transform: translateY(1px); }

.icon-btn{
  width: 40px;
  height: 40px;
  padding: 0;
}

.card{
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 14px 0;
}

/* Sticky header */
.app-header{
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 18px;
  height: var(--header-h);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.brand{
  display:flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand a{
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.brand .subtitle{
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 2px;
}

.header-actions{
  display:flex;
  gap: 10px;
  align-items:center;
}

/* Better focus for accessibility */
.btn:focus-visible{
  outline: 2px solid color-mix(in oklab, var(--text) 70%, transparent);
  outline-offset: 2px;
}

/* Avoid content hiding behind sticky header on anchor jumps */
:target{ scroll-margin-top: calc(var(--header-h) + 12px); }

@media (max-width: 360px){
  .container{ padding: 12px 14px; }
  .header-inner{ padding: 10px 14px; }
}
