/* pay.kabinet.work — the designer's phone frames in «ФИНАЛ» (2103:*) and the 2026-12-02-01 desktop mockups.
   Tokens from the frames: ink #33373c, muted rgba(125,139,153,.7) / #7d8b99, tile rgba(241,245,249,.5) r24 p20,
   the dark card gradient 68° #26282b → #4b525a, buttons h48 r26, round 36 #f1f5f9, blue #08f, red #ff7553.
   Self-hosted Inter only (no third-party font); no inline style anywhere (the CSP has no 'unsafe-inline'). */

@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20BD, U+2190-2199, U+2212; }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20BD, U+2190-2199, U+2212; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20BD, U+2190-2199, U+2212; }

:root {
  --ink: #33373c;
  --ink-80: rgba(51, 55, 60, 0.8);
  --muted: rgba(125, 139, 153, 0.7);
  --muted-2: #7d8b99;
  --tile: rgba(241, 245, 249, 0.5);
  --chip: #f1f5f9;
  --line: rgba(125, 139, 153, 0.08);
  --blue: #08f;
  --red: #ff7553;
  --dark: linear-gradient(68.19deg, #26282b 0%, #4b525a 100%);
  --shadow: 8px 7px 64.6px rgba(51, 55, 60, 0.2);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: #fff;
  color: var(--ink);
  font: 500 14px/1.25 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
h1, h2, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1:focus, h2:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nojs { padding: 40px 24px; text-align: center; }

/* ---------- buttons (the frames' «Icon/Solid/clipboard-check» pills) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border: 0; border-radius: 26px;
  font: 500 16px/14px Inter, system-ui, sans-serif; letter-spacing: -0.32px;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: transform 160ms var(--ease), opacity 160ms;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.btn-wide { width: 100%; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: var(--line); color: var(--ink); }
.btn-sm { height: 36px; min-height: 32px; padding: 0 16px; border-radius: 20px; font-size: 14px; letter-spacing: -0.28px; }
.btn-ink { background: linear-gradient(90deg, #33373c, #4b525a); color: #fff; }
.btn-blue { background: linear-gradient(90deg, #08f, rgba(0, 136, 255, 0.8)); color: #fff; }
.btn-mute { background: var(--line); color: var(--muted); }
.btn-red { height: 36px; padding: 0 16px; border-radius: 18px; background: var(--line); color: var(--red); font-size: 14px; letter-spacing: -0.28px; }
.btn-glass { height: 36px; padding: 0 16px; border-radius: 18px; background: rgba(125, 139, 153, 0.5); color: #fff; font-size: 14px; letter-spacing: -0.28px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); }
.btn-white { height: 36px; padding: 0 16px; border-radius: 18px; background: #fff; color: var(--ink); font-size: 14px; letter-spacing: -0.28px; box-shadow: 0 6px 24px rgba(51, 55, 60, 0.08); }
.btn-chip { height: 32px; padding: 0 14px; border-radius: 16px; background: var(--chip); color: var(--ink); font-size: 13px; }
.btn-tg::before { content: ""; width: 20px; height: 20px; background: url(/img/telegram-white.svg) center / 20px 20px no-repeat; }

/* ---------- the round button + the top bar (2103:5478, 2103:5596) ---------- */
.round {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 24px; background: var(--chip); cursor: pointer; padding: 0;
}
.round-gap { width: 36px; height: 36px; flex: none; }
.flip { transform: rotate(180deg); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 360px; margin: 0 auto; padding-top: 20px; }
.bar-title { font-size: 18px; font-weight: 600; letter-spacing: -0.36px; text-align: center; }

/* ---------- full-height state screens with the frames' glow ---------- */
.scr {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: 0 16px max(46px, env(safe-area-inset-bottom));
  background-repeat: no-repeat; background-position: center top; background-size: 100% 100%;
}
.scr[data-glow="enter"] { background-image: url(/img/bg-enter.svg); }
.scr[data-glow="pay"] { background-image: url(/img/bg-pay.svg); }
.scr[data-glow="warn"] { background-image: url(/img/bg-warn.svg); }
.scr[data-glow="done"] { background-image: url(/img/bg-done.svg); }
.scr-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px 12px; text-align: center; }
.scr-mid > img { margin-bottom: 8px; }
.scr-title { font-size: 20px; font-weight: 600; letter-spacing: -0.4px; }
.scr-text { color: var(--muted); font-size: 14px; line-height: normal; }
.scr-foot { width: 100%; max-width: 344px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.scr-foot > .btn { width: 100%; }
.scr-note { color: var(--muted); font-size: 14px; text-align: center; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- оплата кабинета (2103:5478) ---------- */
.pay .scr-foot { max-width: 360px; gap: 20px; }
.pay-price { font-size: 40px; font-weight: 600; letter-spacing: -0.8px; }
.pay-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 16px; }
.pill { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 20px; background: linear-gradient(90deg, #08f, rgba(0, 136, 255, 0.8)); color: #fff; font-size: 14px; letter-spacing: -0.28px; }
.consents { width: 100%; margin: 0; padding: 12px; border: 1.5px solid var(--line); border-radius: 20px; display: flex; flex-direction: column; gap: 20px; background: rgba(255, 255, 255, 0.6); }
.consent { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; line-height: 14px; letter-spacing: -0.24px; cursor: pointer; }
.consent a { color: var(--muted-2); }
.tick {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0;
  width: 18px; height: 18px; border-radius: 18px; border: 1.5px solid rgba(125, 139, 153, 0.2); background: #fff; cursor: pointer;
  display: grid; place-items: center; transition: background 160ms, border-color 160ms;
}
.tick:checked { background: var(--blue); border-color: var(--blue); }
.tick:checked::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.err { color: var(--red); font-size: 13px; text-align: center; min-height: 0; }
.err:empty { display: none; }

/* ---------- the account (2103:4675) ---------- */
.site { display: none; }
.acc { width: 100%; max-width: 392px; margin: 0 auto; padding: 48px 16px 46px; display: grid; gap: 28px; grid-template-areas: "profile" "main" "links"; }
.acc-profile { grid-area: profile; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.acc-name { font-size: 20px; font-weight: 600; letter-spacing: -0.4px; text-align: center; word-break: break-word; }
.ava { display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg, #a7adb9, #878b96); color: #fff; font-weight: 600; }
.ava-64 { width: 64px; height: 64px; font-size: 28.8px; }
.acc-main { grid-area: main; display: flex; flex-direction: column; gap: 0; }
.sec { font-size: 18px; font-weight: 600; letter-spacing: -0.36px; padding: 28px 8px 16px; }

.card-wrap { display: flex; flex-direction: column; }
.card { position: relative; z-index: 1; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 24px; overflow: hidden; }
.card-dark { background: var(--dark); color: #fff; }
.card-light { background: var(--tile); color: var(--ink); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 36px; }
.card-mark { margin-top: 11px; }
.card-word { margin-top: 8px; font-size: 16px; font-weight: 600; color: var(--muted-2); letter-spacing: -0.3px; }
.card-body { display: flex; flex-direction: column; gap: 6px; }
.card-big { font-size: 28px; font-weight: 600; letter-spacing: -0.56px; }
.card-sub { font-size: 13px; letter-spacing: -0.26px; color: var(--muted-2); }
.card-warn .card-sub { color: #ffb08f; }
.card-strip { margin-top: -24px; padding: 36px 20px 14px; border-radius: 0 0 24px 24px; display: flex; justify-content: space-between; gap: 12px; background: linear-gradient(90deg, #9aa3ad, #d9dee4); color: #fff; font-size: 13px; }
.card-strip span { opacity: 0.8; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--tile); border-radius: 24px; padding: 20px; min-height: 164px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; text-decoration: none; }
.tile-t { font-size: 14px; font-weight: 600; letter-spacing: -0.28px; }
.tile-v { margin-top: 8px; color: var(--muted-2); font-size: 14px; letter-spacing: -0.28px; }
.tile .btn { align-self: flex-start; }
.tile-row { grid-column: 1 / -1; min-height: 64px; flex-direction: row; align-items: center; }
.tile-row .tile-v { margin: 0; display: inline-flex; align-items: center; gap: 4px; }
.bar6 { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar6 > i { display: block; height: 100%; width: calc(var(--w, 0) * 100%); border-radius: 3px; background: rgba(125, 139, 153, 0.5); }
.bar6-dark { background: rgba(255, 255, 255, 0.12); }
.bar6-dark > i { background: rgba(255, 255, 255, 0.5); }

.links { grid-area: links; display: flex; flex-direction: column; gap: 8px; }
.link-row { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 20px; border: 0; border-radius: 20px; background: var(--tile); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; text-align: left; }

/* ---------- статус подписки (2103:5596) ---------- */
.page .rows { width: 100%; max-width: 360px; margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 14px 20px; border-radius: 24px; background: var(--tile); font-size: 14px; letter-spacing: -0.28px; }
.kv-k { font-weight: 600; }
.kv-v { color: var(--muted-2); text-align: right; }
.note { color: var(--muted); font-size: 13px; padding: 8px 8px 0; line-height: 1.4; }
.note a { color: var(--muted-2); }

/* ---------- выберите тариф (2103:4965): sheet / drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 10; background: rgba(37, 40, 44, 0); display: flex; align-items: flex-end; justify-content: center; transition: background 240ms var(--ease); }
.scrim.in { background: rgba(37, 40, 44, 0.15); }
.ov { background: #fff; width: 100%; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; transform: translateY(24px); opacity: 0; transition: transform 320ms var(--ease), opacity 200ms; }
.scrim.in .ov { transform: none; opacity: 1; }
.ov-sheet { border-radius: 32px 32px 0 0; padding: 10px 16px max(24px, env(safe-area-inset-bottom)); }
.handle { display: block; width: 24px; height: 3px; border-radius: 2px; background: rgba(125, 139, 153, 0.3); margin: 0 auto 14px; }
.ov-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ov-title { font-size: 18px; font-weight: 600; letter-spacing: -0.36px; }
.ov-sheet .ov-head { padding-left: calc(50% - 60px); }
.sheet-body { display: flex; flex-direction: column; gap: 12px; }
.card-mini { gap: 28px; }
.mini-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mini-top b { font-size: 20px; font-weight: 600; letter-spacing: -0.4px; }
.mini-top span, .mini-bar span { color: var(--muted-2); font-size: 13px; }
.mini-bar { display: flex; align-items: center; gap: 12px; }
.mini-bar .bar6 { flex: 1; }
.tariffs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tariff { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; border-radius: 24px; background: var(--tile); }
.tariff-n { font-size: 18px; font-weight: 600; letter-spacing: -0.36px; }
.tariff-p { margin-top: 4px; color: var(--muted-2); font-size: 13px; }
.tariff-hint { margin-top: 6px; color: var(--red); font-size: 12px; }
.tariff-rec { box-shadow: inset 0 0 0 1.5px rgba(0, 136, 255, 0.25); }

/* «отключить автопродление?» (2103:5615) */
.scrim:has(.ov-dialog) { padding: 0 8px max(46px, env(safe-area-inset-bottom)); }
.ov-dialog { max-width: 376px; border-radius: 40px; padding: 20px 16px 16px; box-shadow: var(--shadow); }
.ov-dialog .ov-head { margin-bottom: 16px; padding: 0 4px; }
.ov-dialog .round { width: 24px; height: 24px; background: none; }
.dlg-text { color: var(--muted-2); font-size: 14px; padding: 0 4px; }
.dlg-acts { display: flex; gap: 12px; margin-top: 24px; }
.dlg-acts .btn { flex: 1; font-size: 14px; letter-spacing: -0.28px; padding: 0 12px; }
.dlg-acts .btn-light { background: var(--chip); color: var(--ink-80); }

.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; max-width: min(360px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 20px; background: var(--ink); color: #fff; font-size: 14px; text-align: center; box-shadow: var(--shadow); }

/* ---------- desktop (the 2026-12-02-01 mockups w05, w11, w16) ---------- */
@media (min-width: 960px) {
  .site { display: flex; align-items: center; justify-content: space-between; max-width: 1440px; margin: 0 auto; padding: 28px 40px; }
  .site-right { display: flex; gap: 8px; align-items: center; }
  .chip { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--chip); font-size: 13px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .acc { max-width: 1080px; padding: 32px 40px 80px; grid-template-columns: 320px 1fr; grid-template-areas: "profile main" "links main"; grid-template-rows: auto 1fr; column-gap: 28px; row-gap: 0; align-items: start; }
  .acc-profile { background: var(--tile); border-radius: 28px 28px 0 0; padding: 32px 20px 20px; }
  .links { background: var(--tile); border-radius: 0 0 28px 28px; padding: 0 20px 20px; }
  .link-row { background: #fff; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tile-row { grid-column: auto; min-height: 164px; flex-direction: column; align-items: stretch; }
  .tile-row .tile-v { margin-top: 8px; }
  .sec { padding-top: 24px; }
  .scrim:has(.ov-sheet) { justify-content: flex-end; align-items: stretch; padding: 16px; }
  .ov-sheet { width: 520px; max-height: none; border-radius: 32px; padding: 28px; transform: translateX(32px); }
  .ov-sheet .handle { display: none; }
  .ov-sheet .ov-head { padding-left: 0; }
  .scrim:has(.ov-dialog) { align-items: center; }
  .scr[data-glow] { background-size: 760px 100%; }
  .scr-mid { min-height: 50vh; }
}

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