/* 美享家 · 练功房 — design system */
:root {
  --bg: #f3f0e8;
  --bg-deep: #eae5d9;
  --paper: #fffdf8;
  --paper-2: #faf7ef;
  --ink: #1b211d;
  --ink-2: #3b443e;
  --muted: #757c74;
  --faint: #a3a89f;
  --line: #e5dfd2;
  --line-strong: #d5ccbc;
  --green: #0f5a47;
  --green-2: #1a7a60;
  --green-deep: #123c31;
  --green-soft: #e6f0ea;
  --gold: #bd8a37;
  --gold-soft: #f7edda;
  --red: #ad4b42;
  --red-soft: #f8e9e6;
  --blue: #3d6f8e;
  --blue-soft: #e8f0f4;
  --r: 18px;
  --r-sm: 12px;
  --r-lg: 26px;
  --shadow: 0 1px 2px rgba(27, 33, 29, .04), 0 18px 40px -28px rgba(27, 33, 29, .35);
  --shadow-lift: 0 2px 4px rgba(27, 33, 29, .05), 0 26px 48px -26px rgba(27, 33, 29, .36);
  --serif: "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1000px 520px at 4% -8%, #fbf8ef 0, rgba(251, 248, 239, 0) 62%),
    radial-gradient(900px 600px at 100% 0%, #eee9dc 0, rgba(238, 233, 220, 0) 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
img { max-width: 100%; }
::selection { background: #cfe4d9; }

/* scrollbar */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #cfc7b7; border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* boot */
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; }
.boot-mark {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  background: var(--green-deep); color: #f0e5cf; font-family: var(--serif); font-size: 30px;
  box-shadow: var(--shadow);
}
.boot-text { color: var(--muted); letter-spacing: .12em; font-size: 13px; }

/* ============================== login ============================== */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; }
.login-brand {
  position: relative; overflow: hidden; color: #f4ecd9; padding: 54px 58px;
  background:
    radial-gradient(700px 460px at 82% 18%, rgba(201, 150, 63, .22), transparent 64%),
    radial-gradient(600px 500px at 0% 100%, rgba(46, 122, 96, .5), transparent 60%),
    linear-gradient(155deg, #174a3c 0%, #10382d 55%, #0c2b23 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand::before {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: radial-gradient(rgba(244, 236, 217, .16) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.login-brand > * { position: relative; z-index: 1; }
.login-logo { display: flex; align-items: center; gap: 14px; }
.login-logo .mark {
  width: 46px; height: 46px; border-radius: 14px; background: #f0e5cf; color: var(--green-deep);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 24px;
}
.login-logo .name { font-family: var(--serif); font-size: 21px; letter-spacing: .08em; }
.login-logo .sub { font-size: 11px; letter-spacing: .22em; color: #b9cabe; text-transform: uppercase; margin-top: 2px; }
.login-hero { max-width: 560px; padding: 30px 0; }
.login-hero .eyebrow { color: #c9a86a; letter-spacing: .26em; font-size: 12px; margin-bottom: 22px; }
.login-hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 4.4vw, 62px); line-height: 1.22; letter-spacing: .02em; }
.login-hero h1 em { font-style: normal; color: #e4c58c; }
.login-hero p { margin-top: 24px; color: #c3d0c6; font-size: 15px; line-height: 1.9; max-width: 470px; }
.login-stats { display: flex; gap: 42px; margin-top: 42px; }
.login-stats .num { font-family: var(--serif); font-size: 32px; color: #f0e5cf; }
.login-stats .lab { font-size: 12px; color: #a9bcb1; letter-spacing: .08em; margin-top: 2px; }
.login-foot { font-size: 12px; color: #8fa69a; display: flex; gap: 18px; align-items: center; }
.login-foot .dot { width: 4px; height: 4px; border-radius: 50%; background: #c9a86a; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 42px 34px; }
.login-card { width: 100%; max-width: 400px; }
.login-card .eyebrow { color: var(--gold); letter-spacing: .22em; font-size: 11px; margin-bottom: 12px; }
.login-card h2 { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: .03em; }
.login-card .welcome { color: var(--muted); font-size: 14px; margin-top: 10px; margin-bottom: 30px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12px; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--paper); outline: none; transition: border .18s, box-shadow .18s; font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(15, 90, 71, .09); }
textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--paper); outline: none; font-size: 13.5px; line-height: 1.75; resize: vertical; transition: border .18s, box-shadow .18s; }
textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(15, 90, 71, .09); }
.field .hint { color: var(--faint); font-size: 12px; margin-top: 6px; line-height: 1.6; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0;
  background: var(--green); color: #f8f3e6; padding: 12px 20px; border-radius: 12px; font-size: 14px;
  font-weight: 500; letter-spacing: .04em; transition: transform .16s, background .16s, box-shadow .16s;
  white-space: nowrap;
}
.btn:hover { background: #0c4b3b; transform: translateY(-1px); box-shadow: 0 10px 22px -14px rgba(15, 90, 71, .8); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 24px; font-size: 15px; border-radius: 14px; }
.btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line-strong); }
.btn.ghost:hover { background: var(--paper); border-color: var(--ink-2); box-shadow: none; }
.btn.soft { background: var(--green-soft); color: var(--green); }
.btn.soft:hover { background: #dbeae1; box-shadow: none; }
.btn.gold { background: var(--gold); color: #241d10; }
.btn.danger { background: var(--red); }
.btn.danger-soft { background: var(--red-soft); color: var(--red); }
.btn.sm { padding: 8px 13px; font-size: 12.5px; border-radius: 10px; }
.btn.xs { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--paper);
  display: inline-grid; place-items: center; color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--line-strong); background: var(--paper-2); }
.demo-box { margin-top: 28px; padding-top: 22px; border-top: 1px dashed var(--line-strong); }
.demo-box .lab { font-size: 11px; letter-spacing: .16em; color: var(--faint); margin-bottom: 10px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chip {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 12px;
  font-size: 12px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center;
}
.demo-chip:hover { border-color: var(--green); color: var(--green); }
.login-legal { margin-top: 26px; font-size: 11px; color: var(--faint); line-height: 1.8; }
.form-error {
  display: none; background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 10px 13px;
  font-size: 13px; margin-bottom: 14px;
}
.form-error.show { display: block; }

/* ============================== shell ============================== */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 238px; flex: 0 0 238px; position: sticky; top: 0; height: 100vh; padding: 26px 16px 18px;
  background:
    radial-gradient(420px 300px at 90% 0%, rgba(201, 150, 63, .14), transparent 70%),
    linear-gradient(180deg, #154437 0%, #103528 100%);
  color: #e9e1ce; display: flex; flex-direction: column; z-index: 30;
}
.sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; }
.sidebar .brand .mark {
  width: 38px; height: 38px; border-radius: 12px; background: #efe4cd; color: var(--green-deep);
  display: grid; place-items: center; font-family: var(--serif); font-size: 20px; font-weight: 700;
}
.sidebar .brand .name { font-family: var(--serif); font-size: 15.5px; letter-spacing: .05em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 158px; }
.sidebar .brand .sub { font-size: 9.5px; color: #9eb5a8; letter-spacing: .18em; margin-top: 3px; }
.nav-scroll { flex: 1; overflow-y: auto; padding: 2px 0; }
.nav-label { font-size: 9.5px; letter-spacing: .22em; color: #7d9a89; padding: 16px 12px 7px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; margin: 2px 0;
  color: #bfcfc4; font-size: 13.5px; position: relative; transition: background .15s, color .15s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #f2ead8; }
.nav-item.active { background: #efe4cd; color: var(--green-deep); font-weight: 600; box-shadow: 0 8px 20px -14px rgba(0, 0, 0, .7); }
.nav-item .badge-dot { margin-left: auto; background: #d2a45c; color: #2a2010; font-size: 10px; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.nav-item.active .badge-dot { background: var(--green); color: #f2ead8; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; }
.user-chip:hover { background: rgba(255, 255, 255, .06); }
.user-chip .meta { min-width: 0; }
.user-chip .nm { font-size: 13px; color: #f0e8d7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .rl { font-size: 10px; color: #93a99c; letter-spacing: .08em; }
.user-chip .out { margin-left: auto; color: #9db2a5; }
.user-chip .out:hover { color: #f0e8d7; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 70px; flex: 0 0 70px; display: flex; align-items: center; gap: 14px; padding: 0 30px;
  border-bottom: 1px solid rgba(213, 204, 188, .55); background: rgba(243, 240, 232, .78);
  backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20;
}
.topbar .menu-btn { display: none; }
.topbar-title { font-family: var(--serif); font-size: 19px; letter-spacing: .04em; }
.topbar-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar .date-pill { font-size: 12px; color: var(--muted); padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 248, .7); }
.content { padding: 26px 30px 52px; max-width: 1320px; width: 100%; margin: 0 auto; }
.mobile-tabbar { display: none; }

.avatar {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff;
  font-size: 13px; font-weight: 600; flex: 0 0 auto; letter-spacing: .02em;
}
.avatar.lg { width: 52px; height: 52px; border-radius: 15px; font-size: 17px; }
.avatar.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.avatar.xl { width: 68px; height: 68px; border-radius: 20px; font-size: 22px; }

/* ============================== common ============================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.eyebrow { font-size: 10.5px; letter-spacing: .22em; color: var(--gold); text-transform: uppercase; }
.page-head h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: .02em; margin-top: 6px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 640px; }
.page-head .actions { display: flex; gap: 9px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden;
}
.card.flush { padding: 0; }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { font-size: 14.5px; font-weight: 600; letter-spacing: .02em; }
.card-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.section-gap { margin-top: 18px; }
.link { color: var(--green); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.tiny { font-size: 11px; }
.small { font-size: 12.5px; }
.serif { font-family: var(--serif); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); display: inline-block; vertical-align: middle; margin: 0 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  background: var(--paper-2); border: 1px solid var(--line); font-size: 11px; color: var(--ink-2);
}
.chip.green { background: var(--green-soft); border-color: #cfe2d7; color: var(--green); }
.chip.gold { background: var(--gold-soft); border-color: #ecd9b5; color: #85601f; }
.chip.red { background: var(--red-soft); border-color: #edd0cb; color: var(--red); }
.chip.blue { background: var(--blue-soft); border-color: #d6e4ec; color: var(--blue); }
.chip.ghost { background: transparent; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--paper-2); border: 1px solid var(--line); color: var(--muted); }
.status-pill.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.status-pill.gold { background: var(--gold-soft); color: #7d5a1c; border-color: transparent; }
.status-pill.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.status-pill.blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }

.kpi { padding: 18px 20px; }
.kpi .lab { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-family: var(--serif); font-size: 33px; line-height: 1.1; margin-top: 8px; letter-spacing: -.01em; }
.kpi .val small { font-size: 13px; font-family: var(--sans); color: var(--muted); margin-left: 3px; }
.kpi .foot { font-size: 11px; color: var(--faint); margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.kpi .foot .up { color: var(--green); }
.kpi .foot .down { color: var(--red); }
.kpi.accent { background: linear-gradient(150deg, #174d3e, #0f392d); color: #f3ecdb; border-color: transparent; }
.kpi.accent .lab, .kpi.accent .foot { color: #a9c0b1; }
.kpi.accent .val { color: #f6efdf; }

/* hero */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 28px 30px; color: #f4edda;
  background:
    radial-gradient(520px 300px at 88% -10%, rgba(211, 168, 96, .35), transparent 65%),
    radial-gradient(460px 340px at 12% 120%, rgba(52, 138, 110, .45), transparent 70%),
    linear-gradient(135deg, #174a3b 0%, #10382c 62%, #0d2f25 100%);
  box-shadow: 0 26px 50px -34px rgba(15, 58, 45, .9);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
  border: 1px solid rgba(236, 217, 182, .18); box-shadow: 0 0 0 44px rgba(236, 217, 182, .04), 0 0 0 88px rgba(236, 217, 182, .03);
}
.hero > * { position: relative; z-index: 1; }
.hero .hello { color: #b9cabe; font-size: 12px; letter-spacing: .14em; }
.hero h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); font-weight: 600; margin-top: 8px; letter-spacing: .02em; }
.hero p { color: #b7c9bd; font-size: 13px; margin-top: 8px; max-width: 520px; }
.hero .hero-cta { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn.gold { background: #e4c58c; color: #21352b; }
.hero .btn.gold:hover { background: #f0d6a6; }
.hero .btn.ghost { border-color: rgba(244, 237, 218, .3); color: #e9e1ce; background: rgba(255, 255, 255, .04); }
.hero-stats { display: flex; gap: 34px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(238, 228, 204, .18); }
.hero-stats .v { font-family: var(--serif); font-size: 26px; color: #f6efdf; }
.hero-stats .l { font-size: 10.5px; color: #9db3a5; letter-spacing: .08em; margin-top: 2px; }
.hero .ring-wrap { position: absolute; right: 28px; bottom: 22px; opacity: .92; }

/* ring */
.score-ring { position: relative; display: inline-grid; place-items: center; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .inner { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.score-ring .score { font-family: var(--serif); font-size: 30px; line-height: 1; }
.score-ring .score small { font-size: 11px; font-family: var(--sans); color: var(--muted); }
.score-ring .cap { font-size: 10px; color: var(--muted); margin-top: 4px; letter-spacing: .08em; }
.ring-hero .score { color: #f6efdf; }
.ring-hero .cap { color: #a8bcaf; }

/* tasks */
.task-card { padding: 18px 20px; display: flex; gap: 15px; align-items: flex-start; position: relative; }
.task-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; background: var(--green-soft); color: var(--green); }
.task-icon.gold { background: var(--gold-soft); color: #9a6d22; }
.task-icon.blue { background: var(--blue-soft); color: var(--blue); }
.task-icon.red { background: var(--red-soft); color: var(--red); }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 600; font-size: 14.5px; }
.task-desc { color: var(--muted); font-size: 12px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.task-card.done { background: linear-gradient(180deg, #fbfdfb, #f6faf7); }
.task-card.done .task-title { color: var(--ink-2); }
.task-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.mini-score { font-family: var(--serif); font-size: 22px; color: var(--green); line-height: 1; }
.mini-score small { font-size: 10px; color: var(--faint); font-family: var(--sans); }

/* lists */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .main-t { font-size: 13px; }
.list-row .sub-t { font-size: 11px; color: var(--muted); margin-top: 2px; }
.list-row .end { margin-left: auto; text-align: right; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .em-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; margin: 0 auto 12px; color: var(--faint); }

/* trend/coach */
.coach-card { background: linear-gradient(135deg, #fdf7e8, #f8efd9); border-color: #ecdcba; }
.coach-card .q { font-family: var(--serif); font-size: 18px; line-height: 1.6; color: #5c451e; }
.coach-card .who { margin-top: 12px; font-size: 11px; color: #96783c; letter-spacing: .06em; }
.tip-card { background: linear-gradient(145deg, #eaf4ef, #f4faf6); border-color: #cee2d6; }
.tip-card .tt { font-size: 13px; color: var(--green); font-weight: 600; }
.tip-card .td { font-size: 12.5px; color: #496257; line-height: 1.75; margin-top: 8px; }

/* chart */
.chart-wrap { width: 100%; overflow: hidden; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row .bar-top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.bar-track { height: 7px; background: #efe9dc; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), #35a183); }
.bar-fill.gold { background: linear-gradient(90deg, #c9963f, #e0b669); }
.bar-fill.red { background: linear-gradient(90deg, #b45a4f, #d38277); }

/* heatmap */
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); grid-auto-columns: 13px; gap: 4px; overflow-x: auto; padding-bottom: 4px; justify-content: start; }
.heat-cell { width: 13px; height: 13px; border-radius: 3.5px; background: #eee8da; position: relative; }
.heat-cell[data-level="1"] { background: #cfe3d8; }
.heat-cell[data-level="2"] { background: #92c3ac; }
.heat-cell[data-level="3"] { background: #4e9b7e; }
.heat-cell[data-level="4"] { background: #1b6a51; }
.heat-legend { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--faint); margin-top: 10px; }
.heat-legend .heat-cell { width: 10px; height: 10px; }

/* badges */
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge-item { text-align: center; padding: 14px 8px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line); }
.badge-item.locked { opacity: .38; filter: grayscale(1); }
.badge-item .bi { width: 36px; height: 36px; border-radius: 50%; background: var(--gold-soft); color: #9a6d22; display: grid; place-items: center; margin: 0 auto 7px; }
.badge-item .bn { font-size: 11.5px; }
.badge-item .bd { font-size: 9.5px; color: var(--faint); margin-top: 2px; }

/* tabs/segmented */
.segmented { display: inline-flex; padding: 3px; background: #eae4d7; border-radius: 11px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 7px 13px; font-size: 12.5px; color: var(--muted); border-radius: 8px; }
.segmented button.active { background: var(--paper); color: var(--ink); box-shadow: 0 2px 6px rgba(27, 33, 29, .08); font-weight: 500; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 11px 14px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--green); border-bottom-color: var(--green); font-weight: 500; }
.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select, .filters input { padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--paper); font-size: 12px; }
.filters .search { min-width: 180px; }

/* table */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th { text-align: left; font-size: 10.5px; letter-spacing: .1em; color: var(--faint); font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
table.data td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fbf9f3; }
table.data .name-cell { display: flex; align-items: center; gap: 9px; }
table.data .name-cell .n { font-weight: 500; }
table.data .name-cell .s { font-size: 10.5px; color: var(--faint); }
.rank-num { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; font-size: 11px; background: var(--paper-2); color: var(--muted); }
.rank-num.top1 { background: #f2e2bd; color: #7a5718; }
.rank-num.top2 { background: #e6e4de; color: #5c5b55; }
.rank-num.top3 { background: #f0dfd0; color: #7d5436; }

/* recorder */
.recorder { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--paper-2); }
.rec-stage { display: grid; place-items: center; padding: 16px 0 12px; }
.rec-orb { position: relative; width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; background: #e7f0ea; color: var(--green); }
.rec-orb::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px dashed #b9d3c6; }
.rec-orb.recording { background: var(--red-soft); color: var(--red); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(173, 75, 66, .28); } 70% { box-shadow: 0 0 0 20px rgba(173, 75, 66, 0); } 100% { box-shadow: 0 0 0 0 rgba(173, 75, 66, 0); } }
.rec-timer { font-family: var(--serif); font-size: 30px; margin-top: 12px; letter-spacing: .04em; }
.rec-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.rec-actions { display: flex; gap: 9px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.rec-meter { display: flex; gap: 3px; align-items: flex-end; height: 26px; justify-content: center; margin-top: 8px; }
.rec-meter i { width: 3px; background: #c9a86a; border-radius: 2px; height: 5px; transition: height .08s; }
.rec-preview { width: 100%; border-radius: 12px; margin-top: 12px; background: #0f2f26; max-height: 300px; }
.wave-file { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.wave-file .wf-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: 16px; padding: 34px 20px; text-align: center; background: var(--paper-2); transition: border .16s, background .16s; }
.dropzone:hover, .dropzone.drag { border-color: var(--green); background: #f1f7f3; }
.dropzone .dz-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 10px; color: var(--green); }
.dropzone .dz-t { font-size: 13.5px; }
.dropzone .dz-s { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* form layout */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field-row { display: flex; gap: 10px; align-items: center; }
.required { color: var(--red); margin-left: 2px; }
.help { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.prompt-box { background: var(--paper-2); border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; padding: 12px 14px; font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }

/* score detail */
.dim-row { margin-bottom: 14px; }
.dim-top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 5px; }
.dim-top .nm { color: var(--ink-2); }
.dim-top .sc { font-family: var(--serif); color: var(--ink); }
.dim-bar { height: 6px; background: #efe9dc; border-radius: 99px; overflow: hidden; }
.dim-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), #4aa88a); }
.dim-note { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.suggest-item { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item .idx { width: 20px; height: 20px; border-radius: 6px; background: var(--gold-soft); color: #85601f; display: grid; place-items: center; font-size: 10px; flex: 0 0 auto; margin-top: 1px; }
.suggest-item .st { font-size: 12.5px; font-weight: 500; }
.suggest-item .sd { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.7; }
.quote { border-left: 2px solid var(--line-strong); padding-left: 12px; color: var(--ink-2); font-size: 12.5px; line-height: 1.9; white-space: pre-wrap; }
.result-banner { display: flex; gap: 22px; align-items: center; padding: 22px; border-radius: 16px; background: linear-gradient(135deg, #f4faf6, #fbfdf9); border: 1px solid #d7e7dc; }
.result-banner .score-ring .score { font-size: 38px; }
.result-banner .rb-title { font-family: var(--serif); font-size: 21px; }
.result-banner .rb-sub { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.7; }

/* modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20, 28, 23, .48); backdrop-filter: blur(4px);
  z-index: 100; display: flex; align-items: center; justify-content: center; padding: 22px;
  animation: fadein .18s ease-out;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--paper); border-radius: 20px; width: 100%; max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5);
  animation: modalin .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes modalin { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-card.wide { max-width: 860px; }
.modal-card.medium { max-width: 680px; }
.modal-head { padding: 20px 22px 14px; display: flex; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.modal-head .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px 18px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }

/* toast */
.toast-root { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #1c2a23; color: #f2ead8; padding: 11px 18px; border-radius: 11px; font-size: 13px;
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .6); animation: toastin .22s ease-out; max-width: 84vw;
}
.toast.err { background: #7d2f28; }
.toast.ok { background: #14503f; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* import / roster */
.import-zone { border: 1.5px dashed var(--line-strong); border-radius: 16px; padding: 26px; text-align: center; background: var(--paper-2); }
.import-zone.drag { border-color: var(--green); background: #f1f7f3; }
.cred-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
.cred-table th, .cred-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cred-table code { background: var(--paper-2); padding: 2px 6px; border-radius: 5px; font-family: var(--mono); font-size: 11.5px; }

/* rule editor */
.dim-edit { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--paper-2); margin-bottom: 10px; }
.dim-edit .top { display: flex; gap: 8px; align-items: center; }
.dim-edit input { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--paper); font-size: 12px; }
.dim-edit .nm { flex: 1; }
.dim-edit .w { width: 72px; }
.dim-edit .rm { color: var(--red); background: transparent; border: 0; padding: 4px; }
.dim-edit textarea { width: 100%; margin-top: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--paper); font-size: 12px; resize: vertical; }
.dim-edit .kw { width: 100%; margin-top: 7px; }
.weight-sum { font-size: 12px; color: var(--muted); }
.weight-sum b { color: var(--ink); }
.weight-sum.bad b { color: var(--red); }

/* misc */
.progress-steps { display: flex; gap: 6px; margin: 16px 0; }
.progress-steps .st { flex: 1; text-align: center; font-size: 10.5px; color: var(--faint); }
.progress-steps .st .bar { height: 3px; border-radius: 99px; background: #eae4d7; margin-bottom: 7px; }
.progress-steps .st.active { color: var(--green); }
.progress-steps .st.active .bar { background: var(--green); }
.progress-steps .st.done .bar { background: #8fc3ac; }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 12.5px; line-height: 1.7; }
.notice.warn { background: var(--gold-soft); color: #6c4e18; }
.notice.info { background: var(--blue-soft); color: #2f5973; }
.notice.ok { background: var(--green-soft); color: var(--green); }
.notice.err { background: var(--red-soft); color: var(--red); }
.stat-line { display: flex; gap: 24px; flex-wrap: wrap; }
.stat-line .sl .v { font-family: var(--serif); font-size: 24px; }
.stat-line .sl .l { font-size: 10.5px; color: var(--muted); }
.media-player { width: 100%; border-radius: 12px; background: #0f2f26; margin-top: 10px; }
.audio-player { width: 100%; margin-top: 10px; }
.record-status { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(15, 90, 71, .18); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner.light { border-color: rgba(255, 255, 255, .3); border-top-color: #fff; }
.loading-block { display: grid; place-items: center; padding: 60px 20px; gap: 12px; color: var(--muted); font-size: 12.5px; }
.skeleton { background: linear-gradient(90deg, #efe9dd 25%, #f7f3e9 37%, #efe9dd 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 7px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.role-tag { font-size: 9.5px; letter-spacing: .12em; padding: 2px 6px; border-radius: 4px; background: var(--gold-soft); color: #7c5a1e; }
.role-tag.admin { background: var(--green-soft); color: var(--green); }
.role-tag.manager { background: var(--blue-soft); color: var(--blue); }
.two-col-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.split-11 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.split-12 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.split-13 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
.split-14 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.split-155 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.split-16 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.podium-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; margin-bottom: 18px; }

/* drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(20, 28, 23, .45); z-index: 110; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; left: 0; top: 0; bottom: 0; width: min(82vw, 320px); z-index: 111; background: var(--paper);
  box-shadow: 24px 0 60px -30px rgba(0, 0, 0, .5); display: flex; flex-direction: column; animation: drawerin .2s ease-out;
}
@keyframes drawerin { from { transform: translateX(-100%); } to { transform: none; } }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 12px; }
.drawer .nav-item { color: var(--ink-2); }
.drawer .nav-item:hover { background: var(--paper-2); color: var(--ink); }
.drawer .nav-item.active { background: var(--green-soft); color: var(--green); box-shadow: none; }
@media (min-width: 981px) { .drawer, .drawer-overlay { display: none; } }
.sticky-side { position: sticky; top: 86px; align-self: start; }
.scene-select { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.scene-option { border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: var(--paper); cursor: pointer; transition: all .16s; position: relative; }
.scene-option:hover { border-color: #b9cdc1; transform: translateY(-1px); box-shadow: var(--shadow); }
.scene-option.selected { border-color: var(--green); box-shadow: 0 0 0 3px rgba(15, 90, 71, .09); }
.scene-option .so-top { display: flex; gap: 10px; align-items: center; }
.scene-option .so-name { font-weight: 600; font-size: 13.5px; }
.scene-option .so-desc { font-size: 11.5px; color: var(--muted); margin-top: 7px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scene-option .so-foot { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.scene-option .tick { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: white; display: none; place-items: center; }
.scene-option.selected .tick { display: grid; }

/* responsive */
@media (max-width: 1180px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-brand { padding: 42px 40px; }
  .sidebar { width: 220px; flex-basis: 220px; }
  .two-col-main { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
}
@media (max-width: 980px) {
  .split-11, .split-12, .split-13, .split-14, .split-155, .split-16 { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-page { grid-template-columns: 1fr; }
  .login-brand { min-height: auto; padding: 34px 28px 30px; }
  .login-brand .login-hero { padding: 26px 0 6px; }
  .login-brand h1 { font-size: 36px; }
  .login-stats { margin-top: 22px; gap: 30px; }
  .login-foot { display: none; }
  .login-panel { padding: 34px 24px 50px; }
  .sidebar { display: none; }
  .topbar { height: 60px; flex-basis: 60px; padding: 0 16px; }
  .topbar .menu-btn { display: inline-grid; }
  .content { padding: 18px 16px 96px; }
  .mobile-tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: rgba(255, 253, 248, .94); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  }
  .mobile-tabbar a { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 5px 0; color: var(--faint); font-size: 9.5px; border-radius: 9px; }
  .mobile-tabbar a svg { width: 20px; height: 20px; }
  .mobile-tabbar a.active { color: var(--green); }
  .mobile-tabbar a.active svg { stroke-width: 2.2; }
  .hero { padding: 22px 20px; }
  .hero .ring-wrap { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-head h1 { font-size: 25px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .kpi { padding: 15px 16px; }
  .kpi .val { font-size: 28px; }
  .card-pad { padding: 16px; }
}
@media (max-width: 680px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .scene-select { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .login-hero h1 { font-size: 31px; }
  .login-stats { gap: 22px; }
  .login-stats .num { font-size: 24px; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card { max-height: 94vh; border-radius: 20px 20px 0 0; max-width: 100%; }
  .modal-card.wide { max-width: 100%; }
  .modal-body { padding: 16px; }
  .modal-head { padding: 16px; }
  .modal-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .toast-root { bottom: 86px; }
  .hero-stats { gap: 22px; }
  .hero-stats .v { font-size: 22px; }
  .result-banner { flex-direction: column; align-items: flex-start; }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .filters select, .filters input { flex: 1; min-width: 120px; }
  .filters .search { min-width: 100%; }
  .topbar .date-pill { display: none; }
  .desktop-only { display: none !important; }
}
@media (max-width: 400px) {
  .login-brand { padding: 26px 20px; }
  .login-panel { padding: 26px 18px 46px; }
  .hero h2 { font-size: 23px; }
  .kpi .val { font-size: 26px; }
}

/* print */
@media print {
  .sidebar, .topbar, .mobile-tabbar, .no-print { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
  .card { break-inside: avoid; box-shadow: none; }
}
