/* Build 025: lower mobile header, compact joined pumpkin and undistorted stars. */
.mobile-header-pumpkin,.halloween-mobile-sweep,.mobile-footer-art,.mobile-wood{display:none}
@media(max-width:760px){
  /* Natural-ratio mirrored image tiles keep grain scale independent of page height.
     Alternating tile edges meet at identical image rows, avoiding a hard restart. */
  .landing .themed-interior{position:relative;isolation:isolate;background-image:none}
  .mobile-wood{display:flex;position:absolute;inset:0;flex-direction:column;overflow:hidden;pointer-events:none;z-index:-1}
  .mobile-wood>img{display:block;width:100%;min-width:512px;max-width:none;height:auto;aspect-ratio:3/2;flex:none;margin:0}
  .mobile-wood>img+img{margin-top:-1px}
  .mobile-wood>img:nth-child(even){transform:scaleY(-1)}
  .mobile-wood::after{content:'';position:absolute;inset:0;background:repeating-linear-gradient(90deg,#24170e99 0,#1b100bd9 1px,#b27b4377 2px,transparent 3px,transparent 64px),linear-gradient(#29180c16,#29180c16)}
  [data-theme=halloween] .mobile-wood::after{background:repeating-linear-gradient(90deg,#160b0799 0,#0a0605dd 1px,#a5683455 2px,transparent 3px,transparent 64px),linear-gradient(#200c0644,#130b0644)}

  /* One natural-ratio SVG joins pumpkin ribbons and bands at every width. */
  [data-theme=halloween] .masthead{--halloween-header:clamp(116px,34vw,146px);overflow:visible}
  [data-theme=halloween] .masthead::before{background-image:url('assets/halloween-stars-mobile.svg');background-size:cover;background-position:center}
  [data-theme=halloween] .masthead .identity{left:50%;top:clamp(26px,9.2vw,40px);width:84%;max-width:440px;transform:translateX(-50%);text-align:center}
  [data-theme=halloween] .masthead .logo{width:100%;height:auto;max-height:none;object-fit:contain}
  [data-theme=halloween] .masthead .tagline{width:75%;margin:6px auto 0;font-size:clamp(8.5px,2.6vw,11px);line-height:1.2;letter-spacing:0}
  [data-theme=halloween] .masthead .header-moon{right:8px;top:5px;width:48px;height:48px;opacity:.8}
  [data-theme=halloween] .masthead .header-web{width:18%;max-width:68px}
  [data-theme=halloween] .masthead .mobile-header-pumpkin{display:block;position:absolute;right:4px;bottom:-15px;width:clamp(76px,24vw,102px);height:auto;z-index:2;pointer-events:none}
  [data-theme=halloween] .halloween-sweep{display:none}
  [data-theme=halloween] .halloween-mobile-sweep{display:block;position:relative;flex:none;width:100%;height:auto;aspect-ratio:420/110;overflow:visible;z-index:4;pointer-events:none}
  [data-theme=halloween] .interior-web{top:calc((100vw - 26px)*.18);width:17%}
  [data-theme=halloween] .themed-interior>.bubble-headline{font-size:clamp(24px,6.6vw,34px);line-height:1.12;max-width:92%;margin:10px auto 8px;letter-spacing:-.9px}
  [data-theme=halloween] .console-layout{margin-top:0}

  /* Cream concept footer: maple leaves beside, fading ribbons below the words. */
  [data-theme=halloween] .landing{--signal-1:#bd3010;--signal-2:#d9400c;--signal-3:#ed550b;--signal-4:#f77c12;--signal-5:#f6aa32;--signal-stroke:calc((100vw - 26px)/70)}
  [data-theme=halloween] .landing .footer::before,[data-theme=halloween] .landing .footer::after{display:none;content:none}
  [data-theme=halloween] .landing .footer{position:relative;isolation:isolate;padding:12px 38px 16px;gap:4px;min-height:62px;background:linear-gradient(90deg,#f3d9a8,#fff0ca 50%,#f3d9a8)}
  [data-theme=halloween] .mobile-footer-art{display:flex;justify-content:space-between;align-items:center;position:absolute;inset:0;z-index:-1;pointer-events:none}
  .mobile-footer-art>img{display:block;width:40%;max-width:160px;height:100%;object-fit:contain;object-position:left center}
  .mobile-footer-art>img:last-child{transform:scaleX(-1)}
  [data-theme=halloween] .landing .footer>strong{font-size:clamp(10px,2.9vw,14px);line-height:1.2;max-width:100%;white-space:nowrap;letter-spacing:0}
  [data-theme=halloween] .landing .footer>span{font-size:9px;line-height:1.3}

  /* Recover a little usable glass space without changing cabinet proportions. */
  .monitor .crt-phosphor{padding:3.5% 4.5%;gap:3px}
  .monitor .screen-topline{min-height:18px}
  .monitor .terminal-bar{padding-bottom:.2em;margin-bottom:.3em}
  .monitor .terminal-bar h2{line-height:1.2;letter-spacing:.35px}
  .monitor .announcement p,.monitor #typed-announcement p,.monitor .terminal-measure p{line-height:1.25;margin-bottom:.35em}
  .monitor .announcement p:last-child,.monitor #typed-announcement p:last-child,.monitor .terminal-measure p:last-child{margin-bottom:0}
}
@media(min-width:540px) and (max-width:760px){
  [data-theme=halloween] .masthead{--halloween-header:clamp(150px,26vw,198px)}
  [data-theme=halloween] .masthead .identity{top:30px}
  [data-theme=halloween] .masthead .header-moon{width:58px;height:58px}
}

@media(min-width:540px) and (max-width:760px){
  [data-theme=halloween] .landing .footer{min-height:74px;padding-top:17px;padding-bottom:23px}
}
