/* Quest. One column that scrolls like a page. Phones: a bottom bar of four. From 900px: the same four sit in the header. */
:root {
  --bg: #0e1315; --card: #172024; --card2: #1f2a2f; --row: #26333a; --line: #2c3a41; --text: #eef2f1; --dim: #98a6a9;
  --acc: #e0b24c; --acc-ink: #1c1503; --blue: #7fb6d9; --danger: #ff6b61; --ok: #6fcf97;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px); --wrap: 1180px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; overscroll-behavior-y: none; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--blue); text-decoration: none; }
img { display: block; max-width: 100%; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.dim { color: var(--dim); }

/* Header (wide) and bottom bar (phone) ------------------------------------------------------------ */
.head { position: sticky; top: 0; z-index: 10; background: rgba(14, 19, 21, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding-top: var(--st); }
.head-in { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.01em; color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.tabs { display: flex; gap: 4px; margin-left: 8px; }
.tabs a { padding: 8px 14px; border-radius: 10px; color: var(--dim); font-weight: 600; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); background: var(--card2); }
.head .btn { min-height: 40px; }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--text); background: var(--card); border: 1px solid var(--line); flex: none; }
.icon-btn:hover { background: var(--card2); }
.icon-btn.on { border-color: var(--acc); color: var(--acc); }
.nav4 { display: none; }

.page { max-width: var(--wrap); margin: 0 auto; padding: 26px 20px 80px; }
.page.narrow { max-width: 780px; }
.ptop { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.ptop h1 { font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }
.ptop .sub { color: var(--dim); font-size: 14px; padding-bottom: 3px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-weight: 600; margin: -6px 0 14px -6px; padding: 6px; border-radius: 9px; }
.back:hover { color: var(--text); }

/* Buttons, chips, forms -------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--acc); color: var(--acc-ink); font-weight: 700; font-size: 15px; border: 1px solid transparent; text-align: center; white-space: nowrap; }
.btn .ico { width: 18px; height: 18px; }
.btn.ghost { background: var(--card); color: var(--text); border-color: var(--line); font-weight: 600; }
.btn.ghost:hover { background: var(--card2); }
.btn.danger { background: none; color: var(--danger); border-color: rgba(255, 107, 97, .4); font-weight: 600; }
.btn.armed, .btn.danger.armed { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.wide { display: flex; width: 100%; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.link { color: var(--blue); font-weight: 600; font-size: 14px; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; max-width: 100%; }
.seg button { padding: 7px 13px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--dim); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; justify-content: center; }
.seg button.on { background: var(--text); color: #0e1315; }
.seg.full { display: flex; }
.seg.full button { flex: 1; padding: 10px 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; white-space: nowrap; color: var(--dim); }
.chip.on { color: var(--acc-ink); background: var(--acc); border-color: var(--acc); }
.chip .ico { width: 15px; height: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.card + .card { margin-top: 14px; }
.card h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.card h2 .ico { vertical-align: -4px; margin-right: 6px; color: var(--dim); }
.hint { color: var(--dim); font-size: 13px; }
.empty { color: var(--dim); text-align: center; padding: 36px 14px; }
.empty h2 { color: var(--text); font-size: 20px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

.form > * + * { margin-top: 14px; }
.form label, .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--dim); }
.form input:not([type=checkbox]):not([type=file]), .form select, .form textarea, .gatecard input, .url {
  display: block; width: 100%; margin-top: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; color: var(--text); font-size: 16px; outline: 0; -webkit-appearance: none; appearance: none; min-height: 46px; }
.form select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a6a9' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
.form textarea { resize: vertical; min-height: 92px; line-height: 1.45; }
.form input:focus, .form select:focus, .form textarea:focus, .gatecard input:focus { border-color: var(--acc); }
.form .lbl + * { margin-top: 6px; }
.form label.btn, .mcard label.btn { display: inline-flex; font-size: 14px; color: var(--text); font-weight: 600; cursor: pointer; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two > * { min-width: 0; }
.months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.months button { height: 40px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--dim); font-weight: 600; font-size: 13.5px; text-align: center; }
.months button.on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.span { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: center; color: var(--dim); font-size: 14px; font-weight: 600; }
.span .btn { grid-column: 2; justify-self: start; }
.mdpick { display: flex; gap: 6px; }
.mdpick select[data-part="m"] { width: 190px !important; }
.mdpick select { margin-top: 0 !important; width: auto !important; min-width: 0; }
.mdpick select[data-part="d"] { width: 76px !important; }
.mdpick select:disabled { opacity: .45; }
.check { display: flex !important; gap: 10px; align-items: center; color: var(--text) !important; font-size: 15px !important; font-weight: 600 !important; }
.starbtn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--dim); font-weight: 600; }
.starbtn.on { color: var(--acc); border-color: var(--acc); }
.starbtn.on .ico { fill: var(--acc); }
.linkrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.linkrow:first-child { border-top: 0; padding-top: 0; }
.linkrow input { margin-top: 0 !important; }
.linkrow small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addrow { display: flex; gap: 8px; }
.addrow input { margin-top: 0 !important; flex: 1; min-width: 0; }
.photobox { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.photobox img { width: 132px; height: 99px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.photobox .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; border-radius: 12px; border: 1px dashed var(--line); color: var(--dim); font-weight: 600; }
.more:hover { color: var(--text); }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; margin: 20px -20px -80px; padding: 12px 20px calc(12px + var(--sb)); background: rgba(14, 19, 21, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.savebar .btn:not(.ghost):not(.danger) { min-width: 132px; }

/* Physical demand: one, two or three peaks, plus the word ---------------------------------------- */
.dem { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.dem svg { width: 26px; height: 14px; flex: none; }
.dem svg path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; opacity: .45; }
.dem svg path.f { fill: currentColor; opacity: 1; }

/* Years ------------------------------------------------------------------------------------------- */
.years-wrap { display: block; }
.shelf { margin-bottom: 26px; }
.shelf-head { display: flex; align-items: center; gap: 10px; width: 100%; }
.shelf-head h2 { margin: 0; font-size: 17px; }
.shelf-head .n { color: var(--dim); font-weight: 600; }
.shelf-head .ico { color: var(--dim); transition: transform .15s; }
.shelf.open .shelf-head .chev { transform: rotate(90deg); }
.shelf-body { margin-top: 14px; }
.shelf .hint { margin-top: 6px; }

.year { display: grid; grid-template-columns: 172px 1fr; gap: 22px; padding: 22px 0; border-top: 1px solid var(--line); align-items: start; }
.year:first-child { border-top: 0; padding-top: 4px; }
.yhead .y { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.year.now .yhead .y { color: var(--acc); }
.yhead .tot { color: var(--dim); font-size: 13.5px; margin-top: 8px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.yhead .tot b { color: var(--text); font-weight: 600; }
.yadd { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--dim); font-weight: 600; font-size: 13.5px; padding: 5px 10px 5px 6px; margin-left: -6px; border-radius: 9px; }
.yadd:hover { color: var(--acc); }
.yadd .ico { width: 17px; height: 17px; }
.year.open-year { padding: 12px 0; align-items: center; }
.year.open-year .yhead { display: flex; align-items: baseline; gap: 12px; }
.year.open-year .y { font-size: 22px; color: var(--dim); font-weight: 700; }
.year.open-year .ybody { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 13.5px; }
.year.open-year .yadd { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tile { display: block; width: 100%; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--text); position: relative; }
.tile:hover { border-color: #46575f; }
.tile .pic { aspect-ratio: 4 / 3; background: linear-gradient(150deg, #223038, #172024); position: relative; overflow: hidden; }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; }
.tile .pic .nopic { position: absolute; inset: 0; display: grid; place-items: center; color: #3b4b53; }
.tile .pic .nopic .ico { width: 44px; height: 44px; stroke-width: 1.3; }
.tile .cap { padding: 11px 12px 12px; }
.tile .cap b { display: block; font-weight: 700; font-size: 15px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile .cap .meta { display: flex; flex-wrap: wrap; gap: 3px 10px; color: var(--dim); font-size: 12.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.flag { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 7px; border-radius: 999px; background: rgba(10, 14, 16, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 12px; font-weight: 700; }
.flag .ico { width: 14px; height: 14px; }
.flag.done { color: var(--ok); }
.flag.star { left: auto; right: 8px; padding: 5px; color: var(--acc); }
.flag.star .ico { fill: var(--acc); }

/* Rows (the list, the Someday shelf, and years on a phone) ----------------------------------------- */
.rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); color: var(--text); min-width: 0; }
.row:hover { border-color: #46575f; }
.row .th { width: 64px; height: 52px; border-radius: 9px; object-fit: cover; flex: none; background: var(--card2); }
.row div.th { display: grid; place-items: center; color: #46575f; }
.row .rt { min-width: 0; flex: 1; }
.row .rt b { display: flex; align-items: center; gap: 6px; font-weight: 650; min-width: 0; }
.row .rt b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .rt b .ico { width: 14px; height: 14px; color: var(--acc); fill: var(--acc); }
.row .rt small { display: flex; gap: 3px 10px; flex-wrap: wrap; color: var(--dim); font-size: 12.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.row .yr { flex: none; font-size: 12.5px; font-weight: 700; color: var(--dim); padding: 4px 9px; border-radius: 8px; background: var(--card2); font-variant-numeric: tabular-nums; }
.row .yr.done { color: var(--ok); }

.filters { display: grid; gap: 12px; margin-bottom: 18px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 46px; color: var(--dim); }
.search:focus-within { border-color: var(--acc); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 16px; height: 100%; -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { display: none; }
.frow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sortsel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; height: 40px; padding: 0 12px; color: var(--text); font-weight: 600; font-size: 14px; outline: 0; }
.count { color: var(--dim); font-size: 13.5px; margin: 0 2px 10px; font-variant-numeric: tabular-nums; }

/* One quest ------------------------------------------------------------------------------------------ */
.item { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 30px; align-items: start; }
.item.nopic { grid-template-columns: minmax(0, 720px); }
.hero { border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); cursor: zoom-in; }
.hero img { width: 100%; max-height: 72vh; object-fit: cover; }
.smallpic { margin-top: 12px; display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 13px; }
.smallpic img { width: 84px; height: 63px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); cursor: zoom-in; }
.ititle { display: flex; align-items: flex-start; gap: 12px; }
.ititle h1 { font-size: 30px; line-height: 1.12; letter-spacing: -.02em; overflow-wrap: anywhere; flex: 1; }
.ititle .star { color: var(--line); padding: 6px; margin: -2px -6px 0 0; }
.ititle .star.on { color: var(--acc); }
.ititle .star.on .ico { fill: var(--acc); }
.ititle .star .ico { width: 26px; height: 26px; }
.why { color: #cfd8d6; font-size: 16.5px; line-height: 1.5; margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--dim); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.state.done { color: var(--ok); }
.state .ico { width: 15px; height: 15px; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.facts li { padding: 11px 0; border-top: 1px solid var(--line); min-width: 0; }
.facts li:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.facts li.wide { grid-column: 1 / -1; }
.facts li.wide:nth-child(2) { border-top: 1px solid var(--line); padding-top: 11px; }
.facts .k { display: block; color: var(--dim); font-size: 12.5px; font-weight: 600; }
.facts .v { display: block; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.facts .v small { color: var(--dim); font-weight: 500; font-size: 13px; }
.facts .v small.blk { display: block; margin-top: 1px; }
@media (min-width: 900px) { .item:not(.nopic) > div:first-child { position: sticky; top: calc(84px + var(--st)); } }
.links li + li { border-top: 1px solid var(--line); }
.links a { display: flex; align-items: center; gap: 12px; padding: 11px 0; color: var(--text); }
.links li:first-child a { padding-top: 0; }
.links li:last-child a { padding-bottom: 0; }
.links a .ico { color: var(--dim); }
.links a b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links a small { display: block; color: var(--dim); font-size: 12.5px; }
.links a > span { min-width: 0; flex: 1; }
.note { white-space: pre-wrap; overflow-wrap: anywhere; color: #d6dedc; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; }
.keep { border-color: rgba(111, 207, 151, .35); }
.keep h2 { color: var(--ok); }

/* Menu, guide ------------------------------------------------------------------------------------- */
.menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.menu .card + .card { margin-top: 0; }
.menu .card > * + * { margin-top: 10px; }
.menu .card h2 { margin-bottom: 0; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.mrow b { font-weight: 600; }
.mrow small { display: block; color: var(--dim); font-size: 12.5px; }
.url { font-size: 13px !important; color: var(--dim) !important; margin-top: 0 !important; min-height: 40px !important; padding: 8px 10px !important; }
.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 34px; align-items: start; }
.gnav { position: sticky; top: calc(84px + var(--st)); display: grid; gap: 2px; }
.gnav a { padding: 8px 12px; border-radius: 10px; color: var(--dim); font-weight: 600; }
.gnav a:hover { color: var(--text); background: var(--card); }
.gtopic { scroll-margin-top: calc(84px + var(--st)); }
.gtopic + .gtopic { margin-top: 14px; }
.gtopic p + p, .gtopic p + ol, .gtopic ol + p { margin-top: 10px; }
.gtopic ol { list-style: decimal; padding-left: 22px; color: #d6dedc; }
.gtopic ol li + li { margin-top: 5px; }
.gtopic p { color: #d6dedc; }
.news li + li { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.news b { font-size: 16px; }
.news small { color: var(--dim); margin-left: 8px; }
.news ul { list-style: disc; padding-left: 20px; margin-top: 8px; color: #d6dedc; }
.news ul li { margin: 4px 0 0; padding: 0; border: 0; }

/* Gate, modal, toast, photo viewer ----------------------------------------------------------------- */
.gate { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; padding: calc(9vh + var(--st)) 18px 40px; }
.gatecard { max-width: 380px; margin: 0 auto; }
.gatecard > * + * { margin-top: 14px; }
.gatecard img { width: 68px; height: 68px; border-radius: 17px; }
.gatecard h1 { font-size: 28px; letter-spacing: -.02em; }
.gatecard label { display: block; font-size: 13px; font-weight: 600; color: var(--dim); }
.gatecard .sub { color: var(--dim); }
.gatecard.loading { text-align: center; }
.gatecard.loading img { margin: 0 auto; }
.err { color: var(--danger); font-size: 14px; font-weight: 600; }
.or { color: var(--dim); font-size: 13px; text-align: center; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(4, 7, 8, .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; }
.mcard { width: min(480px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 24px 80px rgba(0, 0, 0, .5); }
.mcard > * + * { margin-top: 14px; }
.mhead { display: flex; align-items: center; gap: 10px; }
.mhead h2 { font-size: 19px; flex: 1; }
.mcard .seen { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.mcard .seen b { display: block; font-size: 13px; color: var(--dim); margin-bottom: 4px; }
.mcard .seen + .seen { margin-top: 8px; }
.mcard > .url { margin-top: 14px !important; }
.facts li:last-child { padding-bottom: 0; }
.ylist { display: grid; gap: 6px; }
.ylist button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.ylist button:hover { border-color: #46575f; }
.ylist button.on { border-color: var(--acc); }
.ylist button b { font-size: 16px; font-variant-numeric: tabular-nums; min-width: 78px; }
.ylist button small { color: var(--dim); font-size: 13px; flex: 1; font-variant-numeric: tabular-nums; }
.ylist button .ico { color: var(--acc); }
.toast { position: fixed; left: 50%; top: calc(18px + var(--st)); transform: translate(-50%, -12px); background: #060909; color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); border: 1px solid var(--line); opacity: 0; pointer-events: none; transition: .18s; z-index: 60; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 28px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.act { pointer-events: auto; }
.toast button { color: var(--acc); font-weight: 800; padding: 4px 6px; flex: none; }
.viewer { position: fixed; inset: 0; z-index: 55; background: rgba(3, 5, 6, .95); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.viewer img { max-width: 100%; max-height: calc(100dvh - 32px); border-radius: 10px; }
.viewer .icon-btn { position: absolute; top: calc(14px + var(--st)); right: 14px; }

/* A shared quest (someone opening a link) ---------------------------------------------------------- */
.sharedby { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 13.5px; margin-bottom: 18px; }
.sharedby img { width: 26px; height: 26px; border-radius: 7px; }

/* Wide: the Someday shelf sits beside the years ------------------------------------------------------ */
@media (min-width: 1500px) {
  :root { --wrap: 1560px; }
  .years-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 40px; align-items: start; }
  .years-wrap .shelf { order: 2; position: sticky; top: calc(84px + var(--st)); margin: 0; max-height: calc(100vh - 110px); overflow-y: auto; }
  .years-wrap .shelf .rows { grid-template-columns: 1fr; }
  .years-wrap .shelf-head { cursor: default; }
  .years-wrap .shelf-head .chev { display: none; }
  .page.narrow, .page.mid { max-width: 780px; }
  .page.mid { max-width: 1180px; }
}

/* Phone ---------------------------------------------------------------------------------------------- */
@media (max-width: 899px) {
  .head-in { height: 54px; padding: 0 16px; }
  .head .tabs, .head .btn, .head .icon-btn { display: none; }
  .page { padding: 18px 16px calc(96px + var(--sb)); }
  .ptop h1 { font-size: 26px; }
  .nav4 { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; background: rgba(14, 19, 21, .95); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--sb)); }
  .nav4 a { display: grid; justify-items: center; gap: 2px; padding: 6px 0 4px; color: var(--dim); font-size: 11.5px; font-weight: 600; border-radius: 12px; }
  .nav4 a .ico { width: 24px; height: 24px; }
  .nav4 a.on { color: var(--text); }
  .nav4 a.add { color: var(--acc); }
  .year { grid-template-columns: 1fr; gap: 12px; padding: 18px 0; }
  .yhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .yhead .y { font-size: 28px; }
  .yhead .tot { margin: 0; flex: 1; }
  .yhead .tot br { display: none; }
  .yhead .tot .sep::before { content: " · "; }
  .yadd { margin: 0 -4px 0 0; }
  .yadd span { display: none; }
  .yadd .ico { width: 22px; height: 22px; }
  .year.open-year { grid-template-columns: 1fr auto; padding: 10px 0; }
  .year.open-year .ybody span { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tiles .tile:only-child { grid-column: 1 / -1; }
  .tiles .tile:only-child .pic { aspect-ratio: 16 / 9; }
  .tile .cap { padding: 9px 10px 10px; }
  .tile .cap b { font-size: 14px; }
  .rows { grid-template-columns: 1fr; gap: 8px; }
  .item { grid-template-columns: 1fr; gap: 18px; }
  .hero { margin: -18px -16px 0; border-radius: 0; border-width: 0 0 1px; }
  .hero img { max-height: 56vh; }
  .ititle h1 { font-size: 25px; }
  .acts .btn { flex: 1; padding: 0 10px; }
  .guide { grid-template-columns: 1fr; gap: 16px; }
  .gnav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .gnav a { background: var(--card); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: 13.5px; }
  .modal { place-items: end center; padding: 0; }
  .mcard { width: 100%; border-radius: 20px 20px 0 0; border-width: 1px 0 0; padding: 18px 16px calc(18px + var(--sb)); max-height: 88dvh; }
  .savebar { margin: 20px -16px calc(-96px - var(--sb)); padding: 10px 16px; bottom: calc(62px + var(--sb)); }
  .savebar .btn:not(.ghost):not(.danger) { flex: 1; }
  .menu { grid-template-columns: 1fr; }
  .seg.full button { font-size: 13px; gap: 5px; padding: 10px 2px; }
  .seg.full .dem svg { width: 22px; }
}
@media (max-width: 380px) { .months { grid-template-columns: repeat(4, 1fr); } .facts { grid-template-columns: 1fr; } .facts li:nth-child(2) { border-top: 1px solid var(--line); padding-top: 11px; } }
@media (hover: none) { .row:hover, .tile:hover { border-color: var(--line); } }
