/* Takanama main app */

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: hidden;
  background: var(--black); color: var(--white);
  transition: transform 800ms var(--ease-io);
}
.no-js .intro, .intro.is-gone { display: none; }
.intro-sweep { position: absolute; inset: 0; background: var(--white); transform: scaleY(0); transform-origin: bottom; transition: transform 640ms var(--ease-io); }
.intro-stage { position: relative; display: grid; place-items: center; width: 100%; height: 100%; mix-blend-mode: difference; color: #fff; }
.intro-stage > * { grid-area: 1 / 1; }
.intro-count {
  font-family: var(--display); font-size: clamp(88px, 17vw, 300px); line-height: 1; font-variant-numeric: tabular-nums;
  transition: transform 700ms var(--ease-io), opacity 500ms var(--ease-io);
}
.intro-name { display: flex; font-family: var(--display); text-transform: uppercase; font-size: clamp(84px, 19.5vw, 400px); line-height: .86; overflow: hidden; padding: 0 .02em; }
.intro-name .ch { display: inline-block; transform: translateY(105%); transition: transform 900ms var(--ease-out); transition-delay: calc(var(--i) * 55ms); }
.intro-status {
  align-self: end; margin-bottom: max(40px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 600; transition: opacity 400ms var(--ease-out);
}
.intro-skip {
  position: absolute; right: var(--margin); bottom: max(32px, env(safe-area-inset-bottom)); z-index: 2; mix-blend-mode: difference;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; color: #000; font-weight: 600; font-size: 14px;
}
.intro.is-name .intro-count { transform: translateY(-38%) scale(.86); opacity: 0; }
.intro.is-name .intro-name .ch { transform: none; }
.intro.is-sweep .intro-sweep { transform: scaleY(1); }
.intro.is-sweep .intro-status { opacity: 0; }
.intro.is-out { transform: translateY(-100%); }
.intro.is-out .intro-name .ch { transform: translateY(-30%); transition-duration: 800ms; transition-timing-function: var(--ease-io); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow-x: clip; display: flex; flex-direction: column; gap: clamp(20px, 3vh, 36px);
  min-height: calc(100svh - var(--bar-h)); padding: clamp(16px, 3vh, 32px) var(--margin) clamp(32px, 5vh, 56px);
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.month-switch { display: flex; align-items: center; gap: 10px; }
.month-name { margin: 0; min-width: 9.5em; text-align: center; font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; }
.hero-total { margin: 0; font-weight: 400; }
.hero-num { display: inline-flex; align-items: flex-start; font-size: clamp(96px, 22vw, 380px); line-height: 1; white-space: nowrap; margin-left: -.03em; }
.hero-line { margin: 0; max-width: 44ch; font-size: clamp(20px, 2vw, 30px); line-height: 1.3; font-weight: 500; }
.hero-line b { font-weight: 800; }
.hero-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; }
.hero-facts > div { display: grid; gap: 6px; padding: 18px 20px; border-radius: 20px; background: var(--step); }
.hero-facts dt { font-size: 15px; font-weight: 600; color: var(--muted); }
.hero-facts dd { margin: 0; font-size: clamp(32px, 3.4vw, 56px); line-height: 1; overflow-wrap: anywhere; }

/* What is waiting to be bought, right in the hero */
.hero-needs { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 20px; }
.needs-label { margin: 0; font-size: 15px; font-weight: 700; white-space: nowrap; }
.needs-label a { color: var(--muted); text-decoration: none; transition: color var(--t-fast) var(--ease-out); }
.needs-label a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.needs-list { list-style: none; margin: 0; padding: 4px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.needs-list::-webkit-scrollbar { display: none; }
.needs-list li { flex: none; }
.is-ready .needs-list li { animation: need-in .7s var(--ease-out) both; animation-delay: calc(400ms + var(--i) * 60ms); }
@keyframes need-in { from { opacity: 0; transform: translateX(24px); } }
.need {
  display: inline-flex; align-items: baseline; gap: 8px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--step); color: var(--fg); white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.need { align-items: center; }
.need b { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 21px; line-height: 1; }
.need span { font-weight: 700; font-size: 14px; }
.need small { font-size: 13px; font-weight: 600; color: var(--muted); }
.need:hover { background: var(--step2); }
.need:active { transform: scale(.96); }
.need.is-urgent { background: var(--fg); color: var(--bg); }
.need.is-urgent small { color: inherit; opacity: .7; }
.need.is-forme { box-shadow: inset 0 0 0 2px var(--fg); }
.need--add { background: transparent; box-shadow: inset 0 0 0 2px var(--step2); }
.need--add svg { width: 18px; height: 18px; align-self: center; }
.need--add b { font-family: var(--text); text-transform: none; font-weight: 700; font-size: 15px; }

/* Daily bars */
.days { --n: 30; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(3px, .5vw, 8px); height: clamp(110px, 18vh, 190px); margin-top: auto; padding-top: 34px; }
.day {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 8px;
  height: 100%; padding: 0; border: 0; background: none; color: var(--fg); border-radius: 6px;
}
.day-bar {
  display: block; width: 100%; height: 100%; border-radius: 4px; background: var(--fg);
  transform-origin: bottom; transform: scaleY(var(--h, .02));
  transition: transform 1.1s var(--ease-out), background var(--t-fast) var(--ease-out);
  transition-delay: calc(var(--i) * 22ms);
}
.day[data-empty="true"] .day-bar { background: var(--step2); transform: scaleY(.03); }
.day[data-future="true"] .day-bar { background: transparent; box-shadow: inset 0 0 0 2px var(--step2); transform: scaleY(.03); }
.days.is-pre .day-bar { transform: scaleY(0); }
.day-n { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; height: 16px; line-height: 16px; }
.day[data-today="true"] .day-n { color: var(--fg); font-weight: 800; }
.day:hover .day-bar, .day:focus-visible .day-bar { background: var(--muted); }
.days.has-pick .day:not([aria-pressed="true"]) .day-bar { background: var(--step2); }
.day-tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 3; transform: translate(-50%, 6px); opacity: 0; pointer-events: none;
  padding: 8px 12px; border-radius: 10px; background: var(--fg); color: var(--bg); font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.day:hover .day-tip, .day:focus-visible .day-tip { opacity: 1; transform: translate(-50%, 0); }
.day[data-align="start"] .day-tip { left: 0; transform: translate(0, 6px); }
.day[data-align="end"] .day-tip { left: auto; right: 0; transform: translate(0, 6px); }
.day[data-align]:hover .day-tip, .day[data-align]:focus-visible .day-tip { transform: none; }

/* ---------- ticker tape ---------- */
.tape { overflow: hidden; height: clamp(64px, 7vw, 96px); display: flex; align-items: center; }
.tape-track { display: flex; width: max-content; animation: tape 60s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-item { display: inline-flex; align-items: center; gap: .5em; padding-right: .9em; font-family: var(--display); text-transform: uppercase; font-size: clamp(30px, 3.4vw, 50px); line-height: 1; white-space: nowrap; }
.tape-item i { font-style: normal; font-family: var(--text); font-weight: 700; font-size: .4em; text-transform: none; color: var(--muted); }
.tape-item::after { content: ""; width: .34em; height: .34em; border-radius: 50%; background: currentColor; margin-left: .45em; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- entry + ledger ---------- */
.book { padding: clamp(72px, 10vw, 160px) var(--margin); }
.book-grid { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: clamp(40px, 6vw, 112px); align-items: start; }
.slip { position: sticky; top: calc(var(--bar-h) + 20px); display: grid; gap: 24px; }
.slip-form { display: grid; gap: 20px; }
.amount-field { display: grid; gap: 8px; }
.amount-field > label { font-size: 14px; font-weight: 600; }
.amount-wrap {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 22px; background: var(--fg); color: var(--bg);
  transition: transform var(--t-mid) var(--ease-out);
}
.amount-wrap:focus-within { transform: scale(1.015); }
.amount-cur { font-size: 44px; font-weight: 800; line-height: 1; }
.amount-input {
  width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: transparent; color: inherit;
  font-size: clamp(64px, 6vw, 92px); line-height: 1.15; text-transform: none; -moz-appearance: textfield;
}
.amount-input::-webkit-outer-spin-button, .amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-input::placeholder { color: inherit; opacity: .35; }
.amount-wrap.is-shake { animation: shake 420ms var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.people-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.people-chips:empty { display: none; }
.slip-foot { margin: 0; }
@media (hover: none) { .kbd-hint { display: none; } }

.ledger-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.ledger-sum { margin: 0 0 .5em; font-size: 18px; font-weight: 600; }
.ledger-sum b { font-family: var(--display); font-weight: 400; font-size: 30px; }
.toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; margin-bottom: 24px; }
.toolbar .search { grid-column: 1 / -1; }
.toolbar label { display: block; min-width: 0; }
.search { position: relative; }
.search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 46px; }
.day-filter { display: flex; align-items: center; gap: 14px; margin: -8px 0 20px; font-weight: 600; animation: fade-in var(--t-mid) var(--ease-out); }
.ledger-list { min-height: 240px; }
.ledger-loading, .empty { display: grid; justify-items: start; gap: 16px; padding: 48px 0; }
.ledger-loading p, .empty p { margin: 0; font-size: 18px; font-weight: 600; }
.empty .display { font-size: clamp(40px, 5vw, 72px); }

.dgroup { margin-bottom: 44px; }
.dgroup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 12px 12px; }
.dgroup-head h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.dgroup-head h3 span { color: var(--muted); font-weight: 600; }
.dgroup-total { font-family: var(--display); font-size: 30px; line-height: 1; }
.rows { list-style: none; margin: 0; padding: 0; }
.entry {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto minmax(80px, 140px) minmax(110px, auto) 44px; gap: 18px; align-items: center;
  padding: 14px 12px; border-radius: 16px; border-top: 1px solid var(--line);
  transition: background var(--t-fast) var(--ease-out);
}
.entry:first-child { border-top-color: transparent; }
.entry:hover, .entry:focus-within { background: var(--step); border-top-color: transparent; }
.entry:hover + .entry, .entry:focus-within + .entry { border-top-color: transparent; }
.entry-time { font-size: 14px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.entry-what { min-width: 0; }
.entry-what b { display: block; font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.entry-what small { display: block; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.entry-who { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-amt { font-family: var(--display); font-size: 30px; line-height: 1; text-align: right; white-space: nowrap; }
.entry.is-new { animation: row-in 1.4s var(--ease-out) both; }
@keyframes row-in {
  0% { opacity: 0; transform: translateX(-28px); background: var(--fg); color: var(--bg); }
  30% { opacity: 1; transform: none; background: var(--fg); color: var(--bg); }
  100% { background: transparent; }
}
.ledger-more { display: flex; justify-content: center; padding-top: 8px; }

/* ---------- people ---------- */
.people { padding: clamp(80px, 11vw, 180px) var(--margin); }
.people-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 80px); }
.people-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 120px); align-items: start; }
.rank, .cat-list { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 24px; padding: 22px 0; }
.rank-name { min-width: 0; font-family: var(--display); text-transform: uppercase; font-size: clamp(34px, 3.6vw, 56px); line-height: .95; overflow-wrap: break-word; }
.rank li:first-child .rank-name, .rank li:first-child .rank-amt { font-size: clamp(48px, 5.4vw, 88px); }
.rank-amt { font-family: var(--display); font-size: clamp(34px, 3.6vw, 56px); line-height: .95; text-align: right; white-space: nowrap; }
.rank-share { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 15px; color: var(--muted); font-weight: 600; }
.meter { grid-column: 1 / -1; height: 14px; border-radius: 999px; background: var(--step); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--fg); transform-origin: left; transform: scaleX(var(--w, 0)); transition: transform 1.3s var(--ease-out); transition-delay: var(--d, 0ms); }
.meter.is-pre > span { transform: scaleX(0); }
.cats-title { font-size: clamp(32px, 3vw, 48px); margin-bottom: 20px; }
.cat-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: baseline; padding: 14px 0; }
.cat-list .cat-name { font-weight: 700; font-size: 17px; }
.cat-list .cat-amt { font-family: var(--display); font-size: 28px; line-height: 1; }
.cat-list .meter { height: 8px; }
.people .empty { padding: 0; }

/* ---------- requests ---------- */
.requests { padding: clamp(80px, 11vw, 180px) var(--margin); }
.req-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(40px, 6vw, 88px); }
.req-intro { display: grid; gap: 24px; justify-items: start; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.req {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: center;
  padding: clamp(20px, 2.4vw, 32px); border-radius: 28px; background: var(--step);
  transition: transform var(--t-mid) var(--ease-out), opacity var(--t-mid) var(--ease-out);
}
.req.is-urgent { --fg: var(--white); --bg: var(--black); --step: #262626; --step2: #3a3a3a; --muted: #b4b4b4; background: var(--black); color: var(--white); }
.tag--plain::before { display: none; }

/* Hero entrance after the intro */
.js .hero [data-hero] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0ms); }
.is-ready .hero [data-hero] { opacity: 1; transform: none; }
.req-name { margin: 0; font-family: var(--display); text-transform: uppercase; font-size: clamp(34px, 4vw, 60px); line-height: .95; overflow-wrap: anywhere; }
.req-name small { font-family: var(--text); text-transform: none; font-size: .36em; font-weight: 700; vertical-align: .55em; margin-left: .3em; }
.req-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--muted); }
.req-notes { margin: 10px 0 0; font-size: 16px; max-width: 60ch; }
.req-side { display: flex; align-items: center; gap: 12px; }
.req.is-leaving { opacity: 0; transform: translateX(40px) scale(.98); }
.req-done-wrap { margin-top: clamp(56px, 7vw, 100px); }
.req-done-title { font-size: clamp(32px, 3vw, 48px); margin-bottom: 16px; }
.req-done { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.req-done li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 16px 0; border-top: 1px solid var(--line); align-items: baseline; }
.req-done b { font-size: 17px; }
.req-done .amt { font-family: var(--display); font-size: 26px; line-height: 1; }
.req-done .sub { grid-column: 1 / -1; font-size: 14px; color: var(--muted); font-weight: 600; }
.done-item { font-family: var(--display); text-transform: uppercase; font-size: 34px; line-height: 1; }

/* ---------- footer ---------- */
.foot { padding: clamp(56px, 8vw, 120px) 0 calc(32px + env(safe-area-inset-bottom)); overflow: hidden; }
.foot-name { margin: 0; font-size: 26vw; line-height: .8; white-space: nowrap; padding-left: var(--margin); }
.foot-name span { display: inline-block; will-change: transform; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; padding: 40px var(--margin) 0; }
.foot-row p { margin: 0; max-width: 52ch; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; font-weight: 600; }
.foot-links a { text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* ---------- phone dock ---------- */
.dock { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .entry { grid-template-columns: 52px minmax(0, 1fr) minmax(80px, 120px) auto 44px; }
  .entry .entry-cat { display: none; }
}
@media (max-width: 1020px) {
  .book-grid { grid-template-columns: 1fr; }
  .slip { position: static; max-width: 640px; }
  .people-grid, .req-head { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 760px) {
  :root { --bar-h: 60px; }
  .bar nav { display: none; }
  .wordmark { font-size: 26px; }
  .sync-text { display: none; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: grid; grid-template-columns: 1fr auto; gap: 8px;
    padding: 12px var(--margin) calc(12px + env(safe-area-inset-bottom));
    transition: transform var(--t-mid) var(--ease-out);
  }
  .dock.is-hidden { transform: translateY(110%); }
  .hero { min-height: calc(100svh - var(--bar-h) - 84px); }
  .hero-cta { display: none; }
  .month-switch { width: 100%; justify-content: space-between; }
  .month-name { min-width: 0; }
  .hero-line { font-size: 20px; }
  .hero-facts > div { padding: 14px 16px; border-radius: 16px; }
  .hero-needs { grid-template-columns: 1fr; gap: 8px; }
  .needs-list { margin: 0 calc(var(--margin) * -1); padding: 4px var(--margin); }
  .days { gap: 2px; }
  .day-n { font-size: 11px; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar label:nth-of-type(4) { grid-column: 1 / -1; }
  .row2 { grid-template-columns: 1fr 1fr; }
  .entry {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what amt" "meta edit"; gap: 6px 12px; padding: 14px 6px;
  }
  .entry-what { grid-area: what; }
  .entry-amt { grid-area: amt; font-size: 26px; }
  .entry-time, .entry-cat, .entry-who { display: none; }
  .entry-meta { grid-area: meta; display: block !important; font-size: 14px; color: var(--muted); font-weight: 600; }
  .entry-edit { grid-area: edit; justify-self: end; }
  .dgroup-head { padding: 0 6px 8px; }
  .rank li { padding: 16px 0; }
  .req { grid-template-columns: 1fr; border-radius: 22px; }
  .req-side { justify-content: space-between; }
  .req-done { grid-template-columns: 1fr; }
  .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
  dialog.sheet { width: 100vw; max-width: 100vw; max-height: 94vh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  dialog.sheet[open] { animation-name: sheet-up; }
  dialog.sheet.is-closing { animation-name: sheet-down; }
  .sheet-body { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
.entry-meta { display: none; }
@media (max-width: 420px) {
  .row2 { grid-template-columns: 1fr; }
  .hero-facts dd { font-size: 30px; }
}

/* ---------- sign in gate ---------- */
.gate { position: fixed; inset: 0; z-index: 900; overflow-y: auto; transition: transform 700ms var(--ease-io); }
.gate[hidden] { display: none; }
.gate.is-leaving { transform: translateY(-100%); }
body.is-gated { overflow: hidden; }
body.is-gated .bar, body.is-gated .dock { visibility: hidden; }

/* ---------- bar: bell + avatar ---------- */
.bell { position: relative; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); }
.bell.is-ring svg { animation: ring 900ms var(--ease-out); transform-origin: 50% 10%; }
@keyframes ring { 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.avatar { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--fg); color: var(--bg); font-weight: 800; font-size: 15px; letter-spacing: .02em; transition: transform var(--t-fast) var(--ease-out); }
.avatar:hover { transform: scale(1.06); }
.avatar:active { transform: scale(.94); }

.alert-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 14px var(--margin); background: var(--b-step); animation: drop-in var(--t-mid) var(--ease-out) both; }
.alert-cta p { margin: 0; font-size: 15px; }
.alert-cta-actions { display: flex; gap: 16px; align-items: center; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-12px); } }

/* ---------- hero top with the book switch ---------- */
.hero-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.hero-top .hero-cta { justify-self: end; }
.book-switch { justify-self: start; }
body.is-personal .hero-num { letter-spacing: 0; }

/* ---------- entries owned by others ---------- */
.entry-edit:empty { width: 44px; }
.entry.is-gone { animation: row-out 380ms var(--ease-in) both; }
@keyframes row-out { to { opacity: 0; transform: translateX(40px); } }

/* ---------- people in personal mode ---------- */
.people.is-personal .people-grid { grid-template-columns: 1fr; }
.people.is-personal .rank { display: none; }
.people.is-personal .cat-list { columns: 2; column-gap: clamp(40px, 6vw, 120px); }
.people.is-personal .cat-list li { break-inside: avoid; }

/* ---------- request views ---------- */
.req-view { margin-bottom: 20px; }
.req.is-forme:not(.is-urgent) { box-shadow: inset 0 0 0 3px var(--fg); }
.req.is-overdue .req-name { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .1em; }
.req-list .empty { padding: 24px 0; }

/* ---------- bell sheet + account sheet ---------- */
dialog.sheet--side { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; border-radius: 28px 0 0 28px; width: min(460px, 100vw); }
dialog.sheet--side[open] { animation-name: side-in; }
dialog.sheet--side.is-closing { animation-name: side-out; }
@keyframes side-in { from { transform: translateX(100%); } }
@keyframes side-out { to { transform: translateX(100%); } }
.bell-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bell-list a { display: grid; gap: 4px; padding: 16px 18px; border-radius: 18px; background: var(--step); text-decoration: none; transition: background var(--t-fast) var(--ease-out); }
.bell-list a:hover { background: var(--step2); }
.bell-list b { font-size: 16px; }
.bell-list span { font-size: 15px; color: var(--muted); }
.bell-list small { font-size: 13px; color: var(--muted); }
.bell-list .is-unread a { background: var(--fg); color: var(--bg); }
.bell-list .is-unread span, .bell-list .is-unread small { color: inherit; opacity: .75; }
.bell-list .empty { padding: 12px 0; display: grid; gap: 6px; }
.bell-list .empty p { margin: 0; }
.me-name { display: grid; gap: 2px; }
.me-name b { font-size: 22px; }
.me-block { display: grid; gap: 12px; padding: 20px; border-radius: 22px; background: var(--step); }
.me-block h3 { margin: 0; font-size: 18px; font-weight: 800; }
.me-block .input { background: var(--bg); }
.me-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.me-foot { padding-top: 6px; }
.row2--wide { grid-template-columns: 1fr 120px; }

@media (max-width: 1020px) {
  .hero-top { grid-template-columns: 1fr auto; }
  .hero-top .month-switch { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 760px) {
  .hero-top { grid-template-columns: 1fr; gap: 14px; }
  .book-switch { justify-self: stretch; display: grid; grid-template-columns: 1fr 1fr; }
  .book-switch button { justify-content: center; }
  .bar-right { gap: 8px; }
  .people.is-personal .cat-list { columns: 1; }
  dialog.sheet--side { height: auto; max-height: 94vh; margin: auto 0 0; border-radius: 26px 26px 0 0; width: 100vw; }
  dialog.sheet--side[open] { animation-name: sheet-up; }
  dialog.sheet--side.is-closing { animation-name: sheet-down; }
  .row2--wide { grid-template-columns: 1fr 96px; }
}
