body[data-app="phone-screen-check"] {
  --paper: #f0f2f1;
  --surface: #fafbf9;
  --ink: #182426;
  --muted: #465a5d;
  --line: #ccd7d4;
  --accent: #12604d;
  --wash: #e0ece6;
}
.check-panel { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.55fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.display-preview { display: grid; place-items: center; background: #e3ebe7; border-right: 1px solid var(--line); padding: 24px; }
.preview-bezel { width: min(184px, 100%); aspect-ratio: 9 / 16; display: grid; padding: 8px; border-radius: 22px; background: #243433; }
.preview-grid { border-radius: 15px; background: repeating-linear-gradient(0deg, transparent 0 calc(8.333% - 1px), #79a99d calc(8.333% - 1px) 8.333%), repeating-linear-gradient(90deg, #9ed0bc 0 calc(12.5% - 1px), #79a99d calc(12.5% - 1px) 12.5%); }
.check-choices { padding: 24px; }
.check-choices section + section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.check-choices h2 { margin: 0; font-size: 1.22rem; letter-spacing: -.035em; }
.check-choices p { margin: 6px 0 12px; line-height: 1.6; color: var(--muted); font-size: .9rem; }
.color-samples { display: flex; gap: 5px; margin-bottom: 10px; }
.color-samples i { display: block; width: 15px; height: 15px; border: 1px solid #8d9d99; border-radius: 50%; background: var(--sample, white); }
.color-samples i:nth-child(2) { --sample: #111; }
.color-samples i:nth-child(3) { --sample: #e12631; }
.color-samples i:nth-child(4) { --sample: #3cb85b; }
.color-samples i:nth-child(5) { --sample: #386bd1; }
.color-samples i:nth-child(6) { --sample: #808080; }

body:has(#test[open]) { overflow: hidden; }
#test { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: #111c1d; color: white; overflow: hidden; }
#test::backdrop { background: #111c1d; }
.test-layout, .pixel-surface, .touch-surface { position: absolute; inset: 0; }
.test-layout { display: grid; grid-template-rows: auto 1fr; }
.pixel-surface { width: 100%; height: 100%; border: 0; border-radius: 0; background: var(--test-color, white); padding: 0; touch-action: manipulation; }
.pixel-surface:focus-visible { outline-offset: -4px; }
.test-controls { position: relative; z-index: 1; justify-self: center; width: min(100%, 430px); padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left)); background: #172425; border: 1px solid #475f5f; border-top: 0; border-radius: 0 0 12px 12px; }
.test-heading, .test-actions { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.test-heading { margin-bottom: 5px; }
.test-heading h2 { margin: 0; font-size: 1rem; }
.test-controls button { color: white; background: #253a3b; border-color: #58706e; min-height: 38px; }
.test-controls output { font-size: .84rem; font-variant-numeric: tabular-nums; }
.fullscreen { margin-top: 5px; width: 100%; }
.touch-surface { display: grid; grid-template: repeat(12, minmax(0, 1fr)) / repeat(8, minmax(0, 1fr)); grid-row: 2; position: relative; touch-action: none; user-select: none; background: #152526; border-top: 1px solid #48615e; border-left: 1px solid #48615e; }
.touch-cell { border: solid #48615e; border-width: 0 1px 1px 0; pointer-events: none; }
.touch-cell.hit { background: #4fc49d; }
#test[data-mode="touch"] .test-controls { grid-row: 1; }
@media (max-width: 580px) {
  .check-panel { grid-template-columns: minmax(0,1fr); }
  .display-preview { display: none; }
  .check-choices { padding: 16px; }
  .check-choices button { width: 100%; min-height: 44px; }
}
