* { box-sizing: border-box; }
:root { color-scheme: only light; font-family: Arial, sans-serif; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
/* Mid tone of the four landscapes, visible only until a scene's first download arrives. */
html { background: #696352; }
body { background: transparent; }
/* index.html sets data-scene before this stylesheet loads; the lake is the no-script default.
   Softness and color treatment are encoded in the JPGs, not a CSS blur. */
.landscape { position: fixed; inset: 0; background: url(assets/background-lake.jpg) center / cover no-repeat; }
[data-scene="meadow"] .landscape { background-image: url(assets/background-meadow.jpg); }
[data-scene="cherry"] .landscape { background-image: url(assets/background-cherry.jpg); }
[data-scene="cliffs"] .landscape { background-image: url(assets/background-cliffs.jpg); }
/* The sign stops shrinking at --sign-min; a smaller window scrolls instead of crowding the face.
   The stage keeps room for that minimum plus its 20px padding. */
.stage {
  --sign-min: 360px; --sign-ratio: 1.95;
  height: 100svh; height: 100dvh;
  min-width: calc(var(--sign-min) + 40px); min-height: calc(var(--sign-min) / var(--sign-ratio) + 40px);
  display: grid; place-items: center; isolation: isolate;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.sign {
  position: relative; container-type: inline-size;
  width: min(680px, 100%, calc((100svh - 80px) * 1.9)); min-width: var(--sign-min); aspect-ratio: var(--sign-ratio);
  /* Average of paint.jpg, so the face keeps its tone while the texture loads. */
  background: #e4dccf;
  color: #363b37; border: 1px solid #c5c2b7; border-radius: 5px;
  box-shadow: inset 0 -1px 0 #5556521f,
    0 3px 6px #1421171f, 0 16px 30px #14211738, 0 32px 60px #14211724;
}
.sign::before {
  content: ''; position: absolute; inset: 11px; z-index: 1;
  border: 1px solid #88877c40; border-radius: 2px; pointer-events: none;
}
.sign-surface { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; pointer-events: none; }
.sign-content {
  position: absolute; inset: 0; display: flex;
  flex-direction: column; justify-content: center; align-items: center;
  padding-bottom: 2%;
}
.name {
  margin: 0; font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400; font-size: 12.4cqw; line-height: 1.12; letter-spacing: .01em;
}
.divider {
  display: block; height: 0; flex-shrink: 0; width: 24%;
  border-top: 1px solid #626361; opacity: .7; margin: 4.2cqw 0 calc(3.5cqw - 6px);
}
.copy {
  flex-shrink: 0; width: auto; border: 0; border-radius: 3px;
  background: none; color: inherit; cursor: pointer; font: inherit;
  padding: 6px 9px; margin-bottom: -6px;
  -webkit-tap-highlight-color: transparent;
}
.address { font-size: 3.1cqw; letter-spacing: .1em; line-height: 1.4; }
/* Discord and version share one 32px row, so the icon and label sit on the same center line. */
.discord {
  position: absolute; left: 6%; bottom: 9%; color: inherit;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 3px; -webkit-tap-highlight-color: transparent;
}
.discord svg { width: clamp(17px, 3.3cqw, 22px); height: auto; }
.version {
  position: absolute; right: 7%; bottom: 9%; height: 32px; display: flex; align-items: center;
  font-size: clamp(10px, 1.8cqw, 12px); letter-spacing: .08em; pointer-events: none;
}
.copy:focus-visible, .discord:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.notice {
  position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%); margin: 0; color: #fffaf0; background: #303432f2;
  border-radius: 4px; font-size: 13px; padding: 10px 16px; text-align: center;
  max-width: calc(100vw - 24px); width: max-content; pointer-events: none;
}
.notice:empty { display: none; }
/* Portrait phones: a slightly taller face keeps the bottom row clear of the address and inner rule. */
@media (max-width: 480px) and (orientation: portrait) {
  .stage { --sign-min: 280px; --sign-ratio: 1.55; }
  .address { font-size: 4.4cqw; letter-spacing: .04em; }
  .discord { left: 5%; bottom: 8%; }
  .version { right: 6%; bottom: 8%; }
}
/* Only windows below the stage minimum scroll (400×225 wide face, 320 wide portrait face). */
@media (orientation: landscape) and (max-width: 399.98px), (max-height: 224.98px), (max-width: 319.98px) {
  html, body { overflow: visible; }
}
/* Forced colors (Windows contrast themes, Firefox color override): drop the paint image so the
   user's text color sits on their own background rather than on the light texture. */
@media (forced-colors: active) { .sign-surface { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

