/* Maryann Memorial Cup — arena signage on ice.
   navy + red come straight from the MMC logo; gold is the kickplate / draft beer. */
:root {
  --ice: #f2f6f9;
  --white: #fff;
  --navy: #23215e;
  --navy-deep: #17163f;
  --red: #d42a2f;
  --red-dark: #b01f24;
  --gold: #f2b233;
  --line: #cfdbe6;
  --muted: #55607a;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Zen Kaku Gothic New", system-ui, sans-serif;
  --marker: "Permanent Marker", "Zen Kaku Gothic New", cursive;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4rem, 9vw, 7.5rem);
}
:lang(ja) { --display: "Dela Gothic One", "Big Shoulders Display", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ice);
  color: var(--navy);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 900; line-height: .95; }
h2 { font-size: clamp(2.6rem, 6vw, 4.25rem); text-transform: uppercase; letter-spacing: .005em; }
:lang(ja) h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 400; line-height: 1.2; text-transform: none; }
h3 { font-size: 1.6rem; text-transform: uppercase; }
:lang(ja) h3 { font-size: 1.2rem; font-weight: 400; line-height: 1.4; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.intro { max-width: 38rem; margin-top: 1rem; font-size: 1.15rem; color: var(--muted); }

.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--gold); color: var(--navy); padding: .5rem 1rem; font-weight: 700; }
.skip:focus { left: .5rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem; padding: .6rem 1.6rem;
  font: 800 1.35rem/1 var(--display); text-transform: uppercase; letter-spacing: .03em;
  text-decoration: none; border: 3px solid transparent; border-radius: 4px;
  transition: background-color .15s, color .15s, transform .15s;
}
:lang(ja) .btn { font: 700 1rem/1.2 var(--body); letter-spacing: 0; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 2.6rem; padding: .4rem 1.1rem; font-size: 1.1rem; }
:lang(ja) .btn-sm { font-size: .9rem; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); }
.btn-ghost { border-color: currentColor; color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--navy); }
.link-arrow { display: inline-block; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--red); }
.link-arrow:hover { color: var(--red); }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .45rem var(--gutter);
  background: var(--white);
  border-bottom: 4px solid var(--red);
}
.brand img { width: 76px; height: auto; }
.topbar nav { margin-left: auto; }
.topbar ul { display: flex; gap: 1.6rem; margin: 0; padding: 0; list-style: none; }
.topbar nav a { font: 800 1.2rem/1 var(--display); text-transform: uppercase; letter-spacing: .04em; text-decoration: none; }
:lang(ja) .topbar nav a { font: 700 .95rem/1 var(--body); letter-spacing: 0; }
.topbar nav a:hover { color: var(--red); }
.lang { font-weight: 700; font-size: .95rem; }
@media (max-width: 900px) {
  .topbar nav { display: none; }
  .lang { margin-left: auto; }
}

/* hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(3.5rem, 7vw, 5.5rem);
  background: var(--navy); color: var(--white);
  overflow: hidden;
}
.hero h1 { font-size: clamp(3.4rem, 7.4vw, 7.6rem); line-height: .86; text-transform: uppercase; letter-spacing: -.005em; }
.h1-line { display: block; }
@media (min-width: 600px) { :lang(en) .h1-line { white-space: nowrap; } }
:lang(ja) .hero h1 { font-size: clamp(1.9rem, 4.6vw, 4rem); font-weight: 400; line-height: 1.12; }
.hero .lede { max-width: 34rem; margin-top: 1.75rem; font-size: 1.2rem; color: #d8dcf3; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 2.5rem; margin: 2.75rem 0 0; padding-top: 1.5rem; border-top: 2px solid rgba(255,255,255,.18); }
.facts dt { font-size: .85rem; color: #aab0dc; }
.facts dd { margin: .15rem 0 0; }
.facts strong { display: block; font: 800 1.45rem/1.1 var(--display); text-transform: uppercase; }
:lang(ja) .facts strong { font: 700 1.05rem/1.4 var(--body); }
.facts span { font-size: .9rem; color: #c6cbeb; }
.hero-side { display: grid; gap: 2rem; justify-items: center; }

/* staged entrance: the headline is the one moment that moves */
.js .h1-line { opacity: 0; transform: translateY(.35em); animation: drop .55s cubic-bezier(.2,.8,.2,1) forwards; }
.js .h1-line:nth-child(2) { animation-delay: .18s; }
.js .h1-line:nth-child(3) { animation-delay: .36s; }
@keyframes drop { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .h1-line { animation: none; opacity: 1; transform: none; } }

/* taped polaroids */
.polaroid { position: relative; margin: 0; padding: .7rem .7rem 2.4rem; background: var(--white); box-shadow: 0 18px 40px -18px rgba(10,10,40,.55); transform: rotate(-2.5deg); max-width: 34rem; }
.polaroid-r { transform: rotate(2deg); }
.tape {
  position: absolute; left: 50%; bottom: .9rem; transform: translateX(-50%) rotate(-1.5deg);
  padding: .3rem 1.4rem .2rem;
  background: #f4f4ee; color: #1c1c1c;
  font: 400 1.15rem/1.2 var(--marker); white-space: nowrap;
  clip-path: polygon(2% 0, 98% 6%, 100% 50%, 97% 100%, 3% 94%, 0 50%);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.polaroid .tape { bottom: -.4rem; background: #fafaf5; border: 0; }
:lang(ja) .tape { font-weight: 700; font-size: 1rem; }

/* scoreboard countdown */
.scoreboard {
  width: min(100%, 26rem);
  padding: 1rem 1.2rem 1.1rem;
  background: #0c0b26; border: 5px solid #34327a; border-radius: 6px;
  box-shadow: inset 0 0 0 2px #08071c, 0 10px 30px -12px rgba(0,0,0,.7);
  text-align: center;
}
.sb-label { font: 800 1.05rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
:lang(ja) .sb-label { font: 700 .95rem/1 var(--body); letter-spacing: .1em; }
.sb-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .7rem; }
.sb-cell { display: grid; gap: .25rem; padding: .45rem 0 .4rem; background: #050414; border-radius: 3px; }
.sb-num { font: 900 clamp(2.2rem, 4vw, 2.9rem)/1 "Big Shoulders Display", sans-serif; font-variant-numeric: tabular-nums; color: var(--gold); text-shadow: 0 0 12px rgba(242,178,51,.55); }
.sb-unit { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #9aa0d0; }

/* dasher boards */
.boards { position: relative; background: var(--white); padding-top: 1.1rem; overflow: hidden; }
.boards-label { padding-inline: var(--gutter); font-size: .9rem; color: var(--muted); text-align: center; }
.boards-track { margin-top: .9rem; overflow-x: auto; scrollbar-width: none; border-top: 2px solid var(--line); cursor: grab; touch-action: pan-x pan-y; }
.boards-track::-webkit-scrollbar { display: none; }
.boards-track.is-dragging { cursor: grabbing; user-select: none; }
.boards-track img { pointer-events: none; }
.boards-track ul { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; }
.board { display: flex; align-items: center; justify-content: center; flex: none; width: 15rem; height: 7rem; padding: .9rem 1.5rem; border-right: 2px solid var(--line); }
.board img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.board-yours a {
  display: grid; place-items: center; width: 100%; height: 100%;
  border: 3px dashed var(--red); border-radius: 4px;
  font: 800 1.3rem/1 var(--display); text-transform: uppercase; color: var(--red); text-decoration: none; text-align: center;
}
:lang(ja) .board-yours a { font: 700 .95rem/1.3 var(--body); }
.board-yours a:hover { background: var(--red); color: var(--white); }
.kickplate { height: 16px; background: var(--gold); border-top: 3px solid #d89a1c; }

/* how it works */
.how { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: var(--section); }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 2.5rem; margin: 2.75rem 0 0; padding: 0; list-style: none; }
.steps li { position: relative; padding-left: 4.4rem; }
.step-num {
  position: absolute; left: 0; top: -.35rem;
  font: 900 4.6rem/1 "Big Shoulders Display", sans-serif;
  color: transparent; -webkit-text-stroke: 2.5px var(--red);
}
.steps h3 { margin-bottom: .45rem; }
.steps p { color: var(--muted); }

/* registration */
.register { padding-block: var(--section); background: var(--navy); color: var(--white); }
.reg-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.ticket {
  --notch: radial-gradient(circle at 0 50%, transparent 1.1rem, #000 1.15rem) left / 51% 100% no-repeat,
           radial-gradient(circle at 100% 50%, transparent 1.1rem, #000 1.15rem) right / 51% 100% no-repeat;
  position: relative;
  padding: clamp(2rem, 4vw, 3rem);
  background: var(--white); color: var(--navy);
  border-radius: 6px;
  -webkit-mask: var(--notch); mask: var(--notch);
}
.ticket h2 { color: var(--red); }
.ticket-label { margin-top: 1.5rem; font-weight: 700; }
.ticket-price { font: 900 clamp(6rem, 13vw, 9rem)/.85 "Big Shoulders Display", sans-serif; color: var(--navy); }
.ticket-price .cur { font-size: .45em; vertical-align: .9em; margin-right: .05em; }
.ticket-note { color: var(--muted); }
.ticket-terms { margin: 1.5rem 0 0; padding: 1.25rem 0 0; border-top: 2px dashed var(--line); list-style: none; display: grid; gap: .45rem; }
.ticket-terms li { padding-left: 1.3rem; position: relative; }
.ticket-terms li::before { content: ""; position: absolute; left: 0; top: .6em; width: .6rem; height: .6rem; border-radius: 50%; background: var(--red); }
.ticket-terms .early { font-weight: 700; }
.ticket-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.ticket .late { display: none; }
.ticket.is-late .early { display: none; }
.ticket.is-late .late { display: inline; }
.fine { margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.reg-side { display: grid; gap: 1.25rem; }
.note-card { padding: 1.6rem 1.75rem; border: 2px solid rgba(255,255,255,.22); border-radius: 6px; }
.note-card h3 { color: var(--gold); margin-bottom: .55rem; }
.note-card p { color: #d8dcf3; margin-bottom: .9rem; }
.note-card .link-arrow { display: block; margin-top: .35rem; text-decoration-color: var(--gold); }
.note-card .link-arrow:hover { color: var(--gold); }

/* schedule — game sheet */
.schedule { padding-block: var(--section); }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.25rem; }
.tabs button {
  display: grid; justify-items: start; gap: .1rem; min-width: 7.5rem;
  padding: .7rem 1.1rem; cursor: pointer;
  background: var(--white); color: var(--navy);
  border: 2px solid var(--line); border-radius: 4px;
  font: inherit; text-align: left;
}
.tabs button:hover { border-color: var(--navy); }
.tabs button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.tab-dow { font: 900 1.6rem/1 var(--display); text-transform: uppercase; }
:lang(ja) .tab-dow { font-weight: 400; font-size: 1.3rem; }
.tab-date { font-size: .85rem; }
.day { margin-top: 1.5rem; padding: 1.25rem 1.5rem 1.5rem; background: var(--white); border: 2px solid var(--navy); border-radius: 4px; max-width: 46rem; }
.day-stage { font-weight: 700; color: var(--red); margin-bottom: .5rem; }
.sheet { width: 100%; border-collapse: collapse; }
.sheet td { padding: .8rem .5rem; border-top: 1px solid var(--line); vertical-align: baseline; }
.sheet tr:first-child td { border-top: 0; }
.g-time { width: 5.5rem; font: 900 1.6rem/1 "Big Shoulders Display", sans-serif; font-variant-numeric: tabular-nums; }
.g-num { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.g-match { font-weight: 700; }
.g-side { white-space: nowrap; }
.g-vs { margin: 0 .35rem; font-weight: 400; color: var(--muted); }
.g-final { display: block; font-weight: 700; font-size: .85rem; color: var(--red); }
.is-final { background: #fdf4e0; }

/* sponsors */
.sponsor { padding-block: var(--section); background: var(--white); }
.renders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 2vw, 1.5rem); margin-top: 2.5rem; }
.render { margin: 0; display: grid; align-content: start; background: radial-gradient(ellipse at 50% 42%, #ffffff 0, #eef2f6 70%); border: 2px solid var(--line); border-radius: 8px; overflow: hidden; }
.render img { width: 100%; height: auto; aspect-ratio: 9 / 10; object-fit: contain; padding: .5rem .5rem 0; }
.render figcaption { display: grid; gap: .1rem; padding: .8rem 1rem 1rem; border-top: 4px solid var(--red); background: var(--white); }
.render strong { font: 900 1.6rem/1 var(--display); text-transform: uppercase; }
:lang(ja) .render strong { font: 700 1.1rem/1.3 var(--body); }
.render span { font-size: .9rem; color: var(--muted); }
.renders-note { margin-top: .75rem; font-size: .85rem; color: var(--muted); }
@media (max-width: 600px) { .renders { grid-template-columns: minmax(0, 1fr); } .render img { aspect-ratio: 4 / 3; } }
.table-scroll { margin-top: 2.5rem; overflow-x: auto; }
.levels { width: 100%; min-width: 46rem; border-collapse: collapse; }
.levels th, .levels td { padding: 1rem .9rem; text-align: left; border-bottom: 2px solid var(--line); vertical-align: middle; }
.levels thead th { font-size: .85rem; font-weight: 700; color: var(--muted); border-bottom: 3px solid var(--navy); }
.levels tbody th { white-space: nowrap; font: 900 1.7rem/1 var(--display); text-transform: uppercase; }
:lang(ja) .levels tbody th { font-weight: 400; font-size: 1.2rem; }
.levels .what { max-width: 22rem; font-size: .95rem; color: var(--muted); }
.medal { display: inline-block; width: .85rem; height: .85rem; margin-right: .6rem; border-radius: 50%; vertical-align: .1em; }
.lvl-bronze .medal { background: #b87333; }
.lvl-silver .medal { background: #a9b1ba; }
.lvl-gold .medal { background: var(--gold); }
.lvl-platinum .medal { background: #e5e8ec; box-shadow: inset 0 0 0 2px #9aa3ad; }
.lvl-palladium .medal { background: var(--navy); box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--red); }
.price-link { font: 800 1.5rem/1 "Big Shoulders Display", sans-serif; color: var(--navy); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.price-link:hover { color: var(--red); }
.price-note { font-size: .85rem; color: var(--muted); }
.sp-notes { margin: 1.25rem 0 0; padding-left: 1.1rem; font-size: .9rem; color: var(--muted); }
.sp-ask { margin-top: 1.5rem; font-weight: 700; }

/* champions — banners in the rafters */
.champions { padding-block: var(--section); background: var(--navy-deep); color: var(--white); background-image: linear-gradient(180deg, #0e0d2b 0, var(--navy-deep) 14rem); }
.champions .intro { color: #c3c8ea; }
.rafters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); margin: 3rem 0 0; padding: 2.5rem 0 0; list-style: none; border-top: 4px solid #3a3880; }
.banner {
  position: relative;
  display: grid; justify-items: center; align-content: start; gap: .35rem;
  padding: 1.4rem 1rem 4.2rem;
  background: var(--red); text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%);
}
.banner::after { content: ""; position: absolute; left: .45rem; right: .45rem; bottom: 2.6rem; height: 9px; border-block: 3px solid var(--white); }
.banner::before { content: ""; position: absolute; inset: .45rem .45rem auto; height: 3px; background: var(--white); }
.banner img { width: 5.5rem; height: 5.5rem; object-fit: contain; padding: .45rem; background: var(--white); border-radius: 50%; }
.banner-year { margin-top: .5rem; font: 900 3rem/1 "Big Shoulders Display", sans-serif; }
.banner-team { font: 900 1.6rem/1 "Big Shoulders Display", sans-serif; text-transform: uppercase; }
.banner-title { font-size: .85rem; font-weight: 700; color: #ffe1e1; }

/* rink + organizers */
.rink { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: var(--section); }
.rink-photo { position: relative; margin: 0; }
.rink-photo img { border-radius: 6px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.rink-photo .tape { bottom: -1rem; }
.rink-name { margin-top: 1.25rem; font: 900 2rem/1.05 var(--display); text-transform: uppercase; }
:lang(ja) .rink-name { font-weight: 400; font-size: 1.5rem; }
.rink-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 1.5rem; }

/* organizers — trading cards */
.crew { padding-block: var(--section); background: var(--white); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); margin: 2.75rem 0 0; padding: 0; list-style: none; }
.card { display: flex; flex-direction: column; padding: .6rem; background: var(--white); border: 2px solid var(--line); border-radius: 8px; box-shadow: 0 16px 34px -22px rgba(20,20,60,.55); }
.card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px 4px 0 0; }
.card-plate { flex: 1; align-content: start; position: relative; display: grid; gap: .2rem; padding: 1rem 1.1rem 1.1rem; background: var(--navy); color: var(--white); border-radius: 0 0 4px 4px; border-top: 5px solid var(--red); }
.card-plate strong { font: 900 1.7rem/1 var(--display); text-transform: uppercase; }
:lang(ja) .card-plate strong { font: 700 1.2rem/1.3 var(--body); }
.card-plate span { font-size: .9rem; color: #c6cbeb; }

/* footer */
.footer { padding: 3rem 0 3.5rem; background: var(--navy); color: #d8dcf3; border-top: 16px solid var(--gold); }
.footer-in { display: flex; gap: 2rem; align-items: center; }
.footer img { width: 132px; padding: .6rem; background: var(--white); border-radius: 6px; }
.footer p + p { margin-top: .3rem; }
.footer a { color: var(--white); }
.copy { font-size: .85rem; color: #9aa0d0; }

/* small screens */
@media (max-width: 900px) {
  .hero, .how, .reg-grid, .rink { grid-template-columns: minmax(0, 1fr); }
  .hero-side { order: 2; }
  .facts { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .rafters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how .polaroid { max-width: 30rem; justify-self: center; }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .card { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); padding: .45rem; }
  .card img { height: 100%; aspect-ratio: auto; border-radius: 4px 0 0 4px; }
  .card-plate { align-content: center; border-top: 0; border-left: 5px solid var(--red); border-radius: 0 4px 4px 0; }
  .card-plate strong { font-size: 1.45rem; }
  .brand img { width: 60px; }
  .board { width: 11rem; height: 5.5rem; }
  .g-time { width: 4.2rem; font-size: 1.35rem; }
  .day { padding: 1rem 1rem 1.25rem; }
  .table-scroll { overflow: visible; }
  .levels { min-width: 0; }
  .levels thead { display: none; }
  .levels tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem .75rem; padding: 1.1rem 0; border-bottom: 2px solid var(--line); }
  .levels tbody th, .levels .what { grid-column: 1 / -1; padding: 0; border: 0; }
  .levels tbody td { padding: 0; border: 0; }
  .levels td[data-label]::before { content: attr(data-label); display: block; margin-bottom: .2rem; font-size: .75rem; color: var(--muted); }
  .footer-in { flex-direction: column; align-items: flex-start; }
}

/* registration + order pages */
.form-page { background: var(--ice); }
.form-page .topbar { justify-content: space-between; }
.form-main { padding: clamp(1.5rem, 5vw, 4rem) var(--gutter) 5rem; }
.form-card { max-width: 46rem; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem); background: var(--white); border-radius: 8px; box-shadow: 0 18px 40px -28px rgba(20,20,60,.5); }
.form-card.narrow { max-width: 26rem; }
.form-card.wide { max-width: 72rem; }
.form-card h1 { font-size: clamp(2.6rem, 6vw, 3.6rem); text-transform: uppercase; color: var(--navy); }
:lang(ja) .form-card h1 { font-size: 2rem; font-weight: 400; line-height: 1.3; text-transform: none; }
.lede-dark { margin-top: .75rem; color: var(--muted); }
.form-h2 { margin-top: 2rem; font-size: 1.8rem; }
.block { margin: 2rem 0 0; padding: 0; border: 0; min-width: 0; }
.block[hidden], .notice[hidden], [data-for][hidden] { display: none; }
.block legend { padding: 0; margin-bottom: .9rem; font: 900 1.6rem/1 var(--display); text-transform: uppercase; color: var(--navy); }
:lang(ja) .block legend { font: 700 1.15rem/1.4 var(--body); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.form-grid > legend { grid-column: 1 / -1; }
.field { display: grid; gap: .35rem; align-content: start; }
.field.full, .form-grid .full { grid-column: 1 / -1; }
.field > span { font-weight: 700; font-size: .95rem; }
.field input:not([type=radio]):not([type=checkbox]), .field select, .field textarea {
  width: 100%; padding: .7rem .8rem; font: inherit; color: var(--navy);
  background: var(--white); border: 2px solid var(--line); border-radius: 4px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(242,178,51,.55); }
.field select { font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { position: relative; display: inline-flex; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: inline-block; min-width: 3rem; padding: .55rem .9rem; text-align: center; font-weight: 700; border: 2px solid var(--line); border-radius: 4px; background: var(--white); }
.pill input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pill input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.pill-wide { margin-top: 1rem; }
.pill-wide span { text-align: left; }
.guide { margin-top: .5rem; font-size: .9rem; color: var(--muted); }
.guide summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.guide img { margin-top: .75rem; max-width: 100%; border: 1px solid var(--line); }
.guide p, .legal p, .notice p { margin: .5rem 0; }
.legal { max-height: 16rem; overflow: auto; padding: 1rem 1.2rem; font-size: .9rem; line-height: 1.6; background: var(--ice); border: 2px solid var(--line); border-radius: 4px; }
.legal h3 { font: 700 1rem/1.4 var(--body); text-transform: none; }
.notice { margin-top: 1.25rem; padding: 1rem 1.2rem; font-size: .9rem; line-height: 1.6; background: #fdf4e0; border-left: 5px solid var(--gold); border-radius: 0 4px 4px 0; }
.choice { display: flex; gap: .8rem; align-items: flex-start; margin-top: .6rem; padding: .9rem 1rem; border: 2px solid var(--line); border-radius: 6px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--navy); background: #f5f6fc; }
.choice input { margin-top: .3rem; accent-color: var(--navy); }
.choice span { display: grid; gap: .15rem; }
.choice small { color: var(--muted); }
#sender { margin-top: 1rem; }
.form-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 3px solid var(--navy); }
.form-total > p:first-child { display: flex; align-items: baseline; gap: .75rem; font-weight: 700; }
.form-total strong { font: 900 2.6rem/1 "Big Shoulders Display", sans-serif; }
.form-total .fine { flex-basis: 100%; order: 3; margin: 0; }
.form-error { margin-top: 1rem; padding: .8rem 1rem; background: #fde8e8; border-left: 5px solid var(--red); font-weight: 700; }
.form-ok { margin-top: 1rem; padding: .8rem 1rem; background: #e6f6ea; border-left: 5px solid #2e9b4f; font-weight: 700; }
.form-note { margin-top: 1rem; padding: .8rem 1rem; background: #fdf4e0; border-left: 5px solid var(--gold); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button.btn { cursor: pointer; }
button.btn:disabled { opacity: .6; cursor: wait; }
.order-sum { display: grid; margin: 1.75rem 0 0; }
.order-sum > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.order-sum dt { color: var(--muted); }
.order-sum dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.instructions { white-space: pre-wrap; font: inherit; padding: 1rem 1.2rem; background: var(--ice); border-radius: 4px; }
.admin-bar { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1.5rem; font-weight: 700; }
.test-flag { padding: .1rem .6rem; background: var(--gold); border-radius: 3px; }
.admin-counts { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1rem; }
.admin-filter { margin-top: .5rem; font-size: .9rem; color: var(--muted); }
.admin-table { width: 100%; margin-top: 1rem; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { padding: .55rem .5rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-size: .8rem; color: var(--muted); border-bottom: 2px solid var(--navy); }
.admin-table .st-pending { background: #fdf4e0; }
.admin-table .st-cancelled, .admin-table .st-failed { color: var(--muted); }
.check { display: flex; gap: .5rem; align-items: center; align-self: end; }
@media (max-width: 600px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .order-sum > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
}
.mail-status { margin-bottom: 2rem; padding: 1rem 1.25rem; background: var(--ice); border-radius: 6px; }
.mail-status p + p, .mail-status form { margin-top: .6rem; }
form.inline { display: inline-block; }

/* sponsor jersey 3D viewer */
.jersey3d { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; margin-top: 2.5rem; }
#jersey3d { width: 100%; height: clamp(22rem, 50vw, 34rem); background: radial-gradient(ellipse at 50% 45%, #ffffff 0, #e9eef4 75%); border: 2px solid var(--line); border-radius: 8px; --poster-color: transparent; }
.spots { display: grid; gap: .75rem; }
.spot { display: grid; gap: .15rem; text-align: left; padding: 1rem 1.1rem; background: var(--white); border: 2px solid var(--line); border-left: 6px solid var(--line); border-radius: 6px; font: inherit; color: var(--navy); cursor: pointer; }
.spot:hover { border-color: var(--navy); }
.spot[aria-pressed="true"] { border-color: var(--navy); border-left-color: var(--red); background: #f5f6fc; }
.spot strong { font: 900 1.6rem/1 var(--display); text-transform: uppercase; }
:lang(ja) .spot strong { font: 700 1.1rem/1.3 var(--body); }
.spot span { font-size: .9rem; color: var(--muted); }
@media (max-width: 800px) { .jersey3d { grid-template-columns: minmax(0, 1fr); } .spots { grid-template-columns: repeat(3, minmax(0, 1fr)); } .spot strong { font-size: 1.2rem; } }
.order-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.btn-ghost-navy { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-ghost-navy:hover { background: var(--navy); color: var(--white); }
.btn-xs { min-height: 2rem; padding: .25rem .7rem; font-size: .95rem; margin-top: .3rem; }
.balance-note { margin-top: 1rem; padding: .8rem 1rem; background: var(--ice); border-left: 5px solid var(--gold); font-size: .95rem; overflow-wrap: anywhere; }

/* ---------- tournament pages (game week / thank you) ---------- */
.gw-hero, .thanks-hero { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.gw-hero h1, .thanks-hero h1 { font-size: clamp(3.4rem, 8vw, 7rem); }
:lang(ja) .gw-hero h1, :lang(ja) .thanks-hero h1 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); }
.gw-board { width: min(100%, 30rem); justify-self: center; }
.sb-when { margin-top: .35rem; font-size: .85rem; color: #c6cbeb; }
.sb-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .75rem; margin-top: 1rem; }
.sb-team { display: grid; justify-items: center; gap: .4rem; text-align: center; }
.sb-team img, .sb-noimg { width: 4.5rem; height: 4.5rem; object-fit: contain; padding: .35rem; background: var(--white); border-radius: 50%; }
.sb-name { font: 800 1.15rem/1.1 var(--display); text-transform: uppercase; color: var(--white); }
:lang(ja) .sb-name { font: 700 .95rem/1.3 var(--body); }
.sb-score { font: 900 3rem/1 "Big Shoulders Display", sans-serif; color: var(--gold); text-shadow: 0 0 12px rgba(242,178,51,.55); }
.sb-vs { font: 800 1.4rem/1 var(--display); color: #9aa0d0; }
.team-chip { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; }
.team-chip img { width: 2rem; height: 2rem; object-fit: contain; flex: none; }
.chip-dot { width: 1.1rem; height: 1.1rem; border-radius: 50%; flex: none; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line); }
.gw-sheet .g-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .15rem 0; font-weight: 500; color: var(--muted); }
.gw-sheet .g-line b { font: 900 1.5rem/1 "Big Shoulders Display", sans-serif; color: var(--navy); min-width: 1.5rem; text-align: right; }
.gw-sheet .g-line.is-win { color: var(--navy); font-weight: 700; }
.gw-sheet .g-line.is-win b { color: var(--red); }
.gw-sheet .g-status { width: 7rem; text-align: right; vertical-align: middle; }
.status-chip { display: inline-block; padding: .2rem .6rem; border-radius: 3px; font-size: .8rem; font-weight: 700; background: var(--ice); color: var(--navy); }
.status-chip.st-live { background: var(--red); color: var(--white); }
.gw-sheet tr.g-live { background: #fff5f5; }
.standings-sec { padding-block: var(--section); background: var(--white); }
.standings { width: 100%; min-width: 34rem; margin-top: 1.5rem; border-collapse: collapse; }
.standings th, .standings td { padding: .7rem .6rem; text-align: center; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.standings thead th { font-size: .8rem; color: var(--muted); border-bottom: 3px solid var(--navy); }
.standings tbody th { text-align: left; font-weight: 700; }
.standings td.pts { font: 900 1.3rem/1 "Big Shoulders Display", sans-serif; color: var(--red); }
.standings tbody tr:first-child { background: #fdf4e0; }
.div-h { margin-top: 2rem; font-size: 1.5rem; }
.teams-sec { padding-block: var(--section); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.team-grid li { display: grid; justify-items: center; gap: .4rem; padding: 1.2rem .8rem; background: var(--white); border: 2px solid var(--line); border-top: 6px solid var(--team, var(--navy)); border-radius: 6px; text-align: center; }
.team-grid img { width: 6rem; height: 6rem; object-fit: contain; }
.team-initial { display: grid; place-items: center; width: 6rem; height: 6rem; border-radius: 50%; background: var(--team, var(--navy)); color: var(--white); font: 900 2.6rem/1 var(--display); }
.team-grid strong { font: 800 1.3rem/1.1 var(--display); text-transform: uppercase; }
:lang(ja) .team-grid strong { font: 700 1rem/1.3 var(--body); }
.team-grid span { font-size: .85rem; color: var(--muted); }
.champions-band, .champions-thanks { padding: 3rem 0; background: var(--navy-deep); }
.champions-band .rafters, .champions-thanks .rafters { grid-template-columns: repeat(2, minmax(0, 16rem)); justify-content: center; margin: 0; padding: 0; border: 0; }
.card-memory .card-plate { border-top-color: var(--gold); }
.rink-strip { padding-block: var(--section); text-align: center; }
.rink-strip .rink-name { margin: 1rem 0; }
.see-you { padding-block: var(--section); text-align: center; }
.see-you .intro { margin-inline: auto; }
.mode-gameweek .cards, .mode-thanks .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .mode-gameweek .cards, .mode-thanks .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .gw-sheet .g-status { width: auto; }
  .sb-team img, .sb-noimg { width: 3.4rem; height: 3.4rem; }
  .champions-band .rafters, .champions-thanks .rafters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-gameweek .cards, .mode-thanks .cards { grid-template-columns: minmax(0, 1fr); }
}

/* tournament admin */
.ta-block { margin-top: 2.5rem; }
.tadmin .choice small a { text-decoration: underline; }
.mode-form .choice:has(input:checked) { border-color: var(--red); }
.ta-teams td, .ta-games td { vertical-align: middle; }
.ta-teams input:not([type=color]):not([type=file]), .ta-games input, .ta-games select { padding: .35rem .45rem; font: inherit; font-size: .9rem; border: 1px solid var(--line); border-radius: 3px; max-width: 100%; }
.ta-logo { width: 2.6rem; height: 2.6rem; object-fit: contain; }
.ta-photo { max-width: 14rem; border-radius: 4px; }
.ta-side select, .ta-side .ta-label { display: block; width: 11rem; }
.ta-side .ta-label { margin-top: .25rem; font-size: .8rem !important; color: var(--muted); }
.ta-score { white-space: nowrap; }
.ta-score input { width: 3.6rem; text-align: center; font-weight: 700; }
.ta-score span { margin: 0 .3rem; }
.ta-ot { display: block; margin-top: .25rem; font-size: .8rem; }
.ta-actions { white-space: nowrap; }
.ta-day { margin-top: 1.75rem; font-size: 1.4rem; }
.ta-games tr.st-final { background: #f3faf4; }
.ta-games tr.st-live { background: #fff5f5; }
.wp-badge { display: inline-block; padding: 0 .35rem; border-radius: 3px; background: #e7ecf5; color: var(--muted); font-size: .7rem; font-weight: 700; vertical-align: .1em; }
.import-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }

/* Phones must never pan sideways: clip anything that pokes past the edge (clip keeps the sticky header working). */
html, body { overflow-x: clip; }
@supports not (overflow: clip) { body { overflow-x: hidden; } }
.banner-team { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .tape { white-space: normal; width: max-content; max-width: 88%; text-align: center; font-size: 1rem; }
  .banner-team { font-size: 1.3rem; }
}

/* Formatting polish (2026-10-31) */
h1, h2, h3, .card-plate strong, .banner-team { text-wrap: balance; }
/* Japanese: break headings between phrases, not in the middle of a word (Chrome/Edge; others fall back to balance). */
/* Japanese headings only break at the zero-width spaces placed between phrases in build.py (works on iPhone Safari too). */
:lang(ja) h1, :lang(ja) h2, :lang(ja) .h1-line { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) h3, :lang(ja) .card-plate strong { word-break: auto-phrase; }
.spot-size { font: 800 1.15rem/1 "Big Shoulders Display", sans-serif; font-style: normal; color: var(--red); }
/* Until the 3D viewer script loads, show the jersey picture instead of an empty box. */
#jersey3d:not(:defined) { display: block; background: url("/img/render-front.webp") center / contain no-repeat, radial-gradient(ellipse at 50% 45%, #ffffff 0, #e9eef4 75%); }
.price-note { white-space: nowrap; }
@media (max-width: 800px) {
  .spots { gap: .5rem; }
  .spot { justify-items: center; text-align: center; padding: .75rem .4rem; border-left-width: 2px; border-top: 5px solid var(--line); }
  .spot[aria-pressed="true"] { border-left-color: var(--navy); border-top-color: var(--red); }
  .spot strong { font-size: 1.05rem; line-height: 1.1; overflow-wrap: anywhere; }
  :lang(ja) .spot strong { font-size: .95rem; }
  .spot span { display: none; }
}
@media (max-width: 600px) {
  .levels tbody tr { align-items: end; }
  .levels td[colspan] .price-note { display: block; margin-top: .2rem; }
}
