:root {
  color-scheme: dark;
  --base: #061b16;
  --gold: #d5b36a;
  --ink: #f5e9cb;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif;
  background: #020d0a;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
.shell {
  width: min(100%, 540px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  background: radial-gradient(ellipse at 50% 65%, #11332a, var(--base) 68%, #04110e);
  container-type: inline-size;
}
.masthead {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: 17px 0 0;
  background: linear-gradient(180deg, #03130f, #09241a);
  border-bottom: 1px solid var(--gold);
}
.masthead::before, .masthead::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 10px;
  bottom: 8px;
  width: 24%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom;
  opacity: .92;
}
.masthead::before { left: 0; background-image: url('./assets/home/dragon-left.webp'); }
.masthead::after { right: 0; background-image: url('./assets/home/dragon-right.webp'); }
h1 {
  margin: 0;
  font-size: clamp(32px, 10.1cqw, 56px);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: .04em;
  color: #f7d78a;
  text-shadow: 0 2px 0 #8c591c, 0 5px 8px #000, 0 0 14px #b8863538;
}
.plaque {
  position: relative;
  width: max-content;
  margin: 5px auto -1px;
  padding: 4px 25px;
  font-weight: 700;
  font-size: clamp(15px, 4.7cqw, 23px);
  line-height: 1.25;
  letter-spacing: .13em;
  color: #fae6bc;
  border: 1px solid var(--gold);
  background: #102820;
  box-shadow: inset 0 0 0 2px #15241a, 0 2px 5px #0008;
}
.camp {
  flex: 1 0 auto;
  min-height: 0;
  height: 64cqw;
  background: url('./assets/home/camp.webp') center center / cover no-repeat;
  position: relative;
}
.camp::after { content: ""; position: absolute; inset: auto 0 0; height: 20%; background: linear-gradient(transparent, #061b1688); }
.actions { display: flex; flex-direction: column; align-items: center; gap: clamp(9px, 3cqw, 16px); padding: 10px 0 16px; }
.art-link { display: block; flex: none; text-decoration: none; border-radius: 5px; -webkit-tap-highlight-color: transparent; transition: transform .12s ease, filter .12s ease; }
.art-link img { width: 100%; height: auto; display: block; }
.art-link:focus-visible, .return:focus-visible { outline: 3px solid #fff1bd; outline-offset: 4px; }
.art-link:active { transform: scale(.97); filter: brightness(1.12); }
.sortie { width: 92%; }
.officers { width: 72%; }
.home-footer { margin-top: auto; border-block: 1px solid #b8974d; background: #041611; text-align: center; padding: 3px 0; }
.home-footer img { display: block; width: 40%; height: auto; margin: auto; }
.subpage .masthead { padding-bottom: 18px; }
.placeholder { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; padding: 28px 20px; gap: 15px; }
.placeholder h2 { font-size: 29px; margin: 0; }
.placeholder p { margin: 0; color: #dfcfab; line-height: 1.7; font-size: 15px; }
.return { display: inline-block; padding: 14px 25px; border: 1px solid var(--gold); background: #16392c; color: #f8e0a3; text-decoration: none; font-weight: bold; min-height: 48px; }
@media (prefers-reduced-motion: reduce) { .art-link { transition: none; } }

/* Home BGM control; separate from the two main navigation actions. */
.camp-wrap { position: relative; display: flex; flex: 1 0 auto; flex-direction: column; }
.bgm-toggle { position: absolute; z-index: 1; top: 8px; right: 9px; min-height: 44px; min-width: 88px; padding: 7px 10px; font: 600 12px/1.2 system-ui, sans-serif; color: #f8e0a3; background: #061b16e8; border: 1px solid #d5b36a; border-radius: 5px; box-shadow: 0 2px 6px #0007; cursor: pointer; }
.bgm-toggle[aria-pressed='true'] { background: #295340; }
.bgm-toggle:focus-visible { outline: 3px solid #fff1bd; outline-offset: 3px; }
.bgm-toggle:disabled { opacity: .8; }

/* Tap feedback */
.tap-ripple {
  position: fixed; z-index: 9999; pointer-events: none;
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid #ffe7a0;
  background: radial-gradient(circle, #fff3ca70 0, #e9bd4222 36%, transparent 70%);
  box-shadow: 0 0 12px #f7c85c, inset 0 0 8px #f7c85c80;
  transform: translate(-50%, -50%) scale(.38);
  animation: tap-ripple-out .44s ease-out forwards;
}
@keyframes tap-ripple-out {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.38); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.65); }
}
.art-link.tap-confirmed, .return.tap-confirmed, .bgm-toggle.tap-confirmed {
  filter: brightness(1.35) drop-shadow(0 0 7px #f2ca70);
}
.art-link:active, .return:active, .bgm-toggle:active {
  transform: scale(.96); filter: brightness(1.25);
}
@media (prefers-reduced-motion: reduce) {
  .tap-ripple { animation: tap-ripple-still .18s linear forwards; transform: translate(-50%, -50%); }
  .art-link:active, .return:active, .bgm-toggle:active { transform: none; }
  @keyframes tap-ripple-still { from { opacity: 1; } to { opacity: 0; } }
}
