/* Duemello home: the Today view (shelves), the Games view and the play screen.
   Unlayered on purpose: legacy styles sit in the `legacy` layer. */

body.dm-home{background:var(--dm-page)}
body.dm-home .app-layout{display:block;max-width:none;margin:0;padding:0;gap:0}
body.dm-home main#main-content{display:block;min-width:0;padding-top:clamp(12px,2vw,26px)}
body.dm-home main#main-content:focus{outline:none}
#library-view{display:flex;flex-direction:column;gap:clamp(30px,4vw,52px)}
#library-view[data-view="today"] .dm-games-only,#library-view[data-view="games"] .dm-today-only{display:none!important}
#library-view>*{margin:0;min-width:0}
:where(#library-view) h2{margin:0;font:var(--dm-display-weight) clamp(1.45rem,2.4vw,2.05rem)/1.08 var(--dm-display);letter-spacing:var(--dm-display-tracking);color:var(--dm-ink)}
:where(#library-view) h3{color:var(--dm-ink)}
:where(#library-view) p{color:var(--dm-muted)}
:where(html[data-audience="couples"] #library-view) h2{font-size:clamp(1.75rem,2.9vw,2.5rem);font-weight:400}
body.dm-home .section-kicker,body.dm-home .tiny-eyebrow:not(.dm-hero-eyebrow){display:none}
body.dm-home .section-heading,body.dm-home .library-heading,body.dm-home .community-copy,body.dm-home .daily-copy{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:0 0 16px;padding:0;border:0;background:none}
body.dm-home .section-heading p,body.dm-home .library-heading p,body.dm-home .community-copy p{margin:.35rem 0 0;font-size:.95rem;line-height:1.45;max-width:60ch}
body.dm-home .text-action{display:inline-flex;align-items:center;gap:.35em;padding:.5em 0;border:0;background:none;color:var(--dm-primary);font:650 .92rem/1.2 var(--dm-body);cursor:pointer;white-space:nowrap}
body.dm-home .text-action svg{width:17px;height:17px}

body.dm-app .header-room{min-height:44px;padding:.55em 1em;border-radius:var(--dm-radius-pill)}
body.dm-app .header-room svg{width:18px;height:18px}
@media (max-width:699px){body.dm-app .header-room #room-status-text{max-width:22vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
@media (max-width:379px){body.dm-app .header-room{width:44px;padding:0}}
body.dm-home .local-appearance{display:none}

/* ---------- Hello bar: you, them and the distance between ---------- */
.dm-hello{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(14px,2.4vw,28px);padding:14px clamp(14px,2.2vw,22px);border-radius:var(--dm-radius-lg);background:var(--dm-surface);border:var(--dm-card-border);box-shadow:var(--dm-shadow)}
.dm-pair{display:flex;align-items:center;gap:6px}
.dm-person{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:56px;max-width:84px}
.dm-person strong{font:650 .78rem/1.1 var(--dm-body);color:var(--dm-ink);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.dm-app .dm-person .avatar{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;font:700 1.05rem/1 var(--dm-body);background:var(--dm-primary);color:var(--dm-on-primary);box-shadow:0 0 0 3px var(--dm-surface),0 0 0 4px var(--dm-line)}
body.dm-app .dm-person .avatar-b{background:var(--dm-pop);color:#2a1020}
html[data-audience="friends"] body.dm-app .dm-person .avatar{box-shadow:0 0 0 2px var(--dm-line-strong),2px 2px 0 2px var(--dm-line-strong)}
.dm-distance{position:relative;width:clamp(70px,12vw,150px);height:46px;margin-top:-18px;transition:width .8s cubic-bezier(.3,1.3,.5,1)}
.dm-distance-line{position:absolute;left:0;right:0;top:50%;border-top:2px dashed color-mix(in srgb,var(--dm-muted) 55%,transparent)}
.dm-distance-heart{position:absolute;left:50%;top:50%;display:grid;place-items:center;width:28px;height:28px;margin:-14px 0 0 -14px;border-radius:50%;background:var(--dm-surface);border:1.5px solid var(--dm-line);color:var(--dm-muted)}
.dm-distance-heart svg{width:15px;height:15px}
.dm-hello-copy{min-width:0}
.dm-hello-status{margin:0;font:var(--dm-display-weight) 1.15rem/1.15 var(--dm-display);letter-spacing:var(--dm-display-tracking);color:var(--dm-ink)!important}
html[data-audience="couples"] .dm-hello-status{font-size:1.4rem}
.dm-hello-hint{margin:.25rem 0 0;font-size:.875rem;line-height:1.4}
.dm-hello-hint button{padding:0;border:0;background:none;color:var(--dm-primary);font:inherit;font-weight:650;text-decoration:underline;text-underline-offset:3px;cursor:pointer;min-height:0}
.dm-pair[data-room-state="waiting"] .dm-distance-line{border-top-style:dotted;animation:dm-wait 1.6s linear infinite}
.dm-pair[data-room-state="live"] .dm-distance{width:clamp(26px,4vw,40px)}
.dm-pair[data-room-state="live"] .dm-distance-line{border-top:3px solid var(--dm-accent)}
.dm-pair[data-room-state="live"] .dm-distance-heart{background:var(--dm-pop);border-color:var(--dm-pop);color:#fff;animation:dm-beat 1.8s ease-in-out infinite}
@keyframes dm-wait{to{background-position:20px 0}}
@keyframes dm-beat{0%,100%{transform:scale(1)}12%{transform:scale(1.18)}24%{transform:scale(1)}36%{transform:scale(1.12)}}
@media (max-width:699px){
  .dm-hello{grid-template-columns:1fr;justify-items:center;text-align:center;gap:10px;padding:16px 14px}
  .dm-hello-hint{display:none}
  .dm-hello-action{width:100%}
}

/* ---------- Hero ---------- */
body.dm-home .welcome.dm-hero{position:relative;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);grid-template-areas:"copy art";align-items:stretch;gap:0;min-height:clamp(380px,40vw,500px);margin:0;padding:0;border-radius:var(--dm-radius-xl);background:var(--dm-surface);border:var(--dm-card-border);box-shadow:var(--dm-shadow-lift);overflow:hidden;isolation:isolate;color:var(--dm-ink)}
.dm-hero-art{grid-area:art;position:relative;min-height:100%;overflow:hidden;background:var(--scene-sky-top)}
.dm-hero .welcome-copy{grid-area:copy;position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;gap:16px;padding:clamp(26px,4vw,56px);max-width:none;background:none}
.dm-hero-eyebrow{display:inline-flex;align-self:flex-start;align-items:center;gap:.5em;padding:.45em .8em;border-radius:var(--dm-radius-pill);background:var(--dm-soft);color:var(--dm-ink)!important;font:650 .8rem/1 var(--dm-body)!important;letter-spacing:0!important;text-transform:none!important}
.dm-hero-eyebrow::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--dm-pop)}
body.dm-home .dm-hero h1{margin:0;font:var(--dm-display-weight) clamp(2.35rem,4.4vw,4.05rem)/.98 var(--dm-display);letter-spacing:var(--dm-display-tracking);color:var(--dm-ink);text-wrap:balance}
html[data-audience="couples"] body.dm-home .dm-hero h1{font-size:clamp(2.9rem,5.4vw,5rem);line-height:.92}
html[data-audience="friends"] body.dm-home .dm-hero h1{font-size:clamp(2.2rem,4vw,3.6rem);line-height:1.02}
body.dm-home .dm-hero #hero-subtitle{margin:0;max-width:44ch;font-size:clamp(1rem,1.25vw,1.12rem);line-height:1.55;color:var(--dm-muted)}
body.dm-home .dm-hero .hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
body.dm-home .dm-hero .hero-celebration{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:2px 0 0;padding:0;border:0;background:none;color:var(--dm-muted);font-size:.84rem}
body.dm-home .dm-hero .hero-celebration svg{width:16px;height:16px}
body.dm-home .dm-hero .hero-celebration button{min-height:36px;padding:.35em .8em;border-radius:var(--dm-radius-pill);border:1px solid var(--dm-line);background:var(--dm-surface);color:var(--dm-ink);font:600 .82rem/1 var(--dm-body);cursor:pointer}
body.dm-home .hero-showcase{position:absolute;right:clamp(14px,2vw,26px);bottom:clamp(14px,2vw,26px);z-index:3;display:grid;grid-template-columns:96px minmax(0,1fr) auto;align-items:center;justify-items:stretch;gap:12px;width:min(370px,calc(58% - 28px));padding:10px 14px 10px 10px;border-radius:var(--dm-radius-md);border:var(--dm-card-border);background:color-mix(in srgb,var(--dm-surface) 92%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:var(--dm-shadow-lift);color:var(--dm-ink);text-align:left;cursor:pointer;transform:none;margin:0}
body.dm-home .hero-showcase:hover{transform:translateY(-2px)}
body.dm-home .hero-showcase .hero-illustration{width:96px;height:60px;object-fit:cover;border-radius:calc(var(--dm-radius-md) - 6px);background:#f3f1e9;margin:0;box-shadow:none;border:0}
body.dm-home .hero-showcase .preview-caption{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:0;border:0;background:none;min-width:0;width:100%}
body.dm-home .hero-showcase .preview-heading{display:block;padding:0;border:0;font:600 .72rem/1.2 var(--dm-body);color:var(--dm-muted);letter-spacing:0;text-transform:none}
body.dm-home .hero-showcase strong{font:700 1rem/1.15 var(--dm-body);color:var(--dm-ink)}
body.dm-home .hero-showcase .preview-caption>span:last-child{max-width:100%;font-size:.8rem;color:var(--dm-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.dm-home .hero-showcase .preview-play{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--dm-primary);color:var(--dm-on-primary)}
body.dm-home .hero-showcase .preview-play svg{width:18px;height:18px;margin-left:2px}
@media (max-width:899px){
  body.dm-home .welcome.dm-hero{grid-template-columns:1fr;grid-template-areas:"art" "copy";min-height:0}
  .dm-hero-art{aspect-ratio:16/10;min-height:0}
  body.dm-home .hero-showcase{position:static;grid-area:auto;width:auto;margin:0 clamp(16px,4vw,26px) clamp(16px,4vw,26px);box-shadow:none;background:var(--dm-soft);border-color:transparent}
  body.dm-home .dm-hero .welcome-copy{padding:22px clamp(18px,4vw,30px) 18px;gap:12px}
}
@media (max-width:699px){
  body.dm-home .dm-hero h1{font-size:clamp(2.1rem,9.4vw,2.7rem)}
  html[data-audience="couples"] body.dm-home .dm-hero h1{font-size:clamp(2.6rem,11.5vw,3.3rem)}
  body.dm-home .dm-hero .hero-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  body.dm-home .dm-hero .hero-actions .dm-btn{width:100%;min-width:0;padding-inline:.6em;font-size:.9rem}
  .dm-hero-art{aspect-ratio:4/3}
}
@media (max-width:379px){
  body.dm-home .dm-hero .hero-actions{grid-template-columns:minmax(0,1fr)}
  body.dm-home .hero-showcase{grid-template-columns:64px minmax(0,1fr) 36px;gap:8px}
  body.dm-home .hero-showcase .hero-illustration{width:64px;height:40px}
  body.dm-home .hero-showcase .preview-play{width:36px;height:36px}
}

/* The illustrated scene: two homes, one string of lights. Colours follow the theme. */
.dm-scene{position:absolute;inset:0;width:100%;height:100%;display:block;overflow:visible}
.dm-scene .sc-sky-top{stop-color:var(--scene-sky-top)}.dm-scene .sc-sky-bottom{stop-color:var(--scene-sky-bottom)}
.dm-scene .sc-glow-in{stop-color:var(--scene-orb);stop-opacity:.55}.dm-scene .sc-glow-out{stop-color:var(--scene-orb);stop-opacity:0}
.dm-scene .sc-orb{fill:var(--scene-orb)}
.dm-scene .sc-stars{fill:#fff;opacity:0;transition:opacity .6s ease}
html[data-mode="dark"] .dm-scene .sc-stars{opacity:.85}
.dm-scene .sc-clouds{fill:#fff;opacity:.75}
html[data-mode="dark"] .dm-scene .sc-clouds{opacity:.08}
.dm-scene .sc-ground{fill:var(--scene-ground)}.dm-scene .sc-ground-2{fill:var(--scene-ground-2)}
.dm-scene .sc-wall{fill:var(--scene-house-a);stroke:var(--scene-frame);stroke-width:3}
.dm-scene .sc-roof-a{fill:var(--scene-roof-a);stroke:var(--scene-frame);stroke-width:3;stroke-linejoin:round}
.dm-scene .sc-roof-b{fill:var(--scene-roof-b);stroke:var(--scene-frame);stroke-width:3;stroke-linejoin:round}
.dm-scene .sc-chimney{fill:var(--scene-house-a);stroke:var(--scene-frame);stroke-width:3}
.dm-scene .sc-window{fill:var(--scene-window);stroke:var(--scene-frame);stroke-width:3}
html[data-mode="dark"] .dm-scene .sc-window{filter:drop-shadow(0 0 10px var(--scene-window))}
.dm-scene .sc-door{fill:var(--scene-roof-a);stroke:var(--scene-frame);stroke-width:3}
.dm-scene .sc-house-b .sc-door{fill:var(--scene-roof-b)}
.dm-scene .sc-knob{fill:var(--scene-window)}
.dm-scene .sc-person-a{fill:var(--scene-person-a)}.dm-scene .sc-person-b{fill:var(--scene-person-b)}
.dm-scene .sc-can{fill:var(--scene-bead-3);stroke:var(--scene-frame);stroke-width:2}
.dm-scene .sc-line{fill:none;stroke:var(--scene-line);stroke-width:2.5;stroke-linecap:round}
.dm-scene .sc-beads circle{stroke:var(--scene-frame);stroke-width:1.5;transform-box:fill-box;transform-origin:center}
.dm-scene .sc-beads circle:nth-child(3n+1){fill:var(--scene-bead-1)}.dm-scene .sc-beads circle:nth-child(3n+2){fill:var(--scene-bead-2)}.dm-scene .sc-beads circle:nth-child(3n){fill:var(--scene-bead-3)}
html[data-mode="dark"] .dm-scene .sc-beads circle{filter:drop-shadow(0 0 5px currentColor)}
.dm-scene .sc-mid-halo{fill:var(--scene-orb);opacity:.0;transition:opacity .6s ease}
.dm-scene .sc-mid-shape{display:none;fill:var(--scene-bead-2);stroke:var(--scene-frame);stroke-width:2;stroke-linejoin:round}
.dm-scene .sc-mid-family path{stroke:var(--scene-bead-1);stroke-width:3;stroke-linecap:round}
.dm-scene .sc-mid-family circle{fill:var(--scene-bead-1)}
html[data-audience="everyone"] .dm-scene .sc-mid-everyone,html[data-audience="couples"] .dm-scene .sc-mid-couples,html[data-audience="friends"] .dm-scene .sc-mid-friends,html[data-audience="family"] .dm-scene .sc-mid-family{display:block}
@media (prefers-reduced-motion:no-preference){
  .dm-scene .sc-beads circle{animation:sc-twinkle 3.6s ease-in-out infinite}
  .dm-scene .sc-beads circle:nth-child(2n){animation-delay:-1.2s}.dm-scene .sc-beads circle:nth-child(3n){animation-delay:-2.4s}
  .dm-scene .sc-clouds path{animation:sc-drift 28s ease-in-out infinite alternate}
  .dm-scene .sc-mid{animation:sc-bob 5s ease-in-out infinite}
}
@keyframes sc-twinkle{0%,100%{opacity:1}50%{opacity:.55}}
@keyframes sc-drift{to{transform:translateX(26px)}}
@keyframes sc-bob{0%,100%{transform:translate(360px,373px)}50%{transform:translate(360px,368px)}}
html[data-room-state="live"] .dm-scene .sc-mid-halo{opacity:.55}
html[data-room-state="live"] .dm-scene .sc-line{stroke:var(--scene-bead-1);stroke-width:3.5}

/* ---------- Theme chooser ---------- */
body.dm-home .social-start{order:0;display:block;margin:0;padding:clamp(18px,2.6vw,28px);border-radius:var(--dm-radius-xl);background:var(--dm-surface);border:var(--dm-card-border);box-shadow:var(--dm-shadow)}
body.dm-home .social-start[data-first-run]{order:-1}
body.dm-home .social-start .dm-section-head{margin-bottom:6px}
body.dm-home .audience-switch{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0 0;padding:0;border:0;background:none;box-shadow:none}
body.dm-home .audience-switch .audience-choice{all:unset;box-sizing:border-box;position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:118px;padding:14px;border-radius:var(--dm-radius-md);border:2px solid transparent;cursor:pointer;overflow:hidden}
body.dm-home .audience-switch .audience-choice:focus-visible{outline:3px solid var(--dm-accent);outline-offset:3px}
body.dm-home .audience-switch .audience-choice svg{width:20px;height:20px;margin-bottom:auto;opacity:.75}
body.dm-home .audience-switch .audience-choice strong{font-size:1.18rem;line-height:1.1}
body.dm-home .audience-switch .audience-choice small{font:500 .8rem/1.3 var(--dm-body);opacity:.85}
body.dm-home .audience-switch .audience-choice[aria-pressed="true"]{border-color:currentColor;box-shadow:0 0 0 3px var(--dm-surface),0 0 0 5px var(--dm-accent)}
body.dm-home .audience-choice[data-audience="everyone"]{background:linear-gradient(160deg,#dcebdf,#f4f8f2 75%);color:#15302a}
body.dm-home .audience-choice[data-audience="everyone"] strong{font-family:"Young Serif",Georgia,serif;font-weight:400}
body.dm-home .audience-choice[data-audience="couples"]{background:linear-gradient(160deg,#f5d5dd,#fff3ef 75%);color:#3b1427}
body.dm-home .audience-choice[data-audience="couples"] strong{font-family:"Instrument Serif",Georgia,serif;font-style:italic;font-weight:400;font-size:1.5rem}
body.dm-home .audience-choice[data-audience="friends"]{background:#fff1b8;color:#1d1a3a;border-color:#1d1a3a!important;box-shadow:3px 3px 0 #1d1a3a}
body.dm-home .audience-choice[data-audience="friends"][aria-pressed="true"]{box-shadow:3px 3px 0 #1d1a3a,0 0 0 5px #4f4ce6!important}
body.dm-home .audience-choice[data-audience="friends"] strong{font-family:"Shantell Sans",sans-serif;font-weight:800}
body.dm-home .audience-choice[data-audience="family"]{background:linear-gradient(160deg,#c9e4f6,#eef7fc 75%);color:#17324a}
body.dm-home .audience-choice[data-audience="family"] strong{font-family:"Fredoka",sans-serif;font-weight:600}
.dm-surprise-invite{display:flex;align-items:center;gap:12px;margin-top:14px;padding:12px 14px;border-radius:var(--dm-radius-md);background:var(--dm-soft);color:var(--dm-ink);text-decoration:none;font-size:.9rem;line-height:1.4}
.dm-surprise-invite>svg,.dm-surprise-invite>span:first-child svg{width:22px;height:22px;color:var(--dm-pop);flex:none}
.dm-surprise-invite>span:nth-child(2){flex:1;color:var(--dm-muted)}
.dm-surprise-invite strong{color:var(--dm-ink)}
.dm-surprise-invite>span:last-child svg{width:18px;height:18px}
@media (max-width:899px){body.dm-home .audience-switch{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:699px){body.dm-home .audience-switch .audience-choice{min-height:96px;padding:12px}body.dm-home .audience-switch .audience-choice small{display:none}}

/* ---------- Shortcuts ---------- */
.dm-quick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.dm-quick-item{all:unset;box-sizing:border-box;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;column-gap:12px;row-gap:2px;align-items:center;padding:14px;border-radius:var(--dm-radius-lg);background:var(--dm-surface);border:var(--dm-card-border);box-shadow:var(--dm-shadow);color:var(--dm-ink);cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}
.dm-quick-item:hover{transform:translateY(-2px);box-shadow:var(--dm-shadow-lift)}
.dm-quick-item:focus-visible{outline:3px solid var(--dm-accent);outline-offset:3px}
.dm-quick-icon{grid-row:1/3;display:grid;place-items:center;width:48px;height:48px;border-radius:16px;background:var(--dm-soft);color:var(--dm-primary)}
.dm-quick-icon svg{width:24px;height:24px}
.dm-quick-item strong{font:700 .98rem/1.15 var(--dm-body)}
.dm-quick-item small{font:500 .8rem/1.25 var(--dm-body);color:var(--dm-muted)}
.dm-quick-ask .dm-quick-icon{background:color-mix(in srgb,var(--dm-pop) 22%,var(--dm-surface));color:color-mix(in srgb,var(--dm-pop) 70%,var(--dm-ink))}
html[data-audience="friends"] .dm-quick-icon{border:2px solid var(--dm-line-strong)}
html[data-audience="family"] .dm-quick-item:nth-child(1) .dm-quick-icon{background:#d8ecfa;color:#2770b5}
html[data-audience="family"] .dm-quick-item:nth-child(2) .dm-quick-icon{background:#fff0c7;color:#9a6a00}
html[data-audience="family"] .dm-quick-item:nth-child(4) .dm-quick-icon{background:#dcf2df;color:#2f7d3a}
@media (max-width:999px) and (min-width:700px){.dm-quick{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:699px){
  .dm-quick{gap:6px}
  .dm-quick-item{grid-template-columns:1fr;justify-items:center;text-align:center;padding:12px 4px;row-gap:7px;background:none;border:0;box-shadow:none}
  .dm-quick-item:hover{transform:none;box-shadow:none}
  .dm-quick-icon{grid-row:auto;width:58px;height:58px;border-radius:20px;background:var(--dm-surface);border:var(--dm-card-border);box-shadow:var(--dm-shadow)}
  .dm-quick-item strong{font-size:.76rem;font-weight:650;line-height:1.15}
  .dm-quick-item small{display:none}
}

/* ---------- Shelves and cards ---------- */
body.dm-home .instant-play,body.dm-home .experience-spotlight,body.dm-home .community-row,body.dm-home .recent-activities{padding:0;border:0;background:none;box-shadow:none}
body.dm-home .instant-grid,body.dm-home .discover-grid,body.dm-home .recent-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0}
body.dm-home #event-picks.discover-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:1099px) and (min-width:700px){body.dm-home .instant-grid,body.dm-home .discover-grid,body.dm-home #event-picks.discover-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
body.dm-home .instant-card,body.dm-home .discover-card,body.dm-home .recent-card{all:unset;box-sizing:border-box;position:relative;display:flex;flex-direction:column;min-width:0;border-radius:var(--dm-radius-lg);background:var(--dm-surface);border:var(--dm-card-border);box-shadow:var(--dm-shadow);overflow:hidden;cursor:pointer;color:var(--dm-ink);transition:transform .2s ease,box-shadow .2s ease}
body.dm-home .instant-card:hover,body.dm-home .discover-card:hover,body.dm-home .recent-card:hover{transform:translateY(-3px);box-shadow:var(--dm-shadow-lift)}
body.dm-home .instant-card:focus-visible,body.dm-home .discover-card:focus-visible,body.dm-home .recent-card:focus-visible{outline:3px solid var(--dm-accent);outline-offset:3px}
body.dm-home .instant-art{display:block;aspect-ratio:8/5;overflow:hidden;background:var(--dm-soft);border:0;margin:0;padding:0}
body.dm-home .instant-art img{display:block;width:100%;height:100%;object-fit:cover}
body.dm-home .instant-copy{display:flex;flex-direction:column;gap:4px;padding:14px 16px 16px;background:none;border:0}
body.dm-home .instant-copy small{font:650 .74rem/1.2 var(--dm-body);color:var(--dm-muted);letter-spacing:.01em;text-transform:none}
body.dm-home .instant-copy strong,body.dm-home .discover-card>strong{font:700 1.06rem/1.2 var(--dm-body);color:var(--dm-ink)}
body.dm-home .instant-copy>span{font-size:.88rem;line-height:1.4;color:var(--dm-muted)}
body.dm-home .instant-copy b{display:inline-flex;align-items:center;gap:.3em;margin-top:6px;font:650 .86rem/1 var(--dm-body);color:var(--dm-primary)}
body.dm-home .instant-copy b svg{width:15px;height:15px}
body.dm-home .discover-card .game-cover{border-radius:0}
body.dm-home .discover-card>strong{padding:14px 16px 0}
body.dm-home .discover-card .discover-desc{padding:4px 16px 0;font-size:.88rem;line-height:1.4;color:var(--dm-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.dm-home .discover-card>small{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding:12px 16px 14px;font:600 .8rem/1 var(--dm-body);color:var(--dm-muted)}
body.dm-home .discover-card>small svg{width:15px;height:15px;vertical-align:-3px}
body.dm-home .discover-card>small>span{display:inline-flex;align-items:center;gap:.3em;color:var(--dm-primary)}
body.dm-home .discover-count{position:absolute;top:10px;left:10px;z-index:2;display:grid;place-items:center;min-width:30px;height:30px;padding:0 8px;border-radius:999px;background:color-mix(in srgb,var(--dm-surface) 88%,transparent);color:var(--dm-ink);font:700 .78rem/1 var(--dm-body);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
body.dm-home .discover-card.compact .discover-desc{display:none}
body.dm-home .recent-card{flex-direction:row;align-items:center;gap:12px;padding:10px 14px 10px 10px}
body.dm-home .recent-card .game-cover{width:88px;flex:none;border-radius:12px}
body.dm-home .recent-card>span{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
body.dm-home .recent-card strong{font:700 .98rem/1.2 var(--dm-body)}
body.dm-home .recent-card small{font-size:.8rem;color:var(--dm-muted)}
body.dm-home .recent-card>svg{width:18px;height:18px;color:var(--dm-primary);flex:none}
body.dm-home .recent-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:14px}
body.dm-home .recent-heading p{margin:.3rem 0 0;font-size:.9rem}
html[data-mode="light"] body.dm-home .game-cover{background:var(--dm-soft)}
html[data-mode="light"] body.dm-home .game-cover>img{mix-blend-mode:multiply}
@media (max-width:699px){
  body.dm-home .instant-grid.dm-scroller>*,body.dm-home #event-picks.dm-scroller>*{flex-basis:min(72vw,280px)}
  body.dm-home .recent-grid{grid-template-columns:1fr}
  body.dm-home .community-row .discover-grid.four{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  body.dm-home .discover-card.compact>strong{font-size:.92rem;padding:10px 12px 0}
  body.dm-home .discover-card.compact>small{padding:8px 12px 12px}
}

/* ---------- Paper teaser and daily challenge ---------- */
.dm-duo{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:16px}
@media (max-width:899px){.dm-duo{grid-template-columns:1fr}}
body.dm-home .newspaper-entry.dm-paper-teaser{--paper:#f6f1e6;--paper-ink:#1f1c17;--paper-rule:#1f1c1733;display:grid;grid-template-columns:minmax(150px,38%) minmax(0,1fr);gap:clamp(16px,2.4vw,28px);align-items:center;margin:0;padding:clamp(16px,2.4vw,24px);border-radius:var(--dm-radius-lg);border:var(--dm-card-border);background:var(--dm-surface);box-shadow:var(--dm-shadow);color:var(--dm-ink);text-decoration:none;min-height:0}
html[data-mode="dark"] body.dm-home .newspaper-entry.dm-paper-teaser{--paper:#e9e2d2;--paper-ink:#1f1c17}
/* The older printed-paper link uses !important in the legacy layer. Keep this
   redesigned teaser on its audience surface, including hover and night mode. */
@layer dm-important{
  body.dm-home .newspaper-entry.dm-paper-teaser{background:var(--dm-surface)!important;color:var(--dm-ink)!important}
  body.dm-home .newspaper-entry.dm-paper-teaser:hover{background:var(--dm-soft)!important}
}
.dm-paper-fold{position:relative;display:flex;flex-direction:column;gap:8px;aspect-ratio:4/5;padding:14px 12px;border-radius:6px;background:var(--paper);color:var(--paper-ink);box-shadow:0 1px 0 rgba(0,0,0,.05),0 22px 30px -22px rgba(0,0,0,.55);transform:rotate(-3deg);overflow:hidden}
.dm-paper-fold::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 48%,rgba(0,0,0,.06) 50%,transparent 53%)}
.dm-paper-mast{font:700 clamp(.95rem,1.6vw,1.25rem)/1 "Newsreader",Georgia,serif;letter-spacing:-.02em;text-align:center;border-bottom:2px solid var(--paper-ink);padding-bottom:6px}
.dm-paper-rule{height:1px;background:var(--paper-ink);opacity:.6}
.dm-paper-cols{flex:1;display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:6px}
.dm-paper-cols i{display:block;background:repeating-linear-gradient(var(--paper-rule) 0 2px,transparent 2px 7px)}
.dm-paper-cols i:first-child{background:linear-gradient(var(--dm-soft-2),var(--dm-soft-2)) 0 0/100% 46% no-repeat,repeating-linear-gradient(var(--paper-rule) 0 2px,transparent 2px 7px) 0 52%/100% 50% no-repeat}
.dm-paper-copy{display:flex;flex-direction:column;gap:6px;min-width:0}
body.dm-home .newspaper-entry-label{font:650 .8rem/1.2 var(--dm-body);color:var(--dm-muted);letter-spacing:0;text-transform:none}
body.dm-home .newspaper-entry-title{font:600 clamp(1.5rem,2.6vw,2.15rem)/1.02 "Newsreader",Georgia,serif;letter-spacing:-.02em;color:var(--dm-ink)}
body.dm-home .newspaper-entry-copy{font-size:.92rem;line-height:1.45;color:var(--dm-muted)}
body.dm-home .newspaper-entry-action{margin-top:4px;font-weight:650;color:var(--dm-primary)}
body.dm-home .newspaper-entry.dm-paper-teaser:hover .newspaper-entry-action{color:var(--dm-ink)}
body.dm-home .daily-panel{display:flex;flex-direction:column;justify-content:space-between;gap:16px;margin:0;padding:clamp(18px,2.4vw,24px);border-radius:var(--dm-radius-lg);background:var(--dm-primary);color:var(--dm-on-primary);border:var(--dm-card-border);box-shadow:var(--dm-shadow)}
body.dm-home .daily-panel .daily-copy{display:block;margin:0}
body.dm-home .daily-panel .daily-icon{display:grid;place-items:center;width:46px;height:46px;margin-bottom:14px;border-radius:14px;background:color-mix(in srgb,var(--dm-on-primary) 16%,transparent);color:var(--dm-accent)}
body.dm-home .daily-panel .daily-icon svg{width:24px;height:24px}
body.dm-home .daily-panel .dm-daily-label{display:block;margin-bottom:4px;font:650 .8rem/1.2 var(--dm-body);opacity:.8}
body.dm-home .daily-panel h2{color:var(--dm-on-primary)!important;font-size:clamp(1.4rem,2.2vw,1.8rem)}
body.dm-home .daily-panel p{margin:.4rem 0 0;color:color-mix(in srgb,var(--dm-on-primary) 82%,transparent)!important;font-size:.92rem;line-height:1.45}
body.dm-home .daily-panel .button{align-self:flex-start;background:var(--dm-accent);border-color:var(--dm-accent);color:var(--dm-on-accent)}
html[data-audience="friends"] body.dm-home .daily-panel{background:var(--dm-pop-2);color:var(--dm-ink)}
html[data-audience="friends"] body.dm-home .daily-panel h2,html[data-audience="friends"] body.dm-home .daily-panel p{color:var(--dm-ink)!important}
body.dm-home .community-row{display:block}
body.dm-home .community-panel{display:block;padding:0;border:0;background:none}
body.dm-home .community-copy{display:block}
body.dm-home .community-copy h2{margin-bottom:.35rem}
@media (max-width:699px){
  body.dm-home .newspaper-entry.dm-paper-teaser{grid-template-columns:104px minmax(0,1fr);gap:14px;padding:14px}
  .dm-paper-cols{display:none}
  .dm-paper-fold{gap:6px;padding:10px 8px}
  .dm-paper-mast{font-size:.72rem}
  body.dm-home .newspaper-entry-copy{display:none}
}

/* ---------- Plans, smart picker, shop teaser, promos ---------- */
body.dm-home .activity-plans{padding:clamp(18px,2.4vw,26px);border-radius:var(--dm-radius-xl);background:var(--dm-soft);border:0;box-shadow:none}
body.dm-home .activity-plans h2{font-size:clamp(1.35rem,2vw,1.7rem)}
body.dm-home .smart-spot{padding:clamp(18px,2.6vw,30px);border-radius:var(--dm-radius-xl);background:var(--dm-surface);border:var(--dm-card-border);box-shadow:var(--dm-shadow)}
body.dm-home .smart-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
body.dm-home .smart-heading p{margin:.35rem 0 0}
body.dm-home .smart-heart{display:grid;place-items:center;width:52px;height:52px;flex:none;border-radius:18px;background:var(--dm-soft);color:var(--dm-primary)}
body.dm-home .smart-heart svg{width:24px;height:24px}
body.dm-home .smart-search{display:flex;gap:10px;margin-top:18px}
body.dm-home .smart-search input{flex:1;min-width:0}
body.dm-home .smart-controls{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin-top:14px}
body.dm-home .smart-controls>label{display:flex;flex-direction:column;gap:6px;font:600 .82rem/1.2 var(--dm-body);color:var(--dm-muted)}
body.dm-home .smart-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
body.dm-home .smart-chips button,body.dm-home .category-tab{display:inline-flex;align-items:center;gap:.45em;min-height:44px;padding:.5em 1em;border-radius:var(--dm-radius-pill);border:var(--dm-border) solid var(--dm-line);background:var(--dm-surface);color:var(--dm-ink);font:600 .88rem/1 var(--dm-body);cursor:pointer;white-space:nowrap}
body.dm-home .category-tab svg{width:17px;height:17px}
body.dm-home .category-tab.active,body.dm-home .category-tab[aria-pressed="true"]{background:var(--dm-ink);border-color:var(--dm-ink);color:var(--dm-page)}
html[data-audience="friends"] body.dm-home .category-tab.active{background:var(--dm-accent);color:var(--dm-on-accent);border-color:var(--dm-line-strong);box-shadow:2px 2px 0 var(--dm-line-strong)}
body.dm-home .smart-results{margin-top:16px}
body.dm-home .smart-results:empty{display:none}
@media (max-width:699px){body.dm-home .smart-search{flex-direction:column}body.dm-home .smart-controls>label{flex:1 1 140px}body.dm-home .smart-controls select{width:100%}}


body.dm-home .pack-entry,body.dm-home .celebrate-cta{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:16px;margin:0;padding:clamp(18px,2.4vw,26px);border-radius:var(--dm-radius-lg);border:var(--dm-card-border);background:var(--dm-surface);box-shadow:var(--dm-shadow);color:var(--dm-ink);text-decoration:none}
body.dm-home .pack-entry strong{display:block;font:var(--dm-display-weight) clamp(1.35rem,2vw,1.7rem)/1.1 var(--dm-display);letter-spacing:var(--dm-display-tracking)}
body.dm-home .pack-entry>span:first-child>span{display:block;margin-top:.4rem;color:var(--dm-muted);font-size:.92rem;line-height:1.45}
body.dm-home .pack-entry-action{display:inline-flex;align-items:center;gap:.35em;color:var(--dm-primary);font-weight:650}
body.dm-home .pack-entry-action svg{width:17px;height:17px}
body.dm-home .celebrate-cta{background:linear-gradient(150deg,color-mix(in srgb,var(--dm-pop) 26%,var(--dm-surface)),var(--dm-surface) 70%)}
body.dm-home .celebrate-cta h2{font-size:clamp(1.35rem,2vw,1.7rem)}
body.dm-home .celebrate-cta p{margin:.4rem 0 0;font-size:.92rem;line-height:1.45}
body.dm-home .celebrate-cta small{display:block;margin-top:.5rem;font-size:.8rem;color:var(--dm-muted)}
body.dm-home .dm-partners{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
@media (max-width:1099px){body.dm-home .dm-partners{grid-template-columns:1fr}}
body.dm-home .dm-partners .sponsor-slot{margin:0;max-width:none}
body.dm-home .dm-partners .sponsor-slot:only-child{grid-column:1/-1;width:100%;max-width:680px;justify-self:center}
body.dm-home .little-promises{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 22px;margin:0;padding:6px 0;border:0;color:var(--dm-muted);font-size:.86rem}
body.dm-home .little-promises>span{display:inline-flex;align-items:center;gap:.45em}
body.dm-home .little-promises svg{width:17px;height:17px;color:var(--dm-primary)}

/* ---------- Games view ---------- */
body.dm-home .discovery-section{display:flex;flex-direction:column;gap:16px;padding:0;border:0;background:none}
body.dm-home .discovery-section .library-heading{margin:0}
body.dm-home .discovery-section h2{font-size:clamp(2rem,3.6vw,3rem)!important}
.dm-library-filters{display:flex;flex-wrap:wrap;gap:8px}
body.dm-home .side-link{display:inline-flex;align-items:center;gap:.5em;min-height:44px;padding:.5em 1em;border-radius:var(--dm-radius-pill);border:var(--dm-border) solid var(--dm-line);background:var(--dm-surface);color:var(--dm-ink);font:650 .9rem/1 var(--dm-body);cursor:pointer}
body.dm-home .side-link svg{width:17px;height:17px}
body.dm-home .side-link b{min-width:1.6em;padding:.2em .45em;border-radius:999px;background:var(--dm-soft);font-size:.78rem;text-align:center}
body.dm-home .side-link.active{background:var(--dm-primary);border-color:var(--dm-primary);color:var(--dm-on-primary)}
body.dm-home .side-link.active b{background:color-mix(in srgb,var(--dm-on-primary) 20%,transparent)}
body.dm-home .discovery-search{margin:0}
body.dm-home .search-box{display:flex;align-items:center;gap:10px;min-height:56px;padding:0 8px 0 18px;border-radius:var(--dm-radius-pill);border:var(--dm-border) solid var(--dm-line);background:var(--dm-surface);box-shadow:var(--dm-shadow)}
body.dm-home .search-box>svg,body.dm-home .search-box>[data-icon] svg{width:20px;height:20px;color:var(--dm-muted)}
body.dm-home .search-box input{flex:1;min-width:0;min-height:52px;border:0!important;background:none!important;box-shadow:none;padding:0;font-size:1.02rem}
body.dm-home .search-box input:focus{outline:none}
body.dm-home .search-box:focus-within{outline:3px solid var(--dm-accent);outline-offset:2px}
body.dm-home .search-box .icon-button{width:44px;height:44px;border-radius:50%;border:0;background:var(--dm-soft);color:var(--dm-ink);display:grid;place-items:center}
body.dm-home .discovery-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:end;gap:12px;margin:0}
body.dm-home .discovery-filters label{display:flex;flex-direction:column;gap:6px;font:600 .82rem/1.2 var(--dm-body);color:var(--dm-muted)}
body.dm-home .discovery-filters select{width:100%}
body.dm-home .category-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0}
body.dm-home .discovery-result-summary{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0;font-size:.9rem;color:var(--dm-muted)}
body.dm-home .discovery-result-summary p{margin:0}
body.dm-home .activity-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0}
@media (max-width:1299px){body.dm-home .activity-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:899px){body.dm-home .activity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:699px){
  body.dm-home .discovery-filters{grid-template-columns:1fr 1fr}
  body.dm-home .discovery-filters label:first-child{grid-column:1/-1}
  body.dm-home .category-tabs{flex-wrap:nowrap;overflow-x:auto;margin-inline:-14px;padding:2px 14px 6px;scrollbar-width:none}
  body.dm-home .category-tabs::-webkit-scrollbar{display:none}
  body.dm-home .activity-grid{gap:10px}
}
@media (max-width:359px){body.dm-home .activity-grid{grid-template-columns:1fr}}
body.dm-home .game-card{position:relative;display:flex;flex-direction:column;min-width:0;margin:0;border-radius:var(--dm-radius-lg);background:var(--dm-surface);border:var(--dm-card-border);box-shadow:var(--dm-shadow);overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}
body.dm-home .game-card:hover{transform:translateY(-3px);box-shadow:var(--dm-shadow-lift)}
body.dm-home .game-card .card-main{all:unset;box-sizing:border-box;display:flex;flex-direction:column;flex:1;cursor:pointer;color:var(--dm-ink)}
body.dm-home .game-card .card-main:focus-visible{outline:3px solid var(--dm-accent);outline-offset:-3px;border-radius:var(--dm-radius-lg)}
body.dm-home .game-card .game-cover{border-radius:0}
body.dm-home .game-card-copy{display:flex;flex-direction:column;gap:4px;padding:12px 14px 4px;flex:1}
body.dm-home .card-category{font:650 .72rem/1.2 var(--dm-body);color:var(--dm-muted)}
body.dm-home .game-card h3{margin:0;font:700 1rem/1.2 var(--dm-body);color:var(--dm-ink)}
body.dm-home .game-card p{margin:0;font-size:.84rem;line-height:1.38;color:var(--dm-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.dm-home .card-meta{display:flex;align-items:center;gap:6px;margin-top:auto;padding-top:8px;font:600 .78rem/1 var(--dm-body);color:var(--dm-muted)}
body.dm-home .card-meta svg{width:14px;height:14px}
body.dm-home .card-play-label{display:inline-flex;align-items:center;gap:.25em;margin-left:auto;color:var(--dm-primary)}
body.dm-home .game-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:8px 10px 10px}
body.dm-home .game-card-actions button{display:inline-flex;align-items:center;justify-content:center;gap:.35em;min-height:44px;padding:0 .5em;border-radius:var(--dm-radius-sm);border:1px solid var(--dm-line);background:transparent;color:var(--dm-ink);font:600 .8rem/1 var(--dm-body);cursor:pointer}
body.dm-home .game-card-actions button svg{width:16px;height:16px}
body.dm-home .favourite-button.saved{background:color-mix(in srgb,var(--dm-pop) 22%,var(--dm-surface));border-color:color-mix(in srgb,var(--dm-pop) 50%,var(--dm-line));color:var(--dm-ink)}
body.dm-home .favourite-button.saved svg{fill:var(--dm-pop);stroke:var(--dm-pop)}
body.dm-home .game-card.completed .card-category::after{content:" · Played";color:var(--dm-primary)}
@media (max-width:699px){
  body.dm-home .game-card-copy{padding:10px 10px 2px}
  body.dm-home .game-card p{display:none}
  body.dm-home .game-card h3{font-size:.92rem}
  body.dm-home .game-card-actions{padding:6px 8px 8px}
  body.dm-home .game-card-actions button span{display:none}
}
body.dm-home .library-footer{display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 0;color:var(--dm-muted);font-size:.86rem;text-align:center}
body.dm-home .library-footer p{margin:0;font:var(--dm-display-weight) 1.15rem/1.2 var(--dm-display);color:var(--dm-ink)}
body.dm-home .empty-library{padding:28px;border-radius:var(--dm-radius-lg);background:var(--dm-soft);text-align:center}

/* ---------- Play screen ---------- */
body.dm-home #play-view{padding:0 0 24px}
body.dm-home .play-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;margin:0 0 14px;padding:0;border:0;background:none}
body.dm-home .play-heading .button.quiet{min-height:44px;padding:.5em .9em .5em .7em;border-radius:var(--dm-radius-pill);background:var(--dm-surface);border:var(--dm-card-border);color:var(--dm-ink)}
body.dm-home .play-heading .tiny-eyebrow{display:block!important;font:650 .78rem/1.2 var(--dm-body);color:var(--dm-muted);letter-spacing:0;text-transform:none}
body.dm-home #play-title{margin:2px 0 0;font:var(--dm-display-weight) clamp(1.5rem,3vw,2.3rem)/1.05 var(--dm-display);letter-spacing:var(--dm-display-tracking);color:var(--dm-ink)}
body.dm-home .play-theme-context{margin:.35rem 0 0;font-size:.86rem;color:var(--dm-muted)}
body.dm-home .play-favourite{width:46px;height:46px;border-radius:50%;border:var(--dm-card-border);background:var(--dm-surface);color:var(--dm-ink)}
body.dm-home .live-play-status{display:flex;align-items:center;gap:8px;min-height:40px;margin:0 0 14px;padding:.55em 1em;border-radius:var(--dm-radius-pill);background:var(--dm-soft);color:var(--dm-ink);font:600 .86rem/1.3 var(--dm-body);border:0}
body.dm-home .live-play-status::before{content:"";width:8px;height:8px;flex:none;border-radius:50%;background:var(--dm-muted)}
body.dm-home .live-play-status.live::before{background:#2fbf71;box-shadow:0 0 0 4px rgba(47,191,113,.2)}
body.dm-home .live-play-status.waiting::before{background:var(--dm-accent)}
body.dm-home .activity-shell{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
body.dm-home #game-stage{min-width:0;padding:clamp(14px,2.4vw,28px);border-radius:var(--dm-radius-xl);background:var(--dm-surface);border:var(--dm-card-border);box-shadow:var(--dm-shadow)}
body.dm-home .play-aside{display:flex;flex-direction:column;gap:12px}
body.dm-home .play-note{display:flex;flex-direction:column;gap:8px;margin:0;padding:18px;border-radius:var(--dm-radius-lg);background:var(--dm-surface);border:var(--dm-card-border);box-shadow:none}
body.dm-home .play-note.pale{background:var(--dm-soft);border-color:transparent}
body.dm-home .play-note>svg,body.dm-home .play-note>[data-icon] svg{width:22px;height:22px;color:var(--dm-primary)}
body.dm-home .play-note h3{margin:0;font:var(--dm-display-weight) 1.2rem/1.15 var(--dm-display);color:var(--dm-ink)}
body.dm-home .play-note p{margin:0;font-size:.9rem;line-height:1.45;color:var(--dm-muted)}
body.dm-home .game-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
body.dm-home .play-bottom{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-top:16px;padding:0;border:0;color:var(--dm-muted);font-size:.88rem}
body.dm-home .activity-shell.movie-mode{grid-template-columns:1fr}
@media (max-width:999px){body.dm-home .activity-shell{grid-template-columns:1fr}body.dm-home .play-aside{display:grid;grid-template-columns:1fr 1fr}}
@media (max-width:699px){
  body.dm-home .play-heading{grid-template-columns:auto minmax(0,1fr) auto;gap:10px}
  body.dm-home .play-heading .button.quiet{font-size:0;width:44px;padding:0;justify-content:center}
  body.dm-home .play-heading .button.quiet::before{content:"";width:10px;height:10px;border-left:2.5px solid currentColor;border-bottom:2.5px solid currentColor;transform:translateX(2px) rotate(45deg)}
  body.dm-home #game-stage{padding:12px;border-radius:var(--dm-radius-lg)}
  body.dm-home .play-aside{grid-template-columns:1fr}
}

/* Horizontal shelves on phones: keep cards at a readable width. */
@media (max-width:699px){
  body.dm-home .dm-scroller>.instant-card,body.dm-home .dm-scroller>.discover-card,body.dm-home .dm-scroller>.dm-product{flex:0 0 min(74vw,290px)}
}

/* The armed proposal surprise in the game header (asker's screen only). */
.dm-surprise-btn{display:inline-flex;align-items:center;justify-content:center;gap:.4em;width:46px;height:46px;padding:0;border-radius:999px;border:var(--dm-card-border);background:var(--dm-surface);color:var(--dm-pop);cursor:pointer;transition:width .3s cubic-bezier(.3,1.3,.5,1),background-color .2s ease;overflow:hidden;white-space:nowrap}
.dm-surprise-btn svg{width:24px;height:24px;flex:none}
.dm-surprise-label{display:none;font:700 .9rem/1 var(--dm-body)}
.dm-surprise-btn[data-step="confirm"]{width:auto;padding:0 1em 0 .75em;background:linear-gradient(135deg,#ffd27a,#f6a5c0);border-color:transparent;color:#3a1028}
.dm-surprise-btn[data-step="confirm"] .dm-surprise-label{display:inline}
@media (prefers-reduced-motion:no-preference){.dm-surprise-btn:not([data-step]) svg{animation:dm-surprise-glow 2.8s ease-in-out infinite}}
@keyframes dm-surprise-glow{0%,100%{filter:drop-shadow(0 0 0 transparent)}50%{filter:drop-shadow(0 0 5px currentColor)}}
body.dm-home .play-heading{grid-template-columns:auto minmax(0,1fr) auto auto}

/* In the Games tab, this week's picks and your saved plan sit above the library. */
#library-view[data-view="games"] #recent-activities{order:-2}
#library-view[data-view="games"] #activity-plans{order:-1}


/* Games: message text must remain readable against every audience/season theme. */
body.dm-home #game-stage .game-content{
  color:var(--dm-ink);
  background:transparent;
  border:0;
  box-shadow:none;
  padding:clamp(6px,1.2vw,14px);
  min-width:0;
}
body.dm-home #game-stage :is(.game-hint,.simon-status,.competition-help){
  color:var(--dm-muted);
  font-size:clamp(.88rem,1.7vw,.98rem);
  line-height:1.55;
  opacity:1;
}
body.dm-home #game-stage .game-message{
  color:#382d17;
  background:#fff2ce;
  border:1px solid #e5d29d;
  font-weight:650;
  padding:14px 16px;
  border-radius:12px;
  line-height:1.6;
  overflow-wrap:anywhere;
}
body.dm-home #game-stage .result-banner{
  background:#e7f2e4;
  border:1px solid #bed8ba;
  color:#203f2b;
}
body.dm-home #game-stage .result-banner :is(strong,p){color:#203f2b}
body.dm-home #game-stage :is(.arcade-score,.turn-pill,.simon-round){
  color:#1e4538;
}
body.dm-home #game-stage .turn-pill{
  background:#e9f4df;
  border:1px solid #c9ddba;
  font-weight:700;
}
body.dm-home #game-stage .simon-round{
  width:100%;
  max-width:420px;
  padding:10px 15px;
  border-radius:12px;
  background:#ebf3ed;
  font-size:.9rem;
  font-weight:750;
}
body.dm-home #game-stage :is(.option,.option-letter):disabled{opacity:1}
body.dm-home #game-stage .option:disabled{color:#263e33}
body.dm-home #game-stage .option.incorrect:disabled{color:#742d2d}
body.dm-home #game-stage .option.correct:disabled{color:#204d2a}
body.dm-home #game-stage .bond-footnote{color:#4b6057}
@media(max-width:650px){
  body.dm-home #game-stage .game-content{padding:8px 3px}
  body.dm-home #game-stage .game-message{font-size:.9rem}
}


/* Read My Heart: a deliberate standalone game screen, not a generic questionnaire. */
body.dm-home #game-stage .read-my-heart{
  width:100%;
  max-width:840px;
  margin-inline:auto;
  display:grid;
  gap:14px;
  color:var(--dm-ink);
}
body.dm-home #game-stage .heart-game-hero{
  padding:clamp(20px,3vw,32px);
  border-radius:24px;
  text-align:left;
  color:var(--dm-ink);
  border:1px solid var(--dm-line);
  background:linear-gradient(120deg,
    color-mix(in srgb,var(--dm-soft) 80%,var(--dm-surface)),
    var(--dm-surface));
}
body.dm-home #game-stage .heart-game-hero>span{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.72rem;font-weight:800;letter-spacing:.10em;
  color:var(--dm-primary);
}
body.dm-home #game-stage .heart-game-hero>span svg{width:19px;height:19px}
body.dm-home #game-stage .heart-game-hero h2{
  margin:9px 0 6px;
  color:var(--dm-ink);
  font:var(--dm-display-weight) clamp(2rem,4vw,3rem)/1.05 var(--dm-display);
}
body.dm-home #game-stage .heart-game-hero p{
  color:var(--dm-muted);line-height:1.6;max-width:650px;margin:0;
}
body.dm-home #game-stage .heart-game-stats{
  margin-top:20px;display:flex;flex-wrap:wrap;gap:10px;
}
body.dm-home #game-stage .heart-game-stats>span{
  display:inline-flex;align-items:center;gap:7px;
  border-radius:999px;border:1px solid var(--dm-line);
  background:var(--dm-surface);padding:9px 12px;
  font-size:.78rem;font-weight:750;color:var(--dm-ink);
}
body.dm-home #game-stage .heart-game-stats svg{height:16px;width:16px;color:var(--dm-primary)}
body.dm-home #game-stage .read-my-heart .bond-journey{
  margin:0;padding:12px 4px;color:var(--dm-ink);
}
body.dm-home #game-stage .read-my-heart .bond-main{
  background:var(--dm-surface);
  border:1px solid var(--dm-line);
  box-shadow:none;border-radius:24px;
  padding:clamp(18px,4vw,36px);
  min-width:0;
}
body.dm-home #game-stage .read-my-heart .bond-main>h2{
  font:var(--dm-display-weight) clamp(1.5rem,3vw,2.15rem)/1.25 var(--dm-display);
  letter-spacing:-.01em;
  color:var(--dm-ink);
  max-width:690px;margin:12px auto 10px;
}
body.dm-home #game-stage .heart-question-category,
body.dm-home #game-stage .heart-spotlight{
  display:inline-flex;align-items:center;gap:7px;
  font-size:.76rem;font-weight:800;
  color:var(--dm-primary);
  margin:3px 6px;
}
body.dm-home #game-stage .heart-question-category{
  padding:7px 12px;background:var(--dm-soft);border-radius:999px;
}
body.dm-home #game-stage .heart-spotlight svg{height:17px;width:17px}
body.dm-home #game-stage .read-my-heart .bond-moment-art{
  margin:10px auto;
  opacity:.75;
}
body.dm-home #game-stage .read-my-heart .bond-options{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;margin:22px 0 12px;
}
body.dm-home #game-stage .read-my-heart .bond-option{
  display:flex;align-items:center;justify-content:flex-start;text-align:left;
  min-height:80px;padding:14px;
  border-radius:16px;
  background:var(--dm-surface);
  border:1px solid var(--dm-line);
  color:var(--dm-ink);
  font-size:.94rem;font-weight:650;
  white-space:normal;line-height:1.4;
}
body.dm-home #game-stage .read-my-heart .bond-option:hover:not(:disabled){
  border-color:var(--dm-primary);background:var(--dm-soft);
}
body.dm-home #game-stage .read-my-heart .bond-option>span{
  flex:0 0 42px;display:grid;place-items:center;width:42px;height:42px;
  border-radius:12px;background:var(--dm-soft);color:var(--dm-primary);
}
body.dm-home #game-stage .read-my-heart .bond-option svg{width:21px;height:21px}
body.dm-home #game-stage .read-my-heart .bond-speaker{
  color:var(--dm-muted);font-size:.93rem;line-height:1.55;
}
body.dm-home #game-stage .read-my-heart .bond-answer{
  border-color:var(--dm-line);background:var(--dm-soft);
  color:var(--dm-ink);
}
body.dm-home #game-stage .read-my-heart .bond-answer p{color:var(--dm-ink)}
body.dm-home #game-stage .read-my-heart .bond-outcome{
  background:var(--dm-soft);color:var(--dm-ink);
  font-weight:750;border-radius:14px;
  padding:12px 16px;
}
body.dm-home #game-stage .read-my-heart .bond-outcome.is-match{
  background:#e4f3e4;color:#235537;
}
body.dm-home #game-stage .read-my-heart .bond-next-step,
body.dm-home #game-stage .read-my-heart .bond-wait{
  color:var(--dm-ink);background:var(--dm-soft);
  border-color:var(--dm-line);
}
body.dm-home #game-stage .read-my-heart .bond-next-step p,
body.dm-home #game-stage .read-my-heart .bond-wait p{color:var(--dm-ink)}
body.dm-home #game-stage .read-my-heart .bond-finish{
  background:var(--dm-surface);border:1px solid var(--dm-line);
  color:var(--dm-ink);border-radius:24px;
}
body.dm-home #game-stage .read-my-heart .bond-finish :is(h2,p){color:var(--dm-ink)}
@media(max-width:520px){
  body.dm-home #game-stage .read-my-heart .bond-options{grid-template-columns:1fr}
  body.dm-home #game-stage .read-my-heart .bond-option{min-height:65px}
  body.dm-home #game-stage .heart-game-hero{padding:20px}
}


/* Turbo Dash: two responsive three-lane tracks with live racing telemetry. */
body.dm-home #game-stage .race-game{width:100%;min-width:0;color:var(--dm-ink)}
body.dm-home #game-stage .race-intro{
  display:flex;flex-direction:column;align-items:center;gap:9px;
  margin:0 auto 20px;text-align:center;
}
body.dm-home #game-stage .race-intro h2{
  margin:0;color:var(--dm-ink);
  font:var(--dm-display-weight) clamp(1.8rem,3.5vw,2.65rem)/1.1 var(--dm-display);
}
body.dm-home #game-stage .race-intro p{
  margin:0;max-width:660px;color:var(--dm-muted);line-height:1.55;font-size:.91rem;
}
body.dm-home #game-stage .race-intro .comp-eyebrow{color:var(--dm-primary)}
body.dm-home #game-stage .race-intro .race-start{margin-top:12px;padding:12px 22px;min-height:50px}
body.dm-home #game-stage .racing-stadium{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));
  gap:16px;
  background:transparent;
  border:0;
  padding:0;
}
body.dm-home #game-stage .race-driver{
  min-width:0;display:flex;flex-direction:column;gap:10px;
  padding:clamp(10px,2vw,18px);
  background:var(--dm-surface);
  border:1px solid var(--dm-line);
  border-radius:20px;
}
body.dm-home #game-stage .race-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  text-align:left;
}
body.dm-home #game-stage .race-head>div:first-child{display:grid;gap:2px;min-width:0}
body.dm-home #game-stage .race-head strong{font-size:1.1rem;color:var(--dm-ink);overflow-wrap:anywhere}
body.dm-home #game-stage .race-head small{font-size:.67rem;letter-spacing:.07em;color:var(--dm-muted);font-weight:800}
body.dm-home #game-stage .race-speed{display:flex;align-items:baseline;gap:4px}
body.dm-home #game-stage .race-speed strong{font-size:clamp(1.3rem,3vw,2rem);font-variant-numeric:tabular-nums;color:var(--dm-primary)}
body.dm-home #game-stage .race-speed small{font-weight:750;color:var(--dm-muted);font-size:.63rem}
body.dm-home #game-stage .race-canvas{
  display:block;width:100%;aspect-ratio:640/230;height:auto;
  border-radius:14px;border:2px solid #1e3537;
  background:#1e3035;touch-action:manipulation;
}
body.dm-home #game-stage .race-progress,
body.dm-home #game-stage .race-meters{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:8px;font-size:.76rem;font-weight:750;color:var(--dm-ink);
}
body.dm-home #game-stage .race-progress span{display:inline-flex;align-items:center;gap:5px}
body.dm-home #game-stage .race-progress svg{width:15px;height:15px;color:var(--dm-primary)}
body.dm-home #game-stage .race-progress-bar{
  height:9px;border-radius:999px;overflow:hidden;background:var(--dm-soft-2);
}
body.dm-home #game-stage .race-progress-bar>span{
  display:block;height:100%;border-radius:inherit;
  background:var(--dm-primary);transition:width .1s linear;
}
body.dm-home #game-stage .race-meters>div{display:flex;flex:1 1 165px;gap:7px;align-items:center}
body.dm-home #game-stage .race-meter{
  display:inline-block;flex:1;height:7px;overflow:hidden;
  background:#e8dfe0;border-radius:999px;
}
body.dm-home #game-stage .race-meter i{
  display:block;height:100%;
  background:#de9d62;transition:width .12s linear;
}
body.dm-home #game-stage .race-meter.health i{background:#6eaf83}
body.dm-home #game-stage .race-actions{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;justify-content:stretch;margin-top:4px;
}
body.dm-home #game-stage .race-actions .button{
  min-width:0;min-height:45px;
  width:100%;padding:10px 8px;
  border-radius:11px;
  white-space:normal;
  line-height:1.25;
  font-size:.8rem;
}
body.dm-home #game-stage .race-actions .race-nitro{
  background:#f9e5b2;border-color:#e3c478;color:#533b10;
}
body.dm-home #game-stage .race-actions .race-cool{
  grid-column:span 2;
  background:var(--dm-soft);color:var(--dm-ink);border-color:var(--dm-line);
}
body.dm-home #game-stage .race-actions .race-steer svg{width:19px;height:19px}
body.dm-home #game-stage .race-actions .button:disabled{opacity:.5;cursor:not-allowed}
body.dm-home #game-stage .race-result{
  padding:12px 16px;border-radius:10px;
  background:var(--dm-soft);color:var(--dm-ink);
  text-align:center;overflow-wrap:anywhere;
}
@media(max-width:480px){
  body.dm-home #game-stage .race-driver{padding:10px}
  body.dm-home #game-stage .race-progress{font-size:.7rem}
  body.dm-home #game-stage .race-intro{gap:7px}
}
/* First visit: lead with what Duemello is, then ask who is joining. */
html[data-first-run] body.dm-home #library-view>.welcome.dm-hero,body.dm-home :has(>.social-start[data-first-run])>.welcome.dm-hero{order:-2}
html[data-first-run] body.dm-home #library-view>.social-start{order:-1}
