/* Thành Phố Đêm R104 — Living City / Nhật báo Nửa Đêm */
:root{--life-ink:#18202b;--life-paper:#eadfc2;--life-paper-2:#d8c9a8;--life-night:#07101e;--life-gold:#f0cd6e;--life-cyan:#7edfd0}
.overture-life-row{display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap;margin-top:13px;position:relative;z-index:8}
.overture-life-btn{appearance:none;border:1px solid rgba(240,205,110,.28);border-radius:999px;background:rgba(6,15,29,.58);color:rgba(235,226,202,.86);padding:9px 13px;font:600 10px/1 'IBM Plex Sans',sans-serif;letter-spacing:.11em;text-transform:uppercase;cursor:pointer;backdrop-filter:blur(8px);transition:.2s ease}
.overture-life-btn:hover{border-color:rgba(240,205,110,.65);color:#f6e5ad;transform:translateY(-1px)}.overture-life-btn b{color:#f0cd6e;font-weight:700}.overture-life-btn.touch b{color:#9ee4d7}.overture-life-headline{flex:1 0 100%;max-width:660px;margin:1px auto 0;appearance:none;border:0;background:transparent;color:rgba(216,224,234,.68);cursor:pointer;text-align:center;font-family:'IBM Plex Serif',serif}.overture-life-headline span{display:block;color:rgba(126,223,208,.72);font:700 8px 'IBM Plex Sans',sans-serif;letter-spacing:.16em;text-transform:uppercase}.overture-life-headline strong{display:block;margin-top:4px;font:italic 12px/1.35 'IBM Plex Serif',serif;font-weight:400}.overture-life-headline:hover strong{color:#f0d996}
.tpd-life-dock{position:fixed;left:16px;bottom:20px;z-index:60;display:flex;gap:8px;align-items:center;pointer-events:none}.tpd-life-dock>*{pointer-events:auto}.show-overture .tpd-life-dock{display:none}
.tpd-life-chip{appearance:none;display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:8px 12px;border:1px solid rgba(240,205,110,.3);border-radius:999px;background:rgba(6,15,29,.9);color:#e8dfc7;box-shadow:0 12px 34px rgba(0,0,0,.3);backdrop-filter:blur(12px);cursor:pointer;font:600 11px 'IBM Plex Sans',sans-serif}.tpd-life-chip:hover{border-color:rgba(240,205,110,.65);transform:translateY(-1px)}.tpd-life-chip .life-gold{color:#f0cd6e}.tpd-life-chip .life-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:rgba(240,205,110,.14);color:#f0cd6e;font-size:10px}.tpd-life-chip.touch{border-color:rgba(126,223,208,.28)}.tpd-life-chip.touch .life-count{background:rgba(126,223,208,.12);color:#9ee4d7}
.tpd-life-backdrop{position:fixed;inset:0;z-index:100120;background:rgba(3,7,12,.76);backdrop-filter:blur(7px);animation:lifeFade .18s ease both}.tpd-paper-shell{position:fixed;inset:18px;z-index:100121;display:grid;place-items:center;pointer-events:none}.tpd-midnight-paper{pointer-events:auto;position:relative;width:min(1100px,100%);max-height:calc(100dvh - 36px);overflow:auto;border:1px solid rgba(54,45,33,.52);border-radius:5px;background:var(--life-paper);color:var(--life-ink);box-shadow:0 34px 110px rgba(0,0,0,.68);font-family:'IBM Plex Serif',serif;animation:paperRise .25s ease both}
.tpd-midnight-paper:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.22;mix-blend-mode:multiply;background-image:radial-gradient(circle at 18% 22%,rgba(82,65,42,.2) 0 .6px,transparent .8px),radial-gradient(circle at 78% 66%,rgba(82,65,42,.16) 0 .6px,transparent .8px);background-size:7px 7px,11px 11px}
.tpd-paper-inner{position:relative;padding:28px 32px 34px}.tpd-paper-topline{display:flex;justify-content:space-between;gap:16px;align-items:flex-end;padding-bottom:8px;border-bottom:1px solid rgba(24,32,43,.55);font:700 10px 'IBM Plex Sans',sans-serif;letter-spacing:.14em;text-transform:uppercase}.tpd-paper-masthead{margin:10px 0 5px;text-align:center;font:400 clamp(34px,5.8vw,72px)/.9 'Special Elite',serif;letter-spacing:.045em}.tpd-paper-subline{display:flex;justify-content:space-between;gap:16px;padding:7px 0 12px;border-top:3px double rgba(24,32,43,.72);border-bottom:1px solid rgba(24,32,43,.46);font:600 10px 'IBM Plex Sans',sans-serif;text-transform:uppercase;letter-spacing:.09em}.tpd-paper-close{position:sticky;float:right;top:10px;z-index:4;width:36px;height:36px;margin:-18px -18px 0 0;border:1px solid rgba(24,32,43,.35);border-radius:50%;background:rgba(235,223,194,.92);color:#18202b;cursor:pointer;font-size:20px}.tpd-paper-lead{margin:18px 0 20px;font:italic 20px/1.52 'IBM Plex Serif',serif;text-align:center;padding:0 min(8vw,80px)}
.tpd-paper-grid{display:grid;grid-template-columns:1.18fr .82fr;gap:24px;border-top:1px solid rgba(24,32,43,.42);padding-top:18px}.tpd-paper-col+.tpd-paper-col{border-left:1px solid rgba(24,32,43,.36);padding-left:24px}.tpd-paper-section{margin-bottom:21px}.tpd-paper-kicker{font:800 10px 'IBM Plex Sans',sans-serif;letter-spacing:.15em;text-transform:uppercase;border-bottom:2px solid rgba(24,32,43,.75);padding-bottom:5px;margin-bottom:9px}.tpd-paper-story{appearance:none;width:100%;display:block;text-align:left;border:0;border-bottom:1px solid rgba(24,32,43,.22);background:transparent;color:inherit;padding:10px 0;cursor:pointer}.tpd-paper-story:last-child{border-bottom:0}.tpd-paper-story:hover .tpd-paper-title{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}.tpd-paper-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:#615746;font:700 9px 'IBM Plex Sans',sans-serif;text-transform:uppercase;letter-spacing:.09em}.tpd-paper-title{display:block;margin-top:5px;font:700 19px/1.15 'IBM Plex Serif',serif}.tpd-paper-text{display:block;margin-top:6px;color:#39382f;font:14px/1.52 'IBM Plex Serif',serif}.tpd-paper-scene{padding:14px 15px;border:2px solid rgba(24,32,43,.7);background:rgba(255,255,255,.08)}.tpd-paper-scene .tpd-paper-title{font-size:23px}.tpd-paper-scene-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}.tpd-paper-action{appearance:none;border:1px solid rgba(24,32,43,.48);background:transparent;color:#18202b;border-radius:2px;padding:7px 10px;cursor:pointer;font:700 10px 'IBM Plex Sans',sans-serif;text-transform:uppercase;letter-spacing:.07em}.tpd-paper-action:hover{background:#18202b;color:#eadfc2}.tpd-paper-timeline{display:grid;gap:0}.tpd-paper-timeline .tpd-paper-story{display:grid;grid-template-columns:55px 1fr;gap:10px}.tpd-paper-time{font:700 11px 'Special Elite',monospace}.tpd-paper-memory{background:rgba(76,66,48,.06);padding:0 10px}.tpd-paper-touchline{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid rgba(24,32,43,.36)}.tpd-paper-touchstat{padding:10px 7px;text-align:center;border-right:1px solid rgba(24,32,43,.28)}.tpd-paper-touchstat:last-child{border-right:0}.tpd-paper-touchstat b{display:block;font:700 19px 'Special Elite',monospace}.tpd-paper-touchstat span{display:block;margin-top:3px;font:700 8px 'IBM Plex Sans',sans-serif;text-transform:uppercase;letter-spacing:.08em}.tpd-paper-personal{margin-top:12px;padding:9px 11px;border:1px dashed rgba(24,32,43,.36);font:italic 12px/1.5 'IBM Plex Serif',serif}.tpd-paper-foot{margin-top:20px;padding-top:10px;border-top:3px double rgba(24,32,43,.65);color:#5d5548;font:10px/1.5 'IBM Plex Sans',sans-serif;text-align:center}
.tpd-touch-shell{position:fixed;inset:0;z-index:100121;display:grid;place-items:center;padding:18px;pointer-events:none}.tpd-touch-card{pointer-events:auto;width:min(520px,100%);border:1px solid rgba(126,223,208,.25);border-radius:22px;background:linear-gradient(180deg,#10213a,#07111f);color:#e7edf5;box-shadow:0 34px 100px rgba(0,0,0,.62);padding:20px}.tpd-touch-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.tpd-touch-head strong{color:#f0cd6e;font:24px 'Special Elite',serif}.tpd-touch-head p{margin:7px 0 0;color:#9eacc2;font:13px/1.5 'IBM Plex Serif',serif}.tpd-touch-close{border:1px solid #334762;background:#09172a;color:#dfe8f5;border-radius:50%;width:34px;height:34px;cursor:pointer}.tpd-touch-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:17px}.tpd-touch-action{appearance:none;min-height:104px;padding:14px;border:1px solid rgba(255,255,255,.1);border-radius:16px;background:rgba(19,37,64,.74);color:#e7edf5;text-align:left;cursor:pointer}.tpd-touch-action:hover{border-color:rgba(240,205,110,.42);transform:translateY(-1px)}.tpd-touch-action i{font-style:normal;font-size:24px}.tpd-touch-action b{display:block;margin-top:8px;color:#f2e1ad;font:600 14px 'IBM Plex Sans',sans-serif}.tpd-touch-action span{display:block;margin-top:4px;color:#91a1ba;font:12px/1.4 'IBM Plex Serif',serif}.tpd-touch-stats{margin-top:14px;padding-top:12px;border-top:1px solid rgba(255,255,255,.08);color:#8fa2bd;font:11px/1.55 'IBM Plex Sans',sans-serif}.tpd-touch-result{min-height:20px;margin-top:10px;color:#9ee4d7;font:12px/1.45 'IBM Plex Sans',sans-serif}
.tpd-life-moment{position:fixed;left:18px;bottom:74px;z-index:58;width:min(390px,calc(100vw - 28px));border:1px solid rgba(240,205,110,.25);border-radius:18px;background:linear-gradient(180deg,rgba(13,29,51,.95),rgba(6,15,29,.96));box-shadow:0 18px 55px rgba(0,0,0,.42);color:#dfe7f3;padding:14px 15px;backdrop-filter:blur(12px);animation:momentIn .35s ease both}.show-overture .tpd-life-moment{display:none}.tpd-life-moment .moment-kicker{display:flex;justify-content:space-between;gap:8px;color:#8ea1bb;font:700 9px 'IBM Plex Sans',sans-serif;letter-spacing:.12em;text-transform:uppercase}.tpd-life-moment .moment-title{display:block;margin-top:7px;color:#f0cd6e;font:600 15px/1.3 'IBM Plex Serif',serif}.tpd-life-moment p{margin:6px 0 0;color:#aebbd0;font:12px/1.5 'IBM Plex Serif',serif}.tpd-life-moment .moment-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.tpd-life-moment button{appearance:none;border:1px solid #31445f;border-radius:999px;background:#0b192d;color:#cfd9e8;padding:6px 9px;cursor:pointer;font:600 10px 'IBM Plex Sans',sans-serif}.tpd-life-moment button:hover{border-color:rgba(240,205,110,.46);color:#f0cd6e}.tpd-life-moment .moment-x{position:absolute;right:9px;top:8px;border:0;background:transparent;padding:3px;color:#7f91aa;font-size:16px}
.tpd-life-toast{position:fixed;left:50%;bottom:24px;z-index:100250;transform:translateX(-50%);padding:10px 14px;border:1px solid rgba(126,223,208,.28);border-radius:999px;background:rgba(7,17,31,.95);color:#dce8f2;box-shadow:0 16px 45px rgba(0,0,0,.45);font:600 11px 'IBM Plex Sans',sans-serif;animation:toastLife 2.8s ease both}.tpd-fx{position:fixed;z-index:100210;pointer-events:none}.tpd-fx.light{width:18px;height:18px;border-radius:50%;background:#f0cd6e;box-shadow:0 0 18px #f0cd6e,0 0 48px rgba(240,205,110,.75);animation:fxLight 1.25s ease-out both}.tpd-fx.bell{width:26px;height:26px;border:1px solid rgba(126,223,208,.9);border-radius:50%;animation:fxBell 1.4s ease-out both}.tpd-fx.footstep{font-size:20px;animation:fxFoot 1.7s ease-out both}.tpd-fx.memory{font-size:23px;filter:drop-shadow(0 0 12px rgba(240,205,110,.5));animation:fxMemory 1.5s ease-out both}
@keyframes lifeFade{from{opacity:0}to{opacity:1}}@keyframes paperRise{from{opacity:0;transform:translateY(18px) scale(.985)}to{opacity:1;transform:none}}@keyframes momentIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@keyframes toastLife{0%{opacity:0;transform:translate(-50%,10px)}12%,82%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-6px)}}@keyframes fxLight{0%{opacity:0;transform:scale(.2)}35%{opacity:1}100%{opacity:0;transform:scale(3.4)}}@keyframes fxBell{0%{opacity:1;transform:scale(.2)}100%{opacity:0;transform:scale(6)}}@keyframes fxFoot{0%{opacity:0;transform:translate(0,12px) rotate(-12deg)}25%{opacity:1}100%{opacity:0;transform:translate(70px,-24px) rotate(8deg)}}@keyframes fxMemory{0%{opacity:0;transform:translateY(8px) scale(.7)}25%{opacity:1}100%{opacity:0;transform:translateY(-70px) scale(1.25)}}
@media(max-width:820px){.tpd-life-dock{left:10px;bottom:11px}.tpd-life-chip{padding:8px 10px}.tpd-life-chip .life-label{display:none}.tpd-life-moment{left:10px;bottom:61px}.tpd-paper-shell{inset:8px}.tpd-midnight-paper{max-height:calc(100dvh - 16px);border-radius:3px}.tpd-paper-inner{padding:20px 17px 24px}.tpd-paper-grid{grid-template-columns:1fr;gap:4px}.tpd-paper-col+.tpd-paper-col{border-left:0;padding-left:0;border-top:1px solid rgba(24,32,43,.38);padding-top:18px}.tpd-paper-lead{padding:0;font-size:17px}.tpd-paper-masthead{font-size:40px}.tpd-paper-touchline{grid-template-columns:repeat(2,1fr)}.tpd-paper-touchstat:nth-child(2){border-right:0}.tpd-paper-touchstat:nth-child(-n+2){border-bottom:1px solid rgba(24,32,43,.28)}.tpd-touch-actions{grid-template-columns:1fr 1fr}.overture-life-row{margin-top:9px}.overture-life-btn{font-size:8.5px;padding:8px 10px}}
@media(max-width:520px){.tpd-touch-actions{grid-template-columns:1fr}.tpd-touch-action{min-height:82px}.tpd-paper-topline,.tpd-paper-subline{font-size:8px}.tpd-paper-story{padding:9px 0}.tpd-paper-title{font-size:17px}.tpd-paper-text{font-size:13px}.tpd-paper-timeline .tpd-paper-story{grid-template-columns:48px 1fr}.overture-life-btn.touch{display:none}}
@media(prefers-reduced-motion:reduce){.tpd-midnight-paper,.tpd-life-backdrop,.tpd-life-moment,.tpd-life-toast,.tpd-fx{animation-duration:.01ms!important;animation-iteration-count:1!important}}
@media(max-width:820px){.tpd-life-dock{bottom:calc(74px + env(safe-area-inset-bottom))}.tpd-life-moment{bottom:calc(123px + env(safe-area-inset-bottom))}}
@media(max-height:680px) and (min-width:701px){.overture-life-row{margin-top:5px}.overture-life-headline{display:none}.overture-life-btn{padding:7px 10px;font-size:8px}.overture-life-btn.touch{display:none}}
@media(max-height:560px){.overture-life-headline{display:none}.overture-life-btn.touch{display:none}.overture-life-row{margin-top:5px}}

/* R104.1 — deep touch trails */
.tpd-touch-card{width:min(680px,100%)}
.tpd-touch-actions{grid-template-columns:repeat(3,1fr)}
.tpd-touch-action{min-height:112px}
.tpd-touch-trails{margin-top:14px;padding:12px;border:1px solid rgba(126,223,208,.12);border-radius:14px;background:rgba(6,15,29,.34)}
.tpd-touch-trails>b{display:block;margin-bottom:8px;color:#7edfd0;font:700 9px 'IBM Plex Sans',sans-serif;letter-spacing:.12em}
.tpd-touch-trails.empty{color:#7f91aa;font:12px 'IBM Plex Serif',serif}
.tpd-touch-trace{display:grid;grid-template-columns:52px 1fr;gap:9px;align-items:start;padding:7px 0;border-top:1px solid rgba(255,255,255,.06)}
.tpd-touch-trace:first-of-type{border-top:0}.tpd-touch-trace>span{color:#f0cd6e;font:700 10px 'Special Elite',monospace}.tpd-touch-trace p{margin:0;color:#9eacc2;font:11px/1.45 'IBM Plex Serif',serif}.tpd-touch-trace.own p{color:#bfe7dc}.tpd-touch-trace.own>span{color:#9ee4d7}
.tpd-trace-peek{position:fixed;left:18px;bottom:68px;z-index:57;width:min(390px,calc(100vw - 28px));appearance:none;border:1px solid rgba(126,223,208,.16);border-radius:13px;background:rgba(7,17,31,.88);box-shadow:0 14px 40px rgba(0,0,0,.28);padding:9px 11px;text-align:left;backdrop-filter:blur(10px);cursor:pointer}.show-overture .tpd-trace-peek{display:none}.tpd-trace-peek>span{display:block;color:#7edfd0;font:700 8px 'IBM Plex Sans',sans-serif;letter-spacing:.14em}.tpd-trace-peek strong{display:block;margin-top:3px;color:#aebbd0;font:400 11px/1.38 'IBM Plex Serif',serif}.tpd-trace-peek:hover{border-color:rgba(240,205,110,.34)}.tpd-trace-peek:hover strong{color:#e9dfc3}
.tpd-paper-touchline{grid-template-columns:repeat(3,1fr)}.tpd-paper-touchstat:nth-child(3n){border-right:0}.tpd-paper-touchstat:nth-child(-n+3){border-bottom:1px solid rgba(24,32,43,.28)}
.tpd-fx.bench{width:9px;height:9px;border-radius:50%;background:rgba(240,205,110,.78);box-shadow:0 0 18px rgba(240,205,110,.42);animation:fxMemory 1.4s ease-out both}.tpd-fx.flower{font-size:18px;animation:fxMemory 1.5s ease-out both}
@media(max-width:820px){.tpd-trace-peek{left:10px;bottom:calc(122px + env(safe-area-inset-bottom));width:min(360px,calc(100vw - 20px))}.tpd-touch-actions{grid-template-columns:repeat(2,1fr)}.tpd-paper-touchline{grid-template-columns:repeat(2,1fr)}.tpd-paper-touchstat:nth-child(3n){border-right:1px solid rgba(24,32,43,.28)}.tpd-paper-touchstat:nth-child(2n){border-right:0}.tpd-paper-touchstat:nth-child(-n+4){border-bottom:1px solid rgba(24,32,43,.28)}}
@media(max-width:520px){.tpd-touch-actions{grid-template-columns:1fr}.tpd-touch-card{max-height:calc(100dvh - 24px);overflow:auto}.tpd-trace-peek{display:none}}

/* R105 — one balanced dock: newspaper/new + touch; no extra floating trace card */
.tpd-life-dock{left:14px;bottom:18px;gap:8px;align-items:stretch}
.tpd-life-chip{height:42px;min-height:42px;padding:8px 11px;box-sizing:border-box;justify-content:center}
.tpd-life-chip .life-icon{width:18px;text-align:center;line-height:1}
.tpd-life-chip.paper,.tpd-life-chip.touch{min-width:112px}
.tpd-life-chip.paper .life-count{background:rgba(240,205,110,.14);color:#f0cd6e}
.tpd-trace-peek{display:none!important}
@media(max-width:820px){
 .tpd-life-dock{left:12px;bottom:calc(78px + env(safe-area-inset-bottom));gap:8px}
 .tpd-life-chip{height:44px;min-height:44px;padding:8px 10px;border-radius:17px}
 .tpd-life-chip.paper,.tpd-life-chip.touch{min-width:112px}
 .tpd-life-chip .life-label{display:inline!important;font-size:11px}
 .tpd-life-chip .life-count{min-width:22px;height:22px;padding:0 6px}
}
@media(max-width:390px){.tpd-life-chip.paper,.tpd-life-chip.touch{min-width:102px}.tpd-life-chip{gap:6px;padding:7px 8px}.tpd-life-chip .life-label{font-size:10px}}
/* R105 — recent activity lives inside the same Mới · Chạm panel */
.tpd-touch-recent{margin-top:14px;padding:11px 12px;border:1px solid rgba(240,205,110,.13);border-radius:14px;background:rgba(240,205,110,.035)}
.tpd-touch-recent>b{display:block;margin-bottom:7px;color:#f0cd6e;font:700 9px 'IBM Plex Sans',sans-serif;letter-spacing:.12em}
.tpd-touch-recent button{display:grid;width:100%;grid-template-columns:minmax(90px,.45fr) 1fr;gap:8px;padding:7px 0;border:0;border-top:1px solid rgba(255,255,255,.055);background:transparent;text-align:left;color:#dce6f3;cursor:pointer}.tpd-touch-recent button:first-of-type{border-top:0}.tpd-touch-recent button span{font:600 11px/1.3 'IBM Plex Sans',sans-serif;color:#d9e3ee}.tpd-touch-recent button small{font:11px/1.35 'IBM Plex Serif',serif;color:#8fa1b9;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tpd-touch-recent button:hover span{color:#f0d996}
@media(max-width:520px){.tpd-touch-recent button{grid-template-columns:1fr}.tpd-touch-recent button small{white-space:normal}.tpd-life-chip.paper{min-width:105px}.tpd-life-chip.touch{min-width:126px}}
