@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Myanmar";
  src: url("/fonts/NotoSansMyanmar.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #08090d;
  --card-solid: #14161f;
  --card: rgba(255, 255, 255, 0.045);
  --card-high: rgba(255, 255, 255, 0.065);
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f1ea;
  --muted: #8f95a5;
  --faint: #666c7b;
  --gold: #f3b64c;
  --gold-2: #e58932;
  --gold-soft: rgba(243, 182, 76, 0.12);
  --teal: #5ad1c8;
  --danger: #f26d6d;
  --success: #5dd39e;
  --radius: 22px;
  --shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 620px at 6% -12%, rgba(243, 182, 76, 0.11), transparent 62%),
    radial-gradient(900px 540px at 102% -4%, rgba(90, 209, 200, 0.075), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans Myanmar", "Microsoft YaHei", "PingFang SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.orb-gold { width: 540px; height: 540px; top: -220px; left: -160px; background: rgba(243, 182, 76, 0.16); }
.orb-teal { width: 480px; height: 480px; right: -220px; bottom: -240px; background: rgba(90, 209, 200, 0.10); }

.shell {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 26px 22px 40px;
}

/* Header ------------------------------------------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 29px;
  background: linear-gradient(145deg, rgba(243, 182, 76, 0.24), rgba(229, 137, 50, 0.10));
  border: 1px solid rgba(243, 182, 76, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 28px -16px rgba(243, 182, 76, 0.65);
}
.brand-text h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.brand-text h1 span {
  background: linear-gradient(100deg, var(--gold) 10%, #ffd98a 55%, var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-text p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; letter-spacing: 0.01em; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.top-actions .icon-btn { width: 36px; height: 36px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}
.status-pill:hover { border-color: var(--border-strong); color: var(--text); }
.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 0 rgba(93, 211, 158, 0.5);
}
.status-pill.ok .dot { background: var(--success); animation: statusPulse 2.4s infinite; }
.status-pill.warn .dot { background: var(--gold); }
.status-pill.bad .dot { background: var(--danger); }

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(93, 211, 158, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(93, 211, 158, 0); }
  100% { box-shadow: 0 0 0 0 rgba(93, 211, 158, 0); }
}

.setup-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(243, 182, 76, 0.3);
  background: var(--gold-soft);
  border-radius: 14px;
  color: #f6d79d;
  font-size: 13px;
}
.setup-banner .icon { margin-top: 2px; color: var(--gold); }
.setup-banner strong { display: block; font-size: 13.5px; color: #ffe6b9; }
.setup-banner p { margin: 2px 0 0; color: var(--muted); }
.setup-banner code { background: rgba(0, 0, 0, 0.28); padding: 1px 6px; border-radius: 5px; color: var(--gold); }

.phone-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid rgba(90, 209, 200, 0.2);
  background: rgba(90, 209, 200, 0.07);
  color: #bfe9e4;
  font-size: 12.5px;
  text-decoration: none;
  transition: 0.18s ease;
}
.phone-banner .icon { color: var(--teal); width: 17px; height: 17px; }
.phone-banner:hover { background: rgba(90, 209, 200, 0.12); border-color: rgba(90, 209, 200, 0.35); }

/* Cards and language bar ------------------------------------------------ */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.026));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lang-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 12px;
  padding: 12px 16px 14px;
}
.lang-field { min-width: 0; }
.lang-label {
  display: block;
  margin: 0 0 5px 4px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.select-wrap { position: relative; }
.lang-dot {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 750;
  color: var(--gold);
  background: rgba(243, 182, 76, 0.13);
  border: 1px solid rgba(243, 182, 76, 0.18);
  pointer-events: none;
}
.lang-dot[data-lang="en"] { color: #8bc6ff; background: rgba(83, 155, 255, 0.12); border-color: rgba(83, 155, 255, 0.2); }
.lang-dot[data-lang="zh"] { color: #ff9c9c; background: rgba(255, 107, 107, 0.12); border-color: rgba(255, 107, 107, 0.2); }
.lang-dot[data-lang="my"] { color: var(--gold); }

select {
  width: 100%;
  height: 46px;
  appearance: none;
  -webkit-appearance: none;
  padding: 0 32px 0 44px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s ease;
}
select:hover { background: rgba(255, 255, 255, 0.06); }
select:focus-visible { outline: 2px solid rgba(243, 182, 76, 0.7); outline-offset: 1px; }
select option { background: #15171f; color: var(--text); }
.select-wrap .chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--faint);
  pointer-events: none;
}

.swap-btn {
  width: 44px;
  height: 44px;
  margin-bottom: 1px;
  border-radius: 50%;
  border: 1px solid rgba(243, 182, 76, 0.28);
  background: var(--gold-soft);
  color: var(--gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.35s ease, background 0.2s ease;
}
.swap-btn .icon { width: 18px; height: 18px; }
.swap-btn:hover { background: rgba(243, 182, 76, 0.2); transform: rotate(180deg); }
.swap-btn:active { transform: rotate(180deg) scale(0.94); }

/* Tabs ------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 4px;
  margin: 16px 0;
  padding: 4px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.tab {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s ease;
  white-space: nowrap;
}
.tab .icon { width: 17px; height: 17px; }
.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.tab.active {
  color: var(--gold);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  border-color: rgba(243, 182, 76, 0.2);
  box-shadow: 0 6px 18px -12px rgba(243, 182, 76, 0.55);
}

.panel[hidden] { display: none; }
.panel { animation: panelIn 0.25s ease; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* Text input ------------------------------------------------------------- */
.input-card { overflow: hidden; }
textarea {
  display: block;
  width: 100%;
  min-height: 168px;
  padding: 20px 22px 6px;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 19px;
  line-height: 1.85;
}
textarea::placeholder { color: var(--faint); }
textarea.small-area { min-height: 92px; padding: 10px 18px 2px; font-size: 16.5px; line-height: 1.8; }

.input-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px 13px 20px;
}
.foot-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.muted { color: var(--muted); }
.tiny { font-size: 11.5px; }

.primary-btn, .ghost-btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: 0.18s ease;
  white-space: nowrap;
}
.primary-btn {
  padding: 11px 17px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8c768, var(--gold-2));
  color: #241705;
  font-size: 14px;
  box-shadow: 0 10px 26px -12px rgba(243, 182, 76, 0.75);
}
.primary-btn .icon { width: 17px; height: 17px; }
.primary-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.primary-btn:active:not(:disabled) { transform: none; }
.primary-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.primary-btn.small { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.primary-btn.block { width: 100%; margin-top: 14px; }
.primary-btn.is-loading .icon { display: none; }
.primary-btn.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ghost-btn {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 13px;
}
.ghost-btn:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.05); }
.ghost-btn.small { padding: 7px 11px; font-size: 12px; }
.ghost-btn.danger:hover { color: #ffb3b3; border-color: rgba(242, 109, 109, 0.35); background: rgba(242, 109, 109, 0.08); }
.ghost-btn .icon { width: 16px; height: 16px; }

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}
.icon-btn:hover { color: var(--gold); border-color: rgba(243, 182, 76, 0.3); background: var(--gold-soft); }
.icon-btn.danger { color: #e79a9a; border-color: rgba(242, 109, 109, 0.22); }
.icon-btn.danger:hover,
.icon-btn.danger:focus-visible {
  color: #ffc4c4;
  border-color: rgba(242, 109, 109, 0.45);
  background: rgba(242, 109, 109, 0.12);
}
.icon-btn.ok { color: var(--success); border-color: rgba(93, 211, 158, 0.35); }
.icon-btn .icon { width: 17px; height: 17px; }
.icon-btn.is-loading .icon { display: none; }

.ui-lang-btn { font-weight: 700; }
.ui-lang-label { font-size: 12px; letter-spacing: 0.4px; line-height: 1; }
.icon-btn.is-loading::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.chips-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 0 4px;
}
.chips-label { color: var(--faint); font-size: 11.5px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip-btn {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: 0.16s ease;
}
.chip-btn:hover { color: var(--gold); border-color: rgba(243, 182, 76, 0.3); background: var(--gold-soft); }

/* Travel quick links (Ask tab) -------------------------------------------- */
.travel-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--border);
}
.travel-links-label { color: var(--faint); font-size: 11.5px; }
.travel-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.travel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.18s ease;
}
.travel-chip::after { content: "↗"; color: var(--muted); font-size: 11px; }
.travel-chip:hover,
.travel-chip:focus-visible {
  color: var(--gold);
  border-color: rgba(243, 182, 76, 0.3);
  background: var(--gold-soft);
}

/* Voice ------------------------------------------------------------------ */
.voice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 22px 24px;
}
.voice-visual { position: relative; width: 160px; height: 160px; display: grid; place-items: center; }
.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(243, 182, 76, 0.14);
  transform: scale(0.72);
  transition: 0.3s;
}
.pulse-ring.ring-2 { inset: 14px; border-color: rgba(243, 182, 76, 0.09); }
.recording .pulse-ring { animation: ringPulse 2s ease-out infinite; border-color: rgba(242, 109, 109, 0.35); }
.recording .pulse-ring.ring-2 { animation-delay: 0.45s; }
@keyframes ringPulse {
  0% { transform: scale(0.68); opacity: 0.9; }
  100% { transform: scale(1.18); opacity: 0; }
}
.mic-btn {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(145deg, #f8c768, var(--gold-2));
  color: #241705;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 18px 40px -16px rgba(243, 182, 76, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: 0.2s ease;
}
.mic-btn .icon { width: 38px; height: 38px; stroke-width: 1.7; }
.mic-btn:hover { transform: scale(1.035); }
.mic-btn:active { transform: scale(0.97); }
.recording .mic-btn {
  background: linear-gradient(145deg, #ff8585, #d94b4b);
  color: #fff;
  box-shadow: 0 18px 40px -16px rgba(242, 109, 109, 0.75);
}
.mic-btn:disabled { opacity: 0.55; cursor: wait; }

.rec-timer {
  margin-top: 10px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.recording .rec-timer { color: #ff9c9c; }
.voice-hint { margin: 5px 0 0; max-width: 380px; color: var(--muted); font-size: 13px; }
.voice-tools { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
#voicePlayer { display: none; }

.audio-player {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(430px, 100%);
  margin-top: 16px;
  padding: 7px 13px 7px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}
.audio-play {
  width: 36px;
  height: 36px;
  flex: none;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #241705;
  background: linear-gradient(145deg, #f8c768, var(--gold-2));
}
.audio-play:hover { filter: brightness(1.07); }
.audio-play .icon { width: 15px; height: 15px; stroke: none; fill: currentColor; }
.audio-play .play-icon { margin-left: 2px; }
.audio-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 30px; text-align: center; }
.audio-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  position: relative;
  padding: 6px 0;
  background-clip: content-box;
}
.audio-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}
.voice-card .ghost-btn:disabled { opacity: 0.5; cursor: progress; }

/* Image ------------------------------------------------------------------ */
.image-card { padding: 18px; }
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 34px 18px;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  transition: 0.2s ease;
  text-align: center;
}
.dropzone strong { font-size: 15px; font-weight: 650; }
.dropzone .muted { font-size: 12px; }
.dropzone:hover, .dropzone.dragover {
  border-color: rgba(243, 182, 76, 0.5);
  background: var(--gold-soft);
}
.drop-icon {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  color: var(--gold);
  background: rgba(243, 182, 76, 0.1);
  border: 1px solid rgba(243, 182, 76, 0.16);
}
.drop-icon .icon { width: 25px; height: 25px; }
.image-preview { position: relative; }
.image-preview img {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  border-radius: 15px;
  background: #05060a;
  border: 1px solid var(--border);
}
.preview-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.image-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.follow-card {
  margin-top: 14px;
  padding: 14px 0 12px;
  overflow: hidden;
  animation: panelIn 0.25s ease;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px 4px;
}
.card-label { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.chip {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid rgba(243, 182, 76, 0.18);
  color: var(--gold);
  font-size: 11px;
  white-space: nowrap;
}

/* Ask (Q&A) -------------------------------------------------------------- */
#askCard .result-text { padding: 14px 18px 6px; font-size: 17px; line-height: 1.85; }
#storyPlay { margin: 4px 18px 14px; }
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 6px 18px 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}
.contact-card strong { font-size: 13.5px; color: var(--gold); }
.wechat-qr {
  width: 168px;
  height: 168px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
}

/* Result ----------------------------------------------------------------- */
.result-card {
  margin-top: 18px;
  padding: 18px 20px 16px;
  border-color: rgba(243, 182, 76, 0.22);
  background:
    linear-gradient(180deg, rgba(243, 182, 76, 0.055), rgba(255, 255, 255, 0.025));
  animation: resultIn 0.28s ease;
}
@keyframes resultIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.result-meta { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 auto; flex-wrap: wrap; }
.result-dot { position: static; transform: none; width: 28px; height: 28px; border-radius: 9px; font-size: 11.5px; }
.result-lang { font-size: 14px; font-weight: 700; }
.result-tools { display: flex; gap: 6px; flex: none; margin-left: auto; }
.result-tools .icon-btn { width: 34px; height: 34px; }
.result-text {
  min-height: 42px;
  padding: 14px 2px 4px;
  font-size: 21px;
  line-height: 1.95;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.result-text.loading { display: flex; flex-direction: column; gap: 9px; padding-top: 18px; }
.skeleton {
  display: block;
  height: 15px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton:nth-child(2) { width: 82%; }
.skeleton:nth-child(3) { width: 56%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.source-details { margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 9px; }
.source-details summary {
  cursor: pointer;
  color: var(--faint);
  font-size: 11.5px;
  list-style: none;
  user-select: none;
}
.source-details summary::-webkit-details-marker { display: none; }
.source-details summary::before { content: "▸ "; color: var(--gold); }
.source-details[open] summary::before { content: "▾ "; }
.source-details div {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  color: var(--faint);
  font-size: 11.5px;
  text-align: center;
}
.privacy-note .icon { width: 14px; height: 14px; color: var(--success); }

/* Store promo ------------------------------------------------------------ */
.promo-card {
  margin-top: 26px;
  padding: 15px 16px 13px;
  border: 1px solid rgba(243, 182, 76, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(150deg, rgba(243, 182, 76, 0.10), rgba(255, 255, 255, 0.02) 62%);
  box-shadow: 0 18px 44px -34px rgba(243, 182, 76, 0.55);
}
.promo-head { display: flex; align-items: flex-start; gap: 11px; }
.promo-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--gold-soft);
  color: var(--gold);
}
.promo-icon .icon { width: 18px; height: 18px; }
.promo-copy { min-width: 0; }
.promo-copy strong {
  display: block;
  color: var(--gold);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.005em;
}
.promo-text {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}
.promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}
.promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.promo-btn .icon { width: 16px; height: 16px; }
.promo-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.08); }
.promo-btn:active { transform: translateY(0); }
.promo-viber {
  border-color: rgba(243, 182, 76, 0.4);
  background: linear-gradient(180deg, rgba(243, 182, 76, 0.2), rgba(243, 182, 76, 0.1));
  color: #ffe6bb;
}
.promo-viber:hover { background: linear-gradient(180deg, rgba(243, 182, 76, 0.3), rgba(243, 182, 76, 0.16)); }
.promo-tg {
  border-color: rgba(90, 209, 200, 0.34);
  background: rgba(90, 209, 200, 0.1);
  color: #cbf6f2;
}
.promo-tg .icon { color: var(--teal); }
.promo-tg:hover { background: rgba(90, 209, 200, 0.18); }
.promo-qr-btn .icon { color: var(--teal); }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-links .promo-btn { min-height: 36px; font-size: 11.5px; }
.promo-card + .footer { margin-top: 20px; }
.qr-dialog { width: min(340px, calc(100vw - 32px)); text-align: center; }
.qr-dialog .dialog-head { text-align: left; }
.qr-dialog-img {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 16px auto 0;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
}

/* Footer ----------------------------------------------------------------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--faint);
  font-size: 11px;
}
.dot-sep { opacity: 0.5; }
.footer-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.footer-link::after { content: " →"; opacity: 0.7; }
.footer-link:hover { color: var(--gold); }

/* Dialog ----------------------------------------------------------------- */
.model-dialog {
  width: min(560px, calc(100vw - 28px));
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: #10121a;
  color: var(--text);
  box-shadow: 0 40px 100px -30px #000;
}
.model-dialog::backdrop { background: rgba(4, 5, 8, 0.7); backdrop-filter: blur(6px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.dialog-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.dialog-head p { margin: 2px 0 0; }
.model-list { margin-top: 16px; }
.model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  font-size: 13.5px;
}
.model-row:last-child { border-bottom: none; }
.model-name { display: flex; align-items: center; gap: 9px; }
.model-name .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.model-row.ok .dot { background: var(--success); }
.model-row.off .dot { background: var(--danger); }
.model-detail { color: var(--muted); font-size: 11.5px; text-align: right; }
.dialog-foot { margin: 14px 0 0; word-break: break-all; }

/* Lock and install dialogs ------------------------------------------------ */
.lock-dialog { width: min(430px, calc(100vw - 28px)); }
.lock-form { margin-top: 16px; }
.lock-form input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.06em;
}
.lock-form input::placeholder { color: var(--faint); letter-spacing: 0; }
.lock-form input:focus { outline: 2px solid rgba(243, 182, 76, 0.65); outline-offset: 1px; }
.lock-error {
  margin: 9px 2px 0;
  color: #ffb3b3;
  font-size: 12.5px;
}
.lock-form .primary-btn.block { margin-top: 12px; }

.install-steps { display: grid; gap: 10px; margin-top: 16px; }
.install-steps > div {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.install-steps strong { display: block; font-size: 13px; color: #ffe6b9; }
.install-steps p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.install-steps b { color: var(--text); font-weight: 650; }

/* Toasts ----------------------------------------------------------------- */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(440px, calc(100vw - 28px));
  pointer-events: none;
}
.toast {
  padding: 11px 15px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(22, 24, 33, 0.96);
  color: var(--text);
  font-size: 12.5px;
  box-shadow: 0 18px 40px -16px #000;
  backdrop-filter: blur(10px);
  animation: toastIn 0.22s ease;
  pointer-events: auto;
}
.toast.error { border-color: rgba(242, 109, 109, 0.4); color: #ffc0c0; }
.toast.success { border-color: rgba(93, 211, 158, 0.35); color: #b9f3d9; }
.toast.leaving { animation: toastOut 0.2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

[hidden] { display: none !important; }
:focus-visible { outline: 2px solid rgba(243, 182, 76, 0.8); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

button, select, textarea, summary, .dropzone { -webkit-tap-highlight-color: transparent; }
button, .tab, .chip-btn, summary { touch-action: manipulation; }

@media (max-width: 620px) {
  .shell {
    padding:
      calc(12px + env(safe-area-inset-top))
      calc(11px + env(safe-area-inset-right))
      calc(26px + env(safe-area-inset-bottom))
      calc(11px + env(safe-area-inset-left));
  }
  .topbar { align-items: center; flex-wrap: wrap; gap: 7px 9px; margin-bottom: 12px; }
  .brand { gap: 9px; flex: 1 1 auto; min-width: 0; }
  .logo { width: 42px; height: 42px; border-radius: 13px; font-size: 23px; }
  .brand-text h1 { font-size: 19.5px; }
  .brand-text p { font-size: 10px; max-width: 210px; }
  .top-actions { gap: 6px; margin-left: auto; }
  .top-actions .icon-btn { width: 38px; height: 38px; }
  .status-pill { padding: 7px 9px; gap: 6px; font-size: 11px; }
  .status-pill .dot { width: 6px; height: 6px; }
  .status-pill #statusText { max-width: 86px; overflow: hidden; text-overflow: ellipsis; }
  .setup-banner { padding: 10px 12px; font-size: 12px; }
  .phone-banner { margin-bottom: 10px; }

  .lang-bar { gap: 6px; padding: 9px 10px 10px; }
  .lang-label { font-size: 9.5px; margin-bottom: 4px; }
  select { height: 44px; padding: 0 24px 0 36px; font-size: 16px; }
  .lang-dot { width: 22px; height: 22px; border-radius: 7px; font-size: 9.5px; left: 7px; }
  .select-wrap .chevron { right: 7px; width: 13px; height: 13px; }
  .swap-btn { width: 38px; height: 38px; }

  .tabs { margin: 11px 0; gap: 3px; }
  .tab { min-height: 42px; padding: 8px 7px; font-size: 12.5px; gap: 6px; }
  .tab .icon { width: 15px; height: 15px; }

  textarea { min-height: 132px; padding: 14px 14px 4px; font-size: 16px; line-height: 1.75; }
  textarea.small-area { min-height: 86px; padding: 10px 12px 2px; font-size: 16px; }
  .input-foot { padding: 7px 10px 10px 12px; gap: 7px; }
  .foot-actions { flex: 1 1 auto; justify-content: flex-end; }
  .primary-btn { min-height: 42px; padding: 9px 13px; font-size: 13px; }
  .primary-btn.small { min-height: 38px; }
  .ghost-btn { min-height: 40px; }
  .icon-btn { width: 40px; height: 40px; }
  .chips-row { gap: 6px; }
  .chip-btn { min-height: 34px; padding: 6px 10px; font-size: 11.5px; }

  .voice-card { padding: 20px 14px 17px; }
  .voice-visual { width: 122px; height: 122px; }
  .mic-btn { width: 78px; height: 78px; }
  .mic-btn .icon { width: 30px; height: 30px; }
  .voice-tools { gap: 7px; }
  .voice-tools .ghost-btn { flex: 1 1 auto; }
  .audio-player { width: 100%; }

  .image-card { padding: 12px; }
  .dropzone { padding: 24px 12px; }
  .image-preview img { max-height: 300px; }
  .image-actions { gap: 7px; }
  .image-actions .ghost-btn,
  .image-actions .primary-btn { flex: 1 1 140px; min-height: 42px; white-space: normal; text-align: center; }
  .preview-actions { gap: 6px; }
  .card-top { padding: 0 12px 3px; }
  .card-label { font-size: 12px; }

  .result-card { margin-top: 12px; padding: 13px 12px 12px; }
  .result-head { padding-bottom: 8px; gap: 6px 10px; }
  .result-meta { gap: 7px; }
  .result-dot { width: 26px; height: 26px; font-size: 10.5px; }
  .result-lang { font-size: 13px; }
  .result-text { padding-top: 10px; font-size: 17.5px; line-height: 1.8; }
  .result-tools { gap: 4px; }
  .result-tools .icon-btn { width: 38px; height: 38px; }
  .source-details div { font-size: 12.5px; }

  .privacy-note { align-items: flex-start; margin-top: 12px; padding: 0; text-align: left; font-size: 11px; line-height: 1.5; }
  .privacy-note .icon { margin-top: 2px; }
  .footer { margin-top: 22px; padding-top: 14px; font-size: 9.5px; gap: 4px; }

  .model-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 16px;
    overflow-y: auto;
  }
  .toast-stack { bottom: calc(12px + env(safe-area-inset-bottom)); width: calc(100vw - 20px); }
}

@media (max-width: 480px) {
  .brand-text p { display: none; }
  .brand-text h1 { font-size: 18.5px; }
  .status-pill #statusText { max-width: 70px; }
  .tabs { gap: 2px; }
  .tab { gap: 5px; padding: 8px 5px; font-size: 12px; }
  .input-foot .foot-actions { flex: 1 1 100%; }
  .foot-actions .primary-btn { flex: 1 1 auto; }
  .image-actions .ghost-btn,
  .image-actions .primary-btn { flex-basis: 100%; }
  .dialog-head h2 { font-size: 16.5px; }
  .model-row { gap: 9px; font-size: 12px; }
  .model-detail { font-size: 10.5px; }
}

@media (max-width: 380px) {
  .shell {
    padding-left: calc(9px + env(safe-area-inset-left));
    padding-right: calc(9px + env(safe-area-inset-right));
  }
  .topbar { gap: 5px; }
  .brand { gap: 7px; }
  .logo { width: 38px; height: 38px; border-radius: 11px; font-size: 21px; }
  .brand-text h1 { font-size: 17.5px; }
  .top-actions { gap: 4px; }
  .status-pill { width: 36px; height: 36px; justify-content: center; padding: 0; }
  .status-pill #statusText { display: none; }
  .lang-bar { gap: 5px; padding: 8px 8px 9px; }
  .lang-dot { display: none; }
  select { padding-left: 11px; padding-right: 21px; }
  .swap-btn { width: 34px; height: 34px; }
  .tab { padding: 8px 4px; font-size: 11.5px; }
  .result-card { padding: 11px 10px 10px; }
  .result-text { font-size: 16.5px; }
  .result-lang { font-size: 12.5px; }
  .footer { font-size: 9px; }
}

@media (max-height: 540px) and (orientation: landscape) {
  .shell {
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .topbar { flex-wrap: nowrap; margin-bottom: 10px; }
  .brand-text p { display: none; }
  .logo { width: 38px; height: 38px; border-radius: 12px; font-size: 21px; }
  .brand-text h1 { font-size: 19px; }
  .lang-bar { padding: 8px 10px 10px; }
  select { height: 42px; }
  .swap-btn { width: 36px; height: 36px; }
  .tabs { margin: 10px 0; }
  .tab { min-height: 38px; }
  textarea { min-height: 96px; }
  textarea.small-area { min-height: 72px; }
  .voice-card { padding: 14px 16px 12px; }
  .voice-visual { width: 96px; height: 96px; }
  .mic-btn { width: 64px; height: 64px; }
  .mic-btn .icon { width: 26px; height: 26px; }
  .voice-hint { margin-top: 2px; }
  .dropzone { padding: 18px 14px; }
  .privacy-note, .footer { margin-top: 18px; }
  .model-dialog { max-height: calc(100dvh - 16px); padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 420px) {
  .tabs { gap: 2px; }
  .tab { padding: 9px 4px; gap: 5px; font-size: 12px; }
  .tab .icon { width: 15px; height: 15px; }
}

