:root {
  color-scheme: light;
  --wall: #e3f0ff;
  --surface: #fff;
  --surface-soft: #edf5ff;
  --text: #152c55;
  --muted: #425a7e;
  --placeholder: #4d6488;
  --border: #c1d7f4;
  --ink: #122953;
  --outline: #193766;
  --hero-start: #2d83e9;
  --hero-end: #1755b7;
  --link-hover: #134ab0;
  --yellow: #ffdf63;
  --accent: #2477dd;
  --lane-border: #2258a0;
  --lane-fill: #d8eaff;
  --lane-tint: #e8f3ff;
  --lane-rule: #b7d4f6;
  --lane-header: #1755b7;
  --lane-ink: #fff;
  --lane-stripe: #3187d81c;
  --shell-width: 1150px;
  font-family: Arial, "Hiragino Sans", Meiryo, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --wall: #11203c;
  --surface: #192e51;
  --surface-soft: #203c66;
  --text: #f4f8ff;
  --muted: #c2d2ee;
  --placeholder: #b2c7e6;
  --border: #3f5c85;
  --outline: #82adee;
  --hero-start: #2768c3;
  --hero-end: #183b84;
  --link-hover: #a4d8ff;
  --lane-border: #6fa8f0;
  --lane-fill: #162c4d;
  --lane-tint: #214571;
  --lane-rule: #375b8a;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: var(--wall) url("assets/pattern.svg") 0 0 / 360px 360px repeat;
  color: var(--text);
}

.shell { width: min(var(--shell-width), calc(100% - 36px)); margin-inline: auto; }
.top-bar { background: #102653; border-bottom: 2px solid #65b4ff; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; color: #eef7ff; font-size: 12px; font-weight: 700; }
.age { display: inline-grid; flex-shrink: 0; place-items: center; border: 2px solid var(--ink); border-radius: 5px; padding: 2px 6px; background: var(--yellow); color: var(--ink); font: 850 11px/1.2 system-ui, sans-serif; }

.masthead {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-block: 0 10px;
  padding: 4px 12px;
  border: 3px solid var(--ink);
  border-radius: 11px;
  background:
    radial-gradient(circle, #ffffff30 1.5px, transparent 1.6px) right top / 10px 10px,
    linear-gradient(138deg, transparent 54%, #ffffff15 54% 58%, transparent 58% 62%, #ffffff11 62% 67%, transparent 67%),
    linear-gradient(110deg, var(--hero-end), var(--hero-start));
  box-shadow: 0 3px var(--ink), inset 0 0 0 1px #8ed4ff70;
}
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; width: fit-content; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 2px 3px var(--ink), inset 0 0 0 1px #fff2b2;
  transform: rotate(-8deg);
}
.brand-mark .icon { width: 19px; height: 19px; fill: currentColor; stroke-width: 1.3; }
.brand-name {
  display: block;
  white-space: nowrap;
  color: #fff;
  font-family: "Yu Gothic", Meiryo, sans-serif;
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 900;
  letter-spacing: -.085em;
  line-height: 1.05;
  paint-order: stroke fill;
  -webkit-text-stroke: 5px var(--ink);
  text-shadow: 0 3px var(--ink), 1px 4px #08357a;
}
.brand-name span { color: #91eeff; }

@media (max-width: 730px) {
  .shell { width: calc(100% - 24px); }
  .top-inner { min-height: 24px; font-size: 11px; }
  .masthead {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 3px 9px;
    border-width: 2px;
  }
  .brand { gap: 7px; min-height: 38px; }
  .brand-mark { width: 28px; height: 28px; border-width: 2px; border-radius: 8px; box-shadow: 2px 3px var(--ink); }
  .brand-mark .icon { width: 15px; height: 15px; }
  .brand-name { font-size: clamp(21px, 6.5vw, 30px); -webkit-text-stroke-width: 4px; text-shadow: 0 3px var(--ink), 1px 4px #08357a; }
}
