/* Desktop journal and workspaces. Keep mobile layout and fixed brand artwork. */
@media (min-width:1024px) {
  :root body { --desktop-gutter:max(32px,calc((100vw - 1240px)/2)); --desktop-gallery-gutter:max(32px,calc((100vw - 1360px)/2)); }
  :root body .amao-site-header { padding:16px var(--desktop-gutter); gap:16px 24px; }
  :root body .amao-site-header .site-brand { flex:0 0 auto; order:0; }
  :root body .amao-site-header .site-header-links { flex:1 1 0; order:1; justify-content:center; gap:8px 24px; }
  :root body .amao-site-header .site-language { order:2; margin:0; }

  /* Home: alternate compact visual entries with comfortable reading columns. */
  :root body .amao-home :is(.section,.hero,.case-section,.fanclub,footer) { padding-inline:var(--desktop-gutter); }
  :root body .amao-home .section { padding-block:64px; }
  :root body .amao-home h2 { font-size:clamp(30px,2.65vw,38px); line-height:1.4; }
  :root body .amao-home .hero { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:56px; padding-block:36px 48px; }
  :root body .amao-home .hero-photo-wrap { width:100%; max-width:520px; justify-self:center; }
  :root body .amao-home .hero h1 { font-size:clamp(38px,3.6vw,52px); margin-block:18px 20px; line-height:1.35; }
  :root body .amao-home .hero-copy { max-width:580px; }
  :root body .amao-home .hero-lede { font-size:17px; line-height:1.85; }
  :root body .amao-home .hero-actions { margin-top:24px; }
  :root body .amao-home .home-section-head { margin-bottom:28px; gap:32px; }
  :root body .amao-home .home-section-head>p { max-width:32ch; font-size:15px; }
  :root body .amao-home .play-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
  :root body .amao-home .play-art { height:auto; aspect-ratio:16/9; }
  :root body .amao-home .play-copy { padding:20px 22px; }
  :root body .amao-home .play-copy h4 { font-size:22px; }
  :root body .amao-home .oracle-card-art img { width:clamp(86px,8vw,112px); height:auto; max-height:none; object-fit:contain; }
  :root body .amao-home .creator-grid { gap:24px; }
  :root body .amao-home .creator-card,
  :root body .amao-home .creator-grid .play-card { grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr); }
  :root body .amao-home .creator-grid .play-art { min-height:200px; height:100%; aspect-ratio:auto; }
  :root body .amao-home .collection-grid { gap:24px; }
  :root body .amao-home .collection-art { height:auto; aspect-ratio:2/1; }
  :root body .amao-home .collection-copy { padding:22px 24px; }
  :root body .amao-home .collection-copy h3 { font-size:24px; }
  :root body .amao-home .origin-section { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); gap:64px; }
  :root body .amao-home .origin-title h2 { font-size:40px; }
  :root body .amao-home .origin-copy { max-width:650px; }
  :root body .amao-home .origin-copy>p { line-height:1.85; }
  :root body .amao-home .profile { padding-top:12px; }
  :root body .amao-home .profile-grid { grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:64px; }
  :root body .amao-home .id-card { max-width:470px; }
  :root body .amao-home .family-section { padding-top:8px; }
  :root body .amao-home .family-card { border-radius:16px; padding:22px; box-shadow:none; }
  :root body .amao-home .family-card>p { font-size:15px; line-height:1.85; }
  :root body .amao-home .case-section { grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr); gap:64px; padding-block:56px; }
  :root body .amao-home .case-intro h2 { font-size:38px; }
  :root body .amao-home .case-carousel-shell { width:100%; max-width:720px; justify-self:end; }
  :root body .amao-home .case-file { min-height:290px; padding:28px 32px; border-radius:16px; }
  :root body .amao-home .case-file-heading { margin-bottom:18px; }
  :root body .amao-home .case-file h3 { font-size:26px; }
  :root body .amao-home .case-detail { margin-block:14px 20px; }
  :root body .amao-home .day-section { padding-block:48px; }
  :root body .amao-home .guestbook-heading { gap:48px; }
  :root body .amao-home .guestbook-grid { grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:48px; }
  :root body .amao-home .fanclub { grid-template-columns:280px minmax(0,1fr); gap:32px 48px; padding-block:56px; }
  :root body .amao-home .fanclub>div:first-child { grid-column:1/-1; }
  :root body .amao-home .fanclub h2 { margin-bottom:16px; }
  :root body .amao-home .big-clap { grid-column:1; grid-row:2; width:260px; justify-self:center; }
  :root body .amao-home .milestone-card { grid-column:2; grid-row:2; padding:26px 28px; border-radius:16px; }
  :root body .amao-home .milestone-heading { align-items:start; }
  :root body .amao-home .milestone-heading>div { flex:1 1 300px; }
  :root body .amao-home .milestone-heading>strong { font-size:22px; }
  :root body .amao-home .instagram-link { font-size:16px; }
  :root body .amao-home footer { padding-block:32px; }
  :root:lang(en) body .amao-home .origin-copy,
  :root:lang(ca) body .amao-home .origin-copy { max-width:68ch; }

  /* Galleries: consistent frames preserve the complete original images. */
  :root body .photos-page .gallery-section { padding:44px var(--desktop-gallery-gutter) 64px; }
  :root body .photos-page .gallery-heading { margin-bottom:28px; gap:48px; }
  :root body .photos-page .gallery-heading h1 { font-size:clamp(42px,3.6vw,54px); }
  :root body .photos-page .photo-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px 24px; }
  :root body .photos-page .photo-grid figure { grid-column:auto; }
  :root body .photos-page .photo-grid .photo-frame { height:auto; aspect-ratio:4/5; background:#e9e5da; border-radius:12px; }
  :root body .photos-page .photo-grid .photo-frame img { width:100%; height:100%; object-fit:contain; }
  :root body .photos-page .photo-grid figcaption { padding-block:14px; }
  :root body .photos-footer { padding-inline:var(--desktop-gallery-gutter); }
  :root body .fantasy-hero { grid-template-columns:minmax(0,1fr) minmax(0,.8fr); gap:20px 64px; padding:44px var(--desktop-gallery-gutter) 32px; }
  :root body .fantasy-hero>p:first-child { grid-column:1/-1; margin:0; }
  :root body .fantasy-hero h1 { font-size:clamp(46px,4.1vw,62px); }
  :root body .fantasy-hero>div { max-width:500px; padding-bottom:4px; }
  :root body .fantasy-gallery { grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; padding:0 var(--desktop-gallery-gutter) 64px; }
  :root body .fantasy-footer { padding-inline:var(--desktop-gallery-gutter); }
  :root body .fantasy-card-copy { min-height:130px; }

  /* Morning: a stable preview alongside the existing three editing steps. */
  :root body .studio:not(.wallpaper-shell .studio) { max-width:1320px; padding:28px 32px; grid-template-columns:minmax(0,1fr) minmax(400px,.9fr); gap:32px; }
  :root body .preview-pane { top:20px; }
  :root body .studio>.studio-preview-slot { display:block; align-self:stretch; min-width:0; }
  :root body .paper-stage { padding:20px; }
  :root body #preview { max-height:calc(100svh - 250px); }
  :root body .preview-title { gap:12px; margin-bottom:16px; flex-wrap:wrap; }
  :root body .preview-title h1 { font-size:26px; line-height:1.4; }
  :root body .preview-actions { margin-left:auto; }
  :root body .editor { border-radius:14px; }
  :root body .editor .panel { padding:20px; }
  :root body .editor .panel-heading { gap:8px; }
  :root body .editor .hint { font-size:13px; line-height:1.65; margin-block:10px 12px; }
  :root body .editor .category { margin-block:12px 10px; }
  :root body .editor :is(.photo-grid,.artwork-grid) { grid-template-columns:repeat(3,minmax(0,1fr)); max-height:360px; }
  :root body .editor .date-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; align-items:end; }
  :root body .export-bar { padding:10px var(--desktop-gutter); gap:16px; }
  :root body .export-bar strong { font-size:15px; }

  /* Wallpaper: one editing step at a time, with export always in reach. */
  :root body .wallpaper-shell { max-width:1320px; padding:28px 32px; }
  :root body .wallpaper-shell>h1 { margin:10px 0; font-size:32px; line-height:1.4; }
  :root body .wallpaper-shell>.lede { margin:0 0 24px; max-width:72ch; }
  :root body .wallpaper-shell .studio { grid-template-columns:minmax(0,.95fr) minmax(400px,1.05fr); gap:32px; }
  :root body .wallpaper-shell .preview-panel { top:20px; padding:22px; }
  :root body .wallpaper-shell .preview-wrap { width:min(100%,clamp(180px,calc((100svh - 385px)*.45),300px)); }
  :root body .wallpaper-shell .preview-wrap.desktop { width:100%; }
  :root body .wallpaper-shell .controls.desktop-workspace { display:block; background:var(--visual-paper); border:1px solid var(--visual-line); border-radius:14px; overflow:hidden; }
  :root body .wallpaper-shell .desktop-workspace>.panel { padding:20px; border:0; border-radius:0; box-shadow:none; background:transparent; }
  :root body .wallpaper-shell .desktop-workspace>.workspace-export { border-bottom:1px solid var(--visual-line); }
  :root body .wallpaper-shell .desktop-workspace .panel h2 { margin-top:0; font-size:19px; }
  :root body .wallpaper-shell .workspace-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; padding:8px; background:#f3f5f0; border-bottom:1px solid var(--visual-line); }
  :root body .wallpaper-shell .workspace-tabs button { min-width:0; padding:10px 4px; border:0; background:transparent; border-radius:8px; font-size:14px; line-height:1.5; }
  :root body .wallpaper-shell .workspace-tabs button[aria-selected=true] { color:#fffdf7; background:#284d46; }
  :root body .wallpaper-shell .picker { max-height:350px; grid-template-columns:repeat(3,minmax(0,1fr)); }
  :root body .wallpaper-shell .pick img { height:86px; }
  :root body .wallpaper-shell .decoration-picker { grid-template-columns:repeat(3,minmax(0,1fr)); }
  :root body .wallpaper-shell .wallpaper-backgrounds { grid-template-columns:repeat(3,minmax(0,1fr)); }
  :root body .wallpaper-shell .swatch img { height:88px; }
  :root body .wallpaper-shell .hint { font-size:13px; }
  :root body .wallpaper-shell #output img { max-height:260px; }

  /* Games: centered stages with their own controls and reading space. */
  :root body #amao-mischief { width:min(100%,1320px); max-width:1320px; padding:24px 32px; }
  :root body #amao-mischief>.amao-site-header { padding:16px 24px; border-radius:14px; margin-bottom:24px; }
  :root body #amao-mischief .play-area { grid-template-columns:minmax(0,1fr) 340px; gap:24px; }
  :root body #amao-mischief .objects { grid-template-columns:repeat(2,minmax(0,1fr)); }
  :root body #amao-mischief .stage { position:sticky; top:24px; }
  :root body #amao-mischief .prop { min-height:88px; }
  :root body #amao-mischief .splash { padding:40px; gap:32px; min-height:400px; }
  :root body #amao-mischief .splash>img { height:300px; }
  :root body .escape-shell { width:min(calc(100% - 64px),1240px); display:grid; grid-template-columns:minmax(0,1fr) 210px; gap:18px 24px; padding-top:24px; }
  :root body .escape-shell>.amao-site-header { grid-column:1/-1; padding:16px 24px; margin:0; border-radius:14px; }
  :root body .escape-shell .heading { grid-column:1/-1; margin:0; }
  :root body .escape-shell .heading h1 { font-size:32px; }
  :root body .escape-shell .run-status { grid-column:1/-1; margin:0; }
  :root body .escape-shell>.stage { grid-column:1; width:100%; }
  :root body .escape-shell .playing-controls { grid-column:2; margin:0; width:100%; align-self:center; }
  :root body .escape-shell #jump { min-height:112px; padding:20px 16px; flex-direction:column; gap:10px; }
  :root body .escape-shell #jump>span { min-width:0; max-width:100%; }
  :root body .escape-shell :is(.result,.instructions) { grid-column:1/-1; }

  /* Oracle: the reading takes precedence after a card is revealed. */
  :root body .tarot-page { padding-inline:0; }
  :root body .tarot-page .amao-site-header { margin-inline:0; }
  :root body .tarot-stage { max-width:1320px; padding:48px 32px 64px; grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr); gap:48px; }
  :root body .tarot-intro { top:24px; padding-top:0; }
  :root body .tarot-intro h1 { font-size:clamp(32px,3vw,44px); line-height:1.4; }
  :root body .tarot-reading { max-width:none; width:100%; justify-self:end; }
  :root body .tarot-deck { max-width:620px; margin-inline:auto; gap:20px; }
  :root body .tarot-stage:has(.tarot-card.is-open) { grid-template-columns:minmax(0,1fr); gap:28px; }
  :root body .tarot-stage:has(.tarot-card.is-open) .tarot-intro { position:static; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); column-gap:48px; }
  :root body .tarot-stage:has(.tarot-card.is-open) .tarot-eyebrow { grid-column:1/-1; }
  :root body .tarot-stage:has(.tarot-card.is-open) .tarot-intro h1 { font-size:28px; grid-column:1; grid-row:2/4; margin-block:8px; }
  :root body .tarot-stage:has(.tarot-card.is-open) .tarot-intro :is(.tarot-lede,.tarot-note) { grid-column:2; margin-block:6px; font-size:14px; }
  :root body .tarot-reading:has(.tarot-card.is-open) { display:grid; grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr); gap:24px 40px; align-items:start; max-width:1000px; justify-self:center; }
  :root body .tarot-reading:has(.tarot-card.is-open) :is(.tarot-controls,.tarot-topics,.tarot-history) { grid-column:1/-1; margin-block:0; }
  :root body .tarot-reading:has(.tarot-card.is-open) .tarot-card { grid-column:1; max-width:320px; justify-self:center; }
  :root body .tarot-reading:has(.tarot-card.is-open) .tarot-caption { grid-column:2; margin:0; text-align:left; max-width:60ch; }
  :root body .tarot-reading:has(.tarot-card.is-open) .tarot-caption h2 { font-size:28px; }
  :root body .tarot-footer { max-width:1320px; padding-inline:32px; }
}
@media (min-width:1280px) {
  :root body .photos-page .photo-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  :root body .editor :is(.photo-grid,.artwork-grid) { grid-template-columns:repeat(4,minmax(0,1fr)); }
  :root body .wallpaper-shell .wallpaper-backgrounds { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
