/* Savor mockup: presenter chrome + base. The app's design lives in savor.css. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; background: #e7e4df; color: #1f1e1c; -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ================= Presenter (not part of the product) ================= */
.pz { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.pz-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 9px 16px; background: #fbfaf8; border-bottom: 1px solid #dcd8d1; font-size: 12px; z-index: 10; }
.pz-brand { display: flex; flex-direction: column; line-height: 1.25; min-width: 140px; }
.pz-brand b { font-size: 13px; font-weight: 600; }
.pz-brand span { color: #8a857c; }
.pz-group { display: flex; align-items: center; gap: 2px; padding: 3px; background: #efece7; border-radius: 9px; }
.pz-group button { padding: 7px 10px; border-radius: 7px; color: #5d5952; white-space: nowrap; transition: background .2s, color .2s; }
.pz-group button:hover { color: #1f1e1c; }
.pz-group button.is-active { background: #fff; color: #1f1e1c; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04); }
.pz-toggles button.is-active { background: #2b2925; color: #fff; }
.pz-spacer { flex: 1; }
.pz-reset { padding: 7px 10px; color: #7d786f; border-radius: 7px; }
.pz-reset:hover { background: #efece7; color: #1f1e1c; }
.pz-select { display: none; }
.pz-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pz-device { position: relative; flex: none; background: #1c1b1a; box-shadow: 0 0 0 1px #3a3836, 0 40px 80px -20px rgba(40,30,20,.45); }
.pz-device[data-device="iphone"] { padding: 12px; border-radius: 58px; }
.pz-device[data-device="iphone"]::after { content: ''; position: absolute; top: 22px; left: 50%; width: 112px; height: 32px; margin-left: -56px; border-radius: 20px; background: #000; z-index: 60; pointer-events: none; }
.pz-device[data-device="android"] { padding: 10px; border-radius: 40px; }
.pz-device[data-device="android"]::after { content: ''; position: absolute; top: 22px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #000; z-index: 60; pointer-events: none; }
.pz-device[data-device^="ipad"] { padding: 18px; border-radius: 40px; }
.pz-device[data-device="fluid"] { width: 100%; height: 100%; padding: 0; border-radius: 0; box-shadow: none; }
.pz-screen { position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate; border-radius: 46px; }
.pz-device[data-device="android"] .pz-screen { border-radius: 30px; }
.pz-device[data-device^="ipad"] .pz-screen { border-radius: 24px; }
.pz-device[data-device="fluid"] .pz-screen { border-radius: 0; }

@media (max-width: 1500px) { .pz-brand { display: none; } }
@media (max-width: 1240px) { .pz-screens { display: none; } .pz-select { display: block; font: inherit; padding: 7px; border-radius: 8px; border: 1px solid #dcd8d1; background: #fff; } }
@media (max-width: 760px) {
  .pz-bar { gap: 6px; padding: 6px 8px; flex-wrap: wrap; }
  .pz-devices, .pz-toggles, .pz-spacer { display: none; }
  .pz-select { flex: 1; }
}

/* ================= App base ================= */
.app { position: absolute; inset: 0; overflow: hidden; container: app / size; background: var(--bg); color: var(--ink); font-family: var(--f-body); --safe-top: 0px; --safe-bottom: 0px; }
.pz-device[data-device="iphone"] .app, .pz-device[data-device="android"] .app { --safe-top: 40px; --safe-bottom: 12px; }
.ico { width: 20px; height: 20px; stroke-width: 1.5; flex: none; }

/* editing affordances */
[contenteditable="true"] { outline: none; border-radius: 2px; cursor: text; transition: background .2s; }
[contenteditable="true"]:hover { background: rgba(168, 95, 72, .06); }
[contenteditable="true"]:focus { background: rgba(168, 95, 72, .09); box-shadow: 0 0 0 1px rgba(168, 95, 72, .35); }
[contenteditable="true"]:empty::before { content: attr(data-placeholder); color: var(--muted); }
.sv-share.is-selected { color: var(--danger) !important; }
.is-listening { color: var(--danger) !important; animation: listen 1s ease-in-out infinite; }
@keyframes listen { 50% { transform: scale(1.12); opacity: .7; } }

/* ================= Overlays, sheets, toasts ================= */
.overlay { position: absolute; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(41, 39, 34, .38); opacity: 0; transition: opacity .28s; }
.overlay.is-open { opacity: 1; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 88%; overflow: auto; background: var(--paper); color: var(--ink); border-radius: 22px 22px 0 0; padding: 24px 22px calc(26px + var(--safe-bottom)); box-shadow: 0 -10px 40px rgba(41, 39, 34, .18); transform: translateY(40px); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.overlay.is-open .sheet { transform: none; }
.overlay--tray { background: transparent; pointer-events: none; }
.overlay--tray .sheet { pointer-events: auto; box-shadow: 0 -6px 30px rgba(41, 39, 34, .22); }
@container app (min-aspect-ratio: 3/5) { .overlay:not(.overlay--tray) { align-items: center; } .overlay:not(.overlay--tray) .sheet { border-radius: 22px; } }
.toasts { position: absolute; left: 0; right: 0; bottom: calc(96px + var(--safe-bottom)); z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 420px; padding: 11px 18px; font: 500 13px/1.45 var(--f-label); text-align: center; color: var(--paper); background: var(--ink); border-radius: 999px; box-shadow: 0 10px 30px rgba(41, 39, 34, .25); opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s; }
.toast.is-in { opacity: 1; transform: none; }
.flash { position: absolute; inset: 0; z-index: 80; background: #fff; pointer-events: none; animation: flash .5s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
