/* Snackbar, dialogs and sheets, pop-ups */

/* ---------- overlays ---------- */
#snack { position: fixed; left: 50%; bottom: 24px; z-index: 70; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: #1d2029; border: 1px solid var(--line2); border-radius: 16px; padding: 10px 10px 10px 16px; box-shadow: 0 16px 50px rgba(0,0,0,.55);
  width: max-content; max-width: calc(100vw - 24px); transform: translate(-50%, 150%); opacity: 0; visibility: hidden;
  transition: transform .35s cubic-bezier(.2,1.2,.4,1), opacity .2s, visibility 0s .35s; }
#snack.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .35s cubic-bezier(.2,1.2,.4,1), opacity .2s; }
#snackMsg { font-weight: 600; font-size: 14px; }
#snack .retime { display: flex; gap: 6px; align-items: center; }
#snack .undo { border: none; background: rgba(124,255,79,.15); color: var(--accent); font-weight: 700; border-radius: 10px; padding: 7px 12px; cursor: pointer; }
@media (hover: hover) { #snack .undo:hover { background: rgba(124,255,79,.25); } }
#achPop { position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translate(-50%, calc(-100% - 40px)); visibility: hidden; opacity: 0; z-index: 80; display: flex; gap: 12px; align-items: center;
  background: #1b1e26; border: 1px solid rgba(255,200,30,.55); border-radius: 16px; padding: 12px 18px 12px 14px; pointer-events: none;
  box-shadow: 0 16px 50px rgba(0,0,0,.6), 0 0 30px rgba(255,200,30,.15); width: max-content; max-width: calc(100vw - 32px);
  transition: transform .45s cubic-bezier(.2,1.4,.4,1), opacity .3s, visibility 0s .45s; }
#achPop.show { transform: translate(-50%, 0); visibility: visible; opacity: 1; transition: transform .45s cubic-bezier(.2,1.4,.4,1), opacity .2s; }
#achPop .ai { font-size: 32px; }
#achPop .at { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #ffc81e; font-weight: 700; }
#achPop .an { font-weight: 700; font-size: 15px; margin-top: 2px; }
#achPop .ad { font-size: 12.5px; color: var(--muted); }
.modal { position: fixed; inset: 0; z-index: 72; display: grid; place-items: center; background: rgba(5,6,8,.64); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 16px; }
.modal .box { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 24px; padding: 22px 22px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: popIn .28s cubic-bezier(.2,1.3,.4,1); }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }
.sheethead { display: flex; justify-content: space-between; align-items: center; }
.sheethead h3 { margin: 0; font-size: 18px; }
.sheethead .step { margin: 0; }
#talk .box { max-width: 440px; border-color: rgba(255,79,94,.5); }
#talk h3 { margin: 0 0 4px; font-size: 21px; }
#talk .joke { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
#talk p { font-size: 14px; line-height: 1.55; color: var(--text2); margin: 0 0 10px; }
#talk .sos { background: rgba(255,79,94,.1); border: 1px solid rgba(255,79,94,.35); border-radius: 12px; padding: 10px 12px; color: var(--text); }
#talk .btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
#talk button { flex: 1; min-height: 44px; border-radius: 12px; cursor: pointer; font-weight: 600; border: 1px solid var(--line2); background: var(--bg2); }
#talk button.water { background: linear-gradient(135deg, #4fa8ff, #2f7cf0); border: none; color: #fff; }
#keys .box { width: min(380px, 100%); }
#keys h3 { margin: 0 0 12px; font-size: 18px; }
#intro .box { max-width: 420px; text-align: center; padding: 26px 26px 20px; }
#intro h3 { margin: 6px 0 8px; font-size: 22px; }
#intro p { color: var(--text2); line-height: 1.55; margin: 0 0 16px; font-size: 14.5px; }
#intro .num { text-align: left; margin-bottom: 8px; }
#intro .hint { display: block; margin: 0 0 16px; }
#intro .add { width: 100%; }
#intro .tips { margin: 14px 0 0; }
.introK { width: 130px; margin: 0 auto; }
