.stamp-page { --accent: #43c9a2; }
.stamp-page main { padding-top: 16px; }
.standalone-title { font-size: clamp(1.7rem, 3vw, 2.8rem); }
.device-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr); gap: 28px; align-items: center; }
.device-figure { margin: 0; min-width: 0; }
.device { position: relative; width: 100%; user-select: none; container-type: inline-size; }
.device > img { display: block; width: 100%; height: auto; filter: drop-shadow(0 20px 24px #0003); }
.device #canvas { position: absolute; left: 12.5%; top: 28.6667%; width: 45%; height: 33.75%; aspect-ratio: 16 / 9; margin: 0; border: 0; border-radius: 0; pointer-events: none; background: #10161d; }
/* Offsets in SVG units / 800 so the display stays in its bezel when keys join the flow on mobile. */
@supports (top: 1cqw) {
  .device #canvas { top: 21.5cqw; height: auto; }
  .key { top: 50.5cqw; }
}
.device-keys { display: contents; }
.key { position: absolute; top: 67.3333%; width: 12.5%; height: 8%; min-height: 44px; padding: 0; border: 1px solid #71808a; border-bottom: 4px solid #1e272d; border-radius: 6px; background: linear-gradient(#48545e, #303a40); color: #f3f6f7; font-size: clamp(.85rem, 2vw, 1.2rem); touch-action: none; -webkit-touch-callout: none; }
.key-a { left: 12.5%; }
.key-b { left: 28.75%; }
.key-c { left: 45%; }
.key:hover { border-color: #43c9a2; }
.key.pressed { background: #1b262d; border-bottom-width: 1px; box-shadow: inset 0 2px 6px #0008; }
.key:focus-visible { outline: 3px solid #198264; }
.device-figure figcaption { text-align: center; color: var(--muted); font-size: .73rem; margin-top: 8px; }
.display-toggle { display: block; margin: 14px auto 0; min-height: 44px; background: transparent; color: var(--accent); }
.device.display-only { max-width: 640px; margin: auto; }
.device.display-only > img { display: none; }
.device.display-only #canvas { position: static; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 2px solid var(--line); border-radius: 8px; }
.device.display-only .device-keys { display: flex; justify-content: center; gap: 12px; margin: 18px 0; }
.device.display-only .key { position: static; width: 80px; height: 44px; }
.device-guide { border-left: 0; padding: 0; }
.device-guide h2 { color: var(--text); font-size: clamp(1.4rem, 2.5vw, 2rem); line-height: 1.2; margin: 12px 0; }
#panel-status { color: var(--accent); font-size: .85rem; }
.key-guide { margin: 20px 0; }
.key-guide > div { display: flex; gap: 12px; margin: 12px 0; align-items: flex-start; }
.key-guide dt { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border: 1px solid var(--line); border-radius: 5px; font-size: .8rem; color: var(--text); }
.key-guide dd { margin: 0; font-size: .83rem; }
.demo-note { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 20px; font-size: .75rem; }
.demo-note strong { color: var(--accent); font-size: .7rem; letter-spacing: .12em; }
.demo-note p { margin-bottom: 0; }
.stamp-page.embedded header, .stamp-page.embedded footer, .embedded .standalone-title { display: none; }
.stamp-page.embedded main { padding: 12px 8px 24px; }
@media (max-width: 760px) {
  .device-layout { grid-template-columns: 1fr; gap: 24px; }
  .device-guide h2 br { display: none; }
  .device-guide { padding: 0 12px; }
  .device-keys { display: flex; gap: 12px; justify-content: center; margin: 8px 0 16px; }
  .key { position: static; width: 80px; min-height: 44px; }
  .device > img { filter: drop-shadow(0 10px 12px #0003); }
}
