/* Sanctuary material language. This final layer is deliberately scoped to the
   home: scenery keeps its colour, while live controls remain crisp and legible. */
body[data-screen="home"] {
  --discovery-ink: #214b43;
  --discovery-stone: #e8cfa0;
  --discovery-edge: #ba8343;
  --discovery-gold: #efc66f;
  --discovery-teal: #176e6a;
  --discovery-cream: #fff4d8;
  background: linear-gradient(145deg, #e9d4ac, #e5c695 68%, #ceb17e);
  color: var(--discovery-ink);
}
body[data-screen="home"] .ambient { display: none; }
body[data-screen="home"] .game-header {
  background: linear-gradient(#174a414d, #174a4100);
}
body[data-screen="home"] .home-hub-hero {
  padding-bottom: 0;
  isolation: isolate;
}
body[data-screen="home"] .home-hub-hero .home-art-window {
  position: relative;
  width: 100vw;
  margin-top: calc(-64px - var(--safe-top, env(safe-area-inset-top)));
  margin-left: calc((100% - 100vw) / 2);
  overflow: clip;
  border-bottom: 3px solid #a8773e;
  border-radius: 0 0 42px 42px;
  background: #2f7160;
  box-shadow: 0 4px 0 #f7db9c, 0 12px 28px #79533326;
}
body[data-screen="home"] .home-art-window .expedition-art {
  left: 0;
  width: 100%;
  max-width: 1200px;
  height: clamp(430px, calc(100svh - 370px), 530px);
  margin: 0 auto;
  aspect-ratio: auto;
  border-radius: 0;
  background: #2f7160;
  overflow: visible;
}
body[data-screen="home"] .expedition-art .home-art-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
}
body[data-screen="home"] .expedition-art .home-art-backdrop {
  top: -24px;
  bottom: -24px;
  left: calc((100% - 100vw) / 2 - 24px);
  right: calc((100% - 100vw) / 2 - 24px);
  background: #2f7160;
  opacity: 1;
}
body[data-screen="home"] .home-art-backdrop img {
  opacity: 1;
  filter: none;
  mask-image: none;
  object-position: 50% 54%;
}
body[data-screen="home"] .expedition-art::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 calc((100% - 100vw) / 2);
  pointer-events: none;
  background: linear-gradient(180deg, #123d3633, transparent 25%, transparent 74%, #153b354d);
}
body[data-screen="home"] .home-hub-hero .expedition-art::after {
  z-index: 5;
  top: 76px;
  bottom: 14px;
  left: 12px;
  right: 12px;
  height: auto;
  border: 1px solid #ffe0a387;
  border-radius: 38px 38px 28px 28px;
  background: none;
  box-shadow: inset 0 0 0 3px #194b3e26;
}
body[data-screen="home"] .expedition-scan {
  display: block;
  z-index: 4;
}
body[data-screen="home"] .home-hub-hero .home-art-brand {
  z-index: 4;
  left: 7%;
  top: 19%;
  width: 42%;
}
body[data-screen="home"] .home-art-brand img {
  filter: drop-shadow(0 5px 0 #183f3a33) drop-shadow(0 10px 12px #173a344d);
}
body[data-screen="home"] .home-hub-hero .home-art-slogan {
  z-index: 4;
  left: 11%;
  top: calc(19% + min(18.9vw, 226.8px) + 16px);
  width: 35%;
}
body[data-screen="home"] .home-tile-row {
  gap: 5px;
  margin-bottom: 6px;
}
body[data-screen="home"] .home-slogan-tile {
  border: 1px solid #b7f0d7;
  border-radius: 6px 9px 7px 8px;
  background: linear-gradient(145deg, #7de7c1, #25afac 75%);
  color: #fff9dc;
  text-shadow: 0 2px 0 #176e6a55;
  box-shadow: inset 0 2px 0 #d7ffe9cc, inset 0 -2px 0 #1c87975c, 0 3px 0 #134a4666;
}
body[data-screen="home"] .home-tile-row:nth-child(2) .home-slogan-tile {
  background: linear-gradient(145deg, #8ee6f4, #39b6d3 75%);
  border-color: #c3eef5;
}
body[data-screen="home"] .home-hub-hero .home-art-guide {
  z-index: 3;
  left: 57%;
  top: 12%;
  width: 39%;
  height: 88%;
  mask-image: none;
}
body[data-screen="home"] .home-hub-hero .home-art-guide img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(8px 12px 5px #113c3033);
}
body[data-screen="home"] .home-scene-caption {
  position: absolute;
  z-index: 6;
  left: max(8%, calc((100vw - 1010px) / 2));
  bottom: 28px;
  display: grid;
  gap: 5px;
  color: var(--discovery-cream);
  text-shadow: 0 2px 2px #133e32;
  pointer-events: none;
}
body[data-screen="home"] .home-scene-caption > span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  color: #ffe1a1;
}
body[data-screen="home"] .home-scene-caption strong {
  font-family: var(--heading);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.05;
}
body[data-screen="home"] .home-scene-caption br { display: none; }
body[data-screen="home"] .home-scene-caption i {
  width: 70px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffc864, #ffc86400);
}
body[data-screen="home"] .home-updates {
  max-width: 760px;
  margin: 24px auto 0;
  animation: home-discovery-arrive 440ms 90ms both cubic-bezier(.2,.7,.25,1);
}
body[data-screen="home"] .home-updates-heading {
  gap: 10px;
  margin: 0 4px 11px;
}
body[data-screen="home"] .home-updates-heading::before { display: none; }
body[data-screen="home"] .home-updates-heading::after {
  height: 2px;
  margin-left: 4px;
  border-radius: 2px;
  rotate: 0deg;
  background: linear-gradient(90deg, #b68a47aa, #b68a4700);
}
body[data-screen="home"] .home-updates-heading > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid #b38443;
  border-radius: 9px;
  color: #275d50;
  background: #f3dba7;
  box-shadow: inset 0 1px #ffefc8, 0 2px #b69258;
}
body[data-screen="home"] .home-updates-heading .icon { width: 20px; height: 20px; }
body[data-screen="home"] .home-updates-heading h2 {
  flex-shrink: 0;
  color: #315144;
  font-size: 24px;
}
body[data-screen="home"] .home-update-card {
  position: relative;
  isolation: isolate;
  min-height: 132px;
  gap: 14px;
  padding: 13px 16px 13px 10px;
  overflow: hidden;
  border: 2px solid #d2a151;
  border-radius: 27px 16px 27px 16px;
  color: var(--discovery-cream);
  background: radial-gradient(ellipse at 5% 0%, #53ba9c55, transparent 60%), linear-gradient(125deg, #227f70, #1b6a67 62%, #185a5c);
  box-shadow: inset 0 0 0 2px #f5d68a66, inset 0 3px 0 #b4f6c826, 0 4px 0 #977440, 0 10px 18px #79533326;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
body[data-screen="home"] .home-update-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 220px;
  height: 220px;
  top: -130px;
  right: -78px;
  border: 1px solid #f7d99526;
  border-radius: 50%;
  box-shadow: 0 0 0 9px #f7d9950a, 0 0 0 10px #f7d9951a, 0 0 0 22px #f7d99508, 0 0 0 23px #f7d99514;
}
body[data-screen="home"] .home-update-card .home-update-copy {
  display: grid;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
body[data-screen="home"] .home-update-card small {
  color: #ffdc94;
  font-size: 9px;
  letter-spacing: .09em;
}
body[data-screen="home"] .home-update-card strong {
  color: #fff4d5;
  font-family: var(--heading);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
}
body[data-screen="home"] .home-update-copy > span {
  color: #e0edd9;
  font-size: 12px;
}
body[data-screen="home"] .home-update-copy > b {
  min-height: 22px;
  color: #f7da97;
  font-size: 11px;
}
body[data-screen="home"] .home-update-art {
  width: 108px;
  height: 100px;
}
body[data-screen="home"] .home-update-art img {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 4px 3px #0d3d3844);
}
body[data-screen="home"] .home-update-art img:first-child {
  width: 54px;
  height: 54px;
  top: 44px;
}
body[data-screen="home"] .home-update-card .home-update-progress {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  width: 49px;
  min-height: 64px;
  flex: 0 0 auto;
  padding: 6px 3px;
  border: 1px solid #eacb8066;
  border-radius: 16px 16px 12px 12px;
  background: #103d3b55;
  box-shadow: inset 0 2px #ffffff0d;
}
body[data-screen="home"] .home-update-progress strong { font-size: 20px; }
body[data-screen="home"] .home-update-progress small {
  font-size: 9px;
  letter-spacing: 0;
}
body[data-screen="home"] .home-update-progress .icon {
  width: 16px;
  height: 16px;
  margin: 5px 10px 0;
  color: #77d9bb;
}
body[data-screen="home"] .home-update-card:focus-visible {
  outline: 3px solid #fff3c1;
  outline-offset: 4px;
}
body[data-screen="home"] .home-update-card:active {
  transform: translateY(3px);
  box-shadow: inset 0 0 0 2px #f5d68a66, inset 0 3px 0 #b4f6c826, 0 1px 0 #977440, 0 5px 10px #79533326;
}
/* Season information uses the same turquoise and carved gold as the home. */
body[data-screen="home"] .home-season-card {
  border: 2px solid #d2a151;
  border-radius: 27px 16px 27px 16px;
  background: linear-gradient(125deg, #227f70, #1b6a67 62%, #185a5c);
  color: var(--discovery-cream);
  box-shadow: inset 0 0 0 2px #f5d68a66, 0 4px 0 #977440, 0 10px 18px #79533326;
}
body[data-screen="home"] .home-season-main {
  min-height: 122px;
  border-radius: 25px 14px 0 0;
  padding-block: 10px;
}
body[data-screen="home"] .home-season-copy > strong { color: #fff4d5; }
body[data-screen="home"] .home-season-copy > small { color: #ffdc94; }
body[data-screen="home"] .home-season-copy > small > span { color: #d1e4cc; }
body[data-screen="home"] .home-season-dates,
body[data-screen="home"] .home-season-inventory { color: #e0edd9; }
body[data-screen="home"] .home-season-progress > b { color: #f7da97; }
body[data-screen="home"] .home-season-progress > i { background: #103d3b88; }
body[data-screen="home"] .home-season-progress > i::before { background: linear-gradient(90deg, #8ce3c2, #f4d37c); }
body[data-screen="home"] .home-season-details {
  background: #103d3b40;
  color: #ffdc94;
  border-top-color: #eacb8055;
  border-radius: 0 0 25px 14px;
  box-shadow: inset 0 1px #ffffff0d;
}
body[data-screen="home"] .home-season-main:active,
body[data-screen="home"] .home-season-details:active { background: #103d3b55; }
body[data-screen="home"] .home-season-main:focus-visible,
body[data-screen="home"] .home-season-details:focus-visible { outline-color: #fff3c1; }
body[data-screen="home"] .home-themes {
  max-width: 760px;
  margin-top: 17px;
}
body[data-screen="home"] .first-run-options { margin: 0; }
body[data-screen="home"] .first-run-options > summary {
  justify-content: flex-start;
  min-height: 50px;
  border: 1px solid #ba8b4d;
  border-radius: 15px 21px 15px 21px;
  color: #315448;
  background: linear-gradient(130deg, #f3dba7, #e6cb94);
  box-shadow: inset 0 2px #ffedc2aa, 0 3px #c19d6366;
}
body[data-screen="home"] .first-run-options > summary:active { background: #dbbd83; }
body[data-screen="home"] .first-run-options > summary > .icon:first-child { color: #47765b; }
body[data-screen="home"] .first-run-options[open] > summary { margin-bottom: 20px; }
body[data-screen="home"] .first-run-options[open] > .theme-grid { margin-top: 0; }
body[data-screen="home"] .site-foot { color: #725c3d; }
body[data-screen="home"] .site-foot a { color: #4a6250; }
body[data-screen="home"] #start-main {
  --blue-top: #22b8b1;
  --blue: #159997;
  --blue-deep: #187a8c;
  --blue-edge: #166a72;
  --blue-base: #155b62;
  text-shadow: 0 2px 0 #17687355;
}
@keyframes home-discovery-arrive {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
@media (max-width: 760px) {
  body[data-screen="home"] .app {
    --home-left: max(14px, var(--safe-left, env(safe-area-inset-left)));
    --home-right: max(14px, var(--safe-right, env(safe-area-inset-right)));
  }
  body[data-screen="home"] .home-art-window .expedition-art {
    height: clamp(375px, 51svh, 470px);
    max-width: 100%;
  }
  body[data-screen="home"] .home-hub-hero .home-art-window {
    margin-left: calc(-1 * var(--home-left));
    border-radius: 0 0 30px 30px;
  }
  body[data-screen="home"] .home-hub-hero .expedition-art::after {
    top: 72px;
    left: 8px;
    right: 8px;
    bottom: 10px;
    border-radius: 28px 28px 21px 21px;
  }
  body[data-screen="home"] .home-art-backdrop img { object-position: 53% 50%; }
  body[data-screen="home"] .home-hub-hero .home-art-brand {
    top: 17%;
    left: 9%;
    width: 82%;
  }
  body[data-screen="home"] .home-hub-hero .home-art-slogan {
    top: 55%;
    left: 8%;
    width: 53%;
  }
  body[data-screen="home"] .home-tile-row { gap: 3px; margin-bottom: 4px; }
  body[data-screen="home"] .home-slogan-tile {
    font-size: clamp(12px, 3.2vw, 20px);
    border-radius: 4px 6px 4px 6px;
  }
  body[data-screen="home"] .home-hub-hero .home-art-guide {
    top: 45%;
    left: 46%;
    width: 54%;
    height: 55%;
  }
  body[data-screen="home"] .home-scene-caption {
    left: 8%;
    bottom: 31px;
    gap: 5px;
    max-width: 42%;
  }
  body[data-screen="home"] .home-scene-caption > span { font-size: 7px; letter-spacing: .07em; }
  body[data-screen="home"] .home-scene-caption strong { font-size: 23px; }
  body[data-screen="home"] .home-scene-caption br { display: inline; }
  body[data-screen="home"] .home-updates { margin-top: 20px; }
  body[data-screen="home"] .home-updates-heading { gap: 8px; margin-bottom: 10px; }
  body[data-screen="home"] .home-updates-heading h2 { font-size: 22px; }
  body[data-screen="home"] .home-update-card {
    min-height: 125px;
    gap: 9px;
    padding: 11px 11px 11px 7px;
    border-radius: 23px 14px 23px 14px;
  }
  body[data-screen="home"] .home-update-art { width: 76px; height: 88px; }
  body[data-screen="home"] .home-update-art img { width: 82px; height: 82px; }
  body[data-screen="home"] .home-update-art img:first-child { width: 43px; height: 43px; top: 40px; }
  body[data-screen="home"] .home-update-card strong { font-size: 21px; }
  body[data-screen="home"] .home-update-copy > span { font-size: 11px; line-height: 1.35; }
  body[data-screen="home"] .home-update-copy > b { font-size: 10px; }
  body[data-screen="home"] .home-update-card .home-update-progress { width: 42px; min-height: 60px; }
  body[data-screen="home"] .home-update-progress strong { font-size: 17px; }
  body[data-screen="home"] .home-update-progress small { font-size: 8px; }
  body[data-screen="home"] .home-update-progress .icon { margin-inline: 8px; }
  body[data-screen="home"] .home-themes { margin-top: 15px; }
  body[data-screen="home"] .first-run-options > summary { font-size: 14px; }
}
@media (max-width: 350px) {
  body[data-screen="home"] .home-update-art { width: 59px; }
  body[data-screen="home"] .home-update-art img { width: 70px; height: 70px; top: 7px; }
  body[data-screen="home"] .home-update-art img:first-child { width: 36px; height: 36px; top: 44px; }
  body[data-screen="home"] .home-update-card strong { font-size: 19px; }
  body[data-screen="home"] .home-scene-caption strong { font-size: 21px; }
}
@media (max-height: 600px) and (max-width: 760px) {
  body[data-screen="home"] .home-art-window .expedition-art { height: 330px; }
  body[data-screen="home"] .home-hub-hero .home-art-brand { top: 21%; width: 68%; left: 16%; }
  body[data-screen="home"] .home-hub-hero .home-art-slogan { top: 58%; width: 48%; }
  body[data-screen="home"] .home-scene-caption { bottom: 23px; }
  body[data-screen="home"] .home-scene-caption strong { font-size: 19px; }
}
@media (min-width: 761px) and (max-height: 850px) {
  body[data-screen="home"] .home-scene-caption { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-screen="home"] .home-updates { animation: none; }
  body[data-screen="home"] .home-update-card { transition: none; }
}
