/* TarotBrats look. Two-color print on a dotted page: indigo ink line, color laid a little off the line.
   Tokens first. Bagel Fat One for the big words, Atkinson Hyperlegible for reading. Fonts are served from this site. */
@font-face { font-family: "Bagel Fat One"; src: url("bagel-fat-one.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gochi Hand"; src: url("gochi-hand.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Press Start 2P"; src: url("press-start-2p.woff2") format("woff2"); font-display: swap; }
:root {
  --page: #FFCF33; --ink: #1D1B4C; --paper: #FFFDF5; --pink: #FF5277; --teal: #12B5A6; --grape: #6C4CE0; --leaf: #35B04A; --sun: #FFC21A;
  --big: "Bagel Fat One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --read: "Atkinson Hyperlegible", Verdana, "Segoe UI", sans-serif;
  --line: 3px solid var(--ink);
}
html { color-scheme: only light; background: #FFCF33; -webkit-text-size-adjust: 100%; }
html[data-tb-theme="mint"] { background: #8EE3C4; --page: #8EE3C4; }
html[data-tb-theme="pink"] { background: #FFA3C4; --page: #FFA3C4; }
html[data-tb-theme="sky"] { background: #93CDFF; --page: #93CDFF; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background-color: var(--page); background-image: radial-gradient(rgba(29, 27, 76, .09) 1.6px, transparent 1.9px); background-size: 16px 16px; color: var(--ink); font: 400 18px/1.5 var(--read); min-height: 100vh; }
h1, h2, h3, p { margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 4px solid var(--grape); outline-offset: 3px; border-radius: 6px; }
.tb-wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* top bar and tabs */
.tb-top { max-width: 1040px; margin: 0 auto; padding: 16px 74px 6px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; }
.tb-logo { display: block; width: 220px; flex: none; }
.tb-logo-svg { display: block; width: 100%; height: auto; }
.tb-tabs { display: flex; gap: 4px; }
.tb-tabs a { font-weight: 700; font-size: 16px; text-decoration: none; padding: 8px 14px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; gap: 7px; }
.tb-tabs a svg { width: 20px; height: 20px; flex: none; }
.tb-tabs a:hover { background: rgba(29, 27, 76, .12); }
.tb-tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* big words */
.tb-h1 { font: 400 clamp(50px, 12vw, 104px)/.92 var(--big); letter-spacing: -.01em; }
.tb-h2 { font: 400 clamp(32px, 6vw, 46px)/1.02 var(--big); }
.tb-h3 { font: 700 20px/1.25 var(--read); }
.tb-lede { font-size: clamp(19px, 2.6vw, 23px); line-height: 1.4; max-width: 30ch; margin-top: 14px; }
.tb-sub { font-size: 19px; line-height: 1.4; max-width: 46ch; margin: 6px 0 20px; }
.tb-prose { max-width: 62ch; }
.tb-prose p + p, .tb-prose p + ul, .tb-prose ul + p { margin-top: 12px; }
.tb-prose ul, .tb-prose ol { margin: 12px 0 0; padding-left: 22px; }
.tb-prose li + li { margin-top: 6px; }
.tb-section { padding: 44px 0 0; }
.tb-section > .tb-h2 { margin-bottom: 16px; }
.tb-first { padding-top: 22px; }
.tb-tag { display: inline-block; font: 400 22px/1 var(--big); background: var(--ink); color: var(--paper); padding: 8px 14px 9px; border-radius: 10px; transform: rotate(-2deg); margin-bottom: 14px; }
sup a { text-decoration: none; font-weight: 700; padding: 0 2px; }

/* buttons */
.tb-btn { appearance: none; border: var(--line); background: var(--ink); color: var(--paper); font: 700 19px/1 var(--read); padding: 15px 24px; border-radius: 999px; cursor: pointer; min-height: 54px; box-shadow: 4px 4px 0 var(--pink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.tb-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--pink); }
.tb-btn-big { font: 400 26px/1 var(--big); padding: 18px 34px; min-height: 66px; }
.tb-btn-quiet { background: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.tb-btn-quiet:active { box-shadow: 1px 1px 0 var(--ink); }
.tb-btn[disabled] { opacity: .45; cursor: default; }
.tb-link { appearance: none; background: none; border: 0; padding: 10px 0; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.tb-actions { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 22px; align-items: center; }

/* the card */
.tb-card-box { container-type: inline-size; display: block; }
.tb-card { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4%; aspect-ratio: 5 / 7; width: 100%; background: var(--paper); border: var(--line); border-radius: 16px; padding: 5% 6% 6%; box-shadow: 6px 6px 0 var(--tone, var(--pink)); overflow: hidden; }
.tb-card-num { font: 400 clamp(11px, 7cqw, 22px)/1 var(--big); display: flex; justify-content: space-between; align-items: center; }
.tb-card-num::after { content: ""; width: .7em; height: .7em; border-radius: 50%; background: var(--tone, var(--pink)); border: 2px solid var(--ink); }
.tb-card-win { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--tone, #FF5277) 17%, #FFFDF5); border: 2.5px solid var(--ink); border-radius: 46% 46% 12px 12px / 30% 30% 12px 12px; padding: 4% 4% 2%; overflow: hidden; }
.tb-card .tb-art { width: 100%; height: 100%; max-height: 100%; display: block; }
.tb-card-name { font: 400 clamp(11px, 8.4cqw, 26px)/1.04 var(--big); text-align: center; text-wrap: balance; min-height: 1.04em; overflow-wrap: anywhere; }
.tb-card.is-pixel .tb-card-name { font-size: clamp(7px, 4.6cqw, 14px); line-height: 1.35; }
.tb-card-back { padding: 0; box-shadow: 6px 6px 0 var(--ink); }
.tb-back-art { width: 100%; height: 100%; display: block; }

/* the reader's speech bubble */
.tb-say { display: flex; align-items: flex-end; gap: 10px; max-width: 30rem; }
.tb-say-face { flex: none; width: 76px; height: 76px; border-radius: 50%; background: var(--paper); border: var(--line); overflow: hidden; display: block; }
.tb-say-face .tb-art { width: 100%; height: 100%; display: block; }
.tb-say-text { position: relative; background: var(--paper); border: var(--line); border-radius: 18px 18px 18px 4px; padding: 10px 14px 11px; font-size: 18px; line-height: 1.3; font-weight: 700; margin-bottom: 10px; text-align: left; }
.tb-say-text b { display: block; font: 400 14px/1.1 var(--big); letter-spacing: .02em; opacity: .75; margin-bottom: 3px; }

/* home */
.tb-hero { display: grid; grid-template-columns: 1fr; gap: 18px; padding-top: 16px; align-items: center; }
.tb-stage { display: grid; justify-items: center; gap: 18px; }
.tb-deck { appearance: none; border: 0; background: none; padding: 26px 40px 10px; cursor: pointer; position: relative; width: min(70vw, 290px); border-radius: 24px; }
.tb-deck .tb-card-box { width: 100%; transition: transform .18s ease-out; }
.tb-deck .tb-card-box + .tb-card-box { position: absolute; left: 40px; right: 40px; top: 26px; width: auto; }
.tb-deck .tb-card-box:nth-child(1) { transform: rotate(-9deg) translate(-16px, 4px); animation: tb-fan-a .5s .15s ease-out both; }
.tb-deck .tb-card-box:nth-child(2) { transform: rotate(7deg) translate(16px, 2px); animation: tb-fan-b .5s .15s ease-out both; }
.tb-deck .tb-card-box:nth-child(3) { transform: rotate(-1deg); }
.tb-deck:hover .tb-card-box:nth-child(3), .tb-deck:focus-visible .tb-card-box:nth-child(3) { transform: rotate(-1deg) translateY(-8px); }
@keyframes tb-fan-a { from { transform: rotate(0) translate(0, 0); } to { transform: rotate(-9deg) translate(-16px, 4px); } }
@keyframes tb-fan-b { from { transform: rotate(0) translate(0, 0); } to { transform: rotate(7deg) translate(16px, 2px); } }
.tb-reveal { display: grid; grid-template-columns: 1fr; gap: 20px; justify-items: center; width: 100%; }
.tb-flip { width: min(60vw, 250px); perspective: 900px; }
.tb-flip-in { position: relative; transform-style: preserve-3d; animation: tb-flip .6s ease-out both; }
.tb-flip-in .tb-card-box { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tb-flip-in .tb-flip-back { position: absolute; inset: 0; transform: rotateY(180deg); }
@keyframes tb-flip { from { transform: rotateY(180deg); } to { transform: rotateY(0); } }
@keyframes tb-pop { from { transform: scale(.86); } to { transform: scale(1); } }
@keyframes tb-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }

/* the reading */
.tb-reading { max-width: 34rem; width: 100%; }
.tb-reading-name { font: 400 clamp(34px, 7vw, 48px)/1 var(--big); }
.tb-reading-word { display: inline-block; font: 700 19px/1.2 var(--read); background: var(--paper); border: var(--line); border-radius: 999px; padding: 6px 14px; margin-top: 10px; box-shadow: 3px 3px 0 var(--tone, var(--pink)); }
.tb-reading-short { font-size: 21px; line-height: 1.42; margin-top: 16px; }
.tb-reading-more { margin-top: 10px; }
.tb-try, .tb-think, .tb-panel { margin-top: 16px; background: var(--paper); border: var(--line); border-radius: 16px; padding: 14px 16px; }
.tb-try b, .tb-think b { display: block; font-size: 15px; margin-bottom: 2px; }
.tb-try span, .tb-think-q { font-size: 20px; line-height: 1.35; font-weight: 700; }
.tb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tb-chip { appearance: none; border: 2px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 9px 14px; font-weight: 700; font-size: 16px; cursor: pointer; min-height: 44px; }
.tb-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* cards you have met */
.tb-met-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 10px; margin-top: 14px; }
.tb-met-row .tb-card { border-width: 2px; border-radius: 8px; box-shadow: 3px 3px 0 var(--tone, var(--ink)); padding: 6%; gap: 0; }
.tb-met-row .tb-card-num, .tb-met-row .tb-card-name { display: none; }
.tb-met-row .tb-card-win { border-width: 1.5px; border-radius: 40% 40% 5px 5px / 26% 26% 5px 5px; }
.tb-met-row .tb-card-back { padding: 0; opacity: .5; box-shadow: none; }

/* big tiles */
.tb-tiles { display: grid; grid-template-columns: 1fr; gap: 16px; }
.tb-tile { appearance: none; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 16px; background: var(--paper); border: var(--line); border-radius: 20px; padding: 14px 18px; text-decoration: none; box-shadow: 6px 6px 0 var(--tone, var(--teal)); min-height: 100px; width: 100%; }
.tb-tile:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--tone, var(--teal)); }
.tb-tile .tb-art { width: 76px; height: 76px; flex: none; }
.tb-tile b { font: 400 25px/1.05 var(--big); display: block; }
.tb-tile span span { font-size: 16px; display: block; margin-top: 4px; line-height: 1.35; }
.tb-tile small { display: block; font-weight: 700; font-size: 14px; margin-top: 4px; }

/* all the cards */
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 20px 16px; }
.tb-grid button { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; text-align: inherit; border-radius: 16px; }
.tb-grid button:active .tb-card { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--tone); }
.tb-suits { display: grid; grid-template-columns: 1fr; gap: 14px; }
.tb-suit { display: flex; gap: 14px; align-items: center; background: var(--paper); border: var(--line); border-radius: 18px; padding: 12px 16px; }
.tb-suit .tb-art { width: 76px; height: 76px; flex: none; }
.tb-suit h3 { font: 400 24px/1 var(--big); }
.tb-suit h3 small { font: 700 15px/1 var(--read); margin-left: 8px; }
.tb-suit p { font-size: 17px; margin-top: 4px; }

/* lay out */
.tb-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; counter-reset: st; margin: 0; padding: 0; list-style: none; }
.tb-steps li { counter-increment: st; background: var(--paper); border: var(--line); border-radius: 14px; padding: 10px 12px 12px; font-weight: 700; font-size: 17px; line-height: 1.25; }
.tb-steps li::before { content: counter(st); display: block; font: 400 26px/1 var(--big); color: var(--pink); margin-bottom: 2px; }
.tb-board { display: grid; gap: 14px 12px; justify-content: center; margin: 6px auto 0; }
.tb-board.lay-three { grid-template-columns: repeat(3, minmax(0, 150px)); }
.tb-board.lay-star { grid-template-columns: repeat(3, minmax(0, 122px)); grid-template-areas: ". a ." "d c e" ". b ."; }
.tb-spot { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; text-align: center; border-radius: 14px; display: block; width: 100%; }
.tb-spot b { display: block; font-size: 14px; line-height: 1.15; margin-top: 8px; min-height: 2.3em; }
.tb-spot.is-up .tb-card-box { animation: tb-pop .25s ease-out; }
.tb-spot.is-on .tb-card { outline: 4px solid var(--grape); outline-offset: 3px; }
.tb-board.lay-star .tb-spot:nth-child(1) { grid-area: c; }
.tb-board.lay-star .tb-spot:nth-child(2) { grid-area: a; }
.tb-board.lay-star .tb-spot:nth-child(3) { grid-area: b; }
.tb-board.lay-star .tb-spot:nth-child(4) { grid-area: d; }
.tb-board.lay-star .tb-spot:nth-child(5) { grid-area: e; }
.tb-board .tb-card { border-radius: 11px; box-shadow: 4px 4px 0 var(--tone, var(--ink)); }
.tb-panel h3 { font: 400 26px/1.05 var(--big); }
.tb-panel .where { font-weight: 700; font-size: 15px; }
.tb-panel p { margin-top: 6px; font-size: 19px; line-height: 1.4; }
.tb-mini-lay { display: grid; gap: 4px; width: 76px; flex: none; }
.tb-mini-lay i { display: block; aspect-ratio: 5 / 7; background: var(--pink); border: 2px solid var(--ink); border-radius: 4px; }
.tb-mini-lay.three { grid-template-columns: repeat(3, 1fr); }
.tb-mini-lay.star { grid-template-columns: repeat(3, 1fr); width: 66px; }
.tb-mini-lay.star i:nth-child(1) { grid-column: 2; }
.tb-mini-lay.star i:nth-child(5) { grid-column: 2; }
.tb-mini-lay.star i { background: var(--teal); }

/* games */
.tb-gamebar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tb-score { font: 400 22px/1 var(--big); background: var(--paper); border: var(--line); border-radius: 999px; padding: 8px 16px; }
.tb-match { display: grid; grid-template-columns: repeat(3, minmax(0, 118px)); gap: 12px; justify-content: center; }
.tb-match button, .tb-line button, .tb-pick4 button { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 12px; display: block; width: 100%; }
.tb-match .tb-card, .tb-line .tb-card, .tb-pick4 .tb-card { border-radius: 11px; box-shadow: 4px 4px 0 var(--tone, var(--ink)); }
.tb-match .is-done .tb-card { opacity: .5; }
.tb-line { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 128px)); gap: 14px; justify-content: center; }
.tb-line .is-done .tb-card { outline: 4px solid var(--leaf); outline-offset: 2px; opacity: .6; }
.tb-line .tb-card-num { font-size: clamp(18px, 14cqw, 30px); }
.tb-pick4 { display: grid; grid-template-columns: repeat(2, minmax(0, 150px)); gap: 14px; justify-content: center; margin-top: 16px; }
.tb-pick4 .is-right .tb-card { outline: 5px solid var(--leaf); outline-offset: 2px; }
.is-shake { animation: tb-shake .3s; }
.tb-clue { background: var(--paper); border: var(--line); border-radius: 18px; padding: 14px 18px; max-width: 34rem; margin: 0 auto; text-align: center; }
.tb-clue b { font: 400 30px/1.05 var(--big); display: block; }
.tb-clue span { display: block; margin-top: 6px; font-size: 19px; line-height: 1.35; }
.tb-story { display: grid; grid-template-columns: repeat(3, minmax(0, 170px)); gap: 12px; justify-content: center; }
.tb-story div b { display: block; font-size: 15px; text-align: center; margin-bottom: 6px; }
.tb-story div span.w { display: block; text-align: center; font-weight: 700; font-size: 15px; margin-top: 8px; line-height: 1.2; }
.tb-center { display: grid; justify-items: center; gap: 16px; margin-top: 22px; text-align: center; }

/* make and me */
.tb-maker { display: grid; grid-template-columns: 1fr; gap: 22px; }
.tb-maker-card { width: min(34vw, 150px); margin: 0 auto; }
/* 4.0: the maker is a three step wizard so a phone never scrolls through it */
.tb-wiz-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; counter-reset: ws; }
.tb-wiz-steps li { counter-increment: ws; }
.tb-wiz-steps button { appearance: none; width: 100%; min-height: 48px; border: var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; font: 700 16px/1 var(--read); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.tb-wiz-steps button::before { content: counter(ws); font: 400 18px/1 var(--big); color: var(--pink); }
.tb-wiz-steps button.is-done::before { content: "\2713"; color: var(--leaf); font-family: var(--read); font-weight: 700; }
.tb-wiz-steps button[aria-current="step"] { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--pink); }
.tb-wiz-steps button[aria-current="step"]::before { color: var(--sun); }
.tb-wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.tb-wiz-nav .tb-btn { flex: 1; max-width: 220px; }
.tb-wiz-mine { display: inline-block; margin-top: 14px; }
@media (max-width: 759px) { .tb-wiz-nav { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 5; padding: 10px 0 4px; background: linear-gradient(transparent, var(--page) 30%); } .is-words .tb-wiz-nav { position: static; background: none; } }
.tb-field { margin-top: 18px; }
.tb-field > label, .tb-field > b { display: block; font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.tb-input { width: 100%; background: var(--paper); border: var(--line); border-radius: 14px; padding: 13px 14px; font-size: 19px; min-height: 54px; }
.tb-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.tb-opt { appearance: none; border: var(--line); background: var(--paper); border-radius: 14px; padding: 8px 14px; font-weight: 700; font-size: 17px; cursor: pointer; min-height: 50px; min-width: 50px; display: inline-flex; align-items: center; justify-content: center; }
.tb-opt[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--pink); }
.tb-swatch { width: 50px; padding: 0; background: var(--sw); }
.tb-swatch[aria-pressed="true"] { background: var(--sw); box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--ink); }
.tb-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 7px; }
.tb-icons .tb-opt { padding: 4px; aspect-ratio: 1; min-width: 0; }
.tb-icons .tb-opt[aria-pressed="true"] { background: var(--paper); box-shadow: 0 0 0 4px var(--grape); }
.tb-icons .tb-art { width: 100%; height: 100%; }
.tb-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 18px 14px; }
.tb-mine .tb-card { border-radius: 12px; box-shadow: 4px 4px 0 var(--tone); }
.tb-mine .row { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; }
.tb-mine .tb-link { font-size: 15px; padding: 4px 0; min-height: 40px; }
.tb-readers { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tb-readers .tb-opt { flex-direction: column; padding: 10px 8px 12px; gap: 4px; border-radius: 18px; }
.tb-readers .tb-art { width: 72px; height: 72px; }
.tb-readers .tb-opt b { font: 400 20px/1 var(--big); }
.tb-readers .tb-opt small { font-size: 14px; }
.tb-builder { display: grid; grid-template-columns: 1fr; gap: 10px; background: var(--paper); border: var(--line); border-radius: 20px; padding: 16px; margin-top: 16px; }
.tb-builder .face { width: 150px; height: 150px; margin: 0 auto; border: var(--line); border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--page) 55%, #FFFDF5); }
.tb-builder .face .tb-art { width: 100%; height: 100%; display: block; }
.tb-builder .tb-opt { background: var(--paper); }
.tb-builder .tb-opt[aria-pressed="true"] { background: var(--ink); }
.tb-builder .tb-swatch, .tb-builder .tb-swatch[aria-pressed="true"] { background: var(--sw); }
.tb-backs { display: grid; grid-template-columns: repeat(4, minmax(0, 96px)); gap: 12px; }
.tb-backs .tb-opt { padding: 0; border: 0; background: none; border-radius: 12px; display: block; }
.tb-backs .tb-opt[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--page), 0 0 0 8px var(--ink); background: none; }
.tb-backs .tb-card { border-radius: 10px; box-shadow: none; }

/* dialogs */
.tb-scrim { position: fixed; inset: 0; z-index: 8000; background: rgba(29, 27, 76, .55); display: grid; place-items: center; padding: 16px; overflow: auto; }
.tb-dialog { background: var(--page); border: var(--line); border-radius: 22px; padding: 22px; width: min(100%, 440px); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 8px 8px 0 var(--ink); }
.tb-dialog-wide { width: min(100%, 760px); }
.tb-dialog-msg { font-size: 20px; font-weight: 700; }
.tb-dialog-row { display: flex; gap: 14px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.tb-detail { display: grid; grid-template-columns: 1fr; gap: 20px; justify-items: center; }
.tb-detail .tb-card-box { width: min(56vw, 210px); }

/* footer */
.tb-foot { max-width: 1040px; margin: 56px auto 0; padding: 22px 20px 34px; border-top: var(--line); font-size: 16px; }
.tb-foot p + p { margin-top: 8px; }
.tb-foot a { margin-right: 16px; font-weight: 700; display: inline-block; padding: 6px 0; }
.tb-ver { opacity: .7; font-size: 14px; }
.tb-sources li { overflow-wrap: anywhere; }
#tb-printbox { display: none; }

@media (min-width: 760px) {
  .tb-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding-top: 30px; }
  .tb-hero.is-picked { grid-template-columns: 1fr; }
  .tb-hero.is-picked .tb-hero-words { display: none; }
  .tb-reveal { grid-template-columns: 270px minmax(0, 1fr); align-items: start; gap: 44px; justify-items: start; max-width: 880px; margin: 0 auto; }
  .tb-flip { width: 250px; }
  .tb-tiles { grid-template-columns: 1fr 1fr; }
  .tb-suits { grid-template-columns: 1fr 1fr; }
  .tb-steps { grid-template-columns: repeat(4, 1fr); }
  .tb-detail { grid-template-columns: 210px minmax(0, 1fr); align-items: start; justify-items: start; }
  .tb-detail .tb-card-box { width: 210px; }
  .tb-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 22px; }
  .tb-board.lay-three { grid-template-columns: repeat(3, 170px); gap: 18px 26px; }
  .tb-board.lay-star { grid-template-columns: repeat(3, 140px); }
  .tb-match { grid-template-columns: repeat(4, 124px); }
  .tb-pick4 { grid-template-columns: repeat(4, 150px); }
  .tb-maker { grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
  .tb-maker-card { width: 230px; position: sticky; top: 20px; }
  .tb-wiz-steps { max-width: 560px; }
  .tb-builder { grid-template-columns: 170px minmax(0, 1fr); gap: 24px; align-items: start; padding: 22px; }
}
@media (max-width: 759px) {
  body { padding-bottom: 84px; }
  .tb-top { padding: 12px 64px 0 16px; }
  .tb-logo { width: 170px; }
  .tb-tabs { position: fixed; z-index: 7000; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); gap: 2px; justify-content: space-around; }
  .tb-tabs a { flex: 1 1 0; flex-direction: column; gap: 2px; font-size: 13px; padding: 6px 2px; border-radius: 14px; min-height: 56px; justify-content: center; }
  .tb-tabs a svg { width: 26px; height: 26px; }
  .tb-hero.is-picked .tb-hero-words { display: none; }
  .tb-hero-words { text-align: center; }
  .tb-lede { margin-left: auto; margin-right: auto; }
  .tb-story { gap: 8px; }
  .tb-backs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .tb-deck .tb-card-box, .tb-flip-in, .tb-spot.is-up .tb-card-box, .is-shake { animation: none !important; transition: none !important; } }
@media print {
  .tb-top, .tb-foot, .rui-gear, .no-print { display: none !important; }
  html, body { background: #fff !important; background-image: none !important; padding: 0; }
  body.tb-print-own > main { display: none !important; }
  #tb-printbox { display: block; }
}
