:root {
  --bg: #f5f2eb;
  --ink: #242b26;
  --accent: #b53e30;
  --paper: #fff;
  --line: color-mix(in srgb, var(--ink) 18%, transparent);
  --muted: color-mix(in srgb, var(--ink) 68%, var(--bg));
  scrollbar-gutter: stable;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "PingFang HK", "Noto Sans CJK TC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  left: 15px;
  top: -100px;
  z-index: 20;
}
.skip:focus {
  top: 15px;
  background: var(--paper);
  padding: 12px;
}
.site-header {
  max-width: 1320px;
  margin: auto;
  height: 114px;
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 20px;
  align-items: center;
}
.brand #brand-mark {
  font-size: 58px;
  font-weight: 900;
  letter-spacing: -6px;
  line-height: 1;
}
.brand-dot {
  color: var(--accent);
}
.brand-caption {
  font-size: 10px;
  letter-spacing: 2px;
  line-height: 1.6;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.brand img {
  width: 100px;
  max-height: 60px;
  object-fit: contain;
}
.desktop-nav {
  display: flex;
  gap: 34px;
  font-size: 13px;
  font-weight: 600;
}
.desktop-nav a[aria-current] {
  color: var(--accent);
}
.account-button {
  background: none;
  border: 1px solid var(--ink);
  padding: 12px 20px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
}
.local-notice {
  text-align: center;
  font-size: 12px;
  padding: 8px;
  background: #fff3d2;
  color: #70531d;
}
main {
  max-width: 1320px;
  margin: auto;
  padding: 56px 44px;
  min-height: 55vh;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 2.6px;
  font-weight: 700;
  text-transform: uppercase;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 1px;
}
.live:before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}
h1 {
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 600;
  letter-spacing: -2.5px;
  line-height: 1.25;
  margin: 22px 0;
}
h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 1.09em;
}
h2 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 15px 0;
}
h3 {
  font-size: 18px;
}
p {
  line-height: 1.85;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.intro {
  max-width: 420px;
  font-size: 14px;
  color: var(--muted);
}
.round-card {
  margin-top: 32px;
  padding: 0;
}
.round-clock{background:var(--ink);color:var(--bg);padding:20px 24px 0;margin:0 0 25px;overflow:hidden;border-radius:3px}
.clock-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:11px;letter-spacing:1px;color:color-mix(in srgb,var(--bg) 75%,var(--ink))}
.clock-live{display:inline-flex;gap:8px;align-items:center;font-weight:600;color:var(--bg)}
.clock-live:before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}
.clock-main{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 0 21px}
.clock-caption{display:grid;gap:8px;min-width:0}.clock-caption strong{font-size:16px;letter-spacing:1px;font-weight:600}.clock-caption>span{font-size:10px;opacity:.7;line-height:1.7}
.clock-value{display:flex;align-items:baseline;font-size:64px;line-height:1;font-weight:600;letter-spacing:-2px;font-variant-numeric:tabular-nums;flex-shrink:0}.clock-colon{font-size:.72em;padding:0 4px;opacity:.45;transform:translateY(-3px)}
.clock-rail{height:3px;background:color-mix(in srgb,var(--bg) 18%,transparent);margin:0 -24px}.clock-rail>span{display:block;height:100%;background:var(--bg);opacity:.7}
.round-clock.urgent{background:var(--accent);color:#fff}.round-clock.urgent .clock-heading,.round-clock.urgent .clock-live{color:#fff}.round-clock.urgent .clock-rail>span{background:#fff}
@media(max-width:600px){.round-card{padding-top:0!important}.round-clock{padding:18px 18px 0;margin-bottom:21px}.clock-value{font-size:52px}.clock-main{gap:12px;padding:19px 0}.clock-caption strong{font-size:14px}.clock-caption>span{font-size:9px}.clock-heading{font-size:10px}.clock-rail{margin-inline:-18px}}
.round-top,
.section-top,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
}
.pattern-name {
  font-family: Georgia, serif;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -1.5px;
  margin: 15px 0 8px;
}
.pattern-name span {
  display: block;
  font-family: Arial, "PingFang HK", sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  margin-top: 8px;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  min-height: 54px;
  padding: 16px 24px;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 700;
  border-radius: 2px;
}
.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.round-card .primary {
  width: 100%;
  margin: 18px 0 8px;
}
.hero-art {
  position: relative;
}
.hero-art > img {
  display: block;
  width: 100%;
  aspect-ratio: 1/1.025;
  object-fit: cover;
}
.art-label {
  position: absolute;
  top: 25px;
  left: 25px;
  right: 25px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 2px;
}
.art-tag {
  position: absolute;
  bottom: -14px;
  right: 25px;
  background: var(--ink);
  color: var(--bg);
  padding: 17px 22px;
  font-size: 10px;
  letter-spacing: 2px;
}
.criteria-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 58px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hourly-hero {gap:48px;align-items:center}
.challenge-heading h1 {font-size:29px;letter-spacing:-1px;line-height:1.35;margin:12px 0 0}
.hourly-hero .round-card {margin-top:23px}
.hourly-hero .round-clock {margin-bottom:23px}
.hourly-hero .pattern-name {margin-top:10px;font-size:42px}
.hourly-hero .pattern-name span {display:inline-block;font-size:13px;margin-left:12px;letter-spacing:1px}
.challenge-note {margin:16px 0 0;line-height:1.65;font-size:13px}
.challenge-note strong {display:block;font-weight:600;margin-bottom:4px}
.challenge-note>span {color:var(--muted)}
.round-card .capture-cta {background:var(--accent);border-color:var(--accent);color:#fff;min-height:66px;font-size:19px;margin-top:23px;box-shadow:0 7px 18px color-mix(in srgb,var(--accent) 18%,transparent);gap:15px}
.capture-cta:hover {filter:brightness(.9)}
.capture-label {display:flex;align-items:center;gap:13px}
.capture-cta>span:last-child {font-size:27px;line-height:1}
.capture-hint {font-size:11px;color:var(--muted);text-align:center;margin:5px 0 0;letter-spacing:.3px}
.hourly-hero .hero-art {margin:0;overflow:hidden;background:#ece6d8;min-width:0;isolation:isolate}
.hourly-hero .hero-art>img {width:100%;height:auto;aspect-ratio:1;object-fit:cover}
.artwork-caption {padding:20px 23px;background:var(--paper);display:flex;align-items:end;justify-content:space-between;gap:15px;border:1px solid var(--line);border-top:0}
.artwork-caption strong {display:block;font-family:Georgia,serif;font-size:27px;font-weight:400;margin-top:8px}
.artwork-caption .eyebrow {font-size:8px;letter-spacing:1.6px}
.artwork-credit {font-size:9px;color:var(--muted);text-align:right;line-height:1.7;max-width:105px}
@media(max-width:900px){.hourly-hero{gap:28px}.challenge-heading h1{font-size:24px}.artwork-caption{padding:16px}.round-card .capture-cta{padding:16px 19px}}
@media(max-width:600px){
  .hourly-hero .challenge-heading h1 {font-size:24px;letter-spacing:-.7px;margin:10px 0 0}
  .hourly-hero .round-card{margin-top:20px}
  .hourly-hero .round-clock{margin-bottom:20px}
  .hourly-hero .pattern-name{font-size:35px;margin-top:7px}
  .hourly-hero .pattern-name span{font-size:12px}
  .challenge-note{margin-top:12px;font-size:12px}
  .round-card .capture-cta{min-height:64px;margin-top:18px;font-size:18px}
  .capture-hint{font-size:10px}
  .hourly-hero .hero-art>img{aspect-ratio:1}
}
@media(max-width:380px){
  .hourly-hero .challenge-heading h1{font-size:21px}
  .hourly-hero .clock-value{font-size:44px}
  .hourly-hero .clock-caption>span{text-wrap:balance}
}
.criteria-strip > div {
  padding: 25px 20px;
  border-right: 1px solid var(--line);
}
.criteria-strip > div:first-child {
  padding-left: 0;
}
.criteria-strip > div:last-child {
  border: 0;
}
.criteria-strip small {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}
.criteria-strip strong {
  display: block;
  font-weight: 500;
  font-size: 16px;
  margin-top: 12px;
}
.criteria-strip b {
  float: right;
  color: var(--accent);
  font-family: Georgia, serif;
  font-weight: 400;
}
.section-heading {
  margin-bottom: 30px;
}
.section-heading h1 {
  font-size: 48px;
  margin: 14px 0;
}
.filterbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 26px;
}
.chip {
  border: 1px solid var(--line);
  background: transparent;
  padding: 10px 16px;
  font-size: 12px;
  border-radius: 2px;
}
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.sort {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
}
.gallery {
  display: grid;
  /* Fit readable cards to the container; retain empty tracks when filtering. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 22px;
  align-items: start;
}
.gallery > .empty {
  grid-column: 1 / -1;
}
.gallery-updates {
  position: sticky;
  top: 8px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 3px 12px rgb(0 0 0 / 7%);
}
.gallery-update-button, .gallery-return-button {
  min-height: 48px;
  max-width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 3px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
}
.gallery-update-button { display: flex; align-items: center; gap: 10px; color: var(--ink); background: var(--paper); }
.gallery-update-button.has-updates { color: #fff; background: #a93629; box-shadow: 0 2px 7px rgb(169 54 41 / 24%); }
.gallery-update-count { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 99px; color: #a12d23; background: #fff; font-size: 16px; font-variant-numeric: tabular-nums; }
.gallery-return-button { color: var(--accent); background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.gallery-updates [hidden] { display: none; }
.gallery-updates button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.gallery-updates button:disabled { opacity: .65; }
.work-card {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  background: var(--paper);
  display: block;
}
.work-photo > img {
  width: 100%;
  height: auto;
  display: block;
}
.work-photo {
  display: block;
  position: relative;
}
/* Status decoration must not change card or photo geometry. */
.work-card.is-registered {
  border-color: #b55b50;
  background: #fffaf7;
}
.work-card.is-shortlisted {
  border-color: #b49551;
  background: #fbf7e9;
}
.work-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 28%));
}
.work-badge {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 7px 11px 7px 7px;
  line-height: 1.15;
  white-space: nowrap;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}
.work-badge::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: .35;
}
.work-badge.registered {
  background: #fff3df;
  color: #9e3229;
}
.work-badge.shortlisted {
  background: #26372d;
  color: #f1d699;
}
.work-badge svg {
  display: block;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
}
.work-badge.registered > svg { transform: rotate(-10deg); }
.work-badge-wordmark { display: grid; gap: 3px; }
.work-badge-wordmark strong {
  font-family: "Noto Serif TC", "Songti TC", "Songti SC", "PMingLiU", serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .08em;
}
.work-badge-wordmark small {
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .5px;
}
.work-card.is-shortlisted .work-badge.registered {
  gap: 3px;
  padding: 7px 8px;
  background: #fff3df;
  color: #9e3229;
}
.work-card.is-shortlisted .work-badge.registered::before { content: "✓"; font-size: 11px; font-weight: 700; }
.work-card.is-shortlisted .work-badge.registered svg,
.work-card.is-shortlisted .work-badge.registered small { display: none; }
.work-card.is-shortlisted .work-badge.registered strong {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: .02em;
}
.work-photo:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

.work-copy {
  padding: 20px;
}
.work-copy .row {
  align-items: flex-start;
}
.work-copy h3 {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
  margin: 0 0 9px;
}
.work-timestamp {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 7px;
  border-radius: 2px;
  background: rgb(24 17 10 / 55%);
  color: #ffc181;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .035em;
  text-shadow: 0 1px 2px rgb(0 0 0 / 65%);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.work-score {
  font-family: Georgia, serif;
  font-size: 35px;
  line-height: 1;
}
.work-score small {
  font-family: Arial, sans-serif;
  font-size: 10px;
}
.work-meta {
  font-size: 11px;
  color: var(--muted);
}
.work-copy p {
  font-size: 13px;
  line-height: 1.7;
}
.card-bottom {
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.card-bottom button {
  background: none;
  border: 0;
  padding: 5px;
}
.card-reactions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0}
.work-rating-count{display:inline-flex;align-items:center;gap:5px;color:var(--muted)}
.work-rating-count>span:first-child{color:var(--accent)}
.card-rating-actions{margin-inline-start:auto}
.rating-access-dialog .rating-access-mark{display:flex;width:48px;height:48px;align-items:center;justify-content:center;color:var(--accent);background:var(--paper);border:1px solid var(--line);border-radius:50%;font-size:30px}
.rating-access-dialog h2{font-family:inherit;font-size:24px;line-height:1.4;margin:20px 0 12px}
.rating-access-dialog p{font-size:15px;line-height:1.8;overflow-wrap:anywhere}
.rating-access-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}
.rating-access-actions .primary{flex-basis:100%;justify-content:center;min-width:0;text-align:center}
.rating-access-actions :is(button,a){min-height:44px;white-space:normal}
.empty {
  padding: 75px 20px;
  text-align: center;
  border: 1px solid var(--line);
  color: var(--muted);
}
.empty h3 {
  color: var(--ink);
  font-weight: 500;
}
.promotion {
  max-width: 1232px;
  margin: 12px auto 0;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}
.promotion h2 {
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  margin: 10px 0;
}
.promotion p {
  max-width: 550px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.promotion .sponsor-logo {
  max-width: 140px;
  max-height: 65px;
  object-fit: contain;
}
.promotion .ad-image {
  display: block;
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  margin: auto;
}
.promotion.image-promotion {
  display: block;
}
footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 44px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
}
.text-button {
  border: 0;
  background: none;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: inherit;
  font-size: 12px;
}
.mobile-nav {
  display: none;
}
.back-link {
  font-size: 12px;
  display: inline-block;
  margin-bottom: 30px;
  color: var(--muted);
}
.camera-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 50px;
  align-items: start;
}
.camera-stage {
  position: relative;
  background: #191e1a;
  min-height: 0;
  aspect-ratio: 1/1;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-stage canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
}
.camera-stage canvas:active { cursor: grabbing; }
.camera-stage canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.camera-guide {
  position: absolute;
  inset: 12%;
  border: 1px solid #ffffff99;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 999px #0002;
}
.photo-file-help { font-size: 12px; color: var(--muted); margin: 10px 0; }
.photo-controls { padding-top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.photo-zoom, .photo-tools { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.photo-zoom input { flex: 1; min-width: 0; width: 100%; accent-color: var(--accent); }
.photo-zoom button { min-width: 44px; min-height: 44px; padding: 6px; }
.photo-zoom output { min-width: 42px; font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
.photo-tools button { flex: 1; padding: 10px; }
.photo-adjust-help { font-size: 13px; line-height: 1.7; }
.camera-wait {
  color: #ddd;
  padding: 30px;
  text-align: center;
  font-size: 13px;
  z-index: 1;
}
.camera-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}
.camera-actions button {
  flex: 1;
}
.camera-copy h1 {
  font-size: 43px;
}
.privacy-toggle {
  display: flex;
  gap: 14px;
  padding: 23px 0;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.privacy-toggle input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}
.privacy-toggle span {
  font-size: 14px;
  display: block;
}
.privacy-toggle small {
  color: var(--muted);
  font-size: 12px;
  display: block;
  margin-top: 6px;
}
.camera-copy .primary {
  width: 100%;
  margin-top: 24px;
}
.camera-copy #submit { gap: 16px; text-align: left; }
.capture-submit-label { min-width: 0; line-height: 1.6; }
.camera-copy #submit > span:last-child { flex: none; }
.capture-registration-note { color: #b53326; font-size: 14px; font-weight: 700; line-height: 1.65; margin: 14px 0 8px; }
.error {
  color: var(--accent);
  font-size: 13px;
}
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
}
.detail-photo {
  width: 100%;
  display: block;
  max-height: 700px;
  object-fit: contain;
  background: var(--paper);
}
.score-total {
  font-family: Georgia, serif;
  font-size: 100px;
  letter-spacing: -5px;
  line-height: 1.1;
  margin: 20px 0;
}
.score-total small {
  font-family: Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  margin-left: 12px;
  color: var(--muted);
}
.score-summary {
  font-size: 23px;
  line-height: 1.6;
  margin-bottom: 25px;
}
.score-line {
  padding: 19px 0;
  border-top: 1px solid var(--line);
}
.score-line h3 {
  font-weight: 500;
  margin: 0;
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}
.score-line p {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0;
}
.score-line .bar {
  height: 3px;
  background: var(--line);
  margin-top: 12px;
}
.score-line .bar span {
  display: block;
  height: 3px;
  background: var(--accent);
}
.share-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0;
}
.share-actions .primary {
  flex: 1;
  white-space: nowrap;
  font-size: 13px;
  justify-content: center;
  gap: 10px;
}
.processing {
  padding: 60px 0;
}
.spinner {
  width: 30px;
  height: 30px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.processing h2 {
  font-family: Georgia, serif;
  font-size: 39px;
  font-weight: 400;
}
.point-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  margin: 30px 0;
}
.point-summary > div {
  padding: 28px;
  border-right: 1px solid var(--line);
}
.point-summary > div:last-child {
  border: 0;
}
.point-summary strong {
  font-family: Georgia, serif;
  font-size: 48px;
  display: block;
  margin: 14px 0;
}
.point-summary small {
  font-size: 12px;
  color: var(--muted);
}
.leader-list {
  border-top: 1px solid var(--line);
}
.leader {
  display: grid;
  grid-template-columns: 65px 1fr auto;
  gap: 20px;
  padding: 25px 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.leader .rank {
  font-family: Georgia, serif;
  font-size: 28px;
  color: var(--muted);
}
.leader.top .rank {
  color: var(--accent);
}
.leader strong {
  font-size: 16px;
  font-weight: 500;
}
.leader .points {
  font-family: Georgia, serif;
  font-size: 30px;
}
.leader small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.load-more {
  display: block;
  margin: 25px auto;
}
.profile-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.profile-form label {
  display: block;
  font-size: 12px;
}
.profile-form input {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  margin-top: 8px;
}
.redemption {
  border: 1px solid var(--line);
  padding: 24px;
  margin: 25px 0 42px;
}
.redemption p {
  font-size: 13px;
}
.tag {
  font-size: 10px;
  letter-spacing: 1px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  display: inline-block;
}
.loading {
  padding: 40px;
  color: var(--muted);
}
dialog {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 38px;
  width: min(480px, calc(100% - 30px));
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #121b17aa;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 29px;
}
dialog p {
  font-size: 13px;
  color: var(--muted);
}
.dialog-close {
  float: right;
  background: none;
  border: 0;
  font-size: 28px;
  margin: -24px -20px 0 0;
}
.dialog-close:focus-visible {
  outline-offset: 0;
}
dialog form {
  display: grid;
  gap: 12px;
}
dialog label {
  font-size: 12px;
}
dialog input {
  padding: 15px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 16px;
  min-width: 0;
  width: 100%;
  color: var(--ink);
}
dialog .primary {
  justify-content: center;
}
#album-image {
  width: 100%;
  display: block;
  -webkit-touch-callout: default;
  user-select: auto;
}
#album .primary {
  width: 100%;
  margin-top: 20px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 16px 24px;
  font-size: 13px;
  z-index: 50;
  max-width: 90%;
  box-shadow: 0 4px 20px #0002;
}
#login-error {
  color: var(--accent);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
.challenge-focus {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.8;
  margin-top: 15px;
  color: var(--accent);
}
.section-heading h1,
.leader strong,
.work-meta {
  overflow-wrap: anywhere;
}
.leader > div,
.work-copy .row > div {
  min-width: 0;
}
.work-score {
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .site-header {
    padding: 0 25px;
  }
  .desktop-nav {
    gap: 20px;
  }
  main {
    padding: 38px 25px;
  }
  .hero {
    gap: 32px;
  }
  .promotion {
    margin: 0 25px;
  }
  .detail-layout {
    gap: 28px;
  }
  .camera-layout {
    gap: 28px;
  }
  .criteria-strip > div {
    padding: 20px 12px;
  }
  .criteria-strip strong {
    font-size: 14px;
  }
  footer {
    padding: 30px 25px;
  }
}
@media (max-width: 600px) {
  .site-header {
    height: 85px;
    padding: 0 22px;
    border-bottom: 0;
  }
  .brand {
    gap: 14px;
  }
  .brand #brand-mark {
    font-size: 45px;
    letter-spacing: -4px;
  }
  .brand-caption {
    font-size: 8px;
    padding-left: 14px;
    letter-spacing: 1.5px;
  }
  .brand img {
    width: 75px;
  }
  .desktop-nav {
    display: none;
  }
  .account-button {
    font-size: 11px;
    padding: 10px 13px;
  }
  .local-notice {
    font-size: 10px;
  }
  main {
    padding: 32px 22px 38px;
  }
  .hero {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: stretch;
  }
  .hero h1 {
    font-size: 44px;
    letter-spacing: -2px;
    margin: 18px 0;
  }
  .intro {
    font-size: 13px;
    line-height: 1.85;
    margin: 0;
  }
  .round-card {
    margin-top: 23px;
    padding-top: 19px;
  }
  .pattern-name {
    font-size: 32px;
  }
  .pattern-name span {
    display: inline;
    font-size: 12px;
    letter-spacing: 1px;
    margin-left: 13px;
  }
  .hero-art {
    order: 2;
  }
  .hero-art > img {
    aspect-ratio: 1.25;
    object-fit: cover;
  }
  .art-label {
    left: 18px;
    right: 18px;
    top: 18px;
    font-size: 8px;
  }
  .art-tag {
    bottom: -10px;
    right: 15px;
    font-size: 8px;
    padding: 12px 14px;
  }
  .criteria-strip {
    grid-template-columns: 1fr 1fr;
    margin-top: 39px;
  }
  .criteria-strip > div {
    padding: 18px 12px !important;
  }
  .criteria-strip > div:nth-child(2) {
    border-right: 0;
  }
  .criteria-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .criteria-strip small {
    font-size: 8px;
  }
  .criteria-strip strong {
    font-size: 13px;
    margin-top: 10px;
  }
  .section-heading h1 {
    font-size: 37px;
    letter-spacing: -1.7px;
  }
  .section-top {
    align-items: flex-end;
  }
  .sort {
    max-width: 110px;
    font-size: 12px;
  }
  .filterbar {
    flex-wrap: nowrap;
    overflow: auto;
    margin-right: -22px;
    padding-right: 22px;
    padding-bottom: 8px;
  }
  .chip {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .work-copy {
    padding: 20px;
  }
  .work-photo > img {
    max-height: 450px;
    object-fit: contain;
    background: var(--paper);
  }
  .promotion {
    padding: 28px 0;
    margin: 0 22px;
    gap: 15px;
    flex-wrap: wrap;
  }
  .promotion h2 {
    font-size: 30px;
  }
  .promotion p {
    font-size: 12px;
  }
  .promotion .eyebrow {
    font-size: 9px;
  }
  .promotion .text-button {
    font-size: 12px;
  }
  footer {
    padding: 25px 22px calc(28px + env(safe-area-inset-bottom));
    gap: 10px;
    letter-spacing: 1px;
    font-size: 8px;
  }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 22px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 4px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--muted);
  }
  .mobile-nav a[aria-current] {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }
  .camera-layout,
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .camera-copy h1 {
    font-size: 35px;
  }
  .camera-stage {
    min-height: 0;
  }
  .camera-copy > h1 {
    margin-top: 10px;
  }
  .camera-copy .primary {
    margin-top: 20px;
  }
  .score-total {
    font-size: 90px;
  }
  .detail-photo {
    max-height: 410px;
  }
  .detail-layout h1 {
    font-size: 34px;
  }
  .share-actions {
    gap: 8px;
  }
  .share-actions .primary {
    padding: 14px 12px;
    font-size: 12px;
  }
  .point-summary {
    margin: 25px 0;
  }
  .point-summary > div {
    padding: 20px 12px;
  }
  .point-summary strong {
    font-size: 37px;
  }
  .point-summary small {
    font-size: 10px;
  }
  .leader {
    grid-template-columns: 38px 1fr auto;
    gap: 12px;
    padding: 23px 4px;
  }
  .leader strong {
    font-size: 14px;
  }
  .leader .points {
    font-size: 27px;
  }
  .profile-form input {
    font-size: 16px;
    max-width: 210px;
  }
  .profile-form .primary {
    min-height: 47px;
    padding: 12px 17px;
    font-size: 13px;
  }
  .redemption {
    padding: 20px;
  }
  #toast {
    bottom: calc(22px + env(safe-area-inset-bottom));
    font-size: 12px;
    width: max-content;
    max-width: 88%;
  }
  dialog {
    padding: 30px 23px;
  }
  .dialog-close {
    margin: -18px -10px 0 0;
  }
  .back-link {
    margin-bottom: 22px;
  }
  .empty {
    padding: 55px 20px;
  }
}
:root { --event-line: color-mix(in srgb,var(--ink) 18%,transparent); }
.event-clock .clock-caption { margin:18px 0 12px; }
.event-clock-value { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding-bottom:24px;font-variant-numeric:tabular-nums; }
.event-clock-value>span {display:flex;align-items:baseline;gap:5px;}
.event-clock-value b {font-size:clamp(30px,4vw,52px);font-weight:650;line-height:1.15;letter-spacing:-1px;}
.event-clock-value small {font-size:12px;opacity:.65;}
.event-clock .clock-heading {align-items:flex-start;gap:16px;}
.event-clock .clock-heading>span:last-child {font-size:10px;text-align:right;max-width:65%;}
.registration-layout {display:grid;grid-template-columns:minmax(220px,.75fr) minmax(0,1.25fr);gap:64px;max-width:1080px;margin:30px auto 70px;align-items:start;}
.registration-work {background:var(--paper);padding:24px;border:1px solid var(--event-line);}
.registration-work>img {width:100%;aspect-ratio:1;object-fit:contain;}
.registration-layout h1 {font-size:clamp(28px,3vw,42px);line-height:1.25;margin:20px 0 30px;}
.registration-form fieldset {border:0;margin:0 0 24px;padding:0;}
.registration-form legend {font-weight:650;margin-bottom:12px;}
.registration-form legend small {font-size:12px;font-weight:400;margin-left:10px;}
.product-option {display:flex;align-items:center;gap:12px;padding:19px 16px;background:var(--paper);border:1px solid var(--event-line);margin:10px 0;cursor:pointer;}
.product-option:has(input:checked) {border-color:var(--accent);box-shadow:inset 3px 0 var(--accent);}
.product-option input {width:19px;height:19px;flex-shrink:0;accent-color:var(--accent);}
.product-option span {flex:1;}.product-option strong {white-space:nowrap;}
.registration-fields {display:grid;grid-template-columns:1fr 1fr;gap:18px;}.registration-fields .full{grid-column:1/-1;}
.registration-fields label {display:flex;flex-direction:column;gap:8px;font-size:14px;}
.registration-fields input {width:100%;min-width:0;border:1px solid var(--event-line);background:var(--paper);padding:14px;color:var(--ink);font:inherit;}
.registration-fields input[readonly] {opacity:.7;}.registration-fields small{opacity:.65;}
.registration-total {display:flex;justify-content:space-between;align-items:center;border-block:1px solid var(--event-line);padding:22px 0;margin:24px 0;gap:16px;}.registration-total strong {font-size:32px;}
.registration-banner {display:flex;gap:20px;align-items:center;background:var(--ink);color:var(--bg);padding:22px;text-decoration:none;position:relative;overflow:hidden;margin-top:20px;border-radius:3px;}
.registration-banner>img{max-width:100%;width:100%;display:block;}.registration-banner:has(img){flex-wrap:wrap;padding:0 0 22px;}.registration-banner:has(img)>span{padding-left:22px;}.registration-banner:has(img)>b{padding-right:22px;}
.registration-banner>span {flex:1;display:grid;gap:9px;}.registration-banner small{font-size:10px;letter-spacing:1px;}.registration-banner strong{font-size:24px;}.registration-banner em{font-size:12px;font-style:normal;opacity:.7;}.registration-banner>b{font-size:28px;}
.registration-success,.registration-status{max-width:680px;margin:30px auto 80px;}.registration-success{text-align:center;}.registration-success h1,.registration-status h1{font-size:clamp(27px,4vw,44px);line-height:1.3;margin:22px 0;overflow-wrap:anywhere;}
.success-mark{display:grid;place-items:center;background:var(--ink);color:var(--bg);font-size:30px;width:64px;height:64px;border-radius:50%;margin:0 auto 22px;}.success-message{white-space:pre-line;line-height:1.8;}
.creation-card {display:block;border:1px solid var(--event-line);background:var(--paper);text-align:left;text-decoration:none;margin:30px 0;}.creation-card img{display:block;width:100%;height:auto;}.creation-card>span{display:flex;justify-content:space-between;padding:22px;font-weight:650;}.order-reference{font-size:12px;overflow-wrap:anywhere;opacity:.65;}.registration-actions{display:flex;flex-wrap:wrap;gap:12px;}
@media(min-width:800px){.criteria-strip{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:0!important;}.criteria-strip>div{border:0!important;padding:20px!important;}}
@media(max-width:799px){.registration-layout{grid-template-columns:1fr;gap:24px;}.registration-work{display:grid;grid-template-columns:96px 1fr;gap:0 18px;padding:16px;}.registration-work>img{grid-row:1/4;}.registration-work h2{font-size:18px;margin:0;}.registration-work p{margin:4px 0;font-size:12px;}.registration-fields{grid-template-columns:1fr;}.event-clock-value{gap:6px;}.event-clock-value b{font-size:clamp(27px,8vw,46px);}}

.registration-form .capture-cta{width:100%}

/* Reading progress can recover without replacing the task or poster. */
.connection-status{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;margin:20px auto;max-width:1160px;border:1px solid currentColor;border-radius:16px;background:var(--paper);color:var(--ink)}
.connection-status[hidden]{display:none}.connection-status p{margin:0;line-height:1.7}.connection-status button{flex-shrink:0}
@media(max-width:600px){.connection-status{margin:16px;align-items:flex-start;flex-direction:column;padding:16px}.connection-status button{min-height:44px}}

.registration-fields textarea{width:100%;min-height:100px;resize:vertical;border:1px solid var(--line,#d4d3cb);padding:12px;background:white;color:inherit;font:inherit;box-sizing:border-box}.order-shipping{text-align:left;border:1px solid var(--line,#d4d3cb);padding:16px;margin:20px 0;overflow-wrap:anywhere}.shipping-address{white-space:pre-wrap}.filterbar{flex-wrap:wrap}

/* Barista identity: fixed avatars do not affect the responsive artwork grid. */
.barista-link {display:inline-flex;align-items:center;gap:9px;max-width:100%;min-width:0;color:var(--muted);font-size:12px;text-decoration:none;vertical-align:middle;}
.barista-link:hover {color:var(--accent);}
.barista-link span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.barista-avatar {display:block;width:32px;height:32px;flex:0 0 32px;border-radius:50%;object-fit:cover;background:#efe7d9;}
.barista-link:focus-visible {outline:2px solid var(--accent);outline-offset:5px;border-radius:4px;}
.detail-author {display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:16px 0;}
.detail-author .barista-link {font-size:14px;}
.detail-author .muted {font-size:12px;}
.barista-header {display:grid;grid-template-columns:128px minmax(0,1fr) auto;align-items:center;column-gap:30px;padding:38px 0 40px;border-bottom:1px solid var(--line);margin-bottom:30px;}
.barista-header>.barista-portrait {grid-column:1;grid-row:1/3;}
.barista-portrait {display:block;flex-shrink:0;width:128px;height:128px;border-radius:50%;object-fit:cover;background:#efe7d9;box-shadow:0 0 0 6px var(--paper),0 0 0 7px var(--line);}
.barista-intro {grid-column:2;grid-row:1;min-width:0;}
.barista-intro h1 {font-size:clamp(28px,3vw,44px);line-height:1.2;margin:10px 0 12px;overflow-wrap:anywhere;}
.barista-location {display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px;margin:10px 0;overflow-wrap:anywhere;}
.barista-location svg {flex-shrink:0;}
.barista-bio {grid-column:2;grid-row:2;min-width:0;font-size:15px;line-height:1.85;margin:12px 0 0;max-width:680px;white-space:pre-wrap;overflow-wrap:anywhere;}
.barista-header-actions {grid-column:3;grid-row:1/3;display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end;}
.barista-work-count {font-size:12px;color:var(--muted);white-space:nowrap;}
.barista-work-count strong {display:block;font-family:Georgia,serif;font-size:40px;line-height:1.2;color:var(--ink);font-weight:400;}
.barista-works-heading {margin-top:30px;}
.profile-editor {border:1px solid var(--line);margin:0 0 36px;background:rgba(255,255,255,.35);}
.profile-editor summary {display:flex;justify-content:space-between;cursor:pointer;padding:18px 22px;font-weight:600;font-size:14px;list-style:none;}
.profile-editor summary::-webkit-details-marker {display:none;}
.profile-editor[open] summary {border-bottom:1px solid var(--line);}
.profile-editor[open] summary span {transform:rotate(45deg);}
.barista-form {padding:24px;}
.barista-form fieldset {border:0;padding:0;margin:0;min-width:0;}
.avatar-editor {display:flex;align-items:center;gap:24px;margin:0 0 24px;}
.avatar-editor .barista-portrait {width:96px;height:96px;}
.avatar-upload {position:relative;display:inline-block;cursor:pointer;overflow:hidden;}
.avatar-upload input {position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;}
.avatar-upload:focus-within {outline:2px solid var(--accent);outline-offset:3px;}
.profile-fields {display:grid;grid-template-columns:1fr 1fr;gap:20px;}
.profile-fields label {display:block;font-size:13px;font-weight:600;min-width:0;}
.profile-fields small {font-size:11px;font-weight:400;color:var(--muted);margin-left:4px;}
.profile-bio-field {grid-column:1/-1;}
.profile-fields input,.profile-fields textarea {display:block;width:100%;min-width:0;margin-top:8px;padding:12px 14px;font:inherit;font-weight:400;color:var(--ink);border:1px solid var(--line);background:var(--paper);border-radius:2px;}
.profile-fields textarea {resize:vertical;min-height:104px;line-height:1.7;}
.field-hint {font-size:12px;line-height:1.6;color:var(--muted);margin:12px 0;}
.profile-error {color:#a23727;font-size:13px;}
.profile-error:empty {display:none;}
.profile-form-actions {display:flex;align-items:center;gap:16px;flex-wrap:wrap;}
.profile-form-actions [role=status] {font-size:12px;color:var(--muted);}
@media(max-width:640px) {
  .barista-header {grid-template-columns:88px minmax(0,1fr);gap:20px;padding:24px 0 28px;margin-bottom:24px;}
  .barista-header>.barista-portrait {width:88px;height:88px;grid-row:1;}
  .barista-intro .eyebrow {font-size:9px;letter-spacing:1.5px;}
  .barista-intro h1 {font-size:26px;}
  .barista-bio {grid-column:1/-1;font-size:14px;margin:0;}
  .barista-header-actions {grid-column:1/-1;grid-row:3;justify-content:flex-start;}
  .barista-work-count strong {display:inline;font-size:26px;margin-right:8px;}
  .barista-form {padding:18px;}
  .profile-fields {grid-template-columns:1fr;gap:16px;}
  .profile-fields input,.profile-fields textarea {font-size:16px;}
  .avatar-editor {gap:18px;align-items:flex-start;}
  .avatar-editor .barista-portrait {width:72px;height:72px;}
  .avatar-editor .text-button {display:block;margin:10px 0 0;padding:0;}
}

.work-competition{display:grid;gap:5px;margin:12px 0 0;color:var(--muted);font-size:11px;line-height:1.5;overflow-wrap:anywhere}.work-copy .work-competition{border-left:2px solid #d4c8b4;padding-left:8px}.detail-layout .work-competition{font-size:13px;margin:16px 0}

.language-switcher{display:flex;justify-content:flex-end;gap:4px;flex-wrap:wrap;padding:12px clamp(20px,5vw,80px) 0;font-family:Arial,sans-serif}
.language-switcher button{border:0;background:transparent;color:var(--ink);font-size:12px;line-height:1.4;min-height:36px;padding:6px 10px;cursor:pointer;border-bottom:2px solid transparent}
.language-switcher button[aria-pressed=true]{color:var(--accent);border-bottom-color:currentColor;font-weight:700}
.language-switcher button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.work-badge-wordmark strong{white-space:normal;line-height:1.2}
html[lang=th] .work-badge-wordmark strong,html[lang=ko] .work-badge-wordmark strong{letter-spacing:0}
@media(max-width:600px){.language-switcher{justify-content:center;padding:8px 12px 0}.language-switcher button{min-height:40px}.mobile-nav a{font-size:12px;padding-inline:6px}.work-badge-wordmark strong{font-size:14px}}

/* Community scoring: an editorial summary, separate from the original AI sheet. */
.card-rating-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.card-bottom{gap:12px}.rate-work-button{background:var(--accent);color:#fff!important;padding:9px 12px;border-radius:3px;font-size:.8rem;font-weight:700;text-decoration:none}.rate-work-button:hover{filter:brightness(.9)}.work-rating-meta{font-size:.75rem;color:var(--muted);margin:5px 0 12px}.community-section{min-width:0}.community-total{display:flex;gap:24px;align-items:flex-end;flex-wrap:wrap;padding-bottom:16px;border-bottom:1px solid var(--line)}.community-total strong{display:block;font-family:Georgia,serif;font-size:4rem;line-height:1.15}.community-total strong small{font:400 .9rem system-ui;margin-left:8px}.community-breakdown b{margin-inline-start:5px}.community-breakdown{display:grid;gap:9px;padding-bottom:7px;font-size:.9rem}.community-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:26px}.community-heading h2{font-size:1.35rem}.community-form{background:color-mix(in srgb,var(--paper) 88%,var(--accent) 3%);border:1px solid var(--line);padding:20px;margin:16px 0 26px}.community-form fieldset{border:0;padding:0;min-width:0}.community-form legend{font-weight:700;margin-bottom:16px}.rating-score-input{display:grid;grid-template-columns:minmax(0,1fr) 86px;gap:18px;align-items:end}.rating-score-input label,.rating-comment-label{display:grid;gap:8px;font-size:.85rem}.rating-score-input input[type=range]{accent-color:var(--accent);width:100%;height:44px;padding:0;cursor:pointer;min-width:0}.rating-score-input input[type=number]{width:100%;font-size:1.3rem;font-weight:700;text-align:center;padding:8px}.rating-comment-label textarea{width:100%;resize:vertical;margin-top:5px}.rating-restriction,.rating-gate{padding:14px;background:var(--paper);border-left:3px solid var(--accent);font-size:.85rem;line-height:1.7}.rating-gate button,.rating-gate a{margin:8px}.community-review{padding:20px 0;border-top:1px solid var(--line)}.community-review-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.community-review-head>strong{font:1.6rem Georgia,serif;white-space:nowrap}.community-review-head small{font:.7rem system-ui;margin-left:4px}.community-review time{display:block;font-size:.72rem;color:var(--muted);margin-top:8px}.community-comment{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}.community-empty{font-size:.9rem;color:var(--muted);padding:12px 0}.ai-score-section{border-top:1px solid var(--line);margin-top:40px;padding-top:30px}.community-form .field-hint{line-height:1.7}.community-form :disabled{opacity:.65}.detail-scores{min-width:0}@media(max-width:600px){.community-form{padding:16px}.community-heading{align-items:flex-start}.community-heading .chip{font-size:.75rem;padding:10px}.card-rating-actions{gap:8px}.rate-work-button{padding:9px 10px}.community-total strong{font-size:3.5rem}}
.professional-judge-badge{display:inline-flex;align-items:center;margin-top:10px;border:1px solid #b59a58;background:#fbf5e5;color:#6b5019;border-radius:4px;padding:5px 9px;font-size:.75rem;font-weight:700;line-height:1.5;max-width:100%}.professional-judge-notice{color:#6b5019;border-left:3px solid #b59a58;padding:8px 12px;margin:0 0 16px;font-size:.85rem;line-height:1.6}

/* Private issue report: keep controls usable on narrow screens. */
.feedback-dialog{width:min(620px,calc(100vw - 24px));max-height:90dvh;overflow:auto;box-sizing:border-box}
.feedback-dialog fieldset{border:0;padding:0;margin:0;min-width:0;display:grid;gap:16px}
.feedback-dialog label{display:grid;gap:6px;min-width:0}
.feedback-dialog input,.feedback-dialog select,.feedback-dialog textarea{width:100%;min-width:0;box-sizing:border-box;font:inherit;padding:12px;border:1px solid #bfb7aa;border-radius:8px;background:#fff;color:#24211d}
.feedback-dialog textarea{resize:vertical}.feedback-dialog p{font-size:14px;line-height:1.6}
.feedback-previews{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.feedback-previews figure{margin:0;min-width:0}.feedback-previews img{width:100%;height:100px;object-fit:contain;background:#e9e4db}
.feedback-previews button{font:inherit;min-height:44px;width:100%;overflow-wrap:anywhere}
.feedback-status{overflow-wrap:anywhere}.feedback-dialog [hidden]{display:none!important}

/* Motion layer: gentle entrances, state transitions and loading feedback only.
   Content, layout and colours are unchanged; every effect is short, interruptible
   and removed under prefers-reduced-motion. Inline style attributes are blocked by
   CSP, so JS only sets custom properties/classes or uses the Web Animations API. */
:root {
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --motion-fast: .18s;
  --motion-base: .32s;
  --motion-slow: .5s;
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.7); } 60% { transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes guide-in { from { opacity: 0; transform: scale(.94); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes busy-breathe { 0%, 100% { opacity: .6; } 50% { opacity: .85; } }
@keyframes loading-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { transform: translateX(-50%); } }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateY(-3px); } 60% { transform: translateY(1px); } }
@keyframes anchor-glow {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  30% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 38%, transparent); }
  100% { box-shadow: 0 0 0 9px transparent; }
}
@keyframes new-work { from { background-color: color-mix(in srgb, var(--accent) 9%, var(--paper)); } }

/* Interactive states ease instead of snapping. */
button, a, input, select, textarea, .chip, .primary, .product-option {
  transition-property: background-color, border-color, color, opacity, box-shadow, filter, transform;
  transition-duration: var(--motion-fast);
  transition-timing-function: ease;
}
.primary:active, .chip:active, .account-button:active, .rate-work-button:active, .gallery-update-button:active, .text-button:active { transform: translateY(1px); }
.chip:hover:not(:disabled):not(.active) { border-color: var(--ink); }
.account-button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.text-button:hover, .dialog-close:hover { color: var(--accent); }
.language-switcher button { transition: color var(--motion-fast) ease, border-color var(--motion-fast) ease; }
.mobile-nav a { transition: color .25s ease, border-color .25s ease; }
.barista-link { transition: color var(--motion-fast) ease; }
.rate-work-button { transition: filter var(--motion-fast) ease, transform var(--motion-fast) ease; }
.capture-cta { transition: filter .25s ease, box-shadow .25s ease, transform var(--motion-fast) ease; }
.profile-editor summary span { transition: transform .25s var(--ease-out); }
.profile-editor[open] .barista-form { animation: rise-in var(--motion-base) var(--ease-out); }

/* Live indicators breathe slowly; the countdown rail and urgent state glide. */
.live:before, .clock-live:before { animation: pulse-dot 2.4s ease-in-out infinite; }
.clock-rail > span { transition: width 1s linear; }
.round-clock { transition: background-color var(--motion-slow) ease, color var(--motion-slow) ease; }

/* Loading placeholders appear only after a short delay, then pulse softly. */
.loading { animation: fade-in .3s ease .15s both, loading-pulse 1.6s ease-in-out .45s infinite; }
.is-busy { animation: busy-breathe 1.8s ease-in-out infinite; }
.processing { animation: fade-in .35s ease; }
.empty { animation: fade-in .35s ease; }
#score-translation-status:not([hidden]) { animation: fade-in .3s ease; }

/* Photos that arrive after the layout painted fade in instead of popping. */
main img.is-pending { opacity: 0; }
main img.is-loaded { animation: fade-in var(--motion-slow) ease; }
.hero-art > .artwork-leaving { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; }

/* Work cards rise in with a short stagger; restored views settle instantly. */
.gallery > .work-card { animation: rise-in .45s var(--ease-out) var(--enter-delay, 0ms) both; transition-duration: .25s; }
.gallery > .work-card.is-new { animation: rise-in .45s var(--ease-out) var(--enter-delay, 0ms) both, new-work 2.4s ease-out calc(var(--enter-delay, 0ms) + .3s) both; }
.gallery > .work-card.is-settled { animation: none; }
.gallery > .work-card.is-anchored { animation: anchor-glow 1.8s ease-out; }
@media (hover: hover) and (pointer: fine) {
  .work-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgb(36 43 38 / 8%); }
}

/* New-work reminder: count pops in, the button colours ease and nudges once. */
.gallery-update-button { transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, opacity var(--motion-fast) ease, transform var(--motion-fast) ease; }
.gallery-update-button.has-updates { animation: nudge .6s var(--ease-out) .15s; }
.gallery-update-count:not([hidden]) { animation: pop-in .35s var(--ease-out); }
.gallery-return-button:not([hidden]), .load-more:not([hidden]) { animation: fade-in .3s ease; }

/* Upload page: the composition stage and tools ease in once a photo is chosen. */
.camera-stage canvas:not([hidden]) { animation: fade-in .4s ease; }
.camera-guide:not([hidden]) { animation: guide-in var(--motion-slow) var(--ease-out); }
.photo-controls:not([hidden]) { animation: rise-in .35s var(--ease-out); }

/* Registration confirmation and issue-report previews. */
.success-mark { animation: pop-in var(--motion-slow) var(--ease-out) .1s both; }
.creation-card { animation: rise-in .45s var(--ease-out) .15s both; }
.feedback-previews figure { animation: fade-in .25s ease; }

/* Dialogs fade and settle in both directions through discrete display transitions
   (@starting-style); browsers without that support open and close instantly. A
   keyframe on dialog[open] would cancel the closing transition, so none is used. */
dialog { opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .22s ease, transform .22s var(--ease-out), overlay .22s ease allow-discrete, display .22s ease allow-discrete; }
dialog[open] { opacity: 1; transform: none; }
@starting-style { dialog[open] { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog::backdrop { opacity: 0; transition: opacity .22s ease, overlay .22s ease allow-discrete, display .22s ease allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog[open]::backdrop { opacity: 0; } }
dialog form:not([hidden]) { animation: fade-in .25s ease; }
#toast:not([hidden]) { animation: toast-in .3s var(--ease-out); }
.connection-status:not([hidden]) { animation: rise-in .35s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; transition-delay: 0ms !important; }
}
