:root {
  color-scheme: light;
  --paper: #f8f8f6;
  --ink: #1d201e;
  --muted: #585d59;
  --row: #fff;
  --edge: #dedfda;
  --selected: #e5e6e2;
  --brand: #171a42;
  --accent: #ff9059;
  --hover: #f1f2ee;
  --notify: #222521;
  --beam-middle: #fdb08a;
  --beam-edge: #faddcd;
  --beam-far: #f9e4d8;
  --beam-middle-strength: 69%;
  --beam-edge-strength: 26%;
  --beam-far-strength: 19%;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #232523;
  --ink: #f7f8f5;
  --muted: #c4c7c1;
  --row: #313431;
  --edge: #424440;
  --selected: #4c4f4b;
  --brand: #fff;
  --hover: #3c3f3c;
  --notify: #f5f6f1;
  --beam-middle: #a76543;
  --beam-edge: #5a4031;
  --beam-far: #46362c;
  --beam-middle-strength: 60%;
  --beam-edge-strength: 25%;
  --beam-far-strength: 16%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #232523;
    --ink: #f7f8f5;
    --muted: #c4c7c1;
    --row: #313431;
    --edge: #424440;
    --selected: #4c4f4b;
    --brand: #fff;
    --hover: #3c3f3c;
    --notify: #f5f6f1;
    --beam-middle: #a76543;
    --beam-edge: #5a4031;
    --beam-far: #46362c;
    --beam-middle-strength: 60%;
    --beam-edge-strength: 25%;
    --beam-far-strength: 16%;
  }
}

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

[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.36 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { border: 0; padding: 0; background: none; cursor: pointer; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  padding: 20px 12px;
  container-type: inline-size;
}

main {
  max-width: 432px;
  margin-inline: auto;
  padding: 22px 18px 14px;
  border: 1px solid transparent;
}

.site-header,
.header-actions {
  display: flex;
  align-items: center;
}

.site-header {
  position: relative;
  z-index: 4;
  justify-content: space-between;
  gap: 12px;
  padding-inline-start: 4px;
}

.site-header strong {
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -.035em;
}

.header-actions { flex: none; gap: 3px; }

.about-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 6px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

.ui-icon { display: block; flex: none; width: 20px; height: 20px; stroke-width: 1.75; }
.about-link .ui-icon { width: 15px; height: 15px; }
.action .ui-icon { width: 17px; height: 17px; }

.theme-picker { position: relative; }

.theme-trigger {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.theme-trigger[aria-expanded="true"] { background: var(--selected); }

.theme-menu {
  position: absolute;
  z-index: 5;
  inset: calc(100% + 4px) 0 auto auto;
  width: 178px;
  padding: 5px;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--row);
  box-shadow: 0 8px 26px #00000024;
}

.theme-option {
  display: grid;
  grid-template-columns: 18px 1fr 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding-inline: 10px;
  border-radius: 9px;
  text-align: left;
  font-size: 14px;
  font-weight: 550;
}

.theme-option .ui-icon { width: 18px; height: 18px; }
.theme-option .tick { width: 16px; height: 16px; visibility: hidden; }
.theme-option[aria-checked="true"] { background: var(--hover); }
.theme-option[aria-checked="true"] .tick { visibility: visible; }
.theme-option:focus-visible { outline-offset: -2px; }

h1 {
  margin: 19px 4px 8px;
  font: 760 clamp(31px, 8.9cqw, 44px)/.99 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -.052em;
}

.scene {
  position: relative;
  width: 100%;
  aspect-ratio: 1.31;
  margin-top: 4px;
}

.scene img {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 50%;
  height: 102%;
  width: auto;
  max-width: none;
  transform: translateX(-47%);
}

.ray {
  position: absolute;
  z-index: -1;
  left: 49%;
  top: 51%;
  width: max(125vmax, 1100px);
  height: 21%;
  pointer-events: none;
  transform-origin: 0 50%;
  background: linear-gradient(90deg,
    var(--accent) 0 clamp(78px, 22cqw, 109px),
    var(--beam-middle) clamp(155px, 47cqw, 191px),
    var(--beam-edge) clamp(237px, 77cqw, 302px),
    var(--beam-far) clamp(398px, 112cqw, 545px));
}

@supports (color: color-mix(in srgb, black, white)) {
  .ray {
    --beam-middle: color-mix(in srgb, var(--accent) var(--beam-middle-strength), var(--paper));
    --beam-edge: color-mix(in srgb, var(--accent) var(--beam-edge-strength), var(--paper));
    --beam-far: color-mix(in srgb, var(--accent) var(--beam-far-strength), var(--paper));
  }
}

.ray:nth-child(1) { transform: translateY(-50%) rotate(14deg); }
.ray:nth-child(2) { transform: translateY(-50%) rotate(-46deg); }
.ray:nth-child(3) { transform: translateY(-50%) rotate(-105deg); }
.ray:nth-child(4) { transform: translateY(-50%) rotate(-166deg); }
.ray:nth-child(5) { transform: translateY(-50%) rotate(134deg); }
.ray:nth-child(6) { transform: translateY(-50%) rotate(75deg); }

.note {
  margin: 15px 4px 18px;
  font-size: clamp(18px, 5.25cqw, 21px);
  line-height: 1.21;
  letter-spacing: -.032em;
  font-weight: 620;
}

.ways { position: relative; display: grid; gap: 7px; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 59px;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--edge);
  border-radius: 13px;
  background: var(--row);
}

.row:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.sbprow { gap: 2px; padding: 0 5px 0 0; }
.sbprow:has(.reveal[hidden]) { display: none; }

.reveal {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-width: 0;
  min-height: 57px;
  padding: 0 12px 0 15px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.02em;
}

.brand img { display: block; width: 17px; height: 21px; }

.action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.015em;
}

.sbprow[data-open="yes"] .reveal { flex: 0 0 auto; padding-right: 4px; }

.number {
  width: 100%;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  text-align: right;
  font-size: clamp(15px, 4.5cqw, 18px);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
}

.copy {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 46px;
  border-radius: 8px;
}

.provider { display: flex; flex-direction: column; }
.provider b { font-size: 17px; line-height: 1.16; letter-spacing: -.025em; }
.provider small { color: var(--muted); font-size: 13px; line-height: 1.35; }

.toast {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: calc(100% + 6px);
  max-width: 90%;
  padding: 9px 13px;
  border-radius: 10px;
  background: var(--notify);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.3;
  box-shadow: 0 4px 12px #0002;
  pointer-events: none;
}

.toast:empty { opacity: 0; }

@media (hover: hover) {
  a.row:hover, .sbprow:has(.reveal:hover), .copy:hover,
  .about-link:hover, .theme-trigger:hover, .theme-option:hover { background: var(--hover); }
}

@media (max-width: 480px) {
  .page { padding: 0; }
  main { border: 0; padding: 16px 14px 12px; }
}
