/* =============================================================================
   Modulysa design system
   Editorial type (DM Serif Display + DM Sans), bright blue accent, warm amber
   secondary, generous whitespace, soft radii. Works LTR and RTL.
   ========================================================================== */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-card: #f2f4f9;
  --bg-card-hover: #e9edf6;
  --text: #15161c;
  --text-2: #4b4f5c;
  --text-3: #8a8f9c;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-tint: #e8efff;
  --accent-glow: rgba(37, 99, 235, 0.16);
  --amber: #f59e0b;
  --amber-tint: #fff4df;
  --green: #0f9f6e;
  --green-tint: #e3f7ef;
  --red: #dc2626;
  --red-tint: #fdeaea;
  --border: rgba(20, 22, 30, 0.09);
  --border-strong: rgba(20, 22, 30, 0.18);
  --shadow-sm: 0 1px 2px rgba(20, 22, 30, 0.05), 0 2px 8px rgba(20, 22, 30, 0.04);
  --shadow-md: 0 6px 24px rgba(20, 22, 30, 0.08);
  --shadow-lg: 0 18px 48px rgba(20, 22, 30, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 68px;
  --container: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
button { font: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--text-2); line-height: 1.75; max-width: 46rem; }
.muted { color: var(--text-3); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.75rem; }
.serif { font-family: var(--font-display); }
.accent { color: var(--accent); }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 760px; }
.section { padding: 4.5rem 0; }
.section.tight { padding: 2.5rem 0; }
.section.soft { background: var(--bg-soft); }
.section-label {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------------------------------------------------------------- nav --- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent) 0%, #60a5fa 100%); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px var(--accent-glow); }
.brand-mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.8rem; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: 0.92rem; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { background: var(--bg-card); color: var(--text); }
.nav-links .mobile-only { display: none; }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.hamburger { display: none; width: 42px; height: 42px; border: 1px solid var(--border); background: #fff; border-radius: 10px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.hamburger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s; }
@media (max-width: 1180px) { .nav-links a { padding: 0.45rem 0.55rem; font-size: 0.86rem; } .nav-actions .btn { padding-inline: 0.9rem; } }
@media (max-width: 1024px) {
  .nav-links { position: absolute; top: var(--nav-h); inset-inline: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--border); padding: 0.75rem 1.25rem 1rem; display: none; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0.85rem; border-radius: 10px; }
  .hamburger { display: flex; }
  .nav-actions .hide-mobile { display: none; }
  .nav-links .mobile-only { display: block; }
}
.btn { white-space: nowrap; }

/* ---------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px; padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; font-size: 0.92rem; letter-spacing: 0.01em;
  cursor: pointer; transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-strong); color: #fff; transform: translateY(-1px); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: var(--accent); color: #fff; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-card); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-card); color: var(--text); }
.btn-danger { background: var(--red-tint); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-amber { background: var(--amber); color: #2b1d00; }
.btn-amber:hover { background: #e08c00; color: #2b1d00; }
.btn-sm { min-height: 36px; padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-lg { min-height: 52px; padding: 0.9rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ------------------------------------------------------------- cards --- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.card.soft { background: var(--bg-card); border-color: transparent; box-shadow: none; }
.card.accent { background: var(--accent-tint); border-color: transparent; box-shadow: none; }
.card-title { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; margin: 0 0 0.35rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- feature --- */
.feature { padding: 1.75rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); margin-bottom: 1rem; }
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature p { color: var(--text-2); margin: 0; font-size: 0.95rem; }

/* -------------------------------------------------------------- hero --- */
.hero { position: relative; padding: 4.5rem 0 3rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 3rem; } }
.hero h1 { margin-bottom: 1.2rem; }
.hero .lead { margin-bottom: 2rem; }
.hero-art { position: relative; width: 100%; aspect-ratio: 1 / 1; max-width: 480px; margin: 0 auto; }
.hero-blob { position: absolute; inset: 0; border-radius: 42% 58% 60% 40% / 45% 40% 60% 55%; background: radial-gradient(circle at 30% 30%, #bfdbfe 0%, #e0e7ff 45%, #fde68a 100%); opacity: 0.9; animation: blob 14s ease-in-out infinite alternate; }
@keyframes blob { to { border-radius: 58% 42% 40% 60% / 55% 60% 40% 45%; } }
.hero-wave { position: absolute; inset: 15% 10%; display: flex; align-items: center; justify-content: space-between; gap: 2%; }
.hero-wave span { display: block; flex: 1 1 0; height: 100%; border-radius: 999px; background: var(--accent); transform-origin: 50% 50%; animation: eq 2.2s ease-in-out infinite; will-change: transform; }
.hero-wave span:nth-child(odd) { background: var(--amber); }
.hero-wave span:nth-child(2n) { animation-delay: -0.4s; }
.hero-wave span:nth-child(3n) { animation-delay: -0.9s; }
.hero-wave span:nth-child(5n) { animation-delay: -1.5s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
.hero-badge { position: absolute; background: #fff; border-radius: 14px; padding: 0.7rem 1rem; box-shadow: var(--shadow-md); display: flex; gap: 0.6rem; align-items: center; font-size: 0.85rem; font-weight: 600; }
.hero-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.hero-badge.b1 { top: 6%; inset-inline-start: -4%; }
.hero-badge.b2 { bottom: 12%; inset-inline-end: -6%; }
.hero-badge.b3 { bottom: -2%; inset-inline-start: 18%; }
@media (max-width: 480px) { .hero-badge.b1, .hero-badge.b2 { inset-inline-start: auto; inset-inline-end: 0; } .hero-badge.b3 { inset-inline-start: 0; } }

/* -------------------------------------------------------------- stats --- */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.stats-bar .stat { background: #fff; padding: 1.4rem 1.5rem; }
.stat-number { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--text); margin-bottom: 0.3rem; }
.stat-number small { font-size: 1.1rem; color: var(--text-3); }
.stat-label { font-size: 0.85rem; color: var(--text-3); }
.stat-sub { font-size: 0.8rem; color: var(--text-2); margin-top: 0.25rem; }
@media (max-width: 900px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }

/* -------------------------------------------------------------- steps --- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 1.5rem 1.5rem 1.5rem; background: var(--bg-card); border-radius: var(--radius-lg); }
.step-num { font-family: var(--font-display); font-size: 2.6rem; color: var(--accent); line-height: 1; margin-bottom: 0.75rem; opacity: 0.9; }
.step h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; margin-bottom: 0.35rem; }
.step p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* ----------------------------------------------------------- outcomes --- */
.outcome { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.outcome:last-child { border-bottom: 0; }
.outcome .check { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--green-tint); color: var(--green); display: grid; place-items: center; margin-top: 0.1rem; }
.outcome .check svg { width: 16px; height: 16px; }
.outcome h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.02rem; margin-bottom: 0.2rem; }
.outcome p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* ------------------------------------------------------------ pricing --- */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; }
@media (max-width: 800px) { .pricing { grid-template-columns: 1fr; } }
.price-card { position: relative; display: flex; flex-direction: column; padding: 2rem; border-radius: var(--radius-xl); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.price-card.featured { border-color: var(--accent); box-shadow: 0 20px 50px var(--accent-glow); }
.price-card .ribbon { position: absolute; top: -12px; inset-inline-start: 2rem; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.3rem 0.8rem; border-radius: 999px; }
.price { font-family: var(--font-display); font-size: 3rem; line-height: 1; margin: 1rem 0 0.25rem; }
.price small { font-family: var(--font-body); font-size: 0.95rem; color: var(--text-3); }
.price-card ul { list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; flex: 1; }
.price-card li { display: flex; gap: 0.6rem; padding: 0.4rem 0; color: var(--text-2); font-size: 0.95rem; }
.price-card li svg { flex: none; width: 18px; height: 18px; color: var(--green); margin-top: 0.2rem; }

/* ----------------------------------------------------------------- faq --- */
.faq details { border-bottom: 1px solid var(--border); padding: 0.4rem 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; font-weight: 600; font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); margin: 0 0 1rem; max-width: 46rem; }

/* ------------------------------------------------------------- quotes --- */
.quote { padding: 1.75rem; border-radius: var(--radius-lg); background: var(--bg-card); }
.quote p { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.5; margin-bottom: 1rem; color: var(--text); }
.quote cite { font-style: normal; font-size: 0.85rem; color: var(--text-3); }

/* ------------------------------------------------------------- footer --- */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 3rem 0 2rem; margin-top: 3rem; font-size: 0.9rem; color: var(--text-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { margin-bottom: 0.6rem; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 0.4rem; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: 0.8rem; color: var(--text-3); }

/* ------------------------------------------------------------ language --- */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px; padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text-2); font-weight: 500; font-size: 0.88rem; cursor: pointer; }
.lang-btn:hover { background: var(--bg-card); }
.lang-btn svg { width: 16px; height: 16px; }
.lang-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 180px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 0.4rem; display: none; z-index: 60; }
.lang-menu.open { display: block; }
.lang-menu button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.55rem 0.75rem; border: 0; background: transparent; border-radius: 8px; text-align: start; cursor: pointer; color: var(--text); font-size: 0.92rem; }
.lang-menu button:hover { background: var(--bg-card); }
.lang-menu button.current { color: var(--accent); font-weight: 600; }
.lang-menu .code { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }

/* ------------------------------------------------------------ messages --- */
.messages { position: fixed; top: calc(var(--nav-h) + 12px); inset-inline-end: 1rem; z-index: 90; display: flex; flex-direction: column; gap: 0.5rem; max-width: min(420px, calc(100vw - 2rem)); }
.msg { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.9rem 1rem; border-radius: 12px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 0.92rem; animation: slidein 0.25s ease; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } }
.msg.success { border-inline-start: 4px solid var(--green); }
.msg.error { border-inline-start: 4px solid var(--red); }
.msg.warning { border-inline-start: 4px solid var(--amber); }
.msg.info { border-inline-start: 4px solid var(--accent); }
.msg button { margin-inline-start: auto; border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: 1.1rem; line-height: 1; }

/* ---------------------------------------------------------------- forms --- */
.form-grid { display: grid; gap: 1.1rem; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field.span-2 { grid-column: 1 / -1; }
.field label, .field .label { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.field .help { font-size: 0.8rem; color: var(--text-3); }
.simple .field .help, .simple .field .muted.tiny { display: none; }
.more { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 0.25rem 1rem; }
.more summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; padding: 0.6rem 0; color: var(--text-2); list-style: none; display: flex; justify-content: space-between; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: '+'; color: var(--accent); font-size: 1.2rem; line-height: 1; }
.more[open] summary::after { content: '-'; }
.more .form-grid { padding: 0.25rem 0 1rem; }
.big-action { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
.invite-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.invite-row:last-child { border-bottom: 0; }
.invite-row .who { flex: 1 1 220px; }
.invite-row .copy-box { flex: 1 1 320px; margin: 0; }
.invite-row .copy-box .input { min-height: 38px; font-size: 0.8rem; }
.field .errors { font-size: 0.82rem; color: var(--red); }
.input { width: 100%; min-height: 46px; padding: 0.65rem 0.9rem; border: 1.5px solid var(--border-strong); border-radius: 10px; background: #fff; font: inherit; color: var(--text); transition: border-color 0.15s, box-shadow 0.15s; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.input[readonly] { background: var(--bg-card); color: var(--text-2); }
.textarea { min-height: 110px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%234b4f5c' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; padding-inline-end: 2.4rem; }
[dir="rtl"] .select { background-position: left 0.8rem center; }
.field.has-error .input { border-color: var(--red); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 18px; height: 18px; margin-top: 0.2rem; accent-color: var(--accent); flex: none; }
.choice-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.4rem; }
.choice-list li, .choice-list > div { display: block; }
.choice-list label { display: flex; gap: 0.6rem; align-items: center; padding: 0.55rem 0.75rem; border: 1px solid var(--border); border-radius: 10px; font-weight: 500; font-size: 0.92rem; cursor: pointer; background: #fff; }
.choice-list label:hover { background: var(--bg-card); }
.choice-list input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.file-input { font-size: 0.9rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.5rem; }
.nonfield { background: var(--red-tint); color: var(--red); border-radius: 10px; padding: 0.75rem 1rem; font-size: 0.9rem; margin-bottom: 1rem; }
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 2rem 1rem; background: radial-gradient(1200px 600px at 20% -10%, var(--accent-tint), transparent 60%), radial-gradient(800px 500px at 110% 110%, var(--amber-tint), transparent 60%); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: var(--radius-xl); padding: 2.25rem; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 2rem; margin-bottom: 0.4rem; }
@media (max-width: 480px) { .auth-card { padding: 1.5rem; border-radius: var(--radius-lg); } }

/* ---------------------------------------------------------- app layout --- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - var(--nav-h)); max-width: var(--container); width: 100%; margin: 0 auto; }
.app > * { min-width: 0; }
.sidebar nav { min-width: 0; }
.sidebar { border-inline-end: 1px solid var(--border); background: var(--bg-soft); padding: 1.5rem 1rem; }
.sidebar-title { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); padding: 0 0.75rem; margin: 0 0 0.6rem; font-weight: 700; }
.sidebar nav a { display: flex; gap: 0.7rem; align-items: center; padding: 0.6rem 0.75rem; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 0.93rem; margin-bottom: 2px; }
.sidebar nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.8; }
.sidebar nav a:hover { background: #fff; color: var(--text); }
.sidebar nav a.active { background: #fff; color: var(--accent); box-shadow: var(--shadow-sm); }
.sidebar .group { margin-bottom: 1.5rem; }
.app-main { padding: 2rem 2rem 4rem; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.page-head h1 { font-size: 2rem; margin: 0; }
.page-head .sub { color: var(--text-3); margin: 0.2rem 0 0; }

/* -------------------------------------------------------------- guides --- */
.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.guide-card { display: flex; gap: 1rem; align-items: flex-start; color: var(--text); }
.guide-card:hover { border-color: var(--accent); }
.guide-card .feature-icon { margin: 0; flex: none; }
.guide { display: grid; gap: 1rem; }
.guide-intro { max-width: 62ch; color: var(--text-2); font-size: 1rem; }
.guide-pip { position: absolute; right: 1.5rem; bottom: 1.5rem; width: 220px; border-radius: 16px; box-shadow: var(--shadow-lg); background: #000; z-index: 6; }
.guide-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-soft); box-shadow: var(--shadow-lg); }
.guide-canvas { position: absolute; top: 0; left: 0; width: 1120px; transform-origin: top left; min-height: 0; pointer-events: none; user-select: none; }
.guide-canvas.app { grid-template-columns: 220px 1fr; max-width: none; margin: 0; }
.guide-canvas .app-main { padding: 1.5rem 1.75rem 2rem; position: relative; height: 100%; overflow: hidden; }
.guide-canvas.no-side { grid-template-columns: 1fr; }
.guide-canvas.no-side .sidebar { display: none; }
.guide-topbar { display: flex; justify-content: space-between; align-items: center; margin: -0.5rem 0 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.guide-topbar .brand { font-size: 1.25rem; }
.guide-topbar .brand-mark { width: 28px; height: 28px; }
.guide-topbar .brand-mark svg { width: 16px; height: 16px; }
.guide-canvas .page-head { margin-bottom: 1.25rem; }
.guide-canvas .page-head h1 { font-size: 1.7rem; }
.guide-canvas .table th, .guide-canvas .table td { padding-inline: 0.75rem; }
.guide-scene { display: none; }
.guide-scene.on { display: block; animation: guidefade 0.4s ease; }
@keyframes guidefade { from { opacity: 0; } }
.guide-canvas .is-focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); border-radius: 10px; transition: box-shadow 0.3s; }
.guide-canvas th.is-focus, .guide-canvas td.is-focus { box-shadow: none; outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 0; }
.guide-canvas .stat.is-focus { box-shadow: inset 0 0 0 3px var(--accent); border-radius: 0; }
.guide-canvas .flash:not(tr) { animation: guiderow 1.2s ease; }
.guide-canvas .btn.pressed { transform: scale(0.97); background: var(--accent-strong); }
.guide-canvas tr.flash td { animation: guiderow 1.2s ease; }
@keyframes guiderow { 0% { background: var(--accent-tint); } 100% { background: transparent; } }
.guide-cursor { position: absolute; left: 60%; top: 60%; width: 22px; height: 22px; z-index: 5; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3)); transition: left 0.9s cubic-bezier(.4,.1,.2,1), top 0.9s cubic-bezier(.4,.1,.2,1); }
.guide-cursor.click::after { content: ""; position: absolute; left: -9px; top: -9px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent); animation: guidering 0.5s ease-out; }
@keyframes guidering { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.2); opacity: 0; } }
.guide-phone { position: absolute; right: 2rem; top: 1.5rem; width: 240px; border-radius: 28px; background: #fff; border: 8px solid #15161c; box-shadow: var(--shadow-lg); padding: 1rem 1rem 1.1rem; text-align: center; }
.guide-phone .onb-art { width: 130px; margin: 0.25rem auto 0.75rem; }
.guide-phone h2 { font-size: 1.25rem; margin: 0.2rem 0 0.3rem; }
.guide-phone p { font-size: 0.72rem; color: var(--text-2); line-height: 1.45; margin: 0 0 0.8rem; }
.guide-phone .btn { font-size: 0.85rem; }
.guide-phone .field label { font-size: 0.65rem; margin-bottom: 0.15rem; }
.guide-phone .input { font-size: 0.75rem; padding: 0.3rem 0.5rem; min-height: 0; }
.guide-canvas .auth-wrap { min-height: 0; padding: 1rem 1rem 2rem; }
.guide-onb { display: flex; flex-direction: column; min-height: 100%; margin: -1.5rem -1.75rem -2rem; padding-bottom: 1rem; background: radial-gradient(1200px 600px at 20% -10%, var(--accent-tint), transparent 60%), radial-gradient(800px 500px at 110% 110%, var(--amber-tint), transparent 60%); }
.guide-onb .onb-step { display: flex; }
.guide-onb .onb-art { width: 150px; margin-bottom: 1rem; }
.guide-onb .onb-step h1 { font-size: 2rem; }
.guide-onb .onb-name { margin-top: 1rem; }
.guide-onb .onb-actions { padding-bottom: 0; }
.guide-player { grid-template-columns: 280px 1fr; }
.guide-player .player-card { position: static; }
.guide-player .player-card .cover { aspect-ratio: auto; height: 140px; }
.guide-focus { position: absolute; inset: 0; z-index: 4; background: #0b1020; color: #e8ecf7; overflow: hidden; }
.guide-focus-art { position: absolute; inset: 22% 8%; display: flex; align-items: center; justify-content: space-between; gap: 1.2%; }
.guide-focus-art span { display: block; flex: 1 1 0; height: 100%; border-radius: 999px; background: linear-gradient(180deg, #7dd3fc, #6366f1); opacity: 0.85; transform-origin: 50% 50%; animation: eq 2.6s ease-in-out infinite; }
.guide-focus-art span:nth-child(2n) { animation-delay: -0.5s; opacity: 0.6; }
.guide-focus-art span:nth-child(3n) { animation-delay: -1.1s; }
.guide-focus-art span:nth-child(5n) { animation-delay: -1.7s; opacity: 0.7; }
.guide-focus .focus-track { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.guide-focus .focus-top, .guide-focus .focus-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.guide-script summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; cursor: pointer; list-style: none; font-weight: 600; }
.guide-script summary::-webkit-details-marker { display: none; }
.guide-script summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); margin-inline-start: auto; transition: transform 0.2s; }
.guide-script[open] summary::after { transform: rotate(-135deg); }
.guide-script .guide-lines { margin-bottom: 1rem; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 2rem 1rem; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-soft); text-align: center; transition: border-color 0.15s, background 0.15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-tint); }
.dropzone > svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 0.25rem; }
.upload-log { margin: 1rem 0 0; padding: 0 0 0 1.25rem; font-size: 0.88rem; color: var(--text-2); display: grid; gap: 0.25rem; max-height: 16rem; overflow: auto; }
.upload-log li.ok { color: var(--green); }
.upload-log li.err { color: var(--red); }
table.recordings td { vertical-align: top; }
table.recordings .inline-form { margin-top: 0.25rem; }
.guide-caption { min-height: 4rem; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0.9rem 1.2rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 1.05rem; }
.guide-transport { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.guide-transport .ctrl.main { width: 54px; height: 54px; }
.guide-bar { flex: 1 1 200px; height: 6px; display: flex; gap: 3px; }
.guide-bar span { flex: 1; border-radius: 999px; background: var(--bg-card); position: relative; overflow: hidden; }
.guide-bar span::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: left; }
.guide-lines { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.guide-lines li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.6rem; padding: 0.6rem 0.75rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-size: 0.95rem; }
.guide-lines li:hover { background: var(--bg-soft); }
.guide-lines li.on { border-color: var(--accent); background: var(--accent-tint); }
.guide-lines .n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.guide-lines li.on .n { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .guide-cursor { transition: none; } .guide-scene.on { animation: none; } }

/* -------------------------------------------------------- focus screen --- */
.focus-open { margin-top: 0.9rem; }
.focus-open svg { width: 18px; height: 18px; }
.focus { position: fixed; inset: 0; z-index: 1000; background: #0b1020; color: #e8ecf7; }
.focus canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.focus-hud { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: max(1rem, env(safe-area-inset-top, 0px)) 1.25rem max(1.25rem, env(safe-area-inset-bottom, 0px)); pointer-events: none; }
.focus-hud > * { pointer-events: auto; }
.focus-top, .focus-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.focus-bottom { align-items: flex-end; flex-wrap: wrap; }
.focus-track { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 0.95rem; min-width: 0; }
.focus-track span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-track .brand-mark { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; }
.focus-track .brand-mark svg { width: 16px; height: 16px; }
.focus-time { font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums; }
.focus-time small { display: block; font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(232,236,247,0.6); margin-top: 0.4rem; }
.focus-looks { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); }
.focus-looks button { border: 0; background: transparent; color: rgba(232,236,247,0.75); font: inherit; font-size: 0.85rem; font-weight: 500; padding: 0.4rem 0.85rem; border-radius: 999px; cursor: pointer; }
.focus-looks button[aria-pressed="true"] { background: #e8ecf7; color: #0b1020; }
.focus-ctrl { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.08); color: #e8ecf7; display: grid; place-items: center; cursor: pointer; flex: none; }
.focus-ctrl.main { width: 60px; height: 60px; background: #e8ecf7; color: #0b1020; border: 0; }
.focus-ctrl svg { width: 20px; height: 20px; }
.focus-ctrl:focus-visible, .focus-looks button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.focus-hud.dim > * { opacity: 0; transition: opacity 0.8s; }
.focus-hud.dim .focus-bottom { opacity: 1; }
.focus-hud.dim .focus-bottom > * { opacity: 0; transition: opacity 0.8s; }
.focus-hud.dim .focus-time { opacity: 0.45; }
html.focus-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .focus-hud.dim > *, .focus-hud.dim .focus-bottom > * { transition: none; } }

/* ---------------------------------------------------------- onboarding --- */
.onb { min-height: calc(100vh - 0px); display: flex; flex-direction: column; background: radial-gradient(1200px 600px at 20% -10%, var(--accent-tint), transparent 60%), radial-gradient(800px 500px at 110% 110%, var(--amber-tint), transparent 60%); }
.onb-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; max-width: 640px; margin: 0 auto; padding: 1rem 1.25rem; }
.onb-top > * { min-width: 48px; }
.onb-back { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--text-2); cursor: pointer; }
.onb-back svg { width: 18px; height: 18px; }
.onb-skip { background: none; border: 0; color: var(--text-3); font: inherit; font-size: 0.95rem; cursor: pointer; padding: 0.4rem 0; }
.onb-skip:hover { color: var(--text); }
.onb-dots { display: flex; gap: 6px; align-items: center; }
.onb-dots span { width: 8px; height: 8px; border-radius: 999px; background: var(--border-strong); transition: width 0.25s, background 0.25s; }
.onb-dots span.on { width: 28px; background: var(--accent); }
.onb-step { display: none; flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 100%; max-width: 640px; margin: 0 auto; padding: 0.5rem 1.25rem 1.5rem; }
.onb-step.on { display: flex; }
.onb-step h1 { font-size: clamp(2rem, 6vw, 2.6rem); margin: 0 0 0.6rem; text-wrap: balance; }
.onb-step .lead { font-size: 1.05rem; margin: 0; max-width: 34rem; }
.onb-step .section-label { margin-bottom: 0.6rem; }
.onb-art { position: relative; width: min(300px, 70vw); aspect-ratio: 1 / 1; margin: 0 auto 2rem; }
.onb-tips { display: grid; gap: 0.75rem; width: 100%; max-width: 480px; text-align: start; margin: 0 auto 2rem; }
.onb-tip { display: flex; gap: 0.9rem; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.9rem 1.1rem; box-shadow: var(--shadow-sm); }
.onb-tip .feature-icon { margin: 0; flex: none; }
.onb-tip strong { display: block; font-weight: 600; }
.onb-tip span:last-child { color: var(--text-2); font-size: 0.92rem; }
.onb-albums { display: grid; gap: 0.6rem; width: 100%; max-width: 480px; text-align: start; margin: 0 auto 2rem; }
.onb-album { position: relative; display: flex; gap: 0.9rem; align-items: center; padding: 0.7rem 0.8rem; border-radius: var(--radius-lg); border: 2px solid var(--border); background: #fff; cursor: pointer; }
.onb-album input { position: absolute; opacity: 0; pointer-events: none; }
.onb-album:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.onb-album img, .onb-album .cover-mini { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: linear-gradient(135deg, #dbeafe, #fef3c7); display: grid; place-items: center; color: var(--accent); }
.onb-album .cover-mini svg { width: 24px; height: 24px; }
.onb-album > span:nth-of-type(2) { display: grid; min-width: 0; }
.onb-album strong { font-weight: 600; }
.onb-check { margin-inline-start: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-card); color: transparent; flex: none; }
.onb-album:has(input:checked) .onb-check { background: var(--accent); color: #fff; }
.onb-check svg { width: 14px; height: 14px; }
.onb-actions { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 1.25rem 1.5rem; }
.onb .auth-card { width: 100%; max-width: 560px; }
.onb-form { display: contents; }
.onb-name { width: 100%; max-width: 440px; margin-top: 1.5rem; text-align: start; }
.onb [hidden] { display: none !important; }

/* ------------------------------------------------------------ quota --- */
.quota { margin-top: 1rem; width: 100%; max-width: 26rem; }
.quota-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.45rem; font-size: 0.93rem; color: var(--text-2); }
.quota-label strong { color: var(--text); font-weight: 600; }
.quota-bar { display: flex; height: 8px; border-radius: 999px; background: var(--bg-card); overflow: hidden; }
.quota-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent) 0%, #60a5fa 100%); transition: width 0.4s ease; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { border-inline-end: 0; border-bottom: 1px solid var(--border); padding: 0.75rem 1rem; }
  .sidebar nav { display: flex; gap: 0.25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  /* Each item is exactly as wide as its text, whatever the phone's font size: never shrink, never wrap */
  .sidebar nav a { white-space: nowrap; flex: 0 0 auto; width: max-content; max-width: none; }
  .sidebar .group { margin: 0; display: contents; }
  .sidebar-title { display: none; }
  .app-main { padding: 1.5rem 1.25rem 3rem; }
}

/* -------------------------------------------------------------- tables --- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
.table-wrap.plain { border: 0; border-radius: 0; }
.card { min-width: 0; }
table.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: start; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); padding: 0.9rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg-soft); white-space: nowrap; }
.table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafbfe; }
.table tr.ended td { opacity: 0.55; }
.table tr.ended:hover td { opacity: 0.85; }
.table tr.ended td { opacity: 0.55; }
.table tr.ended:hover td { opacity: 0.85; }
.table a.row-link { color: var(--text); font-weight: 600; }
.table a.row-link:hover { color: var(--accent); }
.table .actions { display: flex; gap: 0.4rem; justify-content: flex-end; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-tint); color: var(--accent); font-weight: 700; font-size: 0.8rem; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.who { display: flex; align-items: center; gap: 0.75rem; }
.who .name { font-weight: 600; }
.who .sub { font-size: 0.8rem; color: var(--text-3); }

/* ------------------------------------------------------------- badges --- */
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--bg-card); color: var(--text-2); white-space: nowrap; }
.badge.green { background: var(--green-tint); color: var(--green); }
.badge.amber { background: var(--amber-tint); color: #a05a00; }
.badge.red { background: var(--red-tint); color: var(--red); }
.badge.blue { background: var(--accent-tint); color: var(--accent); }

/* ------------------------------------------------------------ toolbar --- */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1rem; }
.toolbar .input { min-height: 42px; max-width: 320px; }
.toolbar .btn { min-height: 42px; }
.track.done .num { color: var(--green); }
.track.done .num svg { width: 16px; height: 16px; }
.track .resume-note { display: inline-block; margin-inline-start: 0.5rem; font-size: 0.75rem; color: var(--accent); font-weight: 600; }
.toolbar .check { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 42px; font-size: 0.9rem; cursor: pointer; }
.toolbar .select { max-width: 200px; }
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--text-3); background: var(--bg-card); border-radius: var(--radius-lg); }
.empty h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; color: var(--text-2); }

/* -------------------------------------------------------------- charts --- */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 0.5rem; }
.chart .bar { flex: 1; min-width: 4px; background: var(--accent); border-radius: 4px 4px 0 0; opacity: 0.85; position: relative; transition: opacity 0.15s; }
.chart .bar:hover { opacity: 1; }
.chart .bar.zero { background: var(--border); min-height: 3px; }
.chart .bar .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; font-size: 0.7rem; padding: 0.2rem 0.45rem; border-radius: 6px; white-space: nowrap; display: none; z-index: 2; }
.chart .bar:hover .tip { display: block; }
.chart-axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-3); margin-top: 0.4rem; }
.hbar { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 0.75rem; align-items: center; padding: 0.5rem 0; font-size: 0.92rem; }
.hbar .meter { height: 10px; border-radius: 999px; background: var(--bg-card); overflow: hidden; }
.hbar .fill { height: 100%; background: linear-gradient(90deg, var(--accent), #60a5fa); border-radius: 999px; }
.hbar .val { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

/* -------------------------------------------------------------- albums --- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.5rem; }
.album-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; color: var(--text); transition: transform 0.2s, box-shadow 0.2s; }
.album-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--text); }
.cover { aspect-ratio: 1; background: linear-gradient(135deg, #dbeafe, #fef3c7); display: grid; place-items: center; color: var(--accent); position: relative; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover svg { width: 38%; height: 38%; opacity: 0.6; }
.cover .play { position: absolute; inset-inline-end: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--accent); display: grid; place-items: center; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(6px); transition: all 0.2s; }
.album-card:hover .cover .play { opacity: 1; transform: none; }
.cover .play svg { width: 18px; height: 18px; opacity: 1; }
.album-meta { padding: 1rem 1.1rem 1.1rem; }
.album-meta h3 { font-family: var(--font-body); font-weight: 600; font-size: 1rem; margin: 0 0 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-meta p { margin: 0; font-size: 0.82rem; color: var(--text-3); }

/* -------------------------------------------------------------- player --- */
.player-layout { display: grid; grid-template-columns: 340px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .player-layout { grid-template-columns: 1fr; gap: 1rem; } }
.player-card { position: sticky; top: calc(var(--nav-h) + 1rem); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); }
@media (max-width: 900px) { .player-card { position: sticky; top: var(--nav-h); z-index: 20; border-radius: 0 0 var(--radius-lg) var(--radius-lg); margin: 0 -1.25rem; border-inline: 0; } .player-card .cover { display: none; } }
.player-body { padding: 1.25rem 1.25rem 1.25rem; }
.now-playing { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.now-title { font-weight: 600; font-size: 1.05rem; margin: 0.15rem 0 0.1rem; min-height: 1.5em; }
.now-status { font-size: 0.82rem; color: var(--text-3); min-height: 1.2em; }
.progress { position: relative; height: 8px; border-radius: 999px; background: var(--bg-card); cursor: pointer; margin: 1rem 0 0.4rem; overflow: hidden; }
.progress .buffered { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--accent-tint); }
.progress .played { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--accent); border-radius: 999px; }
.times { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.controls { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 0.75rem 0 0.25rem; }
.ctrl { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background 0.15s; }
.ctrl:hover { background: var(--bg-card); }
.ctrl[disabled] { opacity: 0.35; cursor: default; }
.ctrl svg { width: 20px; height: 20px; }
.ctrl.main { width: 64px; height: 64px; background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 10px 24px var(--accent-glow); }
.ctrl.main:hover { background: var(--accent-strong); }
.ctrl.main svg { width: 26px; height: 26px; }
.volume { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.75rem; color: var(--text-3); }
.volume input { flex: 1; accent-color: var(--accent); }
.volume svg { width: 20px; height: 20px; flex: none; }
.track-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.track { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
.track:last-child { border-bottom: 0; }
.track:hover { background: #fafbfe; }
.track.active { background: var(--accent-tint); }
.track .num { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 0.85rem; text-align: center; }
.track.active .num { color: var(--accent); }
.track .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .dur { font-size: 0.82rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq span { width: 3px; background: var(--accent); border-radius: 2px; animation: eq 1s ease-in-out infinite; height: 100%; transform-origin: bottom; }
.eq span:nth-child(2) { animation-delay: -0.3s; } .eq span:nth-child(3) { animation-delay: -0.6s; }

/* -------------------------------------------------------------- misc --- */
.callout { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: var(--radius-md); background: var(--amber-tint); color: #5b3a00; font-size: 0.93rem; }
.callout.blue { background: var(--accent-tint); color: #1e3a8a; }
.callout.green { background: var(--green-tint); color: #065f46; }
.callout.red { background: var(--red-tint); color: #7f1d1d; }
.callout svg { width: 20px; height: 20px; flex: none; margin-top: 0.1rem; }
.copy-box { display: flex; gap: 0.5rem; align-items: center; }
.copy-box .input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1.25rem; font-size: 0.92rem; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 500; }
.divider { height: 1px; background: var(--border); margin: 2rem 0; }
.inline-form { display: inline; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .eq span { animation: none; } }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; font-family: var(--font-body); font-weight: 600; font-size: 1.15rem; }
.prose ul { padding-inline-start: 1.25rem; color: var(--text-2); }
.prose li { margin-bottom: 0.4rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 1rem 0 1.5rem; }
.prose th, .prose td { text-align: start; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.timeline { list-style: none; padding: 0; margin: 0; border-inline-start: 2px solid var(--accent-tint); }
.timeline li { position: relative; padding: 0 0 1.5rem 1.5rem; }
[dir="rtl"] .timeline li { padding: 0 1.5rem 1.5rem 0; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline .when { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.timeline p { margin: 0.25rem 0 0; color: var(--text-2); }
