:root {
  color-scheme: light;
  font-family: "Inter", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #172b23;
  background: #eef2eb;
  --green: #1c563d;
  --line: #dae3d7;
  --muted: #486257;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
main { width: min(100% - 32px, 660px); margin: 30px auto 72px; }
.masthead {
  padding: clamp(25px, 6vw, 55px);
  border-radius: 24px;
  color: #fbfcf5;
  background: radial-gradient(ellipse at 110% 10%, #4e7859 3%, transparent 58%), #172f27;
  position: relative;
  overflow: hidden;
}
.masthead::after {
  content: "";
  border: 1px solid #b7d3b23d;
  border-radius: 50%;
  width: 230px;
  height: 230px;
  position: absolute;
  right: -85px;
  bottom: -125px;
  pointer-events: none;
  box-shadow: 0 0 0 25px #b7d3b213, 0 0 0 56px #b7d3b20e;
}
.kicker { font-size: .79rem; color: #d5e9ce; letter-spacing: .06em; }
h1 { font-size: clamp(2.45rem, 8vw, 4rem); letter-spacing: -.04em; margin: .2em 0 .22em; }
h2 { font-size: 1.18rem; margin: 0; }
p { margin: 0; line-height: 1.62; }
.panel { margin-top: 15px; background: #fcfdf9; padding: clamp(16px, 4vw, 27px); border: 1px solid var(--line); border-radius: 18px; }
form { display: grid; gap: 13px; padding-top: 15px; }
label { display: block; font-weight: 650; font-size: .9rem; }
input:not([type=checkbox]), button, .quiet, .picker { font: inherit; }
input:not([type=checkbox]) {
  width: 100%; border-radius: 10px; border: 1px solid #bfcfc1;
  background: #fff; padding: 11px 12px; margin-top: 6px; color: inherit; min-height: 44px;
}
button, .quiet, .picker {
  cursor: pointer; border: 1px solid transparent; border-radius: 10px;
  min-height: 44px; padding: 10px 15px; font-weight: 650; text-decoration: none;
}
button:disabled { cursor: default; opacity: .55; }
.primary { color: #fff; background: var(--green); }
.quiet { color: var(--green); background: #e8f1e7; display: inline-flex; align-items: center; }
.quiet.danger { color: #8e3428; background: #faece8; }
:focus-visible { outline: 3px solid #70a786; outline-offset: 2px; }
.picker { display: block; position: relative; background: var(--green); color: #fff; text-align: center; margin-top: 13px; }
.picker input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.picker:focus-within { outline: 3px solid #70a786; outline-offset: 2px; }
.muted { color: var(--muted); font-size: .9rem; margin-top: 7px; }
.feedback:empty { display: none; }
.feedback { color: var(--green); margin-top: 9px; font-size: .92rem; overflow-wrap: anywhere; }
.error { color: #9e361f; }
.row, .identity, .pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.identity { margin-top: 13px; }
.pill { color: var(--green); background: #eaf2e7; border-radius: 20px; font-size: .83rem; padding: 5px 11px; white-space: nowrap; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 13px; margin-top: 14px; }
.card { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff; }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #dce9dc; }
.card .caption { padding: 11px; overflow-wrap: anywhere; }
.caption strong { font-size: .94rem; }
.caption .quiet { margin-top: 9px; min-height: 34px; }
.caption .rating { display: block; margin-top: 7px; }
.rating select { min-height: 37px; border: 1px solid #bfcfc1; border-radius: 7px; color: inherit; background: #fff; padding: 5px 8px; margin-left: 6px; }
.upload-item { margin-top: 11px; padding: 11px 13px; background: #edf4eb; border-radius: 10px; overflow-wrap: anywhere; }
.upload-item progress { width: 100%; height: 13px; accent-color: var(--green); display: block; }
.upload-item .quiet { margin-top: 6px; }
.upload-item label { margin: 8px 0; }
.upload-item .muted:empty { display: none; }
#submission-form { padding-top: 0; }
.jury-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.jury-card-actions button { margin-top: 7px; min-height: 38px; padding: 7px 12px; }
.review-decision { font-weight: 650; }
.jury-results { padding-left: 24px; line-height: 1.65; }
.selected-work { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.work-preview { display: block; padding: 0; border: 0; width: 100%; background: transparent; cursor: zoom-in; }
.projection-mode main { width: min(100% - 48px, 1600px); }
.projection-mode .masthead, .projection-mode #workspace > :not(#voting),
.projection-mode .ballot-action, .projection-mode #voting-feedback { display: none !important; }
.projection-mode .selected-work { border-color: var(--line); box-shadow: none; }
.projection-mode #voting-works { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.projection-mode #voting-works img { object-fit: contain; }
.projection-mode #voting-works .caption { text-align: center; }
.projection-mode dialog { width: min(96vw, 1600px); }
.review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 12px; }
.review-tools { display: grid; justify-items: start; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.review-tools .check { display: flex; align-items: center; gap: 6px; }
.gallery-heading { display: flex; align-items: center; gap: 10px; }
.pagination { justify-content: center; margin-top: 17px; }
dialog { border: 0; border-radius: 15px; width: min(96vw, 1050px); padding: 14px; background: #fcfdf9; color: inherit; }
dialog::backdrop { background: #122018c9; }
dialog img, dialog video { display: block; width: 100%; max-height: 75vh; object-fit: contain; margin: 9px 0; }
img[role=button] { cursor: zoom-in; }
@media (max-width: 540px) {
  main { margin-top: 14px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 135px), 1fr)); }
}
@media (min-width: 960px) {
  .review-layout, .participant-layout { width: min(100% - 64px, 1660px); margin-top: 24px; }
  .layout .masthead { padding: 23px 30px; border-radius: 17px; }
  .layout h1 { font-size: 2.3rem; }
  .layout #access { max-width: 750px; }
  .layout #login { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .layout #login .feedback { grid-column: 1 / -1; }
  .review-workspace, .participant-workspace { display: grid; gap: 16px; align-items: start; }
  .review-workspace { grid-template-columns: 300px minmax(0, 1fr); }
  .review-workspace > *, .participant-workspace > * { margin-top: 0; min-width: 0; }
  .review-workspace .identity, .participant-workspace .identity { grid-column: 1 / -1; margin-top: 12px; }
  .review-workspace .controls { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
  .review-gallery .photo-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)); }
  .review-gallery .card img { aspect-ratio: 16/10; object-fit: contain; background: #182c24; }
  .participant-workspace { grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr); }
  .participant-workspace #submit-panel { grid-column: 1; grid-row: 2; }
  .participant-workspace #own-works { grid-column: 2; grid-row: 2; }
  .participant-workspace #voting { grid-column: 1 / -1; grid-row: 3; }
  .projection-mode .participant-workspace { display: block; }
}
