/* Gia's own sheet for a question or a note (js/confirm.js), in place of the browser's confirm(), alert() and prompt().
   The look's sheet (docs/design.md): white with a hairline, rises 24px with a fade in 350ms on the one curve.
   A modal <dialog>, so it sits over everything. Phones: a bottom sheet over the tabs and the safe area, its buttons
   stacked. Computers (860px and up): a centred box. Dark: css/dark.css (tools/build_dark.py) and tools/dark_hand.css. */
.cnf-sheet { position: fixed; inset: auto 12px calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 9701; box-sizing: border-box; width: auto; max-width: 460px; max-height: none; margin: 0 auto; padding: 0; overflow: visible; border: 1px solid #e6e2fa; border-radius: 26px; background: #fff; color: #1a1740; box-shadow: 0 -8px 34px rgba(26, 23, 64, .18); font-family: var(--font-read); text-align: left; animation: cnf-rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.cnf-sheet::backdrop { background: rgba(21, 18, 58, .4); animation: cnf-fade .35s cubic-bezier(.2, .8, .2, 1) both; }
.cnf-sheet:focus { outline: none; }
body.has-tabs .cnf-sheet { bottom: calc(var(--tabs-h, 72px) + 12px + env(safe-area-inset-bottom, 0px)); }
.cnf-card { padding: 22px 20px 14px; }
.cnf-title { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 21px; line-height: 1.25; letter-spacing: -.01em; color: #1a1740; }
.cnf-line { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: #3b3870; }
.cnf-copy { display: block; width: 100%; box-sizing: border-box; margin: 14px 0 0; padding: 11px 13px; border: 1px solid #e6e2fa; border-radius: 12px; background: #f7f5ff; color: #1a1740; font: 500 14px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; -webkit-user-select: all; user-select: all; }
.cnf-copy.cnf-ask { min-height: 44px; font: 500 16px/1.3 var(--font-read, 'Inter Tight', system-ui, sans-serif); -webkit-user-select: text; user-select: text; }   /* (Confirm.prompt: a field to type a name in, 16px so a phone doesn't zoom) */
.cnf-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.cnf-go, .cnf-no { width: 100%; padding: 13px 18px; border: 0; border-radius: 999px; font: 700 16px/1.2 var(--font-read); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s cubic-bezier(.2, .8, .2, 1), box-shadow .15s; }
.cnf-go { background: linear-gradient(180deg, #5a40f3, #4229dc); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 3px 8px rgba(58, 34, 214, .22); }
.cnf-sheet.is-danger .cnf-go { background: linear-gradient(180deg, #d93a40, #b3261e); box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 3px 8px rgba(179, 38, 30, .24); }
.cnf-no { background: #fff; color: #1a1740; box-shadow: 0 0 0 1px #e6e2fa, 0 2px 6px rgba(30, 26, 103, .08); }
.cnf-go:active, .cnf-no:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .22); }
.cnf-go:focus-visible, .cnf-no:focus-visible, .cnf-copy:focus-visible { outline: 2px solid #4a28ee; outline-offset: 2px; }
.cnf-sheet.is-closing { animation: cnf-sink .2s ease both; }
.cnf-sheet.is-closing::backdrop { animation: cnf-fade-out .2s ease both; }
@keyframes cnf-fade { from { opacity: 0; } }
@keyframes cnf-fade-out { to { opacity: 0; } }
@keyframes cnf-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes cnf-sink { to { opacity: 0; transform: translateY(24px); } }
@keyframes cnf-rise-desk { from { opacity: 0; transform: translate(-50%, calc(-50% + 24px)); } }
@keyframes cnf-sink-desk { to { opacity: 0; transform: translate(-50%, calc(-50% + 24px)); } }
@media (min-width: 860px) {
  .cnf-sheet, body.has-tabs .cnf-sheet { inset: 50% auto auto 50%; width: min(420px, calc(100% - 48px)); max-width: none; margin: 0; border-radius: 18px; transform: translate(-50%, -50%); box-shadow: 0 24px 60px rgba(26, 23, 64, .22); animation-name: cnf-rise-desk; }
  .cnf-sheet.is-closing { animation-name: cnf-sink-desk; }
  .cnf-card { padding: 24px 24px 20px; }
  .cnf-acts { flex-direction: row-reverse; justify-content: flex-start; gap: 10px; }
  .cnf-go, .cnf-no { width: auto; padding: 11px 20px; font-size: 14px; }
}
@media (min-width: 860px) and (hover: hover) {
  .cnf-go:hover, .cnf-no:hover { transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  .cnf-sheet, .cnf-sheet::backdrop, .cnf-sheet.is-closing, .cnf-sheet.is-closing::backdrop { animation: none; }
  .cnf-go, .cnf-no { transition: none; }
}
