:root {
  color-scheme: light;
  --primary: #85b69f;
  --on-primary: #1d1b20;
  --primary-container: #e4efea;
  --on-primary-container: #1d1b20;
  --secondary: #41465f;
  --on-secondary: #ffffff;
  --secondary-container: #d5d6dc;
  --on-secondary-container: #1d1b20;
  --tertiary: #f2ca84;
  --on-tertiary: #1d1b20;
  --tertiary-container: #fcf3e4;
  --on-tertiary-container: #1d1b20;
  --error: #e27659;
  --on-error: #ffffff;
  --error-container: #f9e1da;
  --on-error-container: #1d1b20;
  --neutral: #f5f0dc;
  --bg: #fdfcf7;
  --surface: #fffefa;
  --surface-muted: #fdfcf7;
  --surface-container: #f5f0dc;
  --ink: #1d1b20;
  --muted: #656269;
  --ink-muted: var(--muted);
  --line: #d7d4d8;
  --outline: #6f6f6f;
  --brand: var(--primary);
  --primary-strong: #285b49;
  --brand-strong: var(--primary-strong);
  --accent: var(--tertiary);
  --danger: var(--error);
  --focus: var(--secondary);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-card: 0 12px 32px rgba(29, 37, 34, 0.14), 0 3px 10px rgba(29, 37, 34, 0.08);
  --elevation-1: 0 4px 12px rgba(29, 37, 34, 0.1);
  --elevation-2: var(--shadow-card);
  --elevation-card: var(--shadow-card);
  --radius-card: var(--radius-md);
  --space-unit: 4px;
  --nav-height: 72px;
  font-family: Roboto, "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

button,
select,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  width: min(100%, 720px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--surface);
  border-inline: 1px solid color-mix(in srgb, var(--secondary) 10%, transparent);
}

.app-header {
  position: absolute;
  z-index: 30;
  top: env(safe-area-inset-top);
  right: 0;
  display: flex;
  width: min(100%, 720px);
  min-height: 0;
  padding: 10px 12px 0;
  justify-content: flex-end;
  pointer-events: none;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--on-primary-container);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
}

h2 {
  margin-bottom: 14px;
  font-size: 1rem;
  line-height: 1.4;
}

.environment-badge {
  padding: 5px 9px;
  color: var(--on-tertiary);
  background: var(--tertiary);
  border: 0;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
}

.app-main {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 20px);
}

.app-shell:has(.environment-badge:not([hidden])) .app-main {
  padding-top: 40px;
}

.state-view {
  display: flex;
  min-height: 55dvh;
  padding: 40px 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.state-view svg {
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  color: var(--danger);
}

.state-view p {
  max-width: 32rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

.spinner {
  width: 28px;
  height: 28px;
  margin-bottom: 16px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.content-view {
  padding-bottom: 16px;
}

.profile-strip {
  display: grid;
  gap: 9px;
  padding: 32px 20px;
  background: var(--primary-container);
  border-bottom: 0;
}

.profile-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.profile-picker label {
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.profile-picker select {
  width: 100%;
  min-height: 42px;
  margin-left: -4px;
  padding: 8px 34px 8px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 4px;
}

.participant-plan-status {
  margin: 0 0 0 calc(4.8em + 10px);
  color: var(--secondary);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.5;
}

.participant-plan-status[data-plan="first_time"],
.participant-plan-status[data-plan="unregistered"] {
  color: var(--on-tertiary-container);
}

.onboarding-guide {
  display: grid;
  gap: 18px;
  padding: 24px 20px 28px;
  color: var(--on-tertiary-container);
  background: var(--tertiary-container);
  border-bottom: 0;
}

.onboarding-guide-heading h2 {
  margin-bottom: 9px;
  font-size: 1.08rem;
}

.onboarding-guide-heading > p:last-child,
.onboarding-guide-steps p {
  margin-bottom: 0;
  color: var(--on-tertiary-container);
  font-size: 0.82rem;
  line-height: 1.7;
}

.onboarding-video {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-container);
  border: 1px solid color-mix(in srgb, var(--tertiary) 70%, var(--line));
  border-radius: 8px;
  box-shadow: var(--elevation-1);
}

.onboarding-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.onboarding-guide-steps {
  display: grid;
  gap: 8px;
}

#onboarding-waitlist-action {
  margin-top: -6px;
}

.first-use-waitlist-heading h1 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 500;
}

.first-use-waitlist-heading > p:last-child {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.75;
}

.first-use-waitlist-form > .option-field {
  padding: 24px 20px;
  border-bottom: 1px solid var(--line);
}

.first-use-waitlist-form .option-field legend {
  color: var(--ink);
  font-size: 1rem;
}

.waitlist-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-block: 16px;
}

.waitlist-choice-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  line-height: 1.5;
  cursor: pointer;
}

.waitlist-choice-grid label:has(input:checked) {
  border-color: var(--brand-strong);
  background: var(--primary-container);
}

.waitlist-choice-grid input,
.waitlist-solo-check input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--brand-strong);
}

.first-use-waitlist-extra,
.waitlist-solo-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.waitlist-solo-check {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 1rem;
}

.waitlist-solo-check span {
  min-width: 0;
}

.waitlist-solo-fields {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--primary-container);
}

.waitlist-solo-fields > .field-label {
  min-width: 0;
  max-width: 100%;
}

.waitlist-datetime-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.waitlist-datetime-group > span {
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.waitlist-date-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.waitlist-date-parts .field-label,
.waitlist-date-parts input {
  min-width: 0;
  max-width: 100%;
}

.waitlist-solo-fields[hidden] {
  display: none;
}

.waitlist-fee-note {
  margin: 0;
  color: var(--brand-strong);
  font-size: 0.85rem;
  line-height: 1.7;
}

.waitlist-solo-fields .supporting-copy {
  margin: 0;
}

@media (max-width: 480px) {
  .waitlist-choice-grid { grid-template-columns: 1fr; }
  .first-use-waitlist-form > .option-field { padding-inline: 20px; }
  .waitlist-date-parts { grid-template-columns: minmax(0, 1fr); }
}

.page-section {
  padding: 32px 20px;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 500;
}

.registration-intro h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.supporting-copy {
  margin-bottom: 20px;
  color: var(--ink-muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-button {
  display: flex;
  min-height: 92px;
  gap: 12px;
  padding: 16px;
  align-items: center;
  text-align: left;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--outline) 55%, transparent);
  border-radius: 8px;
  box-shadow: var(--elevation-1);
  cursor: pointer;
}

.choice-button:hover,
.choice-button:focus-visible {
  border-color: var(--brand);
  background: var(--primary-container);
}

.choice-button svg {
  width: 24px;
  height: 24px;
  color: var(--brand);
  flex: 0 0 auto;
}

.choice-button strong,
.choice-button small {
  display: block;
}

.choice-button strong {
  margin-bottom: 3px;
  font-size: 0.88rem;
}

.choice-button small {
  color: var(--ink-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.form-heading,
.participant-heading {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-heading > div {
  min-width: 0;
}

.form-heading h2,
.participant-heading legend {
  margin: 0;
}

.registration-form .form-heading {
  margin-bottom: 24px;
}

.participant-heading {
  justify-content: space-between;
  margin-bottom: 16px;
}

.participant-heading legend {
  padding: 0;
  font-size: 1rem;
  font-weight: 500;
}

.participant-entry,
.option-field {
  min-width: 0;
  margin: 0;
  border: 0;
}

.field-stack {
  display: grid;
  gap: 18px;
}

.field-label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
}

.field-label > span {
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.field-label > small {
  color: var(--ink-muted);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.55;
}

.field-label input,
.field-label select,
.field-label textarea,
.share-url,
.app-shell select,
.app-shell input:not([type="radio"]):not([type="checkbox"]),
.app-shell textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1.4;
}

.app-shell input[type="date"],
.app-shell input[type="datetime-local"] {
  display: block;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.app-shell input[type="date"]::-webkit-date-and-time-value,
.app-shell input[type="datetime-local"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

.option-field {
  padding: 0;
}

.option-field legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 500;
}

.option-field p {
  margin-bottom: 10px;
  color: var(--ink-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.radio-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-row label {
  display: flex;
  min-height: 42px;
  gap: 7px;
  padding: 9px 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
}

.radio-row input,
.check-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
  flex: 0 0 auto;
}

.media-field {
  padding-top: 2px;
}

.agreement-section .media-field {
  margin-bottom: 18px;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.6;
}

.participant-acknowledgement {
  padding-top: 4px;
}

.agreement-details {
  margin-bottom: 18px;
  border-block: 1px solid var(--line);
}

.agreement-details summary {
  padding: 14px 0;
  color: var(--brand-strong);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.agreement-content {
  padding-top: 14px;
}

.agreement-content .agreement-body {
  max-height: none;
  overflow: visible;
}

.agreement-body {
  max-height: 42dvh;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
  background: var(--surface-muted);
  border-radius: 8px;
  font-size: 0.74rem;
  line-height: 1.75;
}

.inline-link {
  display: inline-block;
  margin: 12px 0 14px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 500;
}

.legal-links {
  display: flex;
  gap: 8px 18px;
  align-items: center;
  flex-wrap: wrap;
}

.language-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.language-options button {
  width: 100%;
}

.language-options button.is-active {
  border-color: var(--secondary);
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-weight: 500 !important;
}

.management-localized-fields {
  border: 1px solid var(--secondary-container);
  border-radius: 8px;
  background: var(--surface-muted);
}

.management-localized-fields > summary {
  padding: 14px 16px;
  color: var(--secondary);
  font-weight: 500;
  cursor: pointer;
}

.management-localized-fields > .field-stack {
  padding: 0 16px 16px;
}

.legal-section h2 {
  margin-bottom: 0;
}

.agreement-section > .check-row + .check-row {
  margin-top: 14px;
}

.secondary-command {
  display: inline-flex;
  min-height: 44px;
  gap: 8px;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  background: var(--surface);
  border: 1px solid var(--secondary);
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}

.icon-text-command {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.icon-text-command svg {
  width: 19px;
  height: 19px;
}

.submit-section {
  display: grid;
  gap: 10px;
}

.wide-command {
  width: 100%;
}

.workspace-key-button {
  margin-top: 10px;
}

.form-error {
  margin-bottom: 0;
  padding: 11px 12px;
  color: var(--on-error-container);
  background: var(--error-container);
  border-left: 3px solid var(--danger);
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.55;
}

.compact-state {
  min-height: 60dvh;
}

.compact-state > svg {
  color: var(--brand);
}

.share-url {
  max-width: 34rem;
  margin: 8px 0 14px;
  font-size: 0.75rem;
}

.command-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.profile-command {
  margin-top: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading h2 {
  margin-bottom: 0;
}

.calendar-copy {
  margin: 8px 0 0;
}

.calendar-room-guide {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.calendar-room-guide div {
  display: grid;
  grid-template-columns: minmax(112px, 0.85fr) minmax(0, 1.4fr);
  gap: 12px;
  align-items: baseline;
}

.calendar-room-guide dt,
.calendar-room-guide dd {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.55;
}

.calendar-space-details {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin: 16px 0;
}

.calendar-space-details summary {
  cursor: pointer;
  font-weight: 500;
}

.calendar-map {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 320px;
  height: auto;
  box-sizing: border-box;
  object-fit: contain;
  margin-top: 16px;
  border-radius: 12px;
}

.birth-date-fields {
  display: flex;
  align-items: center;
  gap: 6px;
}

.birth-date-fields select {
  min-width: 0;
}

.birth-date-fields select:first-child {
  flex: 1.4;
}

.birth-date-fields select:not(:first-child) {
  flex: 1;
}

.schedule-tool-reservation-button svg,
.schedule-group-reservation-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.schedule-cancel-button {
  display: inline-flex;
  min-height: 28px;
  margin-top: 6px;
  padding: 3px 9px;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  background: #ffffff;
  border: 1px solid var(--error);
  border-radius: 999px;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

.schedule-cancel-button:hover,
.schedule-cancel-button:focus-visible {
  color: var(--on-error-container);
  background: var(--error-container);
}

.calendar-room-guide dt {
  color: var(--secondary);
  font-weight: 500;
}

.calendar-room-guide dd {
  color: var(--ink-muted);
}

.calendar-tool-note {
  margin: 10px 0 0;
  color: var(--ink);
}

.calendar-checkin-count {
  width: fit-content;
  margin: 14px 0 0;
  padding: 7px 10px;
  color: var(--on-primary-container);
  background: var(--primary-container);
  border: 0;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--on-primary-container);
  background: var(--primary-container);
}

.schedule-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border-top: 0;
}

.section-status {
  display: flex;
  min-height: 70px;
  gap: 10px;
  margin: 14px 0 0;
  align-items: center;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.small-spinner {
  width: 18px;
  height: 18px;
  margin: 0;
  border-width: 2px;
  flex: 0 0 auto;
}

.error-text {
  color: var(--danger);
}

.schedule-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  min-height: 64px;
  padding: 16px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 0.88rem;
}

.schedule-row time {
  color: var(--ink-muted);
  font-weight: 500;
}

.schedule-clear {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.schedule-day-content {
  display: grid;
  gap: 14px;
}

.schedule-group h3 {
  margin: 0 0 7px;
  color: var(--ink-muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.schedule-group-heading {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.schedule-group-heading svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.schedule-entry {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 9px;
  padding: 5px 0;
}

.schedule-entry.is-own-reservation {
  margin: 2px 0;
  padding: 8px;
  background: var(--primary-container);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
}

.own-reservation-label {
  display: inline-block;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 6px;
  color: var(--on-primary-container);
  background: var(--surface);
  border: 0;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 500;
}

.schedule-time {
  color: var(--ink);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.schedule-entry strong,
.schedule-entry small {
  display: block;
}

.schedule-entry strong {
  font-size: 0.8rem;
  line-height: 1.45;
}

.schedule-entry small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.schedule-tool-reservation-button,
.schedule-group-reservation-button {
  display: inline-flex;
  width: 100%;
  min-height: 38px;
  gap: 7px;
  min-width: 0;
  padding: 8px 7px;
  align-items: center;
  justify-content: center;
  color: var(--on-secondary-container);
  background: var(--secondary-container);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 500;
}

.schedule-tool-reservation-button svg {
  width: 16px;
  height: 16px;
}

.schedule-reservation-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.schedule-reservation-actions .schedule-tool-reservation-button,
.schedule-reservation-actions .schedule-group-reservation-button {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  padding-right: 6px;
  padding-left: 6px;
  gap: 5px;
  white-space: nowrap;
  font-size: 0.72rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--elevation-1);
}

.action-button {
  display: flex;
  min-height: 76px;
  gap: 10px;
  padding: 14px;
  align-items: center;
  background: var(--surface);
  border: 0;
  cursor: pointer;
}

.action-button:hover,
.action-button:focus-visible {
  background: var(--primary-container);
}

.action-button svg {
  width: 21px;
  height: 21px;
  color: var(--brand);
  flex: 0 0 auto;
}

.action-button span {
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.workspace-entry-section,
.workspace-utility-section,
.events-heading-section {
  border-bottom: 1px solid var(--line);
}

.events-heading-section {
  background: var(--primary-container);
}

.workspace-entry-heading {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  align-items: start;
}

.workspace-entry-heading > svg {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  color: var(--brand);
}

.workspace-entry-heading h2,
.workspace-entry-heading p {
  margin: 0;
}

.workspace-entry-heading p {
  margin-top: 5px;
}

.workspace-utility-heading {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  align-items: start;
}

.workspace-utility-heading > svg {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  color: var(--brand);
}

.workspace-utility-heading h2,
.workspace-utility-heading p {
  margin: 0;
}

.workspace-utility-heading p {
  margin-top: 5px;
}

.filament-quick-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 18px;
  align-items: end;
}

.filament-entry-guide {
  margin: 12px 0 0;
}

.filament-note-field {
  margin-top: 14px;
}

.filament-amount-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.filament-amount-control {
  position: relative;
  display: block;
}

.filament-amount-control input {
  width: 100%;
  min-height: 58px;
  padding: 9px 44px 9px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--secondary);
  border-radius: 4px;
  font-size: 1.55rem;
  font-weight: 500;
}

.filament-amount-control strong {
  position: absolute;
  top: 50%;
  right: 15px;
  color: var(--ink-muted);
  font-size: 1rem;
  transform: translateY(-50%);
}

.filament-quick-entry .primary-command {
  min-width: 116px;
  min-height: 58px;
  white-space: nowrap;
}

.filament-meter {
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
}

.filament-meter-heading {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.filament-meter-heading strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.filament-meter-heading span {
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: right;
}

.filament-progress {
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  background: var(--surface-container);
  border-radius: 5px;
}

.filament-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
  transition: width 180ms ease;
}

.filament-meter.is-over .filament-meter-heading span {
  color: var(--danger);
}

.filament-meter.is-over .filament-progress span {
  background: var(--error);
}

.filament-meter .supporting-text {
  margin: 9px 0 0;
}

.filament-detail-toggle {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.filament-detail-toggle > summary {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 16px 0 14px 30px;
  cursor: pointer;
  list-style: none;
}

.filament-detail-toggle > summary::-webkit-details-marker {
  display: none;
}

.filament-detail-toggle > summary::after {
  position: absolute;
  top: 50%;
  left: 4px;
  color: var(--brand-strong);
  content: '\25B6';
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(-50%);
}

.filament-detail-toggle[open] > summary::after {
  content: '\25BC';
}

.filament-detail-toggle > summary span {
  font-size: 0.82rem;
  font-weight: 500;
}

.filament-detail-toggle > summary small {
  color: var(--ink-muted);
  font-size: 0.68rem;
}

.filament-detail-content {
  padding: 2px 0 4px;
}

.filament-detail-content > .supporting-text {
  margin: 10px 0 0;
}

.filament-history-heading {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.filament-history-heading h3,
.filament-history-title {
  margin: 0 0 10px;
  font-size: 0.82rem;
}

.filament-history-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.filament-history-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.filament-history-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.filament-history-summary time {
  color: var(--ink-muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.filament-history-summary p {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.filament-history-summary strong {
  min-width: 54px;
  font-size: 0.82rem;
  text-align: right;
}

.filament-edit-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
}

.filament-edit-button svg {
  width: 16px;
  height: 16px;
}

.filament-history-editor {
  display: grid;
  grid-template-columns: minmax(100px, 0.55fr) minmax(0, 1.45fr);
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filament-history-editor[hidden] {
  display: none;
}

.filament-editor-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr 1fr;
  gap: 8px;
}

.filament-editor-actions button {
  min-height: 40px;
  padding-inline: 12px;
}

.danger-command {
  color: var(--danger);
  border-color: var(--error);
}

.filament-history-empty {
  margin: 0;
  padding: 16px 0;
  color: var(--ink-muted);
  font-size: 0.76rem;
}

.mypage-filament-section {
  border-top: 1px solid var(--line);
}

.mypage-filament-section .filament-meter {
  margin-top: 14px;
}

.mypage-filament-section .filament-history-title {
  margin-top: 18px;
}

.mypage-filament-details {
  margin-top: 14px;
}

.workspace-support-note {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 32px 20px;
  color: var(--ink-muted);
  background: var(--neutral);
  border-bottom: 1px solid var(--line);
}

.workspace-support-note svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.workspace-support-note p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.65;
}

.event-list {
  display: grid;
  gap: 12px;
  padding: 32px 16px;
  border-top: 0;
}

.request-workshops-section {
  padding: 28px 16px 32px;
  border-top: 10px solid var(--surface-container);
  background: var(--surface-muted);
}

.request-workshops-heading {
  margin-bottom: 16px;
}

.request-workshops-heading h2 {
  margin: 4px 0 8px;
  font-size: 1rem;
}

.request-workshops-heading > p:last-child {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.request-workshops-list {
  display: grid;
  gap: 10px;
}

.request-workshop-item {
  --content-card-padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: var(--content-card-padding);
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
}

.request-workshop-item > img,
.request-workshop-image-placeholder {
  width: calc(100% + (var(--content-card-padding) * 2));
  height: auto;
  margin: calc(var(--content-card-padding) * -1) calc(var(--content-card-padding) * -1) 0;
  aspect-ratio: 16 / 9;
  border-radius: 8px 8px 0 0;
  object-fit: cover;
  background: var(--primary-container);
}

.request-workshop-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--brand);
}

.request-workshop-image-placeholder svg {
  width: 26px;
  height: 26px;
}

.request-workshop-content {
  min-width: 0;
}

.request-workshop-content h3 {
  margin: 0 0 5px;
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.request-workshop-teacher,
.request-workshop-description,
.request-workshop-fee {
  margin: 0;
  font-size: 0.73rem;
  line-height: 1.5;
}

.request-workshop-teacher {
  color: var(--ink-muted);
}

.request-workshop-description {
  margin-top: 5px;
}

.request-workshop-fee {
  margin-top: 5px;
  color: var(--brand-strong);
  font-weight: 500;
}

.request-workshop-booking {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.71rem;
  line-height: 1.55;
  white-space: pre-line;
}

.request-workshop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.request-workshop-command {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.72rem;
}

.events-status {
  min-height: 140px;
  margin: 0;
  padding: 32px 20px;
  justify-content: center;
}

.event-item {
  --content-card-padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 3px;
  padding: var(--content-card-padding);
  overflow: hidden;
  background: var(--surface);
  border-radius: 8px;
}

.event-item.recommended-event {
  background: var(--tertiary-container);
}

.event-item > img,
.event-item > iframe {
  width: calc(100% + (var(--content-card-padding) * 2));
  margin: calc(var(--content-card-padding) * -1) calc(var(--content-card-padding) * -1) 0;
  aspect-ratio: 16 / 9;
  max-height: none;
  border-radius: 8px 8px 0 0;
}

.event-item > img {
  object-fit: cover;
}

.event-item > iframe {
  display: block;
  border: 0;
  background: var(--secondary);
}

.event-item time {
  display: block;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 500;
}

.event-item h2 {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.event-title-row {
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
  align-items: flex-start;
  justify-content: space-between;
}

.event-statuses {
  display: flex;
  gap: 5px;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.event-title-row h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-status-label.booked {
  color: var(--on-primary-container);
  background: var(--primary-container);
  border-color: var(--primary);
}

.event-status-label {
  display: inline-flex;
  min-height: 22px;
  padding: 3px 7px;
  align-items: center;
  justify-content: center;
  color: var(--on-error-container);
  background: var(--error-container);
  border: 1px solid var(--error);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
}

.event-item p {
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.event-item .event-description {
  margin-top: 9px;
  color: var(--ink);
}

.event-item .event-meta {
  margin-top: 10px;
  color: var(--brand-strong);
  font-weight: 500;
}

.event-item .event-recommendation {
  margin-bottom: 5px;
  color: var(--on-tertiary-container);
  font-size: 0.7rem;
  font-weight: 500;
}

.event-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.event-actions .secondary-command {
  background: var(--secondary-container);
  border-color: transparent;
}

.event-command {
  display: inline-flex;
  min-height: 40px;
  padding: 8px 14px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.76rem;
}

.event-detail-view {
  min-height: calc(100dvh - var(--nav-height));
  background: var(--bg);
}

.event-detail-heading-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
}

.event-detail-heading-section .section-kicker,
.event-detail-heading-section h2 {
  grid-column: 2;
}

.event-detail-heading-section .icon-button {
  grid-row: 1 / span 2;
}

.event-detail-content {
  display: grid;
  gap: 14px;
  padding: 24px 16px 40px;
  background: var(--surface);
}

.event-detail-summary,
.event-detail-fee {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.6;
}

.event-detail-media {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 4px;
  object-fit: cover;
  background: var(--secondary);
}

.event-detail-fee {
  color: var(--brand-strong);
  font-weight: 500;
}

.event-detail-body {
  min-width: 0;
  overflow-x: auto;
  overflow-wrap: anywhere;
  color: var(--ink);
  line-height: 1.8;
}

.event-detail-body p { margin: 0 0 12px; white-space: pre-wrap; font-size: 14px; }
.event-detail-body .detail-markdown-heading { margin: 28px 0 12px; color: var(--brand-strong); font-weight: 500; line-height: 1.4; }
.event-detail-body .detail-markdown-heading:first-child { margin-top: 0; }
.event-detail-body .detail-markdown-heading-1 { font-size: 32px; }
.event-detail-body .detail-markdown-heading-2 { font-size: 26px; }
.event-detail-body .detail-markdown-heading-3 { font-size: 22px; }
.event-detail-body .detail-markdown-heading-4 { font-size: 18px; }
.event-detail-body .detail-markdown-heading-5 { font-size: 16px; }
.event-detail-body .detail-markdown-heading-6 { font-size: 14px; }
.event-detail-body ul, .event-detail-body ol { margin: 0 0 16px; padding-left: 1.6em; font-size: 14px; }
.event-detail-body li + li { margin-top: 4px; }
.event-detail-body li p { margin-bottom: 4px; }
.event-detail-body a { color: var(--brand-strong); text-decoration: underline; text-underline-offset: .2em; }
.event-detail-body a:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 3px; }
.event-detail-body blockquote { margin: 16px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--primary); color: var(--ink-muted); }
.event-detail-body blockquote p:last-child { margin-bottom: 0; }
.event-detail-body table { max-width: 100%; margin: 16px 0; border-collapse: collapse; font-size: 14px; }
.event-detail-body th, .event-detail-body td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.event-detail-body pre { overflow-x: auto; padding: 12px; border-radius: 8px; background: var(--surface-container); }
.event-detail-body code { font-size: .92em; }
.event-detail-body img { max-width: 100%; height: auto; }

.event-detail-image {
  margin: 0;
}

.event-detail-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.event-detail-image figcaption {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.event-detail-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.event-detail-fields {
  display: grid;
  gap: 18px;
}

.event-detail-image-fields {
  display: grid;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--outline);
}

.event-detail-image-slots {
  display: grid;
  gap: 14px;
}

.event-detail-image-slot {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--outline);
  border-radius: 4px;
  background: var(--surface-container);
}

.event-detail-image-slot-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.event-detail-image-slot-heading .text-command {
  padding: 2px 0;
  font-size: 0.78rem;
}

.event-detail-image-url-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.event-detail-image-url-preview {
  display: block;
  width: 56px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  background: var(--surface-container);
}

.event-date-time-fields {
  display: grid;
  gap: 12px;
}

.event-detail-image-library-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  overflow: hidden;
}

.event-detail-image-library-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  max-height: min(460px, 52dvh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
}

.event-detail-image-library-item {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 0;
  text-align: left;
  cursor: pointer;
}

.event-detail-image-library-item:hover,
.event-detail-image-library-item:focus-visible {
  outline: 2px solid var(--primary-container);
}

.event-detail-image-library-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-container);
  border: 0;
  border-radius: 0;
}

.event-detail-image-library-item span {
  padding: 4px 8px 8px;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.4;
}

.event-detail-image-library-actions {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--outline);
}

.event-detail-image-library-actions .supporting-copy {
  margin: 0;
}

.event-detail-image-pending {
  display: block;
}

.embedded-browser-view {
  height: calc(100dvh - env(safe-area-inset-top) - var(--nav-height) - env(safe-area-inset-bottom));
  min-height: 460px;
  padding-bottom: 0;
  overflow: hidden;
}

html.embedded-browser-open,
body.embedded-browser-open {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.embedded-browser-open .app-shell {
  position: fixed;
  inset: 0;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.embedded-browser-open .app-main {
  min-height: 0;
  padding-bottom: 0;
}

.embedded-browser-toolbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  min-height: 64px;
  gap: 10px;
  padding: 10px 14px;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.embedded-browser-heading {
  min-width: 0;
}

.embedded-browser-heading .section-kicker {
  margin-bottom: 2px;
}

.embedded-browser-heading h2 {
  margin: 0;
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.embedded-browser-shell {
  position: relative;
  height: calc(100% - 64px);
  background: var(--surface);
}

.embedded-browser-frame {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--surface);
  border: 0;
}

.embedded-browser-status {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  gap: 10px;
  margin: 0;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  background: var(--surface);
  font-size: 0.8rem;
}

.embedded-browser-status .spinner {
  margin: 0;
}

.danger-outline {
  color: var(--danger);
  border-color: var(--error);
}

.empty-state {
  padding: 64px 20px;
  color: var(--ink-muted);
  text-align: center;
}

.checkin-panel {
  position: relative;
  display: flex;
  min-height: 55dvh;
  padding: 36px 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.checkin-back {
  position: absolute;
  top: 16px;
  left: 16px;
}

.checkin-panel > svg {
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  color: var(--brand);
}

.checkin-panel .payment-required {
  width: min(100%, 34rem);
  padding: 14px 16px;
  color: var(--on-tertiary-container);
  background: var(--tertiary-container);
  border: 1px solid var(--tertiary);
  border-radius: 8px;
  font-weight: 500 !important;
}

.entry-actions {
  display: grid;
  grid-template-columns: 1fr;
  width: min(100%, 34rem);
  gap: 10px;
  margin-top: 22px;
}

.entry-command {
  display: flex;
  min-height: 84px;
  gap: 8px;
  padding: 14px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  text-decoration: none;
  font-size: 0.8rem;
}

.entry-command svg {
  width: 22px;
  height: 22px;
}

.checkin-manual-button {
  margin-top: 18px;
}

.disabled-command {
  color: var(--ink-muted);
  background: var(--surface-container);
  border-color: var(--line);
  cursor: not-allowed;
  pointer-events: none;
}

.primary-command,
.command-button,
.tonal-command,
.text-command {
  border: 0;
  cursor: pointer;
}

.primary-command,
.command-button,
.tonal-command {
  display: inline-flex;
  min-height: 46px;
  gap: 8px;
  padding: 11px 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  box-shadow: var(--elevation-1);
  font-weight: 500;
  text-align: center;
}

.primary-command,
.command-button {
  color: var(--on-primary);
  background: var(--primary);
}

.tonal-command {
  color: var(--secondary);
  background: var(--secondary-container);
  border-radius: 24px;
}

.primary-command svg,
.secondary-command svg,
.tonal-command svg,
.command-button svg,
.text-command svg {
  flex: 0 0 auto;
}

.primary-command:disabled {
  color: var(--ink-muted);
  background: var(--surface-container);
  box-shadow: none;
  cursor: not-allowed;
}

.primary-command.danger-command {
  color: var(--on-error);
  background: var(--error);
}

.secondary-command:disabled,
.tonal-command:disabled,
.text-command:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.text-command {
  display: inline-flex;
  min-height: 40px;
  gap: 8px;
  padding: 8px 0;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.schedule-cancel-button {
  min-height: 28px;
  padding: 3px 9px;
  color: var(--danger);
  background: #ffffff;
  border: 1px solid var(--error);
  border-radius: 999px;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

.schedule-cancel-button:hover,
.schedule-cancel-button:focus-visible {
  color: var(--on-error-container);
  background: var(--error-container);
}

.supporting-text {
  max-width: 28rem;
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.details-list {
  margin: 0;
}

.details-list > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.details-list dt {
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.details-list dd {
  margin: 0;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.key-dialog {
  width: min(calc(100% - 32px), 420px);
  padding: 22px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(65, 70, 95, 0.22);
}

.event-reservation-dialog {
  width: min(calc(100% - 32px), 420px);
  padding: 22px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(65, 70, 95, 0.22);
}

.tool-reservation-dialog {
  width: min(calc(100% - 32px), 420px);
  max-height: min(760px, calc(100dvh - 32px));
  padding: 22px;
  overflow-y: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(65, 70, 95, 0.22);
}

.content-image-dialog {
  width: min(calc(100% - 24px), 560px);
  max-height: calc(100dvh - 24px);
  padding: 20px;
  overflow-y: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(65, 70, 95, 0.22);
}

.event-reservation-dialog::backdrop {
  background: rgba(41, 45, 69, 0.48);
}

.tool-reservation-dialog::backdrop {
  background: rgba(41, 45, 69, 0.48);
}

.content-image-dialog::backdrop {
  background: rgba(41, 45, 69, 0.62);
}

.content-image-crop-frame {
  position: relative;
  width: 100%;
  margin-top: 20px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--secondary);
  border-radius: 6px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.content-image-crop-frame.is-dragging {
  cursor: grabbing;
}

.content-image-crop-frame > img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  pointer-events: none;
  transform-origin: center;
  will-change: width, height, transform;
}

.content-image-crop-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, transparent 33.15%, rgba(255, 255, 255, 0.55) 33.15%, rgba(255, 255, 255, 0.55) 33.5%, transparent 33.5%, transparent 66.48%, rgba(255, 255, 255, 0.55) 66.48%, rgba(255, 255, 255, 0.55) 66.82%, transparent 66.82%),
    linear-gradient(to bottom, transparent 33.15%, rgba(255, 255, 255, 0.55) 33.15%, rgba(255, 255, 255, 0.55) 33.5%, transparent 33.5%, transparent 66.48%, rgba(255, 255, 255, 0.55) 66.48%, rgba(255, 255, 255, 0.55) 66.82%, transparent 66.82%);
  border: 2px solid rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.content-image-crop-help {
  margin: 10px 0 14px;
  text-align: center;
}

#content-image-zoom {
  width: 100%;
  accent-color: var(--primary);
}

.event-reservation-summary {
  margin: 22px 0 8px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.6;
}

.tool-reservation-summary {
  margin: 22px 0 8px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.6;
}

.tool-reservation-fields {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.tool-reservation-time-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool-reservation-availability {
  padding: 15px 0 0;
  border-top: 1px solid var(--line);
}

.tool-reservation-availability h3 {
  margin: 0;
  font-size: 0.8rem;
}

.tool-reservation-availability .supporting-text {
  margin: 7px 0 0;
}

.tool-reservation-availability-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.tool-reservation-availability-list li {
  padding: 8px 10px;
  color: var(--ink-muted);
  background: var(--surface-muted);
  border-radius: 8px;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.event-reservation-participant {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.event-reservation-number-field {
  margin-top: 18px;
}

.event-reservation-number-field input {
  max-width: 140px;
}

.event-reservation-status {
  display: flex;
  min-height: 64px;
  gap: 10px;
  margin: 14px 0 0;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: center;
}

.dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 10px;
  margin-top: 24px;
}

.dialog-actions > button {
  width: 100%;
  padding-inline: 10px;
  font-size: 0.86rem;
}

.event-reservation-dialog > .wide-command {
  width: 100%;
  margin-top: 22px;
}

.key-dialog::backdrop {
  background: rgba(41, 45, 69, 0.48);
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dialog-heading h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.key-participant {
  margin: 18px 0 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.key-dialog-status {
  display: flex;
  min-height: 88px;
  gap: 10px;
  margin: 0;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: 0.82rem;
  text-align: center;
}

.key-code {
  display: block;
  margin: 16px 0 6px;
  padding: 20px 12px;
  color: var(--on-secondary-container);
  background: var(--secondary-container);
  border: 0;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0;
}

.key-dialog .supporting-text {
  margin: 12px 0 0;
  text-align: center;
}

.bottom-nav {
  --nav-items: 4;
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(var(--nav-items), 1fr);
  width: min(100%, 720px);
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  border-top: 0;
  box-shadow: 0 -2px 8px rgba(65, 70, 95, 0.12);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  display: flex;
  min-width: 0;
  min-height: var(--nav-height);
  gap: 5px;
  padding: 8px 4px 7px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.bottom-nav button.active {
  color: var(--on-primary-container);
}

.bottom-nav svg {
  width: 38px;
  height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
}

.bottom-nav button.active svg {
  background: var(--primary-container);
}

.bottom-nav span {
  max-width: 100%;
  font-size: 0.68rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.section-command {
  display: flex;
  width: 100%;
  gap: 8px;
  margin-top: 20px;
  align-items: center;
  justify-content: center;
}

.section-command svg {
  width: 18px;
  height: 18px;
}

.pass-heading-section {
  border-bottom: 1px solid var(--line);
}

.pass-current-balance {
  margin: 22px 0 8px;
  color: var(--brand-strong);
  font-size: 1.08rem;
  font-weight: 500;
}

.pass-purchase-status {
  min-height: auto;
  margin: 18px 0 0;
  padding: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pass-plan-section {
  padding: 32px 20px;
}

.pass-plan-list {
  display: grid;
  gap: 12px;
}

.pass-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
  align-items: center;
  background: var(--surface);
  border-radius: 8px;
}

.pass-plan h3 {
  margin: 0 0 5px;
  font-size: 0.95rem;
}

.pass-plan-price {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 0;
  color: var(--brand-strong);
  font-size: 0.9rem;
  font-weight: 500;
}

.pass-plan-price del {
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.pass-plan-price strong {
  color: var(--brand-strong);
  font-size: inherit;
}

.pass-plan-unit,
.pass-plan-effective {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 0.7rem;
}

.pass-plan-effective {
  color: var(--secondary);
  font-weight: 500;
}

.pass-plan .primary-command {
  min-width: 116px;
  padding-inline: 14px;
  white-space: nowrap;
}

.pass-history-heading-section {
  background: var(--primary-container);
}

.pass-history-balance {
  margin: 16px 0 0;
  color: var(--secondary);
  font-size: 1.15rem !important;
  font-weight: 500 !important;
}

.pass-history-section {
  padding: 20px 16px 32px;
}

.payment-statement-heading {
  padding-top: calc(28px + env(safe-area-inset-top));
}

.payment-statement-content {
  display: grid;
  gap: 20px;
  padding-bottom: 32px;
}

.payment-statement-summary {
  display: grid;
  gap: 4px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--primary-container);
}

.payment-statement-summary strong {
  color: var(--primary-strong);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
}

.payment-statement-summary small,
.payment-statement-line small,
.payment-statement-line time {
  color: var(--muted);
}

.payment-statement-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.payment-statement-meta div {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 12px;
}

.payment-statement-meta dt {
  color: var(--muted);
}

.payment-statement-meta dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.payment-statement-lines {
  display: grid;
  border-block: 1px solid var(--line);
}

.payment-statement-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.payment-statement-line:last-child {
  border-bottom: 0;
}

.payment-statement-line div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.payment-statement-line strong,
.payment-statement-line small {
  overflow-wrap: anywhere;
}

.payment-statement-line > span {
  font-weight: 600;
  white-space: nowrap;
}

.pass-history-list {
  margin-bottom: 16px;
}

.pass-history-table-scroll {
  width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--elevation-card);
  -webkit-overflow-scrolling: touch;
}

.pass-history-table {
  width: 100%;
  min-width: 350px;
  border-collapse: collapse;
  table-layout: fixed;
}

.pass-history-table th,
.pass-history-table td {
  padding: 12px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.pass-history-table th {
  color: var(--on-primary-container);
  background: var(--primary-container);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.pass-history-table th:first-child,
.pass-history-table td:first-child {
  width: 30%;
}

.pass-history-table th:nth-child(2),
.pass-history-table td:nth-child(2) {
  width: 42%;
}

.pass-history-table th:nth-child(3),
.pass-history-table td:nth-child(3),
.pass-history-table th:nth-child(4),
.pass-history-table td:nth-child(4) {
  width: 14%;
  text-align: right;
}

.pass-history-table tbody tr:last-child td {
  border-bottom: 0;
}

.pass-history-table time {
  color: var(--ink-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.pass-history-operation strong,
.pass-history-operation-meta,
.pass-history-operation-note {
  display: block;
}

.pass-history-operation strong {
  font-size: 0.78rem;
  line-height: 1.45;
}

.pass-history-operation-meta {
  margin-top: 3px;
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 500;
}

.pass-history-operation-note {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.pass-history-quantity {
  font-weight: 500;
  white-space: nowrap;
}

.pass-history-quantity.is-positive {
  color: var(--secondary);
}

.pass-history-quantity.is-negative {
  color: var(--error);
}

.pass-history-balance-cell {
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.pass-history-dialog {
  max-height: min(760px, calc(100dvh - 32px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pass-history-dialog .pass-history-list {
  margin-top: 18px;
}

.pass-terms {
  margin: 18px 0 0;
  color: var(--ink-muted);
  font-size: 0.72rem;
  line-height: 1.7;
}

.pass-youth-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  color: var(--on-tertiary-container);
  background: var(--tertiary-container);
  border-radius: 8px;
  font-size: 0.74rem;
  line-height: 1.65;
}

.admin-heading-section {
  border-bottom: 1px solid var(--line);
}

.management-heading-section {
  padding-bottom: 0;
  background: var(--primary-container);
  border-bottom: 1px solid var(--line);
}

.management-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 20px;
}

.management-tabs button {
  min-width: 0;
  min-height: 44px;
  padding: 10px 6px;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.management-tabs button.active {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
}

.management-pane {
  padding: 24px 20px 32px;
}

.management-pane.is-editing {
  padding-top: 12px;
}

.management-pane[hidden] {
  display: none;
}

.management-toolbar,
.management-card-heading,
.management-form-actions,
.management-reservation-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.management-toolbar {
  margin-bottom: 18px;
  align-items: center;
}

.management-toolbar h2,
.management-card h3,
.management-editor h3 {
  margin: 0;
}

.management-toolbar .supporting-copy {
  margin: 4px 0 0;
}

.management-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
  align-items: end;
}

.management-filters .compact-field {
  min-width: 0;
  flex: 1 1 220px;
}

.management-filters .management-search-field {
  flex-basis: 100%;
}

.management-card-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.management-card-menu {
  position: relative;
  flex: 0 0 auto;
}

.management-card-menu > summary {
  list-style: none;
}

.management-card-menu > summary::-webkit-details-marker {
  display: none;
}

.management-card-menu-items {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 126px;
  gap: 4px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--elevation-2);
}

.management-card-menu-items .compact-command {
  width: 100%;
  justify-content: flex-start;
}

.danger-menu-command {
  color: var(--error);
}

.management-delete-dialog .supporting-text {
  margin-top: 16px;
}

.management-announcement-dialog .supporting-text {
  margin-top: 16px;
}

.management-announcement-target {
  margin-top: 18px;
}

.management-announcement-target .management-media-choice {
  margin: 8px 0 0;
}

.announcement-preview {
  max-height: 320px;
  margin: 18px 0 0;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface-container);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
}

.app-toast {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: 20px;
  width: fit-content;
  max-width: min(420px, calc(100% - 40px));
  margin: 0 auto;
  padding: 12px 16px;
  color: var(--on-secondary);
  background: var(--secondary);
  border-radius: 8px;
  box-shadow: var(--elevation-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.app-toast[hidden] {
  display: none;
}

.compact-command {
  min-height: 38px;
  padding: 8px 12px;
  flex: 0 0 auto;
}

.compact-command svg {
  width: 16px;
  height: 16px;
}

.management-list {
  display: grid;
  gap: 12px;
}

.management-card,
.management-editor {
  padding: 18px;
  background: var(--surface);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--elevation-1);
}

.management-editor {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
  scroll-margin-top: 16px;
}

.management-editor[hidden] {
  display: none;
}

.management-toggle-row {
  display: flex;
  gap: 12px;
  padding: 14px;
  align-items: flex-start;
  background: var(--primary-container);
  border-radius: 8px;
}

.management-toggle-row input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex: 0 0 auto;
}

.management-toggle-row span {
  display: grid;
  gap: 3px;
}

.management-toggle-row small {
  color: var(--ink-muted);
}

.management-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.management-fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

.management-image-uploader {
  min-width: 0;
  padding: 0;
  border: 0;
}

.management-image-uploader > legend {
  margin-bottom: 8px;
}

.management-media-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.management-media-choice label {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 12px;
  align-items: center;
  gap: 7px;
  color: var(--secondary);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.management-media-choice label:has(input:checked) {
  color: var(--on-primary-container);
  background: var(--primary-container);
  border-color: var(--primary);
}

.management-media-choice input {
  accent-color: var(--primary);
}

.management-youtube-panel {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.management-youtube-panel .supporting-copy {
  margin: 0;
}

.management-image-row {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.management-image-preview {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  place-items: center;
  color: var(--secondary);
  background: var(--primary-container);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.management-image-preview > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.management-image-placeholder {
  display: grid;
  place-items: center;
}

.management-image-placeholder svg {
  width: 30px;
  height: 30px;
}

.management-image-controls {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.management-image-controls .supporting-copy {
  margin: 0;
}

.management-image-url-details {
  margin-top: 12px;
}

.management-image-url-details summary {
  min-height: 38px;
  cursor: pointer;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 500;
}

.management-image-status {
  min-height: 0;
  margin: 10px 0 0;
  padding: 0;
}

.management-fieldset legend {
  margin-bottom: 8px;
}

.management-check-grid,
.management-toggle-list {
  display: grid;
  gap: 8px;
}

.management-check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.management-check-grid label,
.management-toggle-list label {
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  align-items: center;
  background: var(--surface-container);
  border-radius: 6px;
}

.management-check-grid input,
.management-toggle-list input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.management-form-actions {
  justify-content: flex-end;
}

.management-card-heading > div {
  min-width: 0;
}

.management-card h3 {
  overflow-wrap: anywhere;
}

.management-card-meta,
.management-reservation-summary,
.management-reservation-row p,
.management-empty {
  margin: 5px 0 0;
  color: var(--ink-muted);
}

.management-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.management-badge {
  display: inline-flex;
  min-height: 22px;
  padding: 3px 7px;
  align-items: center;
  color: var(--on-secondary-container);
  background: var(--secondary-container);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
}

.management-badge.is-published {
  color: var(--on-primary-container);
  background: var(--primary-container);
}

.management-badge.is-muted {
  color: var(--ink-muted);
  background: var(--surface-container);
}

.management-reservations {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.management-reservations summary {
  min-height: 36px;
  cursor: pointer;
  color: var(--secondary);
  font-weight: 500;
}

.management-reservation-row {
  padding: 12px 0;
  align-items: center;
  border-top: 1px solid var(--line);
}

.management-reservation-row p {
  font-size: 0.75rem;
}

.danger-text-command {
  color: var(--error);
}

.admin-role-label.is-teacher {
  color: var(--on-secondary-container);
  background: var(--secondary-container);
  border-color: var(--secondary);
}

.admin-role-field {
  margin-bottom: 14px;
}

#admin-users-pane {
  padding: 0;
}

#admin-users-pane .admin-heading-section {
  padding: 24px 20px 0;
}

@media (max-width: 420px) {
  .management-card-heading {
    flex-direction: column;
  }

  .management-card-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .management-field-grid,
  .management-check-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .management-image-row {
    grid-template-columns: 112px minmax(0, 1fr);
  }
}

.admin-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 18px;
  align-items: end;
}

.admin-search-row .secondary-command {
  min-height: 46px;
}

.admin-user-list {
  display: grid;
  gap: 12px;
  padding: 16px 20px 28px;
}

.admin-user-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--elevation-1);
}

.admin-user-card.is-admin {
  border-left: 4px solid var(--accent);
}

.admin-user-heading {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
  align-items: flex-start;
  justify-content: space-between;
}

.admin-heading-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex: 0 0 auto;
}

.admin-edit-button {
  min-height: 34px;
  gap: 5px;
  padding: 6px 9px;
  font-size: 0.7rem;
}

.admin-edit-button svg {
  width: 15px;
  height: 15px;
}

.admin-user-editor {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-user-editor[hidden] {
  display: none;
}

.admin-contact {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 0.72rem;
}

.admin-contact-copyable {
  user-select: text;
  cursor: text;
}

.admin-user-heading h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.admin-user-heading p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.admin-user-labels {
  display: flex;
  gap: 6px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.admin-plan-label,
.admin-access-label {
  display: inline-flex;
  min-height: 22px;
  padding: 3px 7px;
  align-items: center;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.2;
}

.admin-plan-label {
  color: var(--on-primary-container);
  background: var(--primary-container);
  border: 1px solid var(--primary);
}

.admin-plan-label.is-subscription {
  color: var(--on-tertiary-container);
  background: var(--tertiary-container);
  border-color: var(--tertiary);
}

.admin-plan-label.is-first_time {
  color: var(--on-secondary-container);
  background: var(--secondary-container);
  border: 1px solid var(--secondary);
}

.admin-access-label {
  color: var(--ink-muted);
  background: var(--surface-container);
  border: 1px solid var(--line);
}

.admin-role-label {
  display: inline-flex;
  min-height: 22px;
  padding: 3px 7px;
  align-items: center;
  color: var(--on-tertiary-container);
  background: var(--tertiary-container);
  border: 1px solid var(--tertiary);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 500;
}

.admin-participant-list {
  display: grid;
  gap: 14px;
}

.admin-participant {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-participant.is-unregistered {
  padding: 14px;
  background: var(--surface-container);
  border: 0;
  border-radius: 8px;
}

.admin-participant-name {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
}

.admin-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-type-options label {
  position: relative;
  min-width: 0;
}

.admin-type-options label + label {
  border-left: 1px solid var(--line);
}

.admin-type-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-type-options span {
  display: flex;
  min-height: 42px;
  padding: 8px 4px;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  background: var(--surface);
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
}

.admin-type-options input:checked + span {
  color: var(--on-primary-container);
  background: var(--primary-container);
}

.admin-type-options input:disabled + span {
  color: var(--ink-muted);
  background: var(--surface-container);
}

.admin-guide-access {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-container);
}

.admin-field-title {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-guide-access label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 1px 8px;
  align-items: center;
  min-height: 36px;
  cursor: pointer;
}

.admin-guide-access input {
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.admin-guide-access span {
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-guide-access small {
  color: var(--ink-muted);
  font-size: 0.68rem;
}

.admin-guide-access label:has(input:disabled) {
  opacity: 0.5;
  cursor: default;
}

.admin-filament-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: end;
}

.admin-filament-row[hidden] {
  display: none;
}

.admin-filament-row input {
  text-align: right;
}

.admin-pass-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 12px;
  margin-top: 16px;
  align-items: end;
}

.admin-pass-row input {
  text-align: right;
}

.admin-card-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.admin-save-button {
  width: 100%;
  margin-top: 14px;
}

/* UI catalog contract: tokens and roles are shared across every screen. */
body {
  font-size: 16px;
  line-height: 1.65;
}

h1,
h2,
.state-view h2 {
  color: var(--ink);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

h3,
legend,
.details-list dt {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
}

.app-shell p,
.app-shell label,
.app-shell input,
.app-shell select,
.app-shell textarea,
.app-shell .details-list,
.app-shell .supporting-copy,
.app-shell .supporting-text,
.app-shell .field-label,
.app-shell .option-field legend,
.app-shell .check-row {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
}

.app-shell small,
.app-shell .section-kicker,
.app-shell .field-label > span,
.app-shell .field-label > small {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

button,
.primary-command,
.secondary-command,
.tonal-command,
.text-command {
  font-weight: 500;
  line-height: 1.3;
}

/* Cards use a surface and one strong elevation instead of decorative outlines. */
.schedule-row,
.event-item,
.pass-plan,
.request-workshop-item,
.choice-button,
.management-card,
.management-editor,
.admin-user-card,
.pass-history-table-scroll {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.admin-user-card.is-admin {
  box-shadow: inset 4px 0 0 var(--tertiary), var(--shadow-card);
}

.choice-button:hover,
.choice-button:focus-visible {
  background: var(--primary-container);
  border-color: transparent;
}

/* Button contract: SS 32/11/16, S 40/12/18, M 48/14/24, L 56/15/28. */
.primary-command,
.command-button,
.secondary-command,
.tonal-command {
  min-height: 48px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
}

.primary-command svg,
.command-button svg,
.secondary-command svg,
.tonal-command svg {
  width: 24px;
  height: 24px;
}

.wide-command,
.entry-command {
  min-height: 56px;
  font-size: 15px;
}

.wide-command svg,
.entry-command svg {
  width: 28px;
  height: 28px;
}

.compact-command,
.text-command,
.icon-button,
.schedule-tool-reservation-button,
.schedule-group-reservation-button {
  min-height: 40px;
  font-size: 12px;
}

.compact-command svg,
.text-command svg,
.icon-button svg,
.schedule-tool-reservation-button svg,
.schedule-group-reservation-button svg {
  width: 18px;
  height: 18px;
}

.schedule-cancel-button,
.filament-edit-button {
  min-height: 32px;
  font-size: 11px !important;
}

.schedule-cancel-button svg,
.filament-edit-button svg {
  width: 16px;
  height: 16px;
}

.action-button svg,
.section-command svg {
  width: 24px;
  height: 24px;
}

button,
[role="button"] {
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 100ms ease;
}

button:not(:disabled):active,
[role="button"]:not([aria-disabled="true"]):active {
  transform: translateY(1px);
}

.primary-command:not(:disabled):hover,
.command-button:not(:disabled):hover {
  background: var(--primary-strong);
}

.secondary-command:not(:disabled):hover,
.tonal-command:not(:disabled):hover,
.text-command:not(:disabled):hover {
  background: var(--primary-container);
}

button:disabled,
[aria-disabled="true"] {
  opacity: 0.48;
  box-shadow: none;
  cursor: not-allowed;
}

button:has(.spinner),
[aria-busy="true"] {
  cursor: progress;
}

/* Form controls retain the one catalog-approved outline. */
.field-label input,
.field-label select,
.field-label textarea,
.share-url,
.app-shell select,
.app-shell input:not([type="radio"]):not([type="checkbox"]),
.app-shell textarea {
  min-height: 48px;
  padding: 10px 12px;
  font-size: 16px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
}

.field-label input[aria-invalid="true"],
.field-label select[aria-invalid="true"],
.field-label textarea[aria-invalid="true"],
.app-shell input:user-invalid,
.app-shell select:user-invalid,
.app-shell textarea:user-invalid {
  border-color: var(--error);
}

.radio-row label,
.check-row,
.management-localized-fields,
.event-detail-image-slot,
.filament-history-editor {
  border-color: transparent;
}

.event-item > img,
.event-item > iframe,
.event-detail-media,
.event-detail-image img,
.request-workshop-item > img,
.request-workshop-image-placeholder {
  aspect-ratio: 16 / 9;
}

.event-detail-media,
.event-detail-image img,
.request-workshop-item > img,
.request-workshop-image-placeholder {
  border-radius: var(--radius-md);
}

.event-detail-image img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.event-detail-image-library-item img,
.event-detail-image-url-preview {
  border-radius: 0;
}

.management-image-preview {
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--elevation-1);
}

.key-dialog,
.event-reservation-dialog,
.tool-reservation-dialog,
.content-image-dialog {
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.page-section,
.workspace-entry-section,
.workspace-utility-section,
.events-heading-section,
.workspace-support-note,
.pass-heading-section,
.admin-heading-section,
.management-heading-section {
  border-bottom: 0;
}

@media (min-width: 721px) {
  .app-shell {
    box-shadow: 0 0 24px rgba(65, 70, 95, 0.12);
  }
}

@media (max-width: 360px) {
  .app-header,
  .page-section,
  .event-item,
  .request-workshop-item {
    --content-card-padding: 16px;
    padding-inline: 16px;
  }

  .filament-history-editor {
    grid-template-columns: 1fr;
  }

  .filament-editor-actions {
    grid-column: 1;
  }

  .filament-editor-actions {
    grid-template-columns: 1fr 1fr;
  }

  .filament-editor-actions .danger-command {
    grid-column: 1 / -1;
  }

  .profile-strip,
  .onboarding-guide {
    padding-inline: 16px;
  }

  .participant-plan-status {
    margin-left: calc(4.8em + 10px);
  }

  .schedule-entry {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .details-list > div {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .pass-plan {
    grid-template-columns: 1fr;
  }

  .pass-plan .primary-command {
    width: 100%;
  }

  .admin-search-row,
  .admin-pass-row,
  .admin-filament-row,
  .filament-form {
    grid-template-columns: 1fr;
  }

  .filament-form .wide-command {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
