:root {
  color-scheme: light;
  --paper: #f8f3f2;
  --ink: #291a22;
  --muted: #69535e;
  --wine: #842849;
  --line: #e6d7dd;
  --white: #fffafa;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
html { scroll-behavior: smooth; }
body { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #b94d70; outline-offset: 3px; }
.wrap { width: min(calc(100% - 2rem), 65rem); margin-inline: auto; }
.masthead { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand { font-weight: 760; text-decoration: none; }
.quiet, .primary, .outline { min-height: 44px; padding: .65rem 1rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: .65rem; font-weight: 700; text-decoration: none; text-align: center; }
.quiet { background: transparent; color: var(--wine); padding-inline: .25rem; }
.primary { color: #fff; background: var(--wine); }
.outline { color: var(--wine); border-color: #d6b7c5; background: transparent; }
button:disabled { cursor: default; color: #685360; border-color: #e8dce0; background: #eee2e7; }
.hero { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr); gap: clamp(.8rem, 4vw, 4rem); align-items: center; overflow: hidden; border-radius: 1.25rem; padding: clamp(1.1rem, 5vw, 4rem); color: #fff7f8; background: linear-gradient(135deg, #4a1c2e 0%, #2c1520 62%, #29141e 100%); }
.hero-copy { min-width: 0; }
.eyebrow, .edition, .intro { color: #f1c9d6; }
.eyebrow { font-size: .875rem; font-weight: 700; }
.hero h1 { margin-top: clamp(.8rem, 2.5vw, 1.75rem); line-height: 1.18; }
.hero h1 span { display: block; }
.artist { font-size: clamp(1.9rem, 6.1vw, 4rem); font-weight: 760; }
.tour { margin-top: .22em; font-size: clamp(1.125rem, 3.5vw, 2.6rem); font-weight: 730; }
.edition { margin-top: .65rem; font-size: clamp(.875rem, 2vw, 1.15rem); line-height: 1.45; font-weight: 500; }
.question { margin-top: clamp(1rem, 3.1vw, 2rem); padding-top: clamp(.75rem, 2.2vw, 1.45rem); border-top: 1px solid #9c5d73; max-width: 22rem; font-size: clamp(1.35rem, 4.7vw, 3rem); font-weight: 750; line-height: 1.18; }
.intro { margin-top: .65rem; max-width: 18rem; font-size: clamp(1rem, 1.45vw, 1.08rem); }
.cover { width: 100%; max-width: 16rem; height: auto; display: block; justify-self: center; border-radius: .65rem; box-shadow: 0 9px 28px #15051266; }
.gallery { padding-top: clamp(1.7rem, 5vw, 3.5rem); scroll-margin-top: .75rem; }
.gallery-heading { display: flex; justify-content: space-between; align-items: end; gap: .6rem; }
.gallery h2, dialog h2, .manage h2 { font-size: clamp(1.55rem, 4vw, 2.25rem); line-height: 1.2; }
.gallery-heading p, .empty p, .gallery-status, .site-note { color: var(--muted); }
.gallery-heading p { margin-top: .4rem; }
.count, .entry-label { color: var(--wine); font-weight: 760; }
.count { white-space: nowrap; font-size: .875rem; }
.sort { display: flex; gap: 1.4rem; margin: .85rem 0 1rem; border-bottom: 1px solid var(--line); }
.sort button { min-height: 44px; padding: .5rem .1rem; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); white-space: nowrap; }
.sort [aria-pressed="true"] { border-bottom-color: var(--wine); color: var(--wine); font-weight: 750; }
.empty { border: 1px dashed #d9bdc9; border-radius: 1rem; padding: clamp(1.25rem, 4vw, 2.6rem); background: #fff8f8; }
.empty p { margin: .35rem 0 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .8rem; }
.entry-card { display: block; width: 100%; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .85rem; text-align: left; background: var(--white); color: var(--ink); }
.entry-card img { display: block; width: 100%; aspect-ratio: 1.12; object-fit: cover; background: #e7d7de; }
.entry-card .entry-body { display: grid; gap: .25rem; padding: .8rem; }
.entry-card .entry-title { font-size: 1.05rem; font-weight: 760; overflow-wrap: anywhere; }
.entry-card .entry-meta { display: flex; gap: .4rem; justify-content: space-between; color: var(--wine); font-size: .875rem; }
.load-more { margin-top: 1rem; }
.site-note { margin-top: 1.65rem; font-size: .875rem; }
.bottom { position: fixed; z-index: 1; inset: auto 0 0; background: #f8f3f2f5; border-top: 1px solid var(--line); padding: .65rem 0 calc(.8rem + env(safe-area-inset-bottom)); }
.bottom-inner, .dialog-actions { display: flex; gap: .65rem; }
.bottom-inner .primary, .dialog-actions .primary { flex: 1; }
dialog { width: min(calc(100% - 1.25rem), 34rem); max-height: 90dvh; padding: clamp(1rem, 4vw, 1.6rem); border: 1px solid var(--line); border-radius: 1rem; background: var(--white); color: var(--ink); }
dialog::backdrop { background: #28141ecc; }
.close-row { display: flex; justify-content: flex-end; margin: -.45rem -.25rem .2rem; }
.close-row button { background: transparent; border: 0; min-width: 44px; min-height: 44px; color: var(--wine); font-size: 1.7rem; line-height: 1; }
.rules { padding-left: 1.3rem; margin-top: .9rem; }
.rules li + li { margin-top: .7rem; }
.fields { display: grid; gap: 1rem; margin-top: 1rem; }
.fields label:not(.check, .choices label), .fields legend { font-weight: 700; }
.fields input:not([type="radio"], [type="checkbox"], [type="file"]), .fields textarea { display: block; width: 100%; margin-top: .38rem; padding: .65rem .75rem; min-height: 44px; border: 1px solid #d6bdc9; border-radius: .55rem; color: var(--ink); background: #fff; }
.fields textarea { resize: vertical; }
.fields fieldset { margin: 0; padding: 0; border: 0; }
.fields small { color: var(--muted); }
.choices { display: flex; gap: .55rem; }
.choices label, .check { display: flex; align-items: center; gap: .55rem; min-height: 44px; }
.choices label { border: 1px solid #dfcbd3; border-radius: .5rem; padding: .5rem .7rem; }
.check input { flex: none; width: 1.25rem; height: 1.25rem; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--wine); }
.upload-box { cursor: pointer; display: grid; place-items: center; gap: .55rem; min-height: 6rem; padding: .8rem; border: 1px dashed #bd89a0; border-radius: .7rem; color: var(--wine); background: #f7ebef; }
.upload-box img { max-width: 100%; max-height: 16rem; object-fit: contain; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-box:has(+ .file-input:focus-visible) { outline: 3px solid #b94d70; }
.message { margin: .55rem 0; color: var(--wine); overflow-wrap: anywhere; }
.detail-image { width: 100%; max-height: 55dvh; object-fit: contain; display: block; border-radius: .65rem; background: #351d2a; }
.entry-label { margin: .65rem 0 .25rem; font-size: .875rem; }
.story { margin-top: .6rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.votes { color: var(--wine); font-weight: 750; margin: .75rem 0; }
.dialog-actions { margin-top: .65rem; }
.confirm-vote { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.manage { padding-block: .75rem 2rem; }
.manage .fields { max-width: 27rem; }
.manage-list { display: grid; gap: 1rem; margin-top: 1.4rem; }
.review { display: grid; gap: .6rem; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--white); }
.review img { width: min(100%, 32rem); max-height: 24rem; object-fit: contain; object-position: left; }
@media (max-width: 600px) {
  .hero { gap: .8rem; grid-template-columns: minmax(0, 1.13fr) minmax(0, .87fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 350px) {
  .wrap { width: calc(100% - 1.25rem); }
  .hero { padding: .8rem; gap: .55rem; }
  .grid { gap: .5rem; }
  .entry-card .entry-body { padding: .6rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
