/* Claude Craft Studio — liquid glass UI */
:root {
  --pearl: #edeff4;
  --ink: #121a2b;
  --clay: #c4623c;
  --clay-deep: #a44c2a;
  --apricot: #f4b183;
  --glacier: #a9bce3;
  --slate: #5a6377;

  --bg: var(--pearl);
  --text: var(--ink);
  --muted: var(--slate);
  --faint: #8a92a5;
  --accent: var(--clay);
  --accent-ink: #ffffff;
  --line: rgba(18, 26, 43, 0.09);
  --glass: linear-gradient(140deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38));
  --glass-solid: rgba(255, 255, 255, 0.82);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(255, 255, 255, 0.25);
  --shadow: 0 1px 2px rgba(18, 26, 43, 0.04), 0 12px 32px -8px rgba(18, 26, 43, 0.12);
  --shadow-lift: 0 2px 4px rgba(18, 26, 43, 0.05), 0 22px 48px -12px rgba(18, 26, 43, 0.22);
  --field-a: rgba(196, 98, 60, 0.42);
  --field-b: rgba(169, 188, 227, 0.75);
  --field-c: rgba(244, 177, 131, 0.55);
  --input: rgba(255, 255, 255, 0.66);
  --ok: #2f8a5b;
  --warn: #b7791f;
  --err: #c0392b;

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0d1322;
    --text: #edf0f7;
    --muted: #a3abbe;
    --faint: #707a90;
    --accent: #e07a52;
    --line: rgba(255, 255, 255, 0.08);
    --glass: linear-gradient(140deg, rgba(40, 50, 76, 0.62), rgba(24, 31, 50, 0.42));
    --glass-solid: rgba(26, 33, 52, 0.9);
    --glass-edge: rgba(255, 255, 255, 0.12);
    --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -8px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 22px 48px -12px rgba(0, 0, 0, 0.6);
    --field-a: rgba(196, 98, 60, 0.32);
    --field-b: rgba(70, 96, 160, 0.45);
    --field-c: rgba(160, 90, 70, 0.28);
    --input: rgba(8, 12, 22, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0d1322;
  --text: #edf0f7;
  --muted: #a3abbe;
  --faint: #707a90;
  --accent: #e07a52;
  --line: rgba(255, 255, 255, 0.08);
  --glass: linear-gradient(140deg, rgba(40, 50, 76, 0.62), rgba(24, 31, 50, 0.42));
  --glass-solid: rgba(26, 33, 52, 0.9);
  --glass-edge: rgba(255, 255, 255, 0.12);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -8px rgba(0, 0, 0, 0.5);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 22px 48px -12px rgba(0, 0, 0, 0.6);
  --field-a: rgba(196, 98, 60, 0.32);
  --field-b: rgba(70, 96, 160, 0.45);
  --field-c: rgba(160, 90, 70, 0.28);
  --input: rgba(8, 12, 22, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::selection { background: rgba(196, 98, 60, 0.25); }

/* color field behind the glass */
.field { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.field i { position: absolute; border-radius: 50%; filter: blur(80px); }
.field i:nth-child(1) { width: 52vw; height: 52vw; left: -12vw; top: -18vw; background: var(--field-b); }
.field i:nth-child(2) { width: 40vw; height: 40vw; right: -8vw; top: 6vh; background: var(--field-a); }
.field i:nth-child(3) { width: 46vw; height: 46vw; left: 30vw; bottom: -30vw; background: var(--field-c); }

/* glass primitives */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shine), var(--shadow);
}
.panel { border-radius: var(--r-xl); padding: 28px; }
.card { border-radius: var(--r-lg); padding: 20px; display: block; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
a.card:hover { transform: translateY(-3px); box-shadow: var(--glass-shine), var(--shadow-lift); }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
main { padding: 104px 0 120px; min-height: 70vh; }

/* nav */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1160px, 100% - 24px); height: 58px; border-radius: 999px;
  display: flex; align-items: center; gap: 8px; padding: 0 8px 0 18px;
}
.brand { display: flex; align-items: center; gap: 10px; font: 650 16px/1 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; flex: none; object-fit: cover; }
.auth .brand-mark { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto; }
.nav-links { display: flex; gap: 2px; margin: 0 auto; }
.nav-links a { padding: 9px 15px; border-radius: 999px; font-size: 15px; color: var(--muted); transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.on { color: var(--text); background: var(--glass-solid); box-shadow: var(--glass-shine), 0 1px 3px rgba(18, 26, 43, 0.08); }
.nav-end { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }

.tabbar { display: none; }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav { height: 54px; top: 10px; }
  .tabbar {
    display: flex; position: fixed; z-index: 50; bottom: max(12px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    width: min(440px, 100% - 24px); border-radius: 999px; padding: 6px; justify-content: space-between;
  }
  .tabbar a { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 7px 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 500; color: var(--muted); }
  .tabbar a.on { color: var(--accent); background: var(--glass-solid); }
  .tabbar svg { width: 22px; height: 22px; }
  main { padding-top: 86px; }
  .nav-end .btn { display: none; }
  .brand span { font-size: 15px; }
  .lens { transform: none; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 15px; white-space: nowrap; transition: transform 0.15s, background 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 18px -6px rgba(196, 98, 60, 0.7); }
.btn-primary:hover { background: var(--clay-deep); }
.btn-glass { background: var(--glass-solid); border-color: var(--glass-edge); box-shadow: var(--glass-shine), 0 1px 3px rgba(18, 26, 43, 0.08); }
.btn-glass:hover { box-shadow: var(--glass-shine), 0 4px 14px rgba(18, 26, 43, 0.12); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--line); }
.btn-danger { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--line); color: var(--text); }

/* type */
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.12; margin: 0; font-weight: 700; }
.display { font-size: clamp(42px, 7.2vw, 88px); letter-spacing: -0.045em; line-height: 0.98; font-weight: 750; }
.h1 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -0.035em; }
.h2 { font-size: clamp(24px, 3vw, 32px); }
.h3 { font-size: 19px; letter-spacing: -0.015em; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 40ch; line-height: 1.5; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.xs { font-size: 12.5px; }

.section { margin-top: 88px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head p { margin: 6px 0 0; }
.link { color: var(--accent); font-weight: 600; font-size: 15px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > * + * { margin-top: 14px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; padding-top: 40px; }
.hero h1 { max-width: 11ch; }
.hero .lede { margin: 22px 0 30px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 12px; } }

/* the lens: a glass chat window showing a trick */
.lens { position: relative; border-radius: 34px; padding: 18px; transform: rotate(-1.2deg); }
.lens::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 60% at 20% 0%, rgba(255, 255, 255, 0.55), transparent 55%);
  mix-blend-mode: soft-light;
}
.lens-bar { display: flex; gap: 6px; padding: 4px 6px 14px; }
.lens-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.bubble { border-radius: 20px; padding: 14px 16px; font-size: 15px; line-height: 1.5; max-width: 88%; opacity: 0; transform: translateY(8px); animation: rise 0.6s var(--ease) forwards; }
.bubble.me { margin-left: auto; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.bubble.ai { background: var(--glass-solid); border: 1px solid var(--glass-edge); border-bottom-left-radius: 6px; margin-top: 12px; }
.bubble.ai code { font-size: 13px; }
.bubble:nth-child(2) { animation-delay: 0.25s; }
.bubble:nth-child(3) { animation-delay: 1.1s; }
.bubble:nth-child(4) { animation-delay: 1.9s; }
.lens-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 12px; border-radius: 999px; background: var(--glass-solid); border: 1px solid var(--glass-edge); font-size: 13px; font-weight: 600; opacity: 0; animation: rise 0.6s var(--ease) 2.6s forwards; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* content cards */
.cover { aspect-ratio: 16 / 9; border-radius: 16px; background: linear-gradient(135deg, var(--field-b), var(--field-a)); object-fit: cover; width: 100%; margin-bottom: 16px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--faint); margin-top: 14px; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--line); color: var(--muted); }
.tag.accent { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tag.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.tag.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.chip { height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--glass-edge); background: var(--glass-solid); cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); }
.chip.on { background: var(--text); color: var(--bg); border-color: transparent; }

.skill-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; margin-bottom: 14px; background: var(--glass-solid); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shine); }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 16px; overflow-x: auto; padding: 4px 4px 18px; margin: 0 -4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; }

.course-card { padding: 0; overflow: hidden; }
.course-card .cover { border-radius: 0; margin: 0; aspect-ratio: 16 / 8; }
.course-card .body { padding: 20px; }

/* forms */
label.f { display: grid; gap: 7px; font-size: 14px; font-weight: 600; }
label.f > span.hint { font-weight: 400; color: var(--faint); font-size: 13px; }
.input, textarea.input, select.input {
  width: 100%; min-height: 46px; padding: 11px 15px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--input); outline: none; transition: border-color 0.2s, box-shadow 0.2s; font-size: 15px;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
textarea.input { resize: vertical; min-height: 120px; line-height: 1.55; }
textarea.code { font-family: var(--mono); font-size: 13.5px; min-height: 380px; }
.input-pill { border-radius: 999px; padding-left: 20px; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-grid.two { grid-template-columns: 1fr; } }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; font-weight: 500; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background 0.2s; margin: 0; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.25s var(--ease); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }

/* prose (markdown) */
.prose { font-size: 17.5px; line-height: 1.72; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 28px; margin-top: 1.8em; }
.prose h3 { font-size: 21px; margin-top: 1.5em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 18px; margin-inline: auto; border: 1px solid var(--line); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose blockquote { margin: 0; padding: 14px 20px; border-radius: 16px; background: var(--glass-solid); border: 1px solid var(--glass-edge); color: var(--muted); }
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--line); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: #141b2c; color: #e6e9f2; padding: 18px 20px; border-radius: 18px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.2em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; }

.article-head { text-align: left; margin: 20px 0 30px; }
.article-head .h1 { margin: 14px 0 16px; }
.article-cover { width: 100%; border-radius: var(--r-xl); margin: 0 0 40px; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--glass-edge); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; font-weight: 500; }
.back:hover { color: var(--text); }

/* course player */
.player-layout { display: grid; grid-template-columns: 330px 1fr; gap: 20px; align-items: start; }
.player-side { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; border-radius: var(--r-lg); padding: 14px; }
@media (max-width: 900px) { .player-layout { grid-template-columns: 1fr; } .player-side { position: static; max-height: none; order: 2; } }
.lesson-section { font-size: 13px; font-weight: 650; color: var(--faint); margin: 14px 10px 6px; }
.lesson-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 14px; font-size: 14.5px; }
.lesson-link:hover { background: var(--line); }
.lesson-link.on { background: var(--glass-solid); box-shadow: var(--glass-shine), 0 1px 3px rgba(18, 26, 43, 0.08); font-weight: 600; }
.lesson-link .state { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid var(--line); font-size: 11px; color: var(--faint); }
.lesson-link .state.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.lesson-link .state.locked { border: 0; }
.lesson-link .dur { margin-left: auto; font-size: 12.5px; color: var(--faint); }
.video { aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: var(--r-lg); background: #000; display: block; }
.locked-box { text-align: center; padding: 56px 24px; }
.lock-badge { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 18px; display: grid; place-items: center; background: var(--glass-solid); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shine), var(--shadow); }
.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width 0.5s var(--ease); }

/* login */
.auth { width: min(420px, 100% - 32px); margin: 40px auto 0; }
.auth .panel { padding: 34px 30px; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: 13px; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.code-input { letter-spacing: 0.5em; font-size: 24px; text-align: center; font-weight: 650; font-family: var(--mono); }

/* footer */
.footer { padding: 40px 0 120px; color: var(--faint); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 30px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 28px; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

.announce { display: block; text-align: center; font-size: 14px; font-weight: 500; padding: 10px 18px; border-radius: 999px; width: fit-content; margin: 0 auto 26px; }

/* toast & modal */
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); top: 84px; display: grid; gap: 8px; width: min(420px, 100% - 24px); pointer-events: none; }
.toast { padding: 13px 18px; border-radius: 18px; font-size: 14.5px; font-weight: 500; animation: drop 0.4s var(--ease); pointer-events: auto; display: flex; gap: 10px; align-items: center; }
.toast.err .dot { background: var(--err); }
@keyframes drop { from { opacity: 0; transform: translateY(-10px) scale(0.97); } }
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(13, 19, 34, 0.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade 0.2s; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: var(--r-xl); padding: 26px; background: var(--glass-solid); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shine), var(--shadow-lift); animation: pop 0.3s var(--ease); }
.modal.wide { width: min(980px, 100%); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 8px; }
.skeleton { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--line), transparent, var(--line)); background-size: 200% 100%; animation: shimmer 1.4s infinite; min-height: 180px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* tickets */
.thread { display: grid; gap: 12px; }
.msg { border-radius: 20px; padding: 14px 18px; max-width: 86%; white-space: pre-wrap; word-wrap: break-word; }
.msg.staff { background: color-mix(in srgb, var(--accent) 12%, var(--glass-solid)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.msg.user { margin-left: auto; background: var(--glass-solid); border: 1px solid var(--glass-edge); }
.msg .who { font-size: 12.5px; color: var(--faint); margin-bottom: 4px; font-weight: 600; }

/* lists */
.list { border-radius: var(--r-lg); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--line); }
.list-row .grow { flex: 1; min-width: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* admin */
.admin { display: grid; grid-template-columns: 236px 1fr; gap: 20px; align-items: start; }
.admin-side { position: sticky; top: 92px; border-radius: var(--r-lg); padding: 10px; }
.admin-side a { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 13px; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.admin-side a:hover { color: var(--text); background: var(--line); }
.admin-side a.on { color: var(--text); background: var(--glass-solid); box-shadow: var(--glass-shine), 0 1px 3px rgba(18, 26, 43, 0.08); }
.admin-side a .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; display: grid; place-items: center; }
.admin-side svg { width: 18px; height: 18px; flex: none; }
.admin-side .group { font-size: 12px; font-weight: 650; color: var(--faint); padding: 14px 13px 4px; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; border-radius: 999px; }
  .admin-side a { white-space: nowrap; border-radius: 999px; }
  .admin-side .group { display: none; }
}
.admin-main { min-width: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.stat { border-radius: var(--r-lg); padding: 18px 20px; }
.stat b { display: block; font: 700 30px/1.1 var(--font-display); letter-spacing: -0.03em; margin-top: 6px; }
.stat span { font-size: 13.5px; color: var(--muted); }
.table-wrap { border-radius: var(--r-lg); overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; font-size: 12.5px; font-weight: 650; color: var(--faint); padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--line); }
.editor-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .editor-grid { grid-template-columns: 1fr; } }
.preview-pane { border-radius: var(--r-md); padding: 18px 22px; background: var(--input); border: 1px solid var(--line); min-height: 380px; max-height: 70vh; overflow: auto; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--line); gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--glass-solid); color: var(--text); box-shadow: 0 1px 3px rgba(18, 26, 43, 0.12); }
.check-list { display: grid; gap: 10px; }
.check-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--input); border: 1px solid var(--line); font-size: 14.5px; }
.bars { display: flex; align-items: end; gap: 4px; height: 90px; }
.bars i { flex: 1; background: var(--accent); border-radius: 4px 4px 2px 2px; min-height: 3px; opacity: 0.85; }
.file-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--line); display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.hide { display: none !important; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }

/* =========================================================
   Skin: "claude" — warm paper, serif headlines, flat surfaces
   (selected in Admin → Settings → Site theme)
   ========================================================= */
[data-skin='claude'] {
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-2: #f0eee6;
  --text: #141413;
  --muted: #5e5d59;
  --faint: #8a8880;
  --accent: #c96442;
  --clay-deep: #b0553a;
  --line: rgba(31, 30, 29, 0.1);
  --border: #e6e3d9;
  --glass: var(--surface);
  --glass-solid: var(--surface);
  --glass-edge: var(--border);
  --glass-shine: 0 0 0 0 transparent;
  --shadow: 0 1px 2px rgba(31, 30, 29, 0.04);
  --shadow-lift: 0 6px 20px -8px rgba(31, 30, 29, 0.18);
  --input: #ffffff;
  --r-xl: 18px;
  --r-lg: 14px;
  --r-md: 10px;
  --font-display: 'Source Serif 4', 'Tiempos Headline', Georgia, 'Times New Roman', serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-skin='claude']:not([data-theme='light']) {
    --bg: #262624; --surface: #30302e; --surface-2: #1f1e1d; --text: #faf9f5; --muted: #c2c0b6; --faint: #8f8d85;
    --accent: #d97757; --clay-deep: #c4673f; --line: rgba(222, 220, 209, 0.12); --border: rgba(222, 220, 209, 0.14);
    --input: #1f1e1d; --shadow: 0 1px 2px rgba(0, 0, 0, 0.25); --shadow-lift: 0 8px 24px -10px rgba(0, 0, 0, 0.6); color-scheme: dark;
  }
}
:root[data-skin='claude'][data-theme='dark'] {
  --bg: #262624; --surface: #30302e; --surface-2: #1f1e1d; --text: #faf9f5; --muted: #c2c0b6; --faint: #8f8d85;
  --accent: #d97757; --clay-deep: #c4673f; --line: rgba(222, 220, 209, 0.12); --border: rgba(222, 220, 209, 0.14);
  --input: #1f1e1d; --shadow: 0 1px 2px rgba(0, 0, 0, 0.25); --shadow-lift: 0 8px 24px -10px rgba(0, 0, 0, 0.6); color-scheme: dark;
}
[data-skin='claude'] .field { display: none; }
[data-skin='claude'] .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
[data-skin='claude'] a.card:hover { transform: none; box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--text) 18%, transparent); }
[data-skin='claude'] h1, [data-skin='claude'] h2, [data-skin='claude'] h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.015em; }
[data-skin='claude'] .display { font-weight: 400; letter-spacing: -0.025em; line-height: 1.04; }
[data-skin='claude'] .h1 { font-weight: 400; letter-spacing: -0.02em; }
[data-skin='claude'] .h3 { font-family: var(--font); font-weight: 600; letter-spacing: -0.01em; }
[data-skin='claude'] .stat b { font-family: var(--font-display); font-weight: 500; }
[data-skin='claude'] .prose { font-family: var(--font-serif); font-size: 18px; }
[data-skin='claude'] .prose h2, [data-skin='claude'] .prose h3 { font-weight: 500; }

/* top bar instead of floating pill */
[data-skin='claude'] .nav { top: 0; left: 0; transform: none; width: 100%; height: 60px; border-radius: 0; border-width: 0 0 1px; padding: 0 max(16px, calc((100vw - 1160px) / 2)); background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: none; }
[data-skin='claude'] .nav-links a { border-radius: 8px; }
[data-skin='claude'] .nav-links a.on { background: var(--surface-2); box-shadow: none; }
[data-skin='claude'] main { padding-top: 96px; }
[data-skin='claude'] .tabbar { border-radius: 16px; background: var(--surface); }
[data-skin='claude'] .tabbar a { border-radius: 12px; }
[data-skin='claude'] .tabbar a.on { background: var(--surface-2); }

/* controls */
[data-skin='claude'] .btn { border-radius: 10px; font-weight: 500; }
[data-skin='claude'] .btn-primary { box-shadow: none; }
[data-skin='claude'] .btn-glass { background: var(--surface); border-color: var(--border); box-shadow: none; }
[data-skin='claude'] .btn-glass:hover { background: var(--surface-2); box-shadow: none; }
[data-skin='claude'] .input-pill { border-radius: 10px; padding-left: 15px; }
[data-skin='claude'] .input { border-color: var(--border); }
[data-skin='claude'] .chip { border-radius: 8px; background: var(--surface); border-color: var(--border); }
[data-skin='claude'] .chip.on { background: var(--text); color: var(--bg); }
[data-skin='claude'] .tag { border-radius: 6px; }
[data-skin='claude'] .seg { border-radius: 10px; background: var(--surface-2); }
[data-skin='claude'] .seg button { border-radius: 8px; }
[data-skin='claude'] .seg button.on { background: var(--surface); box-shadow: 0 1px 2px rgba(31, 30, 29, 0.1); }
[data-skin='claude'] .announce { border-radius: 10px; }
[data-skin='claude'] .skill-icon { background: var(--surface-2); border-color: transparent; box-shadow: none; border-radius: 12px; }
[data-skin='claude'] .cover { background: linear-gradient(135deg, #ebe6d8, #e3b8a0); border-radius: 10px; }
[data-skin='claude'] .course-card .cover { border-radius: 0; }
[data-skin='claude'] .lesson-link.on, [data-skin='claude'] .admin-side a.on { background: var(--surface-2); box-shadow: none; }
[data-skin='claude'] .admin-side a { border-radius: 8px; }
[data-skin='claude'] .modal { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 18px; }
[data-skin='claude'] .modal-back { background: rgba(20, 20, 19, 0.35); }
[data-skin='claude'] .msg.user { background: var(--surface-2); border-color: transparent; }
[data-skin='claude'] .msg.staff { background: var(--surface); border-color: var(--border); }
[data-skin='claude'] .check-item, [data-skin='claude'] .preview-pane { border-color: var(--border); }
[data-skin='claude'] .switch input:checked { background: var(--accent); }
[data-skin='claude'] .footer .wrap { border-color: var(--border); }

/* hero: chat window drawn like the Claude app */
[data-skin='claude'] .lens { transform: none; border-radius: 18px; padding: 22px; }
[data-skin='claude'] .lens::after { display: none; }
[data-skin='claude'] .lens-bar { display: none; }
[data-skin='claude'] .bubble.me { background: var(--surface-2); color: var(--text); border-radius: 12px; }
[data-skin='claude'] .bubble.ai { background: transparent; border: 0; padding: 4px 2px; font-family: var(--font-serif); font-size: 16.5px; max-width: 100%; }
[data-skin='claude'] .lens-chip { border-radius: 8px; background: var(--surface-2); border-color: transparent; }

/* course + lesson layout: collapsible text, episode list under the video on phones */
.course-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.mobile-eps { display: none; border-radius: var(--r-lg); padding: 10px; }
@media (max-width: 900px) {
  .course-grid { grid-template-columns: minmax(0, 1fr); }
  .course-curr { order: -1; }
  .player-side { display: none; }
  .mobile-eps { display: block; }
}
.more-body { max-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.more.open .more-body, .more.fits .more-body { max-height: none; -webkit-mask-image: none; mask-image: none; }
.more.fits .more-btn { display: none; }
.more-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-solid); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.more-btn:hover { background: var(--line); }
.more-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.more-btn svg { transition: transform .2s ease; }
.more.open .more-btn svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .more-btn svg { transition: none; } }
[data-skin='claude'] .more-btn { background: var(--surface-2, transparent); border-radius: 10px; }
.more-body > :first-child { margin-top: 0; }
