/* Home page: ported from the approved mock-up. Scoped under .hm so it cannot clash with the shared styles. */
.hm{--tile:#fbfbfd;--tile-face:#fff0b3;--wild:#ff3131;--paper:#fff;--tan:#e2cf9f;--ink:#000;--gutter:16px;--display:"Fredoka","Arial Rounded MT Bold","Nunito",system-ui,sans-serif;--body:"Nunito",system-ui,-apple-system,"Segoe UI",sans-serif;font-family:var(--body);font-weight:700;font-size:16px;line-height:1.4;color:#000}
.hm{max-width:640px;margin:0 auto;padding:28px var(--gutter) 56px;display:flex;flex-direction:column;gap:12px}
.hm .box{display:flex;align-items:center;gap:8px;background:var(--paper);border:5px solid var(--ink);border-radius:30px;padding:7px 7px 7px 20px}
.hm .box input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-family:var(--display);font-weight:600;font-size:clamp(22px,6vw,30px);letter-spacing:.06em;text-transform:uppercase;padding:8px 0;color:#000}
.hm .box input::placeholder{color:#858a94;letter-spacing:.06em;text-transform:none;font-weight:600;opacity:1}
.hm *{box-sizing:border-box}
.hm button,.hm input,.hm select{font:inherit;color:#000}
.hm .x{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;border:3px solid var(--ink);background:var(--tan);color:var(--ink);padding:0;cursor:pointer}
.hm .x svg{display:block}
.hm .x:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
.hm .optrow{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:4px}
.hm .optrow .chip{margin-top:0}
.hm .dict{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;min-width:0;max-width:100%;background-color:var(--tile);color:var(--ink);border:3px solid var(--ink);border-radius:999px;padding:5px 26px 5px 11px;font-family:var(--display);font-weight:600;font-size:14px;cursor:pointer}
.hm .go{flex:none;background:#ff6b6b;color:var(--ink);border:4px solid var(--ink);border-radius:22px;font-family:var(--display);font-weight:700;font-size:clamp(20px,5.5vw,26px);padding:10px 22px;cursor:pointer;transition:transform .08s}
.hm .go:active{transform:translateY(2px)}
.hm .go:focus-visible,.hm .chip:focus-visible,.hm .more:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.hm .hint{margin:0;padding-left:6px;font-family:var(--display);font-weight:600;font-size:17px}
.hm .hint i{font-style:normal;color:var(--wild);font-weight:700}
.hm .chip{background:var(--tile);border:3px solid var(--ink);border-radius:999px;padding:5px 14px;font-family:var(--display);font-weight:600;font-size:15px;cursor:pointer}
.hm .chip{align-self:flex-start;margin-top:4px}
.hm .chip[aria-expanded="true"]{background:var(--ink);color:var(--tile)}
.hm .chip[aria-expanded="true"] .car{display:inline-block;transform:rotate(180deg)}
.hm .opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:10px}
.hm .opt{display:flex;flex-direction:column;gap:3px;font-family:var(--display);font-weight:600;font-size:14px}
.hm .opt.chk{flex-direction:row;align-items:center;gap:10px;grid-column:1/-1;font-size:16px;cursor:pointer}
.hm .opt .chk-box{width:24px;height:24px;accent-color:#000;flex:none;padding:0}
.hm .opt input{min-width:0;background:var(--paper);border:3px solid var(--ink);border-radius:14px;padding:7px 12px;font-family:var(--display);font-weight:600;font-size:18px;text-transform:uppercase;letter-spacing:.05em}
.hm .opt select{min-width:0;color:var(--ink);background:var(--paper);border:3px solid var(--ink);border-radius:14px;padding:7px 12px;font-family:var(--display);font-weight:600;font-size:18px;cursor:pointer}
.hm .summary{margin:34px 0 6px;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;font-family:var(--display);font-weight:600;font-size:18px}
.hm .summary strong{font-weight:700}
.hm .group{display:flex;flex-direction:column;gap:14px;margin-top:22px}
.hm .gh{display:flex;align-items:center;gap:10px;font-family:var(--display);font-weight:700;font-size:18px}
.hm .gh span{background:var(--ink);color:var(--tile);border-radius:999px;padding:3px 14px}
.hm .gh em{font-style:normal;font-weight:600;font-size:15px;opacity:.75}
.hm .words{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.hm .w{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.hm .tiles{--tw:min(clamp(34px,9.4vw,44px),calc((100vw - 40px - (var(--n) - 1)*4px)/var(--n)));display:flex;gap:4px}
.hm .t{position:relative;width:var(--tw);height:var(--tw);display:grid;place-items:center;background:var(--tile-face);border:2.5px solid var(--ink);border-radius:8px;box-shadow:0 3px 0 var(--ink);font-family:var(--display);font-weight:700;font-size:calc(var(--tw)*.52);line-height:1;text-transform:uppercase;padding:0 .3em .2em 0}
.hm .t sub{position:absolute;right:3px;bottom:1px;font-size:calc(var(--tw)*.34);font-weight:800;line-height:1;vertical-align:baseline}
.hm .t sub.s2{font-size:calc(var(--tw)*.27);letter-spacing:-.04em;right:2px}
.hm .t.blank sub{color:#fff}
.hm .t.blank{background-color:#ff3131!important;color:#fff!important}
.hm .pts{font-family:var(--display);font-weight:700;font-size:15px;background:var(--paper);border:2.5px solid var(--ink);border-radius:999px;padding:0 10px;font-variant-numeric:tabular-nums}
.hm .more{align-self:flex-start;margin-top:2px;background:transparent;border:3px solid var(--ink);border-radius:999px;padding:5px 16px;font-family:var(--display);font-weight:600;font-size:15px;cursor:pointer}
.hm .empty{margin:24px 0 0;font-family:var(--display);font-weight:600;font-size:19px}
.hm .fine{margin:30px 0 0;font-size:13px;font-weight:700;opacity:.7}
@media (prefers-reduced-motion:reduce){.hm .go{transition:none}}
@media (max-width:380px){.hm .box{padding-left:12px}.hm .go{padding:9px 16px}}
.hm .about{margin-top:40px;display:flex;flex-direction:column;gap:10px;font-family:var(--display);font-weight:500;font-size:16px;line-height:1.55}
.hm .about h2{margin:0;font-weight:700;font-size:24px}
.hm .about h3{margin:8px 0 0;font-weight:700;font-size:19px}
.hm .about p{margin:0;max-width:60ch}
.hm .about b{color:var(--wild)}
.hm .w{cursor:pointer}
.hm .look{flex:0 0 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;background:var(--paper);border:3px solid var(--ink);border-radius:18px;padding:10px 12px;font-family:var(--display);font-weight:600;font-size:15px;cursor:default}
.hm .look span{flex:0 0 100%}
.hm .look b{text-transform:uppercase;letter-spacing:.04em}
.hm .look a{color:var(--ink);background:var(--tile-face);border:2.5px solid var(--ink);border-radius:999px;padding:3px 12px;text-decoration:none;font-weight:700}
.hm .box{padding-left:16px}
.hm .foot{margin-top:28px;border-top:6px solid var(--ink,#000);padding:22px 16px max(26px,env(safe-area-inset-bottom,0px));background:rgba(0,0,0,.06);font-family:"Fredoka",ui-rounded,system-ui,sans-serif;text-align:center;display:flex;flex-direction:column;gap:14px;align-items:center}
.hm .foot nav{display:flex;flex-wrap:wrap;gap:8px 18px;justify-content:center}
.hm .foot a{color:#000;font-weight:600;font-size:16px;text-underline-offset:3px}
.hm .foot .fl{font-weight:700;font-size:18px;display:flex;align-items:center;gap:8px}
.hm .reset{margin-bottom:6px;background:#000;color:#fff;border:3px solid #000;border-radius:999px;padding:5px 14px;font-family:var(--display);font-weight:600;font-size:15px;cursor:pointer}
.hm .mag{flex:none;width:26px;height:26px}
.hm .box{padding-left:16px}
.hm .about h3{margin:8px 0 0}
.hm .opt .chk-box{width:24px;height:24px;accent-color:#000;flex:none;padding:0}

.hm{width:100%;min-width:0;padding-bottom:56px}
.hm .chip,.hm .more,.hm .reset,.hm .go,.hm .opt,.hm .opt input,.hm .opt select{text-transform:none}
.hm .opt input{text-transform:uppercase}
.hm input{caret-color:auto}
.hm .chip{align-self:flex-start;margin-top:4px}
.hm .optrow .chip{margin-top:0}
.hm [hidden]{display:none!important}
.hm .vh{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Home hub: stats, games, tools, facts, lists */
.hub{--ink:#000;--paper:#fff;--tan:#e2cf9f;max-width:1040px;margin:8px auto 0;padding:0 16px;display:flex;flex-direction:column;gap:44px;font-family:"Fredoka","Arial Rounded MT Bold",system-ui,sans-serif;color:#000}
.hub *{box-sizing:border-box}
.hub h2{margin:0;font-weight:700;font-size:clamp(24px,4vw,32px);line-height:1.15;text-wrap:balance}
.hub .hb-sub{margin:6px 0 0;font-weight:500;font-size:17px}
.hub .hb-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 16px}
.hub .hb-head a{color:#000;font-weight:600;font-size:16px;text-underline-offset:3px}
.hub .hb-sec{display:flex;flex-direction:column;gap:16px;min-width:0}
.hub .hb-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.hub .hb-stats div{background:#fff;border:4px solid #000;border-radius:20px;box-shadow:0 5px 0 #000;padding:14px 8px;text-align:center;display:flex;flex-direction:column;gap:2px}
.hub .hb-stats b{font-size:clamp(24px,5vw,38px);font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.hub .hb-stats span{font-weight:600;font-size:clamp(13px,2.6vw,16px)}
.hub .hb-chips{display:flex;flex-wrap:wrap;gap:10px}
.hub .hb-chips button,.hub .hb-rollrow button{background:#fff0b3;border:3px solid #000;border-radius:12px;box-shadow:0 4px 0 #000;padding:8px 16px;font-family:inherit;font-weight:700;font-size:20px;letter-spacing:.12em;color:#000;cursor:pointer;transition:transform .08s,box-shadow .08s}
.hub .hb-chips button:hover,.hub .hb-rollrow button:hover{transform:translateY(-2px);box-shadow:0 6px 0 #000}
.hub .hb-chips button:active,.hub .hb-rollrow button:active{transform:translateY(3px);box-shadow:0 1px 0 #000}
.hub .hb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:16px}
.hub .hb-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;background:var(--bg,#fff);border:4px solid #000;border-radius:22px;box-shadow:0 6px 0 #000;padding:16px 16px 18px;color:#000;text-decoration:none;transition:transform .1s,box-shadow .1s}
.hub .hb-card:hover{transform:translateY(-3px);box-shadow:0 9px 0 #000}
.hub .hb-card:active{transform:translateY(3px);box-shadow:0 2px 0 #000}
.hub .hb-card:focus-visible,.hub .hb-links a:focus-visible,.hub .hb-chips button:focus-visible{outline:3px solid #000;outline-offset:3px}
.hub .hb-card b{font-weight:700;font-size:21px;line-height:1.2}
.hub .hb-card>span:not(.hb-ic){font-weight:500;font-size:15.5px;line-height:1.4}
.hub .hb-card em{font-style:normal;font-weight:600;font-size:13px;background:#fff;border:2.5px solid #000;border-radius:999px;padding:1px 10px;margin-top:auto}
.hub .hb-ic{display:grid;place-items:center;min-width:54px;height:54px;padding:0 10px;margin-bottom:4px;background:#fff;border:3.5px solid #000;border-radius:14px;box-shadow:0 3px 0 #000;font-weight:700;font-size:20px;letter-spacing:.02em;transform:rotate(-4deg)}
.hub .hb-card:nth-child(even) .hb-ic{transform:rotate(3deg)}
.hub .c-teal{--bg:#bfe6ee}.hub .c-yellow{--bg:#fff0b3}.hub .c-pink{--bg:#ffc9c9}.hub .c-lilac{--bg:#dcd0f7}.hub .c-green{--bg:#c9eccb}.hub .c-orange{--bg:#ffd9a8}
.hub .hb-more{--bg:#ff6b6b}
.hub .hb-facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:16px}
.hub .hb-fact{display:flex;gap:14px;align-items:center;background:#fff;border:4px solid #000;border-radius:22px;padding:14px 16px;min-width:0}
.hub .hb-fact b{flex:none;min-width:64px;text-align:center;background:#fff0b3;border:3px solid #000;border-radius:14px;padding:8px 6px;font-weight:700;font-size:24px;line-height:1;font-variant-numeric:tabular-nums}
.hub .hb-fact:nth-child(4n+2) b{background:#bfe6ee}.hub .hb-fact:nth-child(4n+3) b{background:#ffc9c9}.hub .hb-fact:nth-child(4n) b{background:#c9eccb}
.hub .hb-fact span{font-weight:500;font-size:15.5px;line-height:1.4;min-width:0;overflow-wrap:anywhere}
.hub .hb-fact i{font-style:normal;font-weight:700}
.hub .hb-links{display:flex;flex-wrap:wrap;gap:10px}
.hub .hb-links a{background:#fff;color:#000;border:3px solid #000;border-radius:999px;padding:6px 16px;font-weight:600;font-size:16px;text-decoration:none;transition:background .1s}
.hub .hb-links a:hover{background:#fff0b3}
@media (max-width:560px){.hub{gap:36px}.hub .hb-stats{grid-template-columns:repeat(2,1fr)}}
@media (prefers-reduced-motion:reduce){.hub .hb-card,.hub .hb-chips button{transition:none}}
.hm-after{padding-top:0}
.hub .hb-me{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px;align-items:stretch}
.hub .hb-mine,.hub .hb-cal{background:#fff;border:4px solid #000;border-radius:22px;box-shadow:0 6px 0 #000;padding:18px;min-width:0}
.hub .hb-mine{display:flex;flex-direction:column;gap:14px;background:#bfe6ee}
.hub .hb-hi{margin:0;font-weight:600;font-size:17px;line-height:1.4}
.hub .hb-nums{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.hub .hb-nums li{background:#fff;border:3px solid #000;border-radius:16px;padding:10px 6px;text-align:center;display:flex;flex-direction:column;gap:2px;min-width:0}
.hub .hb-nums b{font-weight:700;font-size:28px;line-height:1;font-variant-numeric:tabular-nums}
.hub .hb-nums span{font-weight:600;font-size:13px;line-height:1.25}
.hub .hb-go{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.hub .hb-go p{margin:0;flex:0 0 100%;font-weight:700;font-size:15px}
.hub .hb-go a{background:#fff0b3;color:#000;border:3px solid #000;border-radius:999px;padding:4px 14px;font-weight:700;font-size:15px;text-decoration:none}
.hub .hb-go a:hover{background:#fff}
.hub .cal-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.hub .cal-head b{font-weight:700;font-size:19px}
.hub .cal-head button{width:36px;height:36px;border:3px solid #000;border-radius:50%;background:#fff0b3;color:#000;font-family:inherit;font-weight:700;font-size:20px;line-height:1;cursor:pointer;padding:0}
.hub .cal-head button:disabled{opacity:.35;cursor:default}
.hub .cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;text-align:center}
.hub .cal-grid span{aspect-ratio:1;display:grid;place-items:center;border-radius:10px;font-weight:600;font-size:14px;font-variant-numeric:tabular-nums;border:2.5px solid transparent}
.hub .cal-grid .dow{aspect-ratio:auto;font-weight:700;font-size:12px;opacity:.6}
.hub .cal-grid .on{background:#3fc1d4;border-color:#000;font-weight:700}
.hub .cal-grid .today{border-color:#000;border-style:dashed}
.hub .cal-grid .on.today{border-style:solid;box-shadow:0 2px 0 #000}
.hub .cal-foot{margin:12px 0 0;font-weight:600;font-size:14.5px;text-align:center}
.hub .hb-cal button:focus-visible,.hub .hb-go a:focus-visible,.hub .hb-head a:focus-visible{outline:3px solid #000;outline-offset:3px}
@media (max-width:700px){.hub .hb-me{grid-template-columns:1fr}}
.home-extra{max-width:none;padding:0 0 56px}
.home-extra>.block{max-width:640px;margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px}
.home-extra>.hm-after{max-width:640px;margin:0 auto;padding:40px 16px 0}
.hub{margin-top:28px}

/* ---- Comic treatment ---- */
.hub .hb-sec>h2,.hub .hb-head h2{display:inline-block;align-self:flex-start;background:#fff0b3;border:4px solid #000;border-radius:8px;padding:3px 16px 5px;box-shadow:5px 5px 0 #000;transform:rotate(-1.5deg);position:relative}
.hub .hb-sec:nth-of-type(even)>h2,.hub .hb-sec:nth-of-type(even) .hb-head h2{background:#bfe6ee;transform:rotate(1.2deg)}
.hub .hb-head{align-items:center}
.hub .hb-card{background:linear-gradient(135deg,var(--bg) 40%,transparent 100%),radial-gradient(rgba(0,0,0,.2) 1.7px,transparent 2px) 0 0/13px 13px,var(--bg)}
.hub .hb-more{background:linear-gradient(135deg,var(--bg) 40%,transparent 100%),radial-gradient(rgba(0,0,0,.22) 1.7px,transparent 2px) 0 0/13px 13px,var(--bg)}
.hub .hb-card[data-pop]::after{content:attr(data-pop);position:absolute;top:-17px;right:-12px;width:62px;height:62px;display:grid;place-items:center;background:#ffd23f;color:#000;font-weight:700;font-size:15px;letter-spacing:-.02em;transform:rotate(14deg);clip-path:polygon(100.0% 50.0%,85.1% 64.5%,85.4% 85.4%,64.5% 85.1%,50.0% 100.0%,35.5% 85.1%,14.6% 85.4%,14.9% 64.5%,0.0% 50.0%,14.9% 35.5%,14.6% 14.6%,35.5% 14.9%,50.0% 0.0%,64.5% 14.9%,85.4% 14.6%,85.1% 35.5%);animation:hb-wob 2.6s ease-in-out infinite;pointer-events:none}
.hub .hb-more[data-pop]::after{background:#fff}
.hub .hb-mine{background:linear-gradient(135deg,#bfe6ee 45%,transparent 100%),radial-gradient(rgba(0,0,0,.18) 1.7px,transparent 2px) 0 0/13px 13px,#bfe6ee}
.hub .hb-hi{position:relative;background:#fff;border:3px solid #000;border-radius:18px;padding:10px 14px}
.hub .hb-hi::before,.hub .hb-hi::after{content:"";position:absolute;left:26px;border-style:solid;border-color:#000 transparent transparent;border-width:14px 10px 0}
.hub .hb-hi::before{bottom:-17px}
.hub .hb-hi::after{bottom:-12px;border-color:#fff transparent transparent;border-width:12px 8px 0;left:28px}
.hub .hb-mine{gap:20px}
.hub .hb-chips button{animation:hb-bob 2.6s ease-in-out infinite}
.hub .hb-chips button:nth-child(2n){animation-delay:-.7s;transform-origin:50% 100%}
.hub .hb-chips button:nth-child(3n){animation-delay:-1.4s}
.hub .hb-chips button:hover{animation:none}
.hub .hb-card:hover .hb-ic{animation:hb-wig .5s ease-in-out}
.hub .hb-stats div:nth-child(odd){transform:rotate(-1.5deg)}.hub .hb-stats div:nth-child(even){transform:rotate(1.5deg)}
.hub .hb-fact:nth-child(odd){transform:rotate(-.6deg)}.hub .hb-fact:nth-child(even){transform:rotate(.6deg)}
.hub .hb-fact b{transform:rotate(-3deg);box-shadow:0 3px 0 #000}
.hub .cal-grid .today{animation:hb-pulse 1.8s ease-in-out infinite}
@keyframes hb-bob{0%,100%{translate:0 0}50%{translate:0 -5px}}
@keyframes hb-wob{0%,100%{rotate:0deg;scale:1}50%{rotate:6deg;scale:1.08}}
@keyframes hb-wig{0%,100%{rotate:0deg}25%{rotate:-10deg}75%{rotate:10deg}}
@keyframes hb-pulse{0%,100%{background:transparent}50%{background:#fff0b3}}
.hub.pop .hb-card:not(.in),.hub.pop .hb-fact:not(.in),.hub.pop .hb-stats div:not(.in),.hub.pop .hb-mine:not(.in),.hub.pop .hb-cal:not(.in){opacity:0;translate:0 26px;scale:.88}
.hub.pop .hb-card.in,.hub.pop .hb-fact.in,.hub.pop .hb-stats div.in,.hub.pop .hb-mine.in,.hub.pop .hb-cal.in{transition:opacity .35s ease var(--d,0ms),translate .55s cubic-bezier(.3,1.7,.5,1) var(--d,0ms),scale .55s cubic-bezier(.3,1.7,.5,1) var(--d,0ms)}
@media (prefers-reduced-motion:reduce){.hub *,.hub *::after{animation:none!important;transition:none!important}.hub.pop *{opacity:1!important;translate:none!important;scale:none!important}}
.hub .hb-nums{grid-template-columns:repeat(auto-fit,minmax(88px,1fr))}
.hub .cal-grid .on.today{animation:none;background:#3fc1d4}

/* Hero band: the teal header carries on behind the search box */
body[data-page="home"] .site-header{--hh:264px;border-bottom:0;background-image:repeating-conic-gradient(from 0deg at 50% calc(var(--hh)*1.5),#1E9FB8 0 7deg,#0099B5 7deg 14deg)}
@media (max-width:480px){body[data-page="home"] .site-header{--hh:210px}}
.hero-band{position:relative;border-bottom:10px solid #000;background-color:#0099B5;background-image:repeating-conic-gradient(from 0deg at 50% calc(var(--hh,264px)*.5),#1E9FB8 0 7deg,#0099B5 7deg 14deg)}
body[data-page="home"]{--hh:264px}
@media (max-width:480px){body[data-page="home"]{--hh:210px}}
.hero-band::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle,rgba(0,0,0,.28) 28%,transparent 31%) 0 0/12px 12px;-webkit-mask-image:radial-gradient(ellipse 60% 140% at 50% 50%,transparent 40%,#000 90%);mask-image:radial-gradient(ellipse 60% 140% at 50% 50%,transparent 40%,#000 90%)}
.hero-band .hm-top{position:relative;padding-top:6px;padding-bottom:34px}
.hero-band .empty,.hero-band .hint{text-shadow:none}
.hero-band .box{box-shadow:0 5px 0 rgba(0,0,0,.35)}
.home-res #out:has(.summary){background:#fff;border:4px solid #000;border-radius:24px;box-shadow:0 6px 0 #000;padding:6px 18px 22px;margin-top:14px}
.home-res #out .summary{margin-top:14px}
.home-res #out .empty{margin-top:14px}
.hm .look a{padding:8px 16px}

.hub .hb-me.out{grid-template-columns:1fr}
.hub .hb-lock{display:flex;flex-direction:column;align-items:flex-start;gap:10px;background:linear-gradient(135deg,#dcd0f7 40%,transparent 100%),radial-gradient(rgba(0,0,0,.2) 1.7px,transparent 2px) 0 0/13px 13px,#dcd0f7;border:4px solid #000;border-radius:22px;box-shadow:0 6px 0 #000;padding:20px}
.hub .hb-lock b{font-weight:700;font-size:22px}
.hub .hb-lock p{margin:0;font-weight:500;font-size:16.5px;line-height:1.45;max-width:52ch}
.hub .hb-lockbtns{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
.hub .hb-btn{background:#ff6b6b;color:#000;border:3.5px solid #000;border-radius:999px;box-shadow:0 4px 0 #000;padding:9px 22px;font-weight:700;font-size:17px;text-decoration:none;transition:transform .08s,box-shadow .08s}
.hub .hb-btn.alt{background:#fff}
.hub .hb-btn:hover{transform:translateY(-2px);box-shadow:0 6px 0 #000}
.hub .hb-btn:active{transform:translateY(3px);box-shadow:0 1px 0 #000}
.hub .hb-btn:focus-visible{outline:3px solid #000;outline-offset:3px}
.hub [hidden]{display:none!important}

.hub .hb-rollrow .hb-roll{display:inline-flex;align-items:center;gap:8px;background:#ff6b6b;letter-spacing:0;font-size:17px;animation:none}
.hub .hb-roll svg{flex:none}
.hub .hb-roll.spin svg{animation:hb-spin .6s cubic-bezier(.3,1.4,.5,1)}
@keyframes hb-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.hub .hb-roll.spin svg{animation:none}}

/* Live tiles and the FREE badge */
.hub .hb-stats{align-items:stretch}
.hub .hb-stats>div,.hub .hb-stats>a{justify-content:center}
.hub .hb-otd{background:#fff;border:4px solid #000;border-radius:20px;box-shadow:0 5px 0 #000;padding:14px 12px;text-align:center;display:flex;flex-direction:column;gap:2px;color:#000;text-decoration:none;transition:transform .1s,box-shadow .1s}
.hub .hb-stats .hb-otd{transform:rotate(1.5deg)}
.hub .hb-otd:hover{box-shadow:0 8px 0 #000}
.hub .hb-otd:focus-visible{outline:3px solid #000;outline-offset:3px}
.hub .hb-stats b{font-size:clamp(24px,5vw,38px);font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.hub .hb-stats span{font-weight:600;font-size:clamp(13px,2.6vw,16px)}
.hub .hb-stats em{font-style:normal;font-weight:700;font-size:11px;letter-spacing:.06em;text-transform:uppercase;opacity:.65;margin-top:4px}
.hub .hb-otd.live span{font-size:13px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.hub .hb-wx.live{background:linear-gradient(135deg,#bfe6ee 45%,#fff 100%)}
.hub .hb-wx.live b{font-size:clamp(26px,5vw,34px)}
.hm .optrow{justify-content:space-between}
.free-badge{display:inline-grid;place-items:center;width:66px;height:66px;margin:-14px 6px -14px 0;background:#ffd23f;color:#000;font-family:var(--display,"Fredoka",system-ui,sans-serif);font-weight:700;font-size:16px;letter-spacing:-.02em;transform:rotate(-10deg);clip-path:polygon(100% 50%,87.8% 57.5%,92.7% 70.7%,79% 74.1%,76.5% 88.3%,64.4% 83.6%,57.5% 96.1%,50% 87.2%,41.7% 96.1%,35.6% 83.6%,23.5% 88.3%,21% 74.1%,7.3% 70.7%,12.2% 57.5%,0% 50%,12.2% 42.5%,7.3% 29.3%,21% 25.9%,23.5% 11.7%,35.6% 16.4%,42.5% 3.9%,50% 12.8%,58.3% 3.9%,64.4% 16.4%,76.5% 11.7%,79% 25.9%,92.7% 29.3%,87.8% 42.5%);animation:hb-wob 2.6s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){.free-badge{animation:none}}

/* News puzzle tile */
.hub button.hb-otd{appearance:none;-webkit-appearance:none;font:inherit;width:100%;cursor:default;align-items:center;justify-content:center;min-height:128px}
.hub button.hb-otd.live{cursor:pointer;background:#fff0b3}
.hub button.hb-otd.live .nt{font-size:13px;font-weight:600;line-height:1.35;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-align:center}
.hub button.hb-otd.live em{margin:0 0 4px}
.hub .hb-otd mark{background:#fff;border:2px solid #000;border-radius:6px;padding:0 4px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;font-size:12px;color:#000}
.hub .hb-otd mark.ok{background:#c9eccb;text-transform:none;letter-spacing:0;font-size:inherit}
.hub .hb-otd small{margin-top:6px;font-weight:700;font-size:11px;opacity:.65}
.hub .hb-otd{transition:opacity .18s,transform .1s,box-shadow .1s}
.hub .hb-otd.fade{opacity:0}
.hub button.hb-otd:disabled{opacity:1}
@media (prefers-reduced-motion:reduce){.hub .hb-otd{transition:none}}

/* Tile titles */
.hub .hb-stats [data-t]{position:relative;padding-top:30px}
.hub .hb-stats [data-t]::before{content:attr(data-t);position:absolute;top:8px;left:0;right:0;font-weight:700;font-size:11px;letter-spacing:.09em;text-transform:uppercase;opacity:.7}
.hub button.hb-otd[data-t]{min-height:150px;padding-top:30px}

/* Played games */
.played{position:relative}
.played::after{content:"\2713  Played";position:absolute;top:-10px;right:-6px;background:#2bbf6a;color:#000;border:3px solid #000;border-radius:999px;padding:1px 10px;font-weight:700;font-size:12px;letter-spacing:.03em;transform:rotate(4deg);box-shadow:0 2px 0 #000;z-index:2}
.gm .tool.played,.hub .hb-card.played{outline:4px solid #2bbf6a;outline-offset:2px}

/* Tile headings sit outside the card, as comic tabs on top */
.hub .hb-stats{row-gap:40px;margin-top:34px}
.hub .hb-stats [data-t],.hub button.hb-otd[data-t]{padding-top:14px}
.hub .hb-stats [data-t]::before{top:auto;bottom:calc(100% - 2px);left:50%;right:auto;transform:translateX(-50%);white-space:nowrap;opacity:1;background:#ffd23f;color:#000;border:3px solid #000;border-bottom:0;border-radius:10px 10px 0 0;padding:3px 14px 2px;font-size:12px;line-height:1.2}
.hub .hb-stats [data-t]{overflow:visible}
/* Tab gets its full outline; news tile has room for its text */
.hub .hb-stats [data-t]::before{border-bottom:3px solid #000;border-radius:10px;bottom:calc(100% - 4px);box-shadow:0 2px 0 #000}
.hub button.hb-otd[data-t]{min-height:190px;padding:20px 12px 14px;justify-content:center}

/* FREE badge in the sign-in card */
.hub .hb-lock{position:relative}
.hub .hb-lock .lock-free{position:absolute;right:9%;top:50%;width:132px;height:132px;margin:0;font-size:32px;translate:0 -50%}
@media (max-width:640px){.hub .hb-lock .lock-free{width:84px;height:84px;font-size:20px;right:12px;top:14px;translate:none}.hub .hb-lock b{padding-right:84px}}
.hub .hb-stats>div[data-t]{transition:none}.hub .hb-stats>div[data-t] b,.hub .hb-stats>div[data-t] span{transition:opacity .22s}.hub .hb-stats>div.fade b,.hub .hb-stats>div.fade span{opacity:0}

.hub .hb-rollrow{margin-top:14px}

/* Calendar days are buttons; diary panel */
.hub .cal-grid button.d,.hub .cal-grid button[data-d]{aspect-ratio:1;display:grid;place-items:center;border-radius:10px;font-family:inherit;font-weight:600;font-size:14px;font-variant-numeric:tabular-nums;border:2.5px solid transparent;background:transparent;color:#000;padding:0;cursor:pointer;position:relative}
.hub .cal-grid button[data-d]:hover:not(:disabled){border-color:#000}
.hub .cal-grid button[data-d]:disabled{opacity:.35;cursor:default}
.hub .cal-grid button.on{background:#3fc1d4;border-color:#000;font-weight:700}
.hub .cal-grid button.today{border-color:#000;border-style:dashed}
.hub .cal-grid button.on.today{border-style:solid;box-shadow:0 2px 0 #000;animation:none}
.hub .cal-grid button.sel{outline:3px solid #000;outline-offset:1px;background:#ffd23f}
.hub .cal-grid button.sel.on{background:#ffd23f}
.hub .cal-grid button.note::after{content:"";position:absolute;right:4px;top:4px;width:7px;height:7px;border-radius:50%;background:#ff4d4d;border:1.5px solid #000}
.hub .hb-diary{background:#fff;border:3px solid #000;border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:8px;margin-top:auto}
.hub .dy-t{margin:0;font-size:15px}
.hub .hb-diary textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:84px;border:3px solid #000;border-radius:12px;padding:10px;font-weight:600;font-size:15px;line-height:1.4;font-family:inherit;background:#fffbe6;color:#000}
.hub .hb-diary textarea:focus{outline:3px solid #3fc1d4;outline-offset:1px}
.hub .dy-f{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600}
.hub .dy-f #dy-c{opacity:.6;margin-left:auto}
.hub .dy-clear{border:2.5px solid #000;border-radius:999px;background:#fff;font-family:inherit;font-weight:700;font-size:12.5px;padding:2px 10px;cursor:pointer;color:#000}
.hub .dy-r{display:flex;flex-direction:column;gap:6px}
.hub .dy-rt{margin:2px 0 0;font-weight:700;font-size:12px;letter-spacing:.06em;text-transform:uppercase;opacity:.65}
.hub .dy-r button{display:flex;gap:10px;align-items:baseline;text-align:left;border:2.5px solid #000;border-radius:10px;background:#fff0b3;font-family:inherit;color:#000;padding:5px 10px;cursor:pointer;min-width:0}
.hub .dy-r button b{flex:none;font-size:13px}.hub .dy-r button span{font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.hub .cal-grid button.sel{animation:none}

/* Journal hint beside "Your progress" */
.hub .hb-dyhint{display:inline-flex;align-items:center;gap:8px;background:#fff0b3;border:3px solid #000;border-radius:999px;box-shadow:0 3px 0 #000;padding:6px 16px;font-family:inherit;font-weight:700;font-size:15px;color:#000;cursor:pointer;transform:rotate(-1.5deg);margin:0 auto}
.hub .hb-dyhint:hover{background:#ffd23f}
.hub .hb-dyhint:active{transform:translateY(2px) rotate(-1.5deg);box-shadow:0 1px 0 #000}
.hub .hb-dyhint:focus-visible{outline:3px solid #000;outline-offset:3px}
.hub .hb-dyhint[hidden]{display:none!important}
@media (max-width:760px){.hub .hb-head:has(.hb-dyhint:not([hidden])){flex-wrap:wrap}.hub .hb-dyhint{order:3;flex:0 0 100%;justify-content:center;margin:4px 0 0;font-size:14px}}

/* Daily Journal label with a hand-drawn arrow */
.hub .hb-dyhint{background:transparent;border:0;box-shadow:none;padding:0;gap:6px;transform:none;margin:0 auto}
.hub .hb-dyhint:hover{background:transparent}
.hub .hb-dyhint:active{transform:none;box-shadow:none}
.hub .hb-dyhint .dh-t{display:inline-block;background:#ffd23f;border:3px solid #000;border-radius:12px;box-shadow:0 4px 0 #000;padding:3px 16px 5px;font-family:var(--display,"Fredoka",system-ui,sans-serif);font-weight:700;font-size:22px;transform:rotate(-3deg);transition:transform .1s,box-shadow .1s}
.hub .hb-dyhint:hover .dh-t{transform:rotate(-3deg) translateY(-2px);box-shadow:0 6px 0 #000}
.hub .hb-dyhint .dh-arrow{flex:none;margin-top:18px;animation:hb-nudge 1.4s ease-in-out infinite}
@keyframes hb-nudge{0%,100%{translate:0 0}50%{translate:5px 5px}}
@media (prefers-reduced-motion:reduce){.hub .hb-dyhint .dh-arrow{animation:none}}
@media (max-width:760px){.hub .hb-dyhint{flex:0 0 100%;margin:0}.hub .hb-dyhint .dh-t{font-size:20px}.hub .hb-dyhint .dh-arrow{margin:6px 0 0 -4px;rotate:80deg;animation-name:hb-nudge-d}}

@keyframes hb-nudge-d{0%,100%{translate:0 0}50%{translate:0 6px}}

/* Options float over the page so nothing below them moves */
.hm .optrow{position:relative}
.hero-band .opts{position:absolute;left:0;right:0;top:100%;z-index:30;margin-top:8px;padding:14px;background:#fff;border:4px solid #000;border-radius:22px;box-shadow:0 6px 0 #000}
.hero-band .opts[hidden]{display:none}

/* Sign in / Your account: comic button */
.hub #hb-acc{display:inline-block;background:#ffd23f;border:3px solid #000;border-radius:12px;box-shadow:0 4px 0 #000;padding:4px 18px 6px;font-family:var(--display,"Fredoka",system-ui,sans-serif);font-weight:700;font-size:20px;text-decoration:none;transform:rotate(2deg);transition:transform .1s,box-shadow .1s}
.hub #hb-acc:hover{transform:rotate(2deg) translateY(-2px);box-shadow:0 6px 0 #000;background:#ffe27a}
.hub #hb-acc:active{transform:rotate(2deg) translateY(2px);box-shadow:0 1px 0 #000}

.hm.home-res{padding-top:22px;padding-bottom:0;min-height:0}
.home-res #out:has(.summary){margin-top:0}
.home-res #out .empty{margin-top:0;text-align:center}

/* Doodle between "Your progress" and Sign in */
.hub .hb-doodle{flex:1;display:flex;justify-content:flex-end;align-items:center;min-width:0;padding:0 14px;overflow:hidden}
.hub .hb-doodle[hidden]{display:none!important}
.hub .hb-doodle svg{width:100%;max-width:300px;height:auto;rotate:-1.5deg}
.hub .hb-doodle .dd-s{transform-box:fill-box;transform-origin:center;animation:hb-twinkle 2.4s ease-in-out infinite}
.hub .hb-doodle .dd-s+.dd-s{animation-delay:1.2s}
@keyframes hb-twinkle{0%,100%{scale:1;rotate:0deg}50%{scale:1.25;rotate:15deg}}
@media (prefers-reduced-motion:reduce){.hub .hb-doodle .dd-s{animation:none}}
@media (max-width:560px){.hub .hb-doodle{display:none}}
.hub .hb-doodle .dd-a{animation:hb-nudge-x 1.4s ease-in-out infinite}
@keyframes hb-nudge-x{0%,100%{translate:0 0}50%{translate:8px 0}}
@media (prefers-reduced-motion:reduce){.hub .hb-doodle .dd-a{animation:none}}

/* longer starburst labels (e.g. "2 PLAYERS") */
.hub .hb-card[data-pop*=" "]::after{width:78px;height:78px;top:-24px;right:-18px;font-size:11px;line-height:1.05;letter-spacing:0;text-align:center;padding:0 16px;box-sizing:border-box}
html,body{overflow-x:clip;max-width:100%}
@media (max-width:600px){.hub .hb-card[data-pop]::after{right:2px}.hub .hb-card[data-pop*=" "]::after{right:0}.played::after{right:4px}}
