:root {
  --navy: #12224a;
  --navy-soft: #3b4a70;
  --ink: #1a2238;
  --muted: #5d6781;
  --line: #dfe4ee;
  --bg: #f3f6fb;
  --card: #fff;
  --yellow: #ffd60a;
  --green: #128a4b;
  --green-bg: #e6f5ec;
  --amber: #8a5a00;
  --amber-bg: #fff3d1;
  --red: #c2283a;
  --red-bg: #fdecee;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
a { color: #1d4ed8; }
h1, h2, p, ul, dl { margin: 0; }

.top {
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.brand img { border-radius: 7px; background: #fff; }
.top-sub { font-size: 12px; color: var(--navy); background: var(--yellow); border-radius: 4px; padding: 0 7px; font-weight: 700; }

main { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; display: grid; gap: 16px; }
main.wide { max-width: 860px; }
main > *, .card > *, details > * { min-width: 0; }

.intro h1 { font-size: 26px; line-height: 1.35; color: var(--navy); letter-spacing: .01em; }
.intro p { color: var(--muted); margin-top: 6px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: grid;
  gap: 14px;
}
.card h2 { font-size: 17px; color: var(--navy); }
.card h1 { font-size: 22px; color: var(--navy); line-height: 1.4; }

.event { border-top: 5px solid var(--yellow); }
.event.off, .admin-event.off { border-top-color: var(--line); }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--navy-soft); }
.date { font-size: 30px !important; line-height: 1.25; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: -8px; }
.date span { font-size: 17px; font-weight: 600; color: var(--navy-soft); font-variant-numeric: tabular-nums; }

.meta { display: grid; gap: 6px; }
.meta div { display: grid; grid-template-columns: 4.5em 1fr; gap: 8px; }
.meta dt { color: var(--muted); font-size: 14px; padding-top: 1px; }
.meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.seats { display: grid; gap: 6px; padding: 12px 14px; background: var(--bg); border-radius: 10px; }
.seats-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.seats-main { font-size: 15px; font-weight: 700; color: var(--navy); }
.seats-main b { font-size: 26px; font-variant-numeric: tabular-nums; }
.seats-main b.full { font-size: 20px; color: var(--red); }
.seats-sub { font-size: 13px; color: var(--muted); }
.meter { height: 8px; border-radius: 99px; background: #dbe1ee; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--navy); border-radius: 99px; }

.form { display: grid; gap: 12px; }
.form label { display: block; font-size: 14px; font-weight: 700; color: var(--navy); }
.form label input, .form label select { display: block; margin-top: 4px; }
.form small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit;
  font-size: 16px; /* iOSで入力時に拡大されないように16px以上 */
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid #c3cbdc;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 0; font-size: 14px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, summary:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid #7aa7ff;
  outline-offset: 2px;
}
input::placeholder { color: #9aa3b8; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 10px 18px;
  border: 1.5px solid var(--navy); border-radius: 12px;
  background: #fff; color: var(--navy);
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  text-align: center;
}
.btn.primary { background: var(--navy); color: #fff; font-size: 17px; }
.btn.primary:hover { background: #0b1736; }
.btn.line { background: #06c755; border-color: #06c755; color: #fff; min-height: 44px; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }

.hint { font-size: 13px; color: var(--muted); }
.alert { background: var(--red-bg); color: var(--red); font-weight: 700; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.notice { background: var(--amber-bg); color: var(--amber); font-weight: 700; border-radius: 10px; padding: 10px 12px; font-size: 14px; overflow-wrap: anywhere; }
.saved { background: var(--green-bg); color: var(--green); font-weight: 700; border-radius: 10px; padding: 10px 12px; font-size: 14px; }

.mine { list-style: none; padding: 0; display: grid; gap: 8px; }
.mine li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; background: var(--green-bg); border-radius: 10px; }
.mine-name { font-weight: 700; flex: 1; min-width: 6em; overflow-wrap: anywhere; }
.mine a { font-size: 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 800; font-style: normal; border-radius: 6px; padding: 1px 8px; background: #e7ebf3; color: var(--navy-soft); white-space: nowrap; }
.tag.confirmed { background: var(--green); color: #fff; }
.tag.waitlist { background: var(--amber-bg); color: var(--amber); }
.tag.cancelled { background: var(--red-bg); color: var(--red); }

details > summary { cursor: pointer; color: var(--navy); font-weight: 700; font-size: 14px; padding: 6px 0; }
details.more[open] > summary { margin-bottom: 10px; }
details.later, details.flyer { display: grid; }
details.later > summary, details.flyer > summary { padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
details.later[open] > summary, details.flyer[open] > summary { margin-bottom: 14px; }
details.later > .card + .card { margin-top: 14px; }
.flyer img { width: 100%; height: auto; border-radius: var(--radius); display: block; }

.rules { padding-left: 1.2em; display: grid; gap: 6px; font-size: 15px; }

.share-row { display: flex; gap: 16px; align-items: center; }
.share-row > div { display: grid; gap: 10px; justify-items: start; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.qr { flex: none; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.result { border-top: 5px solid var(--green); }
.result.waitlist { border-top-color: #e0a100; }
.result.cancelled { border-top-color: #b6bdcc; }
.cancel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px; }
.cancel form { display: grid; gap: 12px; padding-bottom: 10px; font-size: 14px; }
.back { text-align: center; font-size: 14px; }
footer { text-align: center; font-size: 12px; }
footer a { color: var(--muted); }

/* 幹事用 */
.admin-head { display: flex; align-items: center; justify-content: space-between; }
.admin-head h1 { font-size: 22px; color: var(--navy); }
.count { font-size: 15px; }
.count b { font-size: 22px; color: var(--navy); }
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
td { overflow-wrap: anywhere; min-width: 2em; }
td:nth-child(2) { font-weight: 700; min-width: 6em; }
tr.cancelled td { color: #9aa3b8; text-decoration: line-through; }
tr.cancelled td:nth-child(5) { text-decoration: none; }
tr.waitlist td:nth-child(5) { color: var(--amber); font-weight: 700; }
.nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.link { background: none; border: 0; padding: 4px 0; min-height: 0; font: inherit; font-size: 14px; color: #1d4ed8; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.link.danger { color: var(--red); }
.form.grid { grid-template-columns: 1fr 1fr; }
.form.grid .span { grid-column: 1 / -1; }

@media (max-width: 380px) {
  .date { font-size: 26px !important; }
  .share-row { flex-direction: column; align-items: flex-start; }
}
