:root {
  --ink: #2d2630;
  --muted: #6d6470;
  --purple: #59436b;
  --purple-soft: #eee8f1;
  --beige: #d4c1a6;
  --beige-soft: #fbf7ef;
  --line: #ded6df;
  --green: #126541;
  --green-bg: #e7f5ed;
  --red: #9d2f38;
  --red-bg: #fff0f1;
  --orange: #8b550e;
  --orange-bg: #fff4df;
  --shadow: 0 16px 40px rgba(55, 39, 65, .09);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #fbfaf8; color: var(--ink); font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; line-height: 1.75; }
a { color: var(--purple); text-underline-offset: 3px; }
.site-header { width: min(1120px, calc(100% - 40px)); margin: 0 auto; min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; font-size: 1.05rem; letter-spacing: .07em; font-weight: 700; }
.brand span { color: var(--purple); font-size: .78rem; margin-left: 8px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 18px; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .86rem; }
.site-header nav a { text-decoration: none; }
.page-shell { width: min(1040px, calc(100% - 40px)); margin: 42px auto 68px; }
.site-footer { padding: 24px 20px; text-align: center; border-top: 1px solid var(--line); color: var(--muted); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .75rem; }
.site-footer p { margin: 0; }
.event-card { position: relative; overflow: hidden; padding: 44px 48px; border: 1px solid #dcd1df; background: linear-gradient(120deg, #fffdfb, #f6f1f7); box-shadow: var(--shadow); text-align: center; }
.event-card::before, .event-card::after { content: ""; position: absolute; width: 150px; height: 150px; border: 1px solid rgba(89,67,107,.12); border-radius: 50%; }
.event-card::before { left: -70px; top: -80px; } .event-card::after { right: -76px; bottom: -88px; }
.eyebrow { margin: 0 0 8px; color: var(--purple); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .82rem; letter-spacing: .17em; font-weight: 700; }
h1, h2 { line-height: 1.35; }
.event-card h1 { position: relative; margin: 0; font-size: clamp(1.65rem, 4vw, 2.5rem); letter-spacing: .1em; }
.event-theme { position: relative; margin: 20px 0 25px; font-size: clamp(1rem, 2.6vw, 1.3rem); }
dl { margin: 0; }
.event-card dl { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid #ddd3db; }
.event-card dl div { padding: 14px 14px 0; } .event-card dl div + div { border-left: 1px solid #ddd3db; }
dt { color: var(--muted); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .78rem; } dd { margin: 0; font-weight: 700; }
.hero { display: grid; gap: 26px; } .hero-actions, .admin-actions, .scanner-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 47px; padding: 10px 21px; border: 1px solid transparent; border-radius: 2px; color: white; text-decoration: none; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .93rem; font-weight: 700; letter-spacing: .04em; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.button:hover { transform: translateY(-1px); opacity: .92; } .button.primary { background: var(--purple); } .button.secondary { border-color: #b9acbc; background: white; color: var(--purple); }
.information, .form-card, .text-card, .login-card, .scanner-card, .scan-result, .table-card { background: white; border: 1px solid #e5e0e5; box-shadow: 0 10px 30px rgba(55, 39, 65, .055); }
.information { padding: 32px 38px; } .information h2 { margin: 0 0 12px; font-size: 1.25rem; } .information p { margin: 12px 0 0; }
.form-card, .text-card, .login-card { margin-top: 26px; padding: 38px; } .form-card h2, .text-card h1, .login-card h1 { margin: 0 0 12px; font-size: 1.55rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; } label { display: grid; gap: 6px; color: #423849; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .9rem; font-weight: 700; } label span { display: inline-block; width: fit-content; padding: 1px 5px; border-radius: 2px; color: var(--red); background: #fff1f2; font-size: .68rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #cfc5d0; border-radius: 2px; background: #fff; color: var(--ink); padding: 11px 12px; font: inherit; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: 1rem; } input:focus, select:focus, textarea:focus { outline: 3px solid rgba(89,67,107,.15); border-color: var(--purple); } textarea { min-height: 92px; resize: vertical; } .full { grid-column: 1 / -1; }
.consent { display: flex; grid-template-columns: 20px 1fr; align-items: flex-start; gap: 10px; padding: 16px; background: var(--beige-soft); border-left: 3px solid var(--beige); font-size: .84rem; line-height: 1.7; } .consent input { width: 18px; height: 18px; margin-top: 3px; } .consent span { display: inline; width: auto; color: inherit; background: none; font-size: inherit; font-weight: inherit; }
.fine-print { color: var(--muted); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .78rem; line-height: 1.75; }
.notice { margin: 0 0 22px; padding: 14px 17px; border-left: 4px solid var(--purple); background: var(--purple-soft); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .9rem; } .notice.success { border-color: var(--green); color: var(--green); background: var(--green-bg); } .notice.error { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.ticket { width: min(660px, 100%); margin: 0 auto; padding: 42px 44px; text-align: center; background: #fff; border: 1px solid #d8c9da; box-shadow: var(--shadow); } .ticket h1 { margin: 0; font-size: 2rem; } .ticket-code { margin: 16px 0 10px; font-family: ui-monospace, monospace; color: var(--purple); font-weight: 800; letter-spacing: .08em; } .ticket-qr { display: block; width: min(340px, 86%); margin: 8px auto; } .ticket-name { margin: 8px 0 20px; font-size: 1.25rem; font-weight: 700; }
.ticket dl { margin: 14px 0 20px; padding: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; } .ticket dl div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 3px 0; } .ticket-notice { margin: 18px 0 24px; padding: 16px; background: var(--beige-soft); border-left: 3px solid var(--beige); text-align: left; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .84rem; line-height: 1.8; }
.login-card { width: min(500px, 100%); margin: 45px auto; } .login-card form { display: grid; gap: 18px; margin-top: 25px; }
.staff-shell, .admin-shell { display: grid; gap: 24px; } .staff-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; } .staff-header h1 { margin: 0; font-size: 1.75rem; } .staff-header p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: .93rem; }
.scan-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 18px; border: 1px solid #ded5df; background: #f7f4f8; } .scan-controls label { width: min(230px, 100%); } .mode-button { padding: 12px 17px; border: 1px solid #b7a8bb; border-radius: 2px; background: #fff; color: var(--purple); font: inherit; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .92rem; font-weight: 700; cursor: pointer; } .mode-button.active { border-color: var(--purple); background: var(--purple); color: #fff; }
.scanner-card { padding: 30px; } #reader { overflow: hidden; min-height: 80px; border: 1px dashed #b7a8bb; background: #fcfafc; } #reader video { max-width: 100%; } .scanner-actions { margin-top: 18px; } .manual-scan { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 15px; }
.scan-result { min-height: 120px; padding: 28px; text-align: center; } .scan-result p { margin: 0; } .scan-result.success { border: 2px solid var(--green); background: var(--green-bg); color: #0f5132; } .scan-result.error { border: 2px solid var(--red); background: var(--red-bg); color: #842029; } .scan-result.warning { border: 2px solid #d59723; background: var(--orange-bg); color: #754d0b; } .scan-result h2 { margin: 0 0 8px; font-size: 1.55rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; } .stats div { padding: 21px 18px; border-top: 4px solid var(--purple); background: white; box-shadow: 0 7px 20px rgba(55, 39, 65, .055); } .stats span { display: block; color: var(--muted); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .8rem; } .stats strong { display: block; margin-top: 2px; font-family: ui-monospace, monospace; font-size: 2rem; }
.table-card { overflow-x: auto; padding: 25px; } .table-card h2 { margin: 0 0 14px; font-size: 1.2rem; } table { width: 100%; border-collapse: collapse; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .85rem; } th { padding: 11px 9px; border-bottom: 2px solid #cabdce; text-align: left; color: #4a3d50; white-space: nowrap; } td { padding: 12px 9px; border-bottom: 1px solid #ece7ec; vertical-align: top; } small { color: var(--muted); } code { padding: 2px 4px; background: #f3f1f4; font-family: ui-monospace, monospace; font-size: .77rem; }
.search-form { display: grid; grid-template-columns: minmax(180px, 1fr) 180px auto; gap: 10px; } .badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; } .badge.inside { color: var(--green); background: var(--green-bg); } .badge.outside { color: #735c13; background: var(--orange-bg); } .badge.valid { color: #3d356f; background: #eceafa; } .badge.invalid { color: var(--red); background: var(--red-bg); } .text-link, .link-button { display: inline-block; margin: 2px 6px 2px 0; font: inherit; font-size: .8rem; } .link-button { padding: 0; border: 0; color: var(--red); background: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 720px) { .site-header { width: min(100% - 28px, 1120px); padding: 14px 0; align-items: flex-start; flex-direction: column; gap: 7px; } .page-shell { width: min(100% - 28px, 1040px); margin: 25px auto 48px; } .event-card { padding: 30px 22px; } .event-card dl { grid-template-columns: 1fr; } .event-card dl div + div { border-left: 0; border-top: 1px solid #ddd3db; } .form-card, .text-card, .login-card, .ticket { padding: 28px 20px; } .form-grid, .stats { grid-template-columns: 1fr; } .staff-header { align-items: stretch; flex-direction: column; } .staff-header .button { width: 100%; } .scanner-card { padding: 18px; } .manual-scan, .search-form { grid-template-columns: 1fr; } .manual-scan .button, .search-form .button { width: 100%; } .wide-table { padding: 14px; } }
@media print { .site-header, .site-footer, .no-print { display: none !important; } body { background: #fff; } .page-shell { width: 100%; margin: 0; } .ticket { width: 100%; border: 0; box-shadow: none; } }

.form-section { padding: 20px; border: 1px solid #e2dce5; background: #fcfbfc; }
.form-section h3 { margin: 0 0 15px; font-size: 1.05rem; }
.attendee-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.attendee-fields { margin: 0; padding: 16px; border: 1px solid #ded5df; min-width: 0; }
.attendee-fields legend { padding: 0 6px; color: var(--purple); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .83rem; font-weight: 700; }
.attendee-fields label + label { margin-top: 10px; }
.ticket-bundle { padding: 38px; background: #fff; border: 1px solid #d8c9da; box-shadow: var(--shadow); text-align: center; }
.ticket-bundle > h1 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); }
.bundle-summary { padding: 10px; background: var(--beige-soft); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .86rem; }
.bundle-event { display: grid; grid-template-columns: repeat(4, 1fr); margin: 22px 0; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bundle-event div + div { border-left: 1px solid var(--line); }
.bundle-notice { margin: 18px 0 25px; padding: 16px; border-left: 3px solid var(--beige); background: var(--beige-soft); text-align: left; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .86rem; }
.ticket-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 30px; text-align: left; }
.compact-ticket { width: 100%; margin: 0; padding: 24px; text-align: center; box-shadow: none; }
.compact-ticket h2 { margin: 4px 0; font-size: 1.35rem; }
.compact-ticket .ticket-qr { width: min(250px, 92%); }
.ticket-sequence { margin: 0; color: var(--muted); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .78rem; }
.ticket-relationship { margin: 4px 0 16px; color: var(--muted); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .87rem; }
.settings-card, .detail-card { padding: 27px; border: 1px solid #ded5df; background: #fbf9fb; }
.settings-card h2 { margin: 0; font-size: 1.18rem; }
.inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.inline-form label { width: min(240px, 100%); }
.detail-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 26px; }
.detail-card dl div { padding-bottom: 10px; border-bottom: 1px solid #e3dde4; }
.confirm-card { display: flex; margin: 18px auto 0; }
@media (max-width: 720px) { .attendee-grid, .bundle-event, .detail-card dl { grid-template-columns: 1fr; } .bundle-event div + div { border-left: 0; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; } .ticket-bundle { padding: 28px 18px; } }

.ticket-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 18px 0; }
.ticket-share .button { min-height: 42px; padding: 8px 14px; font-size: .82rem; }
.share-status { flex-basis: 100%; min-height: 1.7em; margin: 2px 0 0; color: var(--green); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .78rem; line-height: 1.55; }

.staff-actions, .manual-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.staff-actions form { margin: 0; }
.manual-shell { display: grid; gap: 22px; }
.manual-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.manual-header h1 { margin: 0; font-size: clamp(1.55rem, 3.5vw, 2.25rem); }
.manual-header p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.manual-alert { padding: 18px 21px; border-left: 5px solid #a66d14; background: var(--orange-bg); color: #664309; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; line-height: 1.8; }
.manual-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.manual-card, .manual-table-card { padding: 24px; border: 1px solid #e1dbe3; background: #fff; box-shadow: 0 8px 22px rgba(55, 39, 65, .05); }
.manual-card h2, .manual-table-card h2 { margin: 0 0 12px; color: var(--purple); font-size: 1.16rem; }
.manual-card ol { margin: 0; padding-left: 1.45em; }
.manual-card li + li { margin-top: 8px; }
.manual-card table, .manual-table-card table { font-size: .85rem; }
.manual-close { border-top: 4px solid var(--purple); }
@media (max-width: 720px) { .staff-actions, .manual-actions { width: 100%; } .staff-actions .button, .manual-actions .button { flex: 1; } .manual-header { flex-direction: column; } .manual-grid { grid-template-columns: 1fr; } .manual-card, .manual-table-card { padding: 19px; } }

.ticket-prohibition { margin: 18px 0 0; padding: 14px 16px; border: 2px solid #b3212b; background: #fff0f1; color: #9d1f29; text-align: center; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: .95rem; line-height: 1.65; letter-spacing: .02em; }
.compact-ticket .ticket-prohibition { margin-top: 14px; padding: 11px 12px; font-size: .83rem; }
.gate-settings-form { display: grid; grid-template-columns: minmax(250px, 1fr) auto; align-items: end; gap: 12px; margin-top: 14px; }
.gate-settings-form textarea { min-height: 106px; }
@media (max-width: 720px) { .gate-settings-form { grid-template-columns: 1fr; } .gate-settings-form .button { width: 100%; } .ticket-prohibition { font-size: .88rem; } }

/* テスト申込の完全削除は、通常の管理操作と明確に区別する。 */
.danger-zone { border: 1px solid #b3263c; background: #fff7f8; }
.button.danger { background: #9e1f35; border-color: #9e1f35; color: #ffffff; }
.button.danger:hover, .button.danger:focus { background: #7d172a; border-color: #7d172a; }
.danger-zone label { display: inline-flex; align-items: center; gap: .65rem; margin: 0 .7rem .7rem 0; }
.danger-zone input { max-width: 12rem; }

/* 保護者証とQR入場券の同時提示を、券面上で明確に案内する。 */
.ticket-entry-requirement {
  margin: 18px 0 0;
  padding: 15px 16px;
  border: 3px solid #8b550e;
  background: #fff4df;
  color: #65400b;
  text-align: center;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: .93rem;
  line-height: 1.7;
}
.ticket-entry-requirement strong:first-child {
  display: inline-block;
  margin-bottom: 3px;
  font-size: 1.02rem;
}
.compact-ticket .ticket-entry-requirement {
  margin-top: 14px;
  padding: 12px 11px;
  font-size: .8rem;
}
.bundle-entry-requirement {
  max-width: 740px;
  margin: 20px auto;
}
@media (max-width: 720px) {
  .ticket-entry-requirement { font-size: .86rem; }
}

/* 新規申込と既存申込の追加操作を、同じ場所で明確に選べるようにする。 */
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.button-row .button { min-width: 190px; }
@media (max-width: 720px) { .button-row { display: grid; grid-template-columns: 1fr; } .button-row .button { width: 100%; } }

/* 講演時間・受付開始時間の設定を、運営管理画面で分かりやすく操作できるようにする。 */
.event-schedule-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) auto; align-items: end; gap: 12px; margin-top: 14px; }
@media (max-width: 720px) { .event-schedule-form { grid-template-columns: 1fr; } .event-schedule-form .button { width: 100%; } }

.application-intake-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin-top: 14px;
}
.application-intake-form .checkbox-label {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.application-intake-form .checkbox-label input {
  width: 18px;
  height: 18px;
}
.application-intake-form .fine-print {
  display: block;
  margin-top: 4px;
}
@media (max-width: 720px) {
  .application-intake-form { grid-template-columns: 1fr; }
}

.ticket-inventory {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px 14px;
  margin: 18px 0;
  padding: 15px 18px;
  border: 1px solid #8770a4;
  border-left: 5px solid #4b385e;
  border-radius: 10px;
  background: #faf8fc;
  color: #32253f;
}
.ticket-inventory span { font-weight: 700; }
.ticket-inventory strong { font-size: 1.45rem; color: #4b385e; }
.ticket-inventory small { color: #645a6f; }
.ticket-inventory.sold-out { border-color: #b45c5c; border-left-color: #a63f3f; background: #fff8f8; }
.ticket-inventory.sold-out strong { color: #a63f3f; }
@media (max-width: 720px) {
  .ticket-inventory { grid-template-columns: 1fr auto; }
  .ticket-inventory small { grid-column: 1 / -1; }
}
