/* ==========================================================================
   DOT Media — Digital Business Card
   ========================================================================== */

/* Poppins (SIL OFL 1.1), self-hosted latin subset — see assets/fonts/OFL.txt */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #05070d;
  --bg-navy: #0a1324;
  --ink: #f4f6fa;
  --ink-2: #c9cfda;
  --muted: #8b94a5;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --blue: #1e8fcd;
  --blue-hi: #3bb0ee;
  --blue-deep: #1563b0;
  --gold: #d4af5e;
  --gold-hi: #f0d89a;
  --gold-deep: #b98a3e;
  --ivory: #faf7f0;

  --radius-xl: 30px;
  --radius-pill: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);

  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 18px;
  --avatar: 132px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, #0e1c36 0%, rgba(14, 28, 54, 0) 60%),
    linear-gradient(180deg, var(--bg-navy) 0%, var(--bg) 42%, #030409 100%);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-x: clip;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

.ico {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* ---------- Ambient light ---------- */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; contain: strict; }
.glow { position: absolute; border-radius: 50%; will-change: transform; }
.glow--blue {
  width: 520px; height: 520px; top: -160px; right: -220px;
  background: radial-gradient(closest-side, rgba(30, 143, 205, 0.34), rgba(30, 143, 205, 0));
  animation: drift-a 18s ease-in-out infinite alternate;
}
.glow--gold {
  width: 460px; height: 460px; bottom: -200px; left: -220px;
  background: radial-gradient(closest-side, rgba(212, 175, 94, 0.2), rgba(212, 175, 94, 0));
  animation: drift-b 22s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(-60px, 50px, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(70px, -40px, 0) scale(1.1); } }

/* ---------- Card shell ---------- */
.card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) max(22px, env(safe-area-inset-bottom));
}

/* ---------- A. Brand header ---------- */
.brand {
  position: relative;
  display: flex; align-items: flex-start; justify-content: space-between;
  min-height: calc(var(--avatar) + 54px);
  padding-top: 8px;
}
.brand__mark { position: relative; z-index: 2; padding-top: 4px; }
.brand__logo {
  width: 112px; height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
  animation: logo-reveal 1.1s var(--ease) 0.05s both;
}
@keyframes logo-reveal {
  from { clip-path: inset(0 100% 0 0); opacity: 0.2; transform: translateX(-6px); }
  to { clip-path: inset(0 0 0 0); opacity: 1; transform: none; }
}
.profile__est {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold);
}
.profile__est .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--blue); }

.brand__deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.deco { position: absolute; opacity: 0.7; }
.deco--spark-gold { width: 14px; height: 14px; left: 41%; top: 22px; fill: var(--gold); animation: twinkle 4.5s ease-in-out infinite; }
.deco--spark-blue { width: 10px; height: 10px; left: 55%; top: 70px; fill: var(--blue); animation: twinkle 5.5s ease-in-out 1.2s infinite; }
.deco--burst { width: 22px; height: 22px; left: 47%; top: 54px; stroke: var(--blue); animation: spin 40s linear infinite; }
.deco--rings { width: 22px; height: 22px; left: 37%; top: 96px; stroke: var(--blue); opacity: 0.55; }
.deco--zig { width: 24px; height: 12px; left: 46%; top: 92px; stroke: var(--gold); opacity: 0.5; }
.deco--diamond { width: 8px; height: 8px; left: 53%; top: 16px; background: var(--gold); transform: rotate(45deg); }
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(0.72); opacity: 0.45; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- B. Avatar ---------- */
.avatar {
  position: relative; z-index: 3;
  width: var(--avatar); height: var(--avatar);
  margin-top: 40px; margin-right: 6px;
  flex: none;
}
.avatar__face {
  position: absolute; inset: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffffff 0%, var(--ivory) 55%, #ece4d3 100%);
  display: grid; place-items: center;
  box-shadow:
    0 0 0 2px rgba(212, 175, 94, 0.85),
    0 18px 40px -12px rgba(0, 0, 0, 0.75),
    0 0 46px -6px rgba(30, 143, 205, 0.45);
  overflow: hidden;
}
.avatar__face img { width: 76%; height: auto; transform: translateY(2%); }
.avatar__orbit { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 36s linear infinite; overflow: visible; }
.orbit { fill: none; stroke-width: 1.1; stroke-linecap: round; }
.orbit--gold { stroke: var(--gold); stroke-dasharray: 118 184; opacity: 0.9; }
.orbit--blue { stroke: var(--blue); stroke-dasharray: 64 238; stroke-dashoffset: -160; opacity: 0.9; }
.orbit__dot { fill: var(--gold-hi); }

/* ---------- Panel ---------- */
.panel {
  position: relative;
  margin-top: calc(var(--avatar) * -0.5 - 10px);
  padding: calc(var(--avatar) * 0.5 + 16px) 16px 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 27, 40, 0.72) 0%, rgba(10, 12, 19, 0.86) 46%, rgba(6, 7, 12, 0.92) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.panel::before {
  content: ""; position: absolute; left: 22%; right: 22%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 216, 154, 0.7), transparent);
}

.profile { text-align: center; }
.profile__name {
  font-size: clamp(24px, 7vw, 28px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15;
  background: linear-gradient(180deg, #ffffff 30%, #cfd6e2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.profile__role { margin-top: 6px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); letter-spacing: 0.01em; }
.profile__sub {
  margin-top: 4px; font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--gold-hi), var(--gold) 45%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 14px;
  border-radius: 16px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.01em; white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn .ico { width: 18px; height: 18px; }
.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.btn--blue {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-hi) 0%, var(--blue) 45%, var(--blue-deep) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px -12px rgba(30, 143, 205, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn--blue::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  background-size: 250% 100%; background-position: 120% 0;
  transition: background-position 0.8s var(--ease);
}
.btn--block { width: 100%; }

@media (hover: hover) {
  .btn--ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(240, 216, 154, 0.45); }
  .btn--blue:hover { box-shadow: 0 16px 34px -12px rgba(30, 143, 205, 1), inset 0 1px 0 rgba(255, 255, 255, 0.3); transform: translateY(-1px); }
  .btn--blue:hover::after { background-position: -20% 0; }
}

.primary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 10px; margin-top: 18px; }
.primary .btn { padding: 0 10px; font-size: 13.5px; }

.rule {
  height: 1px; margin: 18px -16px 16px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}

/* ---------- D. Action pills ---------- */
.actions { position: relative; display: grid; gap: 10px; }
.actions::before {
  content: ""; position: absolute; inset: -10% -6% -4%; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 45% at 50% 32%, rgba(150, 162, 184, 0.16), transparent 70%);
}

.pill {
  --x: 50%; --y: 50%;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center;
  width: 100%; min-height: 62px; padding: 8px 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #0e1016 0%, #040507 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 22px -16px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  transition: transform 0.3s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(160px circle at var(--x) var(--y), rgba(30, 143, 205, 0.22), transparent 70%);
  transition: opacity 0.35s var(--ease);
}
.pill__icon {
  grid-column: 1; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 94, 0.28);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.45s var(--ease-spring);
}
.pill__icon .ico { width: 19px; height: 19px; }
.pill__label { grid-column: 2; grid-row: 1; font-size: 15.5px; font-weight: 500; letter-spacing: 0.01em; line-height: 1.25; color: var(--ink); }
.pill__meta {
  grid-column: 2; grid-row: 2; margin-top: 1px;
  font-size: 11.5px; color: var(--muted); letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pill__icon { grid-row: 1 / span 2; }

.pill:active { transform: scale(0.982); }
.pill:active .pill__icon { transform: scale(0.9); }
.pill:focus-visible::before { opacity: 1; }

@media (hover: hover) {
  .pill:hover { border-color: rgba(240, 216, 154, 0.38); transform: translateY(-1px); box-shadow: 0 16px 30px -18px rgba(30, 143, 205, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
  .pill:hover::before { opacity: 1; }
  .pill:hover .pill__icon { background: var(--blue); border-color: rgba(255, 255, 255, 0.25); color: #fff; transform: rotate(-8deg) scale(1.06); }
}
.pill.is-pressed::before { opacity: 1; }
.pill.is-pressed .pill__icon { background: var(--blue); color: #fff; }

/* ---------- E. Socials ---------- */
.socials { margin-top: 22px; }
.socials__list { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.social {
  width: 48px; height: 48px; border-radius: 15px;
  display: grid; place-items: center;
  color: #7f889a;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.35s var(--ease-spring);
}
.social .ico { width: 21px; height: 21px; }
.social:active { transform: scale(0.92); }
@media (hover: hover) {
  .social:hover { color: #fff; background: rgba(30, 143, 205, 0.16); border-color: rgba(30, 143, 205, 0.5); transform: translateY(-2px); }
}

/* ---------- F. Utilities ---------- */
.utils { margin-top: 18px; }
.utils__row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 14px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.2s var(--ease);
}
.chip .ico { width: 16px; height: 16px; color: var(--gold); }
.chip:active { transform: scale(0.96); }
@media (hover: hover) { .chip:hover { color: #fff; border-color: rgba(240, 216, 154, 0.4); background: rgba(255, 255, 255, 0.06); } }

.details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}
.details summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 46px; padding: 0 16px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; list-style: none; border-radius: 18px;
}
.details summary::-webkit-details-marker { display: none; }
.ico--chev { width: 18px; height: 18px; color: var(--muted); transition: transform 0.35s var(--ease); }
.details[open] .ico--chev { transform: rotate(180deg); }
.details__body { padding: 0 8px 12px; }
.details[open] .details__body { animation: fade-down 0.35s var(--ease) both; }
@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.info { display: grid; gap: 2px; }
.info__row {
  display: grid; grid-template-columns: 34px 1fr 40px; align-items: center; gap: 4px;
  padding: 6px 4px 6px 8px; border-radius: 12px;
}
.info__row > .ico { width: 17px; height: 17px; color: var(--gold); }
.info__text { min-width: 0; }
.info__label { display: block; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.info__value { display: block; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.info__value[href] { transition: color 0.2s; }
@media (hover: hover) { .info__value[href]:hover { color: var(--blue-hi); } }
.copy-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--muted);
  transition: color 0.2s, background-color 0.2s, transform 0.2s;
}
.copy-btn .ico { width: 17px; height: 17px; }
.copy-btn:active { transform: scale(0.9); }
@media (hover: hover) { .copy-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.06); } }
.copy-btn.is-done { color: var(--gold-hi); }
.copy-btn.is-done .ico { animation: pop 0.4s var(--ease-spring); }
@keyframes pop { from { transform: scale(0.5); } to { transform: scale(1); } }

.about { margin: 10px 8px 2px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }

/* ---------- Footer ---------- */
.foot { margin-top: 24px; display: grid; justify-items: center; gap: 6px; color: var(--muted); }
.foot a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); padding: 6px 10px; border-radius: 10px; }
.foot a .ico { width: 14px; height: 14px; color: var(--blue); }
.foot small { font-size: 11px; letter-spacing: 0.04em; }

/* ---------- Dialogs ---------- */
.sheet {
  width: 100%; max-width: 440px; max-height: 88dvh;
  margin: auto auto 0; padding: 0;
  border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #121827 0%, #080b13 100%);
  color: var(--ink);
  box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, 0.8);
  overflow: auto; overscroll-behavior: contain;
}
.sheet[open] { animation: sheet-in 0.45s var(--ease) both; }
.sheet.is-closing { animation: sheet-out 0.25s ease-in both; }
.sheet::backdrop { background: rgba(2, 4, 10, 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open]::backdrop { animation: fade-in 0.3s ease both; }
.sheet.is-closing::backdrop { animation: fade-out 0.25s ease both; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-out { to { transform: translateY(40px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.sheet__inner { padding: 10px 18px max(20px, env(safe-area-inset-bottom)); }
.sheet__grip { width: 38px; height: 4px; border-radius: 4px; margin: 0 auto 12px; background: rgba(255, 255, 255, 0.18); }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet__eyebrow { font-size: 10.5px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.sheet h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  transition: background-color 0.2s, transform 0.2s;
}
.icon-btn:active { transform: scale(0.92); }
@media (hover: hover) { .icon-btn:hover { background: rgba(255, 255, 255, 0.12); } }

.services { display: grid; gap: 8px; margin-bottom: 16px; }
.service {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 8px 12px 8px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 14.5px; font-weight: 500;
  transition: border-color 0.25s, background-color 0.25s, transform 0.2s;
}
.sheet[open] .service { animation: rise 0.45s var(--ease) both; animation-delay: calc(var(--i) * 35ms + 120ms); }
.service__num { font-size: 11px; font-weight: 600; color: var(--gold); letter-spacing: 0.06em; width: 20px; }
.service__name { flex: 1; }
.service .ico { width: 17px; height: 17px; color: var(--muted); transition: color 0.25s, transform 0.3s var(--ease); }
.service:active { transform: scale(0.98); }
@media (hover: hover) {
  .service:hover { border-color: rgba(30, 143, 205, 0.5); background: rgba(30, 143, 205, 0.08); }
  .service:hover .ico { color: var(--blue-hi); transform: translate(2px, -2px); }
}

.qr { display: grid; justify-items: center; gap: 12px; margin: 4px 0 18px; }
.qr__frame {
  width: min(250px, 72vw); aspect-ratio: 1;
  padding: 14px; border-radius: 22px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(212, 175, 94, 0.6), 0 24px 50px -20px rgba(30, 143, 205, 0.6);
}
.sheet[open] .qr__frame { animation: qr-in 0.6s var(--ease-spring) 0.1s both; }
@keyframes qr-in { from { transform: scale(0.88) rotate(-2deg); opacity: 0; } to { transform: none; opacity: 1; } }
.qr__frame svg { width: 100%; height: 100%; }
.qr__url { font-size: 12px; color: var(--muted); text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.qr__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px 11px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  background: rgba(16, 22, 36, 0.92);
  border: 1px solid rgba(240, 216, 154, 0.35);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform 0.4s var(--ease-spring), opacity 0.3s var(--ease);
}
.toast .ico { width: 16px; height: 16px; color: var(--gold-hi); }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
/* Keep the toast above an open modal dialog */
dialog .toast { position: fixed; }

/* ---------- Entrance choreography ---------- */
.reveal { animation: rise 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms + 120ms); }
.reveal--pop { animation-name: pop-in; animation-duration: 0.9s; animation-timing-function: var(--ease-spring); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 359px) {
  :root { --gutter: 12px; --avatar: 112px; }
  .brand__logo { width: 96px; }
  .panel { padding-left: 12px; padding-right: 12px; }
  .primary { grid-template-columns: 1fr; }
  .rule { margin-left: -12px; margin-right: -12px; }
  .pill { grid-template-columns: 38px 1fr 20px; min-height: 58px; }
  .pill__label { font-size: 14.5px; }
  .deco--zig, .deco--rings { display: none; }
}
@media (min-width: 360px) and (max-width: 389px) {
  .primary .btn .ico { display: none; }
}
@media (min-width: 400px) {
  :root { --avatar: 140px; }
  .brand__logo { width: 116px; }
}
@media (min-width: 600px) {
  body { display: grid; place-items: center; padding: 40px 0; }
  .card {
    padding: 22px 24px 26px;
    border-radius: 40px;
    background: linear-gradient(180deg, rgba(12, 18, 32, 0.55), rgba(4, 6, 11, 0.7));
    border: 1px solid var(--line);
    box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(212, 175, 94, 0.06) inset;
  }
  .sheet { margin: auto; border-radius: 28px; border-bottom: 1px solid var(--line-2); }
  .sheet[open] { animation-name: modal-in; }
  @keyframes modal-in { from { transform: translateY(16px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .glow, .avatar__orbit, .deco { animation: none !important; }
}
