:root {
  --paper: #f7f7f4;
  --ink: #090909;
  --coral: #ff5b45;
  --line: #b9b9b4;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.65 system-ui,
    "Noto Sans JP",
    sans-serif;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a.button {
  cursor: pointer;
  min-height: 44px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  border-radius: 3px;
  text-decoration: none;
}
button.secondary {
  background: transparent;
  color: var(--ink);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}
header {
  padding: 20px max(5vw, 20px);
  border-bottom: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  font-weight: 850;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand span {
  display: inline-grid;
  place-items: center;
  border: 2px solid;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  margin-right: 10px;
}
nav {
  display: flex;
  gap: 14px;
  align-items: center;
}
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px 80px;
}
h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.05em;
  margin: 0 0 14px;
}
h2 {
  font-size: 22px;
}
p {
  margin: 0 0 18px;
}
.eyebrow {
  font:
    700 11px/1.5 ui-monospace,
    monospace;
  letter-spacing: 0.13em;
  color: #b73425;
  margin-bottom: 14px;
}
.muted {
  color: #666;
  font-size: 13px;
}
.summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  border-top: 2px solid;
  border-bottom: 1px solid;
  margin: 30px 0;
  padding: 22px 0;
}
.summary strong {
  font-size: 34px;
  letter-spacing: -0.05em;
}
.count {
  font-size: 16px !important;
  font-weight: 500;
}
.status-pill {
  display: inline-block;
  border: 1px solid;
  border-radius: 30px;
  padding: 4px 12px;
  font-size: 12px;
  white-space: nowrap;
}
.status-pill.accepted,
.open {
  background: #e4eedf;
}
.closed {
  background: #f4dcd7;
}
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0;
}
.toolbar button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.toolbar button {
  background: transparent;
  color: var(--ink);
}
.toolbar .right {
  margin-left: auto;
}
.application {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.application-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
}
.application h3 {
  margin: 0 0 2px;
  font-size: 19px;
}
.application p {
  margin: 3px 0;
}
.application .goal {
  margin: 14px 0;
  max-width: 800px;
  font-size: 16px;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.controls button {
  font-size: 13px;
  min-height: 42px;
}
details {
  margin: 15px 0;
}
summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
dl {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px 20px;
  max-width: 860px;
  padding: 16px;
  background: #eeeeea;
}
dt {
  font-weight: 600;
}
dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#message {
  padding: 14px 0;
  min-height: 40px;
}
#message.error {
  color: #a1281b;
}
.narrow {
  max-width: 800px;
}
fieldset {
  border: 0;
  padding: 24px 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
legend {
  font-weight: 700;
  padding-top: 20px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
label {
  display: block;
}
input:not([type="checkbox"]),
select,
textarea {
  display: block;
  background: transparent;
  color: inherit;
  width: 100%;
  padding: 12px;
  border: 1px solid #777;
  margin-top: 8px;
  border-radius: 0;
}
textarea {
  resize: vertical;
}
.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 20px 0;
}
.checkbox input {
  margin-top: 6px;
  min-width: 18px;
  min-height: 18px;
}
.banner {
  padding: 18px 20px;
  border-left: 4px solid var(--coral);
  background: #fff;
  margin: 24px 0;
}
.demo {
  font-size: 12px;
  border-bottom: 1px solid #b9b9b4;
  background: #eee4dc;
  text-align: center;
  padding: 8px;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #eee;
  padding: 18px;
  font: 13px/1.7 system-ui;
}
#closed-panel {
  padding: 25px 0;
}
.hide,
[hidden] {
  display: none !important;
}
.slots {
  display: flex;
  gap: 5px;
  margin: 10px 0;
}
.slot {
  width: 36px;
  height: 9px;
  background: #ddd;
}
.slot.filled {
  background: var(--coral);
}
.empty {
  padding: 50px 0;
  color: #666;
}
footer {
  border-top: 1px solid;
  padding: 25px;
  text-align: center;
  font-size: 12px;
  color: #666;
}
@media (max-width: 600px) {
  main {
    padding: 28px 20px 60px;
  }
  header {
    padding: 14px 20px;
    align-items: flex-start;
  }
  .brand {
    font-size: 13px;
  }
  .brand span {
    display: none;
  }
  nav {
    gap: 8px;
    font-size: 12px;
  }
  .summary {
    grid-template-columns: 1fr;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .application-head {
    grid-template-columns: 1fr auto;
  }
  dl {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  dd {
    margin-bottom: 12px;
  }
  .toolbar .right {
    margin-left: 0;
  }
  .controls button {
    flex: 1 1 40%;
  }
}

#confirmation button { margin: 16px 8px 0 0; }
#confirmation label { display: flex; align-items: flex-start; gap: 10px; }
#confirmation input { width: auto; margin-top: 6px; }
#confirmation:focus { outline: 2px solid #111; outline-offset: 8px; }
.retention-details { border-top: 1px solid #999; margin-top: 38px; padding-top: 22px; }
.retention-details p { line-height: 1.7; }

#email-form, #code-form { display:grid;gap:16px; }
#email-form[hidden],#code-form[hidden] { display:none; }
#email,#code { width:100%;box-sizing:border-box;padding:14px;font:inherit; }

.schedule-panel { border-top: 1px solid #999; border-bottom: 1px solid #999; margin: 32px 0; padding: 20px 0; }
.schedule-form { display:flex; flex-wrap:wrap; gap:16px; align-items:end; }
.schedule-form label { display:grid; gap:8px; flex:1 1 170px; }
.schedule-form input { width:100%; box-sizing:border-box; padding:12px; font:inherit; min-width:0; border:1px solid #777; border-radius:4px; background:#fff; }
.schedule-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:14px 0; border-top:1px solid #ddd; }
.schedule-row p { flex:1 1 280px; margin:0; overflow-wrap:anywhere; }
.schedule-row button { flex:0 0 auto; }
@media(max-width:600px) { .schedule-form button { width:100%; } }
