@font-face {
  font-family: "NamePrintNoto";
  src: url("assets/fonts/NotoSansSC-VF.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #263238;
  --muted: #66736f;
  --paper: #fffdf8;
  --cream: #fff6df;
  --orange: #f28b54;
  --orange-dark: #c85d2c;
  --teal: #4f9b8e;
  --teal-dark: #2e7167;
  --yellow: #ffd66b;
  --rose: #f6a6a0;
  --blue: #8cbadb;
  --line: #e6dccb;
  --shadow: 0 16px 40px rgba(82, 64, 39, 0.11);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #fff9ed; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 214, 107, .2), transparent 27rem),
    radial-gradient(circle at 92% 30%, rgba(79, 155, 142, .12), transparent 24rem),
    #fff9ed;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible {
  outline: 4px solid rgba(79, 155, 142, .35);
  outline-offset: 3px;
}

.is-hidden { display: none !important; }
.topbar {
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 900;
  cursor: pointer;
}
.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 15px 15px 11px 15px;
  color: white;
  background: var(--orange);
  box-shadow: 0 6px 0 #d7703d;
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.star-pill {
  min-width: 68px;
  height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 2px solid #f0c652;
  border-radius: 999px;
  color: #845e00;
  background: #fff5c7;
  font-size: 20px;
}
.star-pill span { color: #eeaf00; font-size: 25px; }

main { width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 18px 0 64px; }
.screen { animation: enter .28s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

.intro-screen { min-height: calc(100vh - 110px); display: grid; place-items: center; }
.intro-card {
  width: min(760px, 100%);
  padding: clamp(28px, 7vw, 68px);
  text-align: center;
  background: rgba(255, 253, 248, .93);
  border: 2px solid white;
  border-radius: 36px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.intro-card::before, .intro-card::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.intro-card::before { width: 150px; height: 150px; left: -60px; top: -55px; background: #ffe4a1; }
.intro-card::after { width: 120px; height: 120px; right: -40px; bottom: -50px; background: #b9ddd6; }
.eyebrow { margin: 0 0 8px; color: var(--teal-dark); font-weight: 800; letter-spacing: .06em; }
h1, h2, h3, p { margin-top: 0; }
.intro-card h1 { margin-bottom: 14px; font-size: clamp(34px, 8vw, 62px); line-height: 1.13; }
.lead { color: var(--muted); font-size: clamp(16px, 2.5vw, 20px); line-height: 1.7; }
.name-form { width: min(500px, 100%); margin: 34px auto 0; text-align: left; position: relative; z-index: 1; }
.name-form label { display: block; margin-bottom: 9px; font-weight: 800; font-size: 18px; }
.input-row { display: flex; gap: 10px; }
.input-row input {
  min-width: 0;
  flex: 1;
  height: 62px;
  padding: 0 20px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: white;
  font-size: 24px;
  font-weight: 700;
}
.field-error { min-height: 24px; margin: 8px 4px 0; color: #b33b32; font-weight: 700; }
.microcopy { margin: 14px 0 0; color: var(--muted); font-size: 14px; text-align: center; }

.button {
  min-height: 48px;
  padding: 11px 20px;
  border: 0;
  border-radius: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button-primary { color: white; background: var(--orange); box-shadow: 0 6px 0 #d76b38; }
.button-primary:active { box-shadow: 0 3px 0 #d76b38; }
.button-secondary { color: white; background: var(--teal); box-shadow: 0 5px 0 var(--teal-dark); }
.button-quiet { color: #4d5b57; background: rgba(255,255,255,.82); border: 2px solid var(--line); }
.button-small { min-height: 42px; padding: 8px 15px; }
.button[disabled] { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }

.menu-head, .game-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px;
}
.menu-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.menu-head h1, .game-head h1 { margin-bottom: 8px; font-size: clamp(28px, 5vw, 44px); }
.current-name {
  display: inline-flex; align-items: center; gap: 8px; margin: 5px 0 0; padding: 8px 15px;
  border-radius: 999px; background: white; border: 2px solid var(--line); font-weight: 800;
}
.game-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.quick-start {
  width: min(600px, 100%); min-height: 138px; margin: 10px auto 25px; padding: 22px 28px;
  display: grid; grid-template-columns: 82px 1fr; grid-template-rows: auto auto; align-items: center;
  column-gap: 20px; border: 0; border-radius: 30px; color: white; text-align: left;
  background: linear-gradient(135deg, #f28b54, #eb7443); box-shadow: 0 10px 0 #cc5d2d, 0 18px 36px rgba(200,93,44,.2); cursor: pointer;
}
.quick-start > span { grid-row: 1 / 3; font-size: 62px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.09)); }
.quick-start strong { font-size: clamp(27px, 5vw, 38px); line-height: 1.1; }
.quick-start small { font-size: 16px; opacity: .9; }
.quick-start:active { transform: translateY(4px); box-shadow: 0 6px 0 #cc5d2d; }
.game-picker { margin-top: 20px; }
.game-picker > summary {
  width: fit-content; margin: 0 auto 18px; padding: 12px 20px; border: 2px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.8); color: #53625d; font-weight: 900; cursor: pointer; list-style: none;
}
.game-picker > summary::-webkit-details-marker { display: none; }
.game-picker > summary::before { content: "＋ "; color: var(--teal-dark); }
.game-picker[open] > summary::before { content: "－ "; }
.game-card {
  min-height: 218px;
  padding: 24px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  text-align: left;
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(82, 64, 39, .09);
  cursor: pointer;
  transition: transform .18s, border-color .18s;
  position: relative;
}
.game-card:hover { transform: translateY(-4px); border-color: #e8c997; }
.game-card.recommended::after {
  content: "推荐流程"; position: absolute; right: 16px; top: 16px; padding: 5px 9px;
  border-radius: 999px; color: #326d64; background: #dff1ed; font-size: 12px; font-weight: 900;
}
.card-icon { width: 60px; height: 60px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 20px; background: var(--cream); font-size: 30px; }
.game-card:nth-child(2) .card-icon, .game-card:nth-child(5) .card-icon { background: #e1f2ef; }
.game-card:nth-child(3) .card-icon, .game-card:nth-child(6) .card-icon { background: #fde6e3; }
.game-card h2 { margin-bottom: 8px; font-size: 24px; }
.game-card p { color: var(--muted); line-height: 1.55; }
.flow-note { margin: 22px 0 0; padding: 16px 20px; border-radius: 18px; background: rgba(255,255,255,.65); color: var(--muted); }

.game-shell { width: min(920px, 100%); margin: 0 auto; }
.back-button { margin-bottom: 18px; }
.game-panel {
  padding: clamp(20px, 4vw, 38px);
  border: 2px solid white;
  border-radius: 30px;
  background: rgba(255, 253, 248, .95);
  box-shadow: var(--shadow);
}
.child-instruction {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  max-width: 760px; margin: 0 auto 20px; padding: 15px 18px; border-radius: 22px; background: #fff6df;
}
.child-instruction .instruction { margin: 0; text-align: left; font-size: clamp(22px, 3.5vw, 31px); }
.instruction-icon { font-size: clamp(32px, 6vw, 48px); }
.speak-button {
  min-width: 86px; min-height: 52px; display: grid; place-items: center; gap: 1px; border: 2px solid #a8cdc5;
  border-radius: 17px; color: #2f6c62; background: white; font-size: 23px; cursor: pointer;
}
.speak-button span { font-size: 12px; font-weight: 900; }
.speak-button.speaking { animation: speakPulse .6s ease-in-out 2; }
@keyframes speakPulse { 50% { transform: scale(1.08); background: #dff1ed; } }
.instruction { margin-bottom: 22px; font-size: clamp(22px, 4vw, 32px); line-height: 1.35; text-align: center; }
.helper-text { color: var(--muted); text-align: center; line-height: 1.55; }
.parent-settings { margin: 0 auto 20px; text-align: center; }
.parent-settings > summary {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 15px; border: 2px solid var(--line);
  border-radius: 999px; color: #5d6965; background: rgba(255,255,255,.9); font-size: 14px; font-weight: 900; cursor: pointer; list-style: none;
}
.parent-settings > summary::-webkit-details-marker { display: none; }
.parent-settings[open] > summary { color: var(--teal-dark); border-color: #a9cec7; }
.parent-settings .controls { margin: 12px 0 0; padding: 12px; border: 2px dashed #ddd1bf; border-radius: 18px; background: #faf6ee; }
.controls {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin: 0 0 22px;
}
.control-group { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 15px; background: #f5efe4; }
.control-group label { padding-left: 7px; color: var(--muted); font-size: 14px; font-weight: 800; }
select { min-height: 40px; padding: 7px 34px 7px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; font-weight: 800; }
.hint-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.hint-tab { min-height: 40px; padding: 8px 13px; border: 2px solid var(--line); border-radius: 999px; background: white; font-weight: 800; cursor: pointer; }
.hint-tab.active { color: white; background: var(--teal); border-color: var(--teal); }
.sample-card {
  width: fit-content; min-width: min(360px, 100%); margin: 0 auto 22px; padding: 16px 24px;
  text-align: center; border: 3px dashed #efbf54; border-radius: 20px; background: #fff8d7;
  font-size: clamp(31px, 7vw, 52px); font-weight: 900; letter-spacing: .1em;
}
.sample-card .target { color: var(--orange-dark); background: #ffe09b; border-radius: 10px; padding: 0 .08em; }
.char-sample { display: grid; justify-items: center; gap: 10px; margin: 0 auto 22px; }
.target-card {
  min-width: 170px; padding: 10px 25px 14px; display: grid; justify-items: center; border: 3px dashed #efbf54;
  border-radius: 22px; background: #fff8d7;
}
.target-card span { color: #7d6c46; font-size: 15px; font-weight: 900; }
.target-card strong { color: var(--orange-dark); font-size: clamp(54px, 10vw, 82px); line-height: 1.1; }
.context-name { padding: 8px 15px; border-radius: 999px; background: white; color: var(--muted); font-size: 20px; font-weight: 800; }
.context-name .target { color: var(--orange-dark); text-decoration: underline 4px #ffd66b; text-underline-offset: 4px; }
.help-pulse { animation: helpPulse .8s ease-in-out 2; }
@keyframes helpPulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(255,214,107,.35); } }
.peek-stage { text-align: center; margin-bottom: 22px; }
.peek-stage .sample-card { margin-bottom: 12px; }
.hidden-task { padding: 14px; margin-bottom: 18px; border-radius: 16px; background: #f5efe4; color: var(--muted); text-align: center; font-weight: 800; }

.letter-grid { display: grid; grid-template-columns: repeat(3, minmax(72px, 132px)); justify-content: center; gap: clamp(10px, 2.4vw, 16px); }
.letter-grid.four { grid-template-columns: repeat(2, minmax(95px, 150px)); }
.letter-cell {
  aspect-ratio: 1; border: 3px solid #e2d7c5; border-radius: 22px; background: white;
  font-size: clamp(38px, 8vw, 66px); font-weight: 900; cursor: pointer; box-shadow: 0 7px 0 #e7dece;
}
.letter-cell.correct { color: #286e64; background: #dff4ed; border-color: #70b8a9; box-shadow: 0 5px 0 #70b8a9; }
.letter-cell.wrong { animation: nudge .32s; border-color: var(--rose); }
@keyframes nudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.name-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.name-card {
  min-height: 100px; padding: 16px; border: 3px solid #e3d7c5; border-radius: 22px; background: white;
  font-size: clamp(27px, 5vw, 42px); font-weight: 900; cursor: pointer; box-shadow: 0 6px 0 #e8dfd0;
}
.name-card.correct { color: #286e64; background: #dff4ed; border-color: #70b8a9; box-shadow: 0 5px 0 #70b8a9; }

.scene-frame { min-height: 430px; padding: 28px; border-radius: 28px; position: relative; overflow: hidden; }
.scene-frame.locker { background: linear-gradient(#cfe3e8 0 18%, #f4ecd6 18%); border: 9px solid #93b4bc; }
.scene-frame.notebook { background: repeating-linear-gradient(#fff 0 37px, #d7e9f5 38px 40px); border-left: 24px solid #f7cd67; box-shadow: inset 12px 0 0 #f29b8d; }
.scene-frame.signin { background: #f5eee4; border: 10px solid #b69f7f; box-shadow: inset 0 0 0 5px #fff; }
.scene-prop { position: absolute; right: 22px; top: 13px; font-size: 31px; letter-spacing: .2em; }
.scene-title { text-align: center; color: #536761; font-weight: 900; letter-spacing: .08em; }
.scene-labels { min-height: 330px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-content: center; }
.scene-label {
  min-height: 96px; padding: 14px; border: 0; border-radius: 15px; background: #fffdf4;
  box-shadow: 0 7px 16px rgba(60,60,45,.13); font-size: clamp(25px, 4vw, 37px); font-weight: 900; cursor: pointer;
}
.locker .scene-label { border: 6px solid #7da4ad; border-radius: 6px; }
.locker .scene-label::after { content: "•"; float: right; color: #7da4ad; font-size: 28px; line-height: 1; }
.notebook .scene-label { background: white; border-bottom: 4px solid #9bc4df; transform: rotate(-1deg); }
.signin .scene-label { background: white; border: 2px dashed #bea98b; }
.scene-label.correct { color: #286e64; background: #dff4ed; }

.maze-grid { width: min(520px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.maze-cell {
  aspect-ratio: 1; border: 3px solid #dfd5c4; border-radius: 18px; background: white;
  font-size: clamp(27px, 7vw, 48px); font-weight: 900; cursor: pointer;
}
.maze-cell.start, .maze-cell.finish { font-size: clamp(15px, 3vw, 20px); color: #315f58; background: #e0f1ed; }
.maze-cell.active { color: white; background: var(--orange); border-color: #d66b38; }
.maze-cell.path { color: #286e64; background: #dff4ed; border-color: #70b8a9; }
.maze-cell.next { box-shadow: 0 0 0 4px rgba(242,139,84,.22); }
.maze-cell.clue { animation: mazeClue .55s ease-in-out 2; border-color: var(--orange); background: #fff0cf; }
@keyframes mazeClue { 50% { transform: scale(1.09); box-shadow: 0 0 0 8px rgba(242,139,84,.2); } }
.maze-status { min-height: 37px; margin: 16px 0; text-align: center; font-weight: 900; font-size: 20px; }

.art-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
.canvas-wrap { padding: 10px; border: 3px solid #e5dac9; border-radius: 22px; background: white; overflow: hidden; }
canvas { width: 100%; height: auto; display: block; border-radius: 12px; touch-action: none; cursor: crosshair; }
.palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.color-dot { width: 48px; height: 48px; border: 4px solid white; border-radius: 50%; box-shadow: 0 0 0 2px #d9cebc; cursor: pointer; }
.color-dot.active { box-shadow: 0 0 0 4px var(--ink); }
.art-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.character-stepper { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 15px; }
.character-stepper strong { font-size: 24px; }

.round-complete { margin-top: 24px; padding: 22px; border-radius: 22px; background: #e6f5f1; text-align: center; }
.round-complete h3 { margin-bottom: 7px; font-size: 24px; }
.round-complete .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 15px; }
.complete-badge { width: 70px; height: 70px; margin: -4px auto 10px; display: grid; place-items: center; border-radius: 50%; background: #fff4bd; font-size: 40px; }
.choice-button { min-width: 155px; font-size: 18px; }
.choice-button span { margin-right: 6px; font-size: 24px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 20; max-width: calc(100% - 30px); padding: 13px 20px;
  color: white; background: rgba(38,50,56,.93); border-radius: 999px; font-weight: 800;
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .22s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.celebration { position: fixed; inset: 0; z-index: 19; pointer-events: none; overflow: hidden; }
.big-reward {
  position: absolute; left: 50%; top: 48%; display: grid; justify-items: center; padding: 15px 24px; border: 5px solid white;
  border-radius: 24px; color: #745300; background: #fff2a8; box-shadow: 0 18px 45px rgba(67,55,28,.24);
  transform: translate(-50%,-50%); animation: rewardPop 1s ease-out forwards;
}
.big-reward span { font-size: 55px; line-height: 1; color: #eeb422; }
.big-reward strong { font-size: 22px; }
@keyframes rewardPop { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.5); } 25% { opacity: 1; transform: translate(-50%,-50%) scale(1.08); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-70%) scale(1); } }
.spark { position: absolute; font-size: 28px; animation: sparkle 900ms ease-out forwards; }
@keyframes sparkle { from { opacity: 1; transform: translateY(0) scale(.5) rotate(0); } to { opacity: 0; transform: translateY(-130px) scale(1.35) rotate(140deg); } }

.parent-dialog { width: min(660px, calc(100% - 24px)); padding: 0; border: 0; border-radius: 28px; background: var(--paper); box-shadow: 0 24px 80px rgba(25,35,32,.28); }
.parent-dialog::backdrop { background: rgba(38,50,56,.42); backdrop-filter: blur(3px); }
.dialog-shell { padding: clamp(22px, 5vw, 36px); }
.dialog-head { display: flex; justify-content: space-between; gap: 15px; }
.dialog-head h2 { margin-bottom: 18px; font-size: 30px; }
.icon-button { width: 44px; height: 44px; border: 2px solid var(--line); border-radius: 50%; background: white; font-size: 28px; cursor: pointer; }
.report-empty { padding: 28px; border-radius: 18px; background: #f7f1e6; text-align: center; color: var(--muted); }
.report-list { display: grid; gap: 12px; }
.report-item { padding: 15px 17px; border-left: 5px solid var(--teal); border-radius: 12px; background: #f2f8f6; line-height: 1.55; }
.report-item strong { display: block; margin-bottom: 3px; }
.privacy-note { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }

@media (max-width: 760px) {
  .topbar { min-height: 64px; padding: 9px 14px; }
  .brand > span:last-child { display: none; }
  main { width: min(100% - 20px, 1120px); padding-top: 8px; }
  .game-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-card { min-height: 190px; padding: 18px; }
  .game-card h2 { font-size: 21px; }
  .name-options { grid-template-columns: 1fr; }
  .scene-frame { min-height: 400px; padding: 18px; }
  .scene-labels { gap: 13px; }
}

@media (max-width: 480px) {
  .input-row { flex-direction: column; }
  .input-row .button { width: 100%; }
  .menu-head, .game-head { align-items: stretch; flex-direction: column; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 150px; }
  .card-icon { width: 50px; height: 50px; margin-bottom: 10px; }
  .game-panel { padding: 17px 13px 24px; border-radius: 24px; }
  .letter-grid { gap: 8px; }
  .scene-labels { grid-template-columns: 1fr 1fr; }
  .button-quiet { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 九页 A4 打印练习 */
.print-preview-mode main { width: 100%; max-width: none; padding: 0 0 64px; }
.print-preview-shell { font-family: "NamePrintNoto", sans-serif; }
.print-toolbar {
  position: sticky; top: 0; z-index: 12; min-height: 78px; padding: 12px clamp(14px, 4vw, 42px);
  display: flex; align-items: center; justify-content: center; gap: 14px; background: rgba(255,253,248,.96);
  border-block: 1px solid #e6dccb; box-shadow: 0 8px 24px rgba(38,50,56,.1); backdrop-filter: blur(12px);
}
.print-toolbar > div { display: grid; min-width: 220px; margin-right: auto; }
.print-toolbar > div span { color: var(--muted); font-size: 13px; }
.print-pages { display: grid; gap: 28px; padding: 28px 0; overflow-x: auto; }
.print-page {
  width: 210mm; height: 297mm; margin: 0 auto; padding: 11mm 12mm 10mm; display: flex; flex-direction: column;
  color: #263238; background: #fff; box-shadow: 0 8px 30px rgba(38,50,56,.16); overflow: hidden;
  page-break-after: always; break-after: page; print-color-adjust: exact; -webkit-print-color-adjust: exact;
}
.print-page:last-child { page-break-after: auto; break-after: auto; }
.print-page-header { min-height: 8mm; padding-bottom: 2.5mm; display: flex; justify-content: space-between; border-bottom: .5mm solid #4f9b8e; color: #376f66; font-size: 10pt; font-weight: 700; }
.print-page-title { padding: 5mm 0 3.5mm; text-align: center; }
.print-page-title > p { margin: 0 0 1mm; color: #c85d2c; font-size: 9pt; font-weight: 800; letter-spacing: .12em; }
.print-page-title h2 { margin: 0; font-size: 22pt; line-height: 1.25; }
.print-instruction { max-width: 168mm; margin: 3mm auto 0; padding: 2.5mm 4mm; border-radius: 3mm; background: #fff6df; font-size: 11pt; line-height: 1.55; }
.print-page-content { min-height: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.print-page-footer { min-height: 7mm; padding-top: 2.5mm; border-top: .4mm solid #d8d1c7; color: #6b7471; font-size: 7.5pt; text-align: center; }
.parent-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
.support-card { min-height: 42mm; padding: 5mm; border: .6mm solid #a9cec7; border-radius: 5mm; background: #f2f8f6; }
.support-card b { color: #2e7167; font-size: 14pt; }
.support-card p { margin: 3mm 0 0; font-size: 10.5pt; line-height: 1.65; }
.guide-note { grid-column: 1 / -1; margin-top: 3mm; padding: 6mm 8mm; border: .6mm solid #efbf54; border-radius: 5mm; background: #fff9df; }
.guide-note h3 { margin-bottom: 2mm; font-size: 15pt; }
.guide-note p { margin: 2mm 0; font-size: 10.5pt; line-height: 1.65; }
.print-full-sample { width: fit-content; min-width: 92mm; margin: 0 auto 7mm; padding: 4mm 8mm; border: .8mm dashed #efbf54; border-radius: 5mm; background: #fff8d7; text-align: center; font-size: 13pt; }
.print-full-sample strong { margin-left: 3mm; font-size: 26pt; letter-spacing: .12em; }
.print-char-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4mm; align-content: center; }
.print-char-exercise { min-height: 50mm; padding: 3.5mm; display: grid; grid-template-columns: 23mm 1fr; gap: 3mm; align-items: center; border: .5mm solid #ddd3c4; border-radius: 4mm; }
.print-char-sample { height: 31mm; display: grid; place-items: center; border: .7mm dashed #efbf54; border-radius: 4mm; background: #fff8d7; }
.print-char-sample small { color: #786947; font-size: 7pt; }
.print-char-sample strong { font-size: 27pt; line-height: 1; }
.print-char-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2mm; }
.print-char-options span { aspect-ratio: 1; display: grid; place-items: center; border: .5mm solid #bfc9c6; border-radius: 3mm; font-size: 19pt; }
.print-name-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7mm; }
.print-name-options > div { min-height: 35mm; display: grid; place-items: center; border: .7mm solid #8fb7af; border-radius: 5mm; background: #f9fcfb; font-size: 25pt; font-weight: 700; letter-spacing: .08em; }
.notebook-scene { padding: 9mm 8mm; border-left: 6mm solid #f7cd67; background: repeating-linear-gradient(#fff 0 11mm, #d7e9f5 11.2mm 11.7mm); box-shadow: inset 3mm 0 0 #f29b8d; }
.notebook-scene > h3 { margin: 0 0 8mm; text-align: center; font-size: 18pt; }
.print-scene-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7mm; }
.print-scene-grid > div { min-height: 32mm; display: grid; place-items: center; border: .6mm solid #81abc4; border-bottom-width: 1.3mm; background: white; font-size: 23pt; font-weight: 700; letter-spacing: .08em; }
.solo-scene { margin-top: 12mm; }
.maze-sequence { margin: 0 auto 5mm; padding: 3mm 5mm; border-radius: 4mm; background: #e6f5f1; font-size: 11pt; }
.maze-sequence strong { margin: 0 2mm; font-size: 19pt; letter-spacing: .12em; }
.maze-sequence span { color: #5d6965; }
.print-maze { display: grid; grid-template-columns: repeat(var(--maze-cols), 17mm); grid-template-rows: repeat(var(--maze-rows), 17mm); gap: 1.7mm; justify-content: center; }
.print-maze-cell { position: relative; display: grid; place-items: center; border: .55mm solid #91a6a1; border-radius: 2.5mm; background: white; font-size: 19pt; font-weight: 700; }
.print-maze-cell.entry::before { content: "入口 ↓"; position: absolute; bottom: calc(100% + 1mm); color: #c85d2c; font-size: 8pt; white-space: nowrap; }
.print-maze-cell.exit::after { content: "↓ 出口"; position: absolute; top: calc(100% + 1mm); color: #2e7167; font-size: 8pt; white-space: nowrap; }
.outline-name { display: grid; gap: 8mm; text-align: center; }
.outline-name > div { display: flex; justify-content: center; gap: 7mm; }
.outline-name span { min-width: 48mm; color: transparent; -webkit-text-stroke: 1.1mm #4d5654; paint-order: stroke fill; font-size: 95pt; font-weight: 800; line-height: 1.05; }
.color-decoration { margin-top: 14mm; color: #f28b54; font-size: 25pt; text-align: center; letter-spacing: .6em; }
.trace-sample { margin: 0 auto 6mm; padding: 3mm 6mm; border-radius: 4mm; background: #fff8d7; font-size: 12pt; }
.trace-sample strong { margin-left: 3mm; font-size: 22pt; letter-spacing: .12em; }
.trace-grid { display: grid; grid-template-columns: repeat(3, 55mm); gap: 7mm 5mm; justify-content: center; }
.trace-grid.count-1 { grid-template-columns: 75mm; }
.trace-grid.count-2 { grid-template-columns: repeat(2, 70mm); }
.tian-grid { width: 55mm; aspect-ratio: 1; position: relative; display: grid; place-items: center; border: .8mm solid #c98f87; background: linear-gradient(90deg, transparent calc(50% - .2mm), #e4b7b1 calc(50% - .2mm) calc(50% + .2mm), transparent calc(50% + .2mm)), linear-gradient(transparent calc(50% - .2mm), #e4b7b1 calc(50% - .2mm) calc(50% + .2mm), transparent calc(50% + .2mm)); }
.count-1 .tian-grid { width: 75mm; }
.count-2 .tian-grid { width: 70mm; }
.tian-grid::before, .tian-grid::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.tian-grid::before { background: linear-gradient(45deg, transparent calc(50% - .15mm), #edcfcb calc(50% - .15mm) calc(50% + .15mm), transparent calc(50% + .15mm)); }
.tian-grid::after { background: linear-gradient(-45deg, transparent calc(50% - .15mm), #edcfcb calc(50% - .15mm) calc(50% + .15mm), transparent calc(50% + .15mm)); }
.tian-grid span { z-index: 1; color: #d9d5ce; font-size: 71pt; font-weight: 700; line-height: 1; }
.count-1 .tian-grid span { font-size: 96pt; }
.count-2 .tian-grid span { font-size: 88pt; }

@media (max-width: 900px) {
  .print-toolbar { position: static; flex-wrap: wrap; }
  .print-toolbar > div { width: 100%; order: -1; margin: 0; text-align: center; }
  .print-page { margin-inline: 12px; transform-origin: top left; }
}

@page { size: A4 portrait; margin: 0; }
@media print {
  html, body { width: 210mm; min-width: 210mm; margin: 0; background: white; }
  body { font-family: "NamePrintNoto", sans-serif; }
  .topbar, .print-toolbar, .toast, .celebration, .parent-dialog { display: none !important; }
  .print-preview-mode main { width: 210mm; margin: 0; padding: 0; }
  .print-pages { display: block; padding: 0; overflow: visible; }
  .print-page { margin: 0; box-shadow: none; }
}

/* 家长陪练流程 */
.practice-plan { margin: 18px 0 26px; padding: 16px 20px; border-radius: 18px; background: #eef6f2; }
.practice-plan label { font-weight: 800; margin-right: 12px; }
.practice-plan p { margin: 10px 0 0; color: var(--muted); }
.practice-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.practice-bar > span { font-weight: 800; color: #326d64; }
.end-screen { text-align: center; padding: 40px 18px; }
.end-icon { font-size: 70px; }
.life-task { margin: 28px auto; padding: 24px; max-width: 600px; border-radius: 24px; background: #e8f4ee; }
.life-task p { margin-top: 12px; }
.scene-outcome { margin: 18px auto; padding: 20px; text-align: center; border-radius: 20px; background: #e0f1ed; }
.scene-outcome > span { display: block; font-size: 50px; }
.scene-outcome strong { display: block; font-size: 22px; margin: 10px 0; }
.maze-demo { text-align: center; margin: 12px 0; }
.maze-demo p { margin: 12px 0; color: var(--muted); }
.maze-cell.demo-next { outline: 5px solid #eab332; outline-offset: 2px; }
.name-card, .scene-label { overflow-wrap: anywhere; }
.character-stepper { flex-wrap: wrap; }
@media (max-width: 480px) {
  .scene-label { font-size: clamp(19px, 5vw, 25px); padding-inline: 7px; }
  .character-stepper strong { font-size: 19px; }
  .child-instruction { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .instruction-icon { display: none; }
  .practice-plan { padding: 14px; }
}

/* 专属使用码入口和老师管理端 */
.access-card { width: min(100%, 720px); margin: 30px auto; }
.access-card h1 { font-size: clamp(28px, 6vw, 44px); }
.access-input { display: block; width: 100%; min-width: 0; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; font: inherit; background: white; }
.access-card .name-form > button { margin-top: 18px; }
.access-card .microcopy { line-height: 1.8; }
.binding-confirm { margin: 20px 0; padding: 22px; border-radius: 18px; background: #fff5d9; }
.bound-name { display: block; font-size: clamp(30px, 6vw, 46px); overflow-wrap: anywhere; margin: 16px 0; }
.binding-confirm p { margin: 12px 0; }
.access-block { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: #fff9edf5; }
.access-block p { margin: 18px 0; }
.admin-shell { max-width: 1120px; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 0; flex-wrap: wrap; }
.admin-panel { background: white; padding: 24px; border: 2px solid var(--line); border-radius: 22px; margin-bottom: 22px; }
.admin-panel > p { margin: 12px 0; line-height: 1.7; }
.admin-create { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin: 20px 0; }
.admin-create label { grid-column: 1 / -1; font-weight: 800; }
#deliveryText { width: 100%; padding: 16px; border-radius: 14px; border: 2px solid var(--line); font: inherit; line-height: 1.7; resize: vertical; }
.license-list { display: grid; gap: 14px; margin: 20px 0; }
.license-card { padding: 20px; border-radius: 16px; background: #f6f8f4; overflow-wrap: anywhere; }
.license-card strong { font-size: 23px; }
.license-card p { margin: 10px 0; }
.license-status { margin-left: 14px; font-weight: bold; color: #326d64; }
.license-card .actions { margin-top: 16px; }
[hidden] { display: none !important; }
@media(max-width: 480px) {
  .admin-panel { padding: 16px; }
  .admin-create { grid-template-columns: 1fr; }
}
.dialog-message { margin: 18px 0; line-height: 1.8; }
.dialog-shell > .actions, .dialog-shell form > .actions { margin-top: 22px; }
