/* Albedo Studio: shared look for every section (Meditations, Reels, Posts). Served at /s/studio.css.
   Same type as albedo.click: Shippori Mincho for titles, Zen Kaku Gothic New for everything else.
   One neutral family (a violet-tinted dusk, the Night side's colour), one accent (Albedo's gold);
   Day and Night appear only as small markers, never as a second accent. Phone first. */

@font-face { font-family: "Shippori Mincho"; src: url("fonts/shippori-mincho-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Shippori Mincho"; src: url("fonts/shippori-mincho-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Zen Kaku Gothic New"; src: url("fonts/zen-kaku-gothic-new-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Zen Kaku Gothic New"; src: url("fonts/zen-kaku-gothic-new-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #121019;          /* dusk, never pure black */
  --bg-2: #17141f;
  --surface: #1c1826;
  --surface-2: #231e30;
  --surface-3: #2b253a;
  --line: #322b44;
  --line-soft: #28223a;
  --text: #efeaf6;
  --text-2: #c9c1d8;
  --mute: #958ca8;
  --faint: #6d6582;
  --gold: #d8b26a;        /* the one accent */
  --gold-ink: #1d170c;
  --gold-soft: rgba(216, 178, 106, .14);
  --ok: #86c59a;  --ok-soft: rgba(134, 197, 154, .15);
  --maybe: #e2c27a; --maybe-soft: rgba(226, 194, 122, .15);
  --redo: #e08b7c; --redo-soft: rgba(224, 139, 124, .16);
  --drop: #b3a7cc; --drop-soft: rgba(179, 167, 204, .16);
  --day: #e9c77d;  --night: #a99be0;
  --serif: "Shippori Mincho", "Iowan Old Style", Georgia, serif;
  --sans: "Zen Kaku Gothic New", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 8px; --r: 14px; --r-lg: 20px;
  --shadow: 0 10px 30px -12px rgba(6, 3, 18, .7), 0 2px 6px -2px rgba(6, 3, 18, .5);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --z-sticky: 10; --z-dock: 20; --z-toast: 30;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh; color: var(--text); font: 400 16px/1.6 var(--sans);
  background: radial-gradient(1200px 600px at 85% -10%, rgba(169, 155, 224, .09), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(216, 178, 106, .06), transparent 60%), var(--bg);
  background-attachment: fixed;
}
body::after {             /* a whisper of paper grain, never in the way */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.hide { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 12px; }

/* ---------- header */
.top {
  position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: 14px;
  padding: 10px 18px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(18, 16, 25, .82); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand .orb { width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 65% 35%, var(--bg) 0 42%, transparent 43%), linear-gradient(135deg, var(--day), var(--gold) 45%, var(--night)); }
.brand b { font: 600 18px/1 var(--serif); letter-spacing: .01em; }
.brand span { color: var(--mute); font-size: 13px; }
.nav { display: flex; gap: 2px; margin-left: auto; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 3px; }
.nav a { color: var(--mute); text-decoration: none; padding: 6px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); }
.nav a[aria-current] { color: var(--text); background: var(--surface-3); }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.nav a .navn { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11.5px; font-weight: 600;
  background: var(--gold); color: var(--gold-ink); line-height: 1; }
.nav a[aria-current] .navn { background: var(--gold); }

/* ---------- layout */
.wrap { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 20px 18px 170px; }
.eyebrow { color: var(--mute); font-size: 13px; margin: 0 0 4px; }
.h1 { font: 600 clamp(26px, 5.6vw, 38px)/1.12 var(--serif); letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.lede { color: var(--text-2); margin: 10px 0 0; max-width: 62ch; text-wrap: pretty; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px;
  padding: 11px 18px; font-weight: 500; background: var(--gold); color: var(--gold-ink);
  transition: transform .15s var(--ease), filter .2s, background .2s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn.quiet { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn.quiet:hover { background: var(--surface-3); }
.btn.text { background: none; color: var(--mute); padding: 8px 10px; }
.btn.text:hover { color: var(--text); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  display: inline-grid; place-items: center; color: var(--text-2); transition: background .2s, transform .15s var(--ease); }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:active { transform: scale(.95); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- chips and markers */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 7px; padding: 2px 8px; font-size: 12.5px; font-weight: 500;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.maybe { background: var(--maybe-soft); color: var(--maybe); }
.chip.redo { background: var(--redo-soft); color: var(--redo); }
.chip.drop { background: var(--drop-soft); color: var(--drop); }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.side { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.side.day { background: var(--day); box-shadow: 0 0 10px rgba(233, 199, 125, .45); }
.side.night { background: var(--night); box-shadow: 0 0 10px rgba(169, 155, 224, .45); }

/* ---------- segmented control */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; color: var(--mute); padding: 8px 14px; border-radius: 9px; font-weight: 500; font-size: 14px;
  display: inline-flex; align-items: center; gap: 7px; transition: background .2s, color .2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- inputs */
.field { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; transition: border-color .2s, background .2s; }
.field:hover { border-color: #3d3553; }
.field:focus { outline: none; border-color: var(--gold); background: var(--surface-2); }
textarea.field { width: 100%; min-height: 92px; resize: vertical; line-height: 1.55; }

/* ---------- toast */
.toast { position: fixed; left: 50%; bottom: 150px; z-index: var(--z-toast); transform: translate(-50%, 8px); opacity: 0;
  background: var(--surface-3); border: 1px solid var(--line); color: var(--text); padding: 9px 14px; border-radius: 12px;
  font-size: 14px; box-shadow: var(--shadow); transition: opacity .2s, transform .25s var(--ease); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- skeletons */
.skel { border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- names the section pages already use (kept so every page shares one look) */
:root { --panel: var(--surface); --panel2: var(--surface-2); --acc: var(--gold); --no: var(--redo); --r: 14px; }
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface-3); }
.login { position: relative; z-index: 2; max-width: 360px; margin: 16vh auto 0; padding: 0 18px; text-align: center; }
.login .orb { width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%;
  background: radial-gradient(circle at 65% 35%, var(--bg) 0 42%, transparent 43%), linear-gradient(135deg, var(--day), var(--gold) 45%, var(--night)); }
.login h1 { font: 600 30px/1.15 var(--serif); margin: 0 0 6px; }
.login p { color: var(--mute); margin: 0 0 18px; }
.login input { width: 100%; }
.login .btn { width: 100%; margin-top: 10px; }
.err { color: var(--redo); min-height: 1.5em; font-size: 14px; margin-top: 10px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-dock); background: rgba(23, 20, 31, .9);
  backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-top: 1px solid var(--line-soft); padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
@media (max-width: 1180px) {               /* nine sections (2026-10-26): tighter tabs on a laptop or tablet */
  .nav a { padding: 6px 8px; font-size: 13.5px; gap: 4px; }
  .brand span:not(.orb) { display: none; }
}
@media (max-width: 560px) {
  .top { gap: 10px; padding-left: 14px; padding-right: 14px; }
  .brand span:not(.orb) { display: none; }
  .nav a { padding: 6px 9px; font-size: 13.5px; }
}
.nav { min-width: 0; overflow-x: auto; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; }
@media (max-width: 440px) {               /* the orb stands for the brand on a phone */
  .top .brand b { display: none; }
  .nav a { padding: 6px 7px; font-size: 13px; }
}

/* ---------- phones (<= 600px): the sections move to a bottom tab bar, every control grows to a thumb size.
   The header keeps the brand; the player docks sit above the tab bar; inputs are 16px so iOS never zooms. */
:root { --tabs-h: 0px; }
@media (max-width: 600px) {
  :root { --tabs-h: 58px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: calc(var(--z-dock) + 1); margin: 0; border: 0; border-radius: 0;
    border-top: 1px solid var(--line-soft); padding: 4px 6px; padding-bottom: calc(4px + env(safe-area-inset-bottom));
    background: rgba(18, 16, 25, .94); backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px);
    display: flex; gap: 2px; overflow-x: auto; overscroll-behavior-x: contain; }   /* nine sections since 2026-10-26: the bar scrolls */
  .nav a { flex: 1 0 auto; min-width: 62px; min-height: 50px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; text-align: center; padding: 4px 2px;
    font-size: 12.5px; line-height: 1.15; border-radius: 10px; white-space: nowrap; }
  .nav a[aria-current] { color: var(--gold); background: var(--gold-soft); }
  /* no backdrop-filter on the header here: it would make the fixed tab bar inside it stick to the header, not the screen */
  .top { gap: 10px; backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(18, 16, 25, .96); }
  .top .brand b { display: inline; }
  .wrap { padding-bottom: calc(200px + var(--tabs-h) + env(safe-area-inset-bottom)); }
  .dock { bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding: 10px 12px; }
  .toast { bottom: calc(190px + var(--tabs-h)); }
  .seg button { min-height: 44px; padding: 8px 12px; }
  .icon-btn { width: 46px; height: 46px; }
  .btn { min-height: 46px; }
  .btn.text { min-height: 44px; }
  .field, input.field, textarea.field, select.field { font-size: 16px; padding: 12px 13px; }
  textarea.field { min-height: 110px; }
}
