/* ==========================================================================
   窑窑老师 · 千年瓷韵  —  卡通高级风样式
   ========================================================================== */
:root {
  --vw: 1vw; --vh: 1vh; --vmax: 1vmax; --vmin: 1vmin; --ui-scale: 1;
  --ink: #151515;
  --ink-2: #3a3a3a;
  --paper: #f5efe3;
  --paper-2: #ece3d2;
  --cream: #fbf8f2;
  --white: #ffffff;
  --kiln: #e8632b;
  --kiln-2: #ff8a3d;
  --gold: #f0b93c;
  --gold-2: #d9a441;
  --rose: #f2a1a8;
  --jade: #7fb69e;
  --shadow: 0 12px 30px rgba(21, 21, 21, .14);
  --sticker: 5px 5px 0 var(--ink);
  --radius: 22px;
  --font-title: 'ZCOOL KuaiLe', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(240,185,60,.16), transparent 34%),
    radial-gradient(circle at 88% 82%, rgba(232,99,43,.12), transparent 36%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 400; margin: 0; letter-spacing: .02em; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px;
  border: 3px solid var(--ink); background: var(--white); color: var(--ink);
  font-family: var(--font-title); font-size: 18px; line-height: 1;
  box-shadow: var(--sticker);
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
  user-select: none; white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--sticker); }
.btn-primary { background: linear-gradient(180deg, var(--gold) 0%, #e9a52e 100%); }
.btn-ghost { background: var(--cream); }
.btn-danger { color: #b0343c; }
.btn-xl { padding: 16px 30px; font-size: 22px; }
.btn-sm { padding: 8px 14px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.btn svg { flex: none; }
.btn.shake { animation: btn-shake .5s; }
@keyframes btn-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.hud-kicker {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--ink); color: var(--gold); font-size: 13px; letter-spacing: .12em;
  font-weight: 700; margin-bottom: 10px;
}
.hud-title h2 { font-size: 34px; line-height: 1.15; }
.hud-title p { margin: 10px 0 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.hud-title.light h2, .hud-title.light p { color: #fff; }
.hud-title.light p { opacity: .9; }

/* ---------- 开场封面 ---------- */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; transition: opacity .6s ease, visibility .6s; }
#splash.hide { opacity: 0; visibility: hidden; }
.splash-bg { position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 20%, rgba(240,185,60,.35), transparent 45%), radial-gradient(ellipse at 80% 80%, rgba(232,99,43,.30), transparent 45%), var(--paper); }
.splash-bg::before, .splash-bg::after { content: ""; position: absolute; border-radius: 50%; border: 3px dashed rgba(21,21,21,.12); animation: spin 60s linear infinite; }
.splash-bg::before { width: calc(70 * var(--vmax)); height: calc(70 * var(--vmax)); left: calc(-20 * var(--vmax)); top: calc(-30 * var(--vmax)); }
.splash-bg::after { width: calc(50 * var(--vmax)); height: calc(50 * var(--vmax)); right: calc(-15 * var(--vmax)); bottom: calc(-20 * var(--vmax)); animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.splash-card { position: relative; display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: center; width: min(920px, calc(92 * var(--vw))); padding: 36px 44px;
  background: var(--cream); border: 4px solid var(--ink); border-radius: 34px; box-shadow: 12px 12px 0 var(--ink), var(--shadow); animation: pop-in .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop-in { from { transform: scale(.6) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
.splash-avatar { width: 280px; margin: 0 auto; filter: drop-shadow(0 16px 20px rgba(0,0,0,.18)); }
.splash-kicker { font-size: 13px; letter-spacing: .18em; color: var(--kiln); font-weight: 700; }
.splash-card h1 { font-size: clamp(30px, calc(3.6 * var(--vw)), 46px); line-height: 1.15; margin: 8px 0 12px; white-space: nowrap; }
.splash-card h1 .dot { color: var(--kiln); margin: 0 6px; }
.splash-card p { margin: 0 0 18px; font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.splash-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.splash-form label { font-size: 14px; font-weight: 700; }
.splash-form input { padding: 12px 16px; border: 3px solid var(--ink); border-radius: 14px; font-size: 18px; background: #fff; outline: none; box-shadow: 3px 3px 0 var(--ink); }
.splash-form input:focus { box-shadow: 3px 3px 0 var(--kiln); border-color: var(--kiln); }
.splash-tip { margin-top: 12px; font-size: 12px; color: #888; }

/* ---------- 顶部导航 ---------- */
#app { position: relative; height: 100%; display: flex; flex-direction: column; }
.topbar { flex: none; height: 78px; display: flex; align-items: center; gap: 22px; padding: 0 22px; background: var(--cream); border-bottom: 4px solid var(--ink); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--ink);
  background-image: radial-gradient(circle at 50% 50%, #fff 0 4px, transparent 5px), radial-gradient(circle at 30% 30%, #fff 0 2px, transparent 3px), radial-gradient(circle at 70% 70%, #fff 0 2px, transparent 3px);
  box-shadow: 3px 3px 0 var(--gold); }
.brand-name { font-family: var(--font-title); font-size: 24px; }
.brand-sub { font-size: 12px; color: #777; letter-spacing: .08em; }
.train { flex: 1; position: relative; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 30px; height: 100%; }
.train-rail { position: absolute; left: 60px; right: 60px; bottom: 9px; height: 5px; border-radius: 3px; background: var(--ink); background-image: repeating-linear-gradient(90deg, transparent 0 14px, var(--gold) 14px 18px); }
.train-loco { position: absolute; bottom: 5px; left: 0; transform: translateX(-50%); transition: left .7s cubic-bezier(.4, 1.2, .5, 1); pointer-events: none; z-index: 2; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.25)); }
.train-loco svg { animation: loco-bounce .5s infinite alternate ease-in-out; }
@keyframes loco-bounce { from { transform: translateY(0); } to { transform: translateY(-2px); } }
.train-stop { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; padding: 4px 6px 28px; color: #999; transition: color .2s; }
.train-stop i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; border: 3px solid #bbb; background: var(--cream); display: grid; place-items: center; font-size: 12px; font-weight: 900; transition: all .2s; }
.train-stop span { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.train-stop:hover { color: var(--ink); }
.train-stop.done i { border-color: var(--ink); background: var(--ink); color: var(--gold); }
.train-stop.active { color: var(--ink); }
.train-stop.active i { border-color: var(--ink); background: var(--gold); color: var(--ink); transform: scale(1.2); }
.tools { display: flex; gap: 10px; }
.tool-btn { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink); transition: all .15s; color: var(--ink); }
.tool-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.tool-btn.on { background: var(--gold); }
.tool-btn.off { color: #aaa; background: #eee; }

/* ---------- 舞台 ---------- */
#stages { flex: 1; position: relative; min-height: 0; }
.stage { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: translateY(24px) scale(.98); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .9, .3, 1.1), visibility .55s; overflow: hidden; }
.stage.active { opacity: 1; visibility: visible; transform: none; }

/* ---------- 1 博物馆 ---------- */
.museum-viewport { position: absolute; inset: 0; overflow: hidden; background: #1d1714; cursor: grab; }
.museum-viewport.dragging { cursor: grabbing; }
.museum-viewport.shake { animation: cam-shake .12s infinite; }
@keyframes cam-shake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(2px, -2px); } 50% { transform: translate(-2px, 2px); } 75% { transform: translate(2px, 2px); } }
.hall-cam { position: absolute; inset: 0; transition: transform 1.1s cubic-bezier(.3, 0, .2, 1); transform-origin: 50% 50%; will-change: transform; }
.hall-cam.warping { transition: transform 2.2s cubic-bezier(.7, 0, .9, .4), filter 2.2s ease; transform: scale(8) !important; filter: blur(8px) brightness(1.8); }
#hall-svg { width: 100%; height: 100%; display: block; }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.museum-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.6) 100%); }
.museum-hud { position: absolute; left: 36px; top: 30px; bottom: 36px; right: 36px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.museum-hud > * { pointer-events: auto; }
.museum-hud .btn { align-self: flex-end; }
.museum-hud .hud-title { background: rgba(251,248,242,.94); border: 3px solid var(--ink); border-radius: var(--radius); padding: 18px 24px; max-width: 560px; box-shadow: var(--sticker); backdrop-filter: blur(6px); transition: opacity .4s, transform .4s; }
.museum-viewport.focused .museum-hud .hud-title { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.pan-hint { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; letter-spacing: .2em; opacity: .75; display: flex; gap: 12px; align-items: center; pointer-events: none; transition: opacity .4s; }
.pan-hint span { animation: nudge 1.2s infinite alternate ease-in-out; }
.pan-hint span:last-child { animation-delay: .6s; }
.museum-viewport.focused .pan-hint { opacity: 0; }
@keyframes nudge { from { transform: translateX(-4px); } to { transform: translateX(4px); } }
.exhibit-card { position: absolute; top: 60px; right: 40px; width: 320px; padding: 18px 20px; background: var(--cream); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--sticker); opacity: 0; transform: translateY(-10px) scale(.96); transition: all .35s; pointer-events: none; }
.exhibit-card.show { opacity: 1; transform: none; }
.exhibit-tag { font-size: 11px; letter-spacing: .18em; color: var(--kiln); font-weight: 700; margin-bottom: 4px; }
.exhibit-name { font-family: var(--font-title); font-size: 24px; margin-bottom: 6px; }
.exhibit-desc { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.exhibit { cursor: pointer; }
.exhibit .vase { transition: filter .3s; }
.exhibit:hover .vase { filter: drop-shadow(0 0 14px rgba(255,220,120,.95)); }
.exhibit .glass { transition: opacity .2s; }
.exhibit:hover .glass { opacity: .3; }
.exhibit.picked .vase { filter: drop-shadow(0 0 18px rgba(255,220,120,1)); }
#hall-svg.enter .ex-in { animation: exhibit-in .8s cubic-bezier(.2, 1.4, .4, 1) both; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes exhibit-in { from { transform: translateY(40px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.lantern { transform-box: fill-box; transform-origin: 50% 0; animation: sway 4s infinite ease-in-out; }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.spot { animation: spot-flicker 5s infinite ease-in-out; }
@keyframes spot-flicker { 0%, 100% { opacity: .75; } 40% { opacity: .9; } 70% { opacity: .65; } }
.sheen { animation: sheen 6s infinite ease-in-out; }
@keyframes sheen { 0%, 60% { transform: translateX(-220px) skewX(-20deg); } 100% { transform: translateX(260px) skewX(-20deg); } }

/* ---------- 2 古窑 ---------- */
.kiln-scene { position: absolute; inset: 0; background: #22193a; }
.kiln-scene.landing #kiln-svg { animation: landing 2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes landing { from { transform: scale(1.35); filter: brightness(2) blur(3px); } to { transform: none; filter: none; } }
#kiln-svg { width: 100%; height: 100%; display: block; transform-origin: 62% 70%; }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.kiln-hud { position: absolute; left: 36px; top: 30px; display: flex; flex-direction: column; gap: 18px; pointer-events: none; }
.kiln-hud .hud-title { text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.step-track { display: flex; gap: 8px; pointer-events: auto; }
.step { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; border: 2px solid rgba(255,255,255,.4); font-size: 14px; font-weight: 700; backdrop-filter: blur(4px); transition: all .3s; }
.step b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.25); font-size: 12px; }
.step.done { background: var(--gold); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.step.done b { background: var(--ink); color: var(--gold); }
.kiln-card { position: absolute; right: 36px; top: 30px; width: 340px; padding: 18px 22px; background: var(--cream); border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--sticker); opacity: 0; transform: translateY(-10px); transition: all .35s; }
.kiln-card.show { opacity: 1; transform: none; }
.kiln-card-title { font-family: var(--font-title); font-size: 24px; margin-bottom: 6px; }
.kiln-card-text { font-size: 15px; line-height: 1.75; color: var(--ink-2); }
/* 五道工序看完：可以回窑窑老师身边，也可以直接去下一个环节「画剪涂刻」；整组抬高，让开右下角的制作人角标 */
.kiln-next { position: absolute; right: 28px; bottom: 64px; display: flex; gap: 14px; align-items: center; opacity: 0; transform: translateY(20px); transition: all .5s; pointer-events: none; }
.kiln-next.show { opacity: 1; transform: none; pointer-events: auto; }
.kiln-next .btn { display: inline-flex; align-items: center; gap: 6px; }
.kiln-next .btn-ghost { background: #fff; }
.kiln-next.show #btn-kiln-next { animation: wiggle 1.6s infinite; }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -1.5deg; } 75% { rotate: 1.5deg; } }

.hotspot { cursor: pointer; }
.hotspot .hs-tag { transform-box: fill-box; transform-origin: 50% 100%; animation: tag-float 2.2s infinite ease-in-out; }
.hotspot:hover .hs-tag { animation-play-state: paused; }
@keyframes tag-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.hs-ring { fill: none; stroke: #fff; stroke-width: 3; opacity: .8; animation: ring 1.8s infinite ease-out; transform-box: fill-box; transform-origin: center; }
.hotspot.done .hs-ring { animation: none; opacity: 0; }
.hotspot.done .hs-tag-bg { fill: var(--jade); }
@keyframes ring { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker .5s infinite alternate ease-in-out; }
.flame.f2 { animation-duration: .38s; animation-delay: .1s; }
.flame.f3 { animation-duration: .3s; animation-delay: .2s; }
@keyframes flicker { from { transform: scaleY(.9) scaleX(1.05) skewX(-3deg); } to { transform: scaleY(1.12) scaleX(.94) skewX(4deg); } }
.k-doorglow { animation: glow 1.4s infinite alternate ease-in-out; transform-box: fill-box; transform-origin: center; }
@keyframes glow { from { opacity: .55; transform: scale(.92); } to { opacity: 1; transform: scale(1.06); } }
.smoke { animation: smoke 4s infinite ease-out; transform-box: fill-box; transform-origin: center; }
.smoke.s2 { animation-delay: 1.3s; } .smoke.s3 { animation-delay: 2.6s; }
@keyframes smoke { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: .5; } 100% { opacity: 0; transform: translateY(-150px) translateX(30px) scale(1.8); } }
.k-birds { animation: birds 18s linear infinite; }
@keyframes birds { from { transform: translateX(-120px); } to { transform: translateX(1300px); } }
.k-stars circle { animation: twinkle 3s infinite ease-in-out; }
.k-stars circle:nth-child(2n) { animation-delay: 1s; } .k-stars circle:nth-child(3n) { animation-delay: 2s; }
@keyframes twinkle { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* 工匠动画 */
.w-body { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 3.4s infinite ease-in-out; }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.015) translateY(-1px); } }
.w-head { transform-box: fill-box; transform-origin: 50% 90%; animation: head-nod 4s infinite ease-in-out; }
@keyframes head-nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2.5deg); } 70% { transform: rotate(2deg); } }
.w-eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.arms-knead { animation: knead .7s infinite alternate ease-in-out; }
@keyframes knead { from { transform: translateY(0); } to { transform: translateY(9px); } }
.clay { animation: squish .7s infinite alternate ease-in-out; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes squish { from { transform: scale(1, 1); } to { transform: scale(1.16, .8); } }
.arm-brush { animation: brush 1.1s infinite alternate ease-in-out; transform-box: fill-box; transform-origin: 100% 10%; }
@keyframes brush { from { transform: rotate(-10deg); } to { transform: rotate(12deg); } }
.glaze-fill { animation: glazefill 4.4s infinite ease-in-out; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes glazefill { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 88% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.arm-carve { animation: carve 1.2s infinite alternate ease-in-out; }
@keyframes carve { from { transform: translate(-7px, 0) rotate(-3deg); } to { transform: translate(7px, 2px) rotate(3deg); } }
.carve-line { stroke-dasharray: 90; stroke-dashoffset: 90; animation: draw 3.6s infinite ease-in-out; }
.carve-line-2 { animation-delay: 1.3s; }
@keyframes draw { 0% { stroke-dashoffset: 90; } 50% { stroke-dashoffset: 0; } 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 90; } }
.w-sweat { animation: sweat 2.6s infinite ease-in; transform-box: fill-box; transform-origin: center; }
@keyframes sweat { 0% { opacity: 0; transform: translateY(-6px) scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px) scale(1); } }

/* ---------- 窑窑老师 形象动画 ---------- */
.yaoyao { width: 100%; height: auto; overflow: visible; }
.yy-bob { animation: bob 3.2s infinite ease-in-out; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.yy-shadow { animation: shadow-bob 3.2s infinite ease-in-out; transform-box: fill-box; transform-origin: center; }
@keyframes shadow-bob { 0%, 100% { transform: scale(1); } 50% { transform: scale(.86); } }
.yy-eye { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.yy-eye + .yy-eye { animation-delay: .05s; }
@keyframes blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.06); } 97% { transform: scaleY(1); } }
.yy-eyes { transition: transform .5s ease; }
.yy-mouth-open { opacity: 0; transform-box: fill-box; transform-origin: center; }
.yy-arm-right { transform-box: fill-box; transform-origin: 10% 10%; }
.yy-arm-left { transform-box: fill-box; transform-origin: 90% 10%; }
.yy-sparkles { opacity: 0; transform-box: fill-box; transform-origin: center; }
.yy-think { opacity: 0; }
.yy-head { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .5s; }

.yaoyao.talking .yy-mouth-open { opacity: 1; animation: talk .26s infinite alternate ease-in-out; }
.yaoyao.talking .yy-mouth-smile { opacity: 0; }
.yaoyao.talking .yy-head { animation: head-talk 1.4s infinite ease-in-out; }
@keyframes talk { from { transform: scaleY(.35) scaleX(.9); } to { transform: scaleY(1) scaleX(1.05); } }
@keyframes head-talk { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-3deg); } 70% { transform: rotate(3deg); } }
.yaoyao.thinking .yy-think { opacity: 1; }
.yaoyao.thinking .yy-think circle { animation: think-dot 1s infinite ease-in-out; transform-box: fill-box; transform-origin: center; }
.yaoyao.thinking .yy-think circle:nth-child(2) { animation-delay: .15s; }
.yaoyao.thinking .yy-think circle:nth-child(3) { animation-delay: .3s; }
@keyframes think-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }
.yaoyao.thinking .yy-head { transform: rotate(-5deg); }
.yaoyao.thinking .yy-eyes { transform: translate(4px, -4px); }
.yaoyao.peek-left .yy-eyes { transform: translateX(-6px); }
.yaoyao.peek-right .yy-eyes { transform: translateX(6px); }
.yaoyao.tilt .yy-head { transform: rotate(6deg); }
.yaoyao.happy .yy-sparkles { opacity: 1; animation: sparkle .9s ease-out; }
.yaoyao.happy .yy-bob { animation: jump .7s ease-out; }
@keyframes sparkle { 0% { transform: scale(.3) rotate(-30deg); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1.2) rotate(20deg); opacity: 0; } }
@keyframes jump { 0% { transform: translateY(0); } 35% { transform: translateY(-26px) scaleX(.96); } 60% { transform: translateY(0) scaleX(1.04) scaleY(.94); } 80% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
.yaoyao.wave .yy-arm-right { animation: wave .55s 4 alternate ease-in-out; }
@keyframes wave { from { transform: rotate(0); } to { transform: rotate(-70deg) translate(0, -6px); } }
.yaoyao.listening .yy-head { transform: rotate(6deg) translateY(2px); }

/* ---------- 3 窑窑老师 ---------- */
.teacher-layout { position: absolute; inset: 0; display: grid; grid-template-columns: 440px 1fr; gap: 26px; padding: 26px 36px; }
.teacher-left { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.teacher-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; border: 4px solid var(--ink); border-radius: 30px; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #fff 0, var(--paper-2) 70%); box-shadow: var(--sticker); }
.teacher-halo { position: absolute; width: 380px; height: 380px; border-radius: 50%; border: 3px dashed rgba(21,21,21,.18); animation: spin 40s linear infinite; }
.teacher-halo::after { content: ""; position: absolute; inset: 40px; border-radius: 50%; border: 3px dotted rgba(232,99,43,.35); }
.teacher-avatar { position: relative; width: 62%; max-width: 300px; filter: drop-shadow(0 18px 22px rgba(0,0,0,.18)); cursor: pointer; }
.teacher-name-tag { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--gold); padding: 8px 18px; border-radius: 999px; font-family: var(--font-title); font-size: 18px; white-space: nowrap; }
.teacher-name-tag small { color: #ddd; font-family: var(--font-body); font-size: 12px; margin-left: 8px; }
.knowledge { flex: none; background: var(--cream); border: 3px solid var(--ink); border-radius: 22px; padding: 14px 16px; box-shadow: var(--sticker); }
.knowledge-title { font-family: var(--font-title); font-size: 18px; margin-bottom: 10px; }
.knowledge-title small { font-family: var(--font-body); font-size: 12px; color: #888; margin-left: 8px; }
.kcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 16px; border: 2.5px dashed #bbb; background: #f1ece2; color: #999; text-align: center; transition: all .5s cubic-bezier(.2, 1.4, .4, 1); filter: grayscale(1); }
.kcard b { font-family: var(--font-title); font-size: 16px; font-weight: 400; }
.kcard span { font-size: 10px; line-height: 1.4; }
.kcard-icon { width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid currentColor; }
.kcard-icon-color { background: linear-gradient(90deg, var(--ink) 50%, #fff 50%); }
.kcard-icon-pattern { background: #fff; background-image: radial-gradient(circle, var(--ink) 2px, transparent 2.5px); background-size: 9px 9px; }
.kcard-icon-craft { background: var(--ink); background-image: linear-gradient(90deg, transparent 45%, #fff 45% 55%, transparent 55%); }
.kcard-icon-fire { background: linear-gradient(180deg, var(--kiln-2), var(--kiln)); }
.kcard.on { border: 2.5px solid var(--ink); background: #fff; color: var(--ink); filter: none; box-shadow: 3px 3px 0 var(--ink); transform: translateY(-3px); }
.kcard.pulse { animation: kcard-pop .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes kcard-pop { 0% { transform: scale(1); } 40% { transform: scale(1.14) rotate(-3deg); } 100% { transform: translateY(-3px); } }

.teacher-right { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.chat-box { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--cream); border: 4px solid var(--ink); border-radius: 30px; box-shadow: var(--sticker); overflow: hidden; }
.chat-head { padding: 18px 24px 12px; border-bottom: 3px dashed rgba(21,21,21,.15); }
.chat-head h2 { font-size: 26px; }
.chat-head p { margin: 4px 0 0; font-size: 13px; color: #777; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.chat-log::-webkit-scrollbar { width: 8px; }
.chat-log::-webkit-scrollbar-thumb { background: #d6cdbd; border-radius: 4px; }
.msg { display: flex; gap: 10px; max-width: 86%; animation: msg-in .35s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.msg .bubble { padding: 12px 16px; border-radius: 20px; border: 3px solid var(--ink); font-size: 17px; line-height: 1.7; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.user .bubble { background: var(--gold); border-bottom-right-radius: 6px; }
.msg.bot .bubble { background: #fff; border-bottom-left-radius: 6px; box-shadow: 3px 3px 0 var(--ink); }
.msg .who { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; font-family: var(--font-title); font-size: 14px; background: #fff; overflow: hidden; }
.msg.user .who { background: var(--rose); }
.msg .who svg { width: 44px; height: 44px; margin-top: 8px; }
.msg .who .yy-bob, .msg .who .yy-shadow, .msg .who .yy-eye { animation: none; }
.msg.bot .bubble.typing { min-width: 70px; }
.msg.bot .bubble.typing::after { content: "…"; animation: dots 1s infinite steps(3); }
@keyframes dots { 0% { content: ""; } 33% { content: "."; } 66% { content: ".."; } 100% { content: "..."; } }
.bubble .replay { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 8px; border-radius: 50%; border: 2px solid var(--ink); background: var(--gold); vertical-align: middle; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 22px; border-top: 3px dashed rgba(21,21,21,.15); }
.chip { padding: 8px 14px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; font-size: 14px; font-weight: 700; transition: all .15s; box-shadow: 2px 2px 0 var(--ink); }
.chip:hover { background: var(--gold); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.chip:disabled { opacity: .5; }
.chat-input-row { display: flex; gap: 10px; padding: 12px 22px 18px; align-items: center; }
#chat-input { flex: 1; padding: 14px 18px; border-radius: 999px; border: 3px solid var(--ink); font-size: 17px; outline: none; background: #fff; }
#chat-input:focus { border-color: var(--kiln); box-shadow: 0 0 0 4px rgba(232,99,43,.18); }
.mic-btn, .send-btn { flex: none; width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink); transition: all .15s; color: var(--ink); background: #fff; }
.send-btn { background: var(--gold); }
.mic-btn:hover, .send-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.mic-btn.listening { background: var(--kiln); color: #fff; animation: mic-pulse 1s infinite; }
.mic-btn.unsupported { opacity: .35; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 0 rgba(232,99,43,.5); } 50% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 14px rgba(232,99,43,0); } }
.to-craft { align-self: flex-end; }

/* ---------- 4 铺压刻 + 数字剔刻台 ---------- */
.craft-layout { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1.25fr; gap: 26px; padding: 26px 36px; }
.craft-left { display: flex; flex-direction: column; gap: 18px; min-height: 0; overflow: auto; }
.craft-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step-card { background: var(--cream); border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: var(--sticker); transition: transform .3s, box-shadow .3s; opacity: .55; }
.step-card.on { opacity: 1; transform: translateY(-4px); box-shadow: 6px 6px 0 var(--kiln); }
.step-card.done { opacity: 1; }
.step-demo { background: var(--paper-2); border-bottom: 3px solid var(--ink); }
.step-demo svg { width: 100%; display: block; }
.step-text { padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.step-text b { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; font-family: var(--font-title); font-size: 22px; font-weight: 400; }
.step-text span { font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.d-blob { animation: blob-grow 2.6s infinite ease-in-out; transform-box: fill-box; transform-origin: center; }
@keyframes blob-grow { 0% { transform: scale(.4); } 55% { transform: scale(3.2, 2.6); } 80% { transform: scale(3.2, 2.6); } 100% { transform: scale(.4); } }
.d-hand { animation: hand-press 2.6s infinite ease-in-out; }
@keyframes hand-press { 0% { transform: translateY(-14px); } 40% { transform: translateY(8px); } 60% { transform: translateY(2px); } 100% { transform: translateY(-14px); } }
.d-roller { animation: roll 2.2s infinite alternate ease-in-out; }
@keyframes roll { from { transform: translateX(0); } to { transform: translateX(58px); } }
.d-bubble { animation: bubble-pop 2.2s infinite; }
.d-bubble.b2 { animation-delay: 1.1s; }
@keyframes bubble-pop { 0%, 40% { opacity: 1; transform: scale(1); } 55% { opacity: 0; transform: scale(1.6); } 100% { opacity: 0; } }
.d-wave { stroke-dasharray: 220; stroke-dashoffset: 220; animation: wave-draw 3s infinite ease-in-out; }
@keyframes wave-draw { 0% { stroke-dashoffset: 220; } 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
.d-needle { animation: needle-move 3s infinite ease-in-out; }
@keyframes needle-move { 0% { transform: translate(30px, 60px); } 70% { transform: translate(130px, 60px); } 100% { transform: translate(130px, 60px); } }
.craft-tips { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 16px; font-size: 13px; }
.craft-tips b { flex: none; color: var(--gold); font-family: var(--font-title); font-size: 16px; font-weight: 400; }

.craft-right { display: flex; flex-direction: column; gap: 12px; min-height: 0; background: var(--cream); border: 4px solid var(--ink); border-radius: 30px; padding: 18px 20px; box-shadow: var(--sticker); }
.scratch-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.scratch-head h3 { font-size: 22px; }
.craft-tabs { display: flex; gap: 6px; background: var(--paper-2); padding: 5px; border-radius: 999px; border: 2.5px solid var(--ink); }
.ctab { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; border: none; background: transparent; font-weight: 700; font-size: 14px; color: #888; transition: all .25s; }
.ctab i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: #ccc; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.ctab.on { background: #fff; color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.ctab.on i { background: var(--kiln); }
.ctab.done i { background: var(--jade); }
.ctab.done { color: var(--ink); }
.scratch-wrap { position: relative; flex: 1; min-height: 0; border: 4px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--ink); touch-action: none; box-shadow: inset 0 0 40px rgba(0,0,0,.6); }
.scratch-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scratch-wrap[data-tool="pu"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M12 30 V14 a3 3 0 0 1 6 0 v-4 a3 3 0 0 1 6 0 v2 a3 3 0 0 1 6 0 v12 a10 10 0 0 1 -10 10 h-4 z' fill='%23f6d9bd' stroke='%23151515' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 18 30, grab; }
.scratch-wrap[data-tool="ya"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect x='4' y='22' width='32' height='14' rx='7' fill='%23d9a441' stroke='%23151515' stroke-width='2.5'/%3E%3Cpath d='M20 22 V8 h6' stroke='%23151515' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") 20 30, grab; }
.scratch-wrap[data-tool="ke"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M4 32 L20 16' stroke='%23999' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M20 16 L30 6' stroke='%23e0525a' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") 4 32, crosshair; }
.scratch-wrap[data-tool="stamp"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Ccircle cx='18' cy='18' r='9' fill='none' stroke='%23151515' stroke-width='2.5' stroke-dasharray='4 3'/%3E%3Ccircle cx='18' cy='18' r='2' fill='%23151515'/%3E%3C/svg%3E") 18 18, crosshair; }
.scratch-wrap[data-tool="repair"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Ccircle cx='18' cy='18' r='9' fill='%23f3eee4' stroke='%23151515' stroke-width='2.5'/%3E%3C/svg%3E") 18 18, crosshair; }
.scratch-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 18px; border-radius: 999px; background: rgba(21,21,21,.75); color: #fff; font-size: 14px; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.scratch-hint.hide { opacity: 0; }
.scratch-progress { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(251,248,242,.95); border: 2.5px solid var(--ink); font-size: 13px; font-weight: 700; pointer-events: none; transition: opacity .3s; }
.scratch-progress i { display: block; width: 90px; height: 10px; border-radius: 5px; background: #e5ddcc; overflow: hidden; position: relative; }
.scratch-progress i::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: linear-gradient(90deg, var(--gold), var(--kiln)); transition: width .25s; }
.scratch-progress.hide { opacity: 0; }
.scratch-wrap.flash-ok::after { content: ""; position: absolute; inset: 0; background: #fff; animation: flash .6s; pointer-events: none; }
.scratch-tools { display: flex; flex-direction: column; gap: 10px; }
.toolset { display: none; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolset.on, .toolset.always { display: flex; }
.toolset.always { justify-content: flex-end; }
.tool-label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-right: auto; }
.tool-group { display: flex; gap: 6px; flex-wrap: wrap; }
.tool { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px 6px 7px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; font-size: 13px; font-weight: 700; transition: all .15s; color: var(--ink); }
.tool svg { width: 20px; height: 20px; }
.tool.on { background: var(--gold); box-shadow: 2px 2px 0 var(--ink); }
.tool.toggle.on { background: var(--jade); }
.brush-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
input[type=range] { accent-color: var(--kiln); width: 110px; }
.guide-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.guide-btns .tool-label { margin-right: 0; }
.guide-btn { padding: 5px 11px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; font-size: 12px; font-weight: 700; }
.guide-btn.on { background: var(--ink); color: var(--gold); }

/* ---------- 5 虚拟窑烧 ---------- */
.fire-layout { position: absolute; inset: 0; display: grid; grid-template-columns: 420px 1fr; gap: 26px; padding: 26px 36px; }
.fire-left { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: auto; padding-right: 4px; }
.upload-zone { position: relative; display: grid; place-items: center; min-height: 200px; border: 4px dashed var(--ink); border-radius: 22px; background: #fff; overflow: hidden; transition: all .2s; }
.upload-zone.over { background: #fff7df; border-style: solid; }
.upload-zone.shake { animation: btn-shake .5s; border-color: var(--kiln); }
.upload-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #999; padding: 20px; text-align: center; font-size: 12px; }
.upload-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.upload-preview { position: relative; width: 100%; background: var(--ink); display: grid; place-items: center; }
.upload-preview img { width: 100%; max-height: 320px; object-fit: contain; display: block; }
.upload-preview .btn { position: absolute; right: 10px; bottom: 10px; }
.shape-pick, .pattern-pick { background: var(--cream); border: 3px solid var(--ink); border-radius: 18px; padding: 12px 14px; }
.pick-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.shape-tags, .pattern-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.stag, .ptag { padding: 6px 12px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; font-size: 13px; font-weight: 700; transition: all .15s; }
.ptag.on { background: var(--ink); color: var(--gold); }
.stag.on { background: var(--gold); box-shadow: 2px 2px 0 var(--ink); }
.fire-right { position: relative; display: grid; grid-template-rows: 1fr; min-height: 0; }
.fire-kiln { position: relative; border: 4px solid var(--ink); border-radius: 30px; overflow: hidden; display: grid; place-items: center; box-shadow: var(--sticker); background: radial-gradient(ellipse at 50% 100%, #5a2f1d 0, #2b1a12 60%, #1a100b 100%); }
#fire-kiln-svg { width: min(100%, 560px); height: 100%; max-height: 100%; }
.fk-temp { fill: #fff; font-family: var(--font-title); font-size: 24px; paint-order: stroke; stroke: #3d1d10; stroke-width: 6px; }
.fire-kiln.firing .fk-fire .flame { animation-duration: .2s; }
.fire-kiln.firing .fk-glow { animation-duration: .5s; }
.fire-kiln.firing #fire-kiln-svg { animation: shake .25s infinite; }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(1px, -1px); } 75% { transform: translate(-1px, 1px); } }
.fire-piece { position: absolute; left: 50%; top: 50%; width: 240px; transform: translate(-50%, 40%); opacity: 0; transition: transform 1.6s cubic-bezier(.5, 0, .3, 1), opacity .6s, filter 1.6s; pointer-events: none; z-index: 2; }
.fire-piece img { width: 100%; display: block; filter: drop-shadow(0 18px 24px rgba(0,0,0,.5)); }
.fire-piece.enter { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.fire-piece.inside { opacity: 1; transform: translate(-50%, 36%) scale(.3); filter: brightness(1.8) sepia(1) saturate(4) hue-rotate(-20deg); }
.fire-piece.gone { opacity: 0; transform: translate(-50%, 36%) scale(.2); }
.fire-status { position: absolute; bottom: 22px; left: 24px; padding: 10px 20px; border-radius: 999px; background: var(--cream); border: 3px solid var(--ink); font-family: var(--font-title); font-size: 17px; white-space: nowrap; box-shadow: 3px 3px 0 var(--ink); z-index: 3; transition: opacity .3s; }
.fire-right.has-result .fire-status { opacity: 0; }
.sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.fire-result { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; padding: 30px; border: 4px solid var(--ink); border-radius: 30px; background: var(--cream); box-shadow: var(--sticker); opacity: 0; visibility: hidden; transform: scale(.94); transition: all .6s cubic-bezier(.2, 1.2, .4, 1); overflow: hidden; }
.fire-result::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 20deg, rgba(240,185,60,.12) 20deg 40deg); animation: spin 30s linear infinite; pointer-events: none; }
.fire-result.show { opacity: 1; visibility: visible; transform: none; }
.result-frame { position: relative; border: 6px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--ink); box-shadow: 0 20px 40px rgba(0,0,0,.25); animation: result-pop .8s cubic-bezier(.2, 1.5, .4, 1); }
.result-frame.shaped { border: none; background: transparent; box-shadow: none; overflow: visible; display: grid; place-items: center; }
.result-frame.shaped img { filter: drop-shadow(0 22px 26px rgba(0,0,0,.28)); }
@keyframes result-pop { from { transform: scale(.4) rotate(-6deg); } to { transform: none; } }
.result-frame img { width: 100%; max-height: calc(62 * var(--vh)); object-fit: contain; display: block; }
.result-gloss { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, rgba(255,255,255,.15) 52%, transparent 60%); background-size: 260% 100%; animation: gloss 3.4s infinite; mix-blend-mode: screen; }
.result-frame.shaped .result-gloss { display: none; }
@keyframes gloss { 0% { background-position: 120% 0; } 60%, 100% { background-position: -120% 0; } }
.result-text { position: relative; }
.result-kicker { font-size: 13px; letter-spacing: .14em; color: var(--kiln); font-weight: 700; }
.result-title { font-family: var(--font-title); font-size: 42px; line-height: 1.2; margin: 8px 0 12px; }
.result-comment { font-size: 19px; line-height: 1.8; color: var(--ink-2); min-height: 60px; }
.result-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* ---------- 6 作品展 ---------- */
.gallery-layout { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 18px; padding: 26px 36px; }
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.gallery-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.gallery-shelf { position: relative; flex: 1; min-height: 0; overflow: auto; border: 4px solid var(--ink); border-radius: 30px; padding: 28px; box-shadow: var(--sticker); background: var(--cream);
  background-image: repeating-linear-gradient(180deg, transparent 0 246px, var(--ink) 246px 254px, rgba(0,0,0,.12) 254px 266px, transparent 266px 286px); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 26px 22px; align-items: end; }
.work { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; animation: pop-in .6s cubic-bezier(.2, 1.4, .4, 1) both; transition: transform .2s; }
.work:hover { transform: translateY(-6px) rotate(-1deg); }
.work .result-frame { width: 100%; animation: none; height: 170px; }
.work .result-frame img { height: 170px; max-height: none; object-fit: contain; }
.work .work-title { font-family: var(--font-title); font-size: 18px; }
.work .work-name { font-size: 12px; color: #888; margin-top: -4px; }
.gallery-empty { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-title); font-size: 24px; color: #aaa; pointer-events: none; }
.gallery-empty.hide { display: none; }

/* ---------- 浮动小窑窑 ---------- */
#mini-teacher { position: fixed; left: 24px; bottom: 20px; z-index: 40; display: flex; align-items: flex-end; gap: 10px; transition: opacity .4s, transform .4s; pointer-events: none; }
#mini-teacher .yaoyao-mini, #mini-teacher > svg, #yaoyao-mini { pointer-events: auto; }
#mini-teacher.hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
.mini-avatar { width: 112px; cursor: pointer; filter: drop-shadow(0 8px 12px rgba(0,0,0,.25)); transition: transform .2s; }
.mini-avatar:hover { transform: scale(1.06); }
.mini-bubble { max-width: 400px; margin-bottom: 70px; padding: 12px 16px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; border-bottom-left-radius: 4px; font-size: 15px; line-height: 1.7; box-shadow: 3px 3px 0 var(--ink); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px) scale(.96); transition: opacity .3s, transform .3s, visibility .3s; position: relative; }
.mini-bubble.show { opacity: 1; visibility: visible; transform: none; }
.mini-bubble::before { content: ""; position: absolute; left: -14px; bottom: 10px; border: 8px solid transparent; border-right-color: var(--ink); }
/* 虚拟窑烧站：左栏底部是主按钮，小窑窑挪到右下角，不遮挡 */
body[data-stage="fire"] #mini-teacher { left: auto; right: 24px; flex-direction: row-reverse; }
body[data-stage="fire"] .mini-bubble { border-bottom-left-radius: 18px; border-bottom-right-radius: 4px; }
body[data-stage="fire"] .mini-bubble::before { left: auto; right: -14px; border-right-color: transparent; border-left-color: var(--ink); }

/* ---------- 时空穿越 ---------- */
#warp { position: fixed; inset: 0; z-index: 60; background: #000; opacity: 0; visibility: hidden; transition: opacity .6s; overflow: hidden; }
#warp.show { opacity: 1; visibility: visible; }
#warp canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.warp-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; text-align: center; pointer-events: none; }
.warp-title { font-family: var(--font-title); font-size: 30px; letter-spacing: .3em; opacity: .85; text-shadow: 0 0 20px rgba(255,200,100,.8); animation: warp-in 1s both; }
.warp-year { font-family: var(--font-title); font-size: clamp(48px, calc(8 * var(--vw)), 96px); letter-spacing: .08em; color: var(--gold); text-shadow: 0 0 40px rgba(240,185,60,.9), 0 0 4px #fff; font-variant-numeric: tabular-nums; animation: warp-in 1s .2s both; }
.warp-sub { font-size: 18px; letter-spacing: .3em; opacity: .9; animation: warp-in 1s .4s both; }
@keyframes warp-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.warp-train { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); filter: drop-shadow(0 0 24px rgba(255,200,100,.9)); animation: train-rush 5.5s ease-in-out both; }
@keyframes train-rush { 0% { transform: translate(-50%, 60px) scale(.6); opacity: 0; } 15% { transform: translate(-50%, 0) scale(1); opacity: 1; } 85% { transform: translate(-50%, -2px) scale(1.05); opacity: 1; } 100% { transform: translate(-50%, -40px) scale(3); opacity: 0; } }
.warp-train svg { animation: loco-bounce .18s infinite alternate; }
.flash { position: fixed; inset: 0; z-index: 61; background: #fff; pointer-events: none; opacity: 0; }
.flash.go { animation: flash .9s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(21,21,21,.55); display: grid; place-items: center; opacity: 0; visibility: hidden; transition: all .3s; backdrop-filter: blur(4px); }
.modal.show { opacity: 1; visibility: visible; }
.modal-card { position: relative; width: min(960px, calc(92 * var(--vw))); background: var(--cream); border: 4px solid var(--ink); border-radius: 30px; padding: 30px; box-shadow: 10px 10px 0 var(--ink); transform: scale(.9); transition: transform .3s cubic-bezier(.2, 1.4, .4, 1); }
.modal.show .modal-card { transform: none; }
.modal-close { position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); background: var(--kiln); color: #fff; font-size: 26px; line-height: 1; box-shadow: 3px 3px 0 var(--ink); }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }
.modal-body img { max-height: calc(60 * var(--vh)); }
.badge-card { width: min(520px, calc(92 * var(--vw))); text-align: center; }
.badge svg { width: 260px; animation: badge-spin 1.2s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes badge-spin { from { transform: rotateY(540deg) scale(.4); } to { transform: none; } }
.badge-name { font-family: var(--font-title); font-size: 40px; margin-top: 10px; }
.badge-sub { font-size: 14px; color: #777; margin-top: 6px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; }
#toast { position: fixed; left: 50%; top: 96px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; transition: opacity .3s; opacity: 0; pointer-events: none; box-shadow: 3px 3px 0 var(--gold); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  body:not([data-display-mode="desktop"]) .teacher-layout { grid-template-columns: 360px 1fr; }
  body:not([data-display-mode="desktop"]) .craft-layout { grid-template-columns: 1fr 1.1fr; }
  body:not([data-display-mode="desktop"]) .fire-layout { grid-template-columns: 360px 1fr; }
  body:not([data-display-mode="desktop"]) .train-stop span { display: none; }
  body:not([data-display-mode="desktop"]) .brand-sub { display: none; }
  body:not([data-display-mode="desktop"]) .craft-steps { grid-template-columns: 1fr; }
  body:not([data-display-mode="desktop"]) .step-demo { display: none; }
}
@media (max-width: 860px) {
  body { overflow: auto; }
  #app { height: auto; min-height: 100%; }
  .stage { position: relative; height: auto; min-height: calc(calc(100 * var(--vh)) - 78px); display: none; }
  .stage.active { display: block; }
  .stage > * { position: relative !important; }
  .teacher-layout, .craft-layout, .fire-layout { display: flex; flex-direction: column; }
  .museum-viewport, .kiln-scene { height: calc(calc(100 * var(--vh)) - 78px); }
  .scratch-wrap { min-height: calc(60 * var(--vw)); }
  .fire-result { position: relative; margin-top: 16px; grid-template-columns: 1fr; }
  .fire-result:not(.show) { display: none; }
  .modal-body { grid-template-columns: 1fr; }
  .splash-card { grid-template-columns: 1fr; text-align: center; }
  .splash-avatar { width: 200px; }
  .splash-card h1 { white-space: normal; }
}
