/* Honey Gonna Chat — app styles.
   Tokens: plum-night (dark) and blush-white (light) bases; accent pair set by app/theme.js.
   Display face: Bricolage Grotesque (wordmark and titles only). Everything else: the phone's own UI font,
   so Hindi, emoji and every script render natively. */

:root {
  --accent: #ec6fb0; --accent-2: #9b6fec; --bubble-a: #b8327f; --bubble-b: #6a2ba8; --accent-ink: #ec6fb0;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --display: "Bricolage Grotesque", var(--font);
  --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
  --pane: 372px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
:root[data-theme="dark"] {
  --bg: #140b1f; --bg-2: #190f26; --surface: #221634; --surface-2: #2c1e42; --hover: rgba(225, 190, 255, .06);
  --line: rgba(214, 180, 255, .12); --line-2: rgba(214, 180, 255, .22);
  --text: #f4ecfa; --muted: #a895bd; --faint: #7b6a90;
  --theirs: #2a1c3d; --theirs-text: #f4ecfa;
  --danger: #ff7a8a; --good: #5fd49a; --warn: #f2b45a;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fbf7fc; --bg-2: #ffffff; --surface: #f4edf7; --surface-2: #ebe0f0; --hover: rgba(90, 30, 110, .05);
  --line: rgba(70, 30, 90, .10); --line-2: rgba(70, 30, 90, .2);
  --text: #26142f; --muted: #6e5d80; --faint: #9a8aab;
  --theirs: #ffffff; --theirs-text: #26142f;
  --danger: #c4314b; --good: #1e8a5a; --warn: #a8630c;
  --shadow: 0 18px 50px rgba(60, 20, 80, .16);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
#app { height: 100dvh; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: var(--text); }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.icon { flex: none; display: block; }

/* ───────── buttons & fields ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; cursor: pointer;
  transition: transform .12s var(--ease), background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--bubble-a), var(--bubble-b)); color: #fff; }
.btn.ghost { background: var(--surface); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.wide { width: 100%; padding: 14px 20px; }
.link { background: none; border: 0; padding: 4px 0; color: var(--accent-ink); font-weight: 600; cursor: pointer; text-align: left; }
.link.inline { padding: 0; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }

.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--muted); }
input[type="text"], input[type="password"], input[type="email"], input[type="search"], input[type="date"], textarea, .field input {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 14px; outline: none; transition: border-color .15s, background .15s;
}
input:focus, textarea:focus { border-color: var(--accent-ink); background: var(--bg-2); }
.field-hint { font-size: 13px; color: var(--faint); min-height: 0; }
.field-hint:empty { display: none; }
.field-hint.good { color: var(--good); }
.field-hint.bad { color: var(--danger); }
.form-error { color: var(--danger); font-size: 14px; }
.form-error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent-ink); flex: none; }
.notice { background: var(--surface); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; }

/* ───────── auth ───────── */
.auth {
  min-height: 100dvh; display: grid; place-items: center; padding: 28px 18px; position: relative; overflow: hidden;
  background:
    radial-gradient(60vmax 50vmax at 85% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(50vmax 45vmax at -10% 110%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 60%),
    var(--bg);
}
.auth-petals { position: absolute; inset: 0; pointer-events: none; }
.auth-petals::before, .auth-petals::after {
  content: "❀"; position: absolute; color: var(--accent); opacity: .18; font-size: 28px;
  animation: drift 26s linear infinite; left: 12%; top: -40px;
}
.auth-petals::after { content: "✿"; left: 78%; font-size: 20px; animation-duration: 34s; animation-delay: -12s; color: var(--accent-2); }
@keyframes drift { to { transform: translate(40px, 110vh) rotate(260deg); } }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.wordmark { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.wordmark img { border-radius: 18px; }
.wordmark h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(52px, 15vw, 76px); line-height: .88;
  letter-spacing: -0.035em; display: flex; flex-direction: column;
}
.wordmark h1 span:nth-child(2) { padding-left: .55em; }
.wordmark h1 span:nth-child(3) { padding-left: 1.1em; }
.wordmark.small { flex-direction: row; align-items: center; gap: 12px; }
.wordmark.small h1 { font-size: 22px; line-height: 1; flex-direction: row; gap: .28em; letter-spacing: -0.02em; }
.wordmark.small h1 span { padding: 0 !important; color: inherit !important; -webkit-text-stroke: 0 !important; }
.auth-card h2 { font-family: var(--display); font-size: 28px; letter-spacing: -0.02em; line-height: 1.1; }
.lede { font-size: 17px; color: var(--muted); max-width: 34ch; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fine { font-size: 13px; color: var(--faint); }
.step { font-weight: 650; }
.turnstile { min-height: 65px; }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.who-btn {
  background: var(--surface); border: 2px solid transparent; border-radius: var(--r-lg); padding: 18px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
}
.who-btn.selected { border-color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.who-btn:disabled { opacity: .45; cursor: default; }
.who-name { font-family: var(--display); font-size: 22px; font-weight: 700; }
.who-note { font-size: 12px; color: var(--muted); }
.big-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--bubble-a), var(--bubble-b)); }
.recovery-code {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px dashed var(--line-2);
  font: 600 17px/1 ui-monospace, "SF Mono", "Roboto Mono", monospace; letter-spacing: .06em; text-align: center; user-select: all;
}
.recovery-code span { padding: 8px 0; }
.boot { flex: 1; display: grid; place-items: center; }
.boot-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { transform: scale(.7); opacity: .5; } to { transform: scale(1.1); opacity: 1; } }

/* ───────── shell ───────── */
.shell { flex: 1; display: grid; grid-template-columns: 1fr; min-height: 0; }
.list-pane { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.chat-pane { display: none; min-height: 0; background: var(--bg-2); }
.shell.chat-open .list-pane { display: none; }
.shell.chat-open .chat-pane { display: flex; }
@media (min-width: 860px) {
  .shell { grid-template-columns: var(--pane) 1fr; }
  .list-pane { border-right: 1px solid var(--line); }
  .chat-pane, .shell.chat-open .chat-pane { display: flex; }
  .shell.chat-open .list-pane { display: flex; }
  .back-btn { display: none !important; }
}
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 8px 20px; padding-top: max(14px, env(safe-area-inset-top)); }
.top-title { font-family: var(--display); font-size: 30px; letter-spacing: -0.025em; }
.top-actions { display: flex; gap: 2px; }
.requests-bar, .legacy-card {
  margin: 4px 12px 8px; border: 0; border-radius: var(--r-md); padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); text-align: left; cursor: pointer;
}
.requests-bar span:nth-child(2) { flex: 1; font-weight: 600; }
.requests-go { color: var(--accent-ink); font-weight: 700; }
.legacy-card { align-items: flex-start; }
.legacy-card > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.legacy-card .icon { color: var(--accent-ink); margin-top: 2px; }
.broadcast { margin: 4px 12px 8px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 6px 12px 14px; border-radius: var(--r-md); background: var(--surface); font-size: 14px; }
.broadcast p { flex: 1; padding-top: 2px; }
.broadcast .icon-btn { width: 32px; height: 32px; }

.chat-list { list-style: none; margin: 0; padding: 0 6px 24px; overflow-y: auto; flex: 1; }
.chat-item-btn {
  width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 0; background: transparent;
  border-radius: var(--r-md); cursor: pointer; text-align: left;
}
.chat-item-btn:hover { background: var(--hover); }
.chat-item.active .chat-item-btn { background: var(--surface); }
.chat-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-item-top, .chat-item-bottom { display: flex; align-items: center; gap: 6px; }
.chat-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partner-mark { color: var(--accent-ink); display: inline-flex; }
.partner-mark .icon { fill: currentColor; }
.chat-time { margin-left: auto; font-size: 12px; color: var(--faint); flex: none; }
.chat-preview { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.chat-item.unread .chat-preview { color: var(--text); font-weight: 550; }
.chat-item.unread .chat-time { color: var(--accent-ink); font-weight: 650; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 28px; color: var(--muted); }
.empty-title { font-family: var(--display); font-size: 22px; color: var(--text); }

.avatar {
  --avatar-hue: 300;
  border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, hsl(var(--avatar-hue) 62% 58%), hsl(calc(var(--avatar-hue) + 40) 55% 44%));
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ───────── chat ───────── */
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-placeholder { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--faint); text-align: center; padding: 24px; }
.chat-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px; padding-top: max(8px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.chat-head-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; text-align: left; }
.chat-head-text { display: flex; flex-direction: column; min-width: 0; }
.chat-head-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-status { font-size: 13px; color: var(--muted); }
.chat-head-status.typing { color: var(--accent-ink); }
.partner-btn { color: var(--accent-ink); }
.partner-btn .icon { fill: currentColor; }
.chat-banners { display: flex; flex-direction: column; }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; font-size: 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.banner p { flex: 1; }
.banner.warn { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); }
.thread-scroll { flex: 1; overflow-y: auto; padding: 10px 12px 14px; overscroll-behavior: contain; }
.thread { display: flex; flex-direction: column; gap: 3px; max-width: 760px; margin: 0 auto; }
.load-earlier { display: block; margin: 4px auto 10px; border: 0; background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.thread-empty { display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--faint); padding: 40px 20px; font-size: 14px; }
.day { align-self: center; margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); padding: 4px 12px; border-radius: 999px; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.bubble {
  max-width: min(78%, 520px); padding: 8px 12px 6px; border-radius: 18px; position: relative;
  background: var(--theirs); color: var(--theirs-text); box-shadow: 0 1px 0 var(--line);
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px 10px; user-select: text;
}
.msg.theirs .bubble { border-bottom-left-radius: 6px; }
.msg.mine .bubble { background: linear-gradient(140deg, var(--bubble-a), var(--bubble-b)); color: #fff; border-bottom-right-radius: 6px; box-shadow: none; }
.msg.pending .bubble { opacity: .75; }
.txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.38; }
.meta { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; opacity: .72; white-space: nowrap; line-height: 1; padding-bottom: 2px; }
.ticks { display: inline-flex; }
.ticks .icon + .icon { margin-left: -8px; }
.ticks.read { opacity: 1; color: #bfe9ff; }
.bubble.media { padding: 4px; flex-direction: column; align-items: stretch; }
.bubble.media .meta { position: absolute; right: 10px; bottom: 8px; background: rgba(0, 0, 0, .45); color: #fff; padding: 3px 7px; border-radius: 999px; opacity: 1; }
.photo-holder { display: block; width: min(300px, 64vw); border: 0; padding: 0; border-radius: 14px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.photo-holder.failed::after { content: "Photo unavailable"; display: grid; place-items: center; height: 100%; font-size: 13px; color: var(--muted); }
.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.thread.legacy .photo { max-width: 280px; border-radius: 12px; }
.photo-view { display: grid; place-items: center; cursor: zoom-out; }
.photo-view img { max-width: 100%; max-height: 82dvh; border-radius: var(--r-md); }
.voice { display: flex; align-items: center; gap: 10px; min-width: 200px; padding: 2px 0; }
.voice-play { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, .22); color: inherit; }
.msg.theirs .voice-play { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-ink); }
.voice-bar { flex: 1; height: 4px; border-radius: 4px; background: currentColor; opacity: .3; position: relative; overflow: hidden; }
.voice-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: currentColor; }
.voice-len { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
.muted-bubble { opacity: .7; font-style: italic; }

.composer {
  display: flex; align-items: flex-end; gap: 6px; padding: 8px 8px; padding-bottom: max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg-2); position: relative;
}
.composer.disabled { opacity: .45; pointer-events: none; }
.composer-input { flex: 1; resize: none; max-height: 140px; border-radius: 22px; padding: 11px 16px; line-height: 1.35; }
.send-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(135deg, var(--bubble-a), var(--bubble-b)); color: #fff;
}
.send-btn.mic { background: var(--surface); color: var(--accent-ink); }
.attach-btn { color: var(--accent-ink); height: 46px; width: 42px; }
.rec-bar { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--bg-2); }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); animation: pulse .7s ease-in-out infinite alternate; }
.rec-time { flex: 1; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ───────── panels (settings, add friend) ───────── */
.panel {
  position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .24s var(--ease);
}
.panel.open { transform: none; }
@media (min-width: 860px) {
  .panel { left: auto; width: 480px; border-left: 1px solid var(--line); box-shadow: var(--shadow); }
}
.panel-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px; padding-top: max(10px, env(safe-area-inset-top)); }
.panel-head h2 { font-family: var(--display); font-size: 22px; letter-spacing: -0.02em; }
.panel-body { flex: 1; overflow-y: auto; padding: 4px 16px 40px; }
.section-title { font-size: 13px; font-weight: 650; color: var(--muted); margin: 22px 4px 8px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 12px 12px; border: 0; background: transparent; border-radius: var(--r-md); cursor: pointer; text-align: left; width: 100%; }
.set-row:hover:not(.static) { background: var(--hover); }
.set-row .icon { color: var(--accent-ink); }
.set-row.danger, .set-row.danger .icon { color: var(--danger); }
.set-label { flex: 1; }
.chev { color: var(--faint); font-size: 22px; line-height: 1; }
.me { display: flex; align-items: center; gap: 16px; padding: 12px 4px 4px; }
.me > div { flex: 1; min-width: 0; }
.me-name { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; }
.me-photo { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.me-cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--accent-ink); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--surface); border-radius: var(--r-md); }
.segmented button { border: 0; background: transparent; padding: 10px 6px; border-radius: var(--r-sm); cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.segmented button.on { background: var(--bg-2); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.swatches { display: flex; gap: 12px; padding: 12px 8px 8px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.swatch.on { border-color: var(--text); }
.switch { width: 50px; height: 30px; border-radius: 999px; border: 0; background: var(--surface-2); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch.on { background: linear-gradient(135deg, var(--bubble-a), var(--bubble-b)); }
.switch.on::after { transform: translateX(20px); }
.builders { display: flex; flex-direction: column; gap: 10px; }
.builder { display: flex; gap: 16px; align-items: center; padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.builder-photo { width: 76px; height: 76px; border-radius: 24px; overflow: hidden; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--bubble-a), var(--bubble-b)); color: #fff; font-family: var(--display); font-size: 26px; font-weight: 700; }
.builder-photo img { width: 100%; height: 100%; object-fit: cover; }
.builder-name { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.builder-role { color: var(--muted); font-size: 14px; }
.version { text-align: center; color: var(--faint); font-size: 12px; margin-top: 24px; }

.search-box { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding-left: 14px; }
.search-box:focus-within { border-color: var(--accent-ink); }
.search-box .at { color: var(--muted); font-weight: 700; }
.search-box input { border: 0; background: transparent; padding-left: 4px; }
.search-box input:focus { background: transparent; }
.person-card, .req { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); flex-wrap: wrap; }
.person-main { flex: 1; min-width: 0; }
.person-name { font-weight: 650; }
.card-action { width: 100%; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card-action .btn.primary { flex: 1; }
.req-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.req-actions { display: flex; gap: 6px; }
.share-me { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* ───────── sheets ───────── */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(10, 4, 18, .55); display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.sheet-overlay.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; background: var(--bg-2); color: var(--text);
  border-radius: 24px 24px 0 0; padding: 20px 18px; padding-bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateY(24px); transition: transform .24s var(--ease); box-shadow: var(--shadow);
}
.sheet-overlay.open .sheet { transform: none; }
@media (min-width: 640px) {
  .sheet-overlay { align-items: center; }
  .sheet { border-radius: 24px; }
}
.dialog { display: flex; flex-direction: column; gap: 14px; }
.dialog h3 { font-family: var(--display); font-size: 22px; letter-spacing: -0.01em; }
.dialog p { line-height: 1.5; }
.terms h4 { font-size: 15px; margin-top: 4px; }
.menu { display: flex; flex-direction: column; }
.menu button { display: flex; align-items: center; gap: 14px; padding: 14px 10px; border: 0; background: transparent; border-radius: var(--r-md); cursor: pointer; text-align: left; font-size: 16px; }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--danger); }
.info { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.info h3 { font-family: var(--display); font-size: 24px; }
.info .menu { width: 100%; margin-top: 8px; }
.safety { width: 100%; background: var(--surface); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.safety-title { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 650; color: var(--accent-ink); }
.safety-code { font: 600 18px/1.6 ui-monospace, "SF Mono", "Roboto Mono", monospace; letter-spacing: .08em; word-spacing: .3em; }
.corner { display: flex; flex-direction: column; gap: 12px; }
.corner h3 { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 22px; color: var(--accent-ink); }
.corner h3 .icon { fill: currentColor; }
.corner h4 { font-size: 15px; margin-top: 6px; }
.streak { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); color: var(--warn); }
.streak-n { font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1; color: var(--text); }
.moods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 2px solid transparent; border-radius: var(--r-md); background: var(--surface); cursor: pointer; font-size: 11.5px; }
.mood.selected { border-color: var(--accent-ink); }
.mood-emoji { font-size: 24px; }
.countdown { font-family: var(--display); font-size: 20px; font-weight: 700; }
.corner .row input { flex: 1 1 140px; }

#toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 80; transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); max-width: calc(100vw - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

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