:root {
  color-scheme: light;
  --background: #f7f8fa;
  --text: #171a20;
  --muted: #757b87;
  --control: rgba(223, 227, 234, .68);
  --selected: #fff;
  --border: rgba(58, 70, 92, .12);
  --shadow: rgba(38, 50, 78, .12);
  --gold: rgba(249, 226, 167, .35);
  --blue: rgba(201, 222, 253, .54);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #111318;
  --text: #f4f5f8;
  --muted: #9ca3af;
  --control: rgba(46, 51, 61, .82);
  --selected: #414958;
  --border: rgba(207, 221, 248, .13);
  --shadow: rgba(0, 0, 0, .5);
  --gold: rgba(166, 122, 44, .13);
  --blue: rgba(47, 80, 133, .2);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100svh;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s, color .2s;
}
body::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 auto;
  height: 440px;
  pointer-events: none;
  background: radial-gradient(ellipse at 25% 0, var(--gold), transparent 62%), radial-gradient(ellipse at 78% 0, var(--blue), transparent 60%);
}
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid #7aa4db; outline-offset: 5px; }
.showcase { position: relative; z-index: 1; max-width: 790px; margin: 0 auto; padding: 52px 24px 34px; }
.intro { text-align: center; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 48px); line-height: 1.1; font-weight: 700; letter-spacing: -1.9px; }
.intro p { color: var(--muted); margin: 12px 0 0; font-size: 16px; letter-spacing: -.15px; }
.appearance { display: flex; width: fit-content; padding: 4px; margin: 27px auto 32px; border-radius: 100px; background: var(--control); }
.theme-button { min-width: 80px; padding: 8px 18px; border: 0; border-radius: 100px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; transition: background-color .2s, color .2s; }
.theme-button[aria-pressed="true"] { background: var(--selected); color: var(--text); box-shadow: 0 1px 5px rgba(0, 0, 0, .06); }
.screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; max-width: 624px; margin: 0 auto; }
figure { margin: 0; min-width: 0; }
.screen { display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 30px; background: var(--background); box-shadow: 0 14px 40px -12px var(--shadow), 0 2px 5px rgba(0, 0, 0, .04); transition: transform .2s, box-shadow .2s; }
.screen img { display: block; width: 100%; height: auto; aspect-ratio: 1179 / 2556; object-fit: cover; }
@media (hover: hover) { .screen:hover { transform: translateY(-3px); box-shadow: 0 20px 48px -10px var(--shadow); } }
figcaption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
.hint { margin: 29px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
dialog { max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; padding: 28px; border: 0; background: transparent; overflow: auto; }
dialog[open] { display: flex; align-items: center; justify-content: center; }
dialog::backdrop { background: rgba(9, 12, 18, .87); backdrop-filter: blur(12px); }
#viewer-image { display: block; width: auto; height: auto; max-width: calc(100vw - 48px); max-height: calc(100svh - 70px); border-radius: 20px; box-shadow: 0 12px 60px rgba(0, 0, 0, .3); }
.close-viewer { position: fixed; z-index: 1; right: max(14px, env(safe-area-inset-right)); top: max(14px, env(safe-area-inset-top)); display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 50%; background: rgba(28, 31, 38, .8); color: white; }
@media (max-width: 560px) {
  .showcase { padding: 38px 20px 30px; }
  .appearance { margin: 24px auto 28px; }
  .screens { grid-template-columns: 1fr; gap: 38px; max-width: 300px; }
  .screen { border-radius: 30px; }
  .hint { margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; } }
