/* =============================================================
 * 小海少年AI创梦站 · 学习工作台 v1.0  |  app.css
 * 视觉：清新蓝白 + 圆角卡片（依视频提示词），海客橙作品牌强调色
 * 铁律：光效绝不压字 / 元素不重叠不粘连不溢出 / 数字不换行
 *       所有星芒光点一律不加，立体感交给实拍级官方素材与干净阴影
 * ============================================================= */

:root {
  --bg-1: #F2F7FF;
  --bg-2: #E7F0FF;
  --card: #FFFFFF;
  --card-soft: #F8FBFF;
  --ink: #1B2B4B;
  --ink-2: #465A7D;
  --ink-3: #8494B0;
  --line: #E3ECFA;
  --blue: #3B6EF6;
  --blue-2: #6E9BFF;
  --blue-soft: #EAF1FF;
  --orange: #FF8A2B;
  --orange-2: #F26522;
  --orange-soft: #FFF2E6;
  --yellow: #FFC61A;
  --green: #2FB98C;
  --green-soft: #E7F8F1;
  --purple: #9B6CF6;
  --pink: #F2789F;
  --shadow: 0 6px 22px rgba(38, 78, 150, .08);
  --shadow-lg: 0 14px 40px rgba(38, 78, 150, .14);
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;
  --num: "SF Mono", "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------------- 布局骨架 ---------------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 120px; }

/* ---------------- 顶部品牌栏 ---------------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 14px rgba(38, 78, 150, .05);
}
.topbar-in {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 16px;
}
.brand-mark {
  width: 56px; height: 56px; flex: 0 0 56px;
  border-radius: 18px;
  background: linear-gradient(150deg, #FFF6EC, #FFE9D2);
  border: 1px solid #FFE0C2;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.brand-mark img { width: 48px; height: 48px; object-fit: contain; }
.brand-txt { min-width: 0; }
.brand-txt h1 {
  margin: 0; font-size: 19px; font-weight: 800; letter-spacing: .3px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.brand-txt h1 .sub { font-size: 13px; font-weight: 600; color: var(--orange-2); }
.brand-txt p { margin: 1px 0 0; font-size: 12px; color: var(--ink-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.haike-logo { height: 34px; width: auto; opacity: .95; }
.haike-logo img { height: 34px; width: auto; }

/* ---------------- 角色切换 + 档案 ---------------- */
.rolebar {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 18px; flex-wrap: wrap;
}
.role-switch {
  display: inline-flex; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 4px; gap: 4px; box-shadow: var(--shadow);
}
.role-switch button {
  padding: 9px 20px; border-radius: 10px; font-weight: 700; font-size: 14px;
  color: var(--ink-2); transition: .18s; white-space: nowrap;
}
.role-switch button.on { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(59, 110, 246, .32); }
.role-switch button[data-role="parent"].on { background: var(--orange-2); box-shadow: 0 4px 12px rgba(242, 101, 34, .3); }
.role-hint { font-size: 13px; color: var(--ink-3); }

.profile-chip {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 6px 8px 6px 14px; box-shadow: var(--shadow);
}
.profile-chip .pc-txt { text-align: right; line-height: 1.25; }
.profile-chip .pc-txt b { font-size: 13px; }
.profile-chip .pc-txt span { display: block; font-size: 11px; color: var(--ink-3); }
.avatar-sm {
  width: 38px; height: 38px; border-radius: 12px; overflow: hidden;
  background: var(--orange-soft); border: 1px solid #FFE0C2;
  display: flex; align-items: center; justify-content: center;
}
.avatar-sm img { width: 34px; height: 34px; object-fit: contain; }
.btn-ghost {
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: .18s; white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--blue-2); color: var(--blue); }

/* ---------------- 通用卡片 / 标题 ---------------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card.tight { padding: 16px 18px; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.sec-head .en { font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: 1px; }
.sec-head .tail { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.sec-head .ico {
  width: 30px; height: 30px; border-radius: 9px; background: var(--blue-soft);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------------- 顶部数据条 ---------------- */
.hero {
  background: linear-gradient(120deg, #FFFFFF 0%, #F6FAFF 60%, #FFF7EE 100%);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 20px 22px; margin-bottom: 18px;
  display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; gap: 18px; align-items: center;
  position: relative; overflow: hidden;
}
.hero-mascot {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  position: relative; z-index: 1;
}
.hero-mascot img { width: 76px; height: 100px; object-fit: contain; flex: 0 0 76px; }
.hero-mascot .hm-txt { min-width: 0; }
.hero-mascot .hm-txt .hi { font-size: 13px; color: var(--orange-2); font-weight: 700; }
.hero-mascot .hm-txt h3 { margin: 2px 0 4px; font-size: 18px; font-weight: 800; line-height: 1.35; }
.hero-mascot .hm-txt p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.hero-cell {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; position: relative; z-index: 1; min-width: 0;
}
.hero-cell .lab { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.hero-cell .val { font-size: 27px; font-weight: 800; line-height: 1.25; margin-top: 4px; font-family: var(--num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-cell .val small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 3px; }
.hero-cell .val.orange { color: var(--orange-2); }
.hero-cell .val.blue { color: var(--blue); }
.hero-cell .val.green { color: var(--green); }
.timer-btns { display: flex; gap: 6px; margin-top: 8px; }
.btn-mini {
  padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 700;
  background: var(--blue-soft); color: var(--blue); white-space: nowrap; transition: .18s;
}
.btn-mini:hover { background: #DCE8FF; }
.btn-mini.primary { background: var(--blue); color: #fff; }
.btn-mini.primary:hover { background: #2E5FE0; }
.btn-mini.warn { background: var(--orange-soft); color: var(--orange-2); }

/* 进度条 */
.bar { height: 8px; border-radius: 99px; background: #EDF2FB; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue-2), var(--blue)); transition: width .5s ease; }
.bar.orange > i { background: linear-gradient(90deg, #FFC061, var(--orange)); }
.bar.green > i { background: linear-gradient(90deg, #7BD9B6, var(--green)); }
.bar.purple > i { background: linear-gradient(90deg, #C4A5FB, var(--purple)); }

/* ---------------- 学科卡片 ---------------- */
.subject-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--shadow); transition: .2s; cursor: pointer;
  position: relative; overflow: hidden; text-align: left; width: 100%;
}
.subject-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #CFDFFB; }
.subject-card .sc-top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.subject-card .sc-ico {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  color: #fff;
}
.subject-card .sc-name { font-size: 16px; font-weight: 800; line-height: 1.3; }
.subject-card .sc-en { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; color: var(--ink-3); }
.subject-card .sc-kps { font-size: 12px; color: var(--ink-3); line-height: 1.6; min-height: 38px; margin-bottom: 10px; }
.subject-card .sc-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); }
.subject-card .sc-foot .pct { font-family: var(--num); font-weight: 800; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.subject-card .sc-go { margin-left: auto; color: var(--blue); font-weight: 700; font-size: 12px; white-space: nowrap; }

/* ---------------- 成就墙 ---------------- */
.badge-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.badge {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 12px;
  background: var(--card-soft); text-align: center; position: relative; min-width: 0;
}
.badge.locked { opacity: .62; }
.badge .b-ico { font-size: 30px; line-height: 1.3; }
.badge .b-tier { font-size: 11px; font-weight: 800; letter-spacing: 1px; margin-top: 2px; }
.badge .b-name { font-size: 13px; font-weight: 700; margin-top: 3px; }
.badge .b-desc { font-size: 11px; color: var(--ink-3); line-height: 1.45; margin-top: 4px; min-height: 32px; }
.badge .b-bar { margin-top: 8px; }
.badge .b-num { font-size: 11px; color: var(--ink-3); margin-top: 5px; font-family: var(--num); white-space: nowrap; }
.stamp {
  position: absolute; top: 8px; right: 8px; transform: rotate(-12deg);
  border: 2px solid var(--green); color: var(--green);
  font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 5px;
  background: rgba(255,255,255,.9); letter-spacing: 1px; white-space: nowrap;
}

/* ---------------- 我的物品 ---------------- */
.set-block { margin-bottom: 14px; }
.set-block:last-child { margin-bottom: 0; }
.set-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }
.set-head b { font-size: 14px; }
.set-head .cnt { font-size: 12px; color: var(--ink-3); font-family: var(--num); white-space: nowrap; }
.set-head .done-tag { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--green); background: var(--green-soft); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.item-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.item {
  border: 1px dashed var(--line); border-radius: var(--r-sm); background: var(--card-soft);
  padding: 10px 4px; text-align: center; min-width: 0;
}
.item.got { border-style: solid; border-color: #FFDDBB; background: #FFF9F1; }
.item .i-ico { font-size: 22px; line-height: 1.3; filter: grayscale(1); opacity: .4; }
.item.got .i-ico { filter: none; opacity: 1; }
.item .i-name { font-size: 10px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.got .i-name { color: var(--ink-2); font-weight: 600; }

/* ---------------- 愿望 / 兑换 ---------------- */
.wish-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wish {
  display: flex; align-items: center; gap: 11px; padding: 12px 13px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card-soft); min-width: 0;
}
.wish .w-ico { font-size: 22px; flex: 0 0 auto; }
.wish .w-txt { min-width: 0; flex: 1; }
.wish .w-txt b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish .w-txt span { font-size: 11px; color: var(--orange-2); font-weight: 700; font-family: var(--num); white-space: nowrap; }
.btn-exchange {
  padding: 7px 12px; border-radius: 9px; font-size: 12px; font-weight: 700;
  background: var(--orange); color: #fff; white-space: nowrap; transition: .18s; flex: 0 0 auto;
}
.btn-exchange:hover:not(:disabled) { background: var(--orange-2); }
.btn-exchange:disabled { background: #EDF1F7; color: #A8B4C7; cursor: not-allowed; }
.wish-edit { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.wish-edit input {
  flex: 1; min-width: 150px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; outline: none; font-size: 13px;
}
.wish-edit input:focus { border-color: var(--blue-2); }
.wish-edit input.cost { flex: 0 0 96px; min-width: 96px; }
.btn-add { padding: 9px 15px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }

/* ---------------- 习惯 ---------------- */
.habit-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}
.habit-row:last-child { border-bottom: none; }
.habit-row .h-ico { font-size: 19px; width: 28px; text-align: center; flex: 0 0 28px; }
.habit-row .h-name { flex: 1; font-size: 14px; min-width: 0; }
.habit-row .h-tag { font-size: 10px; color: var(--orange-2); background: var(--orange-soft); padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.habit-row .h-streak { font-size: 12px; color: var(--ink-3); font-family: var(--num); white-space: nowrap; }
.check-btn {
  width: 30px; height: 30px; border-radius: 9px; border: 2px solid #D6E1F2;
  background: #fff; flex: 0 0 30px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: transparent; transition: .18s;
}
.check-btn.on { background: var(--green); border-color: var(--green); color: #fff; }
.check-btn.pending { border-color: var(--orange); color: var(--orange); font-size: 12px; }

/* ---------------- 实验室 / 作品 ---------------- */
.lab-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px; background: var(--card-soft); }
.lab-card h4 { margin: 0 0 9px; font-size: 14px; }
.lab-card ol { margin: 0 0 12px; padding-left: 20px; font-size: 12px; color: var(--ink-2); line-height: 1.85; }
.btn-line {
  width: 100%; padding: 9px; border-radius: 9px; background: var(--blue-soft);
  color: var(--blue); font-size: 13px; font-weight: 700; transition: .18s;
}
.btn-line:hover { background: #DCE8FF; }
.work-item {
  display: flex; align-items: flex-start; gap: 11px; padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.work-item:last-child { border-bottom: none; }
.work-item .wk-ico { font-size: 20px; }
.work-item .wk-b { flex: 1; min-width: 0; }
.work-item .wk-b b { font-size: 13px; }
.work-item .wk-b p { margin: 2px 0 0; font-size: 11px; color: var(--ink-3); }
.empty {
  text-align: center; color: var(--ink-3); font-size: 13px; padding: 22px 10px; line-height: 1.7;
}

/* ---------------- 家长看板 KPI ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 17px 18px; box-shadow: var(--shadow); min-width: 0;
}
.kpi .k-lab { font-size: 12px; color: var(--ink-3); }
.kpi .k-val { font-size: 30px; font-weight: 800; line-height: 1.3; margin-top: 3px; font-family: var(--num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .k-val small { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-left: 3px; }
.kpi .k-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.kpi.c1 .k-val { color: var(--orange-2); }
.kpi.c2 .k-val { color: var(--blue); }
.kpi.c3 .k-val { color: var(--green); }
.kpi.c4 .k-val { color: var(--purple); }

.chart-box { width: 100%; overflow: hidden; }
.chart-box svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--ink-3); margin-top: 10px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.advice { display: flex; gap: 11px; padding: 12px 14px; border-radius: var(--r-md); background: var(--card-soft); margin-bottom: 9px; border: 1px solid var(--line); }
.advice:last-child { margin-bottom: 0; }
.advice .a-ico { font-size: 18px; flex: 0 0 auto; }
.advice p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.advice.rest { background: #FFF6EC; border-color: #FFE3C7; }
.advice.praise { background: var(--green-soft); border-color: #CFF0E2; }

/* 错误知识点条 */
.kp-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.kp-row:last-child { margin-bottom: 0; }
.kp-row .kp-n { font-size: 12px; flex: 0 0 128px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-row .kp-t { flex: 1; }
.kp-row .kp-c { font-size: 12px; color: var(--ink-3); font-family: var(--num); flex: 0 0 40px; text-align: right; white-space: nowrap; }

/* ---------------- 数据管理 ---------------- */
.data-btns { display: flex; gap: 9px; flex-wrap: wrap; }
.btn-data {
  padding: 10px 15px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 700; color: var(--ink-2); transition: .18s; white-space: nowrap;
}
.btn-data:hover { border-color: var(--blue-2); color: var(--blue); background: var(--card-soft); }
.btn-data.danger { color: #D2604F; border-color: #F3D6D0; }
.btn-data.danger:hover { background: #FFF3F0; border-color: #E8B3AA; }
.tiny-note { font-size: 11px; color: var(--ink-3); line-height: 1.7; margin-top: 11px; }

/* ---------------- 页脚 ---------------- */
.footer {
  max-width: 1180px; margin: 8px auto 0; padding: 20px 20px 40px;
  border-top: 1px solid var(--line);
}
.footer-in { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.footer-logo { height: 30px; width: auto; flex: 0 0 auto; }
.footer .f-txt { flex: 1; min-width: 240px; }
.footer .f-txt b { font-size: 12px; }
.footer .f-txt p { margin: 4px 0 0; font-size: 11px; color: var(--ink-3); line-height: 1.75; }
.footer .f-privacy { font-size: 11px; color: var(--green); font-weight: 700; white-space: nowrap; }

/* ---------------- 弹层 ---------------- */
.mask {
  position: fixed; inset: 0; background: rgba(20, 38, 70, .42);
  z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px;
}
.mask.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 560px;
  max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 70px rgba(20, 40, 80, .28);
  padding: 24px; position: relative;
}
.modal.wide { max-width: 680px; }
.modal h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.modal .m-sub { font-size: 12px; color: var(--ink-3); margin-bottom: 18px; }
.modal-close { position: absolute; top: 14px; right: 16px; font-size: 22px; color: var(--ink-3); line-height: 1; }
.modal-close:hover { color: var(--ink); }
.q-box { background: var(--card-soft); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin-bottom: 14px; }
.q-box .q-kp { font-size: 11px; color: var(--blue); font-weight: 700; }
.q-box .q-txt { font-size: 16px; font-weight: 700; line-height: 1.6; margin-top: 6px; }
.opt {
  display: block; width: 100%; text-align: left; padding: 12px 15px; margin-bottom: 9px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff;
  font-size: 14px; transition: .18s;
}
.opt:hover { border-color: var(--blue-2); background: var(--card-soft); }
.opt.right { border-color: var(--green); background: var(--green-soft); color: #1E8B67; font-weight: 700; }
.opt.wrong { border-color: #E9A79C; background: #FFF3F0; color: #C4553F; }
.opt.disabled { pointer-events: none; }
.explain { background: #F3F8FF; border: 1px solid #DCE9FF; border-radius: var(--r-md); padding: 15px 16px; margin-top: 12px; }
.explain .e-h { font-size: 13px; font-weight: 800; color: var(--blue); margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.explain ol { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.9; color: var(--ink-2); }
.explain .e-try { margin-top: 11px; padding-top: 10px; border-top: 1px dashed #CADCF8; font-size: 12px; color: var(--ink-2); }
.form-row { margin-bottom: 13px; }
.form-row label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.form-row input, .form-row select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; outline: none; font-size: 14px;
}
.form-row input:focus, .form-row select:focus { border-color: var(--blue-2); }
.btn-primary {
  width: 100%; padding: 12px; border-radius: 11px; background: var(--blue);
  color: #fff; font-size: 14px; font-weight: 800; margin-top: 6px; transition: .18s;
}
.btn-primary:hover { background: #2E5FE0; }
.btn-primary.orange { background: var(--orange); }
.btn-primary.orange:hover { background: var(--orange-2); }
.band-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.band-opt {
  border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 12px;
  text-align: left; transition: .18s; background: #fff;
}
.band-opt.on { border-color: var(--blue); background: var(--blue-soft); }
.band-opt b { font-size: 14px; display: block; }
.band-opt span { font-size: 11px; color: var(--ink-3); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: rgba(27, 43, 75, .94); color: #fff; padding: 11px 20px; border-radius: 12px;
  font-size: 13px; font-weight: 600; z-index: 200; opacity: 0; pointer-events: none;
  transition: .3s; max-width: 88vw; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 移动端 ---------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-mascot { grid-column: 1 / -1; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  body { font-size: 14px; }
  .wrap { padding: 0 13px 100px; }
  .topbar-in { padding: 10px 13px; gap: 10px; }
  .brand-mark { width: 46px; height: 46px; flex-basis: 46px; border-radius: 14px; }
  .brand-mark img { width: 40px; height: 40px; }
  .brand-txt h1 { font-size: 15px; gap: 5px; }
  .brand-txt h1 .sub { font-size: 11px; }
  .brand-txt p { font-size: 10px; }
  .haike-logo, .haike-logo img { height: 25px; }
  .rolebar { margin: 16px 0 14px; gap: 8px; }
  .role-switch { width: 100%; }
  .role-switch button { flex: 1; padding: 9px 8px; font-size: 13px; }
  .role-hint { display: none; }
  .profile-chip { margin-left: 0; width: 100%; }
  .profile-chip .pc-txt { text-align: left; flex: 1; }
  .card { padding: 16px 15px; border-radius: 18px; }
  .hero { padding: 16px; gap: 11px; border-radius: 18px; }
  .hero-mascot img { width: 62px; height: 82px; flex-basis: 62px; }
  .hero-mascot .hm-txt h3 { font-size: 16px; }
  .hero-cell { padding: 12px; }
  .hero-cell .val { font-size: 23px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .subject-card { padding: 15px; }
  .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px; }
  .kpi .k-val { font-size: 24px; }
  .wish-list { grid-template-columns: 1fr; }
  .item-row { gap: 5px; }
  .item { padding: 8px 2px; }
  .item .i-ico { font-size: 19px; }
  .item .i-name { font-size: 9px; }
  .kp-row .kp-n { flex-basis: 92px; font-size: 11px; }
  .modal { padding: 20px 17px; max-height: 90vh; }
  .band-pick { grid-template-columns: 1fr; }
  .footer { padding: 18px 13px 34px; }
  .footer-logo { height: 24px; }
  .sec-head h2 { font-size: 15px; }
  .sec-head .tail { width: 100%; margin-left: 0; }
}
