/* Sothic calendar — pre-dawn instrument.
   Dark by design: the object of the exercise is a star in a 20-minute window
   before sunrise. One structural idea (the year as three element rotations),
   everything else quiet. */

:root {
  --bg: #07090f;
  --bg-raised: #0d1119;
  --bg-hover: #131a26;
  --line: #1b2231;
  --ink: #d7dce8;
  --ink-dim: #8a93a8;
  --sirius: #dceaff;
  --fire: #d9714e;
  --earth: #b39257;
  --air: #7cc46f;
  --water: #3e85c0;
  --warn: #e0a458;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }

html { height: 100%; }
body {
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 70% -200px, #101627 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

button {
  font: inherit; color: inherit; background: none; border: none;
  cursor: pointer; padding: 0;
}
:focus-visible {
  outline: 2px solid var(--sirius);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- shell ---- */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
  max-width: 720px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; letter-spacing: .06em; color: var(--ink-dim);
}
.brand:hover { color: var(--ink); }
.star-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sirius);
  box-shadow: 0 0 8px 1px rgba(200, 222, 255, .8);
}
.topbar-meta { font-size: 13px; color: var(--ink-dim); letter-spacing: .04em; }

.view {
  max-width: 720px; margin: 0 auto; padding: 8px 14px 24px;
}

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: center; gap: 2px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabbar button {
  flex: 1; max-width: 130px;
  padding: 9px 2px; border-radius: 8px;
  font-size: 13.5px; letter-spacing: .03em; color: var(--ink-dim);
}
@media (max-width: 430px) {
  .tabbar button { font-size: 12px; letter-spacing: 0; }
}
.tabbar button[aria-current] { color: var(--sirius); background: var(--bg-raised); }
.tabbar button:hover { color: var(--ink); }

/* ---- elements ---- */

.el-fire  { --el: var(--fire); }
.el-earth { --el: var(--earth); }
.el-air   { --el: var(--air); }
.el-water { --el: var(--water); }
.el-text.el-fire  { color: var(--fire); }
.el-text.el-earth { color: var(--earth); }
.el-text.el-air   { color: var(--air); }
.el-text.el-water { color: var(--water); }
.el-text.el-ether { color: #cabffa; }

/* ---- cards / hero ---- */

.hero {
  border: 1px solid var(--line);
  border-left: 3px solid var(--el, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, var(--el, #223) 7%, var(--bg-raised)), var(--bg-raised));
  border-radius: 14px;
  padding: 22px 18px;
  margin: 10px 0 14px;
}
.hero h1 { font-size: 30px; font-weight: 350; letter-spacing: .01em; margin: 4px 0 6px; }
.hero-over {
  font-size: 12.5px; text-transform: none; letter-spacing: .09em;
  color: var(--ink-dim);
}
.hero-sub { color: var(--ink-dim); font-size: 14.5px; }
.hero-epi {
  border-left-color: #6a5a3a;
  background: linear-gradient(160deg, #14110b, var(--bg-raised));
}
.hero-epi .hero-over { color: var(--warn); }
.hero-rising { border-left-color: var(--sirius); }

/* Ether: used nowhere else in the app */
.hero-ether {
  border-left-color: #cabffa;
  background:
    radial-gradient(400px 140px at 20% 0%, rgba(154, 134, 255, .14), transparent 70%),
    radial-gradient(500px 200px at 90% 100%, rgba(220, 234, 255, .07), transparent 60%),
    var(--bg-raised);
  box-shadow: inset 0 0 40px rgba(150, 130, 250, .06);
}

.el-badge {
  display: inline-block; margin-top: 10px;
  font-size: 12.5px; letter-spacing: .08em;
  border: 1px solid var(--el, var(--line)); color: var(--el, var(--ink));
  border-radius: 99px; padding: 2px 11px;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 15px;
  margin: 10px 0;
}
.card-label {
  font-size: 12px; letter-spacing: .1em; color: var(--ink-dim);
  margin-bottom: 7px;
}
.card-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0;
}
.card-row .card { margin: 0; }
.stat div:last-child { font-size: 15px; }
.dark-line { color: var(--sirius); font-size: 12.5px; }
@media (min-width: 560px) { .card-row { grid-template-columns: repeat(4, 1fr); } }

.dim { color: var(--ink-dim); font-style: normal; }
.note { color: var(--ink-dim); font-size: 14px; margin: 8px 0 2px; }
.note.subtle { font-size: 13px; }
.note.warn { color: var(--warn); }
.note.center { text-align: center; margin-top: 18px; }
.pagehead { font-weight: 400; font-size: 22px; margin: 8px 0 4px; }
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.geo-btn {
  display: block; width: 100%; margin: 8px 0;
  padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg-hover);
  color: var(--sirius); font-size: 14.5px;
}
.geo-btn:hover { border-color: var(--sirius); }

/* events */
.ev { padding: 4px 0; font-size: 14.5px; }
.ev::before { content: '·'; margin-right: 8px; color: var(--ink-dim); }
/* event icons mirror the month-grid markers */
.ev-cardinal::before { content: '✚'; color: #7fd6a0; }
.ev-festival::before { content: '◇'; color: var(--warn); }
.ev-festival.ev-major::before { content: '◆'; text-shadow: 0 0 5px rgba(224, 164, 88, .7); }
.ev-ingress::before { content: '●'; color: #b9cbe3; font-size: 11px; }
.ev-quarter::before, .ev-last_crescent::before { content: '☾'; color: var(--ink-dim); }
.ev-quarter-full::before { content: '●'; color: var(--warn); }
.ev-quarter-new::before { content: '○'; color: #c3cad9; }
.ev-lunar_month::before { content: '☽'; color: var(--ink-dim); }
.ev-eclipse::before { content: '○'; color: #ff7a50; font-weight: 700; }
.ev-eclipse.ev-major::before { content: '●'; color: #ff4a2e; text-shadow: 0 0 6px rgba(255, 74, 46, .7); }
.ev-link { color: var(--water); font-size: 13px; white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; }

/* decan confidence */
.conf {
  display: inline-block; margin-top: 6px;
  font-size: 11.5px; letter-spacing: .08em;
  border-radius: 99px; padding: 1px 9px; border: 1px solid;
}
.conf-secure { color: #9fd6a9; border-color: #2c4a33; }
.conf-probable { color: var(--warn); border-color: #4a3d22; }
.conf-uncertain { color: var(--ink-dim); border-color: var(--line); font-style: italic; }
.decan-name { font-size: 18px; }
.decan-name .conf { margin-left: 8px; vertical-align: 2px; }
.mgod { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 10px; }
.mgod b { color: var(--warn); font-weight: 500; }

/* night sky */
.sky-row {
  display: grid; grid-template-columns: 1fr auto; column-gap: 10px;
  padding: 6px 0; font-size: 14.5px;
  border-bottom: 1px solid var(--line);
}
.sky-row:last-child { border-bottom: none; }
.sky-dir { color: #b9cbe3; font-size: 13.5px; white-space: nowrap; }
.sky-note { grid-column: 1 / -1; color: var(--ink-dim); font-size: 12.5px; margin-top: 1px; }
.sirius-note { color: var(--sirius); }
.planet-line b { color: var(--warn); font-weight: 500; }
.sky-sub {
  margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-dim);
}
.sky-sub:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.sky-sub-night { color: var(--water); }
.sky-sub-morning { color: #f2a98c; }
.sky-sub-night .dim, .sky-sub-morning .dim { color: inherit; opacity: .7; }
.heliacal { border-left: 2px solid var(--sirius); padding-left: 8px; }

/* ---- month view ---- */

.month-nav, .year-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin: 8px 0 12px;
}
.month-nav > button, .year-nav > button {
  font-size: 26px; color: var(--ink-dim);
  padding: 2px 14px; border-radius: 10px;
}
.month-nav > button:hover, .year-nav > button:hover { color: var(--ink); background: var(--bg-raised); }
.year-nav > button[disabled] { opacity: .25; cursor: default; }
.month-title { text-align: center; }
.month-title h2 {
  font-weight: 400; font-size: 21px;
  color: color-mix(in srgb, var(--el, var(--ink)) 60%, var(--ink));
}
.month-title .dim { font-size: 13px; }

.decade { margin-bottom: 14px; }
.decade-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; letter-spacing: .06em; color: var(--ink-dim);
  margin: 0 2px 5px;
}
.decade-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px;
}
@media (min-width: 480px) { .decade-row { grid-template-columns: repeat(10, 1fr); } }
.epi-row { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 480px) { .epi-row { grid-template-columns: repeat(6, 1fr); } }

.cell {
  position: relative;
  background: color-mix(in srgb, var(--el, #223) 5%, var(--bg-raised));
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 6px 5px;
  min-height: 58px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  text-align: left;
}
.cell:hover { background: var(--bg-hover); }
/* Gregorian weekend: a thin border in the Gregorian-date blue */
.cell.wknd { border-color: #35507a; }
.cell.wknd .cell-g { font-weight: 600; }
.cell.today { border-color: var(--sirius); box-shadow: 0 0 10px rgba(200, 222, 255, .25); }
.cell.selected { border-color: var(--ink-dim); }
.cell-g { font-size: 14.5px; color: #f2f5fa; white-space: nowrap; }
.cell-e {
  position: absolute; right: 6px; bottom: 4px;
  font-size: 11px; color: #9ecbf0;
}
.cell-w { font-size: 11px; margin-top: auto; }
.cell-t { color: var(--ink-dim); margin-left: 3px; }
.cell-marks { position: absolute; top: 5px; right: 6px; display: flex; gap: 3px; }
.mk { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.mk-cardinal {
  width: auto; height: auto; background: none; border-radius: 0;
  color: #7fd6a0; font-size: 9px; line-height: 7px;
  text-shadow: 0 0 5px rgba(127, 214, 160, .6);
}
.mk-ingress { background: #b9cbe3; }
.mk-full { background: var(--warn); box-shadow: 0 0 5px rgba(224, 164, 88, .6); }
.mk-new { background: transparent; border: 1px solid #c3cad9; }
.mk-eclipse { background: transparent; border: 1.5px solid rgba(224, 110, 80, .95); }
.mk-fest { background: transparent; border: 1px solid var(--warn); transform: rotate(45deg); border-radius: 1px; }
.mk-eclipse.mk-ecl-major { background: #ff4a2e; border-color: #ff4a2e; box-shadow: 0 0 6px rgba(255, 74, 46, .8); }
.mk-fest.mk-major { background: var(--warn); box-shadow: 0 0 5px rgba(224, 164, 88, .7); }

.epi-legend {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  font-size: 13px; color: var(--ink-dim); margin-top: 10px;
}

.legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 12.5px; color: var(--ink-dim);
  margin: 16px 2px 0;
}
.legend .mk { margin-right: 4px; }
.wknd-demo {
  display: inline-block; width: 11px; height: 11px; border-radius: 3px;
  border: 1px solid #35507a; background: var(--bg-raised);
  margin-right: 4px; vertical-align: -1px;
}
.legend-tz { flex-basis: 100%; font-size: 12px; opacity: .8; }

/* ---- year view ---- */

.season { margin: 20px 0; }
.season-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px; gap: 8px; flex-wrap: wrap;
}
.season-head h3 { font-weight: 400; font-size: 17px; letter-spacing: .03em; }
.rotation { font-size: 12px; letter-spacing: .03em; }
.rot-n { margin-left: 6px; }

.yrow { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.yrow-label {
  flex: 0 0 40px; font-size: 11.5px; color: var(--ink-dim);
  display: flex; justify-content: space-between; align-items: center; gap: 4px;
}
.yrow-label .el-text { font-size: 16px; line-height: 1; }
.y366 { color: var(--warn); font-weight: 600; }
.yrow-label b { font-weight: 500; }
.yrow-cells {
  flex: 1; display: grid; gap: 2px;
  grid-template-columns: repeat(10, 1fr) 3px repeat(10, 1fr) 3px repeat(10, 1fr);
}
.ysp { min-width: 0; }
.ycell {
  aspect-ratio: 1; min-width: 0; border-radius: 2px;
  background: color-mix(in srgb, var(--el, #445) 26%, var(--bg-raised));
  border: 1px solid transparent;
  padding: 0;
}
.ycell:hover { filter: brightness(1.7); }
.ycell.moon-full { background: color-mix(in srgb, var(--el, #445) 26%, #e8e4d8); }
.ycell.moon-new { border-color: #c3cad9; }
.ycell.cardinal {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1; color: #7fd6a0;
  text-shadow: 0 0 6px rgba(127, 214, 160, .9);
  overflow: visible;
}
.ycell.eclipse { box-shadow: inset 0 0 0 2px #ff7a50; }
.ycell-demo.eclipse-major { background: #ff4a2e; box-shadow: 0 0 5px rgba(255, 74, 46, .8); }
.ycell.fest {
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; line-height: 1; color: var(--warn);
  text-shadow: 0 0 3px rgba(0, 0, 0, .75);
}
.ycell.fest-major { text-shadow: 0 0 5px rgba(224, 164, 88, .9); }
.ycell.epi { background: #171310; border: 1px solid #3a3122; }
.ycell.surplus { background: transparent; border: 1px dashed var(--ink-dim); }
.ycell.ether {
  background: radial-gradient(circle at 40% 35%, rgba(200, 185, 255, .8), rgba(90, 75, 160, .5));
  border-color: #8d80c9;
  box-shadow: 0 0 8px rgba(160, 140, 255, .45);
}
/* a major eclipse outranks epi/ether backgrounds */
.ycell.eclipse-major {
  background: #ff4a2e;
  box-shadow: 0 0 8px rgba(255, 74, 46, .85);
}
/* today outranks every other cell state */
.ycell.today {
  background: var(--sirius); z-index: 1;
  box-shadow: 0 0 12px rgba(220, 234, 255, .95);
}
.ycell-demo {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  background: #33405a; margin-right: 4px; vertical-align: -1px;
}
.ycell-demo.cardinal {
  background: #33405a; color: #7fd6a0; font-size: 10px; line-height: 10px;
  text-align: center;
}
.ycell-demo.eclipse { box-shadow: inset 0 0 0 2px #ff7a50; background: #33405a; }
.ycell-demo.fest {
  background: #33405a; color: var(--warn); font-size: 9px; line-height: 10px;
  text-align: center;
}
.ycell-demo.moon-full { background: #cfccc0; }
.ycell-demo.moon-new { background: var(--bg-raised); border: 1px solid #c3cad9; }
.ycell-demo.today { background: var(--sirius); box-shadow: 0 0 6px rgba(220, 234, 255, .8); }

/* ---- activity ---- */

.act-list { padding: 6px 8px; }
.act-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 10px 8px; border-radius: 10px;
  border-bottom: 1px solid var(--line);
}
.act-list .act-row:last-child { border-bottom: none; }
.act-row:hover { background: var(--bg-hover); }
.act-row.past { opacity: .45; }
.act-row.next { background: color-mix(in srgb, var(--sirius) 6%, transparent); }
.act-glyph { font-size: 18px; }
.act-main { display: flex; flex-direction: column; }
.act-main b { font-weight: 500; font-size: 15px; }
.act-main .dim { font-size: 13px; }
.act-badge {
  margin-left: auto; font-size: 11.5px; letter-spacing: .08em;
  color: var(--sirius); border: 1px solid var(--sirius);
  border-radius: 99px; padding: 1px 9px;
}

/* ---- ceremony ---- */

.cer-mhead {
  font-size: 12px; letter-spacing: .12em; color: var(--ink-dim);
  margin: 16px 4px 4px;
}
.act-list .cer-mhead:first-child { margin-top: 4px; }
.date-chip {
  flex: 0 0 40px; display: flex; flex-direction: column; align-items: center;
  border: 1px solid var(--line); border-radius: 8px; padding: 3px 0;
}
.date-chip b { font-weight: 500; font-size: 15px; line-height: 1.15; }
.date-chip span { font-size: 10.5px; color: var(--ink-dim); }
.deity-chip {
  margin-left: auto; flex-shrink: 0;
  font-size: 11px; letter-spacing: .05em; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px;
}
.deity-shiva { color: #7fb3e0; }
.deity-lakshmi { color: var(--warn); }
.deity-vishnu { color: #7fd6a0; }
.deity-saraswati { color: #f4f7ff; }
.deity-chip.deity-shiva { border-color: #2b4a66; }
.deity-chip.deity-lakshmi { border-color: #4d3d1f; }
.deity-chip.deity-vishnu { border-color: #2c4a33; }
.deity-chip.deity-saraswati { border-color: #5a6478; }

/* the great festivals: bright, in the deity's color */
.cer-major .act-main b { font-weight: 600; font-size: 15.5px; }
.cer-major .act-main b.deity-shiva { text-shadow: 0 0 12px rgba(127, 179, 224, .45); }
.cer-major .act-main b.deity-lakshmi { text-shadow: 0 0 12px rgba(224, 164, 88, .45); }
.cer-major .act-main b.deity-vishnu { text-shadow: 0 0 12px rgba(127, 214, 160, .45); }
.cer-major .act-main b.deity-saraswati { text-shadow: 0 0 12px rgba(244, 247, 255, .55); }
.cer-major .date-chip { border-color: var(--ink-dim); }
.act-row .act-badge { margin-left: auto; }
.act-row .act-badge + .deity-chip { margin-left: 8px; }
.cer-monthly .act-main b { font-weight: 400; color: var(--ink-dim); }
.dm-row { display: flex; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.dm-row:last-child { border-bottom: none; }
.dm-row > b { flex: 0 0 76px; font-weight: 500; }
.dm-row > span { color: var(--ink-dim); }

/* ---- rising ---- */

.window-row { display: flex; gap: 18px; flex-wrap: wrap; }
.window-row > div { display: flex; flex-direction: column; font-size: 15px; }
.window-row .dim { font-size: 12px; letter-spacing: .06em; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: none; }

/* ---- weather ---- */

.wx-main { font-size: 16px; display: flex; align-items: baseline; gap: 8px; }
.wx-temp { color: var(--ink-dim); }
.wx-grid {
  display: grid; grid-template-columns: auto 1fr; gap: 3px 14px;
  font-size: 14px; margin-top: 8px;
}
.wx-grid > span:nth-child(odd) { color: var(--ink-dim); }
.wx-air { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 10px; }
.wx-live > span:first-child { color: var(--sirius); letter-spacing: .06em; font-size: 12.5px; }
.aqi { border-radius: 99px; padding: 0 8px; font-size: 12.5px; }
.aqi-good { background: #1d3524; color: #9fd6a9; }
.aqi-fair { background: #2c3a1e; color: #c4d69f; }
.aqi-moderate { background: #40371a; color: #e0cd7c; }
.aqi-poor { background: #46281a; color: #e0a458; }
.aqi-vpoor { background: #461a1a; color: #e07c7c; }

/* ---- settings ---- */

.radio { display: flex; gap: 10px; padding: 7px 0; align-items: baseline; cursor: pointer; }
.radio input { accent-color: var(--sirius); }
.search-row { display: flex; gap: 8px; margin: 10px 0 4px; }
.search-row input {
  flex: 1; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  font: inherit;
}
.coord-row { display: flex; gap: 8px; margin: 8px 0 4px; }
.coord-row input {
  flex: 1; min-width: 0; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  font: inherit;
}
.coord-row button {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px;
  color: var(--ink-dim);
}
.coord-row button:hover { color: var(--ink); background: var(--bg-hover); }
.tz-select {
  width: 100%; margin: 8px 0 4px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px;
  font: inherit;
}
.search-row button {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px;
  color: var(--ink-dim);
}
.search-row button:hover { color: var(--ink); background: var(--bg-hover); }
.result {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 8px; font-size: 14.5px;
}
.result:hover { background: var(--bg-hover); }
.linkbtn { color: var(--air); font-size: 14px; padding: 4px 0; }
.linkbtn:hover { text-decoration: underline; }
.current-loc { font-size: 14.5px; }

/* ---- sheets ---- */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(2, 4, 8, .7); backdrop-filter: blur(2px);
}
.sheet {
  position: fixed; z-index: 31; left: 0; right: 0; bottom: 0;
  max-height: 86vh;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .6);
  animation: rise .22s ease-out;
}
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; transform: translateX(-50%); width: 680px; }
}
.sheet-tall { max-height: 92vh; }
@keyframes rise { from { translate: 0 30px; opacity: 0; } }
.sheet-scroll {
  overflow-y: auto; max-height: inherit;
  padding: 18px 16px calc(24px + env(safe-area-inset-bottom));
}
.sheet-close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-raised); color: var(--ink-dim);
  border: 1px solid var(--line);
}
.sheet-close:hover { color: var(--ink); }
.sheet-nav {
  position: absolute; top: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-raised); color: var(--ink-dim);
  border: 1px solid var(--line);
  font-size: 20px; line-height: 1;
}
.sheet-nav:hover:not(:disabled) { color: var(--ink); }
.sheet-nav:disabled { opacity: .3; cursor: default; }
.today-nav { margin-bottom: -4px; }
.tn-title { font-weight: 400; font-size: 17px; color: var(--ink-dim); letter-spacing: .05em; }
.tn-back {
  font-size: 13px; letter-spacing: .05em; color: var(--sirius);
  border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px;
}
.tn-back:hover { background: var(--bg-hover); }
.sheet-prev { right: 100px; }
.sheet-next { right: 56px; }
.sheet-id {
  border-left: 3px solid var(--el, var(--line));
  padding: 6px 0 6px 14px; margin: 4px 40px 12px 0;
}
.sheet-id h2 { font-weight: 400; font-size: 22px; }
.sheet-id.hero-epi, .sheet-id.hero-ether {
  border-radius: 10px; padding: 12px 14px; border-left-width: 3px;
}
.sheet-id.hero-epi { border-left-color: #6a5a3a; }

.about { padding: 6px 2px 10px; }
.about h2 { font-weight: 400; font-size: 21px; margin: 4px 0 10px; }
.about ul, .about ol { margin: 8px 0 8px 20px; }
.about li { margin: 6px 0; font-size: 14.5px; }
.about h3 {
  font-weight: 500; font-size: 14px; letter-spacing: .07em;
  color: var(--ink-dim); margin: 18px 0 6px;
}
.about p { margin: 8px 0; font-size: 14.5px; }

/* ---- motion ---- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
