/* QRflick HQ: the sidebar, the pages and the motion. Base pieces (buttons, cards, calendar, drawer) are in hq.css. */

/* --- sidebar ---------------------------------------------------------------------------------------------- */
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 16px 10px;
  border-right: 1px solid var(--line); background: var(--card); }
.nav .logo { padding: 4px 10px 16px; font-size: 18px; } .nav .logo span { color: var(--muted); font-weight: 650; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--muted);
  text-decoration: none; font-weight: 650; transition: background .2s, color .2s, transform .2s; }
.nav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none;
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.nav a:hover { background: var(--soft); color: var(--ink); } .nav a:hover svg { transform: scale(1.12) rotate(-4deg); }
.nav a.active { background: color-mix(in srgb, var(--brand) 13%, transparent); color: var(--brand); }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--brand); animation: grow .35s ease both; }
.nav .count { margin-left: auto; } .count.bad { background: var(--bad); }
.nav-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: 0 6px; font-variant-numeric: tabular-nums; }

/* --- live bits -------------------------------------------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 6px; }
.pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.beat { width: 7px; height: 7px; border-radius: 50%; background: currentColor; position: relative; display: inline-block; flex: none; }
.pill.on .beat::after, .eyebrow .beat::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: ping 1.8s ease-out infinite; }
.pill.off .beat { animation: none; }
.plat .dot { background: var(--busy); } .plat.on .dot { background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.counting { color: var(--brand); }

/* --- page entrance ---------------------------------------------------------------------------------------- */
.page { display: flex; flex-direction: column; gap: 14px; }
.page.enter .rise { animation: rise .55s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.page.enter .draw { stroke-dasharray: 1; animation: draw 1.4s cubic-bezier(.4, 0, .2, 1) .25s both; }
.page.enter .area { animation: fade 1s ease .6s both; } .page.enter .end { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) 1.4s both; }
.bar-fill { width: var(--w); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.page.enter .bar-fill { animation: barIn 1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.2s + var(--i, 0) * 70ms); }
.page.enter .cols i { animation: colIn .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 18ms); }

/* --- overview ---------------------------------------------------------------------------------------------- */
.ov-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; }
.hero { display: flex; gap: 18px; align-items: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--card)), var(--card) 60%); }
.hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%); animation: drift 9s ease-in-out infinite alternate; pointer-events: none; }
.hero-media { position: relative; flex: none; width: 118px; height: 168px; border-radius: 14px; background: var(--soft) center / cover no-repeat;
  display: grid; place-items: center; font-size: 34px; box-shadow: 0 10px 26px rgba(15, 23, 42, .18); }
.ring { position: absolute; right: -14px; bottom: -14px; width: 50px; height: 50px; transform: rotate(-90deg);
  background: var(--card); border-radius: 50%; box-shadow: var(--shadow); }
.ring circle { fill: none; stroke-width: 4; } .ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s linear; }
.hero-body { display: grid; gap: 6px; min-width: 0; position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.hero-hook { font-size: 19px; line-height: 1.25; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero .btn { justify-self: start; }
.cd { display: flex; align-items: flex-end; gap: 6px; margin: 4px 0; }
.cd-u { display: grid; justify-items: center; }
.cd-u b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; min-width: 1.3em; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 5px; box-shadow: var(--shadow); }
.cd-u b.flip { animation: flip .45s cubic-bezier(.3, 1.4, .5, 1); }
.cd-u i { font-style: normal; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.cd-sep { font-size: 26px; font-weight: 800; color: var(--muted); padding-bottom: 26px; animation: blink 1s steps(1) infinite; }
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 3px; vertical-align: middle; }
.pdot.t-failed { outline: 2px solid var(--bad); } .pdot.t-waiting, .pdot.t-pending { opacity: .45; }

.pipe { display: flex; align-items: center; gap: 0; margin: 6px 0 10px; }
.stage { flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 12px 2px; line-height: 1.2; border-radius: 12px; text-decoration: none; color: var(--muted);
  background: var(--soft); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), background .2s; font-size: 11.5px; font-weight: 650; text-align: center; }
.stage b { font-size: 24px; color: var(--ink); font-variant-numeric: tabular-nums; } .stage:hover { transform: translateY(-3px); }
.stage.has.st-needs { background: color-mix(in srgb, var(--warn) 16%, var(--soft)); } .stage.has.st-needs b { color: var(--warn); }
.stage.has.st-scheduled b { color: var(--ok); } .stage.has.st-published b { color: var(--brand); } .stage.has.st-making b { color: var(--info); }
.flow { flex: 0 0 10px; height: 2px; background: repeating-linear-gradient(90deg, var(--brand) 0 4px, transparent 4px 8px); background-size: 8px 2px;
  animation: flow .8s linear infinite; opacity: .6; }
.pipe-foot { border-top: 1px dashed var(--line); padding-top: 8px; }

.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 1500px) { .kpis { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { position: relative; overflow: hidden; text-decoration: none; color: inherit; display: block; transition: transform .25s cubic-bezier(.3, 1.5, .5, 1), box-shadow .25s, border-color .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15, 23, 42, .1); }
.kpi .value b { font: inherit; } .kpi .kbar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.kpi .spark { position: absolute; right: 8px; bottom: 8px; width: 64px; height: 22px; opacity: .8; }
.kpi.alert { background: color-mix(in srgb, var(--warn) 7%, var(--card)); } .kpi.alert .value { color: var(--warn); }

.ov-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.timeline { display: grid; gap: 14px; padding-top: 4px; }
.track-row { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 6px; }
.track-day { font-size: 12px; font-weight: 700; color: var(--muted); }
.track { position: relative; height: 46px; border-radius: 10px; background: var(--soft); }
.tick { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--line); }
.tick span { position: absolute; bottom: -16px; left: -14px; font-size: 10px; color: var(--muted); font-style: normal; }
.now-line { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--bad); border-radius: 2px; transition: left 1s linear; }
.now-line::before { content: ""; position: absolute; top: -4px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); animation: ping-s 2s ease-out infinite; }
.tpost { position: absolute; top: 6px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 3px solid var(--busy); background: var(--card);
  border-radius: 8px; padding: 3px 6px; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; display: flex; gap: 4px; align-items: center; color: var(--ink);
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.tpost:hover { transform: translateX(-50%) translateY(-3px) scale(1.06); z-index: 2; }
.tpost.s-approved { border-bottom-color: var(--ok); } .tpost.s-published { border-bottom-color: var(--brand); } .tpost.s-made { border-bottom-color: var(--info); }
.track-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11.5px; color: var(--muted); }

/* --- charts ------------------------------------------------------------------------------------------------ */
.chartbox { position: relative; } .chartbox svg { width: 100%; height: 120px; display: block; overflow: visible; }
.chartbox.big svg { height: 240px; }
.gridline { stroke: var(--line); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.cross { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 2 3; }
.tip { position: absolute; top: 0; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px;
  font-size: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); white-space: nowrap; display: grid; gap: 2px; z-index: 3; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.sw { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.sw.big { width: 12px; height: 12px; border-radius: 4px; }
.aud { display: grid; gap: 8px; margin-bottom: 8px; } .aud b { font-size: 20px; margin-left: 6px; }
.sums { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.sum { border-left: 3px solid var(--c); padding: 2px 12px; } .sum .value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.sum .delta { font-size: 12px; font-weight: 650; color: var(--muted); } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bar-label a { color: inherit; text-decoration: none; } .bar-label a:hover { color: var(--brand); }
.bar-track { height: 9px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 60%, #fff)); }
.bar-val { font-variant-numeric: tabular-nums; } .bar-note { grid-column: 1 / -1; margin-top: -6px; }
.an-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; }
.card .mini { background: var(--soft); border: 0; }
.mini b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; } .mini span { color: var(--muted); font-size: 12px; text-transform: capitalize; }

/* --- chips, posts ------------------------------------------------------------------------------------------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 4px 11px; font: inherit; font-size: 12.5px;
  font-weight: 650; cursor: pointer; transition: all .2s; display: inline-flex; gap: 6px; align-items: center; }
.chip span { color: var(--muted); font-size: 11px; } .chip:hover { border-color: var(--brand); }
.chip.active { background: var(--ink); color: var(--card); border-color: var(--ink); } .chip.active span { color: inherit; opacity: .7; }
.toolbar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; position: sticky; top: 58px; z-index: 4; }
.tools { display: flex; gap: 8px; align-items: center; } .tools select, .tools input { width: auto; padding: 5px 9px; } .tools input { width: 220px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s; display: flex; flex-direction: column; }
.pcard:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15, 23, 42, .16); }
.pthumb { position: relative; aspect-ratio: 4 / 5; background: var(--soft) center / cover no-repeat; display: grid; place-items: center; overflow: hidden; }
.pthumb .big { font-size: 40px; opacity: .6; } .pthumb .preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fade .3s both; }
.pcard:hover .pthumb { background-size: 108%; } .pthumb { transition: background-size .6s ease; }
.pthumb .badge { position: absolute; left: 8px; top: 8px; z-index: 1; } .pthumb .kind { position: absolute; left: 8px; bottom: 8px; z-index: 1; font-size: 11px; font-weight: 700;
  background: rgba(15, 23, 42, .66); color: #fff; padding: 2px 8px; border-radius: 99px; backdrop-filter: blur(4px); }
.play { position: absolute; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .85); color: #0f172a; display: grid; place-items: center;
  font-size: 14px; transition: transform .3s, opacity .3s; } .pcard:hover .play { transform: scale(1.4); opacity: 0; }
.pbody { padding: 10px 12px 12px; display: grid; gap: 6px; }
.phook { font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.pmeta, .pfoot { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--muted); align-items: center; }
.soon { color: var(--ok); font-weight: 650; } .pstat { font-variant-numeric: tabular-nums; }
.ab { font-size: 10px; font-weight: 800; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.badge { font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 99px;
  background: var(--soft); color: var(--muted); white-space: nowrap; }
.b-approved { background: color-mix(in srgb, var(--ok) 18%, var(--card)); color: var(--ok); }
.b-published { background: color-mix(in srgb, var(--brand) 18%, var(--card)); color: var(--brand); }
.b-made, .b-pending { background: color-mix(in srgb, var(--info) 18%, var(--card)); color: var(--info); }
.b-failed, .b-waiting { background: color-mix(in srgb, var(--warn) 20%, var(--card)); color: var(--warn); }
.b-rejected { background: color-mix(in srgb, var(--bad) 15%, var(--card)); color: var(--bad); }
.b-producing, .b-attached, .b-drafting { animation: breathe 1.6s ease-in-out infinite; }
.c-question, .c-praise { color: var(--ok); } .c-request { color: var(--info); } .c-sensitive { color: var(--warn); } .c-spam { color: var(--bad); }

/* --- inbox, activity ---------------------------------------------------------------------------------------- */
.in-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.list { display: grid; gap: 8px; }
.empty .big { font-size: 34px; margin-bottom: 6px; animation: pop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.reply { background: color-mix(in srgb, var(--brand) 10%, var(--card)); border-radius: 12px 12px 12px 3px; padding: 7px 10px; font-size: 13px; }
.reply .who { display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; color: var(--brand); letter-spacing: .05em; }
.feed { position: relative; display: grid; gap: 0; }
.feed::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.ev { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; padding: 6px 0; font-size: 13px; align-items: baseline; }
.ev .when { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.evdot { width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--busy); position: relative; top: 2px; }
.ev-posts .evdot { border-color: var(--brand); } .ev-plans .evdot { border-color: var(--info); } .ev-replies .evdot { border-color: var(--ok); }
.ev:first-child .evdot { animation: ping-s 2s ease-out infinite; }
.err-item { border-left: 3px solid var(--bad); }

/* --- system ------------------------------------------------------------------------------------------------- */
.sy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .sy-grid .wide { grid-column: 1 / -1; }
.sy-grid .minis { margin-bottom: 12px; }
.modes { display: grid; gap: 8px; }
.mode-card { text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 12px;
  font: inherit; cursor: pointer; display: grid; gap: 3px; transition: all .25s; }
.mode-card span { color: var(--muted); font-size: 12.5px; } .mode-card:hover { border-color: var(--brand); transform: translateX(3px); }
.mode-card.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.mnum { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--soft); margin-right: 8px; font-size: 12px; }
.mode-card.active .mnum { background: var(--brand); color: var(--brand-ink); }
.plat-row { display: grid; grid-template-columns: 16px 90px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.plat-row:last-child { border-bottom: 0; }
.switch { position: relative; width: 40px; height: 22px; } .switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .25s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + span { background: var(--ok); } .switch input:checked + span::after { transform: translateX(18px); }
.plans { display: grid; gap: 6px; }
.plan-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto 60px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--soft); }
.value.big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.cols { display: flex; align-items: flex-end; gap: 3px; height: 60px; margin: 12px 0; }
.cols i { flex: 1; height: max(2px, var(--h)); background: linear-gradient(var(--brand), color-mix(in srgb, var(--brand) 40%, transparent)); border-radius: 3px 3px 1px 1px; transform-origin: bottom; }
.badge.b-today, .today-tag { background: var(--brand); color: var(--brand-ink); padding: 0 6px; border-radius: 99px; font-size: 10px; text-transform: uppercase; }
.post.lift { opacity: .5; transform: scale(.96); }
.day { transition: background .2s, border-color .2s; } .post { transition: transform .2s, border-color .2s, box-shadow .2s; }
.post:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15, 23, 42, .1); }

/* --- drawer, toast ------------------------------------------------------------------------------------------ */
.drawer:not([hidden]) .drawer-panel { animation: slideIn .38s cubic-bezier(.2, .8, .2, 1) both; }
.drawer:not([hidden]) .drawer-back { animation: fade .3s both; }
.toast.show { animation: toastIn .45s cubic-bezier(.3, 1.5, .5, 1) both; }

@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes barIn { from { width: 0; } }
@keyframes colIn { from { transform: scaleY(0); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }
@keyframes ping-s { from { box-shadow: 0 0 0 0 rgba(30, 136, 210, .5); } to { box-shadow: 0 0 0 9px rgba(30, 136, 210, 0); } }
@keyframes flip { 0% { transform: translateY(-40%) rotateX(70deg); opacity: .2; } 100% { transform: none; opacity: 1; } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes flow { to { background-position: 8px 0; } }
@keyframes drift { to { transform: translate(-40px, 30px) scale(1.15); } }
@keyframes breathe { 50% { opacity: .55; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes toastIn { from { transform: translate(-50%, 24px) scale(.9); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 1200px) { .ov-grid, .an-grid { grid-template-columns: 1fr 1fr; } .ov-grid > :last-child, .an-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; }
  .nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; justify-content: space-around; padding: 6px 4px;
    border-right: 0; border-top: 1px solid var(--line); z-index: 9; }
  .nav .logo, .nav-foot, .nav a span { display: none; } .nav a { padding: 9px; } .nav a.active::before { display: none; }
  .nav .count { position: absolute; top: 2px; right: 0; }
  .main { padding: 0 16px 80px; }
  .ov-top, .ov-grid, .an-grid, .in-grid, .sy-grid { grid-template-columns: 1fr; } .ov-grid > :last-child, .an-grid > :first-child { grid-column: auto; }
  .toolbar { position: static; } .tools { flex-wrap: wrap; } .tools input { width: 100%; }
  .hero { flex-direction: column; align-items: flex-start; } .hero-media { width: 100%; height: 160px; }
}
@media (max-width: 640px) { .top h1 { width: 100%; } .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .cd-u b { font-size: 26px; } }
