:root {
  --bg: #09090b;
  --ink: #e9e6e0;
  --ink-soft: #a8a39b;
  --ink-muted: #6e6a65;
  --line: rgba(255, 255, 255, 0.1);
  --font-serif: Georgia, 'Songti SC', 'STSong', 'SimSun', 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(1200px 640px at 50% -8%, rgba(58, 56, 70, 0.5) 0%, rgba(58, 56, 70, 0) 62%),
    radial-gradient(820px 520px at 50% 34%, rgba(30, 29, 36, 0.55) 0%, rgba(30, 29, 36, 0) 70%);
  background-repeat: no-repeat;
}

/* ============================ Header ============================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

/* 返回首页：与右侧声音按钮同一套材质、同为 38px 高，成对出现在头部两侧 */
.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #b7b2aa;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.16s ease;
}

.brand-back {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-name:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f2efe9;
  border-color: rgba(255, 255, 255, 0.2);
}

.brand-name:hover .brand-back {
  transform: translateX(-2px);
}

.brand-name:active {
  transform: scale(0.96);
}

.brand-name:focus-visible {
  outline: 1px solid rgba(223, 183, 125, 0.7);
  outline-offset: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(8px);
  color: #b7b2aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.16s ease, border-color 0.2s ease;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f2efe9;
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-btn:active {
  transform: scale(0.95);
}

.sound-toggle .icon-sound-off {
  display: none;
}

.sound-toggle[aria-pressed='true'] .icon-sound-on {
  display: block;
}

.sound-toggle[aria-pressed='true'] .icon-sound-off {
  display: none;
}

.sound-toggle[aria-pressed='false'] .icon-sound-on {
  display: none;
}

.sound-toggle[aria-pressed='false'] .icon-sound-off {
  display: block;
  color: #6f6b66;
}

/* ============================ Stage & Hero ============================ */
.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 88px 24px 72px;
  position: relative;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 46px;
  position: relative;
  z-index: 10;
}

/* ======================== 物理电源开关 ======================== */
.power-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.power-switch {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 17px 32px 17px 19px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  background: linear-gradient(180deg, #1d1d21 0%, #121215 100%);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.7);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.power-switch:hover {
  background: linear-gradient(180deg, #242429 0%, #16161a 100%);
  border-color: rgba(255, 255, 255, 0.13);
}

.power-switch:focus-visible {
  outline: 1px solid rgba(245, 185, 91, 0.55);
  outline-offset: 3px;
}

/* 开关凹槽：内阴影很深，像嵌在塑料壳里 */
.switch-bezel {
  flex: none;
  position: relative;
  width: 64px;
  height: 52px;
  border-radius: 3px;
  background: #08080a;
  box-shadow:
    inset 0 3px 7px rgba(0, 0, 0, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.045),
    0 1px 0 rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  perspective: 140px;
  overflow: hidden;
}

/* 翘板本体：上暗下亮加防滑纹，靠 rotateX 换向 */
.switch-rocker {
  width: 54px;
  height: 42px;
  border-radius: 2px;
  background-image:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0 1px, rgba(255, 255, 255, 0.045) 1px 2px, transparent 2px 4px),
    linear-gradient(180deg, #5e5e66 0%, #3f3f46 46%, #26262b 100%);
  box-shadow:
    0 3px 5px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 6px rgba(0, 0, 0, 0.5);
  transform: rotateX(-17deg);
  transform-origin: 50% 50%;
  transition:
    transform 0.17s cubic-bezier(0.34, 1.45, 0.64, 1),
    background-image 0.25s ease,
    box-shadow 0.25s ease;
}

.power-switch:active .switch-rocker {
  filter: brightness(1.1);
}

/* ON：翘板翻向另一侧，暖光从槽底透上来 */
.power-switch[aria-checked='true'] .switch-rocker {
  transform: rotateX(17deg);
  background-image:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0 1px, rgba(255, 255, 255, 0.055) 1px 2px, transparent 2px 4px),
    linear-gradient(180deg, #6b6b73 0%, #48484f 48%, #2b2b31 100%);
  box-shadow:
    0 2px 3px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -2px 5px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(245, 185, 91, 0.2);
}

.switch-face {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.switch-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #241f19;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.26s ease, box-shadow 0.26s ease;
}

.power-switch.is-printing .switch-led {
  background: #f5b95b;
  box-shadow: 0 0 6px rgba(245, 185, 91, 0.95), 0 0 16px rgba(245, 185, 91, 0.42);
}

.power-switch.is-ready .switch-led {
  background: #52d68a;
  box-shadow: 0 0 6px rgba(82, 214, 138, 0.9), 0 0 16px rgba(82, 214, 138, 0.4);
}

.power-switch.is-saving .switch-led {
  background: #7cb6ff;
  box-shadow: 0 0 6px rgba(124, 182, 255, 0.9), 0 0 16px rgba(124, 182, 255, 0.4);
}

.switch-label {
  min-width: 5em;
  text-align: left;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.18em;
  color: #b9b3a9;
  transition: color 0.24s ease;
}

.power-switch[aria-checked='true'] .switch-label {
  color: #f0ebe2;
}

.interaction-hint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
  height: 18px;
  letter-spacing: 0.02em;
  transition: opacity 0.25s ease;
}

.pill-btn {
  position: relative;
  min-width: 170px;
  height: 44px;
  padding: 0 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(52, 52, 58, 0.98) 0%, rgba(28, 28, 32, 0.98) 100%);
  color: #f0ece5;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition:
    background 0.22s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    color 0.22s ease,
    opacity 0.2s ease;
}

.pill-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(68, 68, 76, 1) 0%, rgba(40, 40, 46, 1) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.pill-btn:active:not(:disabled) {
  transform: translateY(0.5px) scale(0.985);
}

.pill-btn:disabled {
  cursor: default;
  opacity: 0.55;
}

.pill-btn.is-ready-download {
  background: linear-gradient(180deg, #f6f3ec 0%, #ddd7cb 100%);
  border-color: rgba(255, 255, 255, 0.55);
  color: #17150f;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.pill-btn.is-ready-download:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffffff 0%, #eae5da 100%);
}

.interaction-hint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
  height: 18px;
  letter-spacing: 0.02em;
  transition: opacity 0.25s ease;
}

/* ============================ Printer & Paper ============================ */
.printer-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.printer-unit {
  position: relative;
  z-index: 5;
  width: var(--printer-w, 380px);
  height: var(--printer-h, 100px);
  will-change: transform;
}

.printer-unit.is-vibrating {
  animation: printerHum 0.11s linear infinite;
}

@keyframes printerHum {
  0% { transform: translate(0, 0); }
  25% { transform: translate(0.45px, 0.35px); }
  50% { transform: translate(-0.4px, -0.25px); }
  75% { transform: translate(0.3px, -0.3px); }
  100% { transform: translate(0, 0); }
}

.printer-body {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: linear-gradient(180deg, #3d3d44 0%, #26262c 16%, #1a1a1e 70%, #101013 100%);
  box-shadow:
    0 30px 48px -14px rgba(0, 0, 0, 0.92),
    0 8px 18px -6px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 1px 0.5px rgba(255, 255, 255, 0.22),
    inset 0 -2px 3px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.printer-top-bevel {
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.printer-slot-recess {
  position: absolute;
  left: 22px;
  right: 22px;
  top: calc(var(--printer-h, 100px) * 0.60);
  height: calc(var(--printer-h, 100px) * 0.16);
  border-radius: 999px;
  background: linear-gradient(180deg, #050506 0%, #0c0c0e 70%, #26262c 100%);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.98),
    0 1px 0 rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.printer-slot-slit {
  width: calc(100% - 10px);
  height: calc(var(--printer-h, 100px) * 0.07);
  border-radius: 999px;
  background: #010102;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 1);
}

.printer-rollers {
  position: absolute;
  inset: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0.22;
}

.printer-rollers span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #5a5a63;
}

.printer-status-led {
  position: absolute;
  right: 14px;
  top: calc(var(--printer-h, 100px) * 0.1);
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: #4a4a52;
  box-shadow: inset 0 0.5px 1px rgba(0, 0, 0, 0.7);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.printer-status-led.is-printing {
  background: #f5b95b;
  box-shadow: 0 0 8px rgba(245, 185, 91, 0.95);
  animation: ledPulse 0.45s ease-in-out infinite alternate;
}

.printer-status-led.is-ready {
  background: #52d68a;
  box-shadow: 0 0 8px rgba(82, 214, 138, 0.8);
}

.printer-status-led.is-saving {
  background: #7cb6ff;
  box-shadow: 0 0 9px rgba(124, 182, 255, 0.9);
}

@keyframes ledPulse {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

.printer-bottom-groove {
  position: absolute;
  left: 30px;
  right: 30px;
  top: calc(var(--printer-h, 100px) * 0.56);
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.7);
}

/* 画布容器：高度由 JS 按状态撑开，0 高度时纸完全收在出纸口里 */
.paper-stage {
  position: relative;
  z-index: 8;
  width: 100%;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

#paperCanvas {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  touch-action: none;
  pointer-events: auto;
  cursor: default;
}

#paperCanvas.can-tear {
  cursor: grab;
}

#paperCanvas.is-dragging {
  cursor: grabbing;
}

#paperCanvas.can-preview {
  cursor: zoom-in;
}

/* ============================ Floating action bar ============================ */
.float-bar {
  position: fixed;
  white-space: nowrap;
  left: 50%;
  bottom: 28px;
  z-index: 46;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.float-bar.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.ghost-chip {
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 20, 24, 0.82);
  backdrop-filter: blur(10px);
  color: #cfcac2;
  font-family: var(--font-sans);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ghost-chip svg {
  width: 13px;
  height: 13px;
  opacity: 0.8;
}

.ghost-chip:hover {
  background: rgba(38, 38, 44, 0.92);
  color: #f4f1ea;
  border-color: rgba(255, 255, 255, 0.24);
}

.float-bar .pill-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  height: 40px;
  min-width: 0;
  font-size: 12.5px;
}

/* 浮动条压在白纸上，深色比浅色更清楚 */
.float-bar .pill-btn.is-ready-download {
  background: linear-gradient(180deg, rgba(38, 38, 44, 0.96) 0%, rgba(18, 18, 22, 0.96) 100%);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f2efe9;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.float-bar .pill-btn.is-ready-download:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(58, 58, 66, 0.98) 0%, rgba(30, 30, 36, 0.98) 100%);
}

/* ============================ Right rail ============================ */
.side-rail {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 20;
}

.rail-bar {
  width: 2px;
  height: 14px;
  border-radius: 2px;
  background: #3a3a42;
}

.rail-bar.is-active {
  background: #b8b2a8;
}

.rail-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #3f3f47;
}

/* ============================ About ============================ */
.about-fab-wrap {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.about-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(22, 22, 26, 0.86);
  backdrop-filter: blur(10px);
  color: #b3aea6;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, background 0.2s ease;
}

.about-fab:hover {
  transform: translateY(-1.5px);
  background: rgba(38, 38, 44, 0.94);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
}

.pet-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.pet-avatar svg {
  width: 100%;
  height: 100%;
}

.about-popover {
  width: min(330px, calc(100vw - 44px));
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(24, 24, 28, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6);
  font-size: 13px;
  line-height: 1.68;
  color: #a9a49c;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-popover.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.about-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.about-popover-head strong {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: #ece8e1;
}

.popover-close {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #6e6a65;
  font-size: 18px;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
}

.popover-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e0d9;
}

.about-popover p {
  margin: 0;
}

/* ============================ Preview modal ============================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 4, 6, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(780px, 94vw);
  max-height: 90vh;
  border-radius: 18px;
  background: #131316;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.is-open .modal-card {
  transform: scale(1);
}

.modal-bar {
  padding: 12px 16px;
  background: #17171b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  font-size: 13px;
  font-weight: 500;
  color: #d9d5cd;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #0f0f12;
}

.modal-body img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 0 auto;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
}

.btn-primary {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #f6f3ec, #ddd7cb);
  color: #17150f;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease;
}

.btn-primary:hover {
  background: #ffffff;
}

.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #a9a49c;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f0ece5;
}

/* ============================ Toast ============================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 90;
  transform: translateX(-50%) translateY(14px);
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(28, 28, 33, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: #ece8e1;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================ Responsive ============================ */
@media (max-width: 720px) {
  .site-header {
    padding: 16px 18px;
  }

  .stage {
    padding: 70px 12px 64px;
  }

  .hero {
    margin-bottom: 22px;
  }

  .power-switch {
    padding: 11px 20px 11px 12px;
    gap: 12px;
  }

  .switch-bezel {
    width: 44px;
    height: 34px;
  }

  .switch-rocker {
    width: 32px;
    height: 24px;
  }

  .switch-label {
    font-size: 12px;
    letter-spacing: 0.16em;
  }

  .side-rail {
    display: none;
  }

  .about-fab-wrap {
    right: 14px;
    bottom: 14px;
  }

  .about-fab {
    padding: 4px 6px 4px 12px;
    font-size: 12px;
  }

  .float-bar {
    bottom: 86px;
  }

  .toast {
    bottom: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .printer-unit.is-vibrating {
    animation: none;
  }

  .switch-rocker {
    transition-duration: 0.01s;
  }
}
