/* Phone composition, including safe areas and phones held sideways. */
:root {
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --safe-left:env(safe-area-inset-left,0px);
  --safe-right:env(safe-area-inset-right,0px);
}
@media (max-width:700px), (max-width:950px) and (hover:none) and (pointer:coarse) {
  :root {--gutter-left:max(20px,var(--safe-left));--gutter-right:max(20px,var(--safe-right));}
  body {padding-top:var(--safe-top);}
  /* An opaque strip keeps scrolling content out of the system status area. */
  body::before {content:'';position:fixed;top:0;left:0;right:0;height:var(--safe-top);z-index:20;background:#0d0d0f;pointer-events:none;}
  .topline {display:none;}
  header,main,footer {padding-left:var(--gutter-left);padding-right:var(--gutter-right);}
  header {min-height:76px;height:76px;background:#0d0d0f;border-color:#30272c;}
  header .brand {display:inline-flex;align-items:center;min-height:44px;font-size:32px;}
  .intro.showcase {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;min-height:0;gap:0;margin:0 calc(-1 * var(--gutter-right)) 0 calc(-1 * var(--gutter-left));padding:0 var(--gutter-right) 0 var(--gutter-left);overflow:hidden;}
  .showcase .hero-copy {grid-row:1;position:relative;width:100%;padding:34px 0 0;}
  .showcase .eyebrow {font-size:10px;letter-spacing:2px;margin:0 0 20px;}
  .showcase h1 {width:100%;margin:0;}
  .showcase h1.hero-slogan {font-size:clamp(48px,13.3vw,76px);line-height:.88;margin:0 0 24px;}
  .hero-categories {gap:14px;font-size:11px;letter-spacing:2px;}
  .portrait-stage {grid-row:2;position:relative;justify-self:center;width:min(calc(100% + 44px),460px);height:auto;aspect-ratio:1122 / 1402;right:auto;bottom:auto;margin:20px -22px -65px;}
  /* The fade follows the actual photo, rather than a taller contain box. */
  .hero-portrait {width:100%;height:auto;object-fit:contain;mask-image:linear-gradient(#000 0%,#000 68%,#000b 84%,transparent 100%);-webkit-mask-image:linear-gradient(#000 0%,#000 68%,#000b 84%,transparent 100%);animation-name:phone-portrait-breathe;}
  @keyframes phone-portrait-breathe {from{transform:translateY(5px) scale(.99)}to{transform:translateY(-4px) scale(1.02)}}
  .hero-aurora {inset:-8% -24%;background:radial-gradient(ellipse at 62% 64%,#72253780,transparent 52%),radial-gradient(ellipse at 26% 25%,#40233155,transparent 55%);}
  .hero-halo {width:min(112%,520px);right:-10%;top:auto;bottom:45px;opacity:.35;}
  .showcase>.hero-thorns {inset:0 -12px auto;height:400px;opacity:.22;mask-image:linear-gradient(#000,transparent 95%);}
  .showcase>.hero-foreground {top:auto;bottom:25px;height:320px;z-index:3;opacity:.23;mask-image:linear-gradient(90deg,#000,transparent 10%,transparent 92%,#000);}
  .showcase::after {content:'';position:absolute;z-index:4;inset:auto 0 0;height:120px;pointer-events:none;background:linear-gradient(transparent,#0d0d0f);}
  .showcase .hero-thorns {--thorn-width:clamp(640px,180vw,1000px);}
  .showcase .hero-thorns .thorn-art {width:var(--thorn-width);height:auto;aspect-ratio:1400 / 820;margin-left:calc((100% - var(--thorn-width)) / 2);}
  .hero-scroll {grid-row:3;position:relative;left:auto;bottom:auto;justify-self:center;justify-content:center;min-height:44px;margin:0 0 20px;padding:12px 4px;font-size:10px;letter-spacing:2px;gap:12px;}
  .hero-scroll::before {width:26px;}

  section[id] {padding:50px 0;scroll-margin-top:calc(20px + var(--safe-top));}
  .section-head {align-items:flex-start;gap:16px;}
  .section-head .eyebrow {font-size:10px;letter-spacing:2px;margin-bottom:12px;}
  h2 {font-size:clamp(36px,10.5vw,54px);}
  .section-thorns {opacity:.23;}
  #fotos .section-thorns,#musik .section-thorns,#games .section-thorns {left:calc(-1 * var(--gutter-left));right:calc(-1 * var(--gutter-right));}
  #fotos {padding-top:32px;padding-bottom:28px;}
  #fotos .section-thorns {top:-55px;height:300px;opacity:.22;mask-image:linear-gradient(transparent,#000 24%,#000 48%,transparent 96%);}
  .photos .section-head {margin-bottom:24px;padding-bottom:16px;}
  .photos .section-head>.text-link {display:inline-flex;align-items:center;min-height:44px;font-size:13px;}
  .gallery {grid-template-columns:repeat(3,minmax(0,1fr));gap:17px 8px;}
  .gallery .photo-card:nth-child(n) {margin-top:0;}
  .gallery img {aspect-ratio:3/4;border-color:#5b424c;}
  .photo-card>span {padding:8px 0;min-height:35px;font-size:11px;line-height:1.25;letter-spacing:.25px;gap:3px;border-color:#49313c;}
  .gallery[data-viewer-ready] .photo-card b {font-size:14px;}
  .personal-note {grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:20px;margin-top:30px;padding-top:24px;}
  .personal-note h3 {font-size:32px;}
  .personal-note img {aspect-ratio:3/4;}
  .personal-note p:last-child {font-size:11px;line-height:1.6;}

  #musik {display:block;margin:20px 0 28px;padding:45px 0 28px;}
  #musik .section-thorns {top:0;bottom:auto;height:320px;opacity:.21;}
  #musik .music-intro {margin-bottom:24px;}
  #musik .section-head {flex-direction:row;align-items:flex-end;gap:12px;}
  #musik h2 {font-size:clamp(36px,10.5vw,54px);max-width:none;}
  #musik .music-label {font-size:9px;letter-spacing:1.4px;margin:0 0 4px;white-space:nowrap;}
  .playlists {grid-template-columns:minmax(0,1fr);gap:26px;}
  .playlist:nth-child(2) {margin-top:0;}
  .record-cover {min-height:210px;aspect-ratio:1.65;padding:22px;}
  .record-cover h3 {font-size:clamp(44px,12vw,58px);margin:18px 0;}
  .record-art {width:76%;right:-12%;}
  .record-edition,.record-bottom {font-size:10px;letter-spacing:1.7px;}
  .playlist iframe {height:152px;margin:12px 0 4px;}
  .playlist>.text-link {display:inline-flex;align-items:center;min-height:44px;margin:0;font-size:12px;}



  #games {padding-top:45px;padding-bottom:40px;}
  #games .section-thorns {top:-25px;bottom:auto;height:320px;opacity:.23;}
  #games .section-head {flex-direction:column;align-items:flex-start;gap:16px;margin-bottom:22px;}
  #games .summary {padding:9px 12px;font-size:11px;letter-spacing:1px;}
  .section-copy {font-size:14px;line-height:1.65;margin-bottom:24px;}
  #games .servers {grid-template-columns:minmax(0,1fr);gap:18px;}
  #games .server {min-height:310px;padding:20px 18px;}
  #games .server:not(:has(.server-art)) {min-height:190px;padding:20px 18px;}
  #games .server .server-top {padding-bottom:115px;}
  #games .server:not(:has(.server-art)) .server-top {padding-bottom:35px;}
  #games .server .address {gap:12px;flex-wrap:wrap;}
  #games .empty {padding:22px 18px;font-size:14px;}
  footer {flex-direction:row;align-items:center;justify-content:space-between;gap:16px;padding-top:18px;padding-bottom:calc(24px + var(--safe-bottom));}
  .footer-contact {display:inline-flex;align-items:center;min-height:44px;padding:10px 0;font-size:13px;}
  .visit-counter {min-width:0;max-width:55%;text-align:right;}
  #visit-count-status {font-size:11px;letter-spacing:.5px;line-height:1.5;margin:0;}

  .photo-viewer-open body {overflow:hidden;}
  .viewer-shell {padding-top:max(16px,var(--safe-top));padding-bottom:max(18px,var(--safe-bottom));padding-left:max(18px,var(--safe-left));padding-right:max(18px,var(--safe-right));gap:12px;height:100dvh;}
  .viewer-toolbar {gap:12px;}
  .viewer-heading {font-size:11px;letter-spacing:1.5px;}
  .viewer-count {font-size:11px;letter-spacing:1px;}
  .viewer-stage {margin:0;}
  .viewer-button {width:44px;height:44px;}
  .viewer-caption {font-size:12px;gap:12px;}
}
@media (max-width:390px) {
  #games .server .address {flex-direction:column;align-items:stretch;}
  #games .server .copy {width:100%;}
}
@media (max-width:360px) {
  .personal-note {grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:14px;}
  .personal-note h3 {font-size:28px;}
}
/* A wide phone uses a short two-column hero while keeping touch-sized controls. */
@media (min-width:701px) and (max-width:950px) and (max-height:500px) and (hover:none) and (pointer:coarse) {
  header {height:64px;min-height:64px;}
  .intro.showcase {grid-template-columns:minmax(0,1fr) minmax(0,.88fr);grid-template-rows:auto auto;align-items:center;column-gap:20px;}
  .showcase .hero-copy {grid-column:1;grid-row:1;padding:28px 0 20px;}
  .portrait-stage {grid-column:2;grid-row:1 / 3;width:100%;max-width:350px;margin:20px 0 -24px;align-self:end;}
  .showcase h1.hero-slogan {font-size:clamp(48px,6.2vw,62px);}
  .hero-categories {font-size:10px;}
  .hero-scroll {grid-column:1;grid-row:2;justify-self:start;margin-bottom:18px;}
  .hero-halo {width:48%;right:0;bottom:5px;}
  .showcase>.hero-foreground {height:260px;opacity:.2;}
  .playlists {grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;}
  .record-cover {min-height:210px;}
  .record-cover h3 {font-size:46px;}
}
@media (prefers-reduced-motion:reduce) {
  .intro .hero-portrait {animation:none;transform:none;}
}

/* Compact cards with comfortable touch targets and less edge decoration. */
@media (max-width:700px), (max-width:950px) and (hover:none) and (pointer:coarse) {
  section[id] {padding-top:38px;padding-bottom:38px;}
  #musik {margin-top:12px;margin-bottom:18px;padding-top:36px;}
  #games {padding-top:36px;padding-bottom:30px;}
  #fotos .section-thorns,#musik .section-thorns,#games .section-thorns {opacity:.13;}
  #games .servers {gap:16px;}
  #games .server {min-height:280px;padding:18px;}
  #games .server .server-top {padding-bottom:86px;}
  #games .server:not(:has(.server-art)) {min-height:175px;}
  #games .server:not(:has(.server-art)) .server-top {padding-bottom:24px;}
  #games .server-art {object-position:center 35%;height:200px;max-height:none;}
  #games .server .server-game {font-size:30px;line-height:1.1;}
  #games .server .address {display:flex;flex-direction:column;align-items:stretch;gap:12px;margin-top:16px;padding-top:14px;}
  #games .server .address code {font-size:14px;}
  #games .server .copy {width:100%;min-height:48px;}
  #games .summary {max-width:100%;white-space:normal;line-height:1.5;}
  .status-note {padding:12px 14px;font-size:13px;}
}
