:root {
  --canvas: #faf8f7;
  --card: #ffffff;
  --ink: #2a483e;
  --muted: #76827e;
  --mint: #b1d8c6;
  --mint-strong: #489174;
  --pink: #f8dce1;
  --pink-strong: #d88b9e;
  --line: rgba(72, 145, 116, 0.28);
  --shadow: 0 10px 28px rgba(54, 123, 95, 0.09);
}

.app-page {
  min-height: 100vh;
  background: var(--canvas);
}

.page-shell {
  width: min(100% - 36px, 560px);
  margin: 0 auto;
  padding: 32px 0 44px;
}

.app-update-notice {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  width: min(calc(100% - 24px), 520px);
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(72, 145, 116, .2);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 12px 36px rgba(30, 60, 50, .2);
}

.app-update-notice div {
  display: grid;
  gap: 2px;
}

.app-update-notice strong {
  font-size: 12px;
}

.app-update-notice small {
  color: var(--muted);
  font-size: 9px;
}

.app-update-notice button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.app-update-later {
  border: 1px solid #dce5e1;
  background: var(--card);
  color: var(--muted);
}

.app-update-now {
  border: 0;
  background: var(--mint-strong);
  color: white;
}

@media (max-width: 390px) {
  .app-update-notice {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-update-notice div {
    grid-column: 1 / -1;
  }
}

/* Home, create, and offline guide pages */\n\n.home-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.home-card {
  width: min(100%, 440px);
  padding: 42px 28px 30px;
  text-align: center;
}

.home-brand-icon {
  display: block;
  width: 82px;
  height: 82px;
  margin: 0 auto 14px;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(54, 123, 95, .13);
}

.app-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--ink);
}

.tennis-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  transform: translateX(-1.5px);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--mint-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
}

.home-card h1,
.app-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 7vw, 36px);
  line-height: 1.25;
  letter-spacing: -.04em;
}

.english-title,
.app-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.home-copy {
  margin: 28px 0;
  color: var(--muted);
}

.home-actions,
.create-actions {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.soft-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 10px 20px;
  border: 0;
  border-radius: 18px;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  background: var(--mint);
  color: var(--ink);
}

.soft-action {
  background: rgba(248, 220, 225, .48);
  color: var(--pink-strong);
  border: 1px solid rgba(216, 139, 158, .28);
}

.primary-action>span:last-child,
.soft-action>span:last-child {
  display: grid;
  min-width: 190px;
}

.primary-action strong,
.soft-action strong {
  font-size: 16px;
}

.primary-action small,
.soft-action small {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 650;
  opacity: .78;
}

.action-icon {
  display: grid;
  place-items: center;
  width: 30px;
}

.shuffle-icon {
  width: 29px;
  height: 29px;
  color: var(--ink);
}

.instagram-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
  min-height: 68px;
  padding: 8px 20px;
  border: 1px solid rgba(216, 139, 158, .35);
  border-radius: 18px;
  background: linear-gradient(105deg, rgba(248, 220, 225, .52), rgba(255, 255, 255, .92));
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(216, 139, 158, .1);
  transition: transform .15s ease, box-shadow .15s ease;
}

.instagram-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 26px rgba(216, 139, 158, .16);
}

.offline-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 10px 20px;
  border: 1px solid rgba(72, 145, 116, .3);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  color: var(--ink);
  text-decoration: none;
}

.offline-action-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--mint);
  font-size: 19px;
  font-weight: 800;
}

.offline-action>span:last-child {
  display: grid;
  min-width: 190px;
}

.offline-action strong {
  font-size: 16px;
}

.offline-action small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.offline-notice {
  display: grid;
  gap: 3px;
  margin: 20px 0 0;
  padding: 13px 16px;
  border: 1px solid rgba(72, 145, 116, .3);
  border-radius: 14px;
  background: rgba(177, 216, 198, .18);
  color: var(--ink);
  text-align: center;
}

.offline-notice strong {
  font-size: 13px;
}

.offline-notice small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.offline-create-shell .app-heading {
  padding-bottom: 10px;
}

.offline-create-shell .offline-notice {
  margin: 8px 0 18px;
}

.offline-notice small button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mint-strong);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.result-offline-notice {
  width: min(100% - 32px, 720px);
  margin: 14px auto 0;
}

.offline-guide-dialog {
  width: min(100%, 480px);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(30, 60, 50, .22);
}

.offline-guide-dialog h2 {
  margin: 0;
  font-size: 20px;
}

.offline-guide-dialog h3 {
  margin: 20px 0 8px;
  font-size: 15px;
}

.offline-guide-dialog p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.offline-guide-dialog a {
  display: block;
  overflow-wrap: anywhere;
  color: var(--mint-strong);
  font-weight: 700;
}

.offline-guide-dialog ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 24px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.offline-guide-close {
  width: 100%;
  min-height: 46px;
  margin-top: 22px;
  border: 0;
  border-radius: 13px;
  background: var(--mint-strong);
  color: white;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.instagram-icon-space {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.instagram-icon-space img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.instagram-copy {
  display: grid;
  gap: 2px;
  min-width: 190px;
}

.instagram-copy strong {
  font-size: 15px;
}

.instagram-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.sf-symbol {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: var(--symbol-url) center / contain no-repeat;
  mask: var(--symbol-url) center / contain no-repeat;
}

.app-heading {
  text-align: center;
  padding: 4px 0 28px;
}

.app-heading .app-mark {
  width: 54px;
  height: 54px;
}

.settings-stack {
  display: grid;
  gap: 20px;
}

.number-card,
.names-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.number-card {
  padding: 20px 22px 22px;
  text-align: center;
}

.number-card h2 {
  margin: 0;
  font-size: 20px;
}

.number-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.stepper button {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(177, 216, 198, .52);
  color: var(--mint-strong);
  font-size: 28px;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.stepper button:disabled {
  color: #b8c0bd;
  opacity: .48;
}

.stepper strong {
  width: 100px;
  font-size: 50px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.names-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 76px;
  padding: 16px 20px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.names-toggle>span:first-child {
  display: grid;
}

.names-toggle strong,
.player-strip strong {
  font-size: 15px;
}

.names-toggle small,
.player-strip small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.chevron {
  color: var(--muted);
  font-size: 24px;
  transition: transform .2s;
}

.names-card.open .chevron {
  transform: rotate(180deg);
}

.name-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  max-height: 230px;
  overflow: auto;
  padding: 12px 15px 16px;
  border-top: 1px solid #edf0ee;
}

.name-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.name-row input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dfe8e3;
  border-radius: 9px;
  outline: 0;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
}

.name-row input:focus {
  border-color: var(--mint-strong);
}

.name-row input::placeholder {
  color: rgba(42, 72, 62, .38);
  opacity: 1;
}

.create-button {
  margin: 0;
}

.history-button:disabled {
  cursor: default;
  filter: grayscale(1);
  opacity: .46;
}

.history-icon {
  width: 29px;
  height: 29px;
}

.schedule-history-list {
  display: grid;
  gap: 8px;
  padding: 4px;
}

.schedule-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid #dfe8e3;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.schedule-history-item:hover {
  border-color: var(--mint-strong);
  background: rgba(177, 216, 198, .14);
}

.schedule-history-item strong {
  font-size: 13px;
}

.schedule-history-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.history-delete {
  justify-self: center;
  display: grid;
  gap: 1px;
  padding: 5px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.history-delete small {
  font-size: 9px;
  opacity: .75;
}

.back-link {
  padding: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  text-decoration: none;
}

/* Result, sharing, summary, and participant controls */\n\n.result-container {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--canvas);
}

.result-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 66px;
  padding: 8px 12px;
  border-bottom: 1px solid #e9ecea;
  background: rgba(250, 248, 247, .94);
  backdrop-filter: blur(14px);
  text-align: center;
}

.result-header h1 {
  margin: 0;
  font-size: 17px;
}

.result-header p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.header-back {
  display: grid;
  place-items: center start;
  width: 42px;
  height: 42px;
  color: var(--mint-strong);
  font-size: 22px;
  text-decoration: none;
}

.member-action {
  justify-self: end;
}

.member-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  color: var(--mint-strong);
}

.member-action>.sf-symbol {
  width: 24px;
  height: 24px;
}

.member-action span {
  display: grid;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.15;
}

.member-action small {
  font-size: 9px;
}

.member-readonly-badge {
  justify-self: end;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(177, 216, 198, .3);
  color: var(--mint-strong);
  font-size: 9px;
  font-weight: 800;
}

.general-share-action {
  display: grid;
  gap: 6px;
  padding: 14px 15px 22px;
  background: var(--card);
}

.general-share-action button {
  display: grid;
  gap: 2px;
  min-height: 52px;
  place-items: center;
  border: 0;
  border-radius: 15px;
  background: var(--mint-strong);
  color: white;
  cursor: pointer;
}

.general-share-action button:disabled {
  cursor: wait;
  opacity: .6;
}

.general-share-action small {
  font-size: 9px;
  opacity: .82;
}

.general-share-action p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.share-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .28);
}

.share-dialog {
  width: min(100%, 440px);
  padding: 22px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(30, 60, 50, .22);
}

.share-dialog h2,
.share-dialog p {
  margin: 0;
}

.share-dialog h2 {
  font-size: 18px;
}

.share-dialog>p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.share-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
  margin-top: 16px;
}

.share-url-row input {
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 1px solid #dfe6e2;
  border-radius: 12px;
  background: var(--canvas);
  color: var(--ink);
  font-size: 12px;
}

.share-copy-button {
  position: relative;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--mint-strong);
  color: white;
  cursor: pointer;
}

.copy-mark,
.copy-mark::after {
  width: 15px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.copy-mark {
  position: relative;
  transform: translate(2px, 2px);
}

.copy-mark::after {
  position: absolute;
  top: -7px;
  left: -7px;
  content: "";
}

.share-dialog .share-dialog-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--mint-strong);
  font-size: 11px;
  text-align: center;
}

.share-dialog-ok {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border: 0;
  border-radius: 13px;
  background: var(--mint-strong);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.match-card:disabled {
  color: inherit;
  cursor: default;
  opacity: 1;
}

.result-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 9px 10px;
  background: var(--card);
}

.result-tabs button {
  display: grid;
  justify-items: center;
  min-height: 62px;
  padding: 6px 4px;
  border: 0;
  border-radius: 9px;
  background: rgba(177, 216, 198, .25);
  cursor: pointer;
}

.result-tabs button.active {
  background: var(--mint-strong);
  color: white;
}

.result-tabs .sf-symbol {
  width: 22px;
  height: 22px;
  margin-bottom: 1px;
}

.result-tabs strong {
  font-size: 13px;
}

.result-tabs small {
  font-size: 9px;
  font-weight: 650;
  opacity: .78;
}

.result-name-editor {
  border-block: 1px solid #e9ecea;
  background: var(--card);
}

.player-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 8px 15px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.result-name-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.result-name-title>.sf-symbol {
  width: 21px;
  height: 21px;
  color: var(--mint-strong);
}

.result-name-title>span {
  display: grid;
}

.result-name-title strong {
  font-size: 14px;
}

.result-name-title small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.result-chevron {
  font-size: 19px;
  transition: transform .2s;
}

.result-name-editor.open .result-chevron {
  transform: rotate(180deg);
}

.result-name-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  max-height: 230px;
  overflow: auto;
  padding: 12px 15px 16px;
  border-top: 1px solid #edf0ee;
}

.result-name-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.result-name-row input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dfe8e3;
  border-radius: 9px;
  outline: 0;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
}

.result-name-row input:focus {
  border-color: var(--mint-strong);
}

.result-name-row input::placeholder {
  color: rgba(42, 72, 62, .38);
}

.result-section {
  padding: 6px 10px 30px;
}

.finish-hint {
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 5px 0 10px;
}

.finish-hint strong {
  font-size: 14px;
}

.finish-hint small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.match-list {
  display: grid;
  gap: 6px;
}

.match-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 50px;
  padding: 4px 9px;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.match-card.completed {
  filter: grayscale(1);
  opacity: .72;
  background: #e5e5e5;
}

.match-number {
  display: grid;
  justify-items: start;
  color: var(--muted);
  line-height: 1;
}

.match-number strong {
  font-size: 14px;
}

.match-number span {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
}

.match-number small {
  margin-top: 1px;
  font-size: 8px;
  font-weight: 600;
}

.team-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  height: 42px;
  padding: 3px;
  border-radius: 9px;
  text-align: center;
}

.team-box.mint {
  background: rgba(72, 145, 116, .1);
}

.team-box.pink {
  background: rgba(216, 139, 158, .1);
}

.match-player {
  display: grid;
  min-width: 0;
  justify-items: center;
  line-height: 1.1;
}

.match-player strong {
  font-size: 14px;
}

.match-player small {
  overflow: hidden;
  width: 100%;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.versus {
  color: #aeb2b0;
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.add-matches-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 58px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--mint-strong);
  color: white;
  cursor: pointer;
}

.add-matches-button>.sf-symbol {
  width: 22px;
  height: 22px;
}

.add-matches-button>span:last-child {
  display: grid;
  gap: 2px;
}

.add-matches-button strong {
  font-size: 16px;
}

.add-matches-button small {
  font-size: 10px;
  font-weight: 650;
  opacity: .85;
}

.add-matches-button:disabled {
  opacity: .72;
}

.loading-result-container {
  position: relative;
}

.generation-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .22);
}

.generation-card {
  display: grid;
  justify-items: center;
  min-width: 230px;
  padding: 24px 32px;
  border: 1.5px solid rgba(177, 216, 198, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 55px rgba(25, 42, 36, .2);
  backdrop-filter: blur(16px);
}

.generation-card strong {
  margin-top: 13px;
  font-size: 16px;
}

.generation-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.generation-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid rgba(72, 145, 116, .2);
  border-top-color: var(--mint-strong);
  border-radius: 50%;
  animation: generation-spin .8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .generation-spinner {
    animation-duration: 1.6s;
  }
}

.empty-result {
  margin: 14px 12px;
  padding: 64px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  text-align: center;
}

.empty-result>span {
  color: var(--mint-strong);
  font-size: 30px;
}

.empty-result h2 {
  margin: 10px 0 0;
}

.empty-result p {
  margin: 2px 0 24px;
  color: var(--muted);
  font-size: 12px;
}

.empty-result small {
  color: var(--muted);
}

.summary-panel,
.matrix-panel {
  margin: 0;
  overflow: hidden;
  background: transparent;
}

.panel-heading {
  padding: 17px 18px 13px;
  border-bottom: 1px solid #e9eeeb;
}

.panel-heading h2 {
  margin: 0;
  font-size: 18px;
}

.panel-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.summary-list {
  display: grid;
}

.summary-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) minmax(100px, 2fr) 58px;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 16px;
  border-bottom: 1px solid #edf0ee;
}

.summary-row:last-child {
  border-bottom: 0;
}

.player-code {
  overflow: hidden;
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-row>strong {
  color: var(--mint-strong);
  font-size: 21px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.summary-row>strong small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 9px;
}

.appearance-track {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(177, 216, 198, .25);
}

.appearance-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint-strong);
}

.rest-detail {
  display: grid;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.rest-detail small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plain-detail-list {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.appearance-item {
  display: grid;
  grid-template-columns: 48px minmax(100px, 1fr) 62px;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--card);
}

.appearance-item>strong {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 21px;
}

.appearance-item>strong>span {
  display: grid;
  justify-items: center;
  color: var(--muted);
  line-height: 1;
  text-align: center;
}

.appearance-item b {
  font-size: 11px;
}

.appearance-item small {
  margin-top: 2px;
  font-size: 8px;
}

.rest-list {
  gap: 7px;
}

.rest-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--card);
}

.labeled-line {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.labeled-line+.labeled-line {
  margin-top: 5px;
}

.labeled-line>span {
  display: grid;
  grid-template-columns: 28px 42px;
  align-items: center;
  color: var(--muted);
  text-align: center;
}

.labeled-line b {
  font-size: 10px;
}

.labeled-line small {
  font-size: 9px;
  font-weight: 500;
}

.labeled-line p {
  overflow: hidden;
  margin: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-panel {
  isolation: isolate;
}

.matrix-scroll {
  overflow: auto;
  max-height: calc(100vh - 160px);
  margin: 10px;
  padding: 0;
}

.count-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.count-matrix th,
.count-matrix td {
  min-width: 38px;
  width: 38px;
  height: 32px;
  padding: 4px;
  border-right: 1px solid var(--canvas);
  border-bottom: 1px solid var(--canvas);
  text-align: center;
}

.count-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 66px;
  background: #dceee6;
  color: var(--ink);
  font-size: 10px;
}

.count-matrix tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 76px;
  width: 76px;
  background: #f5e8eb;
  font-size: 11px;
}

.count-matrix thead th:first-child {
  left: 0;
  z-index: 3;
}

.count-matrix td {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
}

.count-matrix td.diagonal {
  background: rgba(248, 220, 225, .5);
  color: #aaa;
}

.count-matrix td.value-1 {
  background: rgba(72, 145, 116, .14);
}

.count-matrix td.value-2 {
  background: rgba(72, 145, 116, .22);
}

.count-matrix td.value-3 {
  background: rgba(72, 145, 116, .30);
}

.count-matrix td.value-4 {
  background: rgba(72, 145, 116, .38);
}

.count-matrix .gap-cell {
  min-width: 76px;
  width: 76px;
  padding: 5px;
  text-align: left;
}

.gap-cell b,
.gap-cell strong,
.gap-cell small {
  display: block;
  line-height: 1.2;
}

.gap-cell b {
  font-size: 10px;
}

.gap-cell strong {
  margin-top: 4px;
  font-size: 10px;
}

.gap-cell small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
}

.member-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .24);
}

.member-modal {
  overflow: hidden;
  width: min(100%, 560px);
  max-height: min(720px, calc(100vh - 36px));
  border-radius: 22px;
  background: var(--canvas);
  box-shadow: 0 24px 70px rgba(30, 60, 50, .22);
}

.member-modal-header {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
  min-height: 60px;
  padding: 6px 10px;
  border-bottom: 1px solid #e4e8e6;
  background: var(--card);
  text-align: center;
}

.member-modal-header>div,
.member-modal-header button {
  display: grid;
  justify-items: center;
}

.member-modal-header button {
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--mint-strong);
  cursor: pointer;
}

.member-modal-header button:disabled {
  color: #aaa;
}

.member-modal-header strong {
  font-size: 14px;
}

.member-modal-header small {
  margin-top: 1px;
  font-size: 9px;
  font-weight: 600;
}

.member-modal-body {
  display: grid;
  gap: 20px;
  max-height: calc(100vh - 98px);
  overflow: auto;
  padding: 16px;
}

.add-player-card,
.rest-member-card,
.active-count-card {
  border-radius: 18px;
  background: var(--card);
}

.add-player-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(177, 216, 198, .8);
}

.add-player-card>div:first-child,
.modal-section-title {
  display: grid;
}

.add-player-card small,
.modal-section-title small,
.active-count-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.member-stepper {
  display: flex;
  align-items: center;
  gap: 28px;
}

.member-stepper button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(177, 216, 198, .45);
  color: var(--mint-strong);
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.member-stepper button:disabled {
  color: #aaa;
  opacity: .5;
}

.member-stepper>strong {
  min-width: 70px;
  font-size: 42px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rest-member-card {
  padding: 18px;
}

.rest-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.rest-member-grid button {
  display: grid;
  justify-items: center;
  height: 52px;
  padding: 5px;
  border: 0;
  border-radius: 11px;
  background: rgba(177, 216, 198, .3);
  color: var(--ink);
  cursor: pointer;
  line-height: 1.05;
}

.rest-member-grid button.resting {
  background: var(--pink);
}

.rest-member-grid button strong {
  font-size: 13px;
}

.rest-member-grid button span {
  font-size: 10px;
}

.rest-member-grid button small {
  font-size: 8px;
  opacity: .82;
}

.active-count-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  height: 74px;
  padding: 0 18px;
}

.active-count-card>div {
  display: grid;
}

.active-count-card>strong {
  font-size: 32px;
  font-variant-numeric: tabular-nums;
}

.active-count-card.invalid {
  color: var(--pink-strong);
}

@media (min-width: 760px) {
  .create-page {
    padding: 28px 0;
  }

  .page-shell {
    width: min(100% - 48px, 900px);
  }

  .settings-stack {
    grid-template-columns: 1fr 1fr;
  }

  .names-card {
    grid-column: 1 / -1;
  }

  .create-actions {
    width: 500px;
    margin-inline: auto;
  }

  .result-page {
    padding: 28px;
  }

  .result-container {
    overflow: hidden;
    min-height: calc(100vh - 56px);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  .result-tabs {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Schedule management page */\n\n.schedule-management-page {
  padding-bottom: 48px;
}

/* Attendance summary and participant detail */
.attendance-summary-list { display: grid; }
.attendance-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.attendance-summary-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
.attendance-summary-row strong { font-size: 16px; }
.attendance-summary-row span, .attendance-summary-row small { color: var(--muted); font-size: 12px; }
.attendance-summary-row small { white-space: pre-line; }
.attendance-summary-counts { display: grid; grid-template-columns: repeat(3, 52px); justify-content: end; gap: 3px; color: #c1c9c4; text-align: center; }
.attendance-summary-counts > span { display: grid; grid-template-columns: 20px 2ch; align-items: center; justify-content: center; column-gap: 5px; width: 52px; color: #c1c9c4; font-size: 20px; font-weight: 400; font-variant-numeric: tabular-nums; }
.attendance-summary-counts > span.has-responses { color: #43a96d; }
.attendance-summary-counts b { font: inherit; }
.attendance-status-glyph { display: inline-grid; place-items: center; width: 20px; height: 20px; color: currentColor; }
.attendance-summary-counts > span .attendance-status-glyph { color: inherit; }
.attendance-status-glyph svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.attendance-event-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.attendance-public-card .attendance-event-title-row h1 { margin: 0; }
.attendance-event-title-row > span { flex: 0 0 auto; color: var(--mint-strong); font-size: 14px; font-weight: 800; }
.attendance-event-description { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.attendance-event-description a { color: var(--mint-strong); text-decoration: underline; text-underline-offset: 2px; }
.attendance-event-header-card { margin-bottom: 12px; }
.attendance-public-list .attendance-summary-counts > span { display: grid; grid-template-columns: 20px 2ch; align-items: center; justify-content: center; column-gap: 5px; width: 52px; height: auto; padding: 0; border-radius: 0; background: transparent; color: #c1c9c4; font-size: 20px; font-weight: 400; font-variant-numeric: tabular-nums; }
.attendance-public-list .attendance-summary-counts > span.has-responses { color: #43a96d; }
.attendance-summary-counts em { flex-basis: 100%; color: #b36a34; font-style: normal; font-size: 12px; }
.attendance-answer-panel { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.attendance-answer-panel > label { display: block; margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.attendance-answer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.attendance-back-button { margin: 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--mint-strong); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.attendance-detail-toolbar { display: flex; justify-content: flex-start; margin: 15px 0 8px; }
.attendance-member-group { padding: 12px 0; border-top: 1px solid var(--line); }
.attendance-member-group h2 { margin: 0 0 6px; font-size: 15px; }
.attendance-member-group p { margin: 0; color: var(--muted); }
.attendance-date-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.attendance-date-nav h1 { flex: 1; text-align: center; }
.attendance-date-nav button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 24px; cursor: pointer; }
.attendance-date-nav button:disabled { opacity: .35; cursor: default; }
.attendance-date-detail { margin: 10px 0 16px; white-space: pre-line; color: var(--muted); }
.attendance-person { display: flex; align-items: center; gap: 9px; padding: 8px 0; }
.attendance-person img, .attendance-person-placeholder { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.attendance-person-placeholder { display: grid; place-items: center; background: #e8ecea; color: #8a9690; font-size: 14px; }
.attendance-external-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.attendance-person b { margin-left: auto; color: var(--muted); font-size: 13px; }
.attendance-force-cancel { flex: 0 0 auto; padding: 6px 8px; border: 1px solid #e7b0a9; border-radius: 8px; background: #fff7f5; color: #a33f34; font: inherit; font-size: 12px; font-weight: 700; }
.attendance-promote { flex: 0 0 auto; padding: 6px 8px; border: 1px solid #8bcda5; border-radius: 8px; background: #f1fbf4; color: #237344; font: inherit; font-size: 12px; font-weight: 700; }
.attendance-admin-person { flex-wrap: wrap; }
.attendance-admin-person > span:not(.attendance-person-placeholder) { min-width: 0; overflow-wrap: anywhere; }
.attendance-person-answer { display: inline-flex; align-items: center; min-width: 20px; justify-content: flex-end; }
.attendance-person-answer .attendance-status-glyph { color: #43a96d; }
.attendance-waitlist-label { color: #b36a34; font-size: 12px; font-weight: 500; white-space: nowrap; }
.attendance-schedule-info { display: grid; gap: 4px; margin: 7px 0; color: var(--muted); font-size: 13px; white-space: pre-line; }
.attendance-date-context { display: block; margin: 2px 0 1px; color: var(--text); font-size: 14px; line-height: 1.45; white-space: pre-line; }
.attendance-limit { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.attendance-answer-card { display: grid; gap: 0; }
.attendance-answer-row { display: grid; grid-template-columns: 1fr; gap: 6px; align-items: start; }
.attendance-answer-row .attendance-choice-row { margin-top: 5px; }
.attendance-waitlist-warning { margin: 2px 0 0; padding: 8px 10px; border-radius: 8px; background: #fff6e8; color: #9a5c25; font-size: 12px; line-height: 1.45; }
.attendance-waitlist-modal { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(31, 44, 37, .48); }
.attendance-waitlist-modal-card { width: min(100%, 390px); padding: 28px 22px 22px; border-radius: 20px; background: white; box-shadow: 0 22px 55px rgba(21, 34, 28, .26); text-align: center; }
.attendance-waitlist-modal-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%; background: #f5a623; color: white; font-size: 30px; font-weight: 700; line-height: 1; }
.attendance-waitlist-modal-card h2 { margin: 0; color: #613c14; font-size: 21px; }
.attendance-waitlist-modal-card p { margin: 13px 0 10px; color: #5e655f; font-size: 14px; line-height: 1.6; text-align: left; }
.attendance-waitlist-modal-card ul { margin: 0 0 20px; padding: 11px 14px; border-radius: 10px; background: #fff6e8; color: #854e1a; font-size: 15px; font-weight: 700; text-align: left; list-style: none; }
.attendance-waitlist-modal-card li + li { margin-top: 5px; }
.attendance-waitlist-modal-card button { width: 100%; height: 48px; border: 0; border-radius: 12px; background: var(--mint-strong); color: white; font: inherit; font-weight: 700; }
.attendance-bottom-back { width: 100%; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: center; }
.attendance-date-nav h2 { flex: 1; margin: 0; font-size: 18px; line-height: 1.3; text-align: center; }
.attendance-member-group h3 { margin: 0 0 8px; font-size: 15px; }
.attendance-waitlist-group { margin-top: 12px; border-top: 1px solid var(--line); }
.attendance-waitlist-group .attendance-person em { width: 18px; color: var(--muted); font-style: normal; font-size: 13px; text-align: right; }

.schedule-management-shell {
  width: min(100% - 28px, 700px);
  margin: 0 auto;
}

.schedule-management-card {
  overflow: hidden;
  border: 1px solid #e0e7e3;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow);
}

.schedule-management-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf0ee;
}

.schedule-management-heading>span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(177, 216, 198, .28);
  color: var(--mint-strong);
}

.schedule-management-heading .sf-symbol {
  width: 23px;
  height: 23px;
}

.schedule-management-heading h2,
.schedule-management-heading p {
  margin: 0;
}

.schedule-weather {
  padding: 14px 0 15px;
  border-bottom: 1px solid #edf0ee;
  background: linear-gradient(180deg, #f7fbff, #fff);
}

.schedule-weather>header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  padding: 0 20px 11px;
}

.schedule-weather>header div {
  display: grid;
  gap: 2px;
}

.schedule-weather>header .schedule-weather-actions {
  justify-items: end;
  gap: 4px;
}

.schedule-weather-actions a {
  color: #3478b8;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.schedule-weather-actions span { display: flex; gap: 9px; }

.schedule-weather>header strong {
  color: #31547a;
  font-size: 13px;
}

.schedule-weather>header small,
.schedule-weather>footer {
  color: #8290a0;
  font-size: 9px;
}

.schedule-weather-comparison-scroll {
  padding: 0 20px 5px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.schedule-weather-comparison {
  width: max-content;
}

.schedule-weather-date-row,
.schedule-weather-data-row,
.schedule-weather-range-row {
  display: grid;
  grid-template-columns: repeat(10, 104px);
  gap: 8px;
}

.schedule-weather-date-row {
  align-items: end;
  margin-bottom: 5px;
}

.schedule-weather-date-row time {
  color: #344e68;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.schedule-weather-source-title {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 9px 0 6px;
  color: #405d76;
  font-size: 11px;
}

.schedule-weather-source-title small { color: #8290a0; font-size: 8px; }

.schedule-weather-range-title {
  margin-top: 6px;
}

.schedule-weather-range-row article {
  display: grid;
  gap: 3px;
  padding: 8px 7px;
  border: 1px solid #cfe3d9;
  border-radius: 11px;
  background: #f2faf6;
  color: #53697f;
  font-size: 9px;
  text-align: center;
}

.schedule-weather-range-row article>strong {
  color: #31724d;
  font-size: 11px;
}

.schedule-weather-range-row article>small {
  color: #8290a0;
  font-size: 8px;
}

.schedule-weather-range-row article.range-medium {
  border-color: #ead69b;
  background: #fff9e8;
}

.schedule-weather-range-row article.range-medium>strong { color: #8b6819; }

.schedule-weather-range-row article.range-wide {
  border-color: #e8b9b9;
  background: #fff1f1;
}

.schedule-weather-range-row article.range-wide>strong { color: #985050; }

.schedule-weather-source-error {
  margin: 5px 0 0;
  color: #a95168;
  font-size: 8px;
}

.schedule-weather-data-row article {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 10px 7px;
  border: 1px solid #dce9f2;
  border-radius: 13px;
  background: rgba(255, 255, 255, .88);
  color: #53697f;
  font-size: 9px;
}

.schedule-weather-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 27px;
  line-height: 1;
}

.schedule-weather-data-row article>strong {
  min-height: 27px;
  color: #354d64;
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}

.schedule-weather-temperature {
  display: flex;
  gap: 7px;
  align-items: baseline;
}

.schedule-weather-temperature b {
  color: #dc695e;
  font-size: 14px;
}

.schedule-weather-temperature i {
  color: #5d89bd;
  font-size: 12px;
  font-style: normal;
}

.schedule-weather>footer {
  padding: 6px 20px 0;
  text-align: right;
}

.schedule-weather-jma img {
  width: 38px;
  height: 38px;
}

.schedule-weather-reliability {
  padding: 2px 6px;
  border-radius: 6px;
  background: #edf1f4;
  font-weight: 800;
}

.schedule-weather-reliability.reliability-a { background: #ddf2e5; color: #31724d; }
.schedule-weather-reliability.reliability-b { background: #fff0cb; color: #8b6819; }
.schedule-weather-reliability.reliability-c { background: #f8dede; color: #985050; }

.schedule-weather-data-row .schedule-weather-outside {
  place-content: center;
  color: #9aa6af;
  background: rgba(244, 246, 247, .72);
}

.schedule-weather-loading,
.schedule-weather-error {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #edf0ee;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.schedule-weather-error { color: #a95168; }

.schedule-weather-chart-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #edf0ee;
  background: #fff;
}

.schedule-weather-chart-links>div {
  display: grid;
  gap: 2px;
}

.schedule-weather-chart-links strong {
  color: #405d76;
  font-size: 12px;
}

.schedule-weather-chart-links small {
  color: var(--muted);
  font-size: 8px;
}

.schedule-weather-chart-links nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.schedule-weather-chart-links a {
  padding: 8px 11px;
  border: 1px solid #d4e2ec;
  border-radius: 10px;
  background: #f5f9fc;
  color: #3478b8;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.schedule-management-heading h2 {
  font-size: 18px;
  line-height: 1.4;
}

.schedule-management-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.schedule-management-loading,
.schedule-management-error,
.schedule-management-empty {
  margin: 0;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.schedule-management-error {
  color: #a95168;
}

.schedule-management-message {
  margin: 14px 20px 0;
  padding: 11px 13px;
  border-radius: 11px;
  background: rgba(177, 216, 198, .22);
  color: var(--mint-strong);
  font-size: 11px;
  font-weight: 800;
}

.schedule-title-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule-title-list li {
  padding: 14px 20px 16px;
  border-top: 1px solid #edf0ee;
}

.schedule-title-list li:first-child {
  border-top: 0;
}

.schedule-title-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.schedule-title-row>span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(177, 216, 198, .24);
  color: var(--mint-strong);
  font-size: 11px;
  font-weight: 800;
}

.schedule-title-row>strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
}

.schedule-candidate-list {
  display: grid;
  gap: 8px;
  margin: 9px 0 0 44px;
}

.schedule-no-candidate {
  margin: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(118, 130, 126, .08);
  color: var(--muted);
  font-size: 10px;
}

.schedule-confirm-candidate {
  padding: 11px;
  border: 1px solid rgba(72, 145, 116, .2);
  border-radius: 12px;
  background: rgba(177, 216, 198, .11);
}

.schedule-confirm-candidate.checked {
  border-color: rgba(72, 145, 116, .55);
  background: rgba(177, 216, 198, .22);
}

.schedule-confirm-candidate label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  cursor: pointer;
}

.schedule-confirm-candidate input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--mint-strong);
}

.schedule-confirm-candidate label>span {
  display: grid;
  gap: 3px;
}

.schedule-confirm-candidate small {
  color: var(--mint-strong);
  font-size: 9px;
  font-weight: 800;
}

.schedule-confirm-candidate strong {
  font-size: 11px;
  line-height: 1.45;
}

.schedule-confirm-candidate button {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border: 0;
  border-radius: 10px;
  background: var(--mint-strong);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.schedule-draft-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 18px;
  background: rgba(28, 38, 34, .42);
  overflow-y: auto;
}

.schedule-draft-dialog {
  width: min(100%, 620px);
  max-height: calc(100dvh - 36px);
  margin: auto;
  overflow-y: auto;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(26, 50, 40, .24);
}

.schedule-draft-dialog>header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid #edf0ee;
}

.schedule-draft-dialog h2,
.schedule-draft-dialog p {
  margin: 0;
}

.schedule-draft-dialog h2 {
  font-size: 17px;
}

.schedule-draft-dialog p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.schedule-draft-fields {
  display: grid;
  gap: 15px;
  padding: 18px 20px;
}

.schedule-draft-fields>label,
.schedule-image-field {
  display: grid;
  gap: 7px;
}

.schedule-draft-fields label>span:first-child,
.schedule-image-field>span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.schedule-draft-fields input,
.schedule-draft-fields textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #dce5e0;
  border-radius: 11px;
  background: #fbfcfb;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.schedule-draft-fields input {
  min-height: 44px;
  padding: 0 12px;
}

.schedule-draft-fields textarea {
  padding: 11px 12px;
  line-height: 1.55;
  resize: vertical;
}

.schedule-draft-fields input:focus,
.schedule-draft-fields textarea:focus {
  border-color: var(--mint-strong);
  box-shadow: 0 0 0 3px rgba(72, 145, 116, .1);
}

.schedule-image-empty {
  width: 100%;
  height: 170px;
  border-radius: 12px;
}

.schedule-image-empty {
  display: grid;
  place-items: center;
  background: #f3f6f4;
  color: var(--muted);
  font-size: 11px;
}

.schedule-image-field .monthly-image-editor { width: 100%; height: auto; place-items: initial; background: transparent; }
.schedule-image-field .monthly-image-preview { width: 100%; height: auto; }
.schedule-image-field .monthly-image-preview img { width: 100%; height: 100%; object-fit: cover; }

.schedule-image-field label {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid rgba(72, 145, 116, .35);
  border-radius: 10px;
  color: var(--mint-strong);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.schedule-image-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.schedule-court-field>span:last-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.schedule-court-field b {
  font-size: 13px;
}

.schedule-draft-dialog>footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px 20px;
}

.schedule-draft-dialog>footer button {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  background: var(--mint-strong);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.schedule-draft-dialog>footer button.secondary {
  border: 1px solid #dce5e0;
  background: white;
  color: var(--muted);
}

.schedule-draft-dialog>footer button:disabled {
  cursor: wait;
  opacity: .58;
}

@media (max-width: 480px) {
  .schedule-title-list li {
    padding-right: 13px;
    padding-left: 13px;
  }

  .schedule-candidate-list {
    margin-left: 0;
  }

  .schedule-draft-backdrop {
    padding: 0;
  }

  .schedule-draft-dialog {
    max-height: 94dvh;
    border-radius: 20px 20px 0 0;
  }
}

.attendance-management-link {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
}
.attendance-management-link-icon { color: var(--mint-strong); font-size: 28px; }
.attendance-management-link span:nth-child(2) { display: grid; flex: 1; gap: 3px; }
.attendance-management-link small { color: var(--muted); font-size: 12px; }
.attendance-management-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.attendance-card-heading, .attendance-url-row, .attendance-date-item, .attendance-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.attendance-card-heading h2 { margin: 0; }
.attendance-card-heading p, .attendance-management-note { color: var(--muted); font-size: 13px; }
.attendance-status-badge { padding: 6px 10px; border-radius: 999px; background: #e6f5ec; color: var(--mint-strong); font-size: 12px; font-weight: 700; }
.attendance-url-row { margin: 18px 0; padding: 10px 12px; border-radius: 10px; background: #f4f7f5; }
.attendance-url-row button, .attendance-card-actions button, .attendance-create-button { border: 0; border-radius: 10px; padding: 10px 14px; background: var(--mint-strong); color: white; font-weight: 700; cursor: pointer; }
.attendance-date-list { border-top: 1px solid var(--line); }
.attendance-date-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.attendance-date-item > div:first-child { display: grid; gap: 4px; }
.attendance-date-item span { color: var(--muted); font-size: 13px; }
.attendance-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; font-size: 13px; }
.attendance-counts em { color: #b36a34; font-style: normal; }
.attendance-card-actions { justify-content: flex-start; margin-top: 18px; }
.attendance-card-actions .secondary { background: #eef2f0; color: var(--text); }
.attendance-action-link { display: inline-flex; align-items: center; padding: 10px 14px; border-radius: 10px; background: #eef2f0; color: var(--text); font-weight: 700; text-decoration: none; }
.attendance-edit-panel { display: grid; gap: 12px; margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.attendance-edit-panel label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.attendance-edit-panel input, .attendance-edit-panel select, .attendance-edit-panel textarea { padding: 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.attendance-edit-panel button { width: fit-content; border: 0; border-radius: 9px; padding: 10px 14px; background: var(--mint-strong); color: white; font-weight: 700; }
.attendance-edit-panel button.secondary { background: #eef2f0; color: var(--text); }
.attendance-modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(24, 35, 30, .45); }
.attendance-modal-backdrop .attendance-edit-panel { width: min(100%, 420px); max-height: calc(100dvh - 40px); margin: 0; overflow: auto; box-shadow: 0 16px 48px rgba(0,0,0,.2); }
.attendance-modal-backdrop .attendance-edit-panel-wide { width: min(100%, 620px); }
.attendance-edit-dates { display: grid; gap: 10px; }
.attendance-edit-dates h3 { margin: 4px 0 0; font-size: 16px; }
.attendance-edit-dates fieldset { display: grid; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.attendance-edit-dates legend { padding: 0 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.attendance-edit-check { display: flex !important; align-items: center; gap: 7px; }
.attendance-edit-check input { width: 18px; height: 18px; padding: 0; }
.attendance-admin-date-card { margin-top: 14px; }
.attendance-admin-date-card h2 { margin: 0; }
.attendance-admin-date-card h3 { margin: 18px 0 5px; font-size: 14px; }
.attendance-create-card { display: grid; gap: 12px; margin-bottom: 14px; }
.attendance-create-card h2 { margin: 0; }
.attendance-create-card label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.attendance-create-card input, .attendance-create-card textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: white; }
.attendance-create-card>button { width: fit-content; border: 0; border-radius: 10px; padding: 11px 15px; background: var(--mint-strong); color: white; font-weight: 800; cursor: pointer; }
.attendance-create-card fieldset { display: grid; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.attendance-create-card legend { padding: 0 5px; color: var(--muted); font-size: 13px; font-weight: 700; }
.attendance-schedule-option { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 9px !important; padding: 9px; border-radius: 8px; background: #f7faf8; }
.attendance-schedule-option span { display: grid; gap: 2px; }.attendance-schedule-option small { color: var(--muted); font-weight: 400; }
@media (max-width: 560px) { .attendance-date-item { align-items: flex-start; flex-direction: column; } .attendance-counts { justify-content: flex-start; } .attendance-url-row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.attendance-limit-input { width: 78px; margin-left: auto; }
.attendance-submit-button:disabled { background: #c9ced6; color: #f7f7f7; cursor: not-allowed; }
.attendance-date-copy { display: grid; gap: 4px; }
.attendance-response-summary { display: grid; gap: 2px; margin-top: 5px; color: var(--text); font-size: 12px; }
.attendance-response-summary span { color: var(--text); }

.attendance-public-page { min-height: 100dvh; padding: 20px 14px; background: var(--canvas); }
.attendance-public-card { width: min(100%, 640px); margin: 0 auto; padding: 22px 16px; border-radius: 20px; background: var(--card); box-shadow: 0 12px 35px rgba(42,72,62,.08); }
.attendance-public-card h1 { margin: 0 0 8px; }.attendance-public-card label { display: grid; gap: 6px; margin: 18px 0; font-size: 13px; font-weight: 700; }.attendance-public-card input { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.attendance-public-list { border-top: 1px solid var(--line); }.attendance-public-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }.attendance-public-list article>div:first-child { display: grid; gap: 4px; }.attendance-public-list span { color: var(--muted); font-size: 12px; }.attendance-choice-row { display: flex; gap: 5px; }.attendance-choice-row button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 20px; cursor: pointer; }.attendance-choice-row button.selected { border-color: var(--mint-strong); background: var(--mint-strong); color: white; }.attendance-submit-button { width: 100%; height: 48px; margin-top: 20px; border: 0; border-radius: 12px; background: var(--mint-strong); color: white; font-weight: 800; }
.monthly-schedule-add-link { display: grid!important; place-items: center; width: 45px!important; height: 38px!important; border-radius: 10px!important; background: var(--mint-strong)!important; color: #fff!important; font-size: 8px!important; font-weight: 800; line-height: 1.15; text-align: center; }
.monthly-create-page { padding-bottom: 55px; }
.monthly-create-shell { width: min(100% - 28px, 760px); margin: 0 auto; }
.monthly-message { position: sticky; top: 6px; z-index: 4; padding: 10px 13px; border-radius: 11px; background: #eaf6ef; color: #356d54; box-shadow: var(--shadow); font-size: 11px; }
.monthly-section { display: grid; min-width: 0; gap: 12px; margin-top: 14px; padding: 17px; border: 1px solid #dfe8e3; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.monthly-section h2,.monthly-section h3 { margin: 0; }.monthly-section h2 { font-size: 14px; }.monthly-section h3 { font-size: 12px; color: #456b5a; }
.monthly-section>label,.monthly-basics>label { display: grid; gap: 5px; }.monthly-section label>span,.monthly-section legend { color: #64756e; font-size: 9px; font-weight: 800; }
.monthly-section input,.monthly-section select,.monthly-section textarea { box-sizing: border-box; width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #d9e3de; border-radius: 9px; background: #fff; font: inherit; font-size: 11px; }
.monthly-month-picker { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto; align-items: center; box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; gap: 6px; }
.monthly-month-picker select { min-width: 0; max-width: 100%; margin: 0; }
.monthly-month-picker span { color: #64756e; font-size: 10px; font-weight: 800; }
.monthly-calendar { overflow: hidden; padding: 4px; border: 1px solid #e1e9e5; border-radius: 13px; background: #f5f8f6; }.monthly-calendar .weekdays,.monthly-calendar .days { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }.monthly-calendar .weekdays { margin-bottom: 4px; }.monthly-calendar .weekdays b { padding: 7px 0; border-radius: 7px; background: #edf2ef; color: #73817b; font-size: 9px; text-align: center; }.monthly-calendar .days>* { display: grid; place-items: center; min-height: 44px; border: 1px solid #e7eeea; border-radius: 9px; background: #fff; color: #4d5e56; touch-action: manipulation; }.monthly-calendar .days button { cursor: pointer; }.monthly-calendar .sunday { background: #fff1f2!important; color: #b95a61!important; }.monthly-calendar .saturday { background: #eef5ff!important; color: #4c73ac!important; }.monthly-calendar .days button.selected { border-color: var(--mint-strong); background: var(--mint-strong)!important; color: #fff!important; font-weight: 900; box-shadow: 0 2px 7px rgba(72,145,116,.25); }
.monthly-basics fieldset,.monthly-headers { margin: 0; padding: 0; border: 0; }.monthly-basics fieldset { display: flex; gap: 14px; }.monthly-basics fieldset label { display: flex; align-items: center; gap: 5px; font-size: 11px; }.monthly-basics fieldset input,.monthly-headers input { width: auto; min-height: 0; }
.monthly-headers { display: grid; gap: 8px; }.monthly-headers label { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 5px; color: #4d5e56; font-size: 9px; line-height: 1.5; }
.monthly-day-editor { display: grid; gap: 7px; padding: 11px; border: 1px solid #e5ece8; border-radius: 12px; background: #fbfcfb; }
.monthly-court-row { display: grid; grid-template-columns: 27px 68px 8px 68px minmax(100px,1fr) 58px; align-items: center; gap: 4px; }.monthly-court-row>strong { font-size: 9px; }.monthly-court-row>span { text-align: center; }.monthly-court-row>label { display: grid; grid-template-columns: 1fr 14px; align-items: center; }.monthly-court-row>label input { min-width: 0; padding-inline: 4px; }.monthly-court-row>label span { padding-left: 2px; }
.trello-label-preview { justify-self: start; padding: 3px 8px; border-radius: 999px; color: #fff; font-size: 8px; font-weight: 800; }.trello-label-preview.blue { background: #0079bf; }.trello-label-preview.green { background: #61bd4f; }
.monthly-primary { display: block; width: min(100%,360px); margin: 16px auto 0; padding: 13px; border: 0; border-radius: 12px; background: var(--mint-strong); color: #fff; font-weight: 900; }.monthly-primary:disabled { opacity: .55; }
.monthly-image-editor { display: grid; gap: 8px; }.monthly-file-button { justify-self: start; padding: 8px 11px; border-radius: 9px; background: #edf5f1; color: #397157; font-size: 10px; font-weight: 800; }.monthly-file-button input { display: none; }
.monthly-image-preview { position: relative; overflow: hidden; width: min(100%,450px); aspect-ratio: 15/11; border-radius: 12px; background: #eef1ef; }.monthly-image-preview img { width: 100%; height: 100%; object-fit: cover; transform-origin: center; }.monthly-image-controls { display: grid; gap: 5px; width: min(100%,450px); }.monthly-image-controls label { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 6px; font-size: 9px; }.monthly-image-controls input { min-height: 20px; padding: 0; }
.monthly-confirmed>header { display: flex; justify-content: space-between; align-items: center; }.monthly-confirmed>header>div { display: flex; gap: 8px; align-items: center; }.monthly-confirmed>header button { padding: 7px 12px; border: 1px solid #cfe0d8; border-radius: 8px; background: #f4f8f6; color: #43705b; }.monthly-confirmed article { display: grid; gap: 9px; padding: 13px; border: 1px solid #e1e9e5; border-radius: 13px; }.monthly-confirmed article>label { display: grid; gap: 5px; }
.monthly-court-location { display: grid; grid-template-columns: minmax(0,220px) auto; align-items: center; gap: 5px; }.monthly-court-location b { color: #64756e; font-size: 10px; }
@media (max-width:600px) { .monthly-court-row { grid-template-columns: 25px 1fr 7px 1fr 48px; }.monthly-court-row>input { grid-column: 2/5; }.monthly-court-row>label { grid-column: 5; grid-row: 2; }.monthly-calendar .days>* { min-height: 42px; } }
/* Admin */
.admin-login-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 15%, rgba(177, 216, 198, .38), transparent 34%), var(--canvas);
}

.admin-login-card {
  width: min(100%, 420px);
  padding: 38px 34px 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(42, 72, 62, .12);
  text-align: center;
}

.admin-lock {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(177, 216, 198, .45);
  color: var(--mint-strong);
  font-size: 30px;
}

.admin-login-card h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -.03em;
}

.admin-login-copy {
  margin: 8px 0 25px;
  color: var(--muted);
  font-size: 13px;
}

.admin-login-card form {
  display: grid;
  text-align: left;
}

.admin-login-card label {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 750;
}

.admin-login-card label:not(:first-child) {
  margin-top: 13px;
}

.admin-login-card input {
  height: 50px;
  padding: 0 15px;
  border: 1px solid #dce5e1;
  border-radius: 13px;
  outline: 0;
  background: #fbfcfb;
}

.admin-login-card input:focus {
  border-color: var(--mint-strong);
  box-shadow: 0 0 0 3px rgba(72, 145, 116, .12);
}

.admin-login-card form button {
  height: 50px;
  margin-top: 14px;
  border: 0;
  border-radius: 13px;
  background: var(--mint-strong);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.admin-login-card>a {
  display: inline-block;
  margin-top: 23px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.admin-error {
  margin: 7px 2px -5px;
  color: #c65e69;
  font-size: 11px;
}

.admin-page {
  background: #f5f7f6;
}

.admin-shell {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
  padding-bottom: 32px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  border-bottom: 1px solid #dfe6e2;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-brand-app-icon {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 5px 13px rgba(54, 123, 95, .12);
}

.admin-brand>span:last-child {
  display: grid;
  line-height: 1.1;
}

.admin-brand strong {
  font-size: 15px;
}

.admin-brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.admin-header>button {
  padding: 8px 13px;
  border: 1px solid #d8e1dd;
  border-radius: 10px;
  background: white;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.admin-failure-notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #ecc9c9;
  border-radius: 14px;
  background: #fff3f3;
}

.admin-failure-notice>span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f7dede;
  color: #a74d4d;
  font-weight: 900;
}

.admin-failure-notice>div { display: grid; gap: 3px; min-width: 0; }
.admin-failure-notice strong { font-size: 11px; }
.admin-failure-notice small { overflow: hidden; color: #835f5f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-failure-notice a,
.admin-failure-notice button { padding: 7px 9px; border-radius: 8px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.admin-failure-notice a { background: #a74d4d; color: #fff; text-decoration: none; }
.admin-failure-notice button { border: 1px solid #e0bebe; background: #fff; color: #8c6767; cursor: pointer; }

.admin-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 42px 0 25px;
}

.admin-welcome h1 {
  margin: 0;
  font-size: clamp(27px, 5vw, 36px);
  letter-spacing: -.04em;
}

.admin-welcome>div>p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-status {
  flex: none;
  padding: 8px 12px;
  border: 1px solid rgba(72, 145, 116, .22);
  border-radius: 999px;
  background: rgba(177, 216, 198, .22);
  color: var(--mint-strong);
  font-size: 10px;
  font-weight: 750;
}

.admin-status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: #54a680;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 20px;
  border: 1px solid #e0e7e3;
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 24px rgba(42, 72, 62, .045);
}

.admin-stat-card>span {
  display: grid;
  place-items: center;
  flex: 0 0 43px;
  height: 43px;
  border-radius: 13px;
  background: rgba(177, 216, 198, .28);
  color: var(--mint-strong);
  font-size: 22px;
}

.admin-stat-card div {
  display: grid;
}

.admin-stat-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.admin-stat-card strong {
  margin-top: 3px;
  font-size: 29px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.admin-stat-card em {
  margin-left: 4px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.admin-panel {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #e0e7e3;
  border-radius: 18px;
  background: white;
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 21px;
  border-bottom: 1px solid #edf0ee;
}

.admin-panel-heading h2 {
  margin: 0;
  font-size: 16px;
}

.admin-panel-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.admin-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(177, 216, 198, .3);
  color: var(--mint-strong);
  font-size: 9px;
  font-weight: 800;
}

.admin-session-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 92px;
  padding: 16px 21px;
}

.admin-session-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 13px;
  background: rgba(248, 220, 225, .5);
  color: var(--pink-strong);
  font-size: 21px;
}

.admin-session-row>div:nth-child(2) {
  display: grid;
}

.admin-session-row strong {
  font-size: 13px;
}

.admin-session-row small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.admin-row-actions {
  display: flex;
  gap: 7px;
}

.admin-row-actions button {
  padding: 8px 11px;
  border: 1px solid #dce4e0;
  border-radius: 9px;
  background: #fff;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.admin-row-actions button.danger {
  border-color: rgba(216, 139, 158, .3);
  color: #be667a;
}

.admin-empty {
  display: grid;
  justify-items: center;
  padding: 38px 20px;
  color: var(--muted);
}

.admin-empty>span {
  margin-bottom: 8px;
  color: #a8b4af;
  font-size: 25px;
}

.admin-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.admin-empty small {
  margin-top: 4px;
  font-size: 10px;
}

.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.admin-quick-grid a {
  display: grid;
  min-height: 115px;
  padding: 19px;
  border: 1px solid #e0e7e3;
  border-radius: 18px;
  background: white;
  text-decoration: none;
  transition: transform .15s, border-color .15s;
}

.admin-quick-grid a:hover {
  transform: translateY(-2px);
  border-color: var(--mint);
}

.admin-quick-grid a>span {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  margin-bottom: 13px;
  border-radius: 10px;
  background: rgba(177, 216, 198, .25);
  color: var(--mint-strong);
  font-size: 18px;
}

.admin-quick-grid strong {
  font-size: 12px;
}

.admin-quick-grid small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.admin-footer {
  padding-top: 28px;
  color: #9ba6a1;
  font-size: 9px;
  text-align: center;
}

.admin-footer span {
  margin: 0 6px;
}

@media (max-width: 560px) {
  .admin-failure-notice { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .admin-failure-notice button { grid-column: 2 / -1; justify-self: end; }
}

.admin-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-top: 32px;
}

.admin-menu-group {
  display: grid;
  align-self: start;
  gap: 8px;
}

.admin-menu-card {
  display: grid;
  grid-template-columns: 50px 1fr 18px;
  align-items: center;
  gap: 15px;
  min-height: 142px;
  padding: 22px;
  border: 1px solid #e0e7e3;
  border-radius: 19px;
  background: white;
  box-shadow: 0 8px 24px rgba(42, 72, 62, .04);
  text-decoration: none;
  transition: transform .15s, border-color .15s;
}

.admin-menu-card:hover {
  transform: translateY(-2px);
  border-color: var(--mint);
}

.admin-menu-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: rgba(177, 216, 198, .3);
  color: var(--mint-strong);
  font-size: 25px;
}

.admin-menu-icon .sf-symbol {
  width: 27px;
  height: 27px;
}

.admin-menu-icon .generation-quality-icon {
  width: 30px;
  height: 30px;
  --admin-icon-background: #edf7f2;
}

.admin-menu-copy {
  display: grid;
  min-width: 0;
}

.admin-menu-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-menu-title strong {
  font-size: 15px;
}

.admin-menu-title em {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(248, 220, 225, .65);
  color: #b86c7e;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.admin-menu-copy>small {
  margin-top: 2px;
  color: var(--mint-strong);
  font-size: 9px;
  font-weight: 750;
}

.admin-menu-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.admin-menu-arrow {
  color: #a8b4af;
  font-size: 25px;
}

.admin-member-link {
  display: grid;
  grid-template-columns: 34px 1fr 14px;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 10px 16px;
  border: 1px solid rgba(72, 145, 116, .2);
  border-radius: 14px;
  background: rgba(177, 216, 198, .16);
  text-decoration: none;
  transition: background .15s;
}

.admin-member-link:hover {
  background: rgba(177, 216, 198, .28);
}

.admin-member-link>span:first-child {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: white;
  color: var(--mint-strong);
  font-size: 18px;
}

.admin-member-link>span:first-child .sf-symbol {
  width: 19px;
  height: 19px;
}

.admin-member-link .new-participant-icon {
  width: 21px;
  height: 21px;
}

.admin-member-link>span:nth-child(2) {
  display: grid;
}

.admin-member-link strong {
  font-size: 11px;
}

.admin-member-link small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.admin-member-link>span:last-child {
  color: #95a59e;
  font-size: 20px;
}

.admin-placeholder-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-placeholder-card {
  width: min(100%, 460px);
  padding: 46px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
  text-align: center;
}

.admin-placeholder-card>span:first-child {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: rgba(177, 216, 198, .3);
  color: var(--mint-strong);
  font-size: 28px;
}

.admin-placeholder-card h1 {
  margin: 0;
  font-size: 25px;
}

.admin-placeholder-card>small {
  color: var(--muted);
  font-size: 10px;
}

.admin-placeholder-card>p:not(.eyebrow) {
  margin: 22px 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-placeholder-card a {
  color: var(--mint-strong);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

@media (max-width: 620px) {
  .admin-welcome {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 30px;
  }

  .admin-stat-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .admin-stat-card {
    min-height: 82px;
  }

  .admin-session-row {
    grid-template-columns: 43px 1fr;
  }

  .admin-row-actions {
    grid-column: 1 / -1;
  }

  .admin-row-actions button {
    flex: 1;
  }

  .admin-quick-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .admin-quick-grid a {
    min-height: 92px;
  }

  .admin-menu-grid {
    grid-template-columns: 1fr;
  }

  .admin-menu-card {
    min-height: 118px;
  }
}
/* Access analytics */
.analytics-page {
  min-height: 100dvh;
  background: #f4f7f5;
  color: #18352d;
}

.analytics-shell {
  width: min(1040px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.analytics-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-bottom: 20px;
  text-align: center;
}

.analytics-header>a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #18352d;
  font-size: 30px;
  text-decoration: none;
  box-shadow: 0 5px 18px rgb(24 53 45 / 8%);
}

.analytics-header h1,
.analytics-chart-heading h2 {
  margin: 0;
}

.analytics-header p,
.analytics-chart-heading p {
  margin: 2px 0 0;
  color: #789087;
  font-size: 12px;
  letter-spacing: .08em;
}

.analytics-periods {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: #e6ece9;
}

.analytics-periods button {
  min-height: 40px;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #61776f;
  font-weight: 700;
}

.analytics-periods button.active {
  background: #fff;
  color: #167a5a;
  box-shadow: 0 3px 12px rgb(24 53 45 / 9%);
}

.analytics-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.analytics-cards button,
.analytics-chart-card {
  border: 1px solid #e2eae6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(24 53 45 / 6%);
}

.analytics-cards button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: minmax(34px, auto) auto;
  align-items: center;
  gap: 5px 8px;
  min-height: 86px;
  padding: 10px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.analytics-cards button:hover {
  transform: translateY(-1px);
}

.analytics-cards button.active {
  border-color: #34aa7c;
  background: #f1faf6;
  box-shadow: 0 8px 24px rgb(22 122 90 / 12%);
}

.analytics-metric-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: #e8f5ef;
  color: #167a5a;
}

.analytics-metric-icon .sf-symbol,
.analytics-metric-icon img {
  width: 16px;
  height: 16px;
}

.analytics-metric-icon.instagram {
  background: #f8e9ef;
}

.analytics-metric-icon img {
  object-fit: contain;
}

.analytics-metric-label {
  color: #60766e;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.analytics-metric-value {
  grid-column: 1 / -1;
  white-space: nowrap;
}

.analytics-metric-value strong {
  font-size: clamp(21px, 2.8vw, 30px);
  letter-spacing: -.04em;
}

.analytics-metric-value small {
  margin-left: 4px;
  color: #789087;
  font-size: 10px;
}

.analytics-chart-card {
  margin-top: 16px;
  padding: 20px;
}

.analytics-chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.analytics-chart-heading>small {
  color: #789087;
  font-size: 10px;
}

.analytics-chart-scroll {
  overflow-x: auto;
}

.analytics-chart {
  display: block;
  min-width: 680px;
  width: 100%;
  height: auto;
}

.analytics-axis {
  stroke: #dbe5e0;
  stroke-width: 1;
}

.analytics-bar {
  fill: #34aa7c;
}

.analytics-label,
.analytics-scale {
  fill: #82968f;
  font-size: 10px;
}

.analytics-loading,
.analytics-error,
.analytics-note {
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  color: #60766e;
  text-align: center;
}

.analytics-error {
  color: #a43f3f;
}

.analytics-note {
  margin-top: 14px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .analytics-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-cards button {
    min-height: 82px;
    padding: 9px;
  }

  .analytics-periods {
    gap: 3px;
  }

  .analytics-periods button {
    font-size: 12px;
  }

  .analytics-chart-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-chart-heading>small {
    align-self: flex-start;
  }
}

@media (max-width: 430px) {
  .analytics-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* OCR and saved participant list pages */

.ocr-page {
  padding-bottom: 48px;
}

.ocr-shell {
  width: min(100% - 28px, 700px);
  margin: 0 auto;
}

.ocr-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 76px;
  text-align: center;
}

.ocr-header a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--mint-strong);
  font-size: 28px;
  text-decoration: none;
}

.ocr-header h1 {
  margin: 0;
  font-size: 20px;
}

.ocr-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.ocr-upload-card,
.ocr-results-card,
.previous-list-card,
.previous-empty {
  border: 1px solid #e0e7e3;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow);
}

.ocr-upload-card {
  display: grid;
  justify-items: center;
  padding: 27px 22px;
  text-align: center;
}

.ocr-upload-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: rgba(177, 216, 198, .3);
  color: var(--mint-strong);
  font-size: 27px;
}

.ocr-upload-icon .sf-symbol {
  width: 27px;
  height: 27px;
}

.ocr-upload-card h2 {
  margin: 14px 0 4px;
  font-size: 17px;
}

.ocr-upload-card>p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.ocr-select-button {
  min-width: 210px;
  padding: 13px 20px;
  border-radius: 13px;
  background: var(--mint-strong);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.ocr-select-button.disabled {
  cursor: default;
  opacity: .65;
}

.ocr-select-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ocr-upload-card progress {
  width: min(100%, 360px);
  height: 7px;
  margin-top: 14px;
  accent-color: var(--mint-strong);
}

.ocr-preview {
  display: block;
  max-width: 100%;
  max-height: 260px;
  margin-top: 20px;
  border-radius: 12px;
  object-fit: contain;
}

.ocr-fixed-area {
  background: var(--canvas);
}

.ocr-scroll-area {
  min-height: 0;
}

.ocr-page.has-preview {
  height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
}

.ocr-shell.has-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}

.ocr-shell.has-preview .ocr-fixed-area {
  position: relative;
  z-index: 2;
  padding-bottom: 10px;
}

.ocr-shell.has-preview .ocr-upload-card {
  padding: 10px 14px 12px;
  border-radius: 14px;
}

.ocr-shell.has-preview .ocr-upload-card progress {
  margin: 0 0 8px;
}

.ocr-shell.has-preview .ocr-preview {
  max-height: min(260px, 32dvh);
  margin-top: 0;
}

.ocr-shell.has-preview .ocr-scroll-area {
  overflow-y: auto;
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ocr-shell.has-preview .ocr-message:first-child,
.ocr-shell.has-preview .ocr-results-card:first-child {
  margin-top: 6px;
}

.ocr-message {
  margin: 14px 0;
  padding: 12px 15px;
  border-radius: 12px;
  background: rgba(177, 216, 198, .25);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.ocr-message.error {
  background: rgba(248, 220, 225, .6);
  color: #a95168;
}

.ocr-results-card,
.previous-list-card {
  margin-top: 16px;
  overflow: hidden;
}

.ocr-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #edf0ee;
}

.ocr-results-heading h2 {
  margin: 0;
  font-size: 16px;
}

.ocr-results-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.ocr-results-heading>span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(177, 216, 198, .3);
  color: var(--mint-strong);
  font-size: 10px;
  font-weight: 800;
}

.ocr-count-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ocr-count-stepper button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(177, 216, 198, .35);
  color: var(--mint-strong);
  cursor: pointer;
  font-size: 19px;
  font-weight: 800;
}

.ocr-count-stepper button:disabled {
  cursor: default;
  opacity: .4;
}

.ocr-count-stepper strong {
  min-width: 24px;
  font-size: 15px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.accounting-count-stepper strong {
  min-width: 42px;
}

.accounting-count-stepper small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 10px;
}

.ocr-table-heading,
.ocr-row {
  display: grid;
  grid-template-columns: 46px minmax(0, .9fr) minmax(0, 1.2fr) 68px;
  align-items: center;
  gap: 10px;
}

.ocr-table-heading {
  padding: 8px 17px;
  background: rgba(177, 216, 198, .14);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.ocr-row {
  min-height: 58px;
  padding: 7px 17px;
  border-top: 1px solid #f0f2f1;
}

.ocr-row:first-child {
  border-top: 0;
}

.ocr-row>strong {
  color: var(--mint-strong);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ocr-row>span {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.ocr-confirmed-field input {
  min-width: 0;
  width: 100%;
  height: 39px;
  padding: 0 10px;
  border: 1px solid rgba(72, 145, 116, .25);
  border-radius: 10px;
  outline: 0;
  background: rgba(177, 216, 198, .14);
  color: var(--ink);
}

.ocr-confirmed-field input:focus {
  border-color: var(--mint-strong);
  background: white;
}

.ocr-confirmed-field {
  display: grid;
  gap: 4px;
}

.ocr-confirmed-field>button {
  overflow: hidden;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--pink-strong);
  font-size: 9px;
  font-weight: 750;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.ocr-row-order {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.ocr-row-order button {
  width: 30px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(72, 145, 116, .25);
  border-radius: 9px;
  background: rgba(177, 216, 198, .16);
  color: var(--mint-strong);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.ocr-row-order button:disabled {
  cursor: default;
  opacity: .3;
}

.ocr-submit-button {
  display: block;
  width: calc(100% - 34px);
  min-height: 52px;
  margin: 17px;
  border: 0;
  border-radius: 14px;
  background: var(--mint-strong);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.ocr-submit-button:disabled {
  cursor: default;
  opacity: .55;
}

.previous-empty {
  display: grid;
  justify-items: center;
  padding: 48px 22px;
  text-align: center;
}

.previous-empty>span {
  color: var(--mint-strong);
  font-size: 36px;
}

.previous-empty h2 {
  margin: 12px 0 4px;
  font-size: 17px;
}

.previous-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.previous-list-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.previous-list-card li {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  min-height: 52px;
  padding: 7px 20px;
  border-top: 1px solid #edf0ee;
}

.previous-list-card li:first-child {
  border-top: 0;
}

.previous-list-card li strong {
  color: var(--mint-strong);
  font-size: 12px;
}

.previous-list-card li span {
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 620px) {
  .ocr-table-heading,
  .ocr-row {
    grid-template-columns: 30px minmax(0, .65fr) minmax(0, 1.15fr) 64px;
    gap: 7px;
  }

  .ocr-row {
    padding-right: 10px;
    padding-left: 10px;
  }

  .ocr-table-heading {
    padding-right: 10px;
    padding-left: 10px;
  }
}

/* =========================================================
   Previous Participants / Accounting
   前回参加者・会計入力画面
========================================================= */

.accounting-page .ocr-shell {
  width: min(100% - 28px, 1080px);
}

/* ヘッダー */

.accounting-page .ocr-header {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
}

.accounting-submit-button {
  justify-self: end;
  min-width: 88px;
  min-height: 38px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--mint-strong);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.accounting-submit-button:hover:not(:disabled) {
  filter: brightness(.96);
}

.accounting-submit-button:disabled {
  cursor: default;
  opacity: .45;
}

/* 成功メッセージ */

.ocr-message.success {
  background: rgba(177, 216, 198, .34);
  color: var(--mint-strong);
}

/* 日付・会場・料金 */

.accounting-event-card {
  display: grid;
  grid-template-columns:
    minmax(130px, .8fr) minmax(190px, 1.5fr) minmax(140px, 1fr) minmax(140px, 1fr);
  gap: 14px;
  margin-top: 8px;
  padding: 18px;
  border: 1px solid #e0e7e3;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.accounting-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.accounting-field label,
.participant-edit-field>label,
.participant-labels legend {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.accounting-field>input,
.accounting-price-input input,
.participant-edit-field>input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(72, 145, 116, .24);
  border-radius: 11px;
  outline: 0;
  background: rgba(177, 216, 198, .12);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.accounting-field>input:focus,
.accounting-price-input input:focus,
.participant-edit-field>input:focus {
  border-color: var(--mint-strong);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(72, 145, 116, .09);
}

.accounting-field input::placeholder,
.participant-edit-field input::placeholder {
  color: rgba(42, 72, 62, .36);
  opacity: 1;
}

.accounting-price-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.accounting-price-input span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.accounting-price-input input:disabled {
  cursor: not-allowed;
  background: rgba(248, 220, 225, .35);
  color: var(--pink-strong);
  opacity: 1;
}

/* 数値入力欄の矢印を非表示 */

.accounting-page input[type="number"]::-webkit-inner-spin-button,
.accounting-page input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.accounting-page input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* 参加費合計 */

.accounting-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 48px;
  padding: 9px 20px;
  border-bottom: 1px solid #edf0ee;
  background: rgba(177, 216, 198, .1);
}

.accounting-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.accounting-summary strong {
  color: var(--mint-strong);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

/* 参加者一覧 */

.participant-accounting-list {
  display: grid;
}

.participant-accounting-row {
  display: grid;
  grid-template-columns:
    minmax(110px, .9fr) minmax(130px, 1.2fr) minmax(115px, .8fr) minmax(220px, 1.6fr) minmax(88px, .65fr);
  align-items: center;
  gap: 12px;
  min-height: 94px;
  padding: 12px 16px;
  border-top: 1px solid #edf0ee;
}

.participant-accounting-row:first-child {
  border-top: 0;
}

/* 元の名前 */

.participant-original-name {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.participant-original-name strong {
  color: var(--mint-strong);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.participant-original-name span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 名前修正・個別料金 */

.participant-edit-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

/* ラベル */

.participant-labels {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.participant-labels legend {
  width: 100%;
  margin: 0 0 1px;
  padding: 0;
}

.participant-labels label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 31px;
  padding: 4px 8px;
  border: 1px solid rgba(72, 145, 116, .17);
  border-radius: 999px;
  background: rgba(177, 216, 198, .13);
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  user-select: none;
  -webkit-user-select: none;
}

.participant-labels label:hover {
  background: rgba(177, 216, 198, .24);
}

.participant-labels label:has(input:checked) {
  border-color: rgba(72, 145, 116, .38);
  background: rgba(177, 216, 198, .45);
  color: var(--mint-strong);
}

/* 新規だけピンク系 */

.participant-labels label:first-of-type:has(input:checked) {
  border-color: rgba(216, 139, 158, .35);
  background: rgba(248, 220, 225, .65);
  color: #b7667a;
}

.participant-labels input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--mint-strong);
}

.participant-labels label:first-of-type input {
  accent-color: var(--pink-strong);
}

/* 適用料金 */

.participant-applied-fee {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 0;
}

.participant-applied-fee span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.participant-applied-fee strong {
  color: var(--mint-strong);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* =========================================================
   Tablet
========================================================= */

@media (max-width: 900px) {
  .accounting-page .ocr-shell {
    width: min(100% - 28px, 760px);
  }

  .accounting-event-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .participant-accounting-row {
    grid-template-columns:
      minmax(100px, .8fr) minmax(130px, 1.1fr) minmax(110px, .8fr);
  }

  .participant-labels {
    grid-column: 1 / 3;
  }

  .participant-applied-fee {
    grid-column: 3;
    grid-row: 2;
  }
}

/* =========================================================
   Smartphone
========================================================= */

@media (max-width: 620px) {
  .accounting-page .ocr-shell {
    width: min(100% - 20px, 700px);
  }

  .accounting-page .ocr-header {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    min-height: 70px;
  }

  .accounting-page .ocr-header a {
    width: 38px;
    height: 38px;
  }

  .accounting-page .ocr-header h1 {
    font-size: 16px;
  }

  .accounting-page .ocr-header p {
    font-size: 8px;
  }

  .accounting-submit-button {
    min-width: auto;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 10px;
  }

  .accounting-event-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    padding: 14px;
  }

  .accounting-field-wide {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .accounting-field>input,
  .accounting-price-input input,
  .participant-edit-field>input {
    height: 40px;
    font-size: 12px;
  }

  .accounting-page .ocr-results-heading {
    padding: 15px 14px;
  }

  .accounting-summary {
    padding: 8px 14px;
  }

  .participant-accounting-row {
    grid-template-columns: minmax(0, 1fr) minmax(105px, .7fr);
    gap: 11px 10px;
    padding: 15px 14px;
  }

  .participant-original-name {
    grid-column: 1 / -1;
    padding-bottom: 2px;
  }

  .participant-original-name span {
    font-size: 14px;
  }

  .participant-edit-field {
    grid-column: 1;
  }

  .participant-edit-field:nth-of-type(2) {
    grid-column: 2;
  }

  .participant-labels {
    grid-column: 1 / -1;
    gap: 7px;
  }

  .participant-labels label {
    flex: 1 1 60px;
    justify-content: center;
    padding-right: 6px;
    padding-left: 6px;
  }

  .participant-applied-fee {
    grid-column: 1 / -1;
    grid-row: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 3px;
  }
}

/* =========================================================
   Small Smartphone
========================================================= */

@media (max-width: 390px) {
  .accounting-page .ocr-header {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .accounting-page .ocr-header h1 {
    font-size: 15px;
  }

  .accounting-submit-button {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 9px;
  }

  .accounting-event-card {
    grid-template-columns: 1fr;
  }

  .accounting-field-wide {
    grid-column: auto;
    grid-row: auto;
  }

  .participant-accounting-row {
    grid-template-columns: 1fr;
  }

  .participant-original-name,
  .participant-edit-field,
  .participant-edit-field:nth-of-type(2),
  .participant-labels,
  .participant-applied-fee {
    grid-column: 1;
  }

  .participant-applied-fee {
    justify-content: space-between;
  }
}

/* =========================================================
   Compact participant accounting layout
========================================================= */

.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.participant-accounting-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(390px, 1.85fr);
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 10px 16px;
}

.participant-name-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.participant-name-line strong {
  color: var(--mint-strong);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.participant-name-line input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(72, 145, 116, .24);
  border-radius: 10px;
  outline: 0;
  background: rgba(177, 216, 198, .12);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.participant-name-line input:focus {
  border-color: var(--mint-strong);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(72, 145, 116, .09);
}

.participant-fee-line {
  display: grid;
  grid-template-columns: minmax(115px, 145px) minmax(220px, 1fr) 158px;
  align-items: end;
  gap: 12px;
  min-width: 0;
}

.participant-compact-fee {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.participant-compact-fee>label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.participant-labels.compact {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
}

.participant-labels.compact label {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 48px;
  min-height: 34px;
  padding: 4px 7px;
}

.participant-donation {
  display: grid;
  gap: 4px;
  min-width: 158px;
}

.participant-donation>span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.donation-stepper {
  display: grid;
  grid-template-columns: 32px 82px 32px;
  align-items: center;
  gap: 5px;
}

.donation-stepper button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(72, 145, 116, .24);
  border-radius: 9px;
  background: rgba(177, 216, 198, .12);
  color: var(--mint-strong);
  font-size: 17px;
  font-weight: 800;
}

.donation-stepper button:disabled {
  cursor: default;
  opacity: .35;
}

.donation-stepper strong {
  display: block;
  min-width: 82px;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

.accounting-confirm-row.donation strong {
  color: #8b6b25;
}

/* 旧レイアウトの表示を無効化 */

.participant-original-name,
.participant-edit-field,
.participant-applied-fee {
  display: none;
}

@media (max-width: 900px) {
  .participant-accounting-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* =========================================================
   Compact mobile layout
========================================================= */

@media (max-width: 620px) {
  .accounting-event-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 9px;
    padding: 12px;
  }

  .accounting-event-card>* {
    min-width: 0;
  }

  .accounting-field {
    min-width: 0;
  }

  .accounting-field-wide {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .accounting-field>input,
  .accounting-price-input,
  .accounting-price-input input {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  .accounting-field input[type="date"] {
    width: 100%;
    min-width: 0;
    font-size: 11px;
  }

  .participant-accounting-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    padding: 10px 12px;
  }

  .participant-name-line {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
  }

  .participant-name-line input {
    height: 36px;
    font-size: 13px;
  }

  .participant-fee-line {
    grid-template-columns: minmax(92px, 112px) minmax(150px, 1fr);
    align-items: end;
    gap: 8px;
  }

  .participant-labels.compact {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .participant-donation {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    justify-self: end;
  }

  .donation-stepper {
    grid-template-columns: 30px 78px 30px;
  }

  .donation-stepper button {
    width: 30px;
  }

  .donation-stepper strong {
    min-width: 78px;
    font-size: 11px;
  }

  .participant-compact-fee {
    gap: 3px;
  }

  .participant-compact-fee .accounting-price-input {
    gap: 4px;
  }

  .participant-compact-fee .accounting-price-input input {
    height: 34px;
    padding: 0 7px;
    font-size: 11px;
  }

  .participant-compact-fee .accounting-price-input span {
    font-size: 9px;
  }

  .participant-labels.compact {
    gap: 4px;
  }

  .participant-labels.compact label {
    min-width: 0;
    min-height: 34px;
    padding: 3px 5px;
    font-size: 9px;
  }

  .participant-labels.compact input {
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 390px) {
  .accounting-event-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .accounting-field-wide {
    grid-column: 1 / -1;
  }

  .participant-fee-line {
    grid-template-columns: 92px minmax(144px, 1fr);
    gap: 6px;
  }

  .participant-labels.compact label {
    gap: 2px;
    padding-right: 3px;
    padding-left: 3px;
    font-size: 8px;
  }
}

/* =========================================================
   Accounting confirmation modal
========================================================= */

.accounting-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(24, 42, 36, .34);
  backdrop-filter: blur(5px);
}

.accounting-confirm-modal {
  overflow: hidden;
  width: min(100%, 440px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border: 1px solid rgba(72, 145, 116, .26);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(30, 60, 50, .24);
}

.accounting-confirm-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  padding: 18px 20px 15px;
  border-bottom: 1px solid #edf0ee;
}

.accounting-confirm-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.accounting-confirm-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.accounting-confirm-header button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(177, 216, 198, .22);
  color: var(--muted);
  cursor: pointer;
  font-size: 23px;
}

.accounting-confirm-event {
  display: grid;
  gap: 9px;
  padding: 16px 20px;
  border-bottom: 1px solid #edf0ee;
  background: rgba(177, 216, 198, .08);
}

.accounting-confirm-event>div {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.accounting-confirm-event span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.accounting-confirm-event strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  text-align: right;
}

.accounting-confirm-calculation {
  padding: 11px 20px;
}

.accounting-confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  border-bottom: 1px solid #edf0ee;
}

.accounting-confirm-row:last-child {
  border-bottom: 0;
}

.accounting-confirm-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.accounting-confirm-row strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.accounting-confirm-row.positive strong {
  color: var(--mint-strong);
}

.accounting-confirm-row.negative strong {
  color: var(--pink-strong);
}

.accounting-confirm-row.total {
  min-height: 60px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 2px solid rgba(72, 145, 116, .2);
}

.accounting-confirm-row.total span {
  color: var(--ink);
  font-size: 14px;
}

.accounting-confirm-row.total strong {
  color: var(--mint-strong);
  font-size: 24px;
}

.accounting-confirm-note {
  margin: 0;
  padding: 12px 20px;
  background: rgba(248, 220, 225, .3);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.6;
}

.accounting-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 9px;
  padding: 16px 20px 20px;
}

.accounting-confirm-actions button {
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.accounting-confirm-cancel {
  border: 1px solid #dce5e1;
  background: var(--card);
  color: var(--muted);
}

.accounting-confirm-send {
  border: 0;
  background: var(--mint-strong);
  color: #fff;
}

.accounting-confirm-actions button:disabled {
  cursor: default;
  opacity: .55;
}

@media (max-width: 390px) {
  .accounting-confirm-backdrop {
    padding: 10px;
  }

  .accounting-confirm-header,
  .accounting-confirm-event,
  .accounting-confirm-calculation,
  .accounting-confirm-actions {
    padding-right: 15px;
    padding-left: 15px;
  }

  .accounting-confirm-actions {
    grid-template-columns: 1fr;
  }

  .accounting-confirm-cancel {
    order: 2;
  }
}

.new-management-page { padding-bottom: 50px; }
.new-management-shell { width: min(100% - 28px, 700px); margin: 0 auto; }
.new-management-message { padding: 10px 13px; border-radius: 10px; background: #eef8f3; color: #39745a; font-size: 11px; }
.new-management-form-toggle { display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; width: 100%; min-height: 62px; margin-top: 14px; padding: 11px 17px; border: 1px solid rgba(72,145,116,.2); border-radius: 14px; background: rgba(177,216,198,.16); color: #344d43; text-align: left; }
.new-management-form-toggle span { display: grid; gap: 2px; }
.new-management-form-toggle strong { font-size: 12px; }
.new-management-form-toggle small { color: var(--muted); font-size: 8px; }
.new-management-form-toggle b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #fff; color: var(--mint-strong); font-size: 18px; }
.new-management-form,.new-management-list,.new-management-close,.new-management-history { margin-top: 14px; padding: 17px; border: 1px solid #e0e7e3; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.new-management-form h2,.new-management-list h2,.new-management-close h2 { margin: 0 0 13px; font-size: 14px; }
.new-management-form>label,.new-management-form fieldset { display: grid; gap: 7px; margin: 0 0 13px; padding: 0; border: 0; }
.new-management-form label>span,.new-management-form legend { color: #60716a; font-size: 10px; font-weight: 800; }
.new-management-form input,.new-management-form select,.new-management-close input { box-sizing: border-box; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #dce4e0; border-radius: 10px; background: #fff; font-size: 12px; }
.new-management-form .new-custom-input { background: #f1f3f2; color: #34433d; }
.new-management-form .new-custom-input::placeholder { color: #9ba5a1; }
.new-choice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.new-choice-row button { padding: 7px 9px; border: 1px solid #dbe5e0; border-radius: 9px; background: #f7f9f8; color: #60716a; font-size: 10px; }
.new-choice-row button.selected { border-color: #66a88c; background: #e4f3eb; color: #347358; font-weight: 800; }
.new-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.new-form-actions button,.new-management-close button { padding: 10px 15px; border: 0; border-radius: 10px; background: var(--mint-strong); color: #fff; font-weight: 800; }
.new-form-actions .secondary { background: #edf1ef; color: #60716a; }
.new-management-list>header>div { display: flex; justify-content: space-between; align-items: center; }
.new-date-group { margin-top: 13px; }
.new-date-group h3 { margin: 0 0 7px; color: #587168; font-size: 11px; }
.new-participant-card { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; padding: 11px; border: 1px solid #e4ebe7; border-radius: 12px; }
.new-participant-card.first-visit { border-color: #bcdcca; background: #f0f8f4; }
.new-participant-card>div:first-child { display: grid; gap: 3px; min-width: 0; }
.new-participant-name { display: flex; align-items: center; gap: 6px; }
.new-participant-name em { padding: 2px 6px; border-radius: 999px; background: #cde8d9; color: #347358; font-size: 8px; font-style: normal; font-weight: 800; }
.new-participant-name .pickup-required { background: #dbeafe; color: #2563a8; }
.new-participant-card strong { font-size: 12px; }.new-participant-card span { font-size: 9px; }.new-participant-card small { color: var(--muted); font-size: 8px; }
.new-participant-card>div:last-child { display: flex; flex: 0 0 auto; gap: 5px; align-items: center; }
.new-participant-card button,.new-management-history>button { padding: 6px 8px; border: 1px solid #dce4e0; border-radius: 8px; background: #fff; color: #527064; font-size: 9px; }
.new-participant-card .new-participant-complete { box-sizing: border-box; width: 64px; min-width: 64px; border-color: var(--mint-strong); background: var(--mint-strong); color: #fff; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.new-management-history .new-participant-card .new-participant-complete { border-color: #dce4e0; background: #fff; color: #527064; }
.new-management-close { box-sizing: border-box; max-width: 100%; padding: 12px 13px; }
.new-management-close h2 { margin-bottom: 8px; color: #718078; font-size: 10px; }
.new-management-close>div { display: grid; grid-template-columns: 22px 116px 62px; justify-content: start; gap: 5px; align-items: center; min-width: 0; }
.new-close-date-icon { display: grid; place-items: center; width: 22px; height: 26px; border-radius: 7px; background: #edf4f0; color: var(--mint-strong); }
.new-close-date-icon .sf-symbol { width: 15px; height: 15px; }
.new-management-close input { box-sizing: border-box; width: 116px; max-width: 116px; min-width: 116px; min-height: 34px; padding: 4px 2px; overflow: hidden; font-size: 10px; }
.new-management-close button { width: 62px; min-width: 0; padding: 7px 3px; white-space: nowrap; font-size: 8px; line-height: 1.2; }
.new-management-close button span { margin-right: 3px; }
.new-management-history>button { width: 100%; }
@media (max-width: 560px) { .new-participant-card { align-items: flex-start; }.new-participant-card>div:last-child { flex-direction: column; } }
.new-participant-replacement { box-sizing: border-box; width: calc(100% - 36px); min-height: 32px; margin: 5px 0 8px 36px; padding: 5px 8px; border: 1px solid #cfe2d8; border-radius: 8px; background: #f5faf7; color: #3f6655; font-size: 10px; }
.quality-page { background: #f4f7fb; min-height: 100vh; }
.quality-shell { width: min(1080px, calc(100% - 28px)); margin: 0 auto; padding: 24px 0 56px; }
.quality-header { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; margin-bottom: 18px; }
.quality-header>a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: white; color: #24364b; font-size: 30px; text-decoration: none; box-shadow: 0 4px 18px #3451a018; }
.quality-header h1 { margin: 0; font-size: 24px; color: #17283d; }
.quality-header p { margin: 2px 0 0; color: #7b8999; font-size: 12px; letter-spacing: .08em; }
.quality-version-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; border-radius: 18px; color: white; background: linear-gradient(135deg, #263f68, #436e9f); box-shadow: 0 12px 30px #263f6830; }
.quality-version-card div { min-width: 0; }
.quality-version-card small { display: block; opacity: .72; font-size: 11px; }
.quality-version-card strong { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.quality-filters { display: flex; gap: 10px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.quality-filters nav { display: flex; padding: 3px; border-radius: 12px; background: #e4eaf2; }
.quality-filters button { border: 0; padding: 8px 13px; border-radius: 9px; background: transparent; color: #627184; font-weight: 700; }
.quality-filters button.active { background: white; color: #275d96; box-shadow: 0 2px 8px #1c35531a; }
.quality-filters select { min-height: 38px; border: 1px solid #d6dee9; border-radius: 11px; padding: 0 32px 0 12px; background: white; color: #33475e; }
.quality-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quality-summary article { padding: 15px; border-radius: 16px; background: white; box-shadow: 0 5px 20px #2946670d; }
.quality-summary small { display: block; min-height: 30px; color: #768497; font-size: 11px; }
.quality-summary strong { color: #193a5e; font-size: 24px; }
.quality-summary span { margin-left: 4px; color: #8793a1; font-size: 11px; }
.quality-table-card { margin-top: 14px; padding: 18px; border-radius: 18px; background: white; box-shadow: 0 5px 20px #2946670d; }
.quality-table-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.quality-table-heading h2 { margin: 0 0 14px; color: #21384f; font-size: 17px; }
.quality-table-heading small { color: #8793a1; }
.quality-table-scroll { overflow-x: auto; }
.quality-table { width: 100%; }
.quality-table-card table { width: 100%; border-collapse: collapse; min-width: 650px; }
.quality-table-card th, .quality-table-card td { padding: 10px 8px; border-bottom: 1px solid #edf1f5; text-align: left; color: #42566c; font-size: 12px; }
.quality-table-card th { color: #7d8998; font-size: 10px; }
.quality-message, .quality-empty, .quality-note { color: #738195; text-align: center; font-size: 12px; }
.quality-message { padding: 42px; }
.quality-message.error { color: #b44c52; }
.quality-note { margin: 14px 4px 0; line-height: 1.6; }
@media (max-width: 700px) { .quality-version-card { grid-template-columns: 1fr; } .quality-summary { grid-template-columns: repeat(2, 1fr); } .quality-filters select { flex: 1 1 140px; } }
.operation-log-page { padding-bottom: 50px; }.operation-log-shell { width: min(100% - 28px,720px); margin: 0 auto; }.operation-log-shell .ocr-header>button { width: 42px; height: 34px; border: 0; border-radius: 9px; background: #edf5f1; color: #397157; font-size: 9px; font-weight: 800; }.operation-log-filters { display: flex; gap: 6px; margin-top: 14px; padding-bottom: 3px; overflow-x: auto; }.operation-log-filters button { flex: 0 0 auto; padding: 7px 11px; border: 1px solid #dce6e1; border-radius: 999px; background: #fff; color: #61736b; font-size: 9px; }.operation-log-filters button.active { border-color: var(--mint-strong); background: var(--mint-strong); color: #fff; }.operation-log-refine { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; margin-top: 10px; padding: 10px; border: 1px solid #e1e9e5; border-radius: 12px; background: #fff; }.operation-log-refine label { display: grid; gap: 4px; }.operation-log-refine span { color: #718078; font-size: 8px; font-weight: 800; }.operation-log-refine select { width: 100%; min-height: 34px; padding: 0 9px; border: 1px solid #dce6e1; border-radius: 9px; background: #f9fbfa; color: #45584f; font-size: 10px; }.operation-log-refine>strong { min-width: 42px; padding-bottom: 9px; color: #397157; font-size: 10px; text-align: right; }.operation-log-state { margin-top: 14px; padding: 18px; border-radius: 14px; background: #fff; color: #718078; text-align: center; font-size: 11px; }.operation-log-state.error { color: #a64d4d; }.operation-log-list { display: grid; gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; }.operation-log-list li { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 9px; padding: 12px; border: 1px solid #e1e9e5; border-radius: 13px; background: #fff; }.operation-log-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e6f4ec; color: #377259; font-weight: 900; }.status-warning .operation-log-mark { background: #fff2d8; color: #a56b17; }.status-error .operation-log-mark { background: #fde6e6; color: #aa4646; }.operation-log-list li>div { min-width: 0; }.operation-log-list header { display: flex; justify-content: space-between; gap: 8px; }.operation-log-list strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.operation-log-list time,.operation-log-list small { flex: 0 0 auto; color: #819089; font-size: 8px; }.operation-log-list p { margin: 4px 0; color: #56675f; font-size: 9px; line-height: 1.5; }
:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: #2a483e;
  background: #faf8f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { background: #faf8f7; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
