/* UI-1 · A quiet home for shared memories. All assets remain same-origin. */
:root {
  --paper:#f7f8f3; --paper-soft:#eef1e8; --card:#fffefa;
  --ink:#253e35; --ink-soft:#53665c; --ink-dim:#68766a; --line:#e1e6dc;
  --accent:#32634f; --accent-ink:#244d3e; --muted:#edf0e8; --soft:#657467;
  --radius-lg:20px; --shadow:0 5px 22px -15px #294b3f40;
  --wrap-pad:32px;
}
body { font-family:"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif; background:var(--paper); }
.wrap { max-width:1240px; }
h1,h2,h3 { letter-spacing:-.025em; overflow-wrap:anywhere; }
h1 { line-height:1.3; }
button,input,textarea,select { font:inherit; }
button,a,input,textarea,summary,select { -webkit-tap-highlight-color:transparent; }
button:not(:disabled),summary { cursor:pointer; }
:is(a,button,input,textarea,summary,select):focus-visible { outline:3px solid #bb7045; outline-offset:4px; }
.icon { width:20px; height:20px; flex:none; vertical-align:middle; }
.skip-link { position:fixed; top:8px; left:12px; z-index:100; padding:10px 16px; border-radius:8px; background:var(--ink); color:white; transform:translateY(-160%); }
.skip-link:focus { transform:none; }
.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; }
.site-header { background:#fffefa; border-bottom:1px solid var(--line); }
.header-inner { min-height:82px; padding-block:14px; }
.brand { gap:12px; }
.brand-mark { background:#e7eee2; border-radius:11px; padding:5px; width:40px; height:40px; }
.brand-name { font-weight:700; letter-spacing:.08em; font-size:19px; }
.brand-sub { display:block; font-size:10px; letter-spacing:.17em; font-weight:400; color:var(--ink-dim); }
.site-nav { gap:20px; }
.nav-link { padding:9px 5px; font-size:14px; }
.nav-link[aria-current] { color:var(--accent); box-shadow:0 2px var(--accent); }
.nav-user { padding:6px 11px 6px 6px; background:var(--paper-soft); border-radius:40px; }
.nav-user .avatar-dot { color:#fff; background:var(--accent); border:0; width:30px; height:30px; }
.nav-nickname { font-size:13px; }
.nav-form .link-button { min-height:40px; }
.btn,.site-form button,.account-card form button,form#photo-upload-form>button,.space-panel form>button {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px;
  padding:10px 19px; border-radius:10px; font-weight:600; font-size:14px; text-decoration:none;
  border:1px solid var(--line); background:#fffefa; color:var(--ink); line-height:1.4;
}
.btn-primary,.site-form button,.account-card form button,form#photo-upload-form>button { background:var(--accent); color:#fff; border-color:var(--accent); }
.btn-primary:hover,.site-form button:hover,.account-card form button:hover { background:var(--accent-ink); border-color:var(--accent-ink); }
.btn-ghost:hover,.btn-secondary:hover { background:var(--paper-soft); }
.btn-small { min-height:40px; padding:9px 15px; font-size:13px; }
.btn-danger,.site-form button.btn-danger,.space-panel form>button.btn-danger { color:#934333; background:#fcf0e9; border-color:#e8cbbd; }
.btn:disabled,button:disabled { opacity:.55; cursor:default; }
.space-main { gap:28px; padding-block:32px 72px; }
.crumb { font-size:12px; gap:11px; flex-wrap:wrap; line-height:1.5; }
.space-hero { border:0; box-shadow:none; background:none; padding:5px 0 12px; gap:18px; align-items:center; }
.space-hero h1 { font-size:clamp(26px,3.2vw,38px); margin-bottom:12px; font-weight:650; }
.space-hero-sub { font-size:14px; max-width:65ch; margin-bottom:0; }
.eyebrow { color:#8a603f; font-size:11px; font-weight:600; letter-spacing:.15em; text-transform:uppercase; margin:0 0 14px; }
.page-heading-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.section-heading { display:flex; justify-content:space-between; gap:16px; align-items:flex-end; margin-bottom:18px; }
.section-heading h2 { margin:0; font-size:21px; font-weight:650; }
.section-heading p { margin:5px 0 0; font-size:13px; color:var(--ink-dim); }
.section-kicker { font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:#8a603f; }
.badge { border:0; font-size:11px; letter-spacing:.01em; color:var(--ink-soft); padding:5px 10px; background:#eaf0e5; }
.badge-owner { background:#f7eadb; color:#825330; }
.badge-warn { background:#f9e9dc; color:#885139; }
.space-flags { gap:8px; margin-top:18px; }
.space-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.space-card { border:1px solid #e3e7de; border-radius:18px; box-shadow:var(--shadow); }
.space-card-link { display:block; padding:0; }
.space-cover { display:block; position:relative; border:0; border-radius:0; width:100%; height:210px; background:#e5ebe1; overflow:hidden; }
.space-cover>img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.space-card-link:hover .space-cover>img,.album-card-link:hover .album-cover>img { transform:scale(1.035); }
.private-tag { position:absolute; top:14px; left:14px; padding:5px 10px; display:flex; gap:5px; align-items:center; background:#fffefae8; border-radius:20px; color:var(--ink); font-size:11px; }
.private-tag .icon { width:13px; height:13px; }
.space-cover-art,.cover-art { background:#e4eadf url('/static/journey.svg') center/cover; }
.cover-art-label { display:grid; justify-items:center; gap:9px; padding:12px 18px; background:#fffefae8; color:#42624f; border-radius:12px; font-size:12px; }
.space-card-body { display:flex; flex-direction:column; gap:10px; padding:23px; }
.space-name { font-size:20px; font-weight:650; display:flex; justify-content:space-between; align-items:center; }
.space-intro { font-size:13px; line-height:1.8; min-height:23px; }
.space-meta { font-size:12px; border-top:1px solid var(--line); padding-top:14px; margin-top:5px; }
.card-arrow { float:right; font-size:19px; color:var(--accent); margin-left:auto; }
.space-panel,.empty-card { border:1px solid var(--line); box-shadow:none; padding:25px; border-radius:16px; }
.space-page-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:20px; }
.space-exit-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-top:24px; }

.cover-upload-form { display:grid; gap:10px; padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid var(--line); }
.cover-upload-form h3 { margin:0; }
.cover-upload-form :is(input,select) { max-width:100%; min-width:0; }
.cover-upload-form button { justify-self:start; }
.cover-picker-pages { display:flex; align-items:center; justify-content:center; gap:12px; margin:16px 0; }
.timeline-heading-badge { display:inline-flex; align-items:center; gap:10px; justify-self:start; width:fit-content; margin:0; padding:14px 18px; border-radius:12px; background:#e5eddf; color:var(--ink); font-size:18px; font-weight:650; }
.timeline-heading-badge .icon { width:18px; height:18px; flex:none; }
.join-dialog { box-sizing:border-box; width:min(480px,calc(100% - 32px)); max-height:calc(100dvh - 32px); overflow:auto; padding:24px; border:1px solid var(--line); border-radius:18px; color:var(--ink); background:var(--paper,#fffefa); }
.join-dialog::backdrop { background:rgba(21,43,36,.4); }
.join-dialog-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:14px; }
.join-dialog-heading h2 { margin:0; font-size:22px; }
.join-dialog input,.join-dialog textarea { box-sizing:border-box; max-width:100%; }
.space-page-heading .crumb { margin-bottom:0; min-width:0; flex:1 1 180px; }
.timeline-card .album-cover-sm { display:flex; align-items:center; justify-content:center; flex:0 0 88px; width:88px; height:64px; border-radius:8px; }
.timeline-card .album-cover-sm img { display:block; width:100%; height:100%; object-fit:cover; }
.space-panel h2 { font-size:18px; margin-bottom:12px; }
.empty-card { text-align:center; padding:48px 24px; border-style:dashed; }
.empty-card h2 { font-size:20px; margin-bottom:9px; }
.empty-card p { margin-bottom:16px; }
details.space-panel>summary,details.management-section>summary { font-weight:600; font-size:15px; min-height:30px; line-height:1.7; }
details.space-panel>summary::marker,details.management-section>summary::marker { color:var(--accent); }
details[open].space-panel>summary { margin-bottom:20px; }
.site-form { max-width:720px; }
.site-form :is(input:not([type=checkbox]),textarea,select),.account-card form :is(input:not([type=checkbox]),textarea,select) { border-color:#d6dfd0; background:#fffefa; border-radius:9px; min-height:44px; }
.site-form label,.account-card label { font-size:13px; }
.account-hint { color:var(--ink-dim); font-size:12px; line-height:1.9; overflow-wrap:anywhere; }
.site-footer { border-top:1px solid var(--line); padding:25px 0; background:#f1f3ec; }
.footer-inner { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:10px; }
.footer-inner p { font-size:12px; }
.footer-brand { color:var(--ink); font-weight:600; letter-spacing:.04em; }
.account-main { padding-block:45px 65px; }
.account-card { border:1px solid var(--line); box-shadow:var(--shadow); border-radius:20px; padding:34px; }
.account-card h1 { font-size:29px; }
.space-banner { position:relative; overflow:hidden; min-height:240px; padding:34px; border-radius:20px; background:#e9eee3; isolation:isolate; align-items:flex-end; }
.space-banner>div:first-child { position:relative; z-index:1; max-width:54%; }
.space-banner-image { position:absolute; z-index:-1; right:0; top:0; height:100%; width:48%; object-fit:cover; mask-image:linear-gradient(to right,transparent,#000 24%); }
.space-banner .space-hero-actions { position:relative; z-index:1; padding:10px; border-radius:12px; background:#fffefae8; }
.space-tabs { display:flex; align-items:center; gap:8px; padding:5px 0 13px; border-bottom:1px solid var(--line); overflow-x:auto; }
.space-tabs a { display:flex; flex:none; align-items:center; gap:7px; padding:10px 15px; border-radius:9px; text-decoration:none; color:var(--ink-soft); font-size:13px; white-space:nowrap; min-height:44px; }
.space-tabs a:hover { background:var(--paper-soft); }
.space-tabs a[aria-current] { color:var(--accent-ink); background:#e6ecdf; font-weight:600; }
.space-tabs .icon { width:17px; height:17px; }
.album-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:25px; margin:0; }
.album-card { border-radius:12px; border:1px solid var(--line); box-shadow:0 5px 12px -10px #294b3f60; }
.album-cover { position:relative; height:205px; overflow:hidden; }
.album-cover img { height:100%; width:100%; object-fit:cover; transition:transform .3s; }
.album-card-body { padding:20px 21px; }
.album-title { font-size:19px; font-weight:650; margin:7px 0 13px; }
.album-date { font-size:11px; letter-spacing:.09em; color:#946844; }
.album-meta { display:flex; gap:5px; align-items:center; font-size:12px; color:var(--ink-dim); }
.album-meta .icon { width:14px; height:14px; }
.cover-count { position:absolute; bottom:12px; right:12px; padding:4px 9px; background:#fffefae8; font-size:10px; border-radius:7px; color:var(--ink); }
.member-grid { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:12px; }
.member-card { border:0; background:var(--paper); padding:12px; }
.member-name { font-size:13px; }
.management-section { border:1px solid var(--line); border-radius:16px; padding:22px; background:#eff2e9; }
.management-section .space-panel { margin-top:16px; }
.album-journal { padding-top:17px; border-top:1px solid var(--line); }
.album-journal .space-hero h1 { font-family:"Songti SC","Noto Serif CJK SC","SimSun",serif; font-size:clamp(30px,4vw,47px); letter-spacing:.03em; }
.album-journal .space-hero-sub { color:#736c5f; }
.journal-note { font-size:12px; color:#8b745c; letter-spacing:.02em; }
.photo-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin:0; }
.photo-card { padding:7px 7px 0; border-radius:6px; box-shadow:0 3px 8px -6px #543f2f66; background:#fffefa; border:1px solid #e8e5d9; }
.photo-card img,.photo-placeholder,.video-placeholder { aspect-ratio:4/3; height:auto; border-radius:3px; }
.photo-caption { padding:12px 4px; font-size:11px; justify-content:space-between; flex-wrap:wrap; gap:5px; }
.photo-owner { font-weight:550; }
.video-placeholder { background:#436655; font-size:30px; }
.wall-heading { margin-top:5px; }
.join-dialog.upload-panel { width:min(640px,calc(100% - 32px)); }
.simple-upload-drop-zone { display:flex; min-height:150px; align-items:center; justify-content:center; flex-direction:column; gap:12px; border:1px dashed #a8b7a1; border-radius:14px; background:#f2f4ed; color:var(--ink-dim); }
.simple-upload-drop-zone.is-dragging { background:#e6eee2; border-color:#32614d; }
#photo-upload-form { max-width:760px; }
#photo-upload-form .form-check { display:flex; align-items:flex-start; gap:10px; font-size:13px; }
#photo-upload-form .form-check input { margin-top:6px; flex:none; }
#photo-input { background:#f2f4ed; padding:22px; border:1px dashed #a8b7a1; }
#photo-input::file-selector-button { background:#fffefa; border:1px solid var(--line); padding:10px 14px; border-radius:8px; margin-right:14px; color:var(--ink); }
.photo-page-nav { display:flex; align-items:center; justify-content:center; gap:15px; font-size:13px; flex-wrap:wrap; }
.media-feature { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:24px; align-items:start; }
.media-viewer { margin:0; padding:18px; background:#e8ebe2; border:1px solid var(--line); min-height:400px; display:grid; place-items:center; }
.media-large { max-height:68vh; object-fit:contain; border-radius:5px; }
.media-meta h2 { font-size:15px; margin-top:25px; }
.media-meta-line { font-size:12px; line-height:2; overflow-wrap:anywhere; }
.variant-row { flex-wrap:wrap; font-size:11px; padding:10px 0; }
.media-meta .btn { width:100%; }
.media-moment { padding-bottom:18px; border-bottom:1px solid var(--line); }
.media-moment .eyebrow { margin:0 0 8px; font-size:10px; }
.media-moment h2 { margin:0 0 10px; font-family:"Songti SC","Noto Serif CJK SC","SimSun",serif; font-size:24px; }
.media-moment .media-meta-line { margin:3px 0; }
.media-privacy-line { margin-top:10px !important; }
.media-download-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; padding-top:17px; }
.media-meta .media-download-actions .btn { width:auto; white-space:nowrap; }
.media-download-details { margin-top:17px; padding-top:13px; border-top:1px dashed var(--line); }
.media-download-details summary { cursor:pointer; color:var(--ink-soft); font-size:12px; }
.media-sequence-nav { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; margin:20px 0 24px; padding:12px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.media-sequence-side { min-height:32px; display:flex; align-items:center; justify-content:flex-start; }
.media-sequence-next { justify-content:flex-end; }
.media-sequence-back { color:var(--ink-soft); font-size:13px; text-decoration:none; white-space:nowrap; }
.media-sequence-back:hover { color:var(--ink); text-decoration:underline; }
.media-download-details .variant-list { margin:10px 0; }
.social-panel { max-width:none; }
.like-row { padding:5px 0 20px; border-bottom:1px solid var(--line); margin-bottom:20px; }
.like-btn[data-liked='1'] { color:#925334; background:#f9eadd; border-color:#e8bfa6; }
.comment-list { gap:14px; margin:20px 0; }
.comment-item { padding:16px; background:#f3f5ee; gap:8px; }
.comment-body { font-size:14px; flex-basis:100%; padding-left:30px; }
.comment-author { font-size:12px; }
.comment-time { margin-left:auto; color:var(--ink-dim); font-size:10px; }
.comment-form textarea,.chat-form textarea { background:#fffefa; border-color:#d9e1d2; border-radius:10px; padding:15px; font-size:14px; line-height:1.8; }
.comment-actions { justify-content:space-between; }
.comment-count,.chat-count { color:var(--ink-dim); }
.comment-parent,.comment-replies,.chat-empty,.comment-empty { color:var(--ink-dim); }
.chat-panel { padding:0; overflow:hidden; gap:0; }
.chat-head { padding:24px 28px 16px; background:var(--card); border-bottom:1px solid var(--line); }
.chat-head h1 { font-size:22px; }
.chat-status { font-size:11px; color:var(--ink-dim); padding:12px 28px; margin:0; }
.chat-list { padding:8px 28px 24px; gap:18px; min-height:260px; max-height:52vh; background:#f2f4ed; }
.chat-item { display:grid; grid-template-columns:30px minmax(0,1fr) auto; column-gap:10px; row-gap:5px; align-items:start; padding:0; background:none; max-width:85%; }
.chat-avatar { grid-column:1; grid-row:1/3; width:30px; height:30px; font-size:11px; }
.chat-author { grid-column:2; grid-row:1; font-size:11px; color:var(--ink-soft); }
.chat-time { grid-column:3; grid-row:1; font-size:10px; color:var(--ink-dim); }
.chat-body { grid-column:2/4; grid-row:2; display:block; padding:12px 15px; background:#fffefa; border:1px solid var(--line); border-radius:0 12px 12px 12px; font-size:14px; min-width:0; overflow-wrap:anywhere; }
.chat-mine { margin-left:auto; grid-template-columns:auto minmax(0,1fr) 30px; }
.chat-mine .chat-avatar { grid-column:3; }
.chat-mine .chat-author { grid-column:2; text-align:right; }
.chat-mine .chat-time { grid-column:1; }
.chat-mine .chat-body { grid-column:1/3; background:#e0eadb; border-color:#d0dfc7; border-radius:12px 0 12px 12px; }
.chat-delete { grid-column:1/3; justify-self:end; font-size:10px; padding:4px 8px; border:0; background:none; color:var(--ink-dim); min-height:28px; }
.chat-form { padding:20px 28px; border-top:1px solid var(--line); }
.chat-form textarea { resize:vertical; min-height:85px; max-height:200px; }
.chat-actions { justify-content:flex-end; }
.chat-count { margin-right:auto; }
#chat-load-more { align-self:center; margin:8px; }
.chat-empty { text-align:center; padding-block:80px; font-size:13px; }
.chat-deleted .chat-body { background:transparent; border-style:dashed; color:var(--ink-dim); font-size:12px; }
.btn-link { color:var(--accent); }
.public-entry { min-height:calc(100svh - 170px); display:flex; flex-direction:column; justify-content:center; align-items:center; gap:24px; padding-block:64px 80px; }
.public-entry-content { width:100%; max-width:620px; text-align:center; }
.public-entry h1 { margin:0; font-family:system-ui,"Microsoft YaHei",sans-serif; font-size:clamp(34px,5vw,48px); font-weight:650; line-height:1.3; letter-spacing:.04em; }
.public-entry-description { margin:20px 0 0; font-size:16px; color:var(--ink-soft); }
.public-entry-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:12px; margin-top:32px; }
.public-entry-actions .btn { min-width:118px; }
.public-entry-note { margin:24px 0 0; font-size:12px; color:var(--ink-dim); }
.landing { gap:65px; padding-block:60px 70px; }
.landing-hero { display:grid; grid-template-columns:1.08fr 1fr; align-items:center; gap:65px; }
.landing .hero-title { font-family:"Songti SC","SimSun",serif; font-size:clamp(36px,4.3vw,57px); line-height:1.45; letter-spacing:.04em; }
.landing .hero-title em { font-style:normal; color:#9a663d; }
.landing .hero-lead { font-size:14px; max-width:32em; line-height:2; margin-top:23px; }
.landing .hero-actions { margin-top:28px; }
.landing-art { position:relative; padding:13px 13px 49px; background:#fffefa; border:1px solid #e0e3d8; border-radius:6px; transform:rotate(3deg); box-shadow:8px 12px 0 #e5e9dd; margin:15px; }
.landing-art>img { display:block; width:100%; height:auto; border-radius:3px; }
.landing-art figcaption { position:absolute; bottom:13px; left:0; width:100%; text-align:center; font-size:12px; color:#846e56; letter-spacing:.1em; }
.landing-art::before { content:''; position:absolute; width:95px; height:26px; top:-12px; left:38%; background:#d8c7a8c9; transform:rotate(-8deg); }
.landing-note { margin-top:24px; display:flex; gap:8px; align-items:center; font-size:11px; color:var(--ink-dim); }
.landing-note .icon { width:14px; height:14px; }
.landing-features { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:40px; border-top:1px solid var(--line); padding-top:35px; }
.landing-features article { padding:8px 0; }
.landing-features .feature-number { color:#a1754a; font-size:11px; letter-spacing:.15em; }
.landing-features h2 { font-size:19px; margin:12px 0 10px; }
.landing-features p { font-size:13px; color:var(--ink-soft); line-height:1.9; margin:0; }
.service-unavailable { margin:0; padding:15px 20px; border-radius:10px; background:#f9eadd; color:#7c4a30; font-size:13px; }
@media (max-width:1000px) {
  .space-grid,.album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .photo-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .landing-hero { gap:30px; }
  .media-feature { grid-template-columns:minmax(0,1fr) 290px; gap:16px; }
}
@media (max-width:700px) {
  :root { --wrap-pad:20px; }
  .header-inner { min-height:70px; gap:8px; }
  .site-nav { gap:10px; flex-wrap:nowrap; }
  .brand-name { font-size:16px; }
  .brand-mark { width:33px; height:33px; }
  .brand { gap:8px; }
  .brand-sub,.nav-nickname,.site-nav>.badge-owner { display:none; }
  .nav-user { padding:0; background:none; }
  .nav-link,.nav-form .link-button { font-size:12px; }
  .nav-form .link-button { padding-inline:0; }
  .space-main { gap:22px; padding-top:24px; }
  .space-hero h1 { font-size:27px; }
  .space-hero { align-items:flex-start; }
  .space-hero-sub { font-size:13px; }
  .space-panel { padding:20px; }
  .section-heading { align-items:center; }
  .section-heading h2 { font-size:19px; }
  .space-grid,.album-grid { gap:16px; }
  .space-cover,.album-cover { height:170px; }
  .space-card-body,.album-card-body { padding:17px; }
  .space-name,.album-title { font-size:17px; }
  .space-banner { min-height:225px; padding:25px; }
  .space-banner>div:first-child { max-width:90%; }
  .space-banner-image { width:65%; opacity:.32; }
  .space-banner .space-hero-actions { padding:0; background:none; }
  .space-tabs { gap:1px; }
  .space-tabs a { padding:9px 11px; font-size:12px; }
  .media-feature { grid-template-columns:1fr; }
  .media-viewer { min-height:240px; padding:10px; }
  .media-meta .variant-list { max-width:none; }
  .media-meta .btn { width:auto; }
  .media-sequence-nav { gap:8px; margin:16px 0 20px; }
  .media-sequence-nav .btn { padding:8px 10px; font-size:12px; }
  .media-sequence-back { font-size:12px; }
  .photo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
  .photo-card { padding:5px 5px 0; }
  .photo-caption { font-size:10px; padding:10px 3px; }
  .photo-caption .badge { font-size:9px; padding:3px 6px; }
  .chat-head { padding:21px 20px 15px; }
  .chat-head h1 { font-size:19px; }
  .chat-list { padding:10px 16px 20px; max-height:50dvh; }
  .chat-status { padding:10px 20px; }
  .chat-form { padding:16px; }
  .chat-item { max-width:94%; }
  .chat-body { padding:10px 12px; font-size:13px; }
  .landing { padding-top:35px; gap:45px; }
  .landing-hero { grid-template-columns:1fr; gap:25px; }
  .landing .hero-title { font-size:37px; }
  .landing-art { max-width:430px; margin:15px auto; width:85%; }
  .landing-features { gap:22px; }
  .landing-features h2 { font-size:16px; }
  .landing-features p { font-size:12px; }
  .account-card { padding:25px; }
  .footer-inner { gap:8px; }
  .dest-field-row :is(input,select) { min-width:0; max-width:100%; }
}
@media (max-width:440px) {
  :root { --wrap-pad:16px; }
  .site-nav { gap:9px; }
  .site-nav .btn-small { padding:8px 12px; }
  .space-grid,.album-grid { grid-template-columns:1fr; }
  .space-cover { height:200px; }
  .album-cover { height:220px; }
  .space-hero-actions { flex-wrap:wrap; }
  .space-hero .page-heading-actions { width:100%; }
  .landing-features { grid-template-columns:1fr; gap:15px; }
  .landing-features article { display:grid; grid-template-columns:30px 1fr; gap:2px 10px; }
  .landing-features h2 { margin:0 0 8px; }
  .landing-features p { grid-column:2; }
  .landing .hero-title { font-size:33px; }
  .landing .hero-actions .btn { flex:1; font-size:12px; padding-inline:12px; }
  .member-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .member-card { gap:7px; padding:10px; }
  .member-card .avatar-img,.member-card .avatar-sm { width:32px; height:32px; }
  .space-tabs { margin-right:-2px; }
  .variant-row { gap:5px; }
  .timeline-date-form { flex-wrap:wrap; }
  .timeline-date-form input { max-width:155px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  .space-card-link:hover .space-cover>img,.album-card-link:hover .album-cover>img { transform:none; }
}

.timeline-date,.timeline-date-form label,.place-kind { color:var(--ink-dim); }
.space-panel form>button:not(.btn-danger) { background:var(--accent); color:#fff; border-color:var(--accent); }

.photo-owner,.space-name,.album-title { min-width:0; overflow-wrap:anywhere; }
.comment-deleted .comment-body { color:var(--ink-dim); }
.media-heading h1 { margin:0; font-size:clamp(22px,3vw,30px); }
.crumb>* { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.chat-author,.comment-author { min-width:0; overflow-wrap:anywhere; }

/* --- LOCAL-VISUAL-1 · 空间时间轴：私人影像志 ---------------------------------
   作用域仅限空间详情（.space-journal-page 与 .memory-timeline*）。
   只调整版式节奏：窄内容宽度、细边框、小圆角、日期栏与局部深墨绿刊头。
   不新增素材、外链字体或动画；所有链接、表单与既有 class 保持原位。 */
.space-journal-page { max-width:1080px; gap:22px; }

/* 扉页：文字为主、照片作侧栏，取消大圆角绿色横幅 */
.space-hero.space-journal-hero {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,360px);
  align-items:center;
  gap:clamp(24px,4vw,48px);
  min-height:0;
  padding:20px 0;
  border:0;
  border-top:1px solid #ded7c7;
  border-bottom:1px solid #ded7c7;
  border-radius:0;
  background:none;
  box-shadow:none;
  overflow:visible;
  isolation:auto;
}
.space-journal-hero>div:first-child { max-width:100%; }
.space-journal-hero h1 {
  margin:0 0 14px;
  font-family:"Songti SC","Noto Serif CJK SC","SimSun",serif;
  font-size:clamp(30px,3.5vw,44px);
  font-weight:600; line-height:1.26; letter-spacing:.015em;
}
.space-journal-hero .space-hero-sub { max-width:34em; margin:0; color:#6b6457; font-size:14px; line-height:2; }
.space-journal-hero .eyebrow { margin-bottom:16px; color:#a3734a; font-size:10.5px; letter-spacing:.2em; }
.space-journal-hero .space-flags { margin-top:20px; gap:7px; }
.space-journal-hero .badge {
  padding:4px 9px; border:1px solid #ded7c7; border-radius:3px;
  background:transparent; color:#776f60; font-size:10.5px; letter-spacing:.04em;
}
.space-journal-hero .badge-owner { border-color:#e0c9b3; background:#fbf2e8; color:#8a5c36; }
.space-journal-hero .badge-warn { border-color:#e2cbbf; background:#fbf1ed; color:#7c4a37; }
.space-journal-hero .space-banner-image {
  position:static; z-index:auto;
  opacity:1;
  width:100%; height:auto; max-height:240px; aspect-ratio:3/2;
  padding:7px; object-fit:cover;
  border:1px solid #e0d9c9; border-radius:14px;
  background:#fffdf8; box-shadow:0 1px 0 #ece6d8;
  mask-image:none;
}
.space-journal-copy:only-child { grid-column:1 / -1; max-width:46em; }
/* 没有封面时不要留一列空白：扉页退回单栏（:has 不支持时仍保持上面的跨列规则） */
.space-journal-hero:not(:has(.space-banner-image)) { grid-template-columns:minmax(0,1fr); }

/* 时间轴：同底色、文字筛选与细线，让相册照片成为视觉重点。 */
.memory-timeline { border:0; border-radius:0; background:transparent; overflow:visible; }
.memory-timeline-head {
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px;
  padding:8px 0 18px;
  background:transparent; color:#273c34;
  border-bottom:1px solid #deded5;
}
.memory-timeline .timeline-heading-badge {
  display:flex; align-items:center; gap:10px;
  justify-self:start; width:auto; margin:0; padding:0;
  border-radius:0; background:none; color:#273c34;
  font-family:"Songti SC","Noto Serif CJK SC","SimSun",serif;
  font-size:clamp(19px,2vw,23px); font-weight:500; letter-spacing:.03em;
}
.memory-timeline .timeline-heading-badge .icon { width:16px; height:16px; color:#778278; }
.memory-timeline .timeline-filters { margin:0; gap:16px; flex-wrap:wrap; }
.memory-timeline .chip {
  padding:7px 0; border:0; border-bottom:1px solid transparent; border-radius:0;
  background:transparent; color:#73796f; font-size:12px; letter-spacing:.01em;
}
.memory-timeline .chip:hover { border-bottom-color:#8a948b; background:transparent; color:#22382f; }
.memory-timeline .chip-active { border-bottom-color:#22382f; background:transparent; color:#22382f; font-weight:600; }
.memory-timeline .chip:focus-visible { outline:2px solid #526e60; outline-offset:4px; }

.memory-timeline-body { padding:4px 0 8px; }
.memory-timeline-list { display:block; margin:0; padding:0; list-style:none; }
.memory-timeline .timeline-row {
  display:grid; grid-template-columns:5.8rem minmax(0,1fr);
  align-items:center; gap:clamp(12px,2vw,26px);
  padding:15px 0; border-bottom:1px solid #eee8da;
}
.memory-timeline .timeline-row:last-child { border-bottom:0; }
.memory-timeline .timeline-date {
  flex:none; text-align:left; line-height:1.6;
  color:#a3734a; font-size:11px; letter-spacing:.1em;
  font-variant-numeric:tabular-nums;
}
.memory-timeline .timeline-date-blank { font-size:10.5px; letter-spacing:.06em; }
.memory-timeline .timeline-card {
  display:flex; align-items:center; gap:clamp(12px,1.6vw,20px);
  min-width:0; padding:0; border:0; border-radius:0; background:transparent;
}
.memory-timeline .timeline-card .album-cover-sm {
  display:block; flex:0 0 104px; width:104px; height:72px;
  border:1px solid #e5dfd1; border-radius:10px; background:#eef0e7;
  overflow:hidden; transition:border-color .18s ease;
}
.memory-timeline .timeline-card .album-cover-sm img { width:100%; height:100%; object-fit:cover; }
.memory-timeline .timeline-card .album-cover-sm svg { color:#a9b0a2; }
.memory-timeline .timeline-card-body { gap:5px; min-width:0; }
.memory-timeline .album-title {
  margin:0; font-size:17px; font-weight:600; line-height:1.45;
  letter-spacing:.01em; text-underline-offset:3px;
}
.memory-timeline .album-meta { font-size:11.5px; color:#7e7666; letter-spacing:.02em; }
.memory-timeline .timeline-card:hover .album-title { text-decoration:underline; }
.memory-timeline .timeline-card:hover .album-cover-sm { border-color:#c9bfa9; }
.memory-timeline .timeline-more { margin:16px 0 4px; text-align:center; }
.memory-timeline .empty-card { padding:34px 2px; border:0; border-radius:0; background:transparent; text-align:left; }
.memory-timeline .empty-card h2 { font-size:18px; }

/* 「日期待补充」是附录，不再抢主体注意力 */
.memory-timeline-muted .memory-timeline-head { background:#f4f1e7; color:var(--ink); border-bottom:1px solid #e6dfcf; }
.memory-timeline-muted .memory-timeline-head h2 { margin:0; font-size:16px; font-weight:600; letter-spacing:.04em; }
.memory-timeline-muted .account-hint { margin:0; color:#7e7666; }

/* 低频管理区：更低视觉重量，保留全部既有表单与路由 */
.space-journal-page :is(.space-panel,.management-section) { border-radius:4px; }
.space-journal-page details.management-section { background:transparent; border:0; border-top:1px solid #deded5; border-radius:0; padding:18px 0; box-shadow:none; }

@media (max-width:700px) {
  .space-journal-page { max-width:none; gap:18px; }
  .space-hero.space-journal-hero {
    grid-template-columns:1fr; align-items:start;
    gap:18px; padding:18px 0 20px;
  }
  .space-journal-hero h1 { font-size:27px; }
  .space-journal-hero .space-hero-sub { font-size:13px; line-height:1.9; }
  .space-journal-hero .space-banner-image { max-height:220px; aspect-ratio:16/9; }
  .memory-timeline-head { padding:6px 0 14px; gap:12px; }
  .memory-timeline .timeline-heading-badge { font-size:19px; }
  .memory-timeline-body { padding:2px 0 14px; }
  .memory-timeline .timeline-row { grid-template-columns:1fr; gap:6px; padding:14px 0; }
  .memory-timeline .timeline-date { font-size:10.5px; }
  .memory-timeline .timeline-card .album-cover-sm { flex:0 0 88px; width:88px; height:62px; }
  .memory-timeline .album-title { font-size:15.5px; }
  .memory-timeline .album-meta { font-size:11px; }
  .memory-timeline .empty-card { padding:26px 0; }
}

@media (prefers-reduced-motion:reduce) {
  .memory-timeline .timeline-card .album-cover-sm { transition:none; }
}

/* --- LOCAL-VISUAL-2 · 相册详情：旅行手记 + 照片墙 ----------------------------
   作用域仅限相册详情（.album-journal / .album-wall-grid）。
   只改视觉节奏：细边框、小圆角、等格马赛克与刊物式手记页眉。
   照片链接、图片 URL、懒加载、视频标识、分页与上传弹窗一律不动。 */
.album-journal .album-journal-hero {
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:24px; flex-wrap:wrap;
  padding:24px 0 22px;
  border:0; border-top:1px solid #ded7c7; border-bottom:1px solid #ded7c7;
  border-radius:0; background:none; box-shadow:none;
}
.album-journal .album-journal-hero h1 {
  margin:0 0 12px;
  font-family:"Songti SC","Noto Serif CJK SC","SimSun",serif;
  font-size:clamp(28px,3.2vw,42px); font-weight:600;
  line-height:1.28; letter-spacing:.02em;
}
.album-journal .album-journal-hero .eyebrow { margin:0 0 14px; color:#a3734a; font-size:10.5px; letter-spacing:.2em; }
.album-journal .album-dateline {
  margin:0; color:#a3734a; font-size:11.5px;
  letter-spacing:.09em; font-variant-numeric:tabular-nums;
}
.album-journal .album-journal-hero .space-hero-sub:not(.album-dateline) {
  margin:12px 0 0; max-width:40em; color:#6b6457; font-size:13.5px; line-height:1.95;
}
.album-journal .album-journal-hero .page-heading-actions { align-self:flex-end; }

/* 照片墙的刊物式小标题 */
.album-journal .album-wall { margin-top:2px; }
.album-journal .album-wall-head {
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:16px; flex-wrap:wrap;
  margin:0 0 16px; padding-bottom:12px;
  border-bottom:1px solid #e4ddcd;
}
.album-journal .album-wall-head h2 {
  margin:3px 0 0;
  font-family:"Songti SC","Noto Serif CJK SC","SimSun",serif;
  font-size:22px; font-weight:600; letter-spacing:.03em;
}
.album-journal .album-wall-head .section-kicker { font-size:10px; letter-spacing:.18em; color:#a3734a; }
.album-journal .album-wall-head .journal-note { font-size:11px; color:#8b8272; letter-spacing:.04em; }

/* 等格马赛克：每 7 张一次 2×2 大图，其余为方格，行高一致因此不会参差 */
.album-wall-grid {
  --wall-cell:168px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-rows:var(--wall-cell);
  grid-auto-flow:dense;
  gap:12px; margin:0; padding:0; list-style:none;
}
.album-wall-grid > .photo-card {
  position:relative; height:100%; padding:0; margin:0;
  border:1px solid #e6e0d2; border-radius:3px;
  background:#fffdf8; overflow:hidden; box-shadow:none;
  transition:border-color .18s ease;
}
.album-wall-grid > .photo-card > a { display:flex; flex-direction:column; height:100%; }
.album-wall-grid > .photo-card > a > :is(img,.photo-placeholder,.video-placeholder) {
  display:block; width:100%; flex:1 1 auto; min-height:0; height:100%;
  aspect-ratio:auto; object-fit:cover; border-radius:0;
  transition:transform .22s ease;
}
.album-wall-grid > .photo-card:nth-child(7n+1) { grid-column:span 2; grid-row:span 2; }
.album-wall-grid > .photo-card:hover { border-color:#c6b9a1; }
.album-wall-grid > .photo-card:hover > a > img { transform:scale(1.02); }
.album-wall-grid .photo-caption {
  flex:none; gap:6px; padding:9px 10px;
  border-top:1px solid #f0ebde;
  font-size:10.5px; letter-spacing:.04em; color:#8b8272;
}
.album-wall-grid .photo-owner { font-weight:600; color:#5f6558; }
.album-wall-grid .badge-tiny { border-radius:2px; }

/* 低频操作与既有面板：延续第一轮的克制圆角 */
.album-journal details.space-panel { border-radius:4px; background:#f7f4eb; border-color:#e4ddcd; }

@media (max-width:1000px) {
  .album-wall-grid { grid-template-columns:repeat(3,minmax(0,1fr)); --wall-cell:150px; }
}
@media (max-width:700px) {
  .album-journal .album-journal-hero { padding:18px 0; gap:14px; flex-direction:column; align-items:stretch; }
  .album-journal .album-journal-hero>div:first-child { width:100%; min-width:0; }
  .album-journal .album-journal-hero .page-heading-actions { align-self:stretch; justify-content:flex-start; }
  .album-journal .album-journal-hero h1 { font-size:27px; }
  .album-journal .album-journal-hero .space-hero-sub:not(.album-dateline) { font-size:12.5px; }
  .album-journal .album-wall-head { margin-bottom:12px; }
  .album-journal .album-wall-head h2 { font-size:19px; }
  .album-wall-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    --wall-cell:132px; gap:10px;
  }
  .album-wall-grid > .photo-card:nth-child(7n+1) { grid-column:span 2; grid-row:span 2; }
  .album-wall-grid .photo-caption { padding:7px 8px; font-size:10px; }
}
@media (max-width:440px) {
  .album-wall-grid { --wall-cell:124px; gap:9px; }
}

@media (prefers-reduced-motion:reduce) {
  .album-wall-grid > .photo-card,
  .album-wall-grid > .photo-card > a > :is(img,.photo-placeholder,.video-placeholder) {
    transition:none;
  }
  .album-wall-grid > .photo-card:hover > a > img { transform:none; }
}

/* --- LOCAL-VISUAL-3 · 我的空间首页：私人回忆书架 ------------------------------
   作用域仅限首页（.space-shelf / .space-shelf-hero）。
   只改版式节奏：扉页细线、首张突出、其余为带细线的条目。
   卡片结构、链接、封面、简介、计数、加入/新建入口与申请折叠区一律不动。 */
.space-hero.space-shelf-hero {
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:24px; flex-wrap:wrap;
  padding:26px 0 24px;
  border:0; border-top:1px solid #ded7c7; border-bottom:1px solid #ded7c7;
  border-radius:0; background:none; box-shadow:none;
}
.space-shelf-hero h1 {
  margin:0 0 10px;
  font-family:"Songti SC","Noto Serif CJK SC","SimSun",serif;
  font-size:clamp(28px,3.3vw,42px); font-weight:600;
  line-height:1.28; letter-spacing:.02em;
}
.space-shelf-hero .eyebrow { margin:0 0 14px; color:#a3734a; font-size:10.5px; letter-spacing:.2em; }
.space-shelf-hero .space-hero-sub { margin:0; color:#6b6457; font-size:13.5px; line-height:1.95; max-width:34em; }
.space-shelf-hero .page-heading-actions { align-items:center; gap:10px; }
.space-shelf-hero .badge {
  padding:5px 10px; border:1px solid #ded7c7; border-radius:3px;
  background:transparent; color:#7a7263; font-size:10.5px; letter-spacing:.06em;
}

/* 书架：单列条目，靠细线分节，不再是三列卡片墙 */
.space-shelf {
  display:grid; grid-template-columns:minmax(0,1fr);
  gap:0; margin:0; padding:0; list-style:none;
  border-top:1px solid #ded7c7;
}
.space-shelf > .space-card {
  height:auto; padding:0; margin:0;
  border:0; border-bottom:1px solid #e6e0d2; border-radius:0;
  background:none; box-shadow:none;
}
.space-shelf > .space-card > .space-card-link {
  display:grid; grid-template-columns:168px minmax(0,1fr);
  gap:clamp(14px,2vw,22px); align-items:start;
  padding:18px 0;
}
.space-shelf > .space-card .space-cover {
  width:168px; height:104px; border-radius:10px; border:1px solid #e6e0d2; overflow:hidden;
}
.space-shelf > .space-card .cover-art-label { font-size:10px; padding:6px 8px; gap:4px; }
.space-shelf > .space-card .private-tag {
  top:8px; left:8px; padding:3px 7px; border-radius:2px;
  background:#fffdf8e0; font-size:9.5px; letter-spacing:.04em;
}
.space-shelf > .space-card .private-tag .icon { width:11px; height:11px; }
.space-shelf .space-card-body {
  padding:0; gap:7px; min-width:0;
}
.space-shelf .space-name {
  display:flex; align-items:baseline; gap:8px;
  font-family:"Songti SC","Noto Serif CJK SC","SimSun",serif;
  font-size:19px; font-weight:600; line-height:1.4; letter-spacing:.02em;
}
.space-shelf .space-intro {
  min-height:0; font-size:12.5px; line-height:1.85; color:#6f6a5d;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.space-shelf .space-meta {
  margin:0; padding:0; border-top:0;
  font-size:10.5px; letter-spacing:.05em; color:#8b8272;
}
.space-shelf .card-arrow { font-size:14px; color:#a3734a; margin-left:auto; align-self:center; }

/* 首张：只有它真的有封面照片时才做成整幅大图。
   顺序由视图决定，第一条可能正好是“无封面/已归档”的空间；那种情况下放大只会
   得到一个三百像素高的空框，所以退回普通条目，仅略微加大标题。 */
.space-shelf > .space-card:first-child { border-bottom:1px solid #ded7c7; }
.space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) > .space-card-link {
  grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  gap:clamp(20px,3vw,40px); align-items:stretch;
  padding:0 0 28px;
}
.space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) .space-cover {
  width:100%; height:100%; min-height:300px;
  border:1px solid #e0d9c9; border-radius:14px; background:#e8ebe2;
}
.space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) .space-card-body {
  gap:12px; padding-top:6px; align-self:center;
}
.space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) .space-name {
  font-size:clamp(24px,2.6vw,32px); line-height:1.32;
}
.space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) .space-intro {
  font-size:14px; line-height:2; color:#5f6558;
  -webkit-line-clamp:4;
}
.space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) .space-meta {
  margin-top:4px; padding-top:12px; border-top:1px solid #eee8da;
  font-size:11px;
}
/* 无封面的首条：保持条目形态，只把标题放大一档 */
.space-shelf > .space-card:first-child:not(:has(.space-cover:not(.space-cover-art))) .space-name {
  font-size:22px;
}
.space-shelf > .space-card:first-child:not(:has(.space-cover:not(.space-cover-art))) .space-card-link {
  padding-block:22px;
}

/* 首页其余面板与申请区沿用前两轮的克制圆角 */
.space-main details.space-panel { border-radius:4px; background:#f7f4eb; border-color:#e4ddcd; }

@media (max-width:1000px) {
  .space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) .space-cover {
    min-height:240px;
  }
}
@media (max-width:700px) {
  .space-hero.space-shelf-hero { padding:18px 0; gap:14px; align-items:flex-start; }
  .space-shelf-hero h1 { font-size:27px; }
  .space-shelf-hero .space-hero-sub { font-size:12.5px; }
  .space-shelf > .space-card > .space-card-link {
    grid-template-columns:104px minmax(0,1fr);
    gap:12px; padding:14px 0;
  }
  .space-shelf > .space-card .space-cover { width:104px; height:78px; }
  .space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) > .space-card-link {
    grid-template-columns:minmax(0,1fr); gap:12px; padding:0 0 20px;
  }
  .space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) .space-cover {
    min-height:0; height:186px;
  }
  .space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) .space-card-body {
    padding-top:0;
  }
  .space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) .space-name { font-size:23px; }
  .space-shelf > .space-card:first-child:has(.space-cover:not(.space-cover-art)) .space-intro {
    font-size:12.5px; -webkit-line-clamp:3;
  }
  .space-shelf > .space-card:first-child:not(:has(.space-cover:not(.space-cover-art))) .space-name {
    font-size:18px;
  }
  .space-shelf .space-name { font-size:16.5px; }
  .space-shelf .space-intro { font-size:11.5px; -webkit-line-clamp:2; }
  .space-shelf .space-meta { font-size:10px; letter-spacing:.02em; }
  .space-shelf > .space-card .private-tag { display:none; }
}
@media (max-width:440px) {
  .space-shelf > .space-card > .space-card-link { grid-template-columns:92px minmax(0,1fr); }
  .space-shelf > .space-card .space-cover { width:92px; height:70px; }
}

@media (prefers-reduced-motion:reduce) {
  .space-shelf .space-card-link:hover .space-cover>img { transform:none; }
}

/* --- ALBUM-COVER-2：照片详情页的相册封面入口 ---
   只负责"放哪儿、多显眼"：桌面在主图右侧信息卡里（与主图、下载同一屏），
   手机跟在信息卡内、评论区之前；宽度由父容器决定，不产生横向溢出。 */
.media-cover-panel {
  margin-top:16px; padding:13px 14px; border:1px solid var(--line);
  background:#f2f4ed; border-radius:10px;
  display:grid; gap:8px; min-width:0;
}
.media-cover-panel h2 { margin:0; font-size:13px; letter-spacing:.02em; color:var(--ink); }
.media-cover-panel .account-hint { margin:0; font-size:11.5px; line-height:1.7; }
.media-cover-panel .alert { margin:0; padding:9px 11px; font-size:11.5px; line-height:1.6; }
.media-cover-panel form { margin:0; }
.media-meta .media-cover-panel .btn { width:100%; white-space:normal; }

@media (max-width:700px) {
  /* 手机端：主图之后、评论之前的紧凑卡片；按钮整行，避免误触。 */
  .media-cover-panel { margin-top:14px; padding:12px; border-radius:9px; gap:7px; }
  .media-cover-panel h2 { font-size:12.5px; }
  .media-cover-panel .account-hint,
  .media-cover-panel .alert { font-size:11px; }
  .media-cover-panel .alert { padding:8px 10px; }
  .media-meta .media-cover-panel .btn { width:100%; }
}

/* --- ALBUM-COVER-3：相册详情页「更换相册封面」弹窗 ---
   沿用 .join-dialog 的 heading 与 backdrop；栅格宽度全部由父容器决定，
   任何一档视口都不产生横向溢出。此段之前的所有规则一行未改。 */
.album-cover-entry {
  display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:0 0 14px; min-width:0;
}
.album-cover-entry .account-hint { margin:0; font-size:12px; }
.album-cover-dialog { width:min(720px,calc(100% - 32px)); max-width:100%; }
.album-cover-dialog .account-hint { margin:0 0 12px; font-size:12px; line-height:1.7; }
.album-cover-choices {
  list-style:none; margin:0 0 14px; padding:0; min-width:0;
  display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px;
}
.album-cover-choice { position:relative; min-width:0; }
.album-cover-choice form { margin:0; min-width:0; }
.album-cover-thumb {
  display:block; box-sizing:border-box; width:100%; max-width:100%; padding:0; margin:0;
  border:2px solid var(--line); border-radius:6px; background:var(--paper,#f7f8f3);
  cursor:pointer; overflow:hidden;
}
.album-cover-thumb img { display:block; width:100%; max-width:100%; height:auto; }
.album-cover-choice.is-current .album-cover-thumb { border-color:var(--accent); }
.album-cover-badge {
  position:absolute; left:6px; bottom:6px; padding:2px 7px; border-radius:4px;
  background:var(--accent); color:#fff; font-size:11px; line-height:1.6;
}
.album-cover-clear { margin:0; }

@media (max-width:700px) {
  .album-cover-dialog { width:calc(100% - 24px); padding:16px; }
  .album-cover-choices { grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; }
  .album-cover-entry { margin-bottom:12px; }
}
@media (max-width:440px) {
  .album-cover-choices { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* --- BATCH-MEDIA-1：当前页「管理我的照片」 ---
   勾选层只在管理模式出现；宽度全部由父容器决定，390px 动作条改为单列，
   不产生横向溢出。此段之前的所有规则一行未改。 */
.batch-manage-bar {
  display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px;
  margin:0 0 10px; min-width:0; max-width:100%;
}
.batch-manage-bar .account-hint { margin:0; font-size:12px; }
.batch-trash-form { min-width:0; max-width:100%; }
.batch-action-bar {
  display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  box-sizing:border-box; min-width:0; max-width:100%;
  margin:0 0 14px; padding:10px 12px;
  border:1px solid var(--line); border-radius:6px;
  background:var(--paper,#f7f8f3);
}
.batch-action-bar[hidden] { display:none; }
.batch-action-bar strong { font-variant-numeric:tabular-nums; }
.batch-select {
  display:none; position:absolute; top:8px; left:8px; z-index:2;
  align-items:center; gap:5px; padding:4px 8px;
  border:1px solid var(--line); border-radius:6px;
  background:rgba(255,255,255,.94); color:var(--ink);
  font-size:12px; line-height:1.5; cursor:pointer;
}
.batch-select input { width:16px; height:16px; margin:0; flex:none; }
.batch-mode-on .album-wall-grid .photo-card { position:relative; }
.batch-mode-on .batch-select { display:flex; }
.batch-mode-on .album-wall-grid .photo-card.is-mine {
  outline:2px dashed var(--accent); outline-offset:2px;
}

@media (max-width:700px) {
  .batch-action-bar { padding:9px 10px; gap:8px; max-width:100%; }
  .batch-manage-bar { gap:6px 10px; margin-bottom:8px; }
  .batch-manage-bar .account-hint { font-size:11.5px; }
}
@media (max-width:440px) {
  .batch-action-bar { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; max-width:100%; }
  .batch-action-bar .btn { width:100%; max-width:100%; box-sizing:border-box; }
  .batch-select { top:6px; left:6px; padding:3px 6px; font-size:11px; }
}

/* 全站标题与正文统一字体，保留现有布局和照片圆角。 */
.space-journal-hero h1,
.album-journal .space-hero h1,
.album-journal .album-journal-hero h1,
.album-journal .album-wall-head h2,
.media-moment h2,
.space-shelf-hero h1,
.space-shelf .space-name,
.memory-timeline .timeline-heading-badge {
  font-family:inherit;
  letter-spacing:normal;
}
