/* Scoped so neither reader's article/editor styles leak into card controls. */
.news-thought { margin:28px 0 44px; padding:0; font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; color:#1d2129; }
.news-thought [hidden] { display:none !important; }
.news-thought .news-thought-open { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 24px; width:100%; border:1px solid #cce4dc; border-radius:12px; background:#f3f9f6; color:#195f4b; padding:20px 24px; text-align:left; font:500 18px/1.6 system-ui,sans-serif; cursor:pointer; box-shadow:none; }
.news-thought-open span { font:600 18px/1.6 system-ui,sans-serif; }
.news-thought-open b { font:500 16px/1.6 system-ui,sans-serif; white-space:nowrap; }
.news-thought .news-thought-editor { padding:24px; margin-top:10px; border:1px solid #dfe9e3; border-radius:12px; background:#fff; }
.news-thought .news-thought-field { display:block; margin:0 0 18px; color:#263a31; font:600 17px/1.6 system-ui,sans-serif; }
.news-thought textarea,.news-thought input { display:block; width:100%; max-width:100%; min-width:0; box-sizing:border-box; margin-top:8px; padding:14px 16px; color:#1d2129; background:#fff; border:1px solid #bfcfc6; border-radius:8px; font:400 18px/1.85 system-ui,-apple-system,"PingFang SC",sans-serif; resize:vertical; }
.news-thought textarea:focus,.news-thought input:focus { outline:2px solid #2fc4a0; outline-offset:2px; }
.news-thought .news-summary-edit { margin:18px 0; border:0; padding:0; }
.news-thought .news-summary-edit summary { padding:8px 0; color:#226d56; cursor:pointer; font:500 16px/1.6 system-ui,sans-serif; }
.news-thought .news-summary-edit p,.news-thought .news-thought-note,.news-thought .news-card-save-help { margin:10px 0 0; color:#647169; font:400 14px/1.7 system-ui,sans-serif; }
.news-thought .news-thought-author { max-width:360px; }
.news-thought .news-thought-actions { display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin:18px 0 0; }
.news-thought .news-card-generate,.news-thought .news-card-save { display:inline-flex; justify-content:center; align-items:center; box-sizing:border-box; min-height:46px; padding:12px 22px; border:0; border-radius:8px; background:#2fc4a0; color:#113e30; font:600 17px/1.4 system-ui,sans-serif; text-decoration:none; cursor:pointer; }
.news-thought button:disabled { cursor:default; opacity:.55; }
.news-thought .news-thought-count { color:#647169; font:400 14px/1.6 system-ui,sans-serif; }
.news-thought .news-thought-error { color:#a73b30; font:500 16px/1.6 system-ui,sans-serif; margin:8px 0; }
.news-thought .news-card-result { margin-top:20px; }
.news-thought .news-card-reopen { border:1px solid #b8b09f; border-radius:6px; background:#f6f1e7; color:#3d5245; padding:12px 18px; font:500 16px/1.6 system-ui,sans-serif; cursor:pointer; }
/* The export studio lives in the top layer, above either reader's dialog. */
dialog.news-card-studio { --card-serif:"Noto Serif SC","Songti SC","STSong",Georgia,serif; --studio-accent:#3d5245; position:fixed; inset:0; width:100%; height:100%; height:100dvh; max-width:none; max-height:none; box-sizing:border-box; padding:0; margin:0; border:0; border-radius:0; background:#e8e4db; color:#2b2724; overflow:hidden; box-shadow:none; font:400 16px/1.8 var(--card-serif); }
.news-card-studio::backdrop { background:#2b272466; }
.news-card-studio *, .news-card-studio *::before, .news-card-studio *::after { box-sizing:border-box; }
.news-card-studio[data-style="evening"] { --studio-accent:#79563c; }
.news-card-studio[data-style="ink"] { --studio-accent:#4a6254; }
.news-card-studio[data-style="journal"] { --studio-accent:#917153; }
.news-card-studio .news-card-studio-top { position:absolute; z-index:3; inset:0 0 auto; display:flex; justify-content:space-between; align-items:center; gap:20px; height:76px; padding:14px 32px; background:linear-gradient(#e8e4db 65%,#e8e4db00); color:#7a7267; font:400 15px/1.8 var(--card-serif); }
.news-card-studio .news-card-close { display:flex; align-items:center; gap:18px; border:1px solid #c5bdaf; border-radius:24px; padding:8px 16px; color:#534c43; background:#f6f1e7bd; font:400 14px/1.8 var(--card-serif); cursor:pointer; box-shadow:none; }
.news-card-close span { font:300 24px/1 system-ui,sans-serif; }
.news-card-studio .news-card-stage { height:100%; overflow:auto; overscroll-behavior:contain; padding:100px 32px 220px; scrollbar-gutter:stable both-edges; }
.news-card-studio .news-card-paper { position:relative; isolation:isolate; width:min(100%,620px); margin:0 auto; background:#f6f1e7; box-shadow:0 1px 3px #3d322514,3px 4px 0 -1px #f1ecdf,3px 4px 1px #74695730,6px 8px 0 -2px #eae4d7,6px 8px 1px -1px #74695726,0 16px 40px #3d322517; transition:background .3s ease,box-shadow .3s ease; }
.news-card-studio .news-card-image,.news-card-studio .news-card-image-outgoing { display:block; width:100%; max-width:100%; height:auto; padding:0; margin:0; border:0; border-radius:0; box-shadow:none; -webkit-touch-callout:default; }
.news-card-studio .news-card-image-outgoing { position:absolute; inset:0 auto auto 0; z-index:1; pointer-events:none; transition:opacity .3s ease; }
.news-card-studio .news-card-image-outgoing.is-fading { opacity:0; }
.news-card-studio .news-card-save-help { margin:24px 0 0; text-align:center; color:#7a7267; font:400 13px/1.8 var(--card-serif); }
.news-card-studio .news-card-dock { position:absolute; z-index:4; left:50%; bottom:max(22px,env(safe-area-inset-bottom)); transform:translateX(-50%); display:flex; align-items:center; gap:18px; width:min(752px,calc(100% - 40px)); padding:12px 18px 12px 10px; border:1px solid #ffffff9e; border-radius:22px; background:#f9f6efdb; -webkit-backdrop-filter:blur(24px) saturate(1.15); backdrop-filter:blur(24px) saturate(1.15); box-shadow:0 8px 36px #3d32251a,inset 0 1px #fff9; }
.news-card-studio .news-card-styles { position:relative; display:flex; align-items:center; gap:8px; flex:1; min-width:0; padding:7px var(--snap-pad,8px); overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scroll-behavior:smooth; scrollbar-width:none; overscroll-behavior-x:contain; }
.news-card-styles::-webkit-scrollbar { display:none; }
.news-card-studio .news-card-style { flex:0 0 92px; display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; margin:0; padding:4px 0; border:0; border-radius:8px; background:transparent; color:#7a7267; font:400 13px/1.6 var(--card-serif); cursor:pointer; scroll-snap-align:center; box-shadow:none; }
.news-card-studio .news-card-swatch { --swatch-paper:#f6f1e7; --swatch-ink:#3d5245; position:relative; display:block; width:61px; height:76px; padding:8px 7px; text-align:left; background:var(--swatch-paper); color:var(--swatch-ink); border:1px solid #c8bfaf; border-radius:1px; box-shadow:1px 2px 3px #4b3c2621; transition:transform .3s ease,box-shadow .3s ease,outline-color .3s ease; outline:1px solid transparent; outline-offset:3px; }
.news-card-swatch::after { content:""; position:absolute; inset:0; background:url("nfc-paper-grain.svg"); opacity:.07; pointer-events:none; }
.news-card-swatch i { display:block; padding:2px 0; border-top:1px solid #82735c66; border-bottom:1px solid #82735c66; font:600 5px/1.5 Georgia,serif; letter-spacing:.4px; }
.news-card-swatch b { display:block; margin-top:4px; font:600 8px/1.8 var(--card-serif); }
.news-card-swatch em { display:block; width:100%; height:1px; margin-top:3px; background:var(--swatch-ink); opacity:.22; }
.news-card-swatch em+em { width:72%; }
.news-card-swatch strong { display:block; margin-top:6px; padding-left:4px; border-left:1px solid var(--swatch-ink); font:400 5px/1.7 var(--card-serif); }
.news-card-style[data-style="evening"] .news-card-swatch { --swatch-paper:#eee3d0; --swatch-ink:#79563c; border:3px double #ab967a; padding:6px 5px; }
.news-card-style[data-style="ink"] .news-card-swatch { --swatch-paper:#f8f6ee; --swatch-ink:#4a6254; padding:10px 8px; }
.news-card-style[data-style="journal"] .news-card-swatch { --swatch-paper:#f8f3e9; --swatch-ink:#917153; background:repeating-linear-gradient(transparent 0 8px,#c8b8a333 8px 9px),var(--swatch-paper); }
.news-card-studio .news-card-style[aria-pressed="true"] { color:var(--studio-accent); font-weight:600; }
.news-card-style[aria-pressed="true"] .news-card-swatch { transform:scale(1.05); outline-color:var(--swatch-ink); box-shadow:1px 3px 7px #4b3c2629; }
.news-card-studio .news-card-export { display:flex; flex:0 0 214px; min-width:0; flex-direction:column; justify-content:center; align-items:center; gap:8px; padding-left:18px; border-left:1px solid #c8bfaf80; }
.news-card-studio .news-card-save { display:flex; align-items:center; justify-content:center; gap:12px; min-height:50px; width:100%; padding:12px 14px; border:1px solid transparent; border-radius:10px; background:var(--studio-accent); color:#faf7ef; text-decoration:none; font:500 15px/1.8 var(--card-serif); cursor:pointer; transition:background .3s ease; }
.news-card-save[aria-disabled="true"] { pointer-events:none; opacity:.5; }
.news-card-studio .news-card-style-status { color:#7a7267; font:400 11px/1.6 var(--card-serif); text-align:center; }
.news-card-studio :is(button,a):focus-visible { outline:2px solid var(--studio-accent); outline-offset:3px; }
.news-card-studio .news-card-studio-error { position:absolute; z-index:5; bottom:174px; left:20px; right:20px; margin:0; padding:0; text-align:center; color:#983e2e; font:400 15px/1.8 system-ui,sans-serif; }
.news-card-studio .news-card-studio-error:not(:empty) { padding:10px; background:#fff9ed; border:1px solid #b8b09f; border-radius:8px; }
.news-card-studio.is-verifying :is(.news-card-stage,.news-card-dock) { visibility:hidden; }
.news-card-studio.is-verifying::after { content:"正在确认登录状态…"; position:absolute; inset:45% 0 auto; text-align:center; color:#7a7267; }
@media(max-width:600px){
  .news-thought { margin:22px 0 32px; }
  .news-thought .news-thought-open { padding:16px; }
  .news-thought .news-thought-editor { padding:16px; }
  .news-thought-open b { font-size:15px; }
  .news-thought .news-thought-actions { gap:10px; }
  .news-thought .news-card-save { width:100%; }
  .news-card-studio .news-card-studio-top { height:65px; padding:10px 18px; font-size:14px; }
  .news-card-studio .news-card-stage { padding:82px 18px 206px; scrollbar-gutter:auto; }
  .news-card-studio .news-card-dock { width:calc(100% - 24px); bottom:max(12px,env(safe-area-inset-bottom)); gap:6px; padding:8px 10px 8px 4px; border-radius:18px; }
  .news-card-studio .news-card-export { flex-basis:134px; padding-left:10px; }
  .news-card-studio .news-card-save { font-size:14px; line-height:1.8; gap:4px; padding:10px 7px; }
  .news-card-save span { display:none; }
  .news-card-studio .news-card-style-status { font-size:10px; }
  .news-card-studio .news-card-studio-error { bottom:166px; }
}
@media(prefers-reduced-motion:reduce){
  .news-card-studio .news-card-styles { scroll-behavior:auto; }
  .news-card-studio .news-card-swatch,.news-card-studio .news-card-image-outgoing,.news-card-studio .news-card-paper,.news-card-studio .news-card-save { transition:none; }
}
@media print { .news-card-studio :is(.news-card-dock,.news-card-studio-top,.news-card-save-help) { display:none; } }
