/* Церковный календарь. Всё в rem: «Размер текста» в настройках меняет --app-scale и вместе с ним всё приложение. */
:root {
  --app-scale: 1.15;
  --prayer-scale: 1.3;
  --line-gap: 1.6;
  --bg: #F6F0E6;
  --bg2: #EFE5D4;
  --card: #FFFFFF;
  --ink: #2A1C12;
  --muted: #7A6858;
  --line: #E6D9C5;
  --accent: #9B1C1C;
  --accent-ink: #FFFFFF;
  --gold: #B07D1F;
  --rubric: #B3261E;
  --shadow: 0 6px 24px rgba(74, 44, 14, .10), 0 1px 3px rgba(74, 44, 14, .08);
  --radius: 1.25rem;
  --tabbar-h: 4.6rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
[data-theme="sepia"] {
  --bg: #EFE3C8; --bg2: #E6D6B4; --card: #F8EFDB; --ink: #3A2814; --muted: #7C6544; --line: #DCC9A2;
  --accent: #8C2A12; --gold: #9A6A12; --rubric: #A2321A;
}
[data-theme="dark"] {
  --bg: #13100E; --bg2: #1B1714; --card: #221C18; --ink: #F2E9DD; --muted: #AE9E8C; --line: #3A3029;
  --accent: #E26A5C; --accent-ink: #1A0E0B; --gold: #DDB15E; --rubric: #F0857A;
  --shadow: 0 6px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
[data-theme="contrast"] {
  --bg: #000; --bg2: #000; --card: #000; --ink: #FFF; --muted: #FFF; --line: #FFF;
  --accent: #FFD43B; --accent-ink: #000; --gold: #FFD43B; --rubric: #FFD43B; --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: calc(16px * var(--app-scale)); background: var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); }
.serif { font-family: "Georgia", "Times New Roman", "PT Serif", serif; }

/* ---------- pages ---------- */
#pages { position: relative; min-height: 100vh; overflow-x: hidden; }
.page {
  display: none; padding: max(1rem, env(safe-area-inset-top)) 1rem calc(var(--tabbar-h) + var(--safe-b) + 1.5rem);
  max-width: 46rem; margin: 0 auto; min-height: 100vh;
}
.page.on { display: block; animation: pageIn .38s var(--ease); }
.page.on.from-left { animation-name: pageInL; }
@keyframes pageIn { from { opacity: 0; transform: translateX(2.2rem); } to { opacity: 1; transform: none; } }
@keyframes pageInL { from { opacity: 0; transform: translateX(-2.2rem); } to { opacity: 1; transform: none; } }

.ptitle { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .4rem 0 1rem; }
.ptitle h1 { font-size: 1.75rem; margin: 0; letter-spacing: -.01em; }
.ptitle .sub { color: var(--muted); font-size: .95rem; }

/* ---------- tab bar ---------- */
#tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(.6rem + var(--safe-b)); z-index: 30;
  width: min(calc(100% - 1.2rem), 34rem); height: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: .35rem;
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--line); border-radius: 1.6rem; box-shadow: var(--shadow);
}
.tab {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  font-size: .8rem; font-weight: 600; color: var(--muted); border-radius: 1.2rem; transition: color .25s;
}
.tab .ti svg { width: 1.6rem; height: 1.6rem; transition: transform .35s var(--ease); }
.tab.on { color: var(--accent-ink); }
.tab.on .ti svg { transform: translateY(-1px) scale(1.08); }
.tab-pill {
  position: absolute; top: .35rem; bottom: .35rem; left: .35rem; width: calc((100% - .7rem) / 4);
  background: var(--accent); border-radius: 1.2rem; transition: transform .45s var(--ease); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* ---------- cards, buttons ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.15rem; margin: 0 0 1rem; border: 1px solid var(--line); }
.card h2, .card h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.card .muted, .muted { color: var(--muted); }
.small { font-size: .9rem; }
.rise { animation: rise .55s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(1rem) scale(.985); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3.2rem; padding: .7rem 1.2rem;
  border-radius: 1rem; font-weight: 700; background: var(--bg2); color: var(--ink); border: 1px solid var(--line);
  transition: transform .15s, background .2s, box-shadow .2s;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; color: var(--rubric); border-color: color-mix(in srgb, var(--rubric) 50%, transparent); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 2.5rem; padding: .4rem .9rem; font-size: .92rem; border-radius: .8rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.stack > * + * { margin-top: .6rem; }
.iconbtn {
  width: 3rem; height: 3rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s;
}
.iconbtn:active { transform: scale(.9); }
.iconbtn svg { width: 1.4rem; height: 1.4rem; }

/* ---------- day hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 1.6rem; color: #fff; padding: 1.3rem 1.25rem 1.2rem; margin-bottom: 1rem;
  background: var(--hero, linear-gradient(140deg, #C9962E, #7A4C0E)); box-shadow: 0 14px 36px color-mix(in srgb, var(--hero-c, #7A4C0E) 45%, transparent);
  touch-action: pan-y; user-select: none; transition: background .6s;
}
.hero::before { /* мягкое сияние */
  content: ""; position: absolute; width: 22rem; height: 22rem; right: -8rem; top: -9rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 65%); animation: glow 6s ease-in-out infinite;
}
.hero .cross { position: absolute; right: .9rem; top: .8rem; width: 5.5rem; height: 5.5rem; opacity: .22; animation: float 7s ease-in-out infinite; }
@keyframes glow { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-.35rem) rotate(2deg); } }
.hero-in { position: relative; transition: transform .3s var(--ease), opacity .3s; }
.hero .wd { font-size: 1rem; opacity: .9; text-transform: capitalize; font-weight: 600; }
.hero .date { font-size: 2.6rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin: .1rem 0 .15rem; }
.hero .old { font-size: .95rem; opacity: .9; }
.hero .feast { font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; line-height: 1.25; margin: .9rem 0 .2rem; font-weight: 700; text-wrap: balance; }
.hero .feast.none { font-size: 1.15rem; font-weight: 500; opacity: .92; }
.hero .chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 99rem; font-size: .88rem; font-weight: 700; background: rgba(255, 255, 255, .2); backdrop-filter: blur(6px); }
.chip.solid { background: #fff; color: var(--hero-c, #7A4C0E); }
.hero-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; gap: .5rem; }
.hero-nav button { color: #fff; background: rgba(255, 255, 255, .18); border-radius: 99rem; min-height: 2.8rem; padding: 0 1rem; font-weight: 700; display: inline-flex; align-items: center; gap: .35rem; transition: transform .15s, background .2s; }
.hero-nav button:active { transform: scale(.93); background: rgba(255, 255, 255, .3); }
.hero-nav .today { background: #fff; color: var(--hero-c); }
.swipe-hint { text-align: center; font-size: .8rem; opacity: .75; margin-top: .55rem; }

/* события дня */
.ev { display: flex; gap: .85rem; align-items: center; padding: .85rem .2rem; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.ev:first-of-type { border-top: 0; }
.ev .dot { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: .9rem; display: grid; place-items: center; font-size: 1.25rem; background: var(--bg2); }
.ev .t { font-weight: 650; line-height: 1.3; }
.ev .k { font-size: .85rem; color: var(--muted); margin-top: .1rem; }
.ev .go { margin-left: auto; color: var(--muted); }
.ev.red .t { color: var(--rubric); }

/* мера поста */
.food { display: flex; gap: .9rem; align-items: flex-start; }
.food .big { font-size: 2.2rem; line-height: 1; }
.meter { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; margin: .7rem 0 .3rem; }
.meter i { height: .55rem; border-radius: 99rem; background: var(--bg2); transition: background .5s var(--ease); }
.meter i.on { background: var(--meter, var(--accent)); }
.meter-l { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }

/* скоро */
.soon { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .2rem .1rem 1rem; margin: 0 -1rem; padding-left: 1rem; scrollbar-width: none; }
.soon::-webkit-scrollbar { display: none; }
.soon .s {
  flex: 0 0 13.5rem; scroll-snap-align: start; border-radius: 1.2rem; padding: 1rem; color: #fff; min-height: 9.5rem; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; text-align: left; transition: transform .2s;
}
.soon .s:active { transform: scale(.97); }
.soon .s .in { font-weight: 800; font-size: 1.5rem; }
.soon .s .nm { font-family: Georgia, serif; font-weight: 700; line-height: 1.25; font-size: 1.02rem; }
.soon .s .dt { font-size: .85rem; opacity: .9; }

/* ---------- calendar ---------- */
.mhead { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .3rem 0 .8rem; }
.mhead h1 { font-size: 1.6rem; margin: 0; text-align: center; flex: 1; }
.mhead h1 small { display: block; font-size: .9rem; color: var(--muted); font-weight: 500; }
.grid-wrap { touch-action: pan-y; user-select: none; overflow: hidden; }
.wdays, .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.wdays div { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); padding: .2rem 0; }
.wdays div:last-child { color: var(--rubric); }
.grid { transition: transform .3s var(--ease), opacity .3s; }
.cell {
  position: relative; aspect-ratio: 1 / 1.08; border-radius: .9rem; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 1.15rem; transition: transform .15s, box-shadow .2s;
}
.cell:active { transform: scale(.92); }
.cell.out { opacity: .35; }
.cell .cd { font-size: .62rem; font-weight: 600; color: var(--muted); line-height: 1; margin-top: .1rem; }
.cell.red { color: var(--rubric); }
.cell.f1 { background: color-mix(in srgb, #7E57C2 9%, var(--card)); }
.cell.f2 { background: color-mix(in srgb, #7E57C2 18%, var(--card)); }
.cell.f3 { background: color-mix(in srgb, #5E35B1 30%, var(--card)); }
.cell.today { box-shadow: 0 0 0 2px var(--accent) inset; }
.cell.sel { background: var(--accent); color: var(--accent-ink); border-color: transparent; transform: scale(1.04); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent); }
.cell.sel .cd { color: inherit; opacity: .85; }
.cell .marks { position: absolute; top: .3rem; right: .3rem; display: flex; flex-direction: column; gap: .12rem; }
.cell .marks i { width: .38rem; height: .38rem; border-radius: 50%; background: var(--mk); }
.cell.sel .marks i { background: currentColor; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .82rem; color: var(--muted); margin: .8rem 0 1rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: .8rem; height: .8rem; border-radius: .25rem; display: inline-block; }
.daypeek { animation: rise .4s var(--ease) both; }

/* ---------- prayers ---------- */
.search { position: relative; margin-bottom: 1rem; }
.search input { width: 100%; min-height: 3.3rem; border-radius: 1.1rem; border: 1px solid var(--line); background: var(--card); padding: .6rem 1rem .6rem 3rem; box-shadow: var(--shadow); }
.search svg { position: absolute; left: 1rem; top: 50%; width: 1.3rem; height: 1.3rem; transform: translateY(-50%); color: var(--muted); }
.secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .8rem; }
.sec {
  text-align: left; border-radius: 1.3rem; padding: 1rem; min-height: 8.2rem; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between; transition: transform .18s var(--ease);
}
.sec:active { transform: scale(.96); }
.sec .ic { font-size: 2rem; }
.sec .nm { font-weight: 750; line-height: 1.25; }
.sec .n { font-size: .82rem; color: var(--muted); }
.plist .pi { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; padding: 1rem .2rem; border-top: 1px solid var(--line); }
.plist .pi:first-child { border-top: 0; }
.plist .pi .t { font-weight: 650; font-family: Georgia, serif; font-size: 1.08rem; }
.plist .pi .k { font-size: .85rem; color: var(--muted); }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty .big { font-size: 3rem; display: block; margin-bottom: .5rem; }

/* ---------- full-screen layers: reader, sheets, overlays ---------- */
#layer > * { position: fixed; inset: 0; z-index: 50; }
.shade { background: rgba(20, 12, 6, .45); animation: fade .25s both; backdrop-filter: blur(2px); }
.shade.out { animation: fadeOut .25s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; background: var(--bg);
  border-radius: 1.6rem 1.6rem 0 0; padding: .6rem 1.1rem calc(1.4rem + var(--safe-b)); animation: up .42s var(--ease) both;
  max-width: 46rem; margin: 0 auto; overscroll-behavior: contain;
}
.shade.out .sheet { animation: down .25s ease-in both; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes down { to { transform: translateY(100%); } }
.grab { width: 3rem; height: .35rem; border-radius: 99rem; background: var(--line); margin: .2rem auto .8rem; }
.sheet h2 { margin: .2rem 0 .8rem; font-size: 1.4rem; }

.reader { background: var(--bg); display: flex; flex-direction: column; animation: readerIn .4s var(--ease) both; }
.reader.out { animation: readerOut .25s ease-in both; }
@keyframes readerIn { from { transform: translateY(2rem); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes readerOut { to { transform: translateY(2rem); opacity: 0; } }
.rbar {
  display: flex; align-items: center; gap: .5rem; padding: calc(.6rem + env(safe-area-inset-top)) .8rem .6rem; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px);
}
.rbar .rt { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbar .iconbtn { box-shadow: none; width: 2.8rem; height: 2.8rem; }
.rprog { height: 3px; background: var(--accent); width: 0; transition: width .15s; }
.rbody { flex: 1; overflow-y: auto; padding: 1.4rem 1.3rem 6rem; touch-action: pan-y; overscroll-behavior: contain; }
.rtext {
  max-width: 40rem; margin: 0 auto; font-size: calc(18px * var(--prayer-scale)); line-height: var(--line-gap);
  transition: transform .3s var(--ease), opacity .3s;
}
.rtext.serif { font-family: Georgia, "Times New Roman", "PT Serif", serif; }
.rtext h1 { font-size: 1.35em; text-align: center; color: var(--rubric); font-weight: 700; margin: 0 0 1em; line-height: 1.25; }
.rtext h3 { font-size: 1.1em; text-align: center; color: var(--rubric); margin: 1.4em 0 .6em; }
.rtext p { margin: 0 0 .9em; }
.rtext p.first::first-letter { color: var(--rubric); font-size: 2.3em; float: left; line-height: .9; margin: .06em .08em 0 0; font-weight: 700; }
.rtext .rub { color: var(--rubric); font-style: italic; font-size: .82em; margin: .2em 0 .9em; }
.rtext .speaking { background: color-mix(in srgb, var(--gold) 25%, transparent); border-radius: .3em; }
.rnav { position: absolute; left: 0; right: 0; bottom: calc(.8rem + var(--safe-b)); display: flex; justify-content: center; gap: .6rem; pointer-events: none; }
.rnav .btn { pointer-events: auto; box-shadow: var(--shadow); background: var(--card); }
.sizepanel { position: absolute; left: .8rem; right: .8rem; top: calc(4.2rem + env(safe-area-inset-top)); z-index: 2; background: var(--card); border: 1px solid var(--line); border-radius: 1.3rem; box-shadow: var(--shadow); padding: 1rem; animation: rise .3s var(--ease) both; max-width: 30rem; margin: 0 auto; }

/* формы */
label.f { display: block; margin: .8rem 0 .35rem; font-weight: 650; }
input.in, select.in, textarea.in {
  width: 100%; min-height: 3.2rem; border-radius: .9rem; border: 1.5px solid var(--line); background: var(--card); padding: .6rem .9rem; transition: border-color .2s;
}
input.in:focus, select.in:focus, textarea.in:focus { outline: none; border-color: var(--accent); }
textarea.in { min-height: 16rem; font-family: Georgia, serif; line-height: 1.5; resize: vertical; }
.err { color: var(--rubric); font-weight: 650; margin-top: .6rem; min-height: 1.2em; }

/* сегменты: Нет | Уведомление | Весь экран */
.seg { display: inline-grid; grid-auto-flow: column; background: var(--bg2); border-radius: .9rem; padding: .2rem; gap: .2rem; border: 1px solid var(--line); }
.seg button { min-height: 2.5rem; min-width: 2.9rem; padding: 0 .55rem; border-radius: .7rem; font-weight: 700; font-size: .9rem; color: var(--muted); transition: background .25s, color .25s, transform .15s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.seg button.on.full { background: var(--accent); color: var(--accent-ink); }
.seg button:active { transform: scale(.94); }
.catrow { padding: .85rem 0; border-top: 1px solid var(--line); }
.catrow:first-child { border-top: 0; }
.catrow .top { display: flex; align-items: center; gap: .6rem; justify-content: space-between; flex-wrap: wrap; }
.catrow .top > div:first-child { flex: 1 1 12rem; }
.catrow .top .seg { margin-left: auto; }
.catrow .nm { font-weight: 700; }
.catrow .hint { font-size: .85rem; color: var(--muted); margin-top: .2rem; }
.catrow .more { font-size: .88rem; color: var(--accent); font-weight: 700; margin-top: .4rem; }
.items { margin-top: .4rem; padding-left: .6rem; border-left: 3px solid var(--line); animation: rise .35s var(--ease) both; }
.items .it { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem 0; font-size: .95rem; }

/* переключатель */
.sw { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.sw:first-child { border-top: 0; }
.sw .tg { flex: 0 0 auto; width: 3.4rem; height: 2rem; border-radius: 99rem; background: var(--line); position: relative; transition: background .25s; }
.sw .tg::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.sw.on .tg { background: var(--accent); }
.sw.on .tg::after { transform: translateX(1.4rem); }
.sw .lb { font-weight: 650; }
.sw .lb small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }

input[type=range] { width: 100%; accent-color: var(--accent); height: 2.4rem; }
.scalebox { display: flex; align-items: center; gap: .6rem; }
.scalebox .a { font-weight: 800; width: 3rem; height: 3rem; border-radius: 50%; background: var(--bg2); border: 1px solid var(--line); display: grid; place-items: center; }
.scalebox .a:active { transform: scale(.9); }

.choice { display: grid; gap: .7rem; }
.opt {
  text-align: left; padding: 1rem 1.1rem; border-radius: 1.2rem; border: 2px solid var(--line); background: var(--card); transition: border-color .2s, transform .15s, box-shadow .2s;
}
.opt:active { transform: scale(.98); }
.opt.on { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.opt b { display: block; font-size: 1.1rem; }
.opt span { color: var(--muted); font-size: .92rem; }
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.themes button { border-radius: 1rem; padding: .7rem .2rem; border: 2px solid var(--line); font-weight: 700; font-size: .85rem; }
.themes button.on { border-color: var(--accent); }

/* ---------- праздник на весь экран ---------- */
.feastfull {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 2rem 1.4rem calc(2rem + var(--safe-b));
  background: var(--hero); animation: fade .5s both; overflow: auto;
}
.feastfull .rays { position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .07) 0 8deg, transparent 8deg 22deg); animation: spin 60s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.feastfull .in { position: relative; max-width: 30rem; width: 100%; }
.feastfull .crs { width: 7rem; height: 7rem; margin: 0 auto 1rem; animation: pulse 3s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(255, 255, 255, .55)); }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.feastfull .lead { font-size: 1.2rem; opacity: .95; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }
.feastfull h1 { font-family: Georgia, serif; font-size: 2.1rem; line-height: 1.2; margin: .6rem 0; animation: rise .8s .2s var(--ease) both; }
.feastfull p { font-size: 1.1rem; opacity: .95; animation: rise .8s .35s var(--ease) both; }
.feastfull .btn { width: 100%; margin-top: .8rem; min-height: 3.8rem; font-size: 1.15rem; }
.feastfull .btn.white { background: #fff; color: var(--hero-c); border: 0; }
.feastfull .btn.glass { background: rgba(255, 255, 255, .18); color: #fff; border: 1.5px solid rgba(255, 255, 255, .55); }

/* приветствие */
.welcome { background: var(--bg); display: flex; flex-direction: column; overflow: auto; }
.welcome .wtop { position: relative; height: 34vh; min-height: 13rem; background: linear-gradient(150deg, #B8862B, #7A1E1E); color: #fff; display: grid; place-items: center; overflow: hidden; border-radius: 0 0 2.2rem 2.2rem; }
.welcome .wtop svg { width: 6rem; height: 6rem; animation: pulse 3s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(255, 255, 255, .5)); }
.welcome .wbody { padding: 1.4rem 1.2rem calc(1.5rem + var(--safe-b)); max-width: 34rem; width: 100%; margin: 0 auto; flex: 1; display: flex; flex-direction: column; }
.welcome .step { animation: rise .45s var(--ease) both; flex: 1; }
.welcome h1 { font-size: 1.8rem; margin: .2rem 0 .5rem; }
.dots { display: flex; justify-content: center; gap: .4rem; margin: 1rem 0; }
.dots i { width: .55rem; height: .55rem; border-radius: 99rem; background: var(--line); transition: width .35s var(--ease), background .3s; }
.dots i.on { width: 1.6rem; background: var(--accent); }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 1.4rem + var(--safe-b)); transform: translate(-50%, 1rem); z-index: 90; opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: .8rem 1.2rem; border-radius: 1rem; font-weight: 650; max-width: calc(100% - 2rem); text-align: center;
  transition: opacity .3s, transform .35s var(--ease); box-shadow: var(--shadow);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

.hide { display: none !important; }
.center { text-align: center; }
.mt { margin-top: 1rem; }
.feast-pick { max-height: 16rem; overflow: auto; border: 1px solid var(--line); border-radius: .9rem; padding: .3rem .6rem; background: var(--card); }
.feast-pick label { display: flex; gap: .6rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .95rem; }
.feast-pick label:first-child { border-top: 0; }
.feast-pick input { width: 1.3rem; height: 1.3rem; accent-color: var(--accent); }
.tagline { display: inline-block; font-size: .78rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99rem; background: var(--bg2); color: var(--muted); }
.adminbar { display: flex; gap: .5rem; flex-wrap: wrap; margin: .2rem 0 1rem; }

@media (min-width: 900px) {
  .page { padding-top: 2rem; }
  .hero .date { font-size: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
