/* Sleepy. Two flat colors plus a shadow color, no outlines. Day = lavender page + blue ink, night = swapped. */
:root {
  --blue: #173F8F;
  --lav: #CDB6FF;
  --green: #2FBF8F;
  --page: var(--lav);
  --ink: var(--blue);
  --shadow: var(--green);
  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --nav-h: 76px;
  color-scheme: light;
}
:root[data-theme="dark"] { --page: var(--blue); --ink: var(--lav); color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --page: var(--blue); --ink: var(--lav); color-scheme: dark; }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--shadow); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: 1040px; margin-inline: auto; padding-inline: 20px; }
#view { padding-top: 12px; padding-bottom: calc(var(--nav-h) + 110px + env(safe-area-inset-bottom, 0px)); }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--page); padding-top: env(safe-area-inset-top, 0px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; line-height: 1.05; min-width: 0; }
@media (max-width: 480px) { .brand { font-size: 1.15rem; } .brand .mark { flex: none; } }
.brand .mark { width: 38px; height: 38px; border-radius: 12px; background: var(--ink); color: var(--page); display: grid; place-items: center; font-size: 1.3rem; box-shadow: 3px 3px 0 var(--shadow); }
.tools { display: flex; align-items: center; gap: .4rem; }
.ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; line-height: 1; transition: transform .15s ease; }
.ico:hover { transform: translateY(-2px); }

/* Hover and focus bubble: label in bold, one short line */
.tipw { position: relative; }
.bubble { position: absolute; z-index: 40; background: var(--ink); color: var(--page); padding: .5rem .8rem; border-radius: 12px; box-shadow: 0 4px 0 var(--shadow); font-size: .85rem; line-height: 1.3; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.bubble b { display: block; font-family: var(--display); font-size: .95rem; }
.bubble.up { bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 4px); }
.bubble.down { top: calc(100% + 10px); right: 0; transform: translateY(-4px); }
.bubble.downl { top: calc(100% + 10px); left: 0; transform: translateY(-4px); }
.tipw:hover .bubble, .tipw:focus-visible .bubble, .tipw:focus-within .bubble, .tipw.on .bubble { opacity: 1; }
.tipw:hover .bubble.up, .tipw:focus-visible .bubble.up, .tipw:focus-within .bubble.up, .tipw.on .bubble.up { transform: translate(-50%, 0); }
.tipw:hover .bubble.down, .tipw:focus-visible .bubble.down, .tipw:focus-within .bubble.down, .tipw.on .bubble.down,
.tipw:hover .bubble.downl, .tipw:focus-visible .bubble.downl, .tipw:focus-within .bubble.downl, .tipw.on .bubble.downl { transform: translateY(0); }

/* Tab bar */
.tabs { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: var(--page); padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px)); }
.tabs .row { max-width: 460px; margin-inline: auto; background: var(--ink); color: var(--page); border-radius: 22px; box-shadow: 0 5px 0 var(--shadow); display: flex; justify-content: space-around; padding: 6px; }
.tab { flex: 1; max-width: 62px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; line-height: 1; transition: background .15s ease, color .15s ease; }
.tab[aria-current="page"] { background: var(--page); color: var(--ink); }

/* Type + buttons */
.hello { display: flex; align-items: center; gap: .8rem; margin: 6px 0 22px; }
.hello .face { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--page); display: grid; place-items: center; font-size: 1.4rem; box-shadow: 3px 3px 0 var(--shadow); }
.hello h1 { font-size: 1.7rem; }
.h2 { font-size: 1.35rem; margin: 30px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.h2 a { font-size: 1.2rem; font-family: var(--body); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-family: var(--display); font-weight: 700; font-size: 1.05rem; padding: .85rem 1.5rem; border-radius: 999px; background: var(--ink); color: var(--page); box-shadow: 0 5px 0 var(--shadow); transition: transform .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--shadow); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--shadow); }
.btn.flip { background: var(--page); color: var(--ink); }
.btn.wide { width: 100%; padding-block: 1.05rem; font-size: 1.15rem; }

.pills { display: flex; flex-wrap: wrap; gap: .55rem; }
.pill { padding: .55rem 1rem; border-radius: 999px; background: var(--ink); color: var(--page); font-weight: 500; font-size: .95rem; box-shadow: 0 3px 0 var(--shadow); transition: transform .15s ease; text-align: left; }
.pill:hover { transform: translateY(-2px); }
.pill[aria-pressed="true"] { background: var(--shadow); color: var(--blue); box-shadow: 0 3px 0 var(--ink); }

.field { display: flex; align-items: center; gap: .6rem; background: var(--ink); color: var(--page); border-radius: 18px; padding: .35rem .5rem .35rem 1.1rem; box-shadow: 0 5px 0 var(--shadow); }
.field input { flex: 1; min-width: 0; background: none; border: 0; color: inherit; font: inherit; font-size: 1.05rem; padding: .7rem 0; outline: none; }
.field input::placeholder { color: inherit; opacity: .75; }
.field button { width: 42px; height: 42px; border-radius: 14px; background: var(--page); color: var(--ink); display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.field:focus-within { outline: 3px solid var(--shadow); outline-offset: 3px; }

/* Cards and covers */
.art { position: relative; width: 100%; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--blue); }
.art svg { width: 100%; height: 100%; }
.art .len { position: absolute; left: 10px; bottom: 10px; background: var(--lav); color: var(--blue); font-family: var(--display); font-weight: 700; font-size: .8rem; padding: .2rem .6rem; border-radius: 999px; }
.art .badge { position: absolute; right: 10px; top: 10px; font-size: 1.1rem; background: var(--lav); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; }
.card { display: block; text-align: left; background: var(--ink); color: var(--page); border-radius: 24px; padding: 10px 10px 14px; box-shadow: 0 6px 0 var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--shadow); }
.card h3 { font-size: 1rem; line-height: 1.2; margin: 10px 4px 0; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 16px; margin-inline: -4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .card { flex: 0 0 168px; scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 18px; padding-bottom: 8px; }

.two { display: grid; gap: 22px; }
@media (min-width: 820px) { .two { grid-template-columns: 1.7fr 1fr; align-items: start; } .grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); } }

.panel { background: var(--ink); color: var(--page); border-radius: 26px; padding: 20px; box-shadow: 0 6px 0 var(--shadow); }
.live { display: grid; gap: .5rem; }
.live .kick { font-size: .9rem; font-weight: 500; }
.live h2 { font-size: 1.9rem; }
.live .when { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-weight: 500; margin-bottom: .6rem; }
.live .actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

.stat { display: flex; align-items: center; gap: 1rem; }
.stat .num { font-family: var(--display); font-weight: 800; font-size: 3.2rem; line-height: 1; }
.stat .em { font-size: 2.2rem; }

.feat { position: relative; display: block; border-radius: 26px; overflow: hidden; background: var(--blue); color: var(--lav); box-shadow: 0 6px 0 var(--shadow); min-height: 300px; }
.feat svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.feat .txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; background: linear-gradient(to top, var(--blue), transparent); }
.feat h3 { font-size: 1.9rem; }
.feat .go { margin-top: .8rem; width: 44px; height: 44px; border-radius: 50%; background: var(--lav); color: var(--blue); display: grid; place-items: center; font-size: 1.2rem; }

/* Status boxes */
.boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.box { background: var(--ink); color: var(--page); border-radius: 22px; padding: 14px 8px; text-align: center; box-shadow: 0 5px 0 var(--shadow); transition: transform .15s ease; }
.box:hover { transform: translateY(-2px); }
.box .num { display: block; font-family: var(--display); font-weight: 800; font-size: 2.2rem; line-height: 1; margin-top: 4px; }
.box .em { font-size: 1.4rem; }
.box[aria-pressed="true"] { background: var(--shadow); color: var(--blue); box-shadow: 0 5px 0 var(--ink); }

/* Track page */
.detail { display: grid; gap: 22px; }
@media (min-width: 720px) { .detail { grid-template-columns: 300px 1fr; align-items: start; } }
.detail .art { max-width: 340px; }
.detail h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); margin-bottom: .6rem; }
.acts { display: flex; gap: .6rem; margin: 14px 0 20px; }
.acts .ico { background: var(--ink); color: var(--page); box-shadow: 0 4px 0 var(--shadow); }
.acts .ico[aria-pressed="true"] { background: var(--shadow); color: var(--blue); box-shadow: 0 4px 0 var(--ink); }
.back { display: inline-flex; margin: 0 0 10px; }

/* Player */
.player { display: grid; gap: 22px; justify-items: center; text-align: center; }
.player .art { max-width: 320px; }
.player h1 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); max-width: 22ch; }
.breath { width: min(320px, 70vw); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--page); box-shadow: 0 8px 0 var(--shadow); font-size: 3rem; animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.88); } 50% { transform: scale(1); } }
.bar { width: 100%; max-width: 520px; }
.bar input[type="range"] { width: 100%; accent-color: var(--ink); height: 28px; }
.bar .times { display: flex; justify-content: space-between; font-size: .9rem; font-weight: 500; }
.ctrls { display: flex; align-items: center; gap: 18px; }
.ctrls .ico { width: 56px; height: 56px; font-size: 1.5rem; background: var(--ink); color: var(--page); box-shadow: 0 4px 0 var(--shadow); border-radius: 50%; }
.ctrls .ico.big { width: 76px; height: 76px; font-size: 2rem; }
.ctrls .ico.mini { font-family: var(--display); font-weight: 800; font-size: .85rem; }

/* Mini player */
.mini { position: fixed; z-index: 25; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) - 4px); padding: 0 20px; }
.mini .in { max-width: 460px; margin-inline: auto; display: flex; align-items: center; gap: .7rem; background: var(--page); color: var(--ink); border-radius: 20px; padding: 8px 10px; box-shadow: 0 5px 0 var(--ink); }
.mini .thumb { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex: none; }
.mini .name { flex: 1; min-width: 0; font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .ico { width: 44px; height: 44px; background: var(--ink); color: var(--page); border-radius: 50%; }

/* Journal and accordion */
.journal textarea { width: 100%; min-height: 150px; resize: vertical; border: 0; border-radius: 20px; padding: 1rem 1.1rem; background: var(--page); color: var(--ink); font: inherit; outline: none; }
.journal .q { font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1.1; margin-bottom: 14px; }
.journal .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 1rem; }
.acc { display: grid; gap: 12px; }
.acc .row { background: var(--ink); color: var(--page); border-radius: 20px; box-shadow: 0 5px 0 var(--shadow); overflow: hidden; }
.acc .head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 18px; text-align: left; font-weight: 700; }
.acc .head span { min-width: 0; }
.acc .chev { flex: none; transition: transform .2s ease; }
.acc .row.open .chev { transform: rotate(180deg); }
.acc .body { display: none; padding: 0 18px 16px; }
.acc .row.open .body { display: block; }
.acc .body .qq { font-weight: 500; opacity: .85; margin-bottom: 6px; font-size: .95rem; }
.empty { text-align: center; padding: 40px 10px; font-size: 1.1rem; }
.empty .em { font-size: 3rem; display: block; margin-bottom: 8px; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--nav-h) + 90px); transform: translate(-50%, 20px); background: var(--ink); color: var(--page); padding: .6rem 1.1rem; border-radius: 999px; box-shadow: 0 4px 0 var(--shadow); font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Click and page motion: everything eases, nothing snaps */
#view { transition: opacity .15s ease, transform .15s ease; }
#view.out { opacity: 0; transform: translateY(-6px); }
#view.in { animation: viewin .4s cubic-bezier(.2, .7, .2, 1) backwards; }
#view.soft { animation: soft .25s ease backwards; }
@keyframes viewin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes soft { from { opacity: .65; } to { opacity: 1; } }
#view.in .grid > .card, #view.in .rail > .card, #view.in .drow { animation: rise .5s ease backwards; }
#view.in .grid > .card:nth-child(2), #view.in .rail > .card:nth-child(2), #view.in .drow:nth-child(2) { animation-delay: .04s; }
#view.in .grid > .card:nth-child(3), #view.in .rail > .card:nth-child(3), #view.in .drow:nth-child(3) { animation-delay: .08s; }
#view.in .grid > .card:nth-child(4), #view.in .rail > .card:nth-child(4), #view.in .drow:nth-child(4) { animation-delay: .12s; }
#view.in .grid > .card:nth-child(5), #view.in .rail > .card:nth-child(5), #view.in .drow:nth-child(5) { animation-delay: .16s; }
#view.in .grid > .card:nth-child(n+6), #view.in .rail > .card:nth-child(n+6), #view.in .drow:nth-child(n+6) { animation-delay: .2s; }
.acc .row.open .body { animation: openrow .28s ease backwards; }
.acc .row.open .chev { animation: chevflip .28s ease backwards; }
@keyframes openrow { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes chevflip { from { transform: rotate(0); } to { transform: rotate(180deg); } }
.btn, .pill, .card, .tab, .ico, .box, .drow, .feat, .panel { transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s ease, background-color .25s ease, color .25s ease, opacity .25s ease; }
.card:active, .feat:active, .drow:active { transform: translateY(1px) scale(.985); }
.pill:active, .box:active { transform: scale(.95); }
.tab:active, .ico:active { transform: scale(.9); }
.pill[aria-pressed="true"] { transition: background-color .25s ease, color .25s ease, transform .2s ease; }

/* Rise-in */
.rise { animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rise, .breath, #view.in, #view.soft, #view.in .grid > .card, #view.in .rail > .card, #view.in .drow, .acc .row.open .body, .acc .row.open .chev { animation: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* YouTube embed: must stay visible, so it sits right under the title */
.yt { width: 100%; max-width: 640px; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: var(--blue); box-shadow: 0 6px 0 var(--shadow); }
.yt iframe { width: 100%; height: 100%; display: block; border: 0; }

.feat .fimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }

/* Continue + up next */
.cont { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cont .em { font-size: 1.8rem; }
.cont .ct { flex: 1; min-width: 0; }
.cont b { font-family: var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prog { height: 8px; border-radius: 99px; background: var(--page); margin-top: 8px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--shadow); }
.next { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 520px; background: var(--ink); color: var(--page); border-radius: 20px; padding: 8px 16px 8px 8px; box-shadow: 0 5px 0 var(--shadow); text-align: left; }
.next .th { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; flex: none; }
.next .nm { flex: 1; min-width: 0; font-weight: 700; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Sign-in */
.gate { min-height: 60vh; display: grid; align-content: center; justify-items: center; gap: 18px; text-align: center; max-width: 420px; margin-inline: auto; padding-top: 6vh; }
.gate .moon { font-size: 3.4rem; }
.gate .field { width: 100%; }
.gate .note { font-family: var(--display); font-weight: 800; font-size: 1.3rem; line-height: 1.15; }
.gate .gl { font-size: 1.6rem; }

/* Series (programs) */
.kick { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.cont .sub { font-size: .9rem; font-weight: 500; opacity: .85; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.days { display: grid; gap: 12px; margin-top: 28px; }
.drow { display: flex; align-items: center; gap: 12px; min-height: 64px; background: var(--ink); color: var(--page); border-radius: 20px; padding: 10px 10px 10px 12px; box-shadow: 0 5px 0 var(--shadow); transition: transform .15s ease; }
a.drow:hover { transform: translateY(-2px); }
.drow .dn { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--page); color: var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; }
.drow .dt { flex: 1; min-width: 0; font-weight: 700; font-size: .95rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drow .dl { flex: none; font-size: .85rem; font-weight: 500; opacity: .85; white-space: nowrap; }
.drow .ds { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-size: 1.25rem; }
.drow.next { background: var(--shadow); color: var(--blue); box-shadow: 0 5px 0 var(--ink); }
.drow.next .dn { background: var(--blue); color: var(--lav); }
.drow.soon { opacity: .6; }
.feat .txt .sub { font-size: .95rem; font-weight: 500; margin-top: 4px; opacity: .9; }
.feat .go { font-size: 1.1rem; padding-left: 3px; }
.feat.tonight { min-height: 340px; }
.feat.tonight .fimg { object-position: center 35%; }
.feat.tonight .txt { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 50px; background: linear-gradient(to top, var(--blue) 50%, transparent); }
@media (min-width: 820px) { .two { align-items: stretch; } .two > div:first-child { display: flex; } .two > div:first-child > .feat { flex: 1; } }
.feat.tonight .lt { min-width: 0; }
.feat.tonight h3 { font-size: 1.6rem; }
.feat.tonight .go { margin: 0; flex: none; width: 56px; height: 56px; font-size: 1.3rem; }
.two .stat { margin-top: 18px; }

/* ---------- Sleepy Sheepy + dreams ---------- */
.ico.flip { background: var(--page); color: var(--ink); box-shadow: none; }
.panel.rankp, .panel.prize, .panel.wheelp, .panel.streakp { margin-bottom: 18px; }
.boxes.four { grid-template-columns: repeat(4, 1fr); }
.boxes .box:first-child .bubble.up { left: 0; transform: translate(0, 4px); }
.boxes .box:last-child .bubble.up { left: auto; right: 0; transform: translate(0, 4px); }
.boxes .box:first-child:hover .bubble.up, .boxes .box:first-child:focus-visible .bubble.up,
.boxes .box:last-child:hover .bubble.up, .boxes .box:last-child:focus-visible .bubble.up { transform: translate(0, 0); }
.box { cursor: pointer; }

.rankp { display: flex; align-items: center; gap: 16px; }
.rankp > .em { font-size: 3rem; line-height: 1; }
.rankp .rt { flex: 1; min-width: 0; }
.rankp h2 { font-size: 1.7rem; }
.rankp .sub, .streakp .sub { font-size: .95rem; font-weight: 500; margin-top: 8px; opacity: .9; }

.wheelp { display: grid; justify-items: center; gap: 18px; }
.wheelbox { position: relative; width: min(260px, 70vw); aspect-ratio: 1; }
.wheelbox .wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 6px var(--ink), 0 0 0 10px var(--shadow); }
.wheelbox .ptr { position: absolute; z-index: 2; left: 50%; top: -14px; width: 0; height: 0; transform: translateX(-50%); border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 22px solid var(--page); }
.wheelp .btn { width: 100%; max-width: 320px; }
.wheelp .btn[disabled] { opacity: .7; cursor: default; }

.prize { display: flex; align-items: center; gap: 14px; position: relative; padding-right: 52px; }
.prize .pz { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.prize .pz b { font-family: var(--display); font-size: 1.35rem; display: block; }
.prize .pz p { font-weight: 500; opacity: .9; }
.prize .pz .em { font-size: 2.4rem; }
.prize > .ico { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; font-size: 1rem; }
.prize .sheepart { width: 84px; height: 66px; }

.dots7 { display: flex; gap: 8px; }
.dots7 .dot { flex: 1; height: 14px; border-radius: 99px; background: var(--page); opacity: .45; }
.dots7 .dot.on { background: var(--shadow); opacity: 1; }
.mini-stats { display: flex; gap: 10px; margin-top: 14px; }
.mini-stats .ico { background: var(--page); color: var(--ink); box-shadow: none; }

.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.scard { background: var(--ink); color: var(--page); border-radius: 22px; padding: 12px; box-shadow: 0 5px 0 var(--shadow); display: flex; flex-direction: column; gap: 4px; align-items: stretch; text-align: center; }
.scard b { font-family: var(--display); font-size: 1rem; line-height: 1.15; }
.scard > span { font-size: .85rem; font-weight: 500; opacity: .85; }
.scard .sheepart, .prize .sheepart { background: #173F8F; border-radius: 16px; display: grid; place-items: center; aspect-ratio: 13 / 10; overflow: hidden; color: #CDB6FF; flex: none; }
.scard .sheepart svg, .prize .sheepart svg { width: 86%; height: auto; }
.scard .sheepart .big { font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1; }
.scard.off { opacity: .55; box-shadow: 0 5px 0 var(--page); }
.scard.r2 { box-shadow: 0 5px 0 var(--shadow), 0 0 0 3px var(--shadow); }
.scard.r3 { box-shadow: 0 5px 0 var(--shadow), 0 0 0 3px var(--page), 0 0 0 6px var(--shadow); }
a.scard:hover { transform: translateY(-2px); }

.brow { display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--page); border-radius: 20px; box-shadow: 0 5px 0 var(--shadow); padding: 12px 16px; }
.brow > .em { font-size: 1.9rem; flex: none; }
.brow > div { flex: 1; min-width: 0; }
.brow b { display: block; font-family: var(--display); }
.brow > div > span { font-size: .9rem; opacity: .85; font-weight: 500; }
.brow.off { opacity: .55; box-shadow: 0 5px 0 var(--page); }
.brow .ico { background: var(--page); color: var(--ink); width: 40px; height: 40px; box-shadow: none; }

.journal .sky { display: flex; gap: 10px; margin-bottom: 14px; }
.journal .sky > .tipw { width: 44px; height: 44px; border-radius: 14px; background: var(--page); color: var(--ink); display: grid; place-items: center; font-size: 1.5rem; }
.syms { display: grid; gap: 10px; margin-top: 18px; }
.sym { display: flex; gap: 14px; align-items: flex-start; background: var(--ink); color: var(--page); border-radius: 20px; padding: 14px 16px; box-shadow: 0 5px 0 var(--shadow); }
.sym .em { font-size: 1.8rem; line-height: 1.1; flex: none; }
.sym b { display: block; font-family: var(--display); }
.acc .body .syms { margin-top: 12px; }
.acc .body .sym { background: var(--page); color: var(--ink); box-shadow: none; }

/* A hover bubble opens over the next panel, not under it. */
.panel { position: relative; }
.panel:hover, .panel:focus-within { z-index: 6; }

/* ---------- count sheep ---------- */
.playp { display: grid; gap: 10px; }
.playp .sub { text-align: center; font-size: .95rem; opacity: .9; font-weight: 500; }
.nosym { margin-top: 14px; opacity: .85; font-weight: 500; }
.btn.done { opacity: .75; }
.countp { display: grid; gap: 16px; }
.countp .sub { text-align: center; opacity: .85; font-weight: 500; }
.pen { position: relative; overflow: hidden; border-radius: 26px; background: linear-gradient(#0B2250, #173F8F); aspect-ratio: 16 / 11; max-height: 52vh; width: 100%; box-shadow: 0 6px 0 var(--shadow); }
.pen .moon { position: absolute; top: 8%; right: 8%; font-size: 2.6rem; line-height: 1; }
.pen .grass { position: absolute; left: -10%; right: -10%; bottom: 0; height: 26%; background: var(--green); border-radius: 50% 50% 0 0 / 40% 40% 0 0; }
.pen .fence { position: absolute; z-index: 2; left: 40%; width: 20%; bottom: 10%; height: 30%; background: repeating-linear-gradient(90deg, #CDB6FF 0 12%, transparent 12% 25%); border-radius: 6px 6px 0 0; }
.pen .fence::before, .pen .fence::after { content: ""; position: absolute; left: -4%; right: -4%; height: 10%; background: #CDB6FF; border-radius: 4px; }
.pen .fence::before { top: 22%; }
.pen .fence::after { top: 58%; }
.pen .sh { position: absolute; z-index: 3; width: 24%; transform: translateX(-50%); pointer-events: auto; cursor: pointer; transition: opacity .3s ease, transform .3s ease; }
.pen .sh.pick { filter: drop-shadow(0 0 10px #F2C94C); }
.pen .sh.gone { opacity: 0; pointer-events: none; }
.pen .sh svg { width: 100%; height: auto; }
.pen .dim { position: absolute; z-index: 5; inset: 0; background: #000; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.tally { text-align: center; font-family: var(--display); font-weight: 800; font-size: 4rem; line-height: 1; }
.tally .of { font-size: 1.4rem; opacity: .7; margin-left: .5rem; }
.countp .btn.wide { padding-block: 1.5rem; font-size: 1.5rem; }
.btn.nope { animation: nope .28s ease; }
@keyframes nope { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.countp.done { text-align: center; padding-top: 30px; }
.countp.done .em { font-size: 4.5rem; line-height: 1; }
.countp.done .acts { justify-content: center; margin-top: 8px; }
.scards.won { margin-top: 6px; grid-template-columns: repeat(auto-fit, minmax(130px, 170px)); justify-content: center; }

/* game tab: before Play it is a quiet preview, after Play the tally and the Count button show */
.gtitle { text-align: center; }
.gtitle h2 { font-size: 2rem; }
.gtitle .sub { margin-top: 6px; }
.pen .playov { position: absolute; z-index: 6; left: 50%; top: 36%; transform: translate(-50%, -50%); font-size: 1.5rem; padding: 1rem 2.2rem; }
.countp + .panel { margin-top: 18px; }
.countp[data-s="idle"] .tally, .countp[data-s="idle"] #tap, .countp[data-s="idle"] .cline { display: none; }
.countp[data-s="play"] .playov, .countp[data-s="play"] .gtitle .sub { display: none; }

/* ---------- the board ---------- */
.pills.seg { margin-bottom: 16px; }
.boardp { display: grid; gap: 12px; justify-items: center; text-align: center; }
.boardp > .em { font-size: 2.6rem; line-height: 1; }
.boardp h2 { font-size: 1.7rem; }
.boardp .sub { font-weight: 500; opacity: .9; }
.youare { margin: 0 0 12px; font-weight: 500; }
.brow.bd { padding: 10px 16px; }
.brow.bd .rk { width: 2.4rem; text-align: center; font-family: var(--display); font-weight: 800; font-size: 1.2rem; flex: none; }
.brow.bd .x { font-family: var(--display); font-weight: 800; font-size: 1.3rem; }
.brow.me { background: var(--shadow); color: var(--blue); box-shadow: 0 5px 0 var(--ink); }
.acc + .mini-stats { margin-top: 16px; }
.cline { text-align: center; font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1.2; min-height: 2.4em; }
.cline.fresh { animation: rise .7s ease both; }

.pen .sh .num { position: absolute; left: 50%; top: -12%; transform: translateX(-50%); font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1; color: #CDB6FF; text-shadow: 0 2px 0 #0B2250; pointer-events: none; }
.pen .sh.goldsheep { filter: drop-shadow(0 0 12px #F2C94C); }
.slotp { display: grid; gap: 14px; justify-items: center; text-align: center; margin-top: 18px; }
.slotp h2 { font-size: 1.7rem; }
.slotp .sub { font-weight: 500; opacity: .9; }
.reels { display: flex; gap: 10px; }
.reel { width: 74px; height: 86px; border-radius: 18px; background: var(--page); display: grid; place-items: center; font-size: 2.6rem; line-height: 1; }
.slotp .btn { width: 100%; max-width: 320px; }
.slotp .btn[disabled] { opacity: .7; cursor: default; }
.winner { margin: 0 0 12px; font-weight: 700; text-align: center; }
.sym.verdict { align-items: center; }
.sym.verdict .ico { background: var(--page); color: var(--ink); box-shadow: none; flex: none; margin-left: auto; }
.acc .body .sym.verdict .ico { background: var(--ink); color: var(--page); }
