/* ============================================================
   Hanzi Studio — DIY PRO · Tool 03 · HSK Colour-Coder
   研发版 v0.1 · 2026-10-31（依赖 base/app/kit.css）
   九色分类：HSK 1–7（7 色）+ 库内常用未入级（1 色）+ 库外罕见（1 色）
   ============================================================ */

/* ---------- 1. Hero ---------- */
.cc-page .kit-hero { position: relative; overflow: hidden; }
.cc-page .kit-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(70% 90% at 6% 10%, rgba(178, 58, 44, .06), transparent 60%),
    radial-gradient(60% 70% at 96% 20%, rgba(61, 95, 143, .07), transparent 62%),
    radial-gradient(70% 80% at 80% 96%, rgba(56, 119, 95, .06), transparent 60%);
}
.cc-page .kit-hero__inner { position: relative; z-index: 1; }
.cc-page .kit-hero h1 em { font-style: normal; color: var(--seal); position: relative; }

/* 图例（hero 静态 + 结果区动态共用） */
.cc-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.cc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 4px 10px 4px 6px; background: var(--surface);
}
.cc-chip i {
  width: 14px; height: 14px; border-radius: 4px;
  border: 1px solid rgba(80, 66, 52, .14);
}

/* ---------- 2. Hero 动效预留位 ---------- */
.cc-slot {
  position: relative;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -34px rgba(50, 40, 30, .35);
  background:
    radial-gradient(88% 72% at 10% 6%, rgba(178, 58, 44, .10), transparent 62%),
    radial-gradient(76% 62% at 94% 16%, rgba(61, 95, 143, .10), transparent 64%),
    radial-gradient(88% 72% at 80% 98%, rgba(56, 119, 95, .10), transparent 62%),
    linear-gradient(158deg, #FFFDF9 0%, #F7F2E7 52%, #F0EADC 100%);
  width: 100%;
  align-self: stretch;
  margin-top: 40px;
  min-height: 300px;
}
.cc-slot__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cc-slot__tag {
  position: absolute; left: 14px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.cc-slot__tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #B23A2C;
  box-shadow: 10px 0 0 -2px #A98318, 18px 0 0 -2px #38775F;
  margin-right: 10px;
}

/* ---------- 3. 生成器：左面板 ---------- */
#ccText, #ccTitle {
  width: 100%; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; font-size: 15px; line-height: 1.75;
  font-family: var(--han-serif), serif; resize: vertical;
  background: #fff; color: var(--ink);
}
#ccTitle { font-size: 15.5px; padding: 10px 14px; resize: none; }
#ccText:focus, #ccTitle:focus { outline: none; border-color: var(--seal-line); box-shadow: 0 0 0 3px var(--seal-soft); }
.cc-opt { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--ink-3); margin-left: 6px; }
.cc-field-hint { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.cc-sample {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: 600 12.5px/1 var(--sans); color: var(--seal);
}
.cc-sample:hover { text-decoration: underline; }
.kit-chk span i {
  font-style: normal; color: var(--ink-3); font-size: 11.5px; margin-left: 6px;
}

/* ---------- 4. 结果舞台：A4 分页预览（与 Repetition Planner 同管线） ---------- */
.cc-page .kit-studio__grid { align-items: stretch; }   /* 预览列与左栏等高 */
.cc-page .kit-stage { position: relative; top: 0; }   /* 关闭滚动吸附，但保留相对定位（空状态提示需要） */
.cc-stage { position: relative; min-height: 420px; display: flex; flex-direction: column; }
#ccDoc { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cc-doc-wrap { flex: 1; min-height: 0; display: flex; justify-content: center; }
.cc-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; color: var(--ink-3);
  border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 30px;
}
.cc-empty p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.cc-empty__sub { font-size: 12px !important; color: var(--ink-3) !important; }
.cc-empty[hidden] { display: none; }

.cc-doc-paper {
  height: 100%; width: auto;
  aspect-ratio: 210 / 297;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 44px -30px rgba(40, 32, 24, .45);
  padding: 10px;
  display: flex;
}
.cc-doc-paper canvas { width: 100%; height: 100%; display: block; border-radius: 4px; }

.kit-stage__hint { flex: none; }
.cc-legend { flex: none; }

/* 下载区（左面板底部） */
.cc-dl { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.cc-dl__row { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.cc-dl__row .btn { width: 100%; justify-content: center; }
.cc-dl__meta { font-size: 12px; color: var(--ink-3); }
.cc-dl__note { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); margin: 4px 0 0; }

/* 下载完成状态：按钮变绿 */
.btn--seal.is-done {
  background: #2E7A54; border-color: #2E7A54;
}

/* 状态提示 */
.cc-busy {
  font-size: 12.5px; color: var(--ink-3); margin-top: 10px; min-height: 18px;
}

/* ---------- 5. 响应式 ---------- */
/* 手机/平板：hero 九色演示图隐藏（与主页 lamp-scene 同策略） */
@media (max-width: 1080px) {
  .cc-slot { display: none; }
}
