:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f7;
  color: #17232b;
  font-size: 16px;
  line-height: 1.45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #f4f6f7;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  min-height: 36px;
  padding: 7px 12px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.modal-stage:focus-visible {
  outline: 3px solid #2d7a8d;
  outline-offset: 2px;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

[hidden] {
  display: none !important;
}

.arena-page {
  min-height: 100vh;
}

.access-panel {
  width: min(100% - 32px, 380px);
  margin: min(20vh, 160px) auto 0;
  padding: 24px;
  border: 1px solid #cfd7db;
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  gap: 12px;
}

.access-panel h1,
.topbar h1,
.paper-band h2,
.poster-heading h2,
.section-heading h2,
.dialog-content h2,
.zoom-heading h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 680;
}

.eyebrow {
  margin: 0;
  color: #52616a;
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.access-panel label,
.dialog-content label {
  color: #34434b;
  font-size: 0.88rem;
  font-weight: 650;
}

.access-panel input,
.dialog-content textarea {
  width: 100%;
  border: 1px solid #aebbc1;
  border-radius: 6px;
  background: #ffffff;
  color: #17232b;
  min-height: 40px;
  padding: 8px 10px;
}

.dialog-content textarea {
  min-height: 84px;
  resize: vertical;
}

.primary-action {
  background: #126b78;
  color: #ffffff;
}

.secondary-action {
  border-color: #aebbc1;
  background: #ffffff;
  color: #22323b;
}

.danger-action {
  background: #ad2b24;
  color: #ffffff;
}

.icon-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
  background: #ffffff;
  border-color: #aebbc1;
  color: #22323b;
  font-size: 1.35rem;
  line-height: 1;
}

.topbar {
  min-height: 58px;
  padding: 9px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid #cfd7db;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.progress-block {
  display: grid;
  gap: 1px;
  color: #52616a;
  font-size: 0.75rem;
  text-align: right;
}

.progress-block strong {
  color: #17232b;
  font-size: 0.95rem;
}

.paper-band {
  padding: 11px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid #d9e0e3;
  background: #eef2f3;
}

.paper-band h2 {
  margin-bottom: 7px;
  font-size: 0.95rem;
}

.paper-band details {
  max-width: 1100px;
}

.paper-band summary {
  width: fit-content;
  color: #1d5d69;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 650;
}

.paper-band p {
  max-width: 100ch;
  color: #3a4a52;
  font-size: 0.88rem;
  white-space: pre-wrap;
}

#paper-pdf {
  width: 100%;
  height: min(60vh, 620px);
  border: 1px solid #aebbc1;
  background: #ffffff;
}

.poster-grid {
  width: min(100% - 32px, 1800px);
  margin: 12px auto 0;
  padding-bottom: 82px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.poster-panel {
  min-width: 0;
  border: 1px solid #c4d0d4;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.poster-heading {
  min-height: 43px;
  padding: 6px 8px 6px 12px;
  border-bottom: 1px solid #d9e0e3;
  background: #f8fafb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.poster-heading h2 {
  font-size: 0.94rem;
}

.poster-stage {
  aspect-ratio: 2 / 1;
  background: #e9edef;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.poster-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.severe-choice {
  min-height: 42px;
  padding: 10px 12px;
  border-top: 1px solid #d9e0e3;
  color: #8a342c;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 620;
}

.severe-choice input,
.acknowledgment input {
  inline-size: 17px;
  block-size: 17px;
  margin: 0;
}

.decision-bar {
  position: sticky;
  z-index: 4;
  bottom: 0;
  min-height: 70px;
  padding: 8px clamp(16px, 3vw, 40px);
  border-top: 1px solid #bfcacf;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.decision-controls,
.save-area,
.operation-controls,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.choice-button {
  border-color: #78969c;
  background: #ffffff;
  color: #1e3b42;
}

.choice-button[aria-pressed="true"] {
  border-color: #126b78;
  background: #dceff1;
  color: #0d4e58;
}

.save-area {
  min-width: 214px;
  justify-content: flex-end;
}

.status-message {
  min-height: 1.3em;
  margin: 0;
  color: #52616a;
  font-size: 0.8rem;
}

dialog {
  max-width: min(100% - 32px, 460px);
  border: 1px solid #aebbc1;
  border-radius: 8px;
  padding: 0;
  background: #ffffff;
  color: #17232b;
}

dialog::backdrop {
  background: rgb(23 35 43 / 68%);
}

.dialog-content {
  padding: 20px;
  display: grid;
  gap: 12px;
}

.dialog-content p {
  margin: 0;
  color: #52616a;
  font-size: 0.88rem;
}

.dialog-content code {
  overflow-wrap: anywhere;
  padding: 10px;
  border: 1px solid #c4d0d4;
  border-radius: 6px;
  background: #f4f6f7;
  color: #17232b;
}

.dialog-actions {
  justify-content: flex-end;
}

#poster-modal {
  width: 100vw;
  max-width: none;
  height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #11191e;
  color: #ffffff;
}

.zoom-dialog {
  height: 100%;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
}

.zoom-heading {
  padding: 8px 14px;
  border-bottom: 1px solid #4c5d65;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-stage {
  cursor: grab;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
}

.modal-stage:active {
  cursor: grabbing;
}

#modal-poster-image {
  max-width: 100%;
  max-height: 100%;
  transform-origin: center;
  user-select: none;
  will-change: transform;
}

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

.admin-shell .topbar {
  margin: 0 -16px;
}

.status-chip {
  border: 1px solid #6f8d94;
  border-radius: 6px;
  padding: 4px 9px;
  background: #edf6f7;
  color: #155d67;
  font-size: 0.78rem;
  font-weight: 680;
}

.status-chip.is-closed {
  border-color: #b28a51;
  background: #fbf0dc;
  color: #7c541c;
}

.admin-summary {
  margin: 18px 0;
  border-top: 1px solid #cfd7db;
  border-bottom: 1px solid #cfd7db;
  background: #ffffff;
}

.admin-summary dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-summary dl > div {
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid #d9e0e3;
}

.admin-summary dl > div:last-child {
  border-right: 0;
}

.admin-summary dt {
  color: #52616a;
  font-size: 0.78rem;
}

.admin-summary dd {
  margin: 3px 0 0;
  color: #17232b;
  font-size: 1.25rem;
  font-weight: 700;
}

.admin-section {
  margin-top: 18px;
  border-top: 1px solid #cfd7db;
  background: #ffffff;
}

.section-heading {
  min-height: 66px;
  padding: 12px 16px;
  border-bottom: 1px solid #d9e0e3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 16px;
  border-bottom: 1px solid #e0e6e8;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #52616a;
  font-size: 0.76rem;
  font-weight: 700;
}

td {
  font-size: 0.86rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.operations {
  padding-bottom: 16px;
}

.operation-controls,
.operations .status-message,
.export-links {
  margin: 14px 16px 0;
}

.export-links {
  padding: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}

.export-links a {
  color: #125c6b;
  font-size: 0.84rem;
  font-weight: 650;
}

.acknowledgment {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 760px) {
  .topbar {
    padding-inline: 16px;
  }

  .poster-grid {
    width: min(100% - 20px, 620px);
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .decision-bar {
    bottom: 0;
    min-height: 82px;
    padding: 5px 10px;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    position: sticky;
  }

  .decision-controls {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .decision-controls button {
    min-width: 0;
    min-height: 32px;
    padding: 5px 3px;
    font-size: 0.72rem;
  }

  .save-area,
  .operation-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .save-area {
    min-width: 0;
    min-height: 34px;
    justify-content: space-between;
  }

  .save-area .status-message {
    flex: 1;
    text-align: center;
  }

  .poster-grid {
    padding-bottom: 8px;
  }

  .poster-heading,
  .severe-choice {
    min-height: 36px;
  }

  .severe-choice {
    padding-block: 7px;
  }

  .admin-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-summary dl > div:nth-child(2) {
    border-right: 0;
  }

  .admin-summary dl > div:nth-child(-n + 2) {
    border-bottom: 1px solid #d9e0e3;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
