:root {
  color-scheme: light;
  --ink: #18313a;
  --muted: #5e6e72;
  --paper: #f7f6f0;
  --surface: #ffffff;
  --line: #e5e9e4;
  --teal: #176b67;
  --teal-deep: #105652;
  --gold: #d1a369;
  --shadow: 0 12px 36px rgba(27, 48, 51, .055);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif; line-height: 1.6; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #e7b866; outline-offset: 3px; }
.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; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .55rem .8rem; background: #fff; color: var(--ink); border-radius: .6rem; }
.skip-link:focus { top: 1rem; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

.hero { position: relative; overflow: hidden; min-height: 338px; color: #f7f8f3; background: radial-gradient(circle at 80% 15%, #28575c 0, transparent 38%), linear-gradient(115deg, #18333c 0%, #163c42 65%, #27514f 100%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2; background-image: linear-gradient(90deg, transparent 49%, rgba(255,255,255,.12) 50%, transparent 51%), linear-gradient(transparent 49%, rgba(255,255,255,.12) 50%, transparent 51%); background-size: 66px 66px; mask-image: linear-gradient(90deg, transparent 20%, #000 100%); }
.hero__content { position: relative; z-index: 1; padding-block: 54px 74px; }
.hero__shape { position: absolute; border: 1px solid rgba(211, 191, 150, .38); border-radius: 50%; pointer-events: none; }
.hero__shape--one { width: 520px; height: 520px; top: -248px; right: -64px; box-shadow: 0 0 0 48px rgba(255,255,255,.025), 0 0 0 105px rgba(255,255,255,.025); }
.hero__shape--two { width: 130px; height: 130px; right: 19%; bottom: -64px; border-color: rgba(211, 191, 150, .23); }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; letter-spacing: .22em; font-size: .78rem; font-weight: 700; color: #f5d9ab; }
.eyebrow__dot { width: 7px; height: 7px; background: #e7b66f; border-radius: 50%; box-shadow: 0 0 0 5px rgba(231,182,111,.15); }
.hero h1 { max-width: 690px; margin: 26px 0 12px; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.2; letter-spacing: -.04em; font-weight: 740; }
.hero h1 em { font-family: Georgia, serif; font-weight: 400; color: #e7bb80; letter-spacing: -.02em; }
.mascot-page .hero h1 em { white-space: nowrap; }
.hero p { max-width: 580px; margin: 0; color: #d6e1dc; font-size: clamp(.95rem, 1.9vw, 1.1rem); }
.hero__meta { display: flex; align-items: center; gap: 19px; margin-top: 32px; color: #d7e4df; font-size: .9rem; }
.hero__meta strong { color: #fff; font-size: 1.18rem; font-weight: 750; }
.hero__meta-divider { width: 1px; height: 16px; background: rgba(255,255,255,.35); }
.hero p.hero__other-vote { margin-top: 18px; font-size: .9rem; }
.hero__other-vote a { color: #f5d9ab; text-decoration: none; border-bottom: 1px solid rgba(245,217,171,.55); }
.hero__other-vote a:hover { border-bottom-color: #f5d9ab; }

.main-content { position: relative; margin-top: -36px; padding-bottom: 84px; }
.entry-panel { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(300px, .92fr); gap: 32px; align-items: center; padding: 28px 34px; background: #fff; border: 1px solid rgba(224, 232, 224, .9); border-radius: 20px; box-shadow: 0 19px 52px rgba(15,44,48,.11); }
.section-kicker { display: inline-block; color: var(--teal); font-size: .78rem; font-weight: 800; letter-spacing: .17em; }
.entry-panel h2, .works-heading h2 { margin: 5px 0 6px; font-size: clamp(1.32rem, 2.5vw, 1.8rem); line-height: 1.35; letter-spacing: -.02em; }
.entry-panel p, .works-heading p { margin: 0; color: var(--muted); font-size: .9rem; }
.identity-form label { display: block; margin-bottom: 7px; font-size: .87rem; font-weight: 700; }
.identity-form__row { display: flex; gap: 9px; }
.identity-form input { min-width: 0; flex: 1; height: 45px; padding: 0 14px; border: 1px solid #d6ded9; border-radius: 9px; background: #fbfcfa; color: var(--ink); outline: 0; }
.identity-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(23,107,103,.12); }
.identity-form input[aria-invalid="true"] { border-color: #c64d43; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 45px; padding: 0 18px; border: 1px solid transparent; border-radius: 9px; font-size: .9rem; font-weight: 750; transition: background-color .2s, border-color .2s, transform .2s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button--primary { background: var(--teal); color: #fff; }
.button--primary:hover:not(:disabled) { background: var(--teal-deep); }
.button--primary:disabled { background: #a6b6b2; color: #f4f7f5; }
.button--subtle { background: #f1f4f1; color: var(--ink); }
.button--subtle:hover:not(:disabled) { background: #e9eeea; }
.identity-form .form-hint { margin-top: 7px; color: #788581; font-size: .74rem; }
.identity-form .form-error { margin-top: 8px; color: #b03c35; font-size: .82rem; }
.preview-panel { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 16px; border: 1px solid #e9dfca; border-radius: 13px; background: #fbf7ec; }
.preview-panel__icon { display: grid; flex: none; place-items: center; width: 43px; height: 43px; border-radius: 50%; background: #f2e5ca; color: #9b6a31; font-size: 1.9rem; line-height: 1; }
.preview-panel strong { display: block; margin-bottom: 2px; color: #6d542e; font-size: .91rem; }
.entry-panel .preview-panel p { color: #756a58; font-size: .8rem; line-height: 1.45; }
.session-panel { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px; border-radius: 13px; background: #eff7f3; border: 1px solid #dbece3; }
.session-panel__avatar { display: grid; flex: none; place-items: center; width: 43px; height: 43px; background: #d1eadb; border-radius: 50%; color: var(--teal); font-weight: 800; }
.session-panel__text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.4; }
.session-panel__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .91rem; }
.session-panel__text span { margin-top: 2px; color: var(--muted); font-size: .8rem; }
.session-panel__badge { flex: none; padding: 5px 10px; border-radius: 99px; background: #fff; color: var(--teal-deep); font-size: .76rem; font-weight: 800; }

.works-section { padding-top: 64px; scroll-margin-top: 20px; }
.works-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.works-heading h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.works-heading p { margin-top: 5px; }
.view-badge { display: inline-flex; flex: none; align-items: center; gap: 7px; padding: 7px 11px; background: #e9efe9; border: 1px solid #dae7dc; border-radius: 99px; color: #42655e; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.view-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #45a98c; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 25px 0 18px; }
.search-field { display: flex; align-items: center; gap: 10px; width: min(100%, 330px); padding: 0 12px; border: 1px solid #dfe6df; background: #fff; border-radius: 9px; }
.search-field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(23,107,103,.1); }
.search-field svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #71837e; stroke-width: 2; stroke-linecap: round; }
.search-field input { width: 100%; height: 42px; border: 0; outline: none; color: var(--ink); background: transparent; font-size: .85rem; }
.sort-field { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .83rem; white-space: nowrap; }
.sort-field select { height: 42px; padding: 0 31px 0 11px; border: 1px solid #dfe6df; border-radius: 9px; background: #fff; color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.gallery--masonry { display: block; position: relative; }
.gallery--masonry .work-card { position: absolute; }
.work-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.work-card__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 20px 15px; }
.work-card__title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.work-card__number { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #eaf2ed; color: var(--teal); font-size: .87rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.work-card h3 { min-width: 0; overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; font-weight: 750; }
.rank-badge { flex: none; padding: 5px 9px; border-radius: 99px; background: #f5f2e9; color: #947143; font-size: .73rem; font-weight: 800; }
.rank-badge--top { background: #fcf1dc; color: #a46d20; }
.work-card__images { display: grid; gap: 10px; padding: 0 20px 12px; }
.work-card__images--multiple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-card__images--three .work-card__figure:first-child { grid-column: 1 / -1; }
.work-card__images--odd .work-card__figure:last-child { grid-column: 1 / -1; }
.work-card__figure { min-width: 0; margin: 0; overflow: hidden; border: 1px solid #e8ece7; border-radius: 11px; background: #fcfcfa; }
.work-card__image-button { display: grid; place-items: center; width: 100%; padding: 0; border: 0; background: #f5f7f3; }
.work-card__image-button:hover img { transform: scale(1.02); }
.work-card__figure img { width: 100%; height: 254px; object-fit: contain; transition: transform .2s; }
.work-card__images--multiple img { height: 185px; }
.work-card__images--three .work-card__figure:first-child img { height: 225px; }
.work-card__images--odd .work-card__figure:last-child img { height: 225px; }
.work-card__description { margin: 0 20px 19px; padding: 13px 15px 14px; border: 1px solid #e8eee8; border-radius: 10px; background: #f8faf7; color: #56676a; font-size: .83rem; line-height: 1.65; overflow-wrap: anywhere; }
.work-card__description strong { display: block; margin-bottom: 5px; color: var(--teal); font-size: .7rem; letter-spacing: .08em; }
.work-card__description p { margin: 0; white-space: pre-line; }
.work-card__missing { display: grid; place-items: center; height: 215px; color: var(--muted); font-size: .83rem; }
.work-card__footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding: 14px 20px; border-top: 1px solid #edf0ea; }
.votes { display: flex; flex-direction: column; line-height: 1.25; }
.votes strong { font-size: 1.28rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.votes span { margin-top: 3px; color: #7a8785; font-size: .72rem; }
.work-card__action { min-width: 112px; }
.work-card__action--complete { padding: 7px 10px; color: var(--muted); font-size: .82rem; }
.work-card__action--voted { color: var(--teal); font-weight: 750; }
.load-state, .empty-state { padding: 72px 16px; text-align: center; color: var(--muted); }
.loader { display: inline-block; width: 15px; height: 15px; margin-right: 6px; vertical-align: -3px; border: 2px solid #bbd1c8; border-top-color: var(--teal); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer { padding: 27px 0 36px; background: #e8ece5; color: #64756c; text-align: center; font-size: .8rem; }

.dialog, .image-dialog { max-width: min(430px, calc(100% - 32px)); border: 0; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 30px 100px rgba(15,34,37,.25); }
.dialog::backdrop, .image-dialog::backdrop { background: rgba(12, 30, 34, .7); backdrop-filter: blur(3px); }
.dialog { padding: 28px; }
.dialog__icon { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 14px; background: #f8edd9; color: #ab7633; font-size: 1.4rem; }
.dialog h2 { margin: 15px 0 6px; font-size: 1.4rem; }
.dialog p { margin: 0; color: #536269; font-size: .93rem; }
.dialog .dialog__note { margin-top: 12px; font-size: .8rem; color: #8a764f; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.image-dialog { width: min(900px, calc(100% - 24px)); max-width: 900px; max-height: calc(100dvh - 24px); margin: auto; padding: 45px 18px 17px; overflow: auto; text-align: left; }
.image-dialog__close { position: absolute; right: 9px; top: 5px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.8rem; line-height: 1; }
.image-dialog__close:hover { background: #edf2ed; }
.image-dialog img { width: 100%; max-height: calc(100dvh - 135px); object-fit: contain; background: #f8faf7; border-radius: 9px; }
.image-dialog p { margin: 12px 2px 0; color: #536269; font-size: .87rem; white-space: pre-line; overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 32px); padding: 11px 17px; transform: translateX(-50%); border-radius: 9px; background: #203d42; color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.2); font-size: .86rem; text-align: center; }

@media (max-width: 800px) {
  .entry-panel { grid-template-columns: 1fr; gap: 19px; padding: 24px; }
  .hero__content { padding-block: 52px 75px; }
  .hero__shape--one { right: -290px; }
}
@media (max-width: 670px) {
  .container { width: min(100% - 28px, 560px); }
  .hero { min-height: 318px; }
  .hero__content { padding-block: 42px 66px; }
  .hero h1 { margin-top: 20px; max-width: 340px; }
  .main-content { margin-top: -30px; }
  .entry-panel { padding: 21px; border-radius: 16px; }
  .works-section { padding-top: 49px; }
  .works-heading { align-items: start; }
  .works-heading p { max-width: 410px; }
  .view-badge { margin-top: 4px; }
  .gallery { grid-template-columns: 1fr; gap: 15px; }
  .work-card__figure img { height: 260px; }
  .work-card__images--multiple img { height: 185px; }
}
@media (max-width: 430px) {
  .hero h1 { font-size: 2.25rem; }
  .entry-panel { padding: 18px; }
  .identity-form__row { flex-direction: column; }
  .identity-form__row input { flex: none; width: 100%; height: 45px; }
  .identity-form__row .button { width: 100%; }
  .works-heading { display: block; }
  .view-badge { margin-top: 15px; }
  .toolbar { align-items: stretch; }
  .search-field { flex: 1; min-width: 0; }
  .sort-field span { display: none; }
  .sort-field select { max-width: 105px; }
  .work-card__images { gap: 8px; padding-inline: 14px; }
  .work-card__images--multiple img { height: 150px; }
  .work-card__images--three .work-card__figure:first-child img { height: 200px; }
  .work-card__description { margin-inline: 14px; }
  .session-panel__badge { padding-inline: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
