:root {
  color-scheme: light;
  --ink: #091735;
  --muted: #41516b;
  --blue: #073ee4;
  --line: #b7c4d4;
  --paper: #f3f8fc;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }

.masthead {
  width: min(100% - 64px, 1240px);
  min-height: 94px;
  margin-inline: auto;
  padding-inline: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 14px; font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 850; letter-spacing: -.04em; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--blue); font-size: 1.65rem; }
.open-button { min-height: 44px; padding: 6px; border: 0; background: transparent; color: var(--blue); font-weight: 730; }
.open-button:hover { text-decoration: underline; text-underline-offset: .2em; }

main { width: min(100% - 64px, 1152px); margin-inline: auto; padding-block: clamp(42px, 7vw, 86px) 40px; }
h1 { margin: 0; font-size: clamp(2.25rem, 5.5vw, 4.5rem); font-weight: 850; letter-spacing: -.05em; line-height: 1.14; }
.intro { margin: 16px 0 clamp(27px, 4vw, 44px); font-size: clamp(1rem, 2.3vw, 1.55rem); color: var(--muted); line-height: 1.55; }

.receipt { padding: clamp(19px, 3.7vw, 43px); border: 3px solid var(--blue); border-radius: 20px; background: #fff; box-shadow: 0 8px 20px #0922570b; }
.status { display: flex; align-items: center; gap: 9px; justify-content: end; margin: 0 0 6px; color: var(--muted); font-size: .95rem; font-weight: 700; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #7c8ca6; flex: 0 0 auto; }
.status[data-connected="true"] { color: var(--ink); }
.status[data-connected="true"]::before { background: #18a54b; }
h2 { font-size: clamp(1.45rem, 3.2vw, 2.3rem); letter-spacing: -.04em; margin: 0 0 24px; }
.empty { margin: 0; padding: 30px 0 37px; color: var(--muted); line-height: 1.6; }
.details { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.rewards { min-width: 0; padding: 10px clamp(15px, 3vw, 40px) 12px 0; display: flex; flex-direction: column; justify-content: center; }
.rewards ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.rewards li { display: grid; gap: 6px; }
.prize-title { font-size: clamp(1.55rem, 3.45vw, 3.1rem); font-weight: 850; color: var(--blue); letter-spacing: -.035em; overflow-wrap: anywhere; }
.category, .draw-source { color: var(--muted); font-size: 1rem; }
.draw-source { margin: 16px 0 0; }
.probabilities { min-width: 0; border-left: 1px solid var(--line); padding: 0 0 8px clamp(16px, 3vw, 40px); }
.probabilities table { width: 100%; border-collapse: collapse; }
.probabilities caption { text-align: left; margin-bottom: 13px; font-size: clamp(1.13rem, 2.3vw, 1.7rem); font-weight: 820; letter-spacing: -.035em; }
.probabilities tbody { border-bottom: 1px solid var(--line); }
.probabilities th, .probabilities td { padding: 10px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 500; }
.probabilities td { text-align: right; padding-left: 12px; font-variant-numeric: tabular-nums; }
.hash { margin-top: 24px; padding-top: 19px; border-top: 1px solid var(--line); }
.hash p { margin: 0 0 10px; }
.hash-row { display: flex; gap: 12px; align-items: stretch; }
.hash-row code { display: block; flex: 1; min-width: 0; padding: 12px; border: 1px solid #cbd6e2; border-radius: 8px; overflow-wrap: anywhere; background: #f0f4f8; font: .95rem/1.5 ui-monospace, Consolas, monospace; }
.hash-row button { flex: 0 0 auto; min-width: 66px; min-height: 44px; border-radius: 8px; border: 1px solid var(--blue); background: white; color: var(--blue); font-weight: 700; }
.hash-row button:hover { background: #eef4ff; }
.note { margin-top: 18px; text-align: center; color: var(--muted); font-size: .94rem; line-height: 1.65; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 640px) {
  .masthead, main { width: calc(100% - 36px); }
  .masthead { min-height: 72px; padding-inline: 0; }
  .brand-mark { width: 34px; height: 34px; font-size: 1.25rem; border-radius: 8px; }
  .brand { gap: 9px; }
  .receipt { border-width: 2px; border-radius: 14px; }
  h2 { margin-top: 12px; margin-bottom: 16px; }
  .details { grid-template-columns: minmax(0, 1fr); }
  .rewards { padding: 0 0 19px; }
  .probabilities { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .hash-row { gap: 8px; }
  .hash-row code { padding: 8px; font-size: .84rem; }
  .hash-row button { min-width: 52px; }
}
