:root {
  color-scheme: dark;
  --board: #0a3326;
  --masters: #006747;
  --chalk: #f6f1e6;
  --dim: rgba(246, 241, 230, 0.72);
  --brass-hi: #f6e7b0;
  --brass: #d4b15a;
  --brass-lo: #6e5420;
  --sheet: #f4efe4;
  --sheet-ink: #1a2a22;
  --figure: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --body: "Zen Antique Soft", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --nap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --paper: var(--board);
  --card: #0c3a2a;
  --surface: #0e3328;
  --surface-2: #143f32;
  --field: #08261c;
  --ink: var(--chalk);
  --muted: var(--dim);
  --line: rgba(110, 84, 32, 0.8);
  --frame: var(--brass-lo);
  --green: #d7e6de;
  --green-2: var(--brass);
  --gold: var(--brass);
  --red: #e7a0b4;
  --on: #1c1608;
  --on-light: var(--chalk);
  --selected: rgba(212, 177, 90, 0.24);
  --banner: rgba(212, 177, 90, 0.16);
  --warn: #e7a0b4;
  --warn-bg: rgba(231, 160, 180, 0.14);
  --shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
  --hero: none;
  font-family: var(--body);
}

.phone.dawn,
.phone.dusk,
.phone.masters {
  color-scheme: dark;
  --hero: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: 100dvh;
  background: #071f18;
  color: var(--chalk);
  overscroll-behavior: none;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow: hidden;
  overflow-x: hidden;
  touch-action: manipulation;
}

body::before { content: none; }

button, input, select, textarea { font: inherit; color: inherit; }

.phone {
  position: relative;
  width: min(440px, calc(100% - 18px));
  height: calc(100dvh - 18px);
  min-height: 0;
  margin: 9px auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 16%, transparent 84%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(180deg, #145c42, #0a3326 55%, #071f18);
  color: var(--chalk);
  border: 0;
  border-radius: 54px;
  corner-shape: round;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 248, 220, 0.35);
}
.phone::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 20;
  border: 8px solid transparent;
  border-radius: 49px;
  corner-shape: round;
  pointer-events: none;
  background: linear-gradient(180deg, #fff6d0 0%, #f0d78a 16%, #c6a04a 46%, #8a6828 74%, #5c4314 100%) border-box;
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

header {
  flex: none;
  padding: 0 1.2rem 0.45rem;
  min-height: 0;
  background: transparent;
  color: var(--chalk);
  border-bottom: 0;
  box-shadow: none;
}

.brand {
  margin: 0;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  line-height: 1.2;
}

header h1 {
  margin: 0.2rem 0 0;
  font-size: 1.65rem;
  font-weight: 600;
  font-family: var(--figure);
  letter-spacing: 0.06em;
  color: var(--chalk);
  overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.14), 0 -1px 1px rgba(0, 0, 0, 0.45);
}

.lede {
  margin: 0.25rem 0 0;
  color: rgba(255, 253, 248, 0.88);
  font-size: 0.82rem;
  line-height: 1.45;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.3rem;
  margin-top: 0.55rem;
  max-width: 100%;
}

.steps button {
  flex: 1 1 5.2rem;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--brass-lo);
  border-radius: 12px;
  corner-shape: bevel;
  padding: 0.42rem 0.4rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 40%),
    linear-gradient(180deg, #1a4a38, #0e3328);
  color: var(--chalk);
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
  white-space: normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -2px 3px rgba(0, 0, 0, 0.35);
}
.steps button br {
  display: block;
  content: "";
}

.steps button[aria-current="step"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 34%),
    linear-gradient(180deg, #f8ecc0, var(--brass) 50%, #a78434);
  color: #1c1608;
  border-color: var(--brass-lo);
  font-weight: 600;
}

.phone.masters header,
.phone.dusk header {
  background: transparent;
}

.phone.masters header h1,
.phone.dusk header h1 {
  font-family: var(--figure);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--chalk);
}

main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.4rem 1.25rem 2.2rem;
  scroll-padding-bottom: 1.75rem;
}

main > *,
header,
.actions,
.portal,
.auth-actions,
.grid,
.comp-row,
.card,
.course-card,
.steps {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
main.screen-enter { animation: screen-enter 220ms ease both; }
main.screen-back { animation: screen-back 220ms ease both; }
@keyframes screen-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes screen-back {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

h2 {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--figure);
  font-size: 1.7rem;
  color: var(--chalk);
  font-weight: 600;
  letter-spacing: 0.06em;
}
h3 {
  color: var(--chalk);
  font-family: var(--figure);
  letter-spacing: 0.04em;
}

.job, .note, .formula {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.rule-box,
.comp-row,
.response-row,
.course-card,
.shop,
.summary,
.searching,
.popup,
.tee-slot,
.prize-card,
.weather-hour,
table.times,
textarea {
  border-color: var(--frame);
  box-shadow: inset 0 0 0 1px rgba(226, 179, 58, 0.35);
}
.rule-box {
  background: var(--surface);
  border: 1px solid var(--frame);
  border-radius: 14px;
  padding: 0.85rem 0.95rem 0.35rem;
  margin: 0.2rem 0 1rem;
}
.rule-box h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.rule-box .formula {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.75;
}
.rule-copy {
  background: var(--surface);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.75;
  margin: 0 0 0.7rem;
  padding: 0.75rem 0.9rem;
}
.rule-copy.app { border-left-color: var(--gold); }
.course-facts { margin: 0.28rem 0 0; }
.course-facts div {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.28rem;
  align-items: baseline;
}
.course-facts dt,
.course-facts dd {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 400;
}
.course-facts dt { color: var(--green); font-weight: 700; }
.course-facts dd { color: var(--muted); }
.slot-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin-top: 0.35rem;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.slot-table { border-collapse: collapse; width: max-content; }
.slot-table th,
.slot-table td {
  min-width: 2rem;
  padding: 0.12rem 0.38rem;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 700;
}
.slot-table th { color: var(--green); background: rgba(0, 103, 71, 0.06); }
.slot-table td { color: var(--ink); }
.course-card .slot-empty { margin: 0.28rem 0 0; color: var(--muted); font-size: 0.72rem; font-weight: 400; }
.portal-hits { display: flex; flex-direction: column; gap: 0.45rem; }
.portal-hits button.hit {
  text-align: left;
  white-space: normal;
}
.portal-hits button.hit strong,
.portal-hits button.hit span { display: block; }
.portal-hits button.hit span {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}
.portal-hits button.hit.selected { background: var(--selected); }
.shop p.shop-stars {
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.banner, .warn, .empty {
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.9rem;
  line-height: 1.5;
  font-size: 0.92rem;
}

.banner { background: var(--banner); color: var(--green); }
.warn { background: var(--warn-bg); color: var(--warn); }
.empty { background: var(--surface-2); color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.grid > * {
  min-width: 0;
  max-width: 100%;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
  font-size: 0.82rem;
  color: var(--muted);
  box-sizing: border-box;
}
label.field.wide { grid-column: 1 / -1; }
label.field.quiet {
  margin-top: 2rem;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.72;
}
label.field.quiet input {
  padding: 0.4rem 0.55rem;
  font-size: 0.82rem;
  box-shadow: none;
}
.secret-line { position: relative; display: block; }
.secret-line input { padding-right: 2.7rem; }
.eye {
  position: absolute;
  top: 50%;
  right: 0.25rem;
  transform: translateY(-50%);
  width: 2.1rem;
  height: 2.1rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  display: grid;
  place-items: center;
}
.eye svg { width: 1.2rem; height: 1.2rem; display: block; }
.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.55rem 0 0.2rem;
  width: 100%;
}
.auth-actions .primary,
.auth-actions .secondary,
.auth-actions .textish {
  width: 100%;
  flex: none;
  min-width: 0;
}
.field-label {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.yen-step {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  overflow: hidden;
}
.yen-step input {
  width: 0;
  flex: 1 1 0;
  border: 0;
  border-radius: 0;
  min-width: 0;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}
.yen-spin {
  display: flex;
  flex-direction: column;
  width: 1.8rem;
  flex: none;
  border-left: 1px solid var(--line);
}
.yen-spin button {
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 0.62rem;
  line-height: 1;
}
.yen-spin button + button { border-top: 1px solid var(--line); }

input, select, textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--brass-lo);
  background: var(--field);
  color: var(--chalk);
  border-radius: 10px;
  corner-shape: bevel;
  padding: 0.65rem 0.7rem;
  font-size: 1rem;
  scroll-margin: 0.75rem 0 1.75rem;
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, 0.32);
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="number"],
.ja-clock {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  min-inline-size: 0 !important;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.clock-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.clock-readout {
  position: absolute;
  z-index: 2;
  left: 0.55rem;
  right: 2.2rem;
  top: 0.28rem;
  bottom: 0.28rem;
  display: flex;
  align-items: center;
  padding: 0 0.15rem;
  pointer-events: none;
  color: var(--chalk);
  background: var(--field);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ja-clock::-webkit-datetime-edit,
.ja-clock::-webkit-datetime-edit-fields-wrapper {
  opacity: 0;
  max-width: 100%;
}
.clock-readout.empty { color: var(--muted); }
.ja-clock::-webkit-datetime-edit,
.ja-clock::-webkit-datetime-edit-fields-wrapper,
.ja-clock::-webkit-datetime-edit-text,
.ja-clock::-webkit-datetime-edit-year-field,
.ja-clock::-webkit-datetime-edit-month-field,
.ja-clock::-webkit-datetime-edit-day-field,
.ja-clock::-webkit-datetime-edit-hour-field,
.ja-clock::-webkit-datetime-edit-minute-field,
.ja-clock::-webkit-datetime-edit-second-field,
.ja-clock::-webkit-datetime-edit-ampm-field {
  color: transparent;
  -webkit-text-fill-color: transparent;
  min-width: 0;
}
.ja-clock::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  padding: 0;
  opacity: 1;
}

input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--chalk);
  outline-offset: 3px;
}

.total {
  margin: 0.9rem 0;
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.total strong {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--figure);
  font-size: 2rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--sheet-ink);
}

.card, .person, .flight {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 24%),
    linear-gradient(180deg, #08261c, #124233);
  border: 1px solid var(--brass-lo);
  border-radius: 16px;
  corner-shape: bevel;
  padding: 0.85rem;
  margin-bottom: 0.7rem;
  color: var(--chalk);
  box-shadow: inset 0 8px 12px rgba(0, 0, 0, 0.28), inset 0 -1px 0 rgba(246, 231, 176, 0.18);
}

a.survey-link {
  display: block;
  margin: 0.45rem 0 0.75rem;
  padding: 0.75rem 0.8rem;
  background: var(--on-light);
  border-radius: 10px;
  color: var(--green);
  font-weight: 650;
  word-break: break-all;
}
.survey-ready {
  margin: 0.8rem 0 0.4rem;
  padding: 0.9rem 0.9rem 0.95rem;
  background: var(--on-light);
  border: 1px solid var(--gold);
  border-left: 5px solid var(--red);
  border-radius: 14px;
}
.survey-ready-label {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.access { margin: 1.1rem 0 0.4rem; }
.access h3 { margin: 0.9rem 0 0.35rem; font-size: 1.05rem; }
.station-mark {
  margin: 0.2rem 0 0.2rem;
  padding: 0.85rem 1rem 0.95rem;
  background: var(--on-light);
  border: 1px solid var(--gold);
  border-left: 5px solid var(--green);
  border-radius: 14px;
}
.station-kicker, .station-inline span:first-child {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.station-name {
  margin: 0.12rem 0 0;
  color: var(--green);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
}
.station-line { margin: 0.28rem 0 0; font-size: 1rem; }
.station-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.7rem;
  margin: 0.35rem 0;
}
.station-inline strong { color: var(--green); font-size: 1.05rem; }
.check-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.8rem 0 0.2rem;
  font-weight: 700;
}
.check-row input { width: 1.15rem; height: 1.15rem; padding: 0; flex: 0 0 auto; accent-color: var(--green); }
.dispatch { display: grid; gap: 1.5rem; margin-top: 0.9rem; }
.dispatch-cars { display: grid; gap: 1.6rem; }
.car-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.car-people .meta { margin: 0 0 0.25rem; color: var(--green); font-size: 0.75rem; font-weight: 700; }
.dispatch-plans { display: grid; gap: 1.6rem; }
.meeting-plan {
  padding: 0.95rem 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.94);
}
.meeting-plan h3 { margin: 0 0 0.55rem; }
.ride-sheet {
  display: grid;
  gap: 0.28rem;
  margin: 0;
}
.ride-sheet > div {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.28rem 0.45rem;
}
.ride-sheet dt, .ride-sheet dd {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}
.ride-sheet dt { color: var(--green); font-weight: 700; }
.ride-people {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.55rem;
  font-size: 0.75rem;
}
.ride-people th, .ride-people td {
  text-align: left;
  padding: 0.28rem 0.25rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ride-people td span {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.68rem;
}
.meeting-leg {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.15rem 0.55rem;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}
.meeting-leg p { margin: 0; font-size: 0.82rem; line-height: 1.45; }
.meeting-leg .role { color: var(--green); font-weight: 700; font-size: 0.75rem; }
.meeting-leg .detail { color: var(--ink); }
.meeting-leg.late .detail { color: var(--warn); font-weight: 700; }
.ride-people tr.late td { color: var(--warn); font-weight: 700; }
.ride-warn { margin: 0.4rem 0 0; color: var(--warn); font-size: 0.78rem; font-weight: 700; }
.meet-limits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}
.meet-limits input { min-width: 0; min-inline-size: 0; }
.car-card, .ride-fields {
  margin: 0;
}
.car-card {
  padding: 0.95rem 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.94);
}
.drop-zone {
  min-height: 4.6rem;
  margin: 0;
  padding: 0.45rem;
  border: 1px dashed var(--green);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.7);
}
.drop-zone.new-car {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 700;
}
.drop-zone.over {
  outline: 2px solid #006747;
  outline-offset: -2px;
}
.drop-hint { color: #5f6b64; font-size: 0.85rem; }
.person-chip {
  display: inline-flex;
  margin: 0.2rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--green);
  color: #fffdf8;
  font-weight: 700;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.person-chip.driver { box-shadow: inset 0 0 0 2px var(--gold); }
.person-chip.dragging {
  position: fixed;
  z-index: 80;
  margin: 0;
  pointer-events: none;
}
.unassigned-person { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.route-map { width: 100%; margin-top: 0.45rem; border: 0; border-radius: 12px; background: #e6e0d4; }
iframe.route-map { height: 280px; }
img.route-map { display: block; height: auto; }
.choices { display: flex; gap: 0.45rem; margin: 0.35rem 0 0.75rem; }
.area-picker { margin: 0.2rem 0 0.9rem; }
select option { background: var(--field); color: var(--ink); }
.choices button {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--brass-lo);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #1c5240, #0e3328);
  color: var(--chalk);
  border-radius: 14px;
  corner-shape: bevel;
  padding: 0.7rem 0.35rem;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  line-break: strict;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: pretty;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -2px 3px rgba(0, 0, 0, 0.35);
}
.choices button[aria-pressed="true"] {
  border-color: var(--brass-lo);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 32%),
    linear-gradient(180deg, #f8ecc0, var(--brass) 48%, #a78434);
  color: #1c1608;
  font-weight: 600;
}

.card { cursor: pointer; width: 100%; text-align: left; }
.card.selected { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.card .price { font-family: var(--figure); font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.card p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.88rem; }
.card.selected,
.course-card.selected {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 30%),
    linear-gradient(180deg, #f8ecc0, var(--brass) 52%, #a78434);
  color: #1c1608;
  border-color: var(--brass-lo);
}
.card.selected p,
.course-card.selected p,
.course-card.selected .body p { color: #4a3b18; }

.actions, .portal { display: flex; flex-direction: column; gap: 0.55rem; margin: 0.8rem 0 1rem; }

.primary, .secondary, .portal a, .textish {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  border: 0;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  line-break: strict;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: pretty;
}
button,
.primary,
.secondary,
.portal a,
.textish {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.08s ease, filter 0.08s ease, box-shadow 0.08s ease;
}
button:disabled,
.primary:disabled,
.secondary:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.primary, .secondary, .portal a { border-radius: 14px; corner-shape: bevel; }
.primary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 34%),
    linear-gradient(180deg, #f8ecc0, var(--brass) 50%, #a78434);
  color: #1c1608;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid var(--brass-lo);
  box-shadow: inset 0 1px 0 #fff8dc, inset 0 -2px 3px rgba(80, 56, 12, 0.4);
}
.secondary, .portal a {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 36%),
    linear-gradient(180deg, #1c5240, #0e3328);
  color: var(--chalk);
  border: 1px solid var(--brass-lo);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -2px 3px rgba(0, 0, 0, 0.32);
}
.primary:active:not(:disabled),
.secondary:active:not(:disabled),
.portal a:active,
.textish:active,
button:active:not(:disabled) {
  transform: translateY(2px) scale(0.985);
  filter: brightness(0.93);
}
button.eye:active:not(:disabled) {
  transform: translateY(-50%) scale(0.96);
  filter: none;
}
.yen-spin button:active:not(:disabled) {
  transform: none;
  filter: brightness(0.85);
}
.primary:active:not(:disabled) {
  box-shadow: inset 0 2px 5px rgba(80, 56, 12, 0.5);
}
.secondary:active:not(:disabled),
.portal a:active {
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45);
}
.portal a { display: flex; align-items: center; justify-content: center; gap: 0.55rem; }
.send-logo { width: 1.35rem; height: 1.35rem; display: inline-flex; flex: none; }
.send-logo svg { width: 100%; height: 100%; display: block; }
.textish { background: transparent; color: var(--muted); padding: 0.4rem; }
.logout { width: 100%; margin-top: 1.6rem; }
.auth-hint {
  margin: 0.35rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.account-delete {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(110, 84, 32, 0.22);
}
.account-delete .job { margin: 0.55rem 0 0; font-size: 0.9rem; }
.account-delete h3 {
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
  color: var(--green);
}
.account-delete label {
  display: grid;
  gap: 0.35rem;
  margin: 0.85rem 0 1rem;
  font-size: 0.92rem;
}
.account-delete input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(26, 42, 34, 0.18);
  border-radius: 12px;
  font: inherit;
}
.secondary.danger,
.primary.danger {
  border-color: rgba(140, 40, 40, 0.45);
  color: #7a1f1f;
}
.primary.danger {
  background: #7a1f1f;
  color: #fffdf8;
  border-color: #7a1f1f;
}
.account-delete .danger { width: 100%; }

.person { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: center; }
.person input { width: 1.15rem; height: 1.15rem; padding: 0; }
.person .meta { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }

.flight h3 { margin: 0 0 0.45rem; font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.82rem;
}
.chip em { font-style: normal; color: var(--gold); }

table.times {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 0.35rem 0 0.85rem;
  border-collapse: collapse;
}
table.times th {
  width: 7.2rem;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  vertical-align: top;
}
table.times td { font-size: 0.95rem; }
table.times th, table.times td { padding: 0.55rem 0.7rem; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
th { text-align: left; color: var(--gold); font-weight: 600; font-size: 0.75rem; }
th, td { padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; }

.score-toggle { margin-top: 0.8rem; }

.holes { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0.25rem; margin: 0.35rem 0 0.7rem; }
.holes label { font-size: 0.68rem; color: var(--muted); min-width: 0; }
.holes input {
  padding: 0.4rem 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.holes input.secret { border-color: var(--gold); background: var(--selected); }

.prize-row { display: grid; grid-template-columns: 7rem 1fr; gap: 0.5rem; align-items: center; margin-bottom: 0.45rem; }

.preview {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 0.4rem 0 0.8rem;
}

.check {
  margin: 1.5rem 0 0;
  font-size: 0.8rem;
  color: var(--green-2);
}

.comp-row, .response-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  margin-bottom: 0.6rem;
}
.comp-row p, .response-row p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; }
.row-actions { display: flex; flex-direction: column; gap: 0.35rem; }
.row-actions button { white-space: nowrap; }

.checkline {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0.4rem 0 0.8rem;
  font-size: 0.95rem;
}
.checkline input { width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; }

.shop {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem;
  margin-bottom: 0.6rem;
  text-decoration: none;
  color: inherit;
}
.count { margin: 0.15rem 0 0.35rem; font-weight: 700; }
.course-list { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.7rem 0; }
.course-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem;
  margin: 0;
}
.course-head {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.45rem 0.7rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.course-head .meta { color: var(--green); font-weight: 600; }
.course-card.selected { border-color: var(--brass-lo); }
.course-photo {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.course-card img,
.shop img,
.prize-card img {
  filter: none;
}
.course-card img { width: 84px; height: 84px; object-fit: cover; display: block; }
.course-card .body { min-width: 0; padding: 0; }
.course-card .body strong { display: block; line-height: 1.35; }
.course-card .body p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.82rem; }
.course-card .fee { color: var(--ink); font-weight: 700; font-size: 0.95rem; }
.course-card .warn-inline { color: var(--warn); font-weight: 600; }
.course-actions { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 0.45rem; }
.course-actions button, .course-actions a { margin: 0; width: 100%; }
.popup-back {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(1rem, env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px))
    max(1rem, env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
  background: rgba(8, 40, 28, 0.46);
  animation: popup-dim 180ms ease;
}
.phone:has(.popup-back) main { overflow: hidden; }
.popup {
  width: min(400px, 100%);
  max-height: 100%;
  overflow: auto;
  background: var(--surface);
  border-radius: 16px;
  padding: 1.1rem 1rem 0.6rem;
  box-shadow: var(--shadow);
  animation: popup-in 180ms ease;
}
@keyframes popup-dim {
  from { background: rgba(8, 40, 28, 0); }
  to { background: rgba(8, 40, 28, 0.46); }
}
@keyframes popup-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.popup h3 { margin: 0 0 0.45rem; font-size: 1.15rem; }
.popup p { margin: 0.25rem 0 0.7rem; }
.course-actions button:disabled {
  background: var(--surface-2);
  color: var(--warn);
  border: 1px solid var(--warn);
  cursor: default;
}
.plan-list { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 0.55rem; }
.plan-row { border-top: 1px solid var(--line); padding-top: 0.5rem; }
.plan-row.selected { background: var(--selected); margin: 0 -0.35rem; padding: 0.5rem 0.35rem 0; border-radius: 10px; }
.shop-list { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.35rem 0 0.9rem; }
.shop-list .shop { margin: 0; }
.shop.skeleton strong { color: var(--muted); font-weight: 600; }
.shop-list.loading .shop { animation: searching-pulse 1s ease-in-out infinite; }
.pager { display: flex; align-items: center; gap: 0.5rem; }
.pager .secondary { flex: 1; margin: 0; }
.pager span { color: var(--muted); font-size: 0.82rem; min-width: 3.2rem; text-align: center; }
.weather-hours {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin: 0.45rem 0 0.8rem;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.weather-hour {
  flex: 0 0 4.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  padding: 0.4rem 0.15rem 0.45rem;
}
.weather-hour span, .weather-hour strong { display: block; }
.weather-hour .mark { font-size: 1.35rem; line-height: 1.3; }
.weather-hour .hour, .weather-hour .wind { color: var(--muted); font-size: 0.75rem; }
.bus-board { display: flex; flex-direction: column; gap: 0.75rem; margin: 0.35rem 0 0.85rem; }
.bus-run h4 { margin: 0 0 0.35rem; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.04em; }
.bus-times { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.bus-time {
  min-width: 4.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.4rem 0.5rem 0.35rem;
  text-align: center;
}
.bus-time strong {
  display: block;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.bus-time span { display: block; margin-top: 0.12rem; color: var(--muted); font-size: 0.72rem; }
.bus-time.fit {
  border-color: var(--green);
  background: var(--selected);
}
.bus-time.fit strong { color: var(--green-2); }
.prize-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 0.7rem 0;
  text-decoration: none;
  color: inherit;
}
.prize-card img { width: 100%; height: 160px; object-fit: contain; display: block; background: var(--surface); }
.prize-card .body { display: block; padding: 0.75rem 0.85rem 0.9rem; }
.prize-card .body p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.86rem; }
.prize-card .shop-price { color: var(--ink); font-weight: 600; }
.prize-list { margin: 0.4rem 0 0.8rem; padding-left: 1.2rem; }
.prize-list li { margin: 0.2rem 0; }
.shop img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.shop .shop-price { color: var(--ink); font-weight: 600; }
.shop strong { display: block; font-size: 0.95rem; }
.shop p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; }
.shop .tabelog { color: var(--green); font-weight: 600; }
.shop button { margin-top: 0.45rem; }
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
  background: var(--field);
  color: var(--ink);
  resize: vertical;
}
textarea.mail-body {
  min-height: 24rem;
  padding: 1.15rem 1.05rem 1.25rem;
  border: 1px solid #c4b497;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 22%),
    repeating-linear-gradient(0deg, transparent, transparent 1.65rem, rgba(110, 84, 32, 0.09) 1.7rem),
    #f7f1e4;
  color: #1c1608;
  font-family: var(--figure);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.7;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 12px 20px rgba(0, 0, 0, 0.2);
}
.entry-board {
  margin: 0.5rem 0 1rem;
  padding: 1rem 0.75rem 1.15rem;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.72), transparent 32%),
    linear-gradient(180deg, #fbf6ea, #f3ead6 72%, #efe2c6);
  border: 1px solid #c4b497;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 12px 20px rgba(0, 0, 0, 0.22);
}
.entry-board h3 {
  margin: 0 0 0.85rem;
  color: #6a4e12;
  font-family: var(--figure);
  letter-spacing: 0.18em;
}
.entry-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem 0.7rem;
  align-items: flex-start;
}
.entry-note {
  position: relative;
  width: 7.4rem;
  min-height: 6.1rem;
  margin-top: 0.45rem;
  padding: 1.25rem 0.5rem 0.45rem;
  background: linear-gradient(180deg, #fffdf8, #f6efd8);
  color: #1c1608;
  border: 0;
  box-shadow: 0 8px 14px rgba(70, 48, 12, 0.18);
  font-family: var(--figure);
}
.entry-note .pin {
  position: absolute;
  top: -0.55rem;
  left: 50%;
  width: 1.35rem;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.28));
}
.entry-note .pin svg { display: block; width: 100%; height: auto; }
.entry-note strong { display: block; font-size: 0.92rem; font-weight: 600; line-height: 1.35; }
.entry-note span { display: block; margin-top: 0.25rem; color: #6a4e12; font-size: 0.75rem; }
.entry-note button {
  margin: 0.35rem 0 0;
  padding: 0;
  background: transparent;
  color: #8a6840;
  font-size: 0.72rem;
}
.entry-empty { margin: 0.2rem 0 0.4rem; color: #6a4e12; font-family: var(--figure); }
.entry-survey { width: 100%; margin: 0.15rem 0 0.9rem; }
.bus-title {
  margin: 0.15rem 0 0.35rem;
  color: #111;
  font-family: var(--figure);
  font-size: 0.95rem;
  font-weight: 600;
}
.bus-board {
  padding: 0.75rem 0.7rem 0.85rem;
  background: #fffdf8;
  border: 1px solid #c4b497;
  border-radius: 4px;
}
.bus-run h4 { color: #006747; }
.phone.masters .bus-time:not(.fit),
.phone.dusk .bus-time:not(.fit),
.bus-time {
  background: #fffdf8;
  color: #111;
  border-color: #c4b497;
}
.bus-time strong,
.bus-time span { color: #111; }

.survey-page { padding-bottom: 2rem; }
.survey-page h2 { margin-top: 0; }
.survey-form.sending {
  animation: survey-send 0.9s ease forwards;
  pointer-events: none;
}
@keyframes survey-send {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  35% { transform: translateY(-10px) scale(0.98); opacity: 1; }
  100% { transform: translateY(-84px) scale(0.9); opacity: 0; }
}
.survey-done {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--frame);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(226, 179, 58, 0.45);
  padding: 1.5rem 1rem 1.2rem;
  margin-top: 0.6rem;
  animation: survey-arrive 0.4s ease;
}
.survey-done p { margin: 0.35rem 0 0; }
.survey-done-title {
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}
.survey-done .secondary { margin-top: 1rem; }
.survey-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: inset 0 0 0 2px var(--gold);
  position: relative;
  animation: survey-pop 0.45s ease;
}
.survey-check::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 16px;
  width: 16px;
  height: 30px;
  border: solid var(--gold);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  animation: survey-draw 0.35s 0.12s ease both;
}
@keyframes survey-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes survey-pop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes survey-draw {
  from { opacity: 0; transform: rotate(45deg) scale(0.6); }
  to { opacity: 1; transform: rotate(45deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .survey-form.sending,
  .survey-done,
  .survey-check,
  .survey-check::after,
  .popup-back,
  .popup,
  main.screen-enter,
  main.screen-back { animation: none; }
}

.phase {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.3rem;
  margin: 0.2rem 0 0.85rem;
}
.phase button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 0.5rem 0.08rem;
  cursor: pointer;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
}
.phase button .n {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}
.phase button[aria-current="step"] {
  border-color: var(--brass-lo);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 34%),
    linear-gradient(180deg, #f8ecc0, var(--brass) 50%, #a78434);
  color: #111;
  font-weight: 600;
}
.phase button[data-busy="true"] {
  font-weight: 600;
}
.phase button[data-busy="true"] .n::after {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.15rem;
  border-radius: 50%;
  background: var(--gold);
  vertical-align: middle;
  animation: searching-pulse 1s ease-in-out infinite;
}
.phase button:disabled {
  opacity: 0.4;
  cursor: default;
}
@media (max-width: 360px) {
  .phase:not(.two):not(.three) { gap: 0.15rem; }
  .phase:not(.two):not(.three) button {
    font-size: 0.6rem;
    gap: 0.06rem;
    padding: 0.42rem 0;
    overflow: hidden;
  }
}
.phase.two { grid-template-columns: 1.15fr 1fr; }
.phase.three { grid-template-columns: 1fr 1fr 1fr; }
.answered { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.answered li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.answered strong { display: block; }
.tee-modes button { font-size: 0.68rem; white-space: nowrap; padding: 0.65rem 0.2rem; }
.pair-actions { display: flex; gap: 0.45rem; margin: 0.2rem 0 0.85rem; }
.pair-actions button { flex: 1; margin: 0; white-space: normal; line-height: 1.35; }
.pair-actions button:disabled {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: default;
}
.tee-list, .tee-grid { display: grid; gap: 0.55rem; }
.tee-grid { grid-template-columns: 1fr 1fr; }
.tee-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.tee-slot {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem;
  min-height: 4.4rem;
}
.tee-slot.over { outline: 2px solid var(--green); }
.tee-slot h3 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.tee-head { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; margin-bottom: 0.45rem; }
.tee-head strong { font-variant-numeric: tabular-nums; }
.tee-head .secondary { padding: 0.35rem 0.6rem; }
.pool { margin-bottom: 0.7rem; }
.mover {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.mover.lifting { opacity: 0.45; transform: scale(1.05); }
.mover.dragging {
  position: fixed;
  z-index: 80;
  margin: 0;
  pointer-events: none;
  opacity: 1;
  transform: none;
}

.searching {
  background: var(--surface);
  border: 1px solid var(--green);
  border-radius: 14px;
  padding: 1.05rem 1rem 0.95rem;
  margin: 0.2rem 0 1rem;
}
.searching.inline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
}
.searching.inline p { margin: 0; }
.course-card .course-price,
.course-card .body p.course-price,
.course-card.selected .course-price,
.course-card.selected .body p.course-price {
  margin: 0.28rem 0 0;
  color: #111;
  background: #fffdf8;
  font-family: var(--figure);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.course-card .fee,
.course-card.selected .fee,
.course-card p.fee,
.course-card.selected p.fee {
  margin: 0.28rem 0 0;
  color: var(--gold);
  background: #0e3328;
  font-family: var(--figure);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}
.picked-status { margin: 0.6rem 0.85rem 0.85rem; }
.picked-status.done {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.8rem;
  font-weight: 700;
}
.searching .label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--gold);
  color: var(--green);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.searching .label::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--on);
  animation: searching-pulse 1s ease-in-out infinite;
}
.summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem 0.7rem;
  margin: 0 0 0.4rem;
}
.summary h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.summary ul {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.6;
}

.searching h3 { margin: 0.75rem 0 0.3rem; font-size: 1.12rem; }
.searching p { margin: 0.45rem 0 0; line-height: 1.5; }
.searching ul {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.55;
}

@keyframes searching-pulse {
  50% { opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  .searching .label::before,
  .phase button[data-busy="true"] .n::after,
  .popup-back,
  .popup,
  main.screen-enter,
  main.screen-back { animation: none; }
}

.phone.masters .card,
.phone.dusk .card,
.phone.masters .course-card,
.phone.dusk .course-card,
.phone.masters .person,
.phone.dusk .person,
.phone.masters .flight,
.phone.dusk .flight,
.phone.masters .comp-row,
.phone.dusk .comp-row,
.phone.masters .shop,
.phone.dusk .shop,
.phone.masters .searching,
.phone.dusk .searching,
.phone.masters .popup,
.phone.dusk .popup,
.phone.masters .tee-slot,
.phone.dusk .tee-slot,
.phone.masters .prize-card,
.phone.dusk .prize-card,
.phone.masters .weather-hour,
.phone.dusk .weather-hour,
.phone.masters .bus-time:not(.fit),
.phone.dusk .bus-time:not(.fit) {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 28%),
    #0e3328;
  border-color: var(--brass-lo);
  color: var(--chalk);
  box-shadow: inset 0 8px 12px rgba(0, 0, 0, 0.24);
}

.phone.masters .card.selected,
.phone.masters .course-card.selected,
.card.selected,
.course-card.selected {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 30%),
    linear-gradient(180deg, #f8ecc0, var(--brass) 52%, #a78434);
  color: #1c1608;
  border-color: var(--brass-lo);
  box-shadow: inset 0 1px 0 #fff8dc, inset 0 -2px 3px rgba(80, 56, 12, 0.35);
}
.card.selected p,
.course-card.selected p,
.course-card.selected .body p,
.course-card.selected .fee { color: #3a3018; }

.note,
.rule-box,
.summary,
.total,
.station-mark,
table.times,
main table {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 16%),
    var(--nap),
    linear-gradient(180deg, #f7f1e6, #e8decc);
  background-size: auto, 128px 128px, auto;
  background-blend-mode: normal, multiply, normal;
  color: var(--sheet-ink);
  border: 1px solid #c4b497;
  border-radius: 4px;
  corner-shape: round;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 16px rgba(0, 0, 0, 0.24);
}
.note { padding: 0.75rem 0.85rem; }
.gold-note {
  margin: 0 0 0.9rem;
  color: var(--gold);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.55;
  background: none;
  border: 0;
  box-shadow: none;
}
.plain-line {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  background: none;
  border: 0;
  box-shadow: none;
}
.shop-station { margin: 0.95rem 0 0.1rem; }
.shop-station.near {
  font-family: var(--figure);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--gold);
}
.shop-place { margin: 0 0 0.45rem; }
.shop-place.near {
  font-family: var(--figure);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.shop-station.hub {
  margin-top: 1.45rem;
  font-family: var(--figure);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--gold);
}
.shop-place.hub {
  font-family: var(--figure);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.dispatch > .redispatch { width: 100%; margin: 0.15rem 0 1rem; }
.car-card,
.meeting-plan {
  background: #fffdf8;
  color: #1a2a22;
  border: 1px solid var(--gold);
  border-radius: 14px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}
.car-card h3,
.meeting-plan h3,
.car-people .meta,
.meeting-plan .ride-sheet dt,
.meeting-leg .role { color: #006747; }
.meeting-plan .ride-sheet dd,
.meeting-leg p,
.meeting-leg .detail { color: #1a2a22; }
.meeting-leg.late .detail,
.meeting-plan .ride-warn { color: #c8102e; }
.person-chip {
  background: #fffdf8;
  color: #111;
  border: 1px solid #006747;
}
.meeting-leg .who { color: #111; }
.meeting-plan .pickup-line { margin: 0.6rem 0 0.4rem; color: #1a2a22; font-size: 0.82rem; line-height: 1.45; }
.drop-zone { background: #f3efe4; border-color: #006747; color: #1a2a22; }
.drop-zone.new-car { background: #fffdf8; color: #006747; }
.drop-hint { color: #5f6b64; }
.survey-ready {
  background: #fffdf8;
  color: #1a2a22;
  border: 1px solid var(--gold);
  border-left: 5px solid var(--red);
  border-radius: 14px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}
.survey-ready .survey-ready-label { color: #006747; }
.survey-ready a.survey-link { background: #eef5ef; color: #006747; }
main table.slot-table { background: #fffdf8; }
main table.slot-table th,
main table.slot-table td { color: #111; background: #fffdf8; }
main table.slot-table th { background: #f1ece0; }
.rule-box h3,
.summary h3,
.summary li,
.station-mark,
.station-name,
.station-kicker,
.station-inline strong,
table.times th,
table.times td,
main table th,
main table td { color: var(--sheet-ink); }
.rule-box .formula,
.summary,
.station-line,
table.times th { color: #3d4f46; }
.total { padding: 0.85rem 0.95rem; border-top: 0; border-bottom: 0; }
table.times th,
main table th { background: rgba(138, 104, 40, 0.12); }

.total strong,
.card .price,
.course-card .fee,
.station-name,
.bus-time strong,
.weather-hour strong,
.tee-head strong,
td.num,
th.num,
.count {
  font-family: var(--figure);
  font-weight: 600;
}
.weather-hour,
.bus-time,
.phase button {
  border-radius: 14px;
  corner-shape: bevel;
}
.phase button,
main .phase button:not(.primary):not(.textish):not([aria-pressed="true"]):not([aria-current="step"]) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 36%),
    linear-gradient(180deg, #1c5240, #0e3328);
  color: #fff;
  border-color: #0e3328;
}
.phase button[aria-current="step"],
main .phase button[aria-current="step"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 34%),
    linear-gradient(180deg, #f8ecc0, var(--brass) 50%, #a78434);
  color: #111;
}
main button:not(.primary):not(.textish):not(.eye):not([aria-pressed="true"]):not([aria-current="step"]) {
  border: 1px solid var(--brass-lo);
  border-radius: 12px;
  corner-shape: bevel;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 36%),
    linear-gradient(180deg, #1c5240, #0e3328);
  color: var(--chalk);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -2px 3px rgba(0, 0, 0, 0.32);
}
.comp-row p {
  font-family: var(--figure);
  font-weight: 600;
}

@media (max-width: 520px) {
  /* 実機: 上下白帯を消し、金淵を画面最外の太い枠にする */
  html, body {
    background: #071f18 !important;
    overflow: hidden;
    min-height: 100%;
    min-height: -webkit-fill-available;
    min-height: 100dvh;
  }
  .phone {
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    min-height: 100%;
    min-height: -webkit-fill-available;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
    overflow-x: hidden;
    /* 金淵は layout を食わない inset。中の操作領域を広げる */
    border: 0;
    box-sizing: border-box;
    box-shadow:
      inset 0 0 0 10px #c9a24d,
      inset 0 0 0 12px rgba(255, 246, 208, 0.4);
  }
  .phone::before {
    content: none;
  }
  header {
    /* Dynamic Island 直下まで詰める（余白の二重取りをやめる） */
    padding-top: max(0.2rem, calc(env(safe-area-inset-top, 0px) - 22px));
    padding-left: max(1.15rem, calc(env(safe-area-inset-left, 0px) + 0.85rem));
    padding-right: max(1.15rem, calc(env(safe-area-inset-right, 0px) + 0.85rem));
    padding-bottom: 0.35rem;
  }
  .brand {
    margin: 0;
    line-height: 1.2;
  }
  header h1 {
    margin-top: 0.12rem;
    font-size: 1.5rem;
  }
  .lede {
    margin-top: 0.12rem;
  }
  .steps {
    margin-top: 0.4rem;
  }
  main {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-left: max(1.15rem, calc(env(safe-area-inset-left, 0px) + 0.85rem));
    padding-right: max(1.15rem, calc(env(safe-area-inset-right, 0px) + 0.85rem));
    padding-bottom: max(1.4rem, calc(env(safe-area-inset-bottom, 0px) + 0.9rem));
  }
  .slot-board,
  .tee-board,
  .bus-board {
    overflow-x: auto;
    max-width: 100%;
  }
  /* 日時入力は半幅だと iOS ではみ出すので全幅へ */
  .grid label.field:has(input[type="date"]),
  .grid label.field:has(input[type="time"]),
  .grid label.field:has(input[type="datetime-local"]),
  .grid label.field:has(.ja-clock),
  .grid label.field:has(.clock-wrap) {
    grid-column: 1 / -1;
  }
  label.field,
  .clock-wrap,
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  .ja-clock {
    max-width: 100%;
  }
  .steps button,
  .primary,
  .secondary,
  .portal a,
  .textish,
  .choices button,
  .auth-actions .primary,
  .auth-actions .secondary,
  .auth-actions .textish {
    font-size: 0.88rem;
  }
}

@media (min-width: 800px) {
  body { padding: 0; }
  .phone {
    width: 100%;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .phone::before {
    content: "";
    inset: 8px;
    border-radius: 14px;
  }
  header {
    display: block;
    padding: 1.45rem 1.75rem 0.85rem;
  }
  .steps { margin-top: 0.85rem; }
  main { padding: 0.4rem 1.75rem 2.2rem; }
  .course-list, .shop-list { display: flex; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .searching .label::before,
  .phase button[data-busy="true"] .n::after,
  .popup-back,
  .popup,
  main.screen-enter,
  main.screen-back { animation: none; }
}

.course-card .body p.course-price,
.course-card.selected .body p.course-price {
  color: #111;
  background: #fffdf8;
}
.course-card p.fee,
.course-card.selected p.fee {
  color: var(--gold);
  background: #0e3328;
  font-size: 0.78rem;
  font-weight: 400;
}
p.gold-note {
  color: var(--gold);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.phone.masters .bus-board .bus-time,
.phone.dusk .bus-board .bus-time,
.bus-board .bus-time,
.bus-board .bus-time.fit {
  background: #fffdf8;
  color: #111;
  border-color: #c4b497;
  box-shadow: none;
}
.phone.masters .bus-board .bus-time strong,
.phone.dusk .bus-board .bus-time strong,
.bus-board .bus-time strong,
.bus-board .bus-time.fit strong,
.bus-board .bus-time span {
  color: #111;
}
.bus-board .bus-time.fit {
  border-color: #006747;
}
