:root {
  color-scheme: dark;
  --ink: #eee7dc;
  --muted: #9f978c;
  --dim: #70695f;
  --line: rgba(236, 218, 194, .105);
  --panel: rgba(28, 24, 20, .88);
  --panel-strong: #201b16;
  --ember: #e67b2d;
  --ember-soft: #ffae5b;
  --sage: #7a9984;
  --blue: #6789a2;
  --danger: #c85f48;
}

* { box-sizing: border-box; }

html, body { width: 100%; min-width: 1120px; height: 100%; min-height: 720px; margin: 0; }

body {
  overflow: hidden;
  color: var(--ink);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 56% 44%, rgba(133, 69, 31, .16), transparent 31%),
    linear-gradient(135deg, #100e0c 0%, #191510 50%, #100e0c 100%);
  user-select: none;
}

button, input { font: inherit; }
button { color: inherit; }

.game-shell { height: 100vh; display: grid; grid-template-rows: 70px minmax(0, 1fr) 56px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 15, 12, .92);
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  position: relative;
  z-index: 4;
}

.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-lockup h1 { margin: 2px 0 0; font-size: 19px; letter-spacing: .06em; font-weight: 560; }
.eyebrow { margin: 0; color: #b8aa98; font-size: 9px; letter-spacing: .24em; font-weight: 650; }
.brand-mark { width: 32px; height: 32px; border: 1px solid rgba(235,180,120,.38); border-radius: 50% 50% 48% 52%; position: relative; box-shadow: inset 4px 1px 10px rgba(255,184,98,.15); }
.brand-mark::before { content: ""; position: absolute; width: 8px; height: 14px; border-radius: 50%; border-left: 2px solid #eba363; left: 8px; top: 7px; transform: rotate(15deg); }
.brand-mark::after { content: ""; position: absolute; width: 4px; height: 10px; border-radius: 50%; background: #f5d3ae; filter: blur(2px); right: 8px; top: 6px; opacity: .5; }

.topbar-stats { display: flex; align-items: center; height: 100%; }
.day-chip, .money-chip { height: 34px; padding: 0 18px; display: flex; align-items: center; gap: 10px; border-right: 1px solid var(--line); }
.day-chip span, .money-chip span { color: var(--muted); font-size: 11px; }
.day-chip strong, .money-chip strong { font-size: 13px; font-weight: 580; font-variant-numeric: tabular-nums; }
.icon-button { width: 34px; height: 34px; margin-left: 12px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.icon-button.off { opacity: .45; text-decoration: line-through; }
.gallery-button { display: flex; align-items: center; gap: 12px; margin-left: 12px; height: 38px; padding: 0 15px; background: #282119; border: 1px solid rgba(233,174,108,.22); border-radius: 4px; cursor: pointer; font-size: 12px; }
.gallery-button strong { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; background: rgba(230,123,45,.18); color: #f3aa6e; border-radius: 10px; font-size: 10px; }

.workspace { min-height: 0; display: grid; grid-template-columns: 246px minmax(560px, 1fr) 284px; gap: 1px; background: var(--line); }
.panel { min-width: 0; min-height: 0; background: var(--panel); }
.tool-rail, .status-rail { padding: 22px 18px; overflow: auto; scrollbar-width: none; }
.tool-rail::-webkit-scrollbar, .status-rail::-webkit-scrollbar { display: none; }
.panel-heading { margin-bottom: 20px; }
.step-kicker { color: var(--ember-soft); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.panel-heading h2 { margin: 5px 0 0; font-size: 19px; font-weight: 520; }

.tool-group { display: grid; gap: 5px; }
.tool-button { position: relative; width: 100%; min-height: 54px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; text-align: left; border: 1px solid transparent; border-radius: 4px; background: rgba(255,255,255,.018); cursor: pointer; transition: .18s ease; }
.tool-button:hover { background: rgba(255,255,255,.045); }
.tool-button.active { border-color: rgba(226,140,67,.32); background: linear-gradient(90deg, rgba(220,112,35,.13), rgba(255,255,255,.018)); }
.tool-button.active::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 2px; background: var(--ember); box-shadow: 0 0 10px var(--ember); }
.tool-button.glass-special { background: linear-gradient(90deg, rgba(80,112,116,.055), rgba(255,255,255,.018)); }
.tool-button.glass-special.active { border-color: rgba(124,177,180,.35); background: linear-gradient(90deg, rgba(66,128,132,.16), rgba(255,255,255,.018)); }
.tool-button.glass-special.active::before { background: #76aeb2; box-shadow: 0 0 10px #76aeb2; }
.tool-button strong { display: block; font-size: 12px; font-weight: 530; }
.tool-button small { display: block; margin-top: 3px; font-size: 9px; color: var(--muted); }
kbd { min-width: 20px; padding: 3px 5px; border: 1px solid rgba(255,255,255,.1); border-bottom-color: rgba(255,255,255,.2); border-radius: 3px; background: #17130f; color: #8e877c; font: 9px/1.2 Consolas, monospace; text-align: center; box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); }
.tool-icon { width: 24px; height: 24px; position: relative; opacity: .72; }
.tool-icon::before, .tool-icon::after { content: ""; position: absolute; }
.shape-icon::before { width: 12px; height: 20px; left: 6px; top: 2px; border: 1px solid #c8b9a5; border-radius: 8px 5px 8px 4px; }
.shape-icon::after { width: 2px; height: 18px; background: #c8b9a5; left: 3px; top: 3px; transform: rotate(-12deg); }
.neck-icon::before { width: 18px; height: 18px; border: 1px solid #c8b9a5; border-width: 0 1px 1px 0; transform: rotate(45deg); top: -1px; left: 3px; }
.neck-icon::after { width: 4px; height: 4px; border: 1px solid #c8b9a5; border-radius: 50%; left: 10px; top: 8px; }
.pull-icon::before { width: 1px; height: 18px; left: 12px; top: 3px; background: #c8b9a5; }
.pull-icon::after { width: 7px; height: 7px; left: 9px; top: 12px; border: 1px solid #c8b9a5; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.smooth-icon::before { width: 18px; height: 12px; left: 3px; top: 6px; border: 1px solid #c8b9a5; border-radius: 50%; }
.smooth-icon::after { width: 8px; height: 1px; left: 8px; top: 12px; background: #c8b9a5; transform: rotate(-35deg); }
.twist-icon::before { width: 16px; height: 22px; left: 4px; top: 1px; border-left: 1px solid #9fc3c3; border-right: 1px solid #9fc3c3; border-radius: 50%; transform: rotate(25deg); }
.twist-icon::after { width: 16px; height: 22px; left: 4px; top: 1px; border-left: 1px solid #9fc3c3; border-right: 1px solid #9fc3c3; border-radius: 50%; transform: rotate(-25deg); }
.pinch-icon::before { width: 17px; height: 13px; left: 3px; top: 6px; border: 1px solid #9fc3c3; border-radius: 50% 9px 50% 9px; transform: rotate(-18deg); }
.pinch-icon::after { width: 7px; height: 1px; left: 16px; top: 11px; background: #9fc3c3; }

.section-label { display: flex; justify-content: space-between; align-items: center; margin: 23px 0 10px; color: #c1b6a8; font-size: 10px; letter-spacing: .08em; }
.section-label small { color: var(--dim); font-size: 8px; letter-spacing: normal; }
.section-label button { border: 0; background: transparent; color: var(--dim); font-size: 9px; cursor: pointer; }
.palette-row { display: flex; gap: 9px; }
.swatch { position: relative; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff9 0 6%, var(--swatch) 18%, color-mix(in srgb, var(--swatch), #050505 35%) 75%); cursor: pointer; box-shadow: inset -4px -6px 8px rgba(0,0,0,.35); }
.swatch.selected::after { content: ""; position: absolute; inset: -5px; border: 1px solid #d9a66e; border-radius: 50%; }

.technique-label { margin-top: 20px; }
.technique-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.technique-button { min-width: 0; min-height: 48px; display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 7px; padding: 7px 8px; border: 1px solid rgba(255,255,255,.065); border-radius: 3px; background: rgba(255,255,255,.018); text-align: left; cursor: pointer; transition: .16s; }
.technique-button:hover { background: rgba(255,255,255,.045); }
.technique-button.active { border-color: rgba(115,165,166,.32); background: rgba(66,123,125,.12); }
.technique-button strong { display: block; overflow: hidden; color: #bdb4a8; font-size: 9px; font-weight: 520; white-space: nowrap; }
.technique-button small { display: block; margin-top: 3px; overflow: hidden; color: #6f7774; font-size: 7px; white-space: nowrap; }
.technique-button i { width: 18px; height: 22px; position: relative; display: block; }
.rib-glyph { border-left: 1px solid #85aaa9; border-right: 1px solid #85aaa9; }
.rib-glyph::before, .rib-glyph::after { content: ""; position: absolute; top: 1px; bottom: 1px; width: 1px; background: #85aaa9; opacity: .65; }
.rib-glyph::before { left: 5px; }
.rib-glyph::after { right: 5px; }
.bubble-glyph::before { content: ""; position: absolute; width: 11px; height: 11px; left: 1px; top: 7px; border: 1px solid #85aaa9; border-radius: 50%; box-shadow: 7px -5px 0 -3px #1f1b16, 7px -5px 0 -2px #85aaa9, 8px 7px 0 -4px #1f1b16, 8px 7px 0 -3px #85aaa9; }

.rotation-control { display: block; margin-top: 23px; }
.rotation-control > span { display: flex; justify-content: space-between; font-size: 10px; }
.rotation-control strong { font-weight: 500; color: #c1b6a8; }
.rotation-control output { color: var(--ember-soft); font-size: 9px; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 3px; margin-top: 13px; appearance: none; border-radius: 2px; background: linear-gradient(90deg, var(--ember) 47%, rgba(255,255,255,.09) 47%); outline: none; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #e7c6a5; background: #6f3e20; box-shadow: 0 0 0 3px rgba(230,123,45,.12); }

.tip-card { display: flex; gap: 9px; margin-top: 24px; padding: 11px; border-left: 1px solid rgba(221,149,86,.35); background: rgba(227,123,47,.04); }
.tip-dot { width: 5px; height: 5px; margin-top: 4px; flex: 0 0 auto; border-radius: 50%; background: var(--ember); box-shadow: 0 0 8px var(--ember); }
.tip-card p { margin: 0; color: #9e9589; font-size: 9px; line-height: 1.7; }

.stage { display: grid; grid-template-rows: 42px minmax(0, 1fr) 76px; position: relative; background: #17130f; }
.stage-topline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(26,22,18,.9); font-size: 9px; color: var(--muted); }
.live-indicator i { display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: #8ca88f; box-shadow: 0 0 7px #8ca88f; }
.piece-name { color: #c7bbae; letter-spacing: .06em; }
.quiet-button { justify-self: end; border: 0; background: transparent; color: #8f877d; font-size: 9px; cursor: pointer; }
.quiet-button:hover { color: #d9cfc2; }

.canvas-wrap { min-height: 0; position: relative; overflow: hidden; cursor: crosshair; background:
  linear-gradient(180deg, rgba(27,22,17,.22), rgba(7,6,5,.18)),
  radial-gradient(ellipse at 50% 78%, rgba(211,94,28,.13), transparent 27%),
  linear-gradient(90deg, #17140f, #211a14 47%, #15120f);
}
.canvas-wrap::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 33px, rgba(255,255,255,.012) 34px), repeating-linear-gradient(90deg, transparent 0 51px, rgba(255,255,255,.01) 52px); mix-blend-mode: screen; }
#glassCanvas { width: 100%; height: 100%; display: block; position: relative; z-index: 1; }
.interaction-hint { position: absolute; z-index: 2; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 20px; background: rgba(12,10,8,.72); backdrop-filter: blur(6px); color: #aaa095; font-size: 9px; transition: opacity .3s; pointer-events: none; }
.interaction-hint.hidden { opacity: 0; }
.mouse-glyph { width: 10px; height: 15px; border: 1px solid #a99c8e; border-radius: 6px; position: relative; }
.mouse-glyph::before { content: ""; position: absolute; width: 1px; height: 4px; left: 4px; top: 2px; background: var(--ember-soft); }
.heat-vignette { position: absolute; z-index: 0; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 60%, rgba(255,102,25,.38), rgba(193,56,12,.08) 38%, transparent 65%); transition: opacity .2s; }
.heat-vignette.active { opacity: 1; animation: heat-pulse .8s infinite alternate; }
@keyframes heat-pulse { to { opacity: .7; } }
.toast { position: absolute; z-index: 4; left: 50%; top: 20px; transform: translate(-50%, -8px); padding: 8px 12px; border-radius: 3px; background: rgba(25,20,16,.92); border: 1px solid rgba(230,123,45,.25); color: #d8cec0; font-size: 10px; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.primary-actions { display: grid; grid-template-columns: .9fr 1.25fr .95fr; gap: 9px; padding: 11px 14px; border-top: 1px solid var(--line); background: #191510; }
.primary-actions button { border-radius: 4px; cursor: pointer; }
.heat-button, .blow-button { display: flex; align-items: center; justify-content: center; gap: 11px; border: 1px solid rgba(255,255,255,.09); background: #252019; transition: .16s; }
.heat-button:hover, .blow-button:hover { border-color: rgba(229,157,91,.28); background: #2a231b; }
.heat-button.active { background: rgba(122,46,17,.72); box-shadow: inset 0 0 28px rgba(244,105,32,.18); }
.blow-button.active { background: rgba(72,91,91,.46); border-color: rgba(152,201,203,.3); }
.heat-button strong, .blow-button strong, .finish-button strong { display: block; font-size: 11px; font-weight: 560; }
.heat-button small, .blow-button small, .finish-button small { display: block; margin-top: 3px; color: #968d82; font-size: 8px; }
.heat-flame { width: 18px; height: 23px; border-radius: 55% 45% 55% 45%; background: radial-gradient(circle at 50% 73%, #ffe2a2 0 12%, #f19738 35%, #b6441e 68%, transparent 70%); transform: rotate(10deg); filter: drop-shadow(0 0 6px rgba(239,108,34,.45)); }
.blow-rings { position: relative; width: 28px; height: 22px; }
.blow-rings i { position: absolute; top: 3px; width: 14px; height: 14px; border: 1px solid #9bb5b2; border-left-color: transparent; border-bottom-color: transparent; border-radius: 50%; transform: rotate(45deg); opacity: .6; }
.blow-rings i:nth-child(1) { left: 0; transform: scale(.55) rotate(45deg); }
.blow-rings i:nth-child(2) { left: 6px; transform: scale(.78) rotate(45deg); }
.blow-rings i:nth-child(3) { left: 13px; }
.pressure-orb { width: 6px; height: 6px; border: 1px solid #b5d4d2; border-radius: 50%; opacity: .3; }
.blow-button.active .pressure-orb { opacity: 1; animation: pressure 1s infinite; }
@keyframes pressure { 50% { box-shadow: 0 0 0 7px rgba(150,202,199,0); background: #c5e5e2; } }
.finish-button { display: flex; justify-content: space-between; align-items: center; padding: 0 18px; border: 1px solid #bc7139; background: linear-gradient(135deg, #9e4f22, #c46b2c); box-shadow: inset 0 1px rgba(255,255,255,.12), 0 5px 18px rgba(117,50,14,.16); }
.finish-button:hover { filter: brightness(1.08); }
.finish-button small { color: #f1c8a6; }

.status-heading { display: flex; justify-content: space-between; align-items: center; }
.status-badge { padding: 4px 7px; border-radius: 2px; color: #9db49f; background: rgba(112,146,116,.1); border: 1px solid rgba(112,146,116,.17); font-size: 8px; }
.status-badge.warn { color: #e5a170; background: rgba(202,100,40,.1); border-color: rgba(202,100,40,.2); }
.status-badge.bad { color: #da826f; background: rgba(193,67,42,.12); border-color: rgba(193,67,42,.24); }
.temperature-block { padding: 2px 2px 20px; border-bottom: 1px solid var(--line); }
.temp-display { display: flex; align-items: baseline; gap: 5px; }
.temp-display span { font-family: Georgia, serif; font-size: 39px; font-weight: 400; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.temp-display small { color: #d2915c; font-size: 12px; }
.temp-track { height: 6px; margin-top: 12px; position: relative; border-radius: 4px; background: linear-gradient(90deg, #514d49, #9c5b35 55%, #da5d2e 80%, #e7a046); overflow: hidden; }
.temp-track i { position: absolute; inset: 0; background: rgba(12,10,8,.73); transform-origin: right; transform: scaleX(0); transition: transform .25s; }
.temp-track b { position: absolute; left: 50%; width: 24%; top: 0; bottom: 0; border-left: 1px solid #f8d3a8; border-right: 1px solid #f8d3a8; opacity: .7; }
.temp-labels { display: flex; justify-content: space-between; margin-top: 7px; color: var(--dim); font-size: 8px; }
.metric-list { display: grid; gap: 15px; padding: 19px 1px; border-bottom: 1px solid var(--line); }
.metric-row > div:first-child { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.metric-row strong { color: #c9beb0; font-weight: 500; }
.meter { height: 3px; margin-top: 8px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; }
.meter i { display: block; width: 75%; height: 100%; background: linear-gradient(90deg, #a85b2d, #efa75c); transition: width .28s; }
.meter.safe i { background: linear-gradient(90deg, #6e826c, #a8bb8f); }
.meter.cool i { background: linear-gradient(90deg, #536d79, #82a5ad); }
.quality-card { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 13px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.quality-ring { --quality: 86%; width: 68px; height: 68px; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(var(--ember) var(--quality), rgba(255,255,255,.065) 0); }
.quality-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #1f1a15; }
.quality-ring span, .quality-ring small { position: relative; z-index: 1; grid-column: 1; grid-row: 1; }
.quality-ring span { margin-top: -9px; font-family: Georgia, serif; font-size: 21px; }
.quality-ring small { margin-top: 24px; color: var(--dim); font-size: 7px; }
.quality-label { color: var(--dim); font-size: 8px; letter-spacing: .08em; }
.quality-card > div:last-child strong { display: block; margin-top: 4px; font-size: 13px; font-weight: 520; }
.quality-card p { margin: 6px 0 0; color: #8f877c; font-size: 8px; line-height: 1.6; }
.process-log .section-label { margin-top: 17px; }
.process-log ol { list-style: none; margin: 0; padding: 0; max-height: 92px; overflow: hidden; }
.process-log li { display: grid; grid-template-columns: 34px 1fr; gap: 5px; padding: 4px 0; color: #928a7f; font-size: 8px; line-height: 1.45; }
.process-log time { color: #5e5952; font-family: Consolas, monospace; }
.process-log li:first-child span { color: #c2b7aa; }
.mentor-note { display: flex; gap: 10px; margin-top: 16px; padding: 10px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); }
.mentor-avatar { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(226,154,90,.28); border-radius: 50%; color: #c58c5c; font-family: serif; font-size: 11px; }
.mentor-note p { margin: 0; }
.mentor-note strong { display: block; font-size: 9px; font-weight: 520; }
.mentor-note span { display: block; margin-top: 4px; color: #888076; font-size: 8px; line-height: 1.55; }

.process-footer { display: flex; align-items: center; justify-content: center; padding: 0 24px; border-top: 1px solid var(--line); background: #15120e; position: relative; z-index: 3; }
.process-step { display: flex; align-items: center; gap: 7px; color: #6e675e; font-size: 9px; }
.process-step i { width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid #514b44; border-radius: 50%; font-style: normal; font-size: 8px; }
.process-step.done { color: #8d9b86; }
.process-step.done i { border-color: #66765f; }
.process-step.active { color: #e3b282; }
.process-step.active i { color: #ffd1a6; border-color: #b66d36; box-shadow: 0 0 9px rgba(230,123,45,.18); }
.process-footer > b { width: 48px; height: 1px; margin: 0 10px; background: #39342e; }
.footer-help { position: absolute; right: 24px; color: #676159; font-size: 8px; }

.modal-backdrop, .drawer-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(5,4,3,.72); opacity: 0; pointer-events: none; transition: opacity .25s; backdrop-filter: blur(8px); }
.modal-backdrop.open, .drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.result-modal { width: min(860px, 86vw); height: min(560px, 76vh); display: grid; grid-template-columns: 46% 54%; position: relative; overflow: hidden; border: 1px solid rgba(230,196,157,.16); background: #201a15; box-shadow: 0 40px 100px rgba(0,0,0,.55); transform: translateY(15px) scale(.985); transition: transform .28s; }
.modal-backdrop.open .result-modal { transform: translateY(0) scale(1); }
.modal-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: #8d857a; font-size: 22px; cursor: pointer; }
.result-modal > .modal-close { position: absolute; right: 13px; top: 12px; z-index: 2; }
.result-visual { min-height: 0; position: relative; background: radial-gradient(ellipse at 50% 64%, rgba(139,82,46,.25), transparent 32%), linear-gradient(145deg, #12100d, #282019); overflow: hidden; }
#resultCanvas { width: 100%; height: 100%; display: block; position: relative; z-index: 2; }
.plinth { position: absolute; z-index: 1; width: 58%; height: 80px; left: 21%; bottom: 23px; background: linear-gradient(90deg, #17130f, #332a22 48%, #17130f); clip-path: polygon(12% 0, 88% 0, 100% 30%, 100% 100%, 0 100%, 0 30%); box-shadow: 0 18px 35px rgba(0,0,0,.5); }
.result-copy { padding: 50px 44px 36px; min-width: 0; }
.result-title-row { display: flex; align-items: start; justify-content: space-between; margin-top: 17px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.result-name-editor { display: inline-grid; position: relative; }
.result-name-input { width: min(290px, 30vw); margin: 0; padding: 0 28px 4px 0; border: 0; border-bottom: 1px solid transparent; outline: none; background: transparent; color: var(--ink); font-family: Georgia, "Songti SC", serif; font-size: 33px; font-weight: 400; letter-spacing: .06em; transition: border-color .18s, background .18s; }
.result-name-input:hover { border-bottom-color: rgba(230,166,105,.3); }
.result-name-input:focus { border-bottom-color: #b57440; background: linear-gradient(180deg, transparent, rgba(230,123,45,.045)); }
.result-name-editor > span { margin-top: 4px; color: #71685f; font-size: 7px; letter-spacing: .08em; transition: color .18s; }
.result-name-editor:focus-within > span { color: #c08756; }
.result-title-row p { margin: 8px 0 0; color: #978e83; font-size: 10px; }
.result-grade { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #b57440; border-radius: 50%; color: #eda86e; font-family: Georgia, serif; font-size: 23px; }
.result-copy blockquote { margin: 18px 0; color: #b8ada0; font-family: Georgia, "Songti SC", serif; font-size: 13px; line-height: 1.8; }
.result-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-stats div { padding-left: 14px; border-left: 1px solid var(--line); }
.result-stats div:first-child { padding-left: 0; border: 0; }
.result-stats dt { color: #746d64; font-size: 8px; }
.result-stats dd { margin: 7px 0 0; font-family: Georgia, serif; font-size: 18px; }
.result-tags { min-height: 50px; display: flex; flex-wrap: wrap; gap: 6px; align-content: center; }
.result-tags span { padding: 4px 7px; border: 1px solid rgba(255,255,255,.08); color: #9e958a; font-size: 8px; }
.result-actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 9px; margin-top: 2px; }
.result-actions button { height: 42px; border-radius: 3px; cursor: pointer; font-size: 10px; }
.secondary-action { border: 1px solid rgba(255,255,255,.1); background: transparent; color: #9b9287; }
.primary-action { border: 1px solid #b26934; background: #a95325; }

.drawer-backdrop { display: block; z-index: 29; }
.gallery-drawer { position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: 430px; padding: 27px; background: #1b1713; border-left: 1px solid rgba(255,255,255,.1); box-shadow: -30px 0 80px rgba(0,0,0,.38); transform: translateX(102%); transition: transform .3s ease; }
.gallery-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; }
.drawer-header h2 { margin: 6px 0 0; font-size: 22px; font-weight: 520; }
.gallery-summary { display: flex; gap: 25px; margin-top: 24px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #8b8378; font-size: 9px; }
.gallery-summary strong { margin-left: 5px; color: #d7cab9; font-weight: 540; }
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; max-height: calc(100vh - 150px); overflow: auto; }
.gallery-card { min-height: 190px; position: relative; padding: 8px; background: #251f1a; border: 1px solid rgba(255,255,255,.07); }
.gallery-card canvas { width: 100%; height: 125px; display: block; background: radial-gradient(ellipse at 50% 75%, rgba(255,255,255,.05), transparent 40%); }
.gallery-card h3 { margin: 8px 2px 0; font-family: Georgia, "Songti SC", serif; font-size: 13px; font-weight: 400; }
.gallery-card p { display: flex; justify-content: space-between; margin: 5px 2px 0; color: #827a70; font-size: 8px; }
.gallery-card p strong { color: #c49569; }
.empty-gallery { margin-top: 90px; text-align: center; color: #746d64; }
.empty-gallery > span { display: block; color: #a37048; font-size: 38px; }
.empty-gallery p { margin: 14px 0 5px; color: #a1988c; font-size: 12px; }
.empty-gallery small { font-size: 9px; }

@media (max-height: 780px) {
  .tool-rail, .status-rail { padding-top: 15px; padding-bottom: 12px; }
  .panel-heading { margin-bottom: 12px; }
  .tool-button { min-height: 41px; padding-top: 5px; padding-bottom: 5px; }
  .tool-button small { display: none; }
  .section-label { margin-top: 12px; }
  .technique-label { margin-top: 12px; }
  .technique-button { min-height: 39px; }
  .technique-button small { display: none; }
  .rotation-control { margin-top: 13px; }
  .tip-card { display: none; }
  .temp-display span { font-size: 32px; }
  .metric-list { gap: 11px; padding: 13px 1px; }
  .quality-card { padding: 11px 0; }
  .process-log { display: none; }
  .mentor-note { margin-top: 11px; }
}

@media (max-width: 1240px) {
  .workspace { grid-template-columns: 220px minmax(530px, 1fr) 260px; }
  .tool-rail, .status-rail { padding-left: 14px; padding-right: 14px; }
  .footer-help { display: none; }
}
