body.randomizer-page { margin: 0; background: #ffffff; }
.randomizer-app {
  --game-text: #222222;
  --game-muted: #6b6b6b;
  --game-border: #e5e5e5;
  --game-accent: #bc8544;
  color-scheme: light;
  color: var(--game-text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  width: 100%;
  max-width: 848px;
  margin: 0 auto;
  padding: 24px 24px 36px;
  background: #ffffff;
}
.randomizer-app, .randomizer-app * { box-sizing: border-box; }
.randomizer-app [hidden] { display: none !important; }
.randomizer-app button { font: inherit; cursor: pointer; touch-action: manipulation; }
.randomizer-app button:disabled { opacity: .35; cursor: default; }
.randomizer-app button:focus-visible, .randomizer-app canvas:focus-visible, .randomizer-app a:focus-visible, .randomizer-app input:focus-visible { outline: 2px solid var(--game-accent); outline-offset: -3px; }
.randomizer-app button svg { pointer-events: none; }
.randomizer-app .game-panel { position: relative; overflow: hidden; width: 100%; border: 1px solid var(--game-border); border-radius: 10px; background: #ffffff; }
.randomizer-app .toolbar { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 2px 9px 2px 18px; }
.randomizer-app .status { display: flex; align-items: center; }
.randomizer-app .status i { width: 6px; height: 6px; background: #999999; border-radius: 50%; }
.randomizer-app .status.playing i { background: #6e9853; }
.randomizer-app .status.error i { background: #b54335; }
.randomizer-app .tools { display: flex; align-items: center; gap: 3px; }
.randomizer-app .volume-slider { width: 112px; min-width: 60px; height: 40px; margin: 0 8px 0 0; accent-color: var(--game-accent); cursor: pointer; }
.randomizer-app .icon-button { display: grid; place-items: center; background: transparent; border: 0; color: var(--game-muted); width: 40px; height: 40px; padding: 0; border-radius: 6px; }
.randomizer-app .icon-button:hover:not(:disabled) { background: #f4f4f4; color: var(--game-text); }
.randomizer-app svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.randomizer-app .mute-line { display: none; }
.randomizer-app [data-ui="sound"][aria-pressed="false"] .mute-line { display: block; }
.randomizer-app [data-ui="sound"][aria-pressed="false"] { opacity: .65; }
.randomizer-app .stage { position: relative; background: #41281d; aspect-ratio: 4 / 3; overflow: hidden; isolation: isolate; }
.randomizer-app canvas { display: block; width: 100%; height: 100%; touch-action: none; -webkit-user-select: none; user-select: none; }
.randomizer-app canvas.loaded { cursor: none; }
.randomizer-app .instructions { padding: 29px 2px 0; }
.randomizer-app .instructions h2 { margin: 0; color: var(--game-text); font-size: 13px; line-height: 1.5; letter-spacing: 1.6px; font-weight: 650; }
.randomizer-app .intro { margin: 8px 0 0; font-size: 16px; line-height: 1.6; }
.randomizer-app .instructions ol { list-style: none; padding: 0; margin: 23px 0 0; }
.randomizer-app .instructions li { display: flex; align-items: baseline; gap: 15px; margin-bottom: 14px; }
.randomizer-app .step { flex: 0 0 24px; font-size: 12px; color: #888888; font-variant-numeric: tabular-nums; }
.randomizer-app .instructions li p { margin: 0; font-size: 14px; line-height: 1.65; }
.randomizer-app .touch-note { margin: 21px 0 0; color: var(--game-muted); font-size: 13px; line-height: 1.65; }
.randomizer-app .loading-screen, .randomizer-app .pause-screen, .randomizer-app .end-screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2; padding: 20px; }
.randomizer-app .end-screen { overflow: auto; }
.randomizer-app .loading-screen { flex-direction: column; gap: 18px; background: #22190fe8; }
.randomizer-app .load-track { height: 3px; width: min(240px, 70%); background: #51402e; overflow: hidden; border-radius: 4px; flex: none; }
.randomizer-app .load-track span { display: block; width: 0; height: 100%; background: #e9b66d; transition: width .1s; }
.randomizer-app .loading-screen.error .load-track span { width: 100%; background: #b54335; }
.randomizer-app .load-error { color: #f6e2c8; font-size: 19.5px; line-height: 1.6; max-width: 540px; margin: 0; text-align: center; }
.randomizer-app .pause-screen { background: #1a130d99; backdrop-filter: blur(4px); }
.randomizer-app .end-screen { background: #160f0866; backdrop-filter: blur(2px); }
.randomizer-app .overlay-button, .randomizer-app .card-icon { display: grid; place-items: center; width: 96px; height: 96px; flex: none; padding: 0; border: 1px solid #f6d09b; border-radius: 50%; background: #e9b66d; color: #2e2114; box-shadow: 0 4px 20px #0003; }
.randomizer-app .overlay-button svg, .randomizer-app .card-icon svg { width: 43.5px; height: 43.5px; }
.randomizer-app .overlay-button:hover { background: #f6d09b; }
.randomizer-app .end-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: min(900px, 100%); }
.randomizer-app .end-card { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 27px; min-height: 399px; border: 1px solid #f6d09b; border-radius: 15px; background: #fff8edf5; color: #2e2114; padding: 37.5px 31.5px; box-shadow: 0 6px 24px #0003; text-align: center; }
.randomizer-app .end-card:hover { background: #fff2db; border-color: #e9b66d; }
.randomizer-app .card-title { font-size: 25.5px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.randomizer-app .results { display: grid; gap: 10.5px; width: 100%; margin-top: auto; }
.randomizer-app .result-row { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; font-size: 18px; line-height: 1.5; color: #75614c; text-align: left; }
.randomizer-app .result-row strong { color: #2e2114; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.randomizer-app .article-screen { position: absolute; inset: 0; z-index: 5; padding: 14px; background: #160f08bb; backdrop-filter: blur(4px); }
.randomizer-app .article-card { position: relative; height: 100%; overflow: auto; overscroll-behavior: contain; border: 1px solid #f6d09b; border-radius: 10px; background: #fffaf2; padding: 21px; color: #2e2114; box-shadow: 0 6px 24px #0003; scrollbar-width: thin; }
.randomizer-app .article-close { position: absolute; top: 8px; right: 8px; z-index: 1; }
.randomizer-app .article-heading { margin: 0 36px 24px 0; }
.randomizer-app .article-category { margin: 0; font-size: 19.5px; line-height: 1.5; }
.randomizer-app .category-divider { margin: 0 7px; }
.randomizer-app .article-card a { color: #8a582a; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.randomizer-app .category-link { display: inline; font-size: 18px; line-height: inherit; }
.randomizer-app .article-content { min-height: 100%; display: flex; flex-direction: column; }
.randomizer-app .article-media { display: flow-root; margin: 0 0 24px; }
.randomizer-app .article-media img { display: block; float: left; width: 43%; max-width: 400px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 0 24px 14px 0; border-radius: 7px; }
.randomizer-app .article-media.image-right img { float: right; margin: 0 0 14px 24px; }
.randomizer-app .article-source { clear: both; font-size: clamp(16px, 3vw, 24px); line-height: 1.65; margin: auto 0 0; padding-top: 12px; white-space: nowrap; }
.randomizer-app .article-source a { display: inline; font-weight: 600; overflow-wrap: normal; }
.randomizer-app .article-description { font-size: 21px; line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.randomizer-app .article-message { margin: 44px 0 18px; font-size: 21px; line-height: 1.6; }
.randomizer-app .article-retry { border: 1px solid #f6d09b; border-radius: 9px; padding: 15px 27px; background: #e9b66d; color: #2e2114; font-size: 19.5px; }
.randomizer-app .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.randomizer-app .game-panel:fullscreen { display: flex; flex-direction: column; justify-content: center; align-items: center; border: 0; border-radius: 0; background: #ffffff; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.randomizer-app .game-panel:fullscreen .stage, .randomizer-app .game-panel:fullscreen .toolbar { width: min(100vw, calc((100dvh - 48px) * 4 / 3)); flex: none; }
.randomizer-app .game-panel:fullscreen .article-screen { display: flex; justify-content: center; align-items: center; }
.randomizer-app .game-panel:fullscreen .article-card { width: min(800px, 100%); max-height: 700px; }
@media (max-width: 619px) {
  .randomizer-app { padding: 12px 12px 28px; }
  .randomizer-app .game-panel { border-radius: 7px; }
  .randomizer-app .instructions { padding-top: 24px; }
  .randomizer-app .intro { font-size: 15px; }
  .randomizer-app .instructions li { gap: 10px; }
  .randomizer-app .instructions li p { font-size: 13px; }
  .randomizer-app .touch-note { font-size: 12px; }
  .randomizer-app .end-screen { padding: 12px; }
  .randomizer-app .volume-slider { width: 72px; margin-right: 0; }
  .randomizer-app .toolbar { padding-left: 10px; padding-right: 4px; }
  .randomizer-app .tools { gap: 0; }
  .randomizer-app .icon-button { width: 36px; }
  .randomizer-app .game-ended .stage { height: 610px; aspect-ratio: auto; }
  .randomizer-app .end-cards { grid-template-columns: 1fr; gap: 15px; }
  .randomizer-app .end-card { min-height: 240px; padding: 21px 15px; gap: 15px; border-radius: 10.5px; }
  .randomizer-app .card-icon { width: 66px; height: 66px; }
  .randomizer-app .card-icon svg { width: 33px; height: 33px; }
  .randomizer-app .card-title { font-size: 19.5px; }
  .randomizer-app .result-row { font-size: 15px; gap: 7.5px; }
  .randomizer-app .results { gap: 4.5px; }
  .randomizer-app .article-open { height: min(740px, 88dvh); min-height: 360px; }
  .randomizer-app .article-screen { padding: 8px; }
  .randomizer-app .article-card { padding: 16px; }
  .randomizer-app .article-heading { margin-bottom: 15px; }
  .randomizer-app .article-media img, .randomizer-app .article-media.image-right img { float: none; width: 100%; max-width: 400px; margin: 0 auto 20px; }
  .randomizer-app .article-source { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .randomizer-app * { transition: none !important; } }