/* 辞达智伴 HSK 预览样式（2026-11-25） */
:root {
  --bg: #f5f0e6;
  --surface: #ffffff;
  --surface-2: #fdfaf3;
  --line: #e6dccb;
  --ink: #3a2a1a;
  --ink-2: #5a4a3a;
  --ink-3: #8b7a60;
  --brand: #c44a3a;
  --brand-soft: #f7e4de;
  --accent: #2f5d50;
  --warn: #9a6a12;
  --danger: #a33a2e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(36, 33, 28, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.hsk-shell { max-width: 1080px; margin: 0 auto; padding: 24px 18px 64px; }
.hsk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.hsk-brand { display: flex; align-items: baseline; gap: 10px; }
.hsk-brand h1 { font-size: 22px; margin: 0; letter-spacing: .5px; }
.hsk-brand span { font-size: 12px; color: var(--ink-3); }
.hsk-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.hsk-nav a, .hsk-nav button { font-size: 13px; }
.hsk-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.hsk-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hsk-entry { display: flex; flex-direction: column; gap: 10px; min-height: 180px; }
.hsk-entry h2 { margin: 0; font-size: 18px; }
.hsk-entry p { margin: 0; color: var(--ink-2); font-size: 14px; }
.hsk-entry .tag { font-size: 12px; color: var(--accent); }
.hsk-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.hsk-btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  padding: 8px 14px; border-radius: 10px; font-size: 14px; cursor: pointer;
}
.hsk-btn:hover { background: #f1ede4; }
.hsk-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.hsk-btn.primary:hover { filter: brightness(1.06); }
.hsk-btn.ghost { background: transparent; }
.hsk-btn.danger { color: var(--danger); border-color: #e6c9c3; }
.hsk-btn:disabled { opacity: .5; cursor: not-allowed; }
.hsk-btn.small { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.hsk-muted { color: var(--ink-3); font-size: 12px; }
.hsk-note { background: var(--brand-soft); border: 1px solid #ead3cb; color: #6d2f24; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.hsk-warn { background: #fdf5e3; border: 1px solid #f0e0b8; color: var(--warn); padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.hsk-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.hsk-badge.mock { background: #fdf5e3; color: var(--warn); }
.hsk-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hsk-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.hsk-field select, .hsk-field input, .hsk-field textarea {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; font-family: inherit;
}
.hsk-field textarea { min-height: 68px; resize: vertical; }
.hsk-list { display: flex; flex-direction: column; gap: 10px; }
.hsk-sentence { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.hsk-sentence .zh { font-size: 18px; }
.hsk-sentence .py { color: var(--ink-3); font-size: 13px; }
.hsk-chat { display: flex; flex-direction: column; gap: 12px; min-height: 300px; max-height: 60vh; overflow-y: auto; padding: 6px; }
.hsk-msg { max-width: 82%; padding: 10px 12px; border-radius: 14px; font-size: 15px; }
.hsk-msg.role { align-self: flex-start; background: #eef3f0; border: 1px solid #dce7e1; }
.hsk-msg.learner { align-self: flex-end; background: var(--brand-soft); border: 1px solid #ead3cb; }
.hsk-msg .meta { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.hsk-composer { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.hsk-status { font-size: 13px; color: var(--ink-2); min-height: 20px; }
.hsk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; }
.hsk-dot.busy { background: var(--warn); animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: .4; } to { opacity: 1; } }
.hsk-report { display: flex; flex-direction: column; gap: 12px; }
.hsk-report h3 { margin: 0; font-size: 16px; }
.hsk-dim { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.hsk-dim:last-child { border-bottom: 0; }
.hsk-grid2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hsk-modal { position: fixed; inset: 0; background: rgba(30, 26, 22, .45); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 90; }
.hsk-modal .hsk-card { max-width: 520px; width: 100%; max-height: 90vh; overflow: auto; }
.hsk-hidden { display: none !important; }
.hsk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hsk-table th, .hsk-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.hsk-scroll { overflow-x: auto; }
@media (max-width: 640px) {
  .hsk-shell { padding: 16px 14px 48px; }
  .hsk-brand h1 { font-size: 19px; }
  .hsk-msg { max-width: 92%; }
  .hsk-card { padding: 14px; }
}

/* ===== 2026-11-26 产品外壳（顶栏 / 用户区 / 页脚 / 主题大厅 / 文化卡） ===== */
body { display: flex; flex-direction: column; min-height: 100vh; background: #f5f0e6; }
.hsk-shell { flex: 1; }
.hsk-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px max(18px, env(safe-area-inset-right, 0px)) 10px max(18px, env(safe-area-inset-left, 0px));
  background: rgba(245, 240, 230, .94); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.hsk-topbrand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hsk-logo { font-family: "Songti SC", "STSong", "Noto Serif SC", serif; font-size: 21px; font-weight: 700; color: var(--brand); letter-spacing: 2px; }
.hsk-sub { font-size: 12px; color: var(--ink-3); }
.hsk-back { font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.hsk-backbtn {
  appearance: none; background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.hsk-backbtn:hover { background: var(--brand-soft); border-color: #e5b9ae; color: var(--brand); }
.hsk-userbtn { display: flex; align-items: center; gap: 8px; background: transparent; border: 0; cursor: pointer; font-size: 14px; color: var(--ink); }
.hsk-userbtn small { color: var(--ink-3); }
.hsk-avatar { width: 32px; height: 32px; border-radius: 50%; background-size: cover; background-position: center; border: 1px solid var(--line); flex: none; }
.hsk-avatar-lg { width: 68px; height: 68px; border-radius: 50%; background-size: cover; background-position: center; border: 2px solid #fff; box-shadow: var(--shadow); flex: none; }
.hsk-avatarbtn { border: 0; background: transparent; padding: 0; cursor: pointer; }
.hsk-input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-family: inherit; background: #fff; min-width: 0; }
.hsk-footer { text-align: center; font-size: 12px; color: var(--ink-3); padding: 18px 12px calc(20px + env(safe-area-inset-bottom, 0px)); line-height: 1.9; border-top: 1px solid var(--line); margin-top: 24px; }
.hsk-footer a { color: var(--ink-3); text-decoration: none; }
.hsk-hero { background: linear-gradient(135deg, #fffaf1 0%, #f7efe1 100%); border: 1px solid #eadfce; border-radius: 20px; padding: 28px 24px; margin-bottom: 18px; }
.hsk-hero h2 { font-family: "Songti SC", "STSong", "Noto Serif SC", serif; font-size: 30px; margin: 0 0 8px; color: #3a2a1a; letter-spacing: 3px; }
.hsk-hero p { margin: 0; color: var(--ink-2); max-width: 760px; }
.hsk-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.hsk-step { background: #fff; border: 1px solid #eadfce; border-radius: 999px; padding: 5px 12px; font-size: 12px; color: #6d5b45; }
.hsk-theme { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: #fff; box-shadow: var(--shadow); }
.hsk-theme .icon { font-size: 30px; }
.hsk-theme h3 { margin: 0; font-size: 19px; }
.hsk-theme .cat { font-size: 12px; color: var(--accent); }
.hsk-theme.upcoming { opacity: .72; box-shadow: none; }
.hsk-stepbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.hsk-stepbar span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.hsk-stepbar span.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.hsk-level { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; cursor: pointer; text-align: left; }
.hsk-level.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(196, 74, 58, .12); }
.hsk-culture { border: 1px solid #e6d8c3; border-radius: 16px; padding: 16px; background: #fffdf8; }
.hsk-culture h3 { margin: 0 0 6px; font-size: 16px; }
.hsk-culture .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.hsk-culture .tags span { font-size: 11px; background: #f2e7d6; color: #6d5b45; padding: 2px 8px; border-radius: 999px; }
.hsk-culture .kw { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.hsk-culture .kw span { font-size: 11px; border: 1px dashed #d8c7ae; color: #7a6750; padding: 2px 8px; border-radius: 999px; }
@media (max-width: 640px) {
  .hsk-topbar { padding: 8px 14px; }
  .hsk-hero { padding: 20px 16px; }
  .hsk-hero h2 { font-size: 24px; }
}

/* 2026-11-26 定稿：等级胶囊 / 预习 Tab / 极简实战栏 */
.hsk-caps { display: flex; gap: 8px; flex-wrap: wrap; }
.hsk-cap {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 16px; border-radius: 999px; font-size: 14px; cursor: pointer;
}
.hsk-cap.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.hsk-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 8px; overflow-x: auto; }
.hsk-tab {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 8px 18px; border-radius: 999px; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.hsk-tab.on { background: var(--brand-soft); border-color: #e5b9ae; color: var(--brand); font-weight: 600; }
.hsk-focus { background: #fde7c8; color: #8a3d13; border-radius: 6px; padding: 0 3px; }
.hsk-previewbar {
  position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  display: flex; justify-content: center;
}
.hsk-previewbar .hsk-btn { width: 100%; max-width: 420px; padding: 12px 18px; font-size: 16px; }
.hsk-chatcard { padding-bottom: 8px; }
.hsk-bottombar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
}
.hsk-bigmic {
  flex: 1; max-width: 320px; margin: 0 auto;
  padding: 14px 18px; border-radius: 999px; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; font-size: 17px; cursor: pointer;
}
.hsk-bigmic:disabled { opacity: .55; }
@media (max-width: 640px) {
  .hsk-bottombar { gap: 6px; }
  .hsk-bigmic { font-size: 15px; padding: 12px 10px; }
}
