:root {
  --ink: #132238;
  --ink-soft: #405269;
  --paper: #f4f7f9;
  --surface: #ffffff;
  --surface-soft: #eaf0f3;
  --gold: #b17a19;
  --gold-light: #f1d18c;
  --teal: #146655;
  --danger: #b43c4b;
  --border: #cbd7dd;
  --focus: #126bd1;
  --shadow: 0 18px 48px rgba(19,34,56,.11);
  --shadow-sm: 0 8px 24px rgba(19,34,56,.08);
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --display: "Songti SC", "STSong", "Noto Serif SC", serif;
  --body: "PingFang SC", "Microsoft YaHei", sans-serif;
  --utility: ui-monospace, "SFMono-Regular", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font: 16px/1.6 var(--body); }
button, input, textarea, select { font: inherit; }
button, select, input[type=file] { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.hidden { display: none !important; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 99; background: var(--ink); color: white; padding: 10px 14px; }
.skip-link:focus { top: 12px; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(20px, calc((100vw - 1240px)/2)); background: rgba(244,247,249,.94); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font: 700 18px/1.15 var(--display); text-decoration: none; white-space: nowrap; }
.brand small { display: block; font: 9px/1.4 var(--utility); letter-spacing: .14em; color: var(--ink-soft); }
.brand-mark { width: 38px; height: 38px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 7px; background: var(--ink); border-radius: 8px; transform: rotate(-2deg); }
.brand-mark i { background: var(--gold-light); border-radius: 2px; }
.account-switch { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; }
select, input, textarea { min-height: 46px; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--ink); background: white; padding: 10px 12px; width: 100%; }
.account-switch select { width: auto; min-width: 180px; }
main { overflow: clip; }
.hero { max-width: 1240px; margin: 0 auto; padding: 64px 24px 54px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 72px; }
.kicker { margin: 0 0 18px; color: var(--teal); font-weight: 700; letter-spacing: .18em; }
h1 { margin: 0; max-width: 720px; font: 700 clamp(44px, 6vw, 82px)/1.08 var(--display); letter-spacing: -.05em; }
h1 em { display: block; color: var(--gold); font-style: normal; }
.hero-copy { max-width: 570px; margin: 24px 0 0; color: var(--ink-soft); font-size: 18px; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.button { min-height: 46px; border: 1px solid transparent; border-radius: var(--r-sm); padding: 10px 18px; font-weight: 700; transition: transform .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--ink); box-shadow: 0 10px 22px rgba(19,34,56,.2); }
.button.accent { color: white; background: var(--teal); }
.button.danger { color: white; background: var(--danger); }
.button.quiet { color: var(--ink); border-color: var(--border); background: transparent; }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.film-window { position: relative; padding: 22px 22px 16px; background: var(--ink); color: white; border-radius: 8px; transform: rotate(1.2deg); box-shadow: var(--shadow); }
.film-window:before, .film-window:after { content: ""; position: absolute; left: 10px; right: 10px; height: 8px; background: repeating-linear-gradient(90deg, transparent 0 12px, var(--paper) 12px 21px); }
.film-window:before { top: 7px; } .film-window:after { bottom: 7px; }
.film-frame { aspect-ratio: 4/3; position: relative; overflow: hidden; background: linear-gradient(135deg,#b7d3d3,#eef4ee 44%,#d6b56d); border: 9px solid white; }
.memory-shape { position: absolute; inset: 24% 16% 15%; border-radius: 50% 50% 8px 8px; background: #29445c; clip-path: polygon(0 100%,26% 36%,43% 65%,67% 18%,100% 100%); }
.memory-shape span { position: absolute; bottom: 8px; right: 10px; color: white; font: 13px var(--display); }
.date-stamp { position: absolute; z-index: 2; right: 14px; top: 12px; padding: 5px 8px; color: white; background: rgba(19,34,56,.74); font: 11px var(--utility); }
.film-window p { margin: 12px 8px 8px; font-size: 13px; color: #dce6eb; }
.tabs { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tabs button { flex: 0 0 auto; min-height: 48px; padding: 10px 15px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink-soft); }
.tabs button.active { border-color: var(--gold); color: var(--ink); font-weight: 700; }
.view { min-height: 420px; max-width: 1240px; margin: 0 auto; padding: 36px 24px 96px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-head h2, .card h2 { margin: 0; font: 700 30px/1.2 var(--display); }
.section-head p { margin: 6px 0 0; color: var(--ink-soft); }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.card { min-width: 0; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { color: var(--ink-soft); }
.metric { font: 700 34px/1 var(--display); color: var(--teal); }
.muted { color: var(--ink-soft); }
.status { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 999px; background: var(--surface-soft); color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.status.approved, .status.active { color: #075443; background: #d8f1e9; }
.status.pending, .status.awaiting_payment { color: #75510e; background: #f9ebc8; }
.status.rejected { color: #892937; background: #f8dde1; }
.form { display: grid; gap: 15px; }
.form label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.form textarea { min-height: 110px; resize: vertical; }
.form .button { justify-self: start; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.upload-field { gap: 9px !important; }
.upload-title { color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.upload-drop { min-height: 126px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 20px; text-align: center; color: var(--ink); background: linear-gradient(145deg,#f8fbfc,#edf3f5); border: 1.5px dashed #9aadb7; border-radius: 14px; transition: .18s ease; }
.upload-drop:hover { border-color: var(--teal); background: #edf7f4; transform: translateY(-1px); }
.upload-drop svg { width: 30px; height: 30px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.upload-drop strong { font-size: 15px; }
.upload-drop .upload-name { max-width: 100%; color: var(--ink-soft); font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.upload-drop.compact { min-height: 104px; }
.upload-field:has(.media-picker:focus-visible) .upload-drop { outline: 3px solid var(--focus); outline-offset: 3px; }
.media-preview { display: none; }
.media-preview.has-files { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 12px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-sm); }
.preview-item { min-width: 0; position: relative; display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: center; gap: 10px; padding: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); }
.preview-item img, .preview-item video { width: 72px; height: 72px; display: block; object-fit: cover; background: var(--surface-soft); border-radius: 7px; }
.preview-meta { min-width: 0; display: grid; gap: 3px; padding-right: 26px; }
.preview-meta strong { overflow: hidden; color: var(--ink); font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.preview-meta span, .video-mark { color: var(--ink-soft); font: 11px/1.4 var(--utility); }
.video-mark { position: absolute; left: 12px; bottom: 12px; padding: 2px 5px; color: white; background: rgba(19,34,56,.82); border-radius: 4px; }
.preview-remove { width: 44px; height: 44px; position: absolute; right: 0; top: 0; display: grid; place-items: center; border: 0; color: var(--ink-soft); background: transparent; border-radius: 999px; transition: color .18s ease, background .18s ease; }
.preview-remove:hover { color: var(--danger); background: #f8dde1; }
.preview-remove svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.field-help { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 12px; font-weight: 400; }
.char-count { font-family: var(--utility); }
.album-actions { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; }
.album-actions .button { margin: 0; }
.file-count { justify-self: end; color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.share-card { margin-top: 18px; display: grid; grid-template-columns: minmax(0,1fr) 240px; align-items: center; gap: 22px; padding: 24px; overflow: hidden; color: white; background: var(--ink); border: 1px solid #2b4057; border-radius: var(--r-md); box-shadow: var(--shadow); }
.share-card-copy span { color: var(--gold-light); font: 11px/1.4 var(--utility); letter-spacing: .12em; }
.share-card-copy h4 { margin: 10px 0 6px; color: white; font: 700 24px/1.25 var(--display); }
.share-card-copy p { max-width: 38ch; margin: 0; color: #dce6eb; font-size: 13px; }
.share-card.paper { color: var(--ink); background: #f6f0e0; border-color: #d8c69e; }
.share-card.paper .share-card-copy span, .share-card.paper .share-card-copy h4 { color: #76510e; }
.share-card.paper .share-card-copy p { color: #5c4c32; }
.share-card.teal { background: #0f5347; border-color: #5c9b8e; }
.share-card > img { width: 240px; max-width: 100%; justify-self: end; border-radius: 8px; box-shadow: 0 12px 28px rgba(0,0,0,.24); }
.qr-styles { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 18px; }
.qr-style { min-height: 40px; padding: 7px 11px; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 999px; font-size: 12px; opacity: .72; transition: opacity .18s ease, background .18s ease; }
.qr-style:hover, .qr-style.active { opacity: 1; background: rgba(255,255,255,.13); }
.share-card.paper .qr-style:hover, .share-card.paper .qr-style.active { background: rgba(118,81,14,.1); }
.share-card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.share-card-actions .button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.share-card-actions .quiet { color: white; border-color: #607286; }
.plan-note { margin: 14px 0 18px; padding: 11px 13px; color: #5c4316 !important; background: #fff8e8; border-radius: var(--r-sm); font-size: 13px; }
.pricing { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.price-card { position: relative; padding: 28px; overflow: hidden; }
.price-card.featured { border: 2px solid var(--gold); }
.price { margin: 18px 0; font: 700 45px/1 var(--display); }.price small { font: 14px var(--body); color: var(--ink-soft); }
.list { margin: 18px 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.list li:before { content: "✓"; color: var(--teal); font-weight: 900; margin-right: 9px; }
.media-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.media-grid img, .media-grid video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-soft); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.empty { padding: 48px 24px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--r-md); color: var(--ink-soft); }
.notice { padding: 14px 16px; border-left: 4px solid var(--gold); background: #fff8e8; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: #5c4316; margin-bottom: 20px; }
.payment-item { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.payment-item:last-child { border: 0; }
.comment { margin: 14px 0; padding: 14px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--border); }
.forum-head .kicker { margin-bottom: 6px; font-size: 11px; }
.post-feed { display: grid; gap: 16px; max-width: 900px; }
.post-card { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.post-open { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,38%); gap: 22px; padding: 22px; color: var(--ink); text-align: left; background: transparent; border: 0; }
.post-copy { min-width: 0; align-self: center; }
.post-copy h3 { margin: 12px 0 7px; font: 700 23px/1.25 var(--display); }
.post-copy > p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--ink-soft); -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.post-date { color: var(--ink-soft); font: 11px var(--utility); }
.post-media { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.post-media.count-1 { grid-template-columns: 1fr; }
.post-media span { min-width: 0; position: relative; display: block; }
.post-media img { width: 100%; height: 110px; display: block; object-fit: cover; background: var(--surface-soft); border-radius: 7px; }
.post-media.count-1 img { height: 190px; }
.post-media b { position: absolute; inset: 0; display: grid; place-items: center; color: white; background: rgba(19,34,56,.62); border-radius: 7px; font-size: 24px; }
.post-actions { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 10px 22px; border-top: 1px solid var(--border); color: var(--ink-soft); }
.post-actions button { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; color: var(--ink-soft); background: transparent; border: 0; border-radius: 999px; }
.post-actions button:hover { color: var(--teal); background: #edf7f4; }
.post-actions svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.post-actions .liked { color: var(--danger); background: #f8dde1; }
.post-actions .liked svg { fill: currentColor; }
.text-action { width: auto; }
.composer-dialog { width: min(680px,calc(100vw - 32px)); max-height: min(88vh,820px); padding: 28px; overflow-y: auto; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow); }
.composer-dialog::backdrop { background: rgba(19,34,56,.62); backdrop-filter: blur(4px); }
.dialog-close { width: 44px; height: 44px; position: absolute; right: 14px; top: 14px; border: 0; border-radius: 999px; color: var(--ink); background: var(--paper); font-size: 24px; }
.dialog-head { padding-right: 42px; margin-bottom: 22px; }
.dialog-head > span { color: var(--teal); font: 11px var(--utility); letter-spacing: .12em; }
.dialog-head h3 { margin: 7px 0 4px; font: 700 27px/1.25 var(--display); }
.dialog-head p { margin: 0; color: var(--ink-soft); }
.back-link { min-height: 44px; margin-bottom: 18px; padding: 6px 0; color: var(--teal); background: transparent; border: 0; font-weight: 700; }
.post-detail, .comment-panel { max-width: 900px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.post-detail h2 { margin: 18px 0 10px; font: 700 clamp(30px,5vw,48px)/1.15 var(--display); }
.post-body { color: var(--ink) !important; white-space: pre-wrap; }
.detail-media { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 24px; }
.detail-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-soft); }
.post-detail .post-actions { margin: 24px -28px -28px; }
.comment-panel { margin-top: 18px; }
.comment-composer { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.metric-card { display: grid; gap: 12px; width: 100%; text-align: left; color: var(--ink); font-weight: 400; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.metric-card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--shadow); }
.metric-card .metric { display: block; }
.app-banner { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(120deg,#fff 0%,#f4ecd7 100%); }
.app-banner h2 { margin-top: 10px; }
.app-banner p { margin-bottom: 0; }
.proof { font-family: var(--utility); overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%,20px); max-width: min(90vw,520px); padding: 12px 18px; color: white; background: var(--ink); border-radius: var(--r-sm); opacity: 0; pointer-events: none; transition: .2s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.share-page { max-width: 980px; min-height: 100vh; margin: auto; padding: 54px 24px; }
.share-cover { padding: 40px; color: white; background: var(--ink); border-radius: var(--r-lg); }
.share-cover h1 { font-size: clamp(38px,8vw,72px); }
@media (max-width: 800px) {
  .topbar { align-items: flex-start; padding: 10px 16px; }
  .account-switch { display: grid; gap: 2px; }
  .account-switch select { min-width: 0; width: 158px; min-height: 42px; }
  .hero { padding: 42px 20px 40px; grid-template-columns: 1fr; gap: 36px; }
  h1 { font-size: clamp(39px,12vw,58px); }
  .hero-copy { font-size: 16px; }
  .film-window { width: calc(100% - 8px); }
  .tabs { padding: 0 12px; position: sticky; top: 76px; z-index: 15; background: var(--paper); }
  .view { padding: 28px 16px 100px; }
  .grid, .grid.two, .pricing { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .media-preview.has-files { grid-template-columns: 1fr; }
  .payment-item { grid-template-columns: 1fr; }
  .app-banner { align-items: flex-start; flex-direction: column; }
  .album-actions { grid-template-columns: 1fr 1fr; }
  .album-actions .button { width: 100%; }
  .file-count { grid-column: 1 / -1; justify-self: start; }
  .share-card { grid-template-columns: 1fr; padding: 18px; }
  .share-card > img { width: min(100%,280px); justify-self: center; }
  .share-card-actions .button { flex: 1 1 130px; }
  .post-open { grid-template-columns: 1fr; padding: 18px; }
  .post-media.count-1 img, .post-media img { height: 132px; }
  .composer-dialog { padding: 22px 16px; }
  .post-detail, .comment-panel { padding: 20px 16px; }
  .post-detail .post-actions { margin: 20px -16px -20px; }
  .detail-media { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
