
/* Cards home: layout of the approved light-mode reference, independent of game screens. */
/* Cards home: responsive theme support for both light and dark modes. */
html:not([data-theme="dark"]):has(body[data-page="home"]){
  color-scheme:light;
  --bg:#F7F8FC;
  --bg-deep:#F7F8FC;
  --surface:#fff;
  --surface2:#F7F8FC;
  --line:rgba(23,24,36,.12);
  --line-strong:rgba(23,24,36,.24);
  --text:#171824;
  --text-secondary:#626D85;
  --text-subtle:#6D7790;
  --muted:#68738B;
  --blue:#6730C2;
  --app-accent-ink:#6730C2;
  --product-cards:#6730C2;
  --shadow-soft:0 8px 23px rgba(42,53,101,.065);
}

html[data-theme="dark"]:has(body[data-page="home"]){
  color-scheme:dark;
  --bg:#101119;
  --bg-deep:#0A0B11;
  --surface:#1C1D28;
  --surface2:#252631;
  --line:rgba(255,255,255,.13);
  --line-strong:rgba(255,255,255,.27);
  --text:#F7F8FC;
  --text-secondary:rgba(247,248,252,.86);
  --text-subtle:rgba(247,248,252,.72);
  --muted:rgba(247,248,252,.74);
  --blue:#6730C2;
  --app-accent-ink:var(--brand-violet);
  --product-cards:var(--brand-violet);
  --shadow-soft:0 8px 24px rgba(0,0,0,.18);
}

body[data-page="home"]{background:var(--bg);color:var(--text);font-size:15px}
body[data-page="home"] .topbar{max-width:1440px;margin-inline:auto;background:var(--surface)}
body[data-page="home"] main{width:min(1450px,calc(100% - 72px));margin:auto}
body[data-page="home"] .cards-home{padding-top:24px}
body[data-page="home"] .cards-home-top{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.91fr);gap:17px;align-items:stretch;margin-bottom:20px}
body[data-page="home"] .cards-home-hero{position:relative;min-height:305px;display:grid;grid-template-columns:minmax(0,.94fr) minmax(0,1.04fr);align-items:center;gap:0;padding:12px 0 12px 12px}
body[data-page="home"] .cards-home-hero-copy{position:relative;z-index:1;min-width:0}
body[data-page="home"] .home-eyebrow{margin:0 0 13px;color:var(--brand-violet);font-size:12px;letter-spacing:.025em;text-transform:uppercase;font-weight:900}
body[data-page="home"] .cards-home-hero h1{font-size:clamp(34px,3.6vw,56px);line-height:.98;letter-spacing:-.06em;font-weight:900;margin:0 0 16px;max-width:380px}
body[data-page="home"] .cards-home-hero h1 span{display:inline}
body[data-page="home"] .cards-home-hero h1 em{color:var(--brand-violet);font-style:normal}
body[data-page="home"] .home-subtitle{font-size:clamp(13px,1.1vw,17px);line-height:1.48;color:var(--muted);margin:0 0 19px;max-width:385px}
body[data-page="home"] .home-primary{min-height:50px;padding:10px 26px;border:0;border-radius:14px;background:#6730C2;color:#fff;font-size:15px;font-weight:800;box-shadow:0 5px 11px rgba(103,48,194,.22)}
body[data-page="home"] .home-primary:hover{background:#5723AA;transform:translateY(-1px)}
body[data-page="home"] .home-hero-illustration{display:block;width:100%;height:auto;max-width:495px;justify-self:end}
body[data-page="home"] .cards-daily{margin:0;padding:0;display:flex;flex-direction:column;gap:0;border:1px solid var(--line);border-radius:23px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow-soft);min-width:0}
body[data-page="home"] .cards-daily-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);flex:1;min-height:224px}
body[data-page="home"] .cards-daily-intro{padding:25px 0 20px 26px;position:relative;z-index:1;min-width:0}
body[data-page="home"] .cards-daily h2{font-size:clamp(20px,1.7vw,27px);letter-spacing:-.05em;font-weight:850;line-height:1.15;margin:0 0 15px;white-space:normal}
body[data-page="home"] .cards-daily h2 span:first-child{color:#6730C2}
body[data-page="home"] .cards-daily-intro>p{font-size:14px;line-height:1.35;max-width:235px;color:var(--muted);margin:0 0 11px}
body[data-page="home"] .cards-daily-intro .daily-current{font-size:11px;color:var(--muted);min-height:18px;margin:0 0 10px}
body[data-page="home"] .daily-current strong{font-weight:750;color:var(--text)}
body[data-page="home"] #daily-game-status{margin-left:6px}
body[data-page="home"] .cards-daily .home-primary{min-height:46px;font-size:14px}
body[data-page="home"] .daily-artwork{position:relative;min-width:0;overflow:hidden;background:var(--surface2)}
body[data-page="home"] .daily-artwork>svg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
body[data-page="home"] .daily-date-tag{position:absolute;top:13px;right:13px;max-width:92px;padding:8px 10px;border-radius:12px;background:var(--surface);color:var(--text);font-size:12px;font-weight:850;box-shadow:var(--shadow-soft);text-align:center}
body[data-page="home"] .daily-foot{display:flex;align-items:center;justify-content:space-evenly;gap:12px;padding:16px;border-top:1px solid var(--line);min-height:69px}
body[data-page="home"] .daily-foot-copy{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px;line-height:1.3}
body[data-page="home"] .daily-foot-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:11px;background:var(--surface2);color:#6730C2;font-size:19px}
body[data-page="home"] .home-section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 4px 12px}
body[data-page="home"] .home-section-heading h2{font-size:clamp(20px,1.85vw,26px);letter-spacing:-.047em;margin:0;font-weight:850;line-height:1.2}
body[data-page="home"] .home-link{font-size:13px;font-weight:750;color:#6730C2;white-space:nowrap}
body[data-page="home"] .home-featured-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
body[data-page="home"] .home-featured-card{min-width:0;background:var(--surface);overflow:hidden;padding:7px 7px 13px;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-soft)}
body[data-page="home"] .featured-image{display:block;height:113px;border-radius:13px;overflow:hidden}
body[data-page="home"] .featured-image svg{width:100%;height:100%;object-fit:cover}
body[data-page="home"] .featured-info{padding:10px 10px 0}
body[data-page="home"] .featured-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
body[data-page="home"] .featured-info h3{font-size:22px;letter-spacing:-.05em;line-height:1.1;margin:0;font-weight:850}
body[data-page="home"] .featured-tag{font-size:10px;font-weight:800;background:var(--surface2);color:#6730C2;border-radius:999px;padding:4px 9px}
body[data-page="home"] .home-featured-card:nth-child(2) .featured-tag{background:var(--surface2);color:#B42351}
body[data-page="home"] .home-featured-card:nth-child(3) .featured-tag{background:var(--surface2);color:#086984}
body[data-page="home"] .home-featured-card:nth-child(4) .featured-tag{background:var(--surface2);color:#7F5B00}
body[data-page="home"] .featured-info p{font-size:13px;line-height:1.35;color:var(--muted);min-height:36px;margin:0 0 11px}
body[data-page="home"] .featured-play{display:flex;justify-content:center;align-items:center;min-height:38px;border-radius:22px;border:1px solid var(--line);background:var(--surface2);color:var(--text);font-weight:800;font-size:13px}
body[data-page="home"] .featured-play:hover{background:var(--surface-strong);border-color:var(--brand-violet)}
body[data-page="home"] .home-wellbeing{display:grid;grid-template-columns:minmax(220px,1.3fr) minmax(280px,1.25fr) minmax(208px,.85fr) minmax(160px,.65fr);align-items:center;gap:15px;margin:20px 0 21px;padding:14px 18px;background:var(--surface);border:1px solid var(--line);border-radius:21px;box-shadow:var(--shadow-soft)}
body[data-page="home"] .wellbeing-intro{display:flex;align-items:center;gap:15px;min-width:0}
body[data-page="home"] .wellbeing-heart{display:grid;place-items:center;flex-shrink:0;width:64px;height:64px;background:var(--surface2);color:#FF557E;font-size:45px;border-radius:18px}
body[data-page="home"] .wellbeing-intro h2{font-size:20px;font-weight:850;line-height:1.14;letter-spacing:-.042em;margin:0 0 5px}
body[data-page="home"] .wellbeing-intro p{color:var(--muted);line-height:1.34;font-size:12px;margin:0}
body[data-page="home"] .wellbeing-philosophy{grid-column:1/-1;max-width:920px;margin:0;padding:12px 4px 1px;border-top:1px solid var(--line);color:var(--muted);font-size:12px;line-height:1.55}
body[data-page="home"] .wellbeing-goals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
body[data-page="home"] .wellbeing-goal{min-width:0;display:grid;grid-template-columns:26px auto;grid-template-rows:auto auto;column-gap:3px;align-items:center;padding:10px 6px;border-radius:14px;background:var(--surface2)}
body[data-page="home"] .wellbeing-goal:nth-child(1){background:var(--surface2)}
body[data-page="home"] .wellbeing-goal:nth-child(3){background:var(--surface2)}
body[data-page="home"] .wellbeing-goal>span{grid-row:1/3;text-align:center;font-size:22px;color:#6730C2}
body[data-page="home"] .wellbeing-goal:nth-child(1)>span{color:#0886AC}
body[data-page="home"] .wellbeing-goal:nth-child(3)>span{color:#987000}
body[data-page="home"] .wellbeing-goal strong{font-size:13px;line-height:1.1;white-space:nowrap}
body[data-page="home"] .wellbeing-goal small{font-size:10px;color:var(--muted);line-height:1.2}
body[data-page="home"] .wellbeing-week{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;padding-inline:10px;border-inline:1px solid var(--line)}
body[data-page="home"] .wellbeing-day{display:flex;align-items:center;flex-direction:column;gap:5px;min-width:0}
body[data-page="home"] .wellbeing-dot{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--surface2);color:var(--muted);font-size:22px;line-height:1}
body[data-page="home"] .wellbeing-day.is-active .wellbeing-dot{background:#13C5F7;color:#171824;font-weight:900;font-size:17px}
body[data-page="home"] .wellbeing-day small{font-size:9px;color:var(--muted)}
body[data-page="home"] .wellbeing-status{display:flex;align-items:center;gap:10px;min-width:0}
body[data-page="home"] .wellbeing-status-icon{width:45px;height:45px;display:grid;place-items:center;flex-shrink:0;border-radius:13px;background:var(--surface2);color:#A67B00;font-size:24px}
body[data-page="home"] .wellbeing-status strong{display:block;font-size:12px;line-height:1.4}
body[data-page="home"] .wellbeing-status small{display:block;font-size:10px;line-height:1.3;color:var(--muted)}
body[data-page="home"] .home-benefits-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
body[data-page="home"] .home-benefits-grid article{display:flex;align-items:center;gap:12px;min-width:0;min-height:92px;padding:14px 13px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-soft)}
body[data-page="home"] .benefit-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:15px;flex:0 0 56px;background:var(--surface2);color:#13A7DD;font-size:34px}
body[data-page="home"] .home-benefits-grid article:nth-child(2) .benefit-icon{background:var(--surface2);color:#6730C2}
body[data-page="home"] .home-benefits-grid article:nth-child(3) .benefit-icon{background:var(--surface2);color:#DBA40A}
body[data-page="home"] .home-benefits-grid article:nth-child(4) .benefit-icon{background:var(--surface2);color:#FF557E}
body[data-page="home"] .home-benefits-grid h3{font-size:14px;line-height:1.2;letter-spacing:-.024em;font-weight:850;margin:0 0 6px}
body[data-page="home"] .home-benefits-grid p{font-size:11px;color:var(--muted);line-height:1.35;margin:0}
body[data-page="home"] .catalogue{margin-top:26px;padding:30px 0 48px;border-top:1px solid var(--line)}
body[data-page="home"] .catalogue-search{display:flex;align-items:center;gap:15px;flex-wrap:wrap;font-size:12px;font-weight:750;margin-bottom:10px}
body[data-page="home"] #cards-game-search{min-width:200px;flex:1;max-width:550px;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:13px;min-height:44px;padding:10px 14px}
body[data-page="home"] #cards-search-count{color:var(--muted);font-size:12px}
body[data-page="home"] .catalogue .game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
body[data-page="home"] .catalogue .game-card{min-width:0}
body[data-page="home"] .home-hidden-metrics{display:none}
body[data-page="home"] footer{max-width:1450px}
@media(width <= 1170px){
 body[data-page="home"] main{width:calc(100% - 36px)}
 body[data-page="home"] .cards-home-top{grid-template-columns:1fr}
 body[data-page="home"] .cards-home-hero{min-height:310px}
 body[data-page="home"] .cards-daily-main{min-height:205px}
 body[data-page="home"] .home-wellbeing{grid-template-columns:1fr 1fr}
 body[data-page="home"] .wellbeing-week{border-inline-start:0}
}
@media(width <= 750px){
 body[data-page="home"] main{width:calc(100% - 24px)}
 body[data-page="home"] .cards-home{padding-top:12px}
 body[data-page="home"] .cards-home-hero{grid-template-columns:minmax(0,1fr) minmax(0,.9fr);min-height:255px;padding:15px 0}
 body[data-page="home"] .cards-home-hero h1{font-size:clamp(32px,6.5vw,44px)}
 body[data-page="home"] .home-featured-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body[data-page="home"] .home-benefits-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-page="home"] .home-wellbeing{grid-template-columns:1fr 1fr}
 body[data-page="home"] .catalogue .game-grid{grid-template-columns:1fr}
}
@media(width <= 480px){
 body[data-page="home"] .cards-home-top{gap:10px}
 body[data-page="home"] .cards-home-hero{grid-template-columns:1fr;min-height:0;padding:10px 8px 0}
 body[data-page="home"] .cards-home-hero h1{font-size:clamp(35px,10vw,46px);max-width:390px}
 body[data-page="home"] .cards-home-hero-copy{padding:6px}
 body[data-page="home"] .home-hero-illustration{max-width:315px;justify-self:center;margin-top:-38px}
 body[data-page="home"] .home-subtitle{max-width:345px}
 body[data-page="home"] .home-primary{min-height:46px}
 body[data-page="home"] .cards-daily-main{grid-template-columns:1fr 140px;min-height:213px}
 body[data-page="home"] .cards-daily-intro{padding:18px 0 14px 16px}
 body[data-page="home"] .cards-daily h2{font-size:21px}
 body[data-page="home"] .cards-daily-intro>p{font-size:12px}
 body[data-page="home"] .cards-daily .home-primary{padding:7px 10px;font-size:12px}
 body[data-page="home"] .daily-date-tag{top:8px;right:7px;font-size:10px}
 body[data-page="home"] .daily-foot{padding:10px;gap:7px}
 body[data-page="home"] .daily-foot-copy{font-size:10px;gap:5px}
 body[data-page="home"] .daily-foot-icon{width:26px;height:26px;flex:0 0 26px}
 body[data-page="home"] .home-featured-grid{gap:9px}
 body[data-page="home"] .featured-image{height:82px}
 body[data-page="home"] .featured-info{padding:9px 5px 0}
 body[data-page="home"] .featured-info h3{font-size:18px}
 body[data-page="home"] .featured-tag{font-size:9px}
 body[data-page="home"] .featured-info p{font-size:11px;min-height:46px}
 body[data-page="home"] .home-featured-card{padding:5px 5px 10px}
 body[data-page="home"] .home-section-heading{align-items:start}
 body[data-page="home"] .home-link{font-size:11px;white-space:normal;text-align:right}
 body[data-page="home"] .home-wellbeing{grid-template-columns:1fr;gap:12px;padding:13px}
 body[data-page="home"] .wellbeing-intro h2{font-size:19px}
 body[data-page="home"] .wellbeing-goal{padding:11px}
 body[data-page="home"] .wellbeing-week{border-inline:0;border-top:1px solid #E7EAF2;padding-top:12px}
 body[data-page="home"] .wellbeing-day{flex:1}
 body[data-page="home"] .wellbeing-status{border-top:1px solid #E7EAF2;padding-top:10px}
 body[data-page="home"] .home-benefits-grid{gap:8px}
 body[data-page="home"] .home-benefits-grid article{padding:9px;align-items:flex-start;gap:8px}
 body[data-page="home"] .benefit-icon{width:30px;height:30px;flex-basis:30px;font-size:21px}
 body[data-page="home"] .home-benefits-grid h3{font-size:12px}
 body[data-page="home"] .home-benefits-grid p{font-size:10px}
 body[data-page="home"] .catalogue .game-card{grid-template-columns:38px 1fr auto;padding:12px;gap:9px}
 body[data-page="home"] .catalogue .game-symbol{font-size:29px}
}
@media(prefers-reduced-motion:reduce){body[data-page="home"] .home-primary{transition:none}}

/* Footer links wrap rather than extending beyond a 320px viewport. */
body[data-page="home"] footer{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
body[data-page="home"] footer nav{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
@media(width <= 480px){
 body[data-page="home"] .cards-daily-main{grid-template-columns:minmax(0,1fr) minmax(0,117px)}
 body[data-page="home"] .home-featured-grid,.home-benefits-grid,.home-wellbeing,.wellbeing-goals{min-width:0}
 body[data-page="home"] .home-section-heading{min-width:0}
 body[data-page="home"] .cards-home-hero{min-width:0}
 body[data-page="home"] .cards-home-top>*{min-width:0}
 body[data-page="home"] .wellbeing-goals{gap:4px}
 body[data-page="home"] .wellbeing-goal{grid-template-columns:1fr;text-align:center;justify-items:center}
 body[data-page="home"] .wellbeing-goal>span{grid-row:auto}
}

/* The cropped approved artwork shares a single compressed asset. The date is live UI, not a baked mockup value. */
body[data-page="home"] .daily-artwork>.daily-reference-art{display:block;position:absolute;inset:0;width:100%;height:100%}
body[data-page="home"] .daily-date-tag{z-index:2;min-width:50px;max-width:95px;background:#fff}
body[data-page="home"] .featured-image>svg{display:block;width:100%;height:100%}
body[data-page="home"] .home-hero-illustration{overflow:hidden}

/* Original high-resolution artwork; atlas framing is shared by the six panels. */
body[data-page="home"] .home-hero-illustration{height:auto;aspect-ratio:211 / 150;background-image:url('./assets/cards-illustrations.webp?v=dbf674fa89a23926');background-size:200% 200%;background-position:left top;background-repeat:no-repeat}
body[data-page="home"] .daily-artwork>.daily-reference-art{position:absolute;inset:0;display:block;width:100%;height:100%;background-image:url('./assets/cards-illustrations.webp?v=dbf674fa89a23926');background-size:200% 200%;background-position:right top;background-repeat:no-repeat}
body[data-page="home"] .featured-reference-art{display:block;width:100%;height:100%;background-image:url('./assets/cards-illustrations.webp?v=dbf674fa89a23926');background-size:200% 400%;background-repeat:no-repeat}
body[data-page="home"] .featured-reference-art--klondike{background-position:left 66.6667%}
body[data-page="home"] .featured-reference-art--spider{background-size:200% 400%;background-position:right 66.6667%}
body[data-page="home"] .featured-reference-art--freecell{background-position:left 100%}
body[data-page="home"] .featured-reference-art--yukon{background-size:200% 400%;background-position:right 100%}

/* Keep the seven-day daily-solitaire strip from the approved layout.
   Only real completed daily deals receive checkmarks; wellbeing remains a separate non-punitive goal. */
body[data-page="home"] .daily-foot{justify-content:space-between;gap:10px}
body[data-page="home"] .daily-week-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;flex:1;min-width:0}
body[data-page="home"] .daily-week-day{display:flex;align-items:center;flex-direction:column;gap:4px;min-width:0}
body[data-page="home"] .daily-week-mark{display:grid;place-items:center;border-radius:50%;width:27px;height:27px;background:#EEF0F7;color:#6E7691;font-size:20px}
body[data-page="home"] .daily-week-day.is-complete .daily-week-mark{background:#CDF8E8;color:#06795F;font-weight:900;font-size:17px}
body[data-page="home"] .daily-week-day.is-today .daily-week-mark{outline:2px solid #6730C2;outline-offset:2px}
body[data-page="home"] .daily-week-day small{font-size:9px;color:#657087;line-height:1.2}
body[data-page="home"] .daily-foot>.daily-foot-copy{flex:0 1 40%;max-width:165px}
@media(width <= 480px){
 body[data-page="home"] .daily-foot{gap:8px}
 body[data-page="home"] .daily-week-mark{width:22px;height:22px;font-size:16px}
 body[data-page="home"] .daily-week-day.is-complete .daily-week-mark{font-size:14px}
 body[data-page="home"] .daily-week-strip{gap:2px}
 body[data-page="home"] .daily-foot>.daily-foot-copy{max-width:104px;font-size:9px}
 body[data-page="home"] .daily-foot>.daily-foot-copy .daily-foot-icon{display:none}
}
/* The original illustration contains a historical date badge. The live badge
   fully masks it (including its bottom edge) and displays today's date. */
body[data-page="home"] .daily-date-tag{top:6px;right:6px;width:79px;height:75px;max-width:none;min-width:0;display:grid;place-items:center;padding:8px;font-size:14px;line-height:1.1;text-wrap:balance;border-radius:14px;background:#fff;box-shadow:0 2px 9px rgba(51,40,101,.12)}
body[data-page="home"] .home-hero-illustration{position:relative}
body[data-page="home"] .home-hero-illustration::after{content:"";position:absolute;left:0;bottom:0;width:7px;height:36%;background:var(--bg,#F7F8FC);pointer-events:none}
@media(width <= 480px){
 body[data-page="home"] .daily-date-tag{top:4px;right:4px;width:43px;height:46px;padding:3px;font-size:10px;border-radius:8px}
}

/* The approved benefit row uses simple crisp icons, not unrelated card-suit glyphs. */
body[data-page="home"] .benefit-icon svg{width:32px;height:32px;display:block}
@media(width <= 480px){body[data-page="home"] .benefit-icon svg{width:22px;height:22px}}
