/* W3R. Tear-off sheet on the left, today's instruments on the right. */

body:has(.desk) { --gold: #8a6232; }
html[data-theme="muc"] body:has(.desk),
html[data-theme="go"] body:has(.desk),
html[data-theme="thuy"] body:has(.desk) { --gold: #e4b15a; }
body:has(.desk) .wrap { width: min(1120px, calc(100% - 24px)); }
@media (max-width: 800px) {
  body:has(.desk) main { padding-top: 8px; }
}

/* LAYOUT1 — deliberate rows instead of two independent stacks */
.desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}
.desk-hero { grid-column: 1 / -1; }
.desk-pair,
.desk-trio {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}
.desk-pair > .block,
.desk-trio > .block {
  margin: 0;
  max-width: none;
  height: 100%;
  min-width: 0;
}
.desk-wide {
  max-width: none !important;
  width: 100%;
}
@keyframes desk-in {
  from { transform: translateY(6px); }
  to { transform: none; }
}
.desk-pair,
.desk-trio { animation: desk-in 0.4s ease both; }
@media (min-width: 960px) {
  .desk-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .desk-trio:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .desk-trio:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sheet, .block {
  background:
    radial-gradient(520px 220px at 100% 0%, color-mix(in srgb, var(--seal) 8%, transparent), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 3px, color-mix(in srgb, var(--ink) 3%, transparent) 3px 4px),
    var(--card);
  border: 1px solid color-mix(in srgb, var(--seal) 42%, var(--line));
  border-radius: 22px;
  box-shadow:
    inset 0 0 0 6px color-mix(in srgb, var(--card) 88%, transparent),
    inset 0 0 0 7px color-mix(in srgb, var(--seal) 28%, var(--line));
  padding: 16px;
  margin: 0 0 16px;
  position: relative;
}
html[data-theme="muc"] .sheet,
html[data-theme="muc"] .block,
html[data-theme="go"] .sheet,
html[data-theme="go"] .block,
html[data-theme="thuy"] .sheet,
html[data-theme="thuy"] .block {
  background:
    radial-gradient(480px 200px at 0% 0%, color-mix(in srgb, var(--seal) 18%, transparent), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 3px, color-mix(in srgb, var(--seal) 6%, transparent) 3px 4px),
    var(--card);
  border-color: color-mix(in srgb, var(--seal) 62%, var(--line));
}
.block { max-width: 72ch; }
.desk .block,
.desk-pair .block,
.desk-trio .block { max-width: none; }
.sheet { overflow: hidden; margin: 0; }
.orn { position: absolute; width: 36px; height: 36px; color: var(--seal); opacity: 0.45; fill: none; stroke: currentColor; stroke-width: 1; }
.orn-tl { top: 12px; left: 12px; }
.orn-tr { top: 12px; right: 12px; transform: scaleX(-1); }
.branch { position: absolute; width: 120px; right: 6px; top: 42px; color: var(--seal); opacity: 0.16; pointer-events: none; }
.branch svg { width: 100%; height: auto; display: block; }

.sheet-nav { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.sheet-nav a, .sheet-nav button {
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 80%, var(--bg));
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: "Source Serif 4", serif;
  font-size: 22px;
  padding: 0 10px;
}
.today-chip { width: auto; font-family: "Be Vietnam Pro", sans-serif; font-size: 14px; font-weight: 650; padding: 0 12px; }
.sheet-nav .icon svg { width: 18px; height: 18px; }
.when {
  margin: 12px 0 0;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 800px) {
  .when { letter-spacing: 0.02em; }
}
.face { display: grid; grid-template-columns: 1fr 112px; align-items: center; gap: 8px; margin-top: 4px; }
.hero-num {
  margin: 0;
  text-align: center;
  font-family: "Source Serif 4", "Be Vietnam Pro", serif;
  font-variant-numeric: tabular-nums;
  font-size: clamp(96px, 16vw, 148px);
  line-height: 0.8;
  color: var(--seal);
  font-weight: 600;
}
.seal {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #b14a42, #8c2f2a 56%, #5c1c18);
  color: #f8f1e6;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 0 0 3px #c6a15a, 0 0 0 5px #6e241f, 0 8px 16px color-mix(in srgb, #000 18%, transparent);
}
html[data-theme="muc"] .seal,
html[data-theme="go"] .seal,
html[data-theme="thuy"] .seal {
  background: radial-gradient(circle at 32% 28%, #9a3a34, #6e221e 58%, #3c1210);
  box-shadow: 0 0 0 3px #d4b06a, 0 0 0 5px #4a1816, 0 8px 16px color-mix(in srgb, #000 45%, transparent);
}
html[data-theme="son"] .seal,
html[data-theme="hoa"] .seal {
  background: radial-gradient(circle at 32% 28%, #c2554a, #9a332c 56%, #641e1a);
  box-shadow: 0 0 0 3px #e0c27a, 0 0 0 5px #7a2a24, 0 8px 16px color-mix(in srgb, #000 16%, transparent);
}
html[data-theme="tre"] .seal,
html[data-theme="moc"] .seal {
  background: radial-gradient(circle at 32% 28%, #a8443c, #7d2c28 56%, #4e1a16);
  box-shadow: 0 0 0 3px #d7b56a, 0 0 0 5px #5e3a22, 0 8px 16px color-mix(in srgb, #000 16%, transparent);
}
.seal b {
  font-family: "Source Serif 4", serif;
  font-size: 40px;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.seal small { display: block; font-size: 11px; letter-spacing: 0.02em; }
.sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 4px 0 0;
  text-align: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sub-date, .sub-clock { display: block; line-height: 1.35; }
#ict-clock { display: inline-block; min-width: 5.2ch; font-weight: 700; color: var(--ink); }
.sheet h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
  margin: 10px auto;
  max-width: 22ch;
}
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pillar {
  background: color-mix(in srgb, var(--bg) 70%, var(--card));
  border-radius: 14px;
  padding: 8px 10px 10px;
  border-top: 3px solid var(--el, var(--line));
  min-width: 0;
}
.pillar > span, .pillar > em { display: block; color: var(--muted); font-style: normal; font-size: 13px; }
.pillar strong { display: block; font-family: "Source Serif 4", serif; font-size: clamp(16px, 2vw, 22px); font-weight: 600; color: var(--ink); }
.el-kim { --el: #6e675f; }
.el-moc { --el: var(--good); }
.el-thuy { --el: #1e4d6b; }
.el-hoa { --el: var(--seal); }
.el-tho { --el: #8a6232; }
html[data-theme="muc"] .el-thuy,
html[data-theme="go"] .el-thuy,
html[data-theme="thuy"] .el-thuy { --el: #8eb4cc; }
html[data-theme="muc"] .el-tho,
html[data-theme="go"] .el-tho { --el: #e2c08a; }
html[data-theme="muc"] .el-kim,
html[data-theme="go"] .el-kim { --el: #d5dbe3; }

.sheet-foot { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; margin-top: 14px; }
.daily-line {
  margin: 18px 0 4px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 86%, var(--bg));
  position: relative;
}
.daily-line figcaption {
  margin: 0 0 6px;
  color: var(--seal);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}
.daily-line blockquote { margin: 0; }
.daily-line .quote-main {
  margin: 0;
  font-family: "Source Serif 4", serif;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.45;
  color: var(--ink);
}
.daily-line .quote-alt {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.daily-line cite { display: block; margin-top: 8px; color: var(--seal); font-style: normal; font-size: 0.9rem; }
.daily-line button {
  margin-top: 10px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 36px;
}
.gauge { width: 96px; height: 96px; display: block; }
.gtrack { fill: none; stroke: var(--line); stroke-width: 8; }
.gval {
  fill: none;
  stroke: var(--gold);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p) * 100);
  transform: rotate(-90deg);
  transform-origin: 50px 50px;
  animation: gauge-in 0.9s ease both;
}
@keyframes gauge-in { from { stroke-dashoffset: 100; } }
.gauge text {
  font-family: "Source Serif 4", serif;
  font-size: 26px;
  text-anchor: middle;
  fill: var(--ink);
  font-variant-numeric: tabular-nums;
}
.gauge-link { text-decoration: none; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 28px;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--seal) 12%, var(--card));
  color: var(--seal);
  font-weight: 700;
  font-size: 14px;
}
.badge-sep { flex: none; line-height: 1; }
.badge-part { min-width: 0; }
.badge.is-hoang-dao { background: color-mix(in srgb, var(--gold) 18%, var(--card)); color: #7a5424; }
html[data-theme="muc"] .badge.is-hoang-dao,
html[data-theme="go"] .badge.is-hoang-dao,
html[data-theme="thuy"] .badge.is-hoang-dao { color: #e4b15a; }
.god-note { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.term-name { margin: 6px 0 0; font-family: "Source Serif 4", serif; font-size: 1.35rem; font-weight: 600; }
.term-track { height: 5px; border-radius: 99px; background: var(--line); margin: 8px 0; }
.term-track span { display: block; height: 100%; width: calc(var(--p) * 100%); max-width: 100%; background: linear-gradient(90deg, var(--seal), var(--gold)); border-radius: inherit; }
.note { color: var(--muted); margin: 6px 0 0; }

.block { min-width: 0; }
.block h2, .block h3 { display: flex; align-items: center; gap: 8px; }
.ic { width: 22px; height: 22px; flex: none; color: var(--seal); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wheel { width: min(320px, 100%); margin: 0 auto; display: block; color: var(--ink); }
.seg > path { fill: #ece8e1; stroke: color-mix(in srgb, var(--ink) 14%, transparent); }
.seg.is-open > path { fill: #e8c27a; stroke: #8a6a2e; }
.seg.is-shut { color: #8d847b; }
.seg.is-open { color: #3a2910; }
.seg.is-now > path { stroke: var(--ink); stroke-width: 1.6; }
.seg-name { font-size: 12px; font-weight: 700; text-anchor: middle; fill: currentColor; }
html[data-theme="muc"] .seg > path,
html[data-theme="go"] .seg > path,
html[data-theme="thuy"] .seg > path { fill: #2c2824; }
html[data-theme="muc"] .seg.is-open > path,
html[data-theme="go"] .seg.is-open > path,
html[data-theme="thuy"] .seg.is-open > path { fill: #e4b15a; stroke: #f0d7a0; }
html[data-theme="muc"] .seg.is-shut,
html[data-theme="go"] .seg.is-shut,
html[data-theme="thuy"] .seg.is-shut { color: #9a9188; }
html[data-theme="muc"] .seg.is-open,
html[data-theme="go"] .seg.is-open,
html[data-theme="thuy"] .seg.is-open { color: #2a1c08; }
.hub { fill: var(--card); stroke: var(--line); }
.hour-pointer { transform-origin: 160px 160px; transform: rotate(calc(var(--a) * 1deg)); transition: transform 0.6s cubic-bezier(.2, .7, .2, 1); }
.hour-pointer polygon { fill: var(--ink); }
.hub-branch, .hub-range { text-anchor: middle; fill: var(--ink); font-variant-numeric: tabular-nums; }
.hub-branch { font-family: "Source Serif 4", serif; font-size: 22px; }
.hub-range { font-size: 11px; fill: var(--muted); }
.wheel-caption { text-align: center; margin: 8px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hour-tiles {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  list-style: none;
  margin: 12px 0 0;
  padding: 2px;
  min-width: 0;
  max-width: 100%;
}
.hour-tiles .tile {
  flex: 0 0 104px;
  scroll-snap-align: start;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 8px;
  min-height: 84px;
}
.hour-tiles .is-open { box-shadow: inset 0 -3px 0 var(--gold); }
.hour-tiles .is-shut { box-shadow: inset 0 -3px 0 var(--poor); }
.hour-tiles .is-now { outline: 2px solid var(--ink); }
.hour-tiles strong { display: block; font-family: "Source Serif 4", serif; font-size: 18px; }
.hour-tiles span, .hour-tiles em { display: block; color: var(--muted); font-style: normal; font-size: 13px; font-variant-numeric: tabular-nums; }
@media (min-width: 801px) { .hour-tiles { display: none; } }
.hour-open-line {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.hour-open-line strong { color: var(--ink); font-weight: 650; }
@media (max-width: 800px) { .hour-open-line { display: none; } }

.two { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: start; }
@media (min-width: 720px) {
  .two:has(.good):has(.bad) { grid-template-columns: 1fr 1fr; align-items: start; }
}
.good, .bad { border-radius: 14px; padding: 10px 12px; height: fit-content; }
.clash-panel {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.desk-stack {
  display: flex;
  flex-direction: column;
}
.act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hard-list { margin-top: 8px; }
.act {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 82%, var(--bg));
  border: 1px solid var(--line);
  max-width: 100%;
}
.act .ic { width: 22px; height: 22px; }
.act.is-good { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.act.is-bad { border-color: color-mix(in srgb, var(--poor) 45%, var(--line)); }
.act > span { min-width: 0; font-size: 15px; line-height: 1.3; }
.act-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.ly-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.ly-list li {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 88%, var(--bg));
}
.ly-list .is-good { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.ly-list .is-bad { border-color: color-mix(in srgb, var(--poor) 40%, var(--line)); }
.ly-list em { font-style: normal; color: var(--muted); font-size: 13px; }
.listbox { position: relative; min-width: min(100%, 240px); z-index: 30; }
.listbox-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.listbox-trigger {
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
.listbox-menu {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: min(320px, 50vh);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--ink) 18%, transparent);
  isolation: isolate;
}
.listbox-menu.is-up {
  top: auto;
  bottom: calc(100% + 4px);
}
#thoi-tiet { overflow: visible; position: relative; z-index: 20; }
.sheet .block.in-sheet { max-width: none; margin-top: 16px; }
.listbox-menu [role="option"] {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.listbox-menu [role="option"][aria-selected="true"],
.listbox-menu [role="option"]:hover,
.listbox-menu [role="option"]:focus {
  background: color-mix(in srgb, var(--seal) 12%, var(--card));
  outline: none;
}
.hard { margin: 8px 0 0; padding-left: 18px; }
.good { background: color-mix(in srgb, var(--good) 12%, var(--card)); }
.bad { background: color-mix(in srgb, var(--poor) 12%, var(--card)); }
.good h3 { color: var(--good); }
.bad h3 { color: var(--poor); }
.good p, .bad p, .good ul, .bad ul { margin: 4px 0 0; }
.compass-row { display: grid; grid-template-columns: 140px 1fr; gap: 8px; align-items: center; }
.compass { width: 140px; height: 140px; }
.compass circle, .compass path { fill: none; stroke: color-mix(in srgb, var(--ink) 35%, var(--line)); stroke-width: 1.4; }
.needle polygon { stroke: none; }
.needle.hy polygon { fill: var(--seal); }
.needle.tai polygon { fill: var(--gold); }
.needle.hac polygon { fill: var(--muted); }
.dir-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dir-list li { border-left: 3px solid var(--line); padding-left: 8px; }
.dir-list .hy { border-color: var(--seal); }
.dir-list .tai { border-color: var(--gold); }
.dir-list .hac { border-color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 0 0; padding: 0; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; background: var(--bg); }

.parts { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.parts li { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.score-strip { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.score-strip a {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 76px;
  padding: 8px 2px;
  border-radius: 12px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}
.score-strip .is-on { outline: 2px solid var(--seal); }
.score-strip b { font-family: "Source Serif 4", serif; font-size: 1.15rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.pair div { background: var(--bg); border-radius: 12px; padding: 8px 10px; }
.pair dt { color: var(--muted); font-size: 13px; }
.pair dd { margin: 2px 0 0; font-family: "Source Serif 4", serif; font-size: 1.3rem; }
.shortcut-row, .article-row { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 700px) { .shortcut-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shortcut-row a, .share-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-row button { background: var(--seal); color: var(--seal-ink); border-color: var(--seal); }
.countdown { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.countdown li { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.countdown span { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.article-row a { font-family: "Source Serif 4", serif; font-size: 1.2rem; text-decoration: none; }
#thoi-tiet { min-height: 148px; }
#thoi-tiet select, #thoi-tiet button { min-height: 44px; }
#thoi-tiet form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#thoi-tiet [data-weather-body] { font-family: "Source Serif 4", serif; font-size: 1.4rem; margin: 8px 0 0; font-variant-numeric: tabular-nums; }

.mini-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mini-month a, .mini-month > span {
  min-height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.mini-month a.is-on { outline: 2px solid var(--seal); }
.mini-month .hoang-dao { box-shadow: inset 0 -3px 0 var(--gold); }
.mini-month .hac-dao { box-shadow: inset 0 -3px 0 var(--poor); }
.mini-card h2 a { color: inherit; text-decoration: none; }

.gloss { position: relative; display: inline-flex; vertical-align: middle; }
.gloss-i {
  width: 22px;
  height: 22px;
  min-height: 22px;
  min-width: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 700 12px/1 "Source Serif 4", serif;
}
.gloss-pop {
  display: none;
  position: absolute;
  z-index: 8;
  left: 0;
  top: calc(100% + 6px);
  width: min(280px, 72vw);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--ink) 12%, transparent);
}
.gloss:focus-within .gloss-pop, .gloss:hover .gloss-pop { display: block; }
@media (max-width: 800px) {
  .gloss:focus-within .gloss-pop {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 76px;
    top: auto;
    width: auto;
  }
}

.day-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  position: sticky;
  top: 56px;
  z-index: 8;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  padding: 6px 0;
  margin: 0 0 8px;
}
.day-nav a {
  flex: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
@media (min-width: 801px) { .day-nav { top: 108px; } }
#can-chi, #tiet, #gio, #viec, #tuoi, #xuat-hanh, #ly, #truc, #sao, #banh, #le, #van-khan, #faq, #noi-bat, #diem, #bay-ngay {
  scroll-margin-top: 120px;
}
.jump-sheet {
  width: min(380px, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  padding: 16px;
}
.jump-sheet::backdrop { background: color-mix(in srgb, var(--ink) 46%, transparent); }
.jump-sheet input[type="date"] {
  width: 100%;
  min-height: 64px;
  margin: 8px 0;
  font: 600 28px/1 "Source Serif 4", serif;
  font-variant-numeric: tabular-nums;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
}
.jump-actions { display: flex; gap: 8px; }
.jump-actions button { min-height: 44px; }
.faq { display: grid; gap: 12px; }
.faq dt { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .desk-pair, .desk-trio, .gval, .hour-pointer { animation: none; transition: none; }
}
@media print {
  .sheet-nav, .day-nav, .jump-sheet, .hour-tiles, #thoi-tiet, #tien-ich, .gloss, .bottom-nav, .share-row { display: none !important; }
  .desk, .desk-pair, .desk-trio { display: block; }
  .hero-num, .term-name { color: #1c1712; }
  .seal, .seal b, .seal small { color: #f8f1e6; }
}
