/* Страница гостя — вид AskErina (стили и шрифты страницы переводчика askerina.com, копия). */
:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #252722;
  background: #eeece5;
  --ink: #252722; --muted: #667067; --line: rgba(37,39,34,.09); --accent: #43584c; --host: #eef2ee;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #eeece5; }
body { min-height: 100dvh; margin: 0; background: #f7f5ef; }
button, select { font: inherit; touch-action: manipulation; }
button:focus-visible, select:focus-visible { outline: 3px solid rgba(72,95,82,.28); outline-offset: 3px; }

@font-face { font-family: 'AskErina Oswald'; font-weight: 500; font-display: swap; src: url('/fonts/oswald-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'AskErina Cormorant'; font-style: italic; font-weight: 600; font-display: swap; src: url('/fonts/cormorant-garamond-latin-600-italic.woff2') format('woff2'); }

.app-shell {
  width: min(100%, 520px); height: 100dvh; margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.topbar { position: relative; text-align: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; line-height: 1; color: var(--ink); }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; color: #f4f2e7; background: #3f4a2b; }
.brand-word { display: flex; align-items: baseline; gap: 2px; }
.brand-ask { font-family: 'AskErina Oswald', 'Arial Narrow', sans-serif; font-weight: 500; letter-spacing: .04em; font-size: 18px; }
.brand-erina { font-family: 'AskErina Cormorant', Georgia, serif; font-style: italic; font-weight: 600; font-size: 25px; }
.end-conversation-button {
  position: absolute; top: -4px; right: 0; min-height: 34px; padding: 7px 11px;
  border: 1px solid rgba(53,69,60,.18); border-radius: 12px; color: #5c665f; background: rgba(255,255,255,.48);
  font-size: 12px; font-weight: 680; cursor: pointer;
}

.language-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.language-select select {
  min-height: 44px; padding: 0 30px 0 14px; border: 1px solid rgba(53,69,60,.16); border-radius: 14px;
  color: var(--ink); background: #fff; font-weight: 650; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #667067 50%), linear-gradient(135deg, #667067 50%, transparent 50%);
  background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat;
}
.status { margin: 0; color: var(--muted); font-size: 14px; min-width: 0; }
body[data-state="ok"] .status::before { content: "● "; color: #4f8a5f; }
body[data-state="connecting"] .status::before, body[data-state="lost"] .status::before { content: "● "; color: #b88a3a; }
body[data-state="ended"] .status::before { content: "● "; color: #9a9a92; }

.feed { flex: 1; min-height: 0; overflow-y: auto; margin-top: 14px; border-top: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.item { padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.item.host { background: var(--host); border-radius: 12px; border-bottom-color: transparent; margin: 6px 0; padding: 12px; }
.who { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.main { margin: 0; font-size: 18px; line-height: 1.4; white-space: pre-line; }
.alt { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; white-space: pre-line; }
.item.pending .main { color: var(--muted); }
.hint { color: #6e716b; font-size: 16px; text-align: center; margin: 24px 0; }

.panel { padding-top: 12px; }
.live { min-height: 22px; margin: 0 0 10px; color: var(--muted); font-size: 15px; text-align: center; }
.primary-button {
  width: 100%; min-height: 62px; border-radius: 19px; border: 0; font-weight: 720; cursor: pointer;
  color: #fff; background: var(--accent); box-shadow: 0 10px 28px rgba(45,65,54,.16); font-size: 18px;
}
.primary-button[data-rec="1"] { background: #9b4a3c; }
.primary-button:disabled { opacity: .48; cursor: default; }
.consent { margin: 10px 0 0; color: #7a7d76; font-size: 12px; line-height: 1.4; text-align: center; }

/* «Неточно» — жалоба на перевод */
.item { position: relative; }
.flag { position: absolute; top: 6px; right: 2px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: #9a8a76; padding: 0; cursor: pointer; }
.flag svg { width: 16px; height: 16px; }
.item .who { padding-right: 36px; }
.cback { position: fixed; inset: 0; z-index: 10; background: rgba(37,39,34,.28); }
.csheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; max-height: calc(100dvh - 40px); overflow-y: auto; background: #f7f5ef;
  border-radius: 24px 24px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(37,39,34,.16); }
.csheet h2 { margin: 2px 0 10px; font-size: 21px; text-align: center; }
.csheet .q { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--host); font-size: 14px; line-height: 1.4; color: #40463f; }
.csheet .q b { display: block; font-weight: 600; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { border: 1px solid rgba(53,69,60,.2); border-radius: 18px; background: #fff; padding: 9px 13px; font-size: 15px; color: #2f3a33; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.csheet textarea { width: 100%; min-height: 58px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid rgba(53,69,60,.16); border-radius: 14px; background: #fff; font: inherit; font-size: 15px; }
.csheet .ctx { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #4b554d; margin: 0 0 10px; }
.csheet .cnote { margin: 6px 0 10px; color: #7a7d76; font-size: 12px; line-height: 1.4; text-align: center; }
.csheet .err { color: #9b4a3c; font-size: 13px; text-align: center; min-height: 16px; margin: 0 0 6px; }
.csheet .row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.csheet .b { min-height: 52px; border-radius: 16px; font-weight: 700; font-size: 16px; cursor: pointer; }
.csheet .cancel { border: 1px solid rgba(53,69,60,.2); background: transparent; color: #435047; }
.csheet .sendc { border: 0; background: var(--accent); color: #fff; }
.thanks { position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 12; background: #2f3a33; color: #fff;
  padding: 12px 18px; border-radius: 16px; font-size: 15px; font-weight: 600; }
body[data-state="failed"] .status::before { content: "● "; color: #b5523f; }
