:root {
  --bg: #0d0c0a;
  --bg-2: #161410;
  --bg-3: #201d18;
  --line: rgba(236, 230, 218, .10);
  --line-2: rgba(236, 230, 218, .18);
  --text: #ece6da;
  --text-2: rgba(236, 230, 218, .64);
  --text-3: rgba(236, 230, 218, .40);
  --stone: #ece6da;
  --stone-2: #e3dbcc;
  --card: #f6f2ea;
  --ink: #15130f;
  --ink-2: rgba(21, 19, 15, .62);
  --ink-3: rgba(21, 19, 15, .40);
  --ink-line: rgba(21, 19, 15, .10);
  --celeste: #8fc3e8;
  --celeste-ink: #2c6a99;
  --sol: #e8b04a;
  --sol-deep: #b9822a;
  --danger: #e5634d;
  --ok: #6fbf8e;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Onest", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
/* зерно поверх всего: убирает «пластиковую» плоскость */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button { font: inherit; cursor: pointer; border: 0; color: inherit; }
button:disabled { cursor: default; }
.mono { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--text-3); font-size: 13px; }
.error { color: var(--danger); min-height: 1.2em; font-size: 14px; margin: -8px 0 0; text-align: center; }
.hidden { display: none !important; }

.screen { position: fixed; inset: 0; display: none; flex-direction: column; }
.screen.active { display: flex; animation: enter .35s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }

/* ============ Старт ============ */
#screen-start {
  overflow-y: auto;
  background:
    radial-gradient(120% 60% at 85% -10%, rgba(232, 176, 74, .16), transparent 60%),
    radial-gradient(90% 50% at -10% 30%, rgba(143, 195, 232, .07), transparent 60%),
    var(--bg);
}
.start-wrap {
  margin: 0 auto; width: 100%; max-width: 440px;
  padding: calc(28px + var(--safe-top)) 20px calc(36px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 22px;
}
.hero { padding: 8px 0 4px; text-align: center; }
.hero-top { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-2); }
.sol-mark { width: 26px; height: 26px; fill: var(--sol); animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wordmark {
  font-family: var(--sans); font-weight: 800; text-transform: uppercase;
  font-size: clamp(96px, 30vw, 132px); line-height: .82; letter-spacing: -.055em;
  margin: 24px 0 16px; color: var(--stone);
}
.lead { margin: 0; color: var(--text-2); font-size: 17px; font-weight: 500; white-space: nowrap; }

.field { display: flex; flex-direction: column; gap: 10px; color: var(--text-3); }
.field input {
  font: inherit; font-size: 18px; letter-spacing: .1em; padding: 16px 18px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: rgba(236, 230, 218, .04); color: var(--text); outline: none;
  transition: border-color .2s, background .2s;
  -webkit-user-select: text; user-select: text;
}
.field input:focus { border-color: var(--line-2); background: rgba(236, 230, 218, .07); }

.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.settings { padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.set-row { display: flex; flex-direction: column; gap: 10px; color: var(--text-3); }
.set-row + .set-row { padding-top: 18px; border-top: 1px solid var(--line); }
.set-hint { margin: 2px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.seg { display: flex; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; background: transparent; color: var(--text-2); padding: 11px 8px; border-radius: 999px;
  font-weight: 600; font-size: 14px; transition: background .25s var(--ease), color .25s;
}
.seg button.on { background: var(--stone); color: var(--ink); }
.seg-sm button { padding: 9px 8px; font-size: 13px; }

.btn-primary {
  background: var(--sol); color: var(--ink); font-weight: 700; font-size: 17px;
  padding: 18px 24px; border-radius: 999px; transition: transform .15s var(--ease), filter .2s;
  box-shadow: 0 10px 30px -12px rgba(232, 176, 74, .55), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .45; box-shadow: none; }
.btn-start { display: flex; align-items: center; justify-content: space-between; padding-left: 28px; }
.btn-start .arrow {
  width: 38px; height: 38px; margin: -10px -14px -10px 0; border-radius: 50%; background: var(--ink); color: var(--sol);
  display: grid; place-items: center; font-size: 18px;
}
.btn-ghost {
  background: transparent; color: var(--text); border: 1px solid var(--line-2);
  padding: 12px 20px; border-radius: 999px; font-weight: 600; transition: background .2s;
}
.btn-ghost:active { background: rgba(236, 230, 218, .06); }
.btn-ghost:disabled { opacity: .35; }
.price-note { text-align: center; color: var(--text-3); margin: -10px 0 0; }

.section-title { display: flex; align-items: center; gap: 12px; color: var(--text-3); margin-top: 10px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.daily { display: grid; gap: 12px; }
.daily-card {
  position: relative; background: var(--stone); color: var(--ink);
  border-radius: var(--r-lg); padding: 20px 76px 22px 22px; overflow: hidden;
}
.daily-card::before {
  content: ""; position: absolute; right: -40px; bottom: -60px; width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 176, 74, .35), transparent 65%);
}
.daily-card.alt { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); }
.daily-card.alt::before { background: radial-gradient(circle, rgba(143, 195, 232, .18), transparent 65%); }
.daily-kicker { opacity: .55; }
.daily-es { font-family: var(--serif); font-size: 36px; line-height: 1.02; letter-spacing: -.01em; margin: 12px 0 6px; position: relative; }
.daily-card.alt .daily-es { color: var(--celeste); }
.daily-ru { margin: 0; font-size: 15px; font-weight: 500; opacity: .75; position: relative; }
.daily-ctx { margin: 12px 0 0; font-size: 13px; line-height: 1.45; opacity: .55; position: relative; }
.daily-card .btn-say { position: absolute; right: 16px; top: 16px; }

.library { padding: 18px 18px 18px 20px; }
.library-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lib-num { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lib-num b { font-family: var(--serif); font-weight: 400; font-size: 54px; line-height: .9; color: var(--sol); }
.lib-num span { font-weight: 600; }
.lib-num .muted { margin-top: 3px; line-height: 1.35; }

/* Кнопка «послушать»: значок динамика маской, состояние через классы */
.btn-say {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(21, 19, 15, .06); color: var(--ink); border: 1px solid var(--ink-line);
  padding: 10px 16px 10px 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: background .2s, transform .15s var(--ease);
}
.btn-say::before {
  content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4z' fill='black'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4z' fill='black'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-say:active { transform: scale(.95); }
.btn-say.busy::before { animation: pulse-op .8s ease-in-out infinite; }
.btn-say.err { color: var(--danger); }
@keyframes pulse-op { 50% { opacity: .25; } }
.btn-say.icon-only { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%; }
.btn-say.icon-only::before { width: 20px; height: 20px; }
.daily-card.alt .btn-say { background: rgba(236, 230, 218, .06); color: var(--text); border-color: var(--line-2); }

/* ============ Разговор ============ */
#screen-talk { background: var(--bg); }
.half { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 16px 18px; gap: 12px; transition: opacity .3s; }
.half-es {
  background: var(--stone); color: var(--ink);
  transform: rotate(180deg);              /* смотрит на собеседника через стол */
  padding-bottom: calc(16px + var(--safe-bottom));
}
.half-ru { padding-bottom: calc(16px + var(--safe-bottom)); }
.half-label { flex: none; display: flex; align-items: center; gap: 8px; opacity: .55; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; transition: all .2s; }
.dot.on { opacity: 1; background: var(--danger); box-shadow: 0 0 0 5px rgba(229, 99, 77, .22); }

.feed {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 6px 0 4px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 28px);
  mask-image: linear-gradient(transparent, #000 28px);
}
.feed::-webkit-scrollbar { display: none; }
.line { animation: line-in .4s var(--ease); }
@keyframes line-in { from { opacity: 0; transform: translateY(8px); } }
.line.own { font-size: 15px; line-height: 1.4; opacity: .5; }
.line.trans { font-size: 23px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.line.pending { font-size: 15px; opacity: .45; font-style: italic; }
.half-es .line.trans { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.08; letter-spacing: -.01em; }
.half-ru .line.trans { color: var(--stone); }
.half-ru .line.trans::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sol);
  margin-right: 10px; vertical-align: .2em;
}

.midbar {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.mid-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.status { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 13px; }
.cost { color: var(--sol); font-variant-numeric: tabular-nums; }
.btn-pause, .btn-end {
  padding: 11px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; min-width: 108px;
  transition: background .2s, color .2s, transform .15s var(--ease);
}
.btn-pause { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn-pause.paused { background: var(--ok); border-color: var(--ok); color: var(--ink); }
.btn-end { background: rgba(229, 99, 77, .14); color: #ff8f7a; border: 1px solid rgba(229, 99, 77, .35); }
.btn-pause:active, .btn-end:active { transform: scale(.96); }
#screen-talk.paused .half { opacity: .45; }

/* ============ Урок и тренировка (светлые экраны) ============ */
.screen.light { background: var(--stone); color: var(--ink); overflow-y: auto; }
.screen.light .muted { color: var(--ink-3); }
.screen.light .btn-ghost { color: var(--ink); border-color: rgba(21, 19, 15, .22); }
.screen.light .btn-ghost:active { background: rgba(21, 19, 15, .05); }
.screen.light .btn-primary { box-shadow: 0 10px 24px -14px rgba(185, 130, 42, .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.lesson-head {
  display: flex; align-items: center; gap: 14px; color: var(--ink-2);
  padding: calc(16px + var(--safe-top)) 18px 8px;
}
.drill-progress { margin-left: auto; color: var(--ink-3); }
.btn-back {
  width: 44px; height: 44px; border-radius: 50%; flex: none; font-size: 18px;
  background: transparent; color: var(--ink); border: 1px solid rgba(21, 19, 15, .18);
}
.lesson-top { padding: 14px 20px 6px; }
.lesson-top h2 { margin: 0; font-size: 30px; line-height: 1.12; letter-spacing: -.025em; font-weight: 700; max-width: 18ch; }
.lesson-meta { color: var(--ink-3); margin: 12px 0 0; }
.lesson-intro { font-size: 17px; line-height: 1.55; margin: 16px 0 6px; color: var(--ink-2); }
.cards { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 130px; }
.card {
  background: var(--card); border: 1px solid var(--ink-line); border-radius: var(--r-lg);
  padding: 20px 20px 18px; animation: line-in .45s var(--ease) both;
}
.card:nth-child(2) { animation-delay: .05s; } .card:nth-child(3) { animation-delay: .1s; }
.card:nth-child(4) { animation-delay: .15s; } .card:nth-child(5) { animation-delay: .2s; }
.card .ctx { font-size: 13px; line-height: 1.45; color: var(--celeste-ink); margin: 0 0 14px; }
.card .row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card .es { font-family: var(--serif); font-size: 34px; line-height: 1.02; letter-spacing: -.01em; margin: 0; }
.card .ru { font-size: 16px; font-weight: 500; color: var(--ink-2); margin: 8px 0 0; }
.card .tip { font-size: 14px; line-height: 1.5; color: var(--ink-3); margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--ink-line); }
.tag {
  flex: none; margin-top: 6px; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(44, 106, 153, .3); color: var(--celeste-ink);
}
.tag.slang { border-color: rgba(185, 130, 42, .45); color: var(--sol-deep); }
.lesson-actions {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 18px 16px calc(16px + var(--safe-bottom));
  background: linear-gradient(rgba(236, 230, 218, 0), var(--stone) 40%);
}
.lesson-actions .btn-primary { width: 100%; }
.skeleton { height: 150px; border-radius: var(--r-lg); background: var(--stone-2); animation: pulse-op 1.4s ease-in-out infinite; }

.drill { padding: 12px 16px calc(20px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.drill-card {
  background: var(--card); border: 1px solid var(--ink-line); border-radius: var(--r-lg);
  padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 14px; min-height: 320px;
}
.drill-context { color: var(--celeste-ink); font-size: 14px; line-height: 1.45; margin: 0; }
.drill-ru { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.drill-answer { display: none; border-top: 1px solid var(--ink-line); padding-top: 18px; }
.drill-answer.show { display: block; animation: line-in .35s var(--ease); }
.drill-es { font-family: var(--serif); font-size: 40px; line-height: 1.02; color: var(--ink); margin: 0 0 10px; }
.drill-tip { color: var(--ink-3); font-size: 15px; line-height: 1.5; margin: 0 0 16px; }
.drill-card .btn-primary { margin-top: auto; }
.drill-grade { display: none; gap: 12px; }
.drill-grade.show { display: flex; }
.drill-grade button { flex: 1; }
.drill-done { display: none; text-align: center; padding: 40px 10px; font-size: 17px; color: var(--ink-2); }
.drill-done.show { display: block; animation: line-in .4s var(--ease); }
.drill-done .big { font-family: var(--serif); font-style: italic; font-size: 64px; line-height: 1; color: var(--ink); margin: 0 0 14px; }
.drill-done .btn-primary { margin-top: 18px; min-width: 200px; }

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

/* на планшете и компьютере светлые экраны не растягиваются во всю ширину */
.lesson-head, .lesson-top, .cards, .drill { width: 100%; max-width: 620px; margin-left: auto; margin-right: auto; }
.lesson-actions .btn-primary { display: block; max-width: 588px; margin: 0 auto; }

/* ============ Вход ============ */
#screen-login {
  overflow-y: auto;
  background:
    radial-gradient(120% 60% at 85% -10%, rgba(232, 176, 74, .16), transparent 60%),
    radial-gradient(90% 50% at -10% 30%, rgba(143, 195, 232, .07), transparent 60%),
    var(--bg);
}
.login-wrap { min-height: 100%; justify-content: center; }
.login-points { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.login-points li { position: relative; padding-left: 22px; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.login-points li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--sol); }
.btn-tg { display: flex; align-items: center; justify-content: center; gap: 12px; }
.btn-tg svg { width: 22px; height: 22px; fill: var(--ink); }
.login-trial { text-align: center; color: var(--text-3); margin: -8px 0 0; }
.login-wait { display: none; text-align: center; color: var(--text-2); font-size: 14px; line-height: 1.5; margin: 0; }
.login-wait.show { display: block; animation: line-in .3s var(--ease); }

/* ============ Аккаунт на главном ============ */
.account { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 20px; }
.acc-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: var(--text-3); }
.acc-info b { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1; color: var(--sol); }
.acc-info b.low { color: var(--danger); }
.link-btn { background: none; color: var(--text-3); padding: 8px; align-self: center; }

/* ============ Пополнение ============ */
.topup-reason { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-md); background: rgba(229, 99, 77, .12); color: #a33a26; font-weight: 600; font-size: 15px; }
.topup-body { width: 100%; max-width: 620px; margin: 0 auto; padding: 8px 16px calc(28px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; }
.packs { display: flex; flex-direction: column; gap: 10px; }
.pack {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; text-align: left;
  background: var(--card); border: 1.5px solid var(--ink-line); border-radius: var(--r-lg); padding: 16px 18px;
  transition: border-color .2s, transform .15s var(--ease);
}
.pack.on { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 19, 15, .06); }
.pack:active { transform: scale(.99); }
.pack-min { font-family: var(--serif); font-size: 34px; line-height: 1; }
.pack-price { font-weight: 700; font-size: 16px; justify-self: end; }
.pack-per { grid-column: 1 / -1; color: var(--ink-3); }
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.usdt-box { display: none; background: var(--card); border: 1px solid var(--ink-line); border-radius: var(--r-lg); padding: 18px; flex-direction: column; gap: 14px; }
.usdt-box.show { display: flex; animation: line-in .35s var(--ease); }
.usdt-box > .mono { color: var(--ink-3); margin: 0; }
.usdt-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-2); }
.usdt-row b { font-size: 22px; color: var(--ink); }
.usdt-row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.usdt-row code { font-family: var(--mono); font-size: 13px; word-break: break-all; background: var(--stone); padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); -webkit-user-select: all; user-select: all; }
.copy-btn { align-self: flex-start; background: none; color: var(--celeste-ink); font-weight: 600; font-size: 14px; padding: 2px 0; }
.usdt-open { text-align: center; text-decoration: none; }
.usdt-status { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 50;
  background: var(--stone); color: var(--ink); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); transition: opacity .3s, transform .3s var(--ease); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Установка на телефон ============ */
.install-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 14px;
  background: linear-gradient(135deg, rgba(232, 176, 74, .14), rgba(232, 176, 74, .04));
  border: 1px solid rgba(232, 176, 74, .28); border-radius: var(--r-lg);
}
.install-icon { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-icon.big { width: 72px; height: 72px; border-radius: 18px; }
.install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.install-text b { font-size: 15px; }
.install-text span { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.btn-install { flex: none; background: var(--sol); color: var(--ink); font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 999px; }
.btn-install:active { transform: scale(.96); }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .25s;
}
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%; max-width: 480px; background: var(--stone); color: var(--ink);
  border-radius: 28px 28px 0 0; padding: 26px 22px calc(22px + var(--safe-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  transform: translateY(30px); transition: transform .3s var(--ease);
}
.sheet-backdrop.show .sheet { transform: none; }
.sheet h3 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.ios-steps { margin: 0; padding: 0 0 0 4px; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%; }
.ios-steps li { counter-increment: s; display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 1.35; }
.ios-steps li::before {
  content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--stone); font-weight: 700; font-size: 14px;
}
.ios-share {
  display: inline-block; width: 20px; height: 20px; vertical-align: -4px; background: #2f7cf6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 8l5-5 5 5'/%3E%3Cpath d='M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 8l5-5 5 5'/%3E%3Cpath d='M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sheet-note { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.sheet .btn-primary { width: 100%; margin-top: 4px; }
