:root {
  --ink: #152925;
  --muted: #61736e;
  --paper: #f7f3ea;
  --white: #fffdf8;
  --green: #1b3b36;
  --green-2: #28564e;
  --gold: #d69b45;
  --red: #b94b43;
  --line: #d9d6cc;
  --shadow: 0 18px 50px rgba(25, 49, 43, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 5%, #ead7b4 0, transparent 25rem), var(--paper); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.site-header { height: 76px; padding: 0 max(22px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(21,41,37,.12); background: rgba(247,243,234,.88); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: white; font-family: Georgia, serif; font-weight: 700; letter-spacing: -.04em; }
.brand b, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
nav { display: flex; align-items: center; gap: 8px; }
nav a, nav button { border: 0; background: transparent; color: var(--ink); padding: 10px 13px; border-radius: 999px; text-decoration: none; cursor: pointer; }
nav .primary { background: var(--green); color: white; }
main { min-height: calc(100vh - 76px); }
.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.hero { padding: 84px 0 58px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--green-2); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.04; margin: 0; }
h1 { font-size: clamp(44px, 7vw, 80px); letter-spacing: -.045em; }
h2 { font-size: clamp(32px, 4.8vw, 52px); letter-spacing: -.035em; }
h3 { font-size: 24px; }
.lead { color: var(--muted); font-size: clamp(18px, 2vw, 21px); line-height: 1.65; max-width: 650px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { border: 1px solid var(--green); border-radius: 999px; padding: 13px 19px; background: transparent; color: var(--green); font-weight: 750; cursor: pointer; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.btn.primary { background: var(--green); color: white; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1f271f; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.book-card { min-height: 440px; border-radius: 32px; background: var(--green); color: white; padding: 36px; box-shadow: var(--shadow); transform: rotate(1.4deg); position: relative; overflow: hidden; }
.book-card::before { content: "♪"; position: absolute; right: -12px; bottom: -70px; font-family: Georgia, serif; font-size: 330px; color: rgba(255,255,255,.07); transform: rotate(-8deg); }
.book-card .number { color: #eec887; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.book-card h2 { margin-top: 50px; font-size: 56px; }
.book-card p { margin-top: 22px; max-width: 300px; line-height: 1.6; color: #d8e6e1; }
.staff-mini { margin-top: 46px; height: 94px; position: relative; }
.staff-mini i { position: absolute; left: 0; right: 0; height: 1px; background: rgba(255,255,255,.44); }
.staff-mini i:nth-child(1){top:10px}.staff-mini i:nth-child(2){top:28px}.staff-mini i:nth-child(3){top:46px}.staff-mini i:nth-child(4){top:64px}.staff-mini i:nth-child(5){top:82px}
.staff-mini b { position: relative; display: inline-block; width: 18px; height: 14px; border-radius: 50%; background: #eec887; margin: 33px 15px 0; transform: rotate(-18deg); z-index: 1; }
.staff-mini b:nth-of-type(2){margin-top:24px}.staff-mini b:nth-of-type(3){margin-top:15px}.staff-mini b:nth-of-type(4){margin-top:6px}.staff-mini b:nth-of-type(5){margin-top:-3px}
.features { padding: 26px 0 90px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature, .card { border: 1px solid var(--line); background: rgba(255,253,248,.82); border-radius: 24px; padding: 26px; box-shadow: 0 8px 28px rgba(21,41,37,.06); }
.feature span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #e6ece7; color: var(--green); font-weight: 900; }
.feature h3 { margin-top: 24px; }
.feature p, .muted { color: var(--muted); line-height: 1.58; }
.page { padding: 56px 0 90px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.exercise-card { text-decoration: none; transition: transform .18s ease; }
.exercise-card:hover { transform: translateY(-3px); }
.exercise-card .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 30px; }
.exercise-card h3 { margin-bottom: 10px; }
.auth-wrap { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 40px 18px; }
.auth-card { width: min(470px, 100%); padding: 34px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: #ebe7dc; border-radius: 14px; margin: 25px 0; }
.tabs button { border: 0; border-radius: 10px; padding: 11px; cursor: pointer; background: transparent; }
.tabs button.active { background: var(--white); box-shadow: 0 3px 10px rgba(21,41,37,.08); }
.form { display: grid; gap: 15px; }
label { display: grid; gap: 7px; font-weight: 700; font-size: 14px; }
input, select, textarea { width: 100%; border: 1px solid #c9c6bc; border-radius: 12px; padding: 13px 14px; background: white; color: var(--ink); }
textarea { min-height: 100px; resize: vertical; }
.check { grid-template-columns: auto 1fr; align-items: start; font-weight: 500; color: var(--muted); line-height: 1.45; }
.check input { width: auto; margin-top: 4px; }
.practice-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 24px; align-items: start; }
.score-sheet { padding: 28px; }
.score-meta { display: flex; gap: 9px; margin: 12px 0 24px; }
.pill { border-radius: 999px; background: #e7ece8; color: var(--green); padding: 6px 10px; font-size: 12px; font-weight: 750; }
.notation { min-height: 250px; border-radius: 18px; background: white; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.notation img { display: block; max-width: 100%; max-height: 360px; object-fit: contain; }
.notation-fallback { width: 88%; position: relative; height: 150px; }
.notation-fallback .line { position: absolute; left: 0; right: 0; height: 1px; background: #40504c; }
.notation-fallback .line:nth-child(1){top:30px}.notation-fallback .line:nth-child(2){top:52px}.notation-fallback .line:nth-child(3){top:74px}.notation-fallback .line:nth-child(4){top:96px}.notation-fallback .line:nth-child(5){top:118px}
.note-row { height: 150px; display: flex; align-items: center; justify-content: space-around; position: relative; z-index: 2; }
.note-dot { width: 22px; height: 16px; border-radius: 50%; background: var(--ink); transform: rotate(-18deg); position: relative; }
.note-dot::after { content:""; width: 2px; height: 60px; background: var(--ink); position:absolute; right:0; bottom:6px; }
.practice-actions { display: grid; gap: 12px; margin-top: 18px; }
.practice-actions .btn { width: 100%; }
.recorder { text-align: center; }
.mic { width: 94px; height: 94px; border-radius: 50%; border: 0; color: white; background: var(--green); font-size: 34px; cursor: pointer; box-shadow: 0 0 0 10px #e6ece7; margin: 20px auto; }
.mic.recording { background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 18px rgba(185,75,67,.12); } }
.timer { font: 700 30px ui-monospace, monospace; }
.result { display: none; margin-top: 20px; text-align: left; }
.result.show { display: block; }
.score-ring { width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) calc(var(--score) * 1%), #e4e2da 0); margin: 6px auto 22px; position: relative; }
.score-ring::after { content:""; position:absolute; inset:10px; border-radius:50%; background:var(--white); }
.score-ring strong { z-index:1; font-size:34px; }
.feedback-list { padding-left: 19px; color: var(--muted); line-height: 1.6; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 26px 0; }
.stat strong { display:block; font: 700 40px Georgia,serif; margin-top: 8px; }
.dashboard { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
th, td { padding: 13px 10px; text-align:left; border-bottom:1px solid var(--line); font-size:14px; }
th { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.07em; }
.bar { height:8px; border-radius:999px; background:#e2e1da; overflow:hidden; min-width:90px; }
.bar i { display:block; height:100%; background:var(--gold); border-radius:inherit; }
.qr { width: 110px; height:110px; border:1px solid var(--line); background:white; }
.exercise-admin { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 0; border-bottom:1px solid var(--line); }
.exercise-admin:last-child { border-bottom:0; }
.admin-book-row { display:grid; grid-template-columns:minmax(130px, 1.3fr) auto auto auto; gap:8px; align-items:center; padding:6px 0; border-bottom:1px solid rgba(217,214,204,.7); min-width:360px; }
.admin-book-row:last-child { border-bottom:0; }
.empty { text-align:center; padding:48px 24px; color:var(--muted); }
.toast { position:fixed; left:50%; bottom:26px; transform:translate(-50%, 20px); background:var(--ink); color:white; padding:12px 18px; border-radius:12px; opacity:0; pointer-events:none; transition:.2s; z-index:50; box-shadow:var(--shadow); }
.toast.show { opacity:1; transform:translate(-50%,0); }
.privacy-note { font-size:12px; color:var(--muted); line-height:1.55; }
.consent-box { padding: 14px; border: 1px solid #c9c6bc; border-radius: 12px; background: #f3f0e7; }
.timeline { margin-top:18px; }
.timeline-item { display:grid; grid-template-columns:18px 1fr auto; gap:12px; align-items:center; padding:15px 0; border-bottom:1px solid var(--line); }
.timeline-item:last-child { border-bottom:0; }
.timeline-dot { width:10px; height:10px; border-radius:50%; background:var(--gold); box-shadow:0 0 0 5px #f4e7d2; }
.attempt-score { display:grid; place-items:center; width:48px; height:48px; border-radius:50%; background:var(--green); color:white; }
.grid-one { display:grid; gap:12px; margin-top:18px; }
.grid-one .exercise-card { padding:18px; }
.grid-one .exercise-card .meta { margin-bottom:12px; }
@media (max-width: 850px) {
  .hero, .practice-layout, .dashboard { grid-template-columns: 1fr; }
  .book-card { min-height: 360px; }
  .features, .grid { grid-template-columns: 1fr; }
  .site-header { height:68px; }
  nav a:not(.primary) { display:none; }
  .page { padding-top:35px; }
  .page-head { align-items:start; flex-direction:column; }
}
@media (max-width: 520px) {
  .shell { width:min(100% - 24px, 1180px); }
  .hero { padding-top:50px; }
  h1 { font-size:46px; }
  .book-card { padding:27px; min-height:330px; }
  .book-card h2 { font-size:44px; margin-top:35px; }
  .card, .feature { border-radius:19px; padding:20px; }
  .stats { grid-template-columns:repeat(2, 1fr); }
  .admin-book-row { grid-template-columns:1fr auto; min-width:0; }
  .brand small { display:none; }
}
