:root {
  --ink: #11172f;
  --muted: #5e6680;
  --paper: #f5f7ff;
  --line: #dce0ef;
  --night: #090b20;
  --violet: #725cff;
  --cyan: #37d7f0;
  --coral: #e85f58;
  --green: #17815f;
  font-family: Inter, "Helvetica Neue", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); font-size: 16px; line-height: 1.75; }
a { color: #3d31a6; }
button, input, textarea { font: inherit; }
button, .primary-button, .secondary-button { cursor: pointer; }

.form-hero { color: #fff; background: radial-gradient(circle at 82% 15%,rgba(55,215,240,.17),transparent 25%),radial-gradient(circle at 67% 80%,rgba(114,92,255,.25),transparent 31%),var(--night); }
.form-hero > div { width: min(1120px,calc(100% - 48px)); margin: auto; padding: 52px 0; }
.form-hero p { margin: 0 0 8px; color: var(--cyan); font-size: 12px; font-weight: 900; letter-spacing: .22em; }
.form-hero h1 { margin: 0 0 28px; font-size: clamp(28px,4vw,48px); line-height: 1.3; }
.form-hero dl { display: grid; grid-template-columns: 1fr 1fr; max-width: 900px; margin: 0; border: 1px solid rgba(255,255,255,.18); background: rgba(8,10,35,.55); }
.form-hero dl > div { padding: 17px 20px; }
.form-hero dl > div + div { border-left: 1px solid rgba(255,255,255,.16); }
.form-hero dt { color: #abb3d2; font-size: 12px; font-weight: 800; }
.form-hero dd { margin: 3px 0 0; font-weight: 700; }

.page-wrap { padding: 64px 24px 90px; }
.registration-shell { display: grid; grid-template-columns: 270px minmax(0,1fr); width: min(1120px,100%); margin: auto; background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(17,23,47,.1); }
.registration-shell > aside { padding: 38px 30px; background: linear-gradient(150deg,#eef1ff,#f7f8ff); border-right: 1px solid var(--line); }
.registration-shell > aside > span { color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.registration-shell > aside h2 { margin: 8px 0 13px; font-size: 24px; line-height: 1.4; }
.registration-shell > aside p { margin: 0; color: var(--muted); font-size: 14px; }
.registration-shell > aside > a { display: inline-block; margin-top: 30px; font-size: 13px; font-weight: 800; }
.steps { margin: 34px 0 0; padding: 0; list-style: none; }
.steps li { position: relative; margin: 0 0 10px; padding: 11px 13px; color: #7b829b; font-weight: 800; border-left: 3px solid #c9cedf; }
.steps li.active { color: #362a89; background: #fff; border-left-color: var(--violet); box-shadow: 0 8px 20px rgba(17,23,47,.07); }
.form-panel { min-width: 0; padding: 48px 52px 58px; }
.form-heading { margin-bottom: 34px; }
.form-heading > span, .eyebrow { color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.form-heading h2 { margin: 6px 0 8px; font-size: clamp(25px,3vw,34px); line-height: 1.4; }
.form-heading p { margin: 0; color: var(--muted); }
.required { display: inline-block; padding: 1px 7px; color: #fff; background: var(--coral); border-radius: 2px; font-size: 11px; font-style: normal; vertical-align: middle; }
.field-section { min-width: 0; margin: 0 0 28px; padding: 28px; border: 1px solid var(--line); background: #fff; }
.field-section legend { padding: 0 10px 0 0; font-size: 19px; font-weight: 900; }
.field-section label > span { display: block; margin-bottom: 6px; font-weight: 800; }
.field-section label em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 500; }
.field-help { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.input-grid.followup { margin-top: 20px; }
.input-stack { display: grid; gap: 20px; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="datetime-local"], textarea, .field-section input:not([type]) { width: 100%; min-height: 50px; padding: 11px 13px; color: var(--ink); background: #fbfcff; border: 1px solid #bcc3d9; border-radius: 2px; outline: 0; }
textarea { min-height: 180px; resize: vertical; line-height: 1.65; }
input:focus, textarea:focus { background: #fff; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(114,92,255,.13); }
.day-choice { display: grid; grid-template-columns: 210px 1fr; align-items: center; gap: 22px; padding: 19px 0; border-top: 1px solid var(--line); }
.day-choice:last-of-type { border-bottom: 1px solid var(--line); }
.day-label { display: block; font-weight: 900; }
.day-choice small { color: var(--muted); }
.capacity-label { display: inline-block; margin-top: 7px; padding: 2px 8px; color: #176047; background: #e4f8ef; font-size: 11px; }
.capacity-label.is-full { color: #8a322e; background: #ffe8e5; }
.choice-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.choice-grid-two { grid-template-columns: repeat(2,1fr); }
.choice-card { position: relative; display: block; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card span { height: 100%; margin: 0 !important; padding: 13px 12px; display: grid !important; place-items: center; color: #4f5771; text-align: center; background: #f4f5fb; border: 1px solid var(--line); font-size: 14px; line-height: 1.45; cursor: pointer; }
.choice-card input:checked + span { color: #2f2480; background: #f0edff; border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }
.choice-card input:disabled + span { color: #8b91a5; background: #eceef4; border-color: #d8dbe5; cursor: not-allowed; }
.choice-card span small { display: block; color: #a03b36; font-size: 11px; }
.choice-card input:focus-visible + span { outline: 3px solid rgba(55,215,240,.7); outline-offset: 2px; }
.selection-summary { margin: 18px 0 0; padding: 12px 15px; color: #315764; background: #eefbfc; border-left: 4px solid var(--cyan); font-weight: 700; }
.selection-summary.is-empty { color: #8c3632; background: #fff4f2; border-left-color: var(--coral); }
.privacy-section { background: #f8f9ff; }
.privacy-section > p { color: #4d556f; font-size: 14px; }
.registration-note { margin: 0 0 26px; padding: 15px 18px; color: #424b67; background: #eefbfc; border-left: 4px solid var(--cyan); font-size: 14px; }
.consent { display: flex; align-items: center; gap: 11px; margin-top: 20px; padding: 15px; background: #fff; border: 1px solid var(--line); }
.consent input { width: 21px; height: 21px; flex: 0 0 auto; accent-color: var(--violet); }
.consent span { margin: 0 !important; }
.field-error { margin: 8px 0 0; color: #a3302b; font-weight: 800; }
.error-summary, .notice-error, .notice-success { margin: 0 0 25px; padding: 15px 18px; border-left: 4px solid var(--coral); background: #fff1ef; color: #8f2e2a; font-weight: 800; }
.notice-success { color: #175f48; background: #ecfaf4; border-left-color: var(--green); }
.honeypot { position: absolute !important; left: -9999px !important; }
.primary-button, .secondary-button { display: inline-flex; min-height: 52px; padding: 0 23px; align-items: center; justify-content: center; gap: 20px; color: #fff; background: linear-gradient(100deg,#5140c5,#186f88); border: 0; font-weight: 900; text-decoration: none; }
.secondary-button { color: #303751; background: #eef0f7; border: 1px solid #cfd4e3; }
.button-row { display: flex; justify-content: space-between; gap: 18px; margin-top: 32px; }
.confirmation-list { margin: 0; border-top: 1px solid var(--line); }
.confirmation-list > div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.confirmation-list dt { color: var(--muted); font-weight: 800; }
.confirmation-list dd { margin: 0; font-weight: 700; }
.complete-panel, .closed-panel { text-align: center; padding: 30px 10px; }
.complete-panel h2, .closed-panel h2 { font-size: clamp(26px,3.3vw,38px); }
.complete-mark { width: 72px; height: 72px; margin: auto auto 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,var(--violet),#2788a0); border-radius: 50%; font-size: 34px; }
.registration-number { margin: 28px auto; padding: 18px; max-width: 300px; color: #fff; background: var(--night); }
.registration-number span, .registration-number strong { display: block; }
.registration-number span { color: #aeb5d5; font-size: 12px; }
.registration-number strong { color: var(--cyan); font-size: 34px; letter-spacing: .08em; }
.form-footer { display: flex; justify-content: space-between; gap: 30px; padding: 30px max(24px,calc((100% - 1120px)/2)); color: #c9cee5; background: #07091d; }
.form-footer a { color: var(--cyan); }
.form-footer div, .form-footer span { display: block; }
.form-footer span + span { margin-top: 6px; }

.admin-body { background: #f2f4fa; }
.admin-header { min-height: 70px; padding: 0 max(24px,calc((100% - 1280px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 25px; color: #fff; background: var(--night); }
.admin-header > a { color: #fff; text-decoration: none; }
.admin-header > a span { margin-left: 12px; color: var(--cyan); font-size: 12px; }
.admin-header nav { display: flex; align-items: center; gap: 20px; }
.admin-header nav a, .admin-header nav button { color: #dce1f5; background: none; border: 0; font-weight: 800; text-decoration: none; }
.admin-header form { margin: 0; }
.admin-main { width: min(1280px,calc(100% - 48px)); margin: 48px auto 90px; }
.login-card { max-width: 520px; margin: 80px auto; padding: 42px; background: #fff; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(17,23,47,.1); }
.login-card h1 { margin: 5px 0 8px; font-size: 32px; }
.login-card > p { color: var(--muted); }
.login-card button { margin-top: 25px; width: 100%; }
.admin-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.admin-titlebar h1 { margin: 0; font-size: 34px; }
.admin-titlebar p { margin: 3px 0 0; color: var(--muted); }
.admin-actions { display: flex; gap: 10px; }
.status-badge { padding: 7px 12px; color: #8a322e; background: #ffe8e5; font-weight: 900; }
.status-badge.is-open { color: #176047; background: #e4f8ef; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 15px; margin-bottom: 24px; }
.stats-grid > div { padding: 23px; background: #fff; border: 1px solid var(--line); }
.stats-grid span, .stats-grid strong { display: block; }
.stats-grid span { color: var(--muted); font-size: 13px; font-weight: 800; }
.stats-grid strong { margin-top: 4px; color: #30257f; font-size: 32px; }
.filters { display: flex; gap: 10px; margin-bottom: 18px; }
.filters input { flex: 1; min-height: 48px; padding: 10px 13px; border: 1px solid #bcc3d9; }
.filters button { padding: 0 24px; color: #fff; background: #343a57; border: 0; font-weight: 800; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 13px 15px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.admin-table th { white-space: nowrap; background: #eef1f8; }
.table-action { display: inline-block; white-space: nowrap; font-weight: 800; }
.table-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.table-actions form { margin: 0; }
.table-delete { padding: 4px 9px; color: #9c302b; background: #fff1ef; border: 1px solid #e6b8b4; font-size: 12px; font-weight: 800; cursor: pointer; }
.table-delete:hover { color: #fff; background: #a63832; border-color: #a63832; }
.settings-card { margin-bottom: 24px; padding: 32px; background: #fff; border: 1px solid var(--line); }
.settings-card h2 { margin-top: 0; font-size: 25px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
.settings-grid label, .template-editor label, .online-url { display: block; }
.settings-grid label > span, .template-editor label > span, .online-url > span { display: block; margin-bottom: 6px; font-weight: 800; }
.settings-grid .wide { grid-column: 1/-1; }
.settings-subheading { margin: 28px 0 5px; font-size: 19px; }
.settings-note { margin: 0 0 15px; color: var(--muted); font-size: 14px; }
.capacity-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 24px; }
.capacity-grid label { padding: 16px; background: #f6f7fc; border: 1px solid var(--line); }
.capacity-grid label > span, .capacity-grid label > small { display: block; }
.capacity-grid label > span { min-height: 52px; margin-bottom: 7px; font-weight: 800; }
.capacity-grid label > small { margin-top: 5px; color: var(--muted); }
.toggle-setting { display: flex; align-items: center; gap: 12px; padding: 17px; background: #f4f6fc; }
.toggle-setting input { width: 22px; height: 22px; accent-color: var(--violet); }
.toggle-setting strong, .toggle-setting small { display: block; }
.toggle-setting small, .online-url small { color: var(--muted); }
.placeholder-help { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 24px; padding: 14px; background: #f2f5fb; }
.placeholder-help strong { margin-right: 5px; }
.placeholder-help code { padding: 3px 7px; color: #362a89; background: #fff; border: 1px solid var(--line); }
.placeholder-help small { flex-basis: 100%; color: var(--muted); line-height: 1.6; }
.online-url { margin-bottom: 25px; }
.online-url small { display: block; margin-top: 5px; }
.template-editor { margin: 0 0 22px; padding: 24px; border: 1px solid var(--line); }
.template-editor legend { padding: 0 10px; color: #352a86; font-weight: 900; }
.template-editor label + label { margin-top: 16px; }
.admin-radio { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; }
.admin-check { font-weight: 800; }
.admin-submit { margin-top: 22px; }
.danger-zone { border-color: #edc8c5; }
.danger-zone > p { color: #545c74; }
.reset-fields { max-width: 850px; }
.danger-button { min-height: 52px; padding: 0 23px; color: #fff; background: #a63832; border: 0; font-weight: 900; cursor: pointer; }
.install-card input[type="number"] { width: 100%; min-height: 50px; padding: 11px 13px; border: 1px solid #bcc3d9; }

@media (max-width: 850px) {
  .registration-shell { grid-template-columns: 1fr; }
  .registration-shell > aside { border-right: 0; border-bottom: 1px solid var(--line); }
  .steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
  .steps li { margin: 0; }
  .day-choice { grid-template-columns: 1fr; }
  .stats-grid, .capacity-grid { grid-template-columns: 1fr 1fr; }
  .admin-header, .admin-titlebar { align-items: flex-start; flex-direction: column; }
  .admin-header { padding-top: 15px; padding-bottom: 15px; }
  .admin-header nav { flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .form-hero > div { width: calc(100% - 36px); padding: 38px 0; }
  .form-hero dl { grid-template-columns: 1fr; }
  .form-hero dl > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); }
  .page-wrap { padding: 28px 14px 60px; }
  .registration-shell > aside, .form-panel { padding: 28px 20px; }
  .input-grid, .choice-grid, .settings-grid { grid-template-columns: 1fr; }
  .confirmation-list > div { grid-template-columns: 1fr; gap: 3px; }
  .button-row, .form-footer, .admin-actions { flex-direction: column; }
  .button-row form, .button-row button { width: 100%; }
  .stats-grid, .capacity-grid { grid-template-columns: 1fr; }
  .admin-main { width: calc(100% - 28px); margin-top: 28px; }
  .settings-card, .login-card { padding: 24px 18px; }
}
