@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-grotesque-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-grotesque-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'JBMono'; src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JBMono'; src: url('/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

/* Light and airy: pale lavender base, cyan → violet light, frosted white glass. */
:root {
  color-scheme: light;
  --ink: #f4f6fd;
  --ink-2: #ffffff;
  --ink-3: #eceffa;
  --line: #e0e4f3;
  --line-2: #cfd5ee;
  --paper: #12152b;
  --paper-2: #4b5277;
  --dim: #7e86a8;
  --cyan: #12c8ec;
  --violet: #8b5cf6;
  --pink: #ec4bd0;
  --acc: #5b45f0;
  --signal: var(--acc);
  --signal-ink: #ffffff;
  --ok: #0fa974;
  --danger: #e5325a;
  --grad: linear-gradient(120deg, #12c8ec 0%, #6271ff 50%, #a54bff 100%);
  --grad-soft: linear-gradient(120deg, #12c8ec14, #a54bff18);
  --glass: rgb(255 255 255 / .72);
  --glass-2: #ffffff;
  --shadow: 0 10px 30px -14px #2a2f6b40;
  --glow: 0 0 0 1px #6271ff40, 0 6px 22px -8px #6271ff66;
  --glow-v: 0 0 0 1px #8b5cf655, 0 6px 24px -8px #8b5cf688;
  --display: 'Bricolage', system-ui, sans-serif;
  --mono: 'JBMono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r: 12px;
  --r-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font: 400 15px/1.5 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
/* aurora */
body::before {
  content: ''; position: fixed; inset: -20%; pointer-events: none; z-index: -1;
  background:
    radial-gradient(38% 32% at 18% 12%, #12c8ec2e, transparent 70%),
    radial-gradient(42% 36% at 88% 22%, #8b5cf62e, transparent 70%),
    radial-gradient(40% 34% at 60% 100%, #ec4bd01c, transparent 70%);
  animation: aurora 26s ease-in-out infinite alternate;
}
/* fine grid, fading out towards the bottom */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .5;
  background-image: linear-gradient(#2a2f6b0d 1px, transparent 1px), linear-gradient(90deg, #2a2f6b0d 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 75%);
}
@keyframes aurora { to { transform: translate3d(4%, 3%, 0) rotate(6deg) scale(1.08); } }
::selection { background: #6271ff33; color: var(--paper); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
#app { height: 100%; }
.pad { padding: 2rem; }
.mono { font-family: var(--mono); letter-spacing: -.01em; }
.fine { font-size: 12.5px; color: var(--dim); line-height: 1.55; }
.small { font-size: 12px; }
.err { color: var(--danger); font-size: 13px; min-height: 1em; font-family: var(--mono); }
.ico { display: inline-flex; line-height: 0; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2a2f6b26; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #6271ff66; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.mark { width: 20px; height: 20px; border-radius: 50%; background: var(--grad); box-shadow: inset -6px 3px 0 0 var(--ink), 0 0 16px #6271ff66; position: relative; }
.mark::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--pink); right: -3px; bottom: -2px; box-shadow: 0 0 8px var(--pink); }

/* ---------- controls ---------- */
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; position: relative;
  background: var(--grad); color: #fff; font-weight: 600; letter-spacing: .01em;
  padding: .8rem 1.3rem; border-radius: 999px; transition: box-shadow .2s, transform .1s, filter .2s;
  box-shadow: 0 6px 24px -8px #6d7bffcc, inset 0 1px 0 #ffffff40;
}
.primary:hover { filter: brightness(1.1); box-shadow: 0 8px 32px -6px #6271ffaa, inset 0 1px 0 #ffffff50; }
.primary:active { transform: translateY(1px) scale(.99); }
.primary:disabled { opacity: .5; cursor: wait; }
.primary.danger { background: linear-gradient(120deg, #ff4d6d, #ff4fd8); box-shadow: 0 6px 24px -8px #ff4d6dcc; }
.primary.small, .ghost.small { padding: .45rem .9rem; font-size: 13px; }
.ghost { display: inline-flex; align-items: center; gap: .4rem; padding: .8rem 1.1rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--paper-2); background: #ffffff; transition: border-color .15s, color .15s, box-shadow .2s; }
.ghost:hover { border-color: var(--acc); color: var(--paper); box-shadow: var(--glow); }
.ghost.danger, .link.danger { color: var(--danger); }
.ghost.danger:hover { border-color: var(--danger); box-shadow: 0 0 20px -6px var(--danger); }
.link { color: var(--paper-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); font-size: 13px; }
.link:hover { color: var(--paper); text-decoration-color: var(--acc); }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; color: var(--paper-2); transition: background .15s, color .15s, box-shadow .2s; }
.icon-btn:hover { background: #6271ff12; color: var(--acc); box-shadow: inset 0 0 0 1px #6271ff33; }

input[type=text], input[type=password], input[type=url], textarea, select {
  width: 100%; background: #ffffff; border: 1px solid var(--line); border-radius: var(--r);
  padding: .7rem .9rem; outline: none; transition: border-color .15s, box-shadow .2s, background .15s;
}
input:focus, textarea:focus { border-color: #6271ffaa; box-shadow: 0 0 0 4px #6271ff1f; background: #ffffff; }
textarea { resize: none; font-family: var(--mono); font-size: 13px; }
select { appearance: none; cursor: pointer; }
select option { background: var(--ink-2); }
label > span { display: block; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--dim); margin-bottom: .35rem; }
label.check { display: flex; gap: .7rem; align-items: center; cursor: pointer; }
label.check > span { text-transform: none; letter-spacing: 0; font-family: var(--display); font-size: 14px; color: var(--paper); margin: 0; }
input[type=checkbox] { accent-color: var(--acc); width: 17px; height: 17px; }
hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }

/* ---------- gate (setup / lock) ---------- */
.gate { height: 100%; display: grid; grid-template-columns: minmax(0, 580px) 1fr; overflow: auto; }
.gate-inner { padding: clamp(1.5rem, 5vw, 4rem); display: flex; flex-direction: column; gap: 1.6rem; justify-content: safe center; min-height: 100%; animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.gate h1 { font-size: clamp(44px, 7vw, 78px); line-height: .92; letter-spacing: -.045em; font-weight: 800; }
.gate h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px #6271ff55); }
.lede { color: var(--paper-2); font-size: 17px; }
.creed { list-style: none; font-family: var(--mono); font-size: 12.5px; color: var(--paper-2); display: grid; gap: .45rem; }
.creed li { display: flex; gap: .6rem; align-items: baseline; }
.creed li::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); transform: translateY(-1px); }
.gate-form { display: grid; gap: 1.1rem; max-width: 440px; padding: 1.4rem; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px); box-shadow: 0 30px 80px -40px #2a2f6b66; animation: rise .7s .15s cubic-bezier(.2,.7,.2,1) both; }
.gate-form .primary { justify-self: start; margin-top: .3rem; }
.gate-form .link { justify-self: start; }
.gate .lead { font-size: 15px; line-height: 1.5; color: var(--paper-2); max-width: 440px; }
.gate .get-app { align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; padding: .9rem 1.4rem; font-size: 15px; }
.gate .ios-steps { max-width: 440px; flex-basis: auto; }
.gate-inner > .link { align-self: flex-start; }
.gate-side { position: relative; overflow: hidden; border-left: 1px solid var(--line); background: radial-gradient(ellipse at 50% 45%, #e6e3ff 0%, var(--ink) 70%); }
.cipher {
  position: absolute; inset: -2rem; white-space: pre; font: 400 15px/1.55 var(--mono); color: #6271ff2e;
  letter-spacing: .3em; mask-image: radial-gradient(ellipse at 55% 45%, #000 10%, transparent 68%);
  animation: drift 40s linear infinite alternate;
}
.orb { position: absolute; left: 50%; top: 46%; width: 42vmin; height: 42vmin; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e9e6ff 65%); box-shadow: 0 0 0 1px #6271ff33, 0 30px 80px -20px #6271ff66, inset -2vmin -1vmin 6vmin #8b5cf633, inset 2vmin 1.5vmin 5vmin #12c8ec22; }
.orb i { position: absolute; inset: -12%; border-radius: 50%; border: 1px solid #6271ff40; animation: spin 18s linear infinite; }
.orb i::after { content: ''; position: absolute; top: 50%; left: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.orb i:nth-child(2) { inset: -26%; border-color: #8b5cf633; animation-duration: 28s; animation-direction: reverse; }
.orb i:nth-child(2)::after { background: var(--violet); box-shadow: 0 0 14px var(--violet); top: 12%; left: 18%; }
.orb i:nth-child(3) { inset: -42%; border-style: dashed; border-color: #2a2f6b1f; animation-duration: 60s; }
.orb i:nth-child(3)::after { background: var(--pink); box-shadow: 0 0 14px var(--pink); top: 80%; left: 88%; width: 6px; height: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes drift { to { transform: translate(-3rem, -6rem); } }

/* ---------- shell ---------- */
.shell { height: 100%; display: grid; grid-template-columns: 350px 1fr; }
.side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: rgb(255 255 255 / .7); backdrop-filter: blur(20px); }
.side-head { display: flex; align-items: center; gap: .6rem; padding: 1rem 1rem .9rem 1.2rem; }
.actions { margin-left: auto; display: flex; }
.status { font-family: var(--mono); font-size: 10.5px; color: var(--dim); display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .5rem; border-radius: 999px; border: 1px solid var(--line); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.status.on { color: var(--ok); border-color: #0fa97433; background: #0fa9740d; }
.status.on::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.new-btn {
  margin: 0 1rem .7rem; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem .9rem;
  border: 1px solid var(--line-2); border-radius: 14px; color: var(--paper); font-size: 14px; font-weight: 600;
  background: var(--grad-soft); transition: box-shadow .2s, border-color .2s;
}
.new-btn:hover { border-color: #6271ff88; box-shadow: var(--glow); }
.list { flex: 1; overflow-y: auto; padding: .2rem .6rem .6rem; }
.empty-list { padding: 2rem 1rem; display: grid; gap: .5rem; }
.row { width: 100%; display: flex; align-items: center; gap: .85rem; padding: .7rem .75rem; border-radius: 16px; text-align: left; position: relative; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.row + .row { margin-top: 2px; }
.row:hover { background: #ffffff; }
.row.active { background: linear-gradient(120deg, #6271ff14, #8b5cf61c); border-color: #6271ff33; box-shadow: 0 0 30px -14px #6271ff; }
.row.active::before { content: ''; position: absolute; left: -.6rem; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 10px var(--cyan); }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; background: var(--ink-3); color: #fff; position: relative; text-shadow: 0 1px 6px #0006; box-shadow: inset 0 1px 0 #ffffff55, 0 6px 16px -8px #2a2f6b88; }
/* colour families, picked from the code (see hue() in ui.js) */
:is(.avatar, .shop-ph).h0 { background: linear-gradient(135deg, #22e1ff, #3b5bff); }
:is(.avatar, .shop-ph).h1 { background: linear-gradient(135deg, #9d5cff, #ff4fd8); }
:is(.avatar, .shop-ph).h2 { background: linear-gradient(135deg, #00f5c4, #0091ff); }
:is(.avatar, .shop-ph).h3 { background: linear-gradient(135deg, #ff8a3d, #ff3d81); }
:is(.avatar, .shop-ph).h4 { background: linear-gradient(135deg, #6d7bff, #b04dff); }
:is(.avatar, .shop-ph).h5 { background: linear-gradient(135deg, #3dffa0, #16b2ff); }
:is(.avatar, .shop-ph).h6 { background: linear-gradient(135deg, #ff4fd8, #6d3bff); }
:is(.avatar, .shop-ph).h7 { background: linear-gradient(135deg, #ffd23d, #ff6a3d); }
.row-main { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.row-top { display: flex; align-items: center; gap: .35rem; }
.row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-time { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.row-sub { display: flex; align-items: center; gap: .35rem; color: var(--dim); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tag { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--acc); border: 1px solid #6271ff55; background: #6271ff10; padding: .05rem .45rem; border-radius: 999px; white-space: nowrap; }
.badge { min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--grad); color: #fff; font: 600 11px/21px var(--mono); text-align: center; box-shadow: 0 0 14px -2px #6271ffaa; }
.verified { color: var(--ok); display: inline-flex;  }
.side-foot { padding: .8rem 1.2rem; border-top: 1px solid var(--line); font-size: 10px; color: var(--dim); }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: transparent; }
.void { margin: auto; padding: 2rem; display: grid; gap: 1rem; max-width: 520px; }
.void-big { font-size: clamp(32px, 4.5vw, 54px); font-weight: 800; line-height: .98; letter-spacing: -.04em; color: #12152b14; }
.void-big em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .7; }
.chat-head { display: flex; align-items: center; gap: .55rem; padding: .7rem 1rem .7rem 1.4rem; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .72); backdrop-filter: blur(20px); position: relative; z-index: 2; }
.chat-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, #6271ff66, #8b5cf666, transparent); }
.back { display: none; }
.who { flex: 1; min-width: 0; display: grid; justify-items: start; }
.who-name { font-weight: 600; font-size: 17px; display: inline-flex; gap: .4rem; align-items: center; }
.who .link { font-size: 11px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-decoration: none; color: var(--dim); }
.who .link:hover { color: var(--acc); }
.timer { display: flex; align-items: center; gap: .3rem; color: var(--paper-2); padding: 0 .55rem; border: 1px solid var(--line-2); border-radius: 999px; height: 34px; background: #ffffff; }
.timer.on { color: var(--acc); border-color: #6271ff66; box-shadow: 0 0 16px -6px var(--cyan); }
.timer select { border: 0; padding: 0 .2rem; font-family: var(--mono); font-size: 12px; width: auto; background: transparent; box-shadow: none; }
.request { margin: 1rem 1.4rem 0; padding: 1rem 1.1rem; border: 1px solid #6271ff55; border-radius: 16px; display: grid; gap: .8rem; font-size: 14px; background: linear-gradient(120deg, #6271ff10, #8b5cf614); box-shadow: 0 0 30px -16px var(--cyan); }
.request-actions { display: flex; gap: .5rem; }

.msgs { flex: 1; overflow-y: auto; padding: 1.4rem clamp(1rem, 4vw, 3rem); display: flex; flex-direction: column; gap: .35rem; }
.day { align-self: center; margin: 1rem 0 .5rem; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .18em; color: var(--paper-2); padding: .2rem .7rem; border-radius: 999px; background: #2a2f6b0a; border: 1px solid var(--line); }
.sys { align-self: center; max-width: 440px; text-align: center; font-family: var(--mono); font-size: 11.5px; color: var(--dim); padding: .45rem .9rem; border: 1px solid var(--line); background: #ffffffcc; border-radius: 12px; margin: .4rem 0; }
.sys.first { margin-top: auto; }
.msg { display: flex; flex-direction: column; max-width: min(560px, 78%); animation: pop .26s cubic-bezier(.2,.8,.2,1) both; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.bubble { padding: .62rem .95rem; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.45; }
.in .bubble { background: var(--glass-2); border: 1px solid var(--line-2); border-bottom-left-radius: 6px; box-shadow: 0 4px 14px -10px #2a2f6b55; }
.out .bubble { background: var(--grad); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 8px 24px -12px #6d7bff, inset 0 1px 0 #ffffff38; }
.out.failed .bubble { background: transparent; color: var(--paper); border: 1px solid var(--danger); box-shadow: 0 0 18px -8px var(--danger); }
.out.sending .bubble { opacity: .65; }
.meta { display: flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: 10px; color: var(--dim); padding: .25rem .4rem 0; }
.st.read { color: var(--acc);  }
.st.failed { color: var(--danger); }
.burn { display: inline-flex; align-items: center; gap: .15rem; color: var(--pink); }
.unsend { opacity: 0; transition: opacity .15s; font-size: 10.5px; }
.msg:hover .unsend, .unsend:focus-visible { opacity: 1; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }

.composer { display: flex; align-items: flex-end; gap: .6rem; padding: .8rem clamp(1rem, 4vw, 3rem) calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgb(255 255 255 / .72); backdrop-filter: blur(20px); }
.composer textarea { font-family: var(--display); font-size: 15px; border: 1px solid var(--line-2); border-radius: 22px; padding: .65rem 1.1rem; line-height: 1.4; max-height: 180px; background: #ffffff; }
.composer textarea:focus { border-color: #6271ff88; }
.composer textarea:focus-visible, input:focus-visible, textarea:focus-visible { outline: none; }
.send { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; transition: transform .15s, box-shadow .2s; box-shadow: 0 0 22px -4px #6271ffaa, inset 0 1px 0 #ffffff50; }
.send:hover { transform: rotate(-12deg) scale(1.05); box-shadow: 0 0 30px -2px #6271ffcc; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgb(30 34 80 / .28); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 1rem; animation: fade .15s; }
.modal { width: min(470px, 100%); max-height: 90vh; overflow-y: auto; background: linear-gradient(180deg, rgb(255 255 255 / .96), rgb(246 247 255 / .96)); border: 1px solid var(--line-2); border-radius: 24px; padding: 1.3rem 1.4rem 1.5rem; box-shadow: 0 40px 100px -30px #2a2f6b66, 0 0 60px -30px var(--violet); animation: rise .28s cubic-bezier(.2,.7,.2,1); position: relative; }
.modal::before { content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent); }
.modal header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.modal h2 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.stack { display: grid; gap: 1.1rem; }
.stack.center { justify-items: center; text-align: center; }
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.qr { border-radius: 16px; image-rendering: pixelated; box-shadow: 0 0 0 1px #6271ff55, 0 0 40px -10px var(--cyan); }
.code-box { font-family: var(--mono); font-size: 11px; color: var(--paper-2); word-break: break-all; padding: .75rem .85rem; border: 1px solid var(--line-2); background: #ffffff; border-radius: var(--r); text-align: left; width: 100%; user-select: all; }
.safety { display: grid; grid-template-columns: repeat(4, auto); gap: .5rem 1.1rem; font: 600 20px/1.3 var(--mono); letter-spacing: .04em; padding: 1rem 0; color: var(--acc);  }
.panic { display: grid; gap: .9rem; padding: 1rem; border: 1px solid #ff4d6d55; border-radius: 16px; background: #ff4d6d0a; }
.panic .primary { justify-self: start; }
.toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); z-index: 60; background: var(--glass); color: var(--paper); border: 1px solid #6271ff55; backdrop-filter: blur(16px); padding: .65rem 1.1rem; border-radius: 22px; width: max-content; max-width: calc(100vw - 2rem); text-align: center; line-height: 1.35; font-size: 14px; font-weight: 600; box-shadow: 0 0 30px -10px var(--cyan); animation: rise .2s; }
@keyframes fade { from { opacity: 0; } }

/* ---------- mobile ---------- */
@media (max-width: 859px) {
  .gate { grid-template-columns: 1fr; }
  .gate-side { display: none; }
  .shell { grid-template-columns: 1fr; }
  .shell .chat { display: none; }
  .shell.show-chat .side { display: none; }
  .shell.show-chat .chat { display: flex; }
  .back { display: inline-grid; }
  .chat-head { padding-left: .5rem; }
  .timer select { max-width: 92px; }
  .msg { max-width: 86%; }
  .side { backdrop-filter: none; background: rgb(255 255 255 / .8); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- groups ---------- */
.new-row { display: flex; gap: .5rem; margin: 0 1rem .7rem; }
.new-row .new-btn { margin: 0; flex: 1; }
.new-row .new-btn:last-child { flex: none; background: #ffffff; }
/* group without photo: gradient disc + initial + a tiny "group" badge, inside a neon ring */
.avatar.group { border-radius: 16px; }
.avatar.group::before { content: ''; position: absolute; inset: -3px; border-radius: 19px; padding: 1.5px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8; }
.group-mark { position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-2); color: var(--acc); border: 1px solid #6271ff66; box-shadow: 0 0 8px -2px var(--cyan); }
.avatar.small { width: 32px; height: 32px; font-size: 13px; }
.avatar.group.small { border-radius: 11px; }
.avatar.group.small::before { border-radius: 13px; inset: -2px; }
.avatar.small .group-mark { display: none; }
.from { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--acc); padding: .5rem .5rem .2rem; }
button.from { display: block; background: none; border: 0; margin: 0; font-weight: inherit; text-align: left; cursor: pointer; border-radius: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.from:hover, button.from:focus-visible { text-decoration: underline; }
.member-name[role=button] { cursor: pointer; }
.member-head { display: flex; align-items: center; gap: .7rem; font-size: 1.05rem; }
.member-head strong { display: inline-flex; gap: .35rem; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.field { display: grid; gap: .5rem; }
.field-label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--dim); }
.picker { display: grid; gap: .15rem; max-height: 240px; overflow-y: auto; border: 1px solid var(--line); background: #ffffff; border-radius: 16px; padding: .4rem; }
.picker label.check { padding: .4rem .5rem; border-radius: 12px; }
.picker label.check:hover { background: #6271ff0d; }
.picker label.check:has(input:checked) { background: linear-gradient(120deg, #6271ff14, #8b5cf618); }
.members { display: grid; gap: .3rem; }
.member { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: 14px; background: #ffffff; border: 1px solid var(--line); }
.member-name { flex: 1; min-width: 0; display: inline-flex; gap: .35rem; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-form { display: flex; align-items: flex-end; gap: .5rem; }
.inline-form label { flex: 1; }
.composer.ended { align-items: center; justify-content: space-between; }
@media (max-width: 859px) { .new-row .new-btn { font-size: 13px; } }
@media (max-width: 600px) { .chat-head .avatar { display: none; } }

.install { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.install:empty { display: none; }
.install > p { flex-basis: 100%; margin: 0; }
.install a.ghost { text-decoration: none; }
.install .fine a { color: var(--paper-2); text-underline-offset: 2px; }
/* the same block as a card on the first screen and above the conversation list */
.install-card { padding: .8rem .9rem; border: 1px solid var(--line-2); border-radius: 16px; background: var(--grad-soft), var(--ink-2); box-shadow: 0 6px 20px rgb(91 69 240 / .08); }
.side > .install-card { margin: 0 1rem .7rem; flex: none; }
.install-head { flex-basis: 100%; display: flex; align-items: center; gap: .45rem; color: var(--acc); }
.install-head strong { color: var(--paper); font-size: .95rem; }
.install-head .link { margin-left: auto; font-size: .8rem; color: var(--dim); }
/* a newer APK is published: a strip above everything in the conversation list */
.update-bar { flex: none; display: flex; align-items: center; gap: .55rem; padding: .55rem .6rem .55rem 1rem; background: var(--grad); color: #fff; font-size: .88rem; font-weight: 600; }
.update-bar[hidden] { display: none; }
.update-bar > span:not(.ico) { flex: 1; min-width: 0; }
.update-bar .primary.small { background: #fff; color: var(--acc); box-shadow: none; }
.update-bar .icon-btn { color: #fff; background: transparent; border-color: transparent; }
.update-badge { color: var(--acc); font-weight: 600; }
.apk-block p { margin: 0; }
.apk-block .fine a { color: var(--paper-2); text-underline-offset: 2px; }
.ios-steps { flex-basis: 100%; list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; counter-reset: s; }
.ios-steps li { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--paper-2); line-height: 1.35; counter-increment: s; }
.ios-steps strong { color: var(--paper); }
.step-ico { position: relative; flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink-2); border: 1px solid var(--line-2); color: var(--acc); }
.step-ico::after { content: counter(s); position: absolute; top: -6px; left: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--grad); color: #fff; font: 700 10px/16px var(--mono); text-align: center; }

/* ---------- photos, videos, files ---------- */
.composer { position: relative; }
.hidden-input { display: none; }
.attach { flex: none; width: 44px; height: 44px; border-radius: 50%; }
.attach-menu { position: absolute; left: clamp(1rem, 4vw, 3rem); bottom: calc(100% + .5rem); z-index: 5; display: grid; min-width: 210px; background: rgb(255 255 255 / .95); backdrop-filter: blur(18px); border: 1px solid var(--line-2); border-radius: 18px; padding: .35rem; box-shadow: 0 20px 50px -16px #2a2f6b55; animation: rise .15s; }
.attach-menu[hidden] { display: none; }
.attach-menu button { display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; border-radius: 12px; color: var(--paper); text-align: left; }
.attach-menu button:hover { background: #6271ff12; color: var(--acc); }
.attach-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .4rem; }
.attach-preview:has(> :only-child) { grid-template-columns: 1fr; }
.ap-item { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--r); background: var(--ink-3); }
.attach-preview:not(:has(> :only-child)) .ap-item { aspect-ratio: 1; }
.ap-file { display: grid; justify-items: center; align-content: center; gap: .3rem; padding: 1rem .6rem; text-align: center; overflow-wrap: anywhere; font-size: 13px; color: var(--paper-2); }

.bubble.media { padding: 3px; overflow: hidden; white-space: normal; }
.bubble.media.file { padding: .25rem; }
.caption { padding: .4rem .6rem .3rem; white-space: pre-wrap; }
.mv { position: relative; width: min(320px, 70vw); max-height: 420px; aspect-ratio: 4 / 3; border-radius: 17px; overflow: hidden; background: var(--ink); }
.mv > img, .mv > video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.mv > video { object-fit: contain; }
.mv > img:not(.blur) { cursor: zoom-in; }
.mv .blur { position: absolute; inset: 0; filter: blur(14px); transform: scale(1.15); }
.mv-cover { position: absolute; inset: 0; display: grid; place-items: center; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border-radius: 999px; background: rgb(18 21 43 / .6); border: 1px solid #ffffff33; color: #fff; font: 600 12px var(--mono); backdrop-filter: blur(6px); }
.mv-cover:not(:disabled):hover .chip { background: var(--grad); color: #fff; border-color: transparent; }
.mv-file { display: flex; align-items: center; gap: .7rem; min-width: 220px; max-width: 320px; padding: .45rem .6rem .45rem .45rem; text-align: left; color: inherit; }
.mv-file-ico { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.out .mv-file-ico { background: #ffffff2e; }
.mv-file-main { display: grid; min-width: 0; }
.mv-file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.out .mv-file .fine { color: #ffffffb3; }

.viewer { position: fixed; inset: 0; z-index: 70; background: rgb(3 4 12 / .94); display: grid; place-items: center; animation: fade .15s; }
.viewer > img { max-width: 100vw; max-height: 100vh; object-fit: contain; cursor: zoom-out; }
.viewer-bar { position: fixed; top: calc(.6rem + env(safe-area-inset-top)); right: .6rem; display: flex; gap: .4rem; align-items: center; }
.viewer-bar a.ghost { padding: .45rem .8rem; text-decoration: none; background: rgb(5 6 15 / .7); color: #fff; border-color: #ffffff33; }
.viewer-bar .icon-btn { color: #fff; }

/* ---------- group photo ---------- */
img.avatar.pic { object-fit: cover; padding: 0; background: var(--ink-3); }
.avatar.big { width: 104px; height: 104px; font-size: 40px; border-radius: 30px; }
.avatar.group.big::before { inset: -5px; border-radius: 35px; padding: 2px; }
.avatar.big .group-mark { width: 28px; height: 28px; right: -6px; bottom: -6px; }
.group-id { display: flex; align-items: center; gap: 1rem; }
.group-id > label { flex: 1; }
.group-id:has(> .avatar.big:only-child) { justify-content: center; }
.stack.tight { gap: .3rem; justify-items: start; }
.pic-pick { flex: none; width: 76px; height: 76px; border-radius: 22px; border: 1.5px dashed #6271ff88; color: var(--acc); overflow: hidden; display: grid; place-items: center; background: #6271ff0a; transition: box-shadow .2s; }
.pic-pick:hover { border-style: solid; box-shadow: var(--glow); }
.pic-face, .pic-face img { display: grid; place-items: center; width: 100%; height: 100%; object-fit: cover; }

/* ---------- group settings ---------- */
.tag.hot { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 0 12px -2px var(--violet); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.choice { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem .85rem; border: 1px solid var(--line-2); border-radius: 16px; cursor: pointer; background: #ffffff; transition: border-color .15s, box-shadow .2s, background .15s; }
.choice:hover { border-color: #6271ff55; }
.choice:has(input:checked) { border-color: #6271ffaa; background: linear-gradient(140deg, #6271ff14, #8b5cf61c); box-shadow: 0 0 26px -12px var(--cyan); }
.choice input { margin-top: .2rem; accent-color: var(--acc); }
.choice > span { display: grid; gap: .15rem; text-transform: none; letter-spacing: 0; font-family: var(--display); font-size: 14px; color: var(--paper); margin: 0; }
@media (max-width: 420px) { .choices { grid-template-columns: 1fr; } }
/* group info: a centred hero (photo, name, pills, description) */
.group-head { display: grid; justify-items: center; text-align: center; gap: .6rem; padding: 1.4rem 1rem 1.2rem; border-radius: 22px; background: radial-gradient(ellipse at 50% 0%, #6271ff1f, transparent 70%), linear-gradient(180deg, #8b5cf614, transparent); border: 1px solid var(--line); }
.group-head .avatar { width: 96px; height: 96px; font-size: 38px; border-radius: 28px; margin-bottom: .3rem; }
.group-head .avatar.group::before { inset: -5px; border-radius: 33px; padding: 2px; }
.group-head .avatar .group-mark { width: 26px; height: 26px; right: -6px; bottom: -6px; }
.group-head img.avatar.pic { box-shadow: 0 0 0 2px #6271ff88, 0 0 40px -8px var(--cyan); }
.group-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.group-hero { display: flex; justify-content: center; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .65rem; border-radius: 999px; font: 600 11px var(--mono); color: var(--paper-2); background: #2a2f6b0a; border: 1px solid var(--line-2); }
.pill.on { color: var(--acc); border-color: #6271ff66; background: #6271ff10; }
.about { color: var(--paper-2); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; max-width: 34ch; }
/* A long name is cut with "…" instead of running under the buttons. */
.who-name { max-width: 100%; min-width: 0; }
.who-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-short { display: none; }
/* Phones: the timer is just its icon (plus "1 h" when on); the menu opens on tap. */
@media (max-width: 600px) {
  .chat-head { gap: .15rem; }
  .timer { position: relative; border: 0; padding: 0 .35rem; min-width: 34px; justify-content: center; background: none; box-shadow: none; }
  .timer select { position: absolute; inset: 0; width: 100%; max-width: none; opacity: 0; cursor: pointer; }
  .chat-head .timer.on, .chat-head .timer.on .timer-short { color: var(--acc); text-transform: none; letter-spacing: 0; }
  .timer.on .timer-short { display: inline; font: 600 10px var(--mono); white-space: nowrap; }
  .chat-head .icon-btn { width: 34px; }
  .chat-head img.avatar.pic { display: none; }
}
.stack > form.stack > .ghost.small { justify-self: start; }

/* ---------- ways back in: fingerprint, recovery code ---------- */
.bio-btn { justify-content: center; width: 100%; padding-block: 1rem; font-size: 16px; }
.or { text-align: center; font: 600 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: .8rem; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.rcode { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: 1rem; border-radius: 18px; background: var(--grad-soft); border: 1px solid #6271ff40; }
.rcode span { font: 600 clamp(17px, 5vw, 21px) var(--mono); letter-spacing: .12em; text-align: center; padding: .55rem 0; border-radius: 10px; background: #ffffff; border: 1px solid var(--line); color: var(--paper); user-select: all; }
.protect > .ghost, .protect > .primary { justify-content: center; }
.protect > .link { justify-self: center; }
.done { display: flex; align-items: center; gap: .4rem; color: var(--ok); font-weight: 600; font-size: 14px; }
.security { display: grid; gap: .6rem; }
.sec-title { font: 600 11px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.sec-row { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 16px; background: #ffffff; }
.sec-ico { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); color: var(--acc); }
.sec-text { flex: 1; min-width: 0; display: grid; gap: .1rem; font-size: 14px; }
.sec-row > button { flex: none; }
.rcode + .ghost.small { justify-self: start; }
.help-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .45rem; color: var(--paper-2); font-size: .92rem; line-height: 1.4; }
.help-steps strong { color: var(--paper); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .7rem; }
.diag { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: 0; font-size: 13px; }
.diag dt { color: var(--paper-2); }
.diag dd { margin: 0; word-break: break-word; }

/* Rich messages */
.bubble.rich > :first-child, .caption.rich > :first-child { margin-top: 0; }
.bubble.rich > :last-child, .caption.rich > :last-child { margin-bottom: 0; }
.rich p { margin: .45em 0; }
.rich ul, .rich ol { margin: .4em 0; padding-left: 1.3em; white-space: normal; }
.rich li { white-space: pre-wrap; }
.rich blockquote { margin: .45em 0; padding: .1em 0 .1em .7em; border-left: 3px solid currentColor; opacity: .85; }
.rich code { font-family: var(--mono); font-size: .88em; padding: .05em .35em; border-radius: 6px; background: rgb(0 0 0 / .07); }
.rich pre { font-family: var(--mono); font-size: 12.5px; margin: .45em 0; padding: .6em .75em; border-radius: 10px; background: rgb(0 0 0 / .07); white-space: pre-wrap; overflow-wrap: anywhere; }
.out .rich code, .out .rich pre { background: rgb(255 255 255 / .2); }
.rich a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.in .rich a { color: var(--acc); }
.join-card { display: inline-flex; align-items: center; gap: .5rem; margin: .3em 0; padding: .55rem .85rem; border-radius: 14px; background: #fff; color: var(--acc); border: 1px solid var(--line-2); font: inherit; font-size: 14px; text-align: left; white-space: normal; }
.out .join-card { background: rgb(255 255 255 / .92); }
.bubble { -webkit-touch-callout: none; }

/* Reactions */
.reacts { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: -.35rem; padding: 0 .5rem; position: relative; z-index: 1; }
.react { display: inline-flex; align-items: center; gap: .2rem; padding: .1rem .45rem; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); font-size: 14px; line-height: 1.4; box-shadow: 0 3px 10px -6px #2a2f6b66; }
.react span { font-family: var(--mono); font-size: 10.5px; color: var(--paper-2); }
.react.mine { border-color: #6271ff99; background: #eef0ff; }
.meta .more { display: inline-grid; place-items: center; color: var(--dim); padding: 2px; border-radius: 6px; opacity: .55; }
.meta .more:hover, .meta .more:focus-visible { opacity: 1; color: var(--acc); }
.react-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: .2rem; justify-items: center; }
.react-pick.quick { grid-template-columns: repeat(4, 1fr); padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.react-more { max-height: 38vh; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: .3rem; margin: 0 -.25rem; padding: 0 .25rem; }
.react-label { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding-top: .4rem; }
.react-pick button { font-size: 26px; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; transition: background .15s, transform .1s; }
.react-pick button:hover { background: #6271ff12; }
.react-pick button:active { transform: scale(.9); }
.react-pick button.mine { background: #eef0ff; box-shadow: inset 0 0 0 1px #6271ff99; }
.react-more .react-pick button { font-size: 23px; width: 42px; height: 42px; }

/* While typing, the product strip steps aside to leave room for the messages. */
.chat:has(.composer textarea:focus) .gshop-strip { display: none; }
/* The group's photo sits in the header; tapping it opens the group's details. */
.head-av { flex: none; margin-right: .3rem; display: grid; padding: 0; border: 0; background: none; border-radius: 50%; }
.chat-head .head-av .avatar { display: inline-grid; width: 38px; height: 38px; }
.chat-head .head-av img.avatar.pic { display: block; object-fit: cover; }
/* A group's header carries its cover: the photo blurred behind white text and icons. */
.chat-head.cover-head { padding-top: .85rem; padding-bottom: .85rem; overflow: hidden; isolation: isolate; color: #fff; background: #0e0e0c; border-bottom-color: transparent; backdrop-filter: none; }
.cover-head .head-cover { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; background: radial-gradient(120% 140% at 90% 0%, #6271ff66, transparent 60%), radial-gradient(90% 120% at 0% 100%, #ff5a1f33, transparent 60%), #0e0e0c; }
.cover-head .head-cover.has-pic { filter: blur(18px) saturate(1.3) brightness(.55); transform: scale(1.4); }
.cover-head::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #0003, #0006); }
.cover-head :is(.icon-btn, .timer, .who-name) { color: #fff; }
.cover-head .who .link { color: #ffffffbf; }
@media (min-width: 601px) { .cover-head .timer { background: #ffffff1a; border-color: #ffffff33; } }
.cover-head .timer select { color: inherit; }
.cover-head .timer option { color: var(--paper); }
.cover-head .who .link:hover { color: #fff; }
.cover-head .icon-btn:hover { background: #ffffff1f; }
.cover-head .head-av .avatar { box-shadow: 0 0 0 2px #ffffff40; }
.cover-head .who-name { text-shadow: 0 1px 8px #0006; }

/* Pinned message banner */
.pin-bar { flex: none; display: flex; align-items: center; gap: .3rem; padding: .4rem clamp(.6rem, 3vw, 2.4rem) .4rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .86); backdrop-filter: blur(20px); }
.pin-bar:empty { display: none; }
.pin-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: .65rem; padding: .25rem 0; text-align: left; }
.pin-go > .ico { flex: none; color: var(--acc); }
.pin-text { display: grid; min-width: 0; line-height: 1.3; }
.pin-text strong { font-size: 12px; font-weight: 600; color: var(--acc); }
.pin-text span { font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.meta .pinned-mark { color: var(--acc); display: inline-flex; }
.msg.flash .bubble { animation: pin-flash 1.6s ease-out; }
@keyframes pin-flash { 0%, 35% { box-shadow: 0 0 0 4px #6271ff80; } 100% { box-shadow: 0 0 0 4px #6271ff00; } }
.msg-actions { display: grid; gap: .5rem; }
.msg-actions:empty { display: none; }

/* Formatting bar */
.format-bar { position: absolute; left: clamp(1rem, 4vw, 3rem); bottom: calc(100% + .5rem); z-index: 4; display: flex; gap: .15rem; padding: .3rem; background: rgb(255 255 255 / .95); backdrop-filter: blur(18px); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 14px 40px -16px #2a2f6b55; animation: rise .15s; }
.format-bar[hidden] { display: none; }
.format-bar button { width: 38px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--paper-2); }
.format-bar button:hover, .format-bar button:active { background: #6271ff14; color: var(--acc); }
.fmt-toggle.on { color: var(--acc); background: #6271ff14; }

/* Account transfer between addresses (move.js) */
.move-screen { min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 1rem; padding: 2rem; text-align: center; }
.move-screen p { max-width: 30ch; font-size: 1.05rem; }

/* Bots: badge, intro card, "/" commands, buttons under messages, factory */
.tag.bot { display: inline-flex; align-items: center; gap: .25rem; flex: none; }
.bot-intro { display: grid; justify-items: center; gap: .5rem; text-align: center; margin: 1.5rem auto .5rem; padding: 1.5rem 1.25rem; max-width: 26rem; border: 1px solid var(--line-2); border-radius: 22px; background: #ffffffb8; }
.bot-intro p { margin: 0; white-space: pre-wrap; }
.start-bar { display: grid; padding: .8rem clamp(1rem, 4vw, 3rem) calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgb(255 255 255 / .72); backdrop-filter: blur(20px); }
.kb { display: grid; gap: .3rem; margin-top: .35rem; width: 20rem; max-width: 100%; }
.kb-row { display: flex; gap: .3rem; }
.kb-btn { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .5rem .6rem; border-radius: 12px; border: 1px solid #6271ff44; background: #6271ff0d; color: var(--acc); font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-btn:hover { background: #6271ff1c; }
.kb-btn:disabled { opacity: .5; }
.cmd-menu { position: absolute; left: clamp(1rem, 4vw, 3rem); right: clamp(1rem, 4vw, 3rem); bottom: calc(100% + .5rem); z-index: 5; display: grid; max-height: 50vh; overflow-y: auto; background: rgb(255 255 255 / .95); backdrop-filter: blur(18px); border: 1px solid var(--line-2); border-radius: 18px; padding: .35rem; box-shadow: 0 20px 50px -16px #2a2f6b55; animation: rise .15s; }
.cmd-menu[hidden] { display: none; }
.cmd-menu button { display: flex; align-items: baseline; gap: .75rem; padding: .6rem .85rem; border-radius: 12px; color: var(--paper); text-align: left; }
.cmd-menu button:hover { background: #6271ff12; }
.cmd-menu .mono { color: var(--acc); font-weight: 600; }
.cmd-toggle .mono { font-size: 18px; font-weight: 700; }
.bot-list { display: grid; }
.cmd-rows { display: grid; gap: .4rem; margin-bottom: .4rem; }
.cmd-row { display: grid; grid-template-columns: auto minmax(0, 2fr) minmax(0, 3fr) auto; align-items: center; gap: .35rem; }
.cmd-row > .mono { color: var(--dim); }
.label { display: block; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--dim); margin-bottom: .35rem; }
.grow { flex: 1; min-width: 0; }
.stack.center { justify-items: center; text-align: center; }
p.ok { color: var(--acc); font-weight: 600; margin: 0; }

/* ---------- mini-apps ---------- */
.sheet { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; background: var(--ink); animation: fade .15s; }
.sheet-head { display: flex; align-items: center; gap: .7rem; padding: calc(.6rem + env(safe-area-inset-top)) .8rem .6rem; background: var(--ink-2); border-bottom: 1px solid var(--line); }
.sheet-head .who { flex: 1; display: grid; min-width: 0; }
.sheet-head .who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.kb-btn svg { flex: none; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.choice-card { display: grid; justify-items: start; gap: .25rem; padding: .9rem; text-align: left; border: 1px solid var(--line-2); border-radius: 16px; background: var(--ink-2); color: inherit; }
.choice-card:hover { border-color: var(--acc); }
.choice-card svg { color: var(--acc); }

/* ---------- shop ---------- */
.shop { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.shop-scroll { flex: 1; overflow-y: auto; padding: 1rem; width: 100%; max-width: 40rem; margin: 0 auto; box-sizing: border-box; }
.shop-hero { display: grid; justify-items: center; text-align: center; gap: .3rem; margin-bottom: 1rem; }
.shop-hero h2 { margin: .3rem 0 0; }
.shop-items { display: grid; gap: .7rem; }
.shop-item { display: flex; gap: .8rem; padding: .7rem; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.shop-item > img, .shop-ph { flex: none; width: 84px; height: 84px; border-radius: 12px; object-fit: cover; display: grid; place-items: center; font-size: 28px; font-weight: 700; color: #fff; }
.shop-item-main { flex: 1; min-width: 0; display: grid; gap: .2rem; align-content: start; }
.shop-item-main p { margin: 0; white-space: pre-wrap; }
.price { font-weight: 700; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; gap: .3rem; }
.stepper span { min-width: 1.4em; text-align: center; font-weight: 700; }
.shop-bar { padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: var(--ink-2); border-top: 1px solid var(--line); display: flex; justify-content: center; }
.shop-bar .primary { width: 100%; max-width: 38rem; justify-content: center; }
.shop-empty { text-align: center; color: var(--paper-2); padding: 2rem 1rem; }
.shop-info { padding: .6rem .8rem; border-radius: 12px; background: var(--ink-3); }
.shop-info p { margin: .2rem 0 0; white-space: pre-wrap; }
.order-lines { display: grid; gap: .35rem; }
.order-line { display: flex; align-items: center; gap: .6rem; }
.order-total { display: flex; justify-content: space-between; padding-top: .4rem; border-top: 1px dashed var(--line-2); }
.order-card { display: grid; gap: .5rem; min-width: 15rem; max-width: 20rem; }
.order-head { display: flex; align-items: center; gap: .4rem; }
.order-head .pill { margin-left: auto; }
.order-note { margin: 0; font-size: 14px; white-space: pre-wrap; }
.out .order-card .order-total { border-color: #ffffff55; }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #6271ff1c; color: var(--acc); }
.out .pill { background: #ffffff2e; color: #fff; }
.pill.s-recue, .pill.s-envoyee { background: #f59e0b22; color: #b45309; }
.pill.s-paiement, .pill.s-etiquette { background: #f59e0b33; color: #92400e; }
.pill.s-payee, .pill.s-confirmee { background: #0ea5e922; color: #0369a1; }
.pill.s-livree, .pill.s-expediee { background: #16a34a22; color: #15803d; }
.pill.s-annulee { background: #dc262622; color: #b91c1c; }
.out .pill[class*="s-"] { background: #ffffffe6; }
.tabs { display: flex; gap: .3rem; padding: .5rem .8rem; background: var(--ink-2); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border-radius: 999px; border: 0; background: none; color: var(--paper-2); font-weight: 600; white-space: nowrap; }
.tabs button.on { background: #6271ff1c; color: var(--acc); }
.item-row.off { opacity: .55; }
.item-row .row-main { background: none; border: 0; text-align: left; color: inherit; padding: 0; }
.row-actions.wrap { flex-wrap: wrap; }
.thread { display: flex; flex-direction: column; gap: .4rem; max-height: 50vh; overflow-y: auto; }
.thread .msg { max-width: 85%; }
.thread .msg.out { align-self: flex-end; }
label.check { display: flex; align-items: center; gap: .5rem; }
.start-bar { gap: .5rem; }

/* ---------- shop v2: storefront, group bar, back office ---------- */
.h0, .acc-h0 { --g1: #22e1ff; --g2: #3b5bff; }
.h1, .acc-h1 { --g1: #9d5cff; --g2: #ff4fd8; }
.h2, .acc-h2 { --g1: #00f5c4; --g2: #0091ff; }
.h3, .acc-h3 { --g1: #ff8a3d; --g2: #ff3d81; }
.h4, .acc-h4 { --g1: #6d7bff; --g2: #b04dff; }
.h5, .acc-h5 { --g1: #3dffa0; --g2: #16b2ff; }
.h6, .acc-h6 { --g1: #ff4fd8; --g2: #6d3bff; }
.h7, .acc-h7 { --g1: #ffd23d; --g2: #ff6a3d; }
:is(.store-cover, .store-logo, .gshop-pic, .dash-hero, .swatch) { background: linear-gradient(135deg, var(--g1, #6d7bff), var(--g2, #b04dff)); }
.store { --sa: var(--g2, var(--acc)); position: relative; background: var(--ink); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #6271ff33; border-top-color: var(--acc); animation: spin .8s linear infinite; margin: 0 auto .6rem; }
.spinner.small { width: 15px; height: 15px; border-width: 2px; margin: 0; border-color: #ffffff55; border-top-color: #fff; display: inline-block; }
.shop-empty.wide { grid-column: 1 / -1; }
.shop-empty svg { color: var(--dim); margin-bottom: .4rem; }

/* storefront */
.store-scroll { max-width: 64rem; padding: 0 0 7rem; }
.store-hero { position: relative; margin-bottom: .6rem; }
.store-cover { height: clamp(120px, 26vw, 220px); position: relative; overflow: hidden; }
.store-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, #0003); }
.store-id { display: grid; justify-items: center; text-align: center; gap: .35rem; padding: 0 1rem; margin-top: -44px; position: relative; }
.store-logo { width: 88px; height: 88px; border-radius: 26px; object-fit: cover; display: grid; place-items: center; color: #fff; border: 4px solid var(--ink); box-shadow: 0 12px 30px -12px #2a2f6b88; }
.store-id h2 { font-size: clamp(22px, 4vw, 30px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: .2rem; }
.store-about { color: var(--paper-2); max-width: 36rem; white-space: pre-wrap; font-size: 14px; }
.store-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: .2rem; }
.store-meta .pill { display: inline-flex; align-items: center; gap: .3rem; background: var(--ink-2); border: 1px solid var(--line); color: var(--paper-2); font-weight: 600; }
.link-pill { cursor: pointer; }
.link-pill[aria-expanded="true"] { border-color: var(--sa); color: var(--paper); }
.store-terms { display: grid; gap: .5rem; width: min(36rem, 100%); text-align: left; padding: .8rem 1rem; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); margin-top: .3rem; }
.store-terms[hidden] { display: none; }
.store-terms p { white-space: pre-wrap; font-size: 14px; }
.store-tools { position: sticky; top: 0; z-index: 3; display: grid; gap: .5rem; padding: .6rem 1rem; background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(12px); }
.store-nav { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.store-menu-btn { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .85rem .45rem .7rem; border-radius: 999px; background: var(--paper); color: #fff; font-weight: 700; font-size: 13px; border: 0; }
.store-menu-btn:hover { background: var(--sa); }
.store-tabs { flex: 1; min-width: 0; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; }
.store-tabs::-webkit-scrollbar { display: none; }
.store-tab { flex: none; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--ink-2); color: var(--paper-2); font-weight: 600; font-size: 13px; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.store-tab:hover { border-color: var(--sa); color: var(--paper); }
.store-tab.on { background: color-mix(in srgb, var(--sa) 14%, var(--ink-2)); border-color: var(--sa); color: var(--paper); }
.store-menu { display: grid; gap: .3rem; }
.store-menu .label { margin: .7rem 0 .1rem; }
.store-menu > .ghost { margin-top: .9rem; }
.menu-row { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: 14px; border: 0; background: none; color: var(--paper); font-weight: 600; text-align: left; }
.menu-row:hover { background: var(--ink-2); }
.menu-row.on { background: color-mix(in srgb, var(--sa) 12%, transparent); color: var(--paper); }
.menu-row.sub { padding-left: 2.2rem; font-weight: 500; font-size: 14px; }
.menu-row > .ico:first-child { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--ink-2); color: var(--sa); }
.menu-logo { flex: none; width: 36px; height: 36px; border-radius: 12px; object-fit: cover; font-size: 15px; }
.menu-row.sub .menu-logo { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.menu-row > .ico:last-child { color: var(--dim); }
.store-page { display: grid; gap: .9rem; padding: 1rem; max-width: 44rem; margin: 0 auto; width: 100%; animation: rise .3s both; }
.store-page-pic { width: 100%; aspect-ratio: 2; object-fit: cover; border-radius: 22px; box-shadow: 0 16px 34px -22px #2a2f6bcc; }
.store-page h2 { font-size: clamp(26px, 7vw, 36px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.store-page-text { font-size: 15.5px; line-height: 1.6; color: var(--paper-2); }
.store-page-text h3 { font-size: 17px; color: var(--paper); margin: .9em 0 .2em; }
.store-page-text li { white-space: normal; }
.store-page-text > :first-child, .store-page-text section:first-child h3 { margin-top: 0; }
.store-page > .ghost { justify-self: start; margin-top: .4rem; }
.page-ico { display: grid; place-items: center; background: var(--grad-soft); color: var(--acc); }
.page-ideas { display: flex; flex-wrap: wrap; gap: .4rem; }
.page-idea { display: inline-flex; align-items: center; gap: .25rem; padding: .35rem .75rem; border-radius: 999px; border: 1px dashed var(--line-2); background: none; color: var(--paper-2); font-weight: 600; font-size: 13px; }
.page-idea:hover { border-color: var(--acc); color: var(--acc); }
.pages-row { margin-top: .4rem; }
.store-search { display: flex; align-items: center; gap: .5rem; padding: 0 .9rem; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line-2); color: var(--dim); }
.store-search:focus-within { border-color: var(--sa); box-shadow: 0 0 0 4px #6271ff1a; }
.store-search input { flex: 1; border: 0; background: none; padding: .65rem 0; outline: none; min-width: 0; color: var(--paper); }
.chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip-f { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--ink-2); color: var(--paper-2); font-weight: 600; font-size: 13px; transition: background .15s, color .15s, border-color .15s; }
.chip-f small { font: 600 10.5px var(--mono); padding: 0 .35rem; border-radius: 999px; background: #6271ff1c; color: var(--acc); }
.chip-f.on { background: var(--paper); border-color: var(--paper); color: #fff; }
.chip-f.on small { background: #ffffff2e; color: #fff; }
/* storefront by categories */
.store-pages { display: grid; }
.store-sec { display: grid; gap: .7rem; padding: .9rem 0 .4rem; }
.store-sec .store-grid { padding-top: 0; }
.shelf-title { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; padding: 0 1rem; }
.shelf-title h2 { font-size: clamp(24px, 6vw, 32px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.see-all { flex: none; display: inline-flex; align-items: center; gap: .15rem; font-weight: 700; font-size: 14px; color: var(--sa); background: none; border: 0; padding: .2rem 0; }
.see-all:hover { text-decoration: underline; }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; padding: 0 1rem; }
@media (min-width: 720px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cat-tile { position: relative; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--ink-2); box-shadow: 0 14px 34px -22px #2a2f6baa, 0 0 0 0 var(--sa); transition: transform .2s, box-shadow .25s; animation: rise .3s both; text-align: left; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -22px #2a2f6bcc, 0 0 0 3px color-mix(in srgb, var(--sa) 35%, transparent); }
.cat-tile:active { transform: scale(.98); }
.cat-logo { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.cat-tile:hover .cat-logo { transform: scale(1.05); }
.cat-ph { display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--g1, #6d7bff), var(--g2, #b04dff)); }
.cat-logo.cat-ph { font-size: 56px; }
.cat-tile::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(180deg, transparent, rgb(18 21 43 / .78)); pointer-events: none; }
.cat-name { position: absolute; left: .85rem; right: .85rem; bottom: .75rem; z-index: 1; display: grid; gap: .1rem; color: #fff; text-shadow: 0 2px 10px #0008; }
.cat-name strong { font-size: clamp(17px, 4.6vw, 21px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-name small { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.store-row { display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 1rem; padding: .2rem 1rem 1rem; scrollbar-width: none; }
.store-row::-webkit-scrollbar { display: none; }
.store-row > .store-card { scroll-snap-align: start; }
@media (min-width: 720px) { .store-row { grid-auto-columns: 30%; } }
@media (min-width: 1000px) { .store-row { grid-auto-columns: 23%; } }
.cat-head { display: grid; gap: .8rem; padding: .9rem 1rem .2rem; }
.cat-back { justify-self: start; display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .8rem .4rem .55rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--ink-2); color: var(--paper-2); font-weight: 600; font-size: 13px; }
.cat-back:hover { border-color: var(--sa); color: var(--paper); }
.cat-hero { display: flex; align-items: center; gap: 1rem; }
.cat-hero-logo { flex: none; width: 96px; height: 96px; border-radius: 26px; object-fit: cover; box-shadow: 0 16px 34px -18px #2a2f6bcc, 0 0 0 3px color-mix(in srgb, var(--sa) 30%, transparent); }
.cat-hero-logo.cat-ph { font-size: 40px; }
.cat-hero h2 { font-size: clamp(26px, 7vw, 36px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.cat-subs { display: flex; gap: .6rem; overflow-x: auto; scrollbar-width: none; padding: .7rem 1rem .2rem; }
.cat-subs::-webkit-scrollbar { display: none; }
.cat-sub { flex: none; display: grid; justify-items: center; gap: .35rem; width: 76px; padding: 0; border: 0; background: none; color: var(--paper-2); font-weight: 600; font-size: 12.5px; line-height: 1.2; text-align: center; }
.cat-sub > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-sub-logo { width: 64px; height: 64px; border-radius: 20px; object-fit: cover; border: 2px solid var(--line); transition: border-color .15s, box-shadow .2s; }
.cat-sub-logo.cat-ph { font-size: 24px; }
.cat-sub-logo.all { display: grid; place-items: center; background: var(--ink-2); color: var(--paper-2); }
.cat-sub.on { color: var(--paper); }
.cat-sub.on .cat-sub-logo { border-color: var(--sa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sa) 25%, transparent); }
.cat-row { display: flex; align-items: center; gap: .6rem; padding: .5rem; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.cat-row.sub { margin-left: 1.6rem; }
.cat-row-logo { flex: none; width: 48px; height: 48px; border-radius: 14px; object-fit: cover; font-size: 20px; }
.row-actions.tight { gap: .4rem; justify-content: flex-end; flex-wrap: nowrap; flex: none; }
.store-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; padding: .4rem 1rem 1rem; }
@media (min-width: 720px) { .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 1000px) { .store-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.store-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); box-shadow: 0 10px 26px -20px #2a2f6b88; transition: transform .18s, box-shadow .18s; animation: rise .3s both; }
.store-card:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -20px #2a2f6baa; }
.store-card-pic { position: relative; aspect-ratio: 1; width: 100%; border: 0; padding: 0; background: var(--ink-3); display: block; overflow: hidden; }
.store-card-pic img, .store-card-pic .shop-ph { width: 100%; height: 100%; object-fit: cover; border-radius: 0; font-size: 44px; transition: transform .3s; }
.store-card:hover .store-card-pic img { transform: scale(1.04); }
.store-qty { position: absolute; top: .5rem; right: .5rem; min-width: 26px; height: 26px; padding: 0 .4rem; border-radius: 13px; background: var(--paper); color: #fff; font: 600 12px/26px var(--mono); text-align: center; }
.store-card-body { flex: 1; display: grid; gap: .15rem; padding: .65rem .75rem .7rem; align-content: start; }
.store-card-name { text-align: left; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; background: none; border: 0; padding: 0; color: inherit; }
.store-card-sub { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: .35rem; }
.store-card .price small, .price small { font-weight: 400; color: var(--dim); font-size: .8em; }
.store-plus { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--g1, #6d7bff), var(--g2, #b04dff)); box-shadow: 0 6px 16px -6px var(--sa); transition: transform .15s; }
.store-plus:hover { transform: scale(1.08); }
.store-plus:active { transform: scale(.94); }
.store-plus:disabled { background: var(--line-2); box-shadow: none; transform: none; cursor: not-allowed; }
.store-out { position: absolute; left: .5rem; bottom: .5rem; padding: .2rem .55rem; border-radius: 10px; background: #1d2033e6; color: #fff; font: 600 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.store-card.sold-out .store-card-pic img, .store-card.sold-out .store-card-pic .shop-ph { filter: grayscale(1); opacity: .55; }
.stock-line { display: flex; align-items: center; gap: .35rem; margin: 0; font-weight: 600; font-size: 14px; color: #1f8a55; }
.stock-line small { font-weight: 400; color: var(--dim); }
.stock-line.none { color: var(--danger, #c0392b); }
.stock-tag { margin-left: .4rem; padding: .05rem .4rem; border-radius: 8px; background: #1f8a5518; color: #1f8a55; font-size: 11px; font-weight: 600; white-space: nowrap; }
.stock-tag.none { background: #c0392b18; color: var(--danger, #c0392b); }
.seg button.out, .seg button:disabled { opacity: .45; border-style: dashed; cursor: not-allowed; background: var(--ink-3); box-shadow: none; }
.seg button.out span { text-decoration: line-through; }

/* floating cart */
.cart-dock { position: absolute; left: 0; right: 0; bottom: 0; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); display: flex; justify-content: center; pointer-events: none; }
.cart-fab { pointer-events: auto; width: min(30rem, 100%); display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem .7rem .7rem; border-radius: 999px; background: var(--paper); color: #fff; box-shadow: 0 18px 40px -14px #12152bcc; font-weight: 600; animation: rise .25s; }
.cart-fab.bump { animation: bump .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 40% { transform: scale(1.04) translateY(-3px); } }
.cart-ico { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--g1, #6d7bff), var(--g2, #b04dff)); }
.cart-n { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #fff; color: var(--paper); font: 700 11px/20px var(--mono); }
.cart-fab strong { font-size: 16px; }

/* drawer (bottom sheet on phones, centred card on wide screens) */
.drawer-wrap { position: fixed; inset: 0; z-index: 60; background: rgb(18 21 43 / .38); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.drawer { position: relative; width: 100%; max-height: 92vh; overflow-y: auto; background: var(--ink-2); border-radius: 26px 26px 0 0; padding: .4rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px -20px #2a2f6b88; animation: up .3s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.drawer-grip { display: block; width: 42px; height: 5px; border-radius: 3px; background: var(--line-2); margin: .3rem auto .5rem; }
.drawer > header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }
.drawer > header h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.product-drawer > header h2 { visibility: hidden; }
@media (min-width: 720px) {
  .drawer-wrap { align-items: center; padding: 1.5rem; }
  .drawer { width: min(34rem, 100%); border-radius: 26px; }
  .drawer-grip { display: none; }
  .drawer.product-drawer { width: min(52rem, 100%); }
  .drawer.item-drawer { width: min(40rem, 100%); }
}

/* product sheet */
.product { display: grid; gap: 1rem; }
.product-pic { width: 100%; aspect-ratio: 1; max-height: 46vh; object-fit: cover; border-radius: 20px; font-size: 64px; }
.product-main { display: grid; gap: .8rem; align-content: start; }
.product-main h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.product-main > .row-between .price { font-size: 18px; }
.product-main > .pill { justify-self: start; }
.product-desc { color: var(--paper-2); white-space: pre-wrap; font-size: 14px; }
@media (min-width: 720px) { .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } .product-pic { max-height: none; } }
.gallery { position: relative; min-width: 0; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 20px; background: var(--ink-3); }
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide { position: relative; flex: 0 0 100%; aspect-ratio: 1; max-height: 46vh; scroll-snap-align: center; display: grid; place-items: center; overflow: hidden; }
.gal-slide > img, .gal-slide > video, .gal-slide > .gal-ph { width: 100%; height: 100%; object-fit: cover; border-radius: 0; font-size: 64px; }
.gal-slide > video { object-fit: contain; background: #000; }
.gal-slide > .gal-th { position: absolute; inset: 0; filter: blur(6px); transform: scale(1.06); }
.gal-slide.vid > .gal-th { filter: none; transform: none; }
.gal-play { position: absolute; display: grid; place-items: center; gap: .1rem; width: 72px; height: 72px; border-radius: 50%; background: rgb(18 21 43 / .62); color: #fff; backdrop-filter: blur(4px); }
.gal-play small { font: 600 11px var(--mono); }
.gal-note { position: absolute; bottom: .8rem; padding: .3rem .7rem; border-radius: 999px; background: rgb(18 21 43 / .62); color: #fff; font: 600 12px var(--mono); }
.gal-dots { display: flex; justify-content: center; gap: .35rem; margin-top: .55rem; }
.gal-dots button { width: 7px; height: 7px; padding: 0; border-radius: 4px; background: var(--line-2); transition: width .2s, background .2s; }
.gal-dots button.on { width: 18px; background: var(--paper); }
@media (min-width: 720px) { .gal-slide { max-height: none; } }
.store-media { position: absolute; left: .5rem; bottom: .5rem; display: inline-flex; align-items: center; gap: .2rem; height: 22px; padding: 0 .45rem; border-radius: 11px; background: rgb(18 21 43 / .62); color: #fff; font: 600 11px/22px var(--mono); }
.media-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: .5rem; }
.media-tile, .media-add { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--ink-3); border: 1px solid var(--line); }
.media-tile > img { width: 100%; height: 100%; object-fit: cover; }
.media-blank { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); }
.media-kind { position: absolute; left: .3rem; bottom: .3rem; display: inline-flex; align-items: center; gap: .15rem; padding: 0 .35rem; border-radius: 8px; background: rgb(18 21 43 / .62); color: #fff; font: 600 10px/18px var(--mono); }
.media-tools { position: absolute; top: .25rem; right: .25rem; display: flex; gap: .2rem; }
.media-tools .icon-btn { width: 24px; height: 24px; border-radius: 50%; background: rgb(18 21 43 / .62); color: #fff; }
.media-progress { position: absolute; inset: auto 0 0; padding: .2rem; text-align: center; background: rgb(18 21 43 / .62); color: #fff; font: 600 11px var(--mono); }
.media-tile.busy .media-blank { animation: pulse 1.2s infinite; }
.media-add { display: grid; place-items: center; align-content: center; gap: .15rem; border-style: dashed; color: var(--paper-2); }
.media-add:hover { border-color: var(--sa); color: var(--sa); }
.opt-group { display: grid; gap: .1rem; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg button { display: inline-flex; flex-direction: column; align-items: center; min-width: 3.4rem; padding: .5rem .9rem; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--ink-2); font-weight: 600; line-height: 1.2; transition: border-color .15s, background .15s; }
.seg button small { font: 500 11px var(--mono); color: var(--dim); }
.seg button:hover { border-color: var(--sa); }
.seg button.on { border-color: var(--sa); background: color-mix(in srgb, var(--sa) 10%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sa) 18%, transparent); }
.extras { display: grid; gap: .35rem; }
.extra { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; }
.extra:has(input:checked) { border-color: var(--sa); background: color-mix(in srgb, var(--sa) 7%, white); }
.extra input { accent-color: var(--sa); }
label.extra > span { display: block; margin: 0; font: 500 14px/1.3 var(--display); text-transform: none; letter-spacing: 0; color: var(--paper); }
label.extra > span.fine { font: 600 12px var(--mono); color: var(--paper-2); }
.grow { flex: 1; min-width: 0; }
.product-foot { position: sticky; bottom: calc(-1.2rem - env(safe-area-inset-bottom)); display: flex; align-items: center; gap: .8rem; padding: .8rem 0 .2rem; background: linear-gradient(180deg, transparent, var(--ink-2) 30%); }
.store-add { flex: 1; justify-content: center; background: linear-gradient(120deg, var(--g1, #6d7bff), var(--g2, #b04dff)); }
.stepper { border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; background: var(--ink-2); }
.stepper .icon-btn { width: 32px; height: 32px; border-radius: 50%; }
.stepper .icon-btn:disabled { opacity: .35; }

/* checkout */
.checkout { display: grid; gap: 1rem; align-content: start; max-width: 36rem; padding-bottom: 2rem; }
.checkout > .link { justify-self: start; text-decoration: none; }
.checkout h2 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.steps { list-style: none; display: flex; gap: .3rem; align-items: center; }
.steps li { flex: 1; display: flex; align-items: center; gap: .4rem; font-size: 12.5px; font-weight: 600; color: var(--dim); }
.steps li + li::before { content: ''; flex: 0 0 12px; height: 2px; background: var(--line-2); border-radius: 1px; margin-right: .1rem; }
.steps li > span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--mono); border: 1.5px solid var(--line-2); background: var(--ink-2); }
.steps li.on { color: var(--paper); }
.steps li.on > span { border-color: var(--sa); background: var(--sa); color: #fff; }
.steps li.done > span { border-color: var(--sa); color: var(--sa); }
@media (max-width: 420px) { .steps li:not(.on) { font-size: 0; gap: 0; } }
.cart-lines { display: grid; gap: .6rem; }
.cart-line { display: flex; align-items: center; gap: .75rem; padding: .6rem; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.cart-line > img, .cart-line > .shop-ph { flex: none; width: 58px; height: 58px; border-radius: 12px; object-fit: cover; font-size: 22px; }
.cart-line .grow { display: grid; gap: .05rem; }
.cart-line-end { display: grid; justify-items: end; gap: .3rem; }
.checkout-foot { display: grid; gap: .6rem; padding: 1rem; border-radius: 18px; background: var(--ink-2); border: 1px solid var(--line); }
.checkout-foot .primary { justify-content: center; background: linear-gradient(120deg, var(--g1, #6d7bff), var(--g2, #b04dff)); }
.big-price { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.fine.center { text-align: center; }
.fine svg { vertical-align: -2px; }
.done-view { display: grid; justify-items: center; align-content: center; text-align: center; gap: .9rem; min-height: 70%; max-width: 30rem; }
.done-check { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--g1, #6d7bff), var(--g2, #b04dff)); box-shadow: 0 18px 40px -14px var(--sa); animation: popin .5s cubic-bezier(.3,1.6,.5,1); }
.done-check svg { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .45s .25s forwards; }
@keyframes popin { from { transform: scale(.3); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-view h2 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.done-view p { color: var(--paper-2); }
.done-sum { display: flex; gap: 1rem; align-items: center; padding: .5rem 1rem; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; }

/* order timeline */
.flow-wrap { display: grid; gap: .45rem; }
.flow-now { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .5rem; font-size: 13px; }
.flow-n { font-family: 'JBMono', monospace; font-size: 11px; color: var(--dim); }
.flow-now small { color: var(--dim); font-size: 12px; }
.out .flow-n, .out .flow-now small { color: #ffffffbb; }
.order-wait { margin: 0; }
.out .order-wait { color: #ffffffd0; }
.flow { list-style: none; display: flex; align-items: flex-start; margin: 0; padding: 0; }
.flow li { flex: 1; display: grid; justify-items: center; position: relative; }
.flow li::before { content: ''; position: absolute; top: 5px; right: 50%; width: 100%; height: 2px; background: var(--line-2); z-index: 0; }
.flow li:first-child::before { display: none; }
.flow li i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-2); border: 2px solid var(--line-2); position: relative; z-index: 1; }
.flow li.done i, .flow li.on i { background: var(--acc); border-color: var(--acc); }
.flow li.done::before, .flow li.on::before { background: var(--acc); }
.flow li.on i { box-shadow: 0 0 0 4px #6271ff33; }
.flow li.on { color: var(--paper); font-weight: 700; }
.flow.cancelled { display: flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--danger); text-decoration: line-through; font-size: 13px; }
.out .flow li { color: #ffffffaa; }
.out .flow li::before, .out .flow li i { background: #ffffff40; border-color: transparent; }
.out .flow li.done i, .out .flow li.on i, .out .flow li.done::before, .out .flow li.on::before { background: #fff; }
.out .flow li.on { color: #fff; }
.out .flow li.on i { box-shadow: 0 0 0 4px #ffffff44; }
.out .flow.cancelled { color: #fff; }
.order-card { min-width: min(17rem, 72vw); max-width: 22rem; white-space: normal; }
.order-line .q { font: 600 12px var(--mono); opacity: .75; }
.order-line .grow small { display: block; font-size: 12px; opacity: .75; }
.pay-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: 999px; background: #fff; color: var(--acc); font-weight: 700; }
.in .pay-btn { background: var(--grad); color: #fff; }
.order-card .link.small { justify-self: start; color: inherit; }

/* group bar, under the conversation header */
.gshop-bar { display: grid; gap: .45rem; padding: .45rem clamp(.6rem, 3vw, 2.4rem) .55rem; background: linear-gradient(90deg, color-mix(in srgb, var(--g1, #6d7bff) 9%, var(--ink-2)), color-mix(in srgb, var(--g2, #b04dff) 9%, var(--ink-2))); border-bottom: 1px solid var(--line); }
.gshop-bar.folded { padding-bottom: .45rem; }
.gshop-row { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.gshop-fold { flex: none; }
.gshop-strip { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding: .05rem .1rem .1rem; scroll-snap-type: x proximity; }
.gshop-strip::-webkit-scrollbar { display: none; }
.gshop-item { flex: none; max-width: 210px; display: flex; align-items: center; gap: .45rem; padding: .2rem .7rem .2rem .2rem; border-radius: 999px; background: var(--ink); border: 1px solid var(--line); text-align: left; scroll-snap-align: start; transition: border-color .15s; }
.gshop-item:hover { border-color: var(--g2, var(--acc)); }
.gshop-item img, .gshop-item .shop-ph { flex: none; width: 30px; height: 30px; object-fit: cover; border-radius: 50%; font-size: 13px; display: grid; place-items: center; }
.gshop-item-name { min-width: 0; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gshop-item .price { flex: none; font-size: 12px; color: var(--dim); }
.gshop-page { flex: none; max-width: 180px; display: flex; align-items: center; gap: .35rem; padding: .2rem .75rem; min-height: 36px; border-radius: 999px; border: 1px dashed var(--line-2); background: none; color: var(--paper-2); font-size: 12.5px; font-weight: 600; }
.gshop-page:hover { border-color: var(--g2, var(--acc)); color: var(--paper); }
.gshop-page span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gshop-bar:empty { display: none; }
.gshop-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .7rem; padding: .25rem .4rem .25rem .25rem; border-radius: 14px; text-align: left; transition: background .15s; }
.gshop-main:hover { background: #6271ff0d; }
.gshop-pic { flex: none; width: 38px; height: 38px; border-radius: 12px; object-fit: cover; display: grid; place-items: center; color: #fff; }
.gshop-text { flex: 1; min-width: 0; display: grid; }
.gshop-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gshop-text span { font-size: 12px; color: var(--dim); }
.gshop-open { flex: none; display: inline-flex; align-items: center; gap: .15rem; padding: .35rem .75rem; border-radius: 999px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 600; }
.gshop-admin { flex: none; display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--paper-2); }
.gshop-admin:hover { border-color: var(--acc); color: var(--acc); }
.gshop-admin .badge { min-width: 18px; height: 18px; line-height: 18px; font-size: 10px; }
@media (max-width: 420px) { .gshop-open { padding: .35rem .55rem; font-size: 0; } .gshop-open svg { margin: 0; } }

/* back office */
.admin .tabs { justify-content: safe center; }
.admin .tabs .badge { min-width: 18px; height: 18px; line-height: 18px; font-size: 10px; }
@media (max-width: 520px) { .admin .tabs button:not(.on) span:not(.badge, .ico) { display: none; } }
.admin .shop-scroll { display: grid; gap: 1rem; align-content: start; }
.dash-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 1.4rem 1.2rem; color: #fff; min-height: 110px; display: flex; align-items: flex-end; isolation: isolate; }
.dash-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; filter: brightness(.6); }
.dash-hero h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.dash-hero p { opacity: .85; font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.tile { display: grid; gap: .1rem; align-content: start; text-align: left; padding: .9rem; border-radius: 18px; background: var(--ink-2); border: 1px solid var(--line); }
.tile strong { font-size: clamp(18px, 4vw, 26px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
.tile span { font-size: 12px; color: var(--dim); }
button.tile:hover { border-color: var(--acc); }
.tile.hot { background: var(--grad); border-color: transparent; color: #fff; }
.tile.hot span { color: #ffffffcc; }
@media (max-width: 460px) { .tiles { grid-template-columns: 1fr 1fr; } .tiles > :last-child { grid-column: 1 / -1; } }
.callout { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border-radius: 18px; background: var(--grad-soft); border: 1px solid #6271ff33; text-align: left; width: 100%; }
.callout > svg { color: var(--acc); flex: none; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.section-head .label { margin: 0; }
.order-rows { display: grid; gap: .45rem; }
.order-row { width: 100%; display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); text-align: left; }
.order-row:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.order-row.s-recue, .order-row.s-etiquette { border-left: 3px solid #f59e0b; }
.order-row .row-sub .pill { flex: none; }
.stack.tight-gap { gap: .55rem; }
.wide { width: 100%; justify-content: center; }
.order-drawer .flow { margin: .2rem 0; }
.order-drawer .order-lines { padding: .7rem .8rem; border-radius: 14px; background: var(--ink-3); }
.item-group { display: grid; gap: .45rem; }
.item-group h3 { margin: .3rem 0 0; }
.item-row { display: flex; align-items: center; gap: .6rem; padding: .5rem; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.item-pic { flex: none; width: 54px; height: 54px; border-radius: 12px; object-fit: cover; font-size: 20px; }
.item-main { flex: 1; min-width: 0; display: grid; gap: .1rem; text-align: left; }
.item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-main .fine { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-main .price { color: var(--paper); font-weight: 600; }
.item-move { display: grid; }
.icon-btn.restock { position: relative; color: #1f8a55; }
.icon-btn.restock .ico + .ico { position: absolute; right: 4px; top: 4px; line-height: 0; }
.icon-btn.restock .ico + .ico svg { stroke-width: 3; }
.item-move .icon-btn { width: 30px; height: 22px; border-radius: 8px; }
.item-move .icon-btn:disabled { opacity: .25; }
.icon-btn.muted { color: var(--dim); opacity: .7; }

/* product editor */
.item-form { gap: 1rem; }
.item-top { display: flex; gap: .9rem; align-items: flex-start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.photo-pick { display: grid; justify-items: center; gap: .25rem; }
.photo-pick.square .pic-pick { width: 108px; height: 108px; border-radius: 20px; }
.photo-pick.cover { justify-items: stretch; }
.photo-pick.cover .pic-pick { width: 100%; height: auto; aspect-ratio: 960 / 360; border-radius: 18px; }
.photo-pick.cover > .link { justify-self: start; }
.pic-face, .pic-face img { width: 100%; height: 100%; display: grid; place-items: center; object-fit: cover; }
.pic-empty { display: grid; justify-items: center; gap: .2rem; }
.pic-empty small { font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.builder { border: 1px solid var(--line); border-radius: 18px; padding: .6rem .9rem 1rem; display: grid; gap: .6rem; }
.builder legend { padding: 0 .4rem; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--paper-2); }
.builder .ghost.small { justify-self: start; }
.opt-edit { display: grid; gap: .4rem; padding: .7rem; border-radius: 14px; background: var(--ink-3); }
.opt-edit-head { display: flex; align-items: center; gap: .3rem; }
.opt-edit-head input { flex: 1; font-weight: 600; }
.choice-edit { display: flex; align-items: center; gap: .4rem; }
.choice-edit input:first-child { flex: 1; min-width: 0; }
.choice-edit input.delta { width: 5.5rem; flex: none; font-family: var(--mono); text-align: right; }
.choice-edit input.delta.qty { width: 4.5rem; }
.choice-head { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--dim); margin-bottom: -.2rem; }
.choice-head .grow { flex: 1; padding-left: .3rem; }
.choice-head .delta { width: 5.5rem; flex: none; text-align: right; padding-right: .3rem; }
.choice-head .delta.qty { width: 4.5rem; }
.choice-head .icon-pad { width: 34px; flex: none; }
.opt-edit .link.small { justify-self: start; text-decoration: none; }
.icon-btn.danger { color: var(--danger); }
.item-preview { display: flex; align-items: center; gap: 1rem; padding: .8rem; border-radius: 18px; background: var(--grad-soft); }
.store-card.mini { width: 140px; flex: none; animation: none; }
.store-card.mini .store-card-pic .shop-ph { font-size: 32px; }
.sticky-actions { position: sticky; bottom: calc(-1.2rem - env(safe-area-inset-bottom)); padding: .7rem 0 .2rem; background: linear-gradient(180deg, transparent, var(--ink-2) 30%); justify-content: flex-start; }
@media (max-width: 460px) { .item-top { flex-direction: column; align-items: stretch; } .item-top .photo-pick { justify-items: start; } }

/* settings */
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.swatch { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 3px solid var(--ink-2); box-shadow: 0 0 0 1px var(--line-2); }
.swatch.on { box-shadow: 0 0 0 2px var(--paper); }
.danger-zone { display: grid; gap: .5rem; padding: 1rem; border-radius: 18px; border: 1px solid var(--line); background: var(--ink-2); }
.sec-row { display: flex; align-items: center; gap: .8rem; }
.sec-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #6271ff14; color: var(--acc); }
@media (max-width: 460px) { .sec-row { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .store-card, .cart-fab, .done-check, .drawer { animation: none; } .done-check svg { stroke-dashoffset: 0; animation: none; } }
.out .order-head .fine { color: #ffffffc0; }
.order-head .mono { margin-left: auto; }
:is(.store-add, .checkout-foot .primary, .gshop-open, .cart-ico, .done-check, .dash-hero, .tile.hot) { text-shadow: 0 1px 3px #0004; }

/* ---- shop payment: crypto addresses, Transcash ---- */
input[hidden] { display: none; }
.pay-set { display: grid; gap: .8rem; margin: 0; padding: .8rem; border: 1px solid var(--line-2); border-radius: 16px; min-width: 0; }
.pay-set legend { padding: 0 .4rem; font-family: var(--display); font-weight: 600; font-size: 14px; }
.crypto-list { display: grid; gap: .4rem; margin: .3rem 0 .5rem; }
.crypto-list:empty { display: none; }
.crypto-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 12px; background: var(--ink-3); }
.crypto-row > .ico { color: var(--acc); }
.crypto-row .grow { display: grid; min-width: 0; }
.crypto-add { display: flex; gap: .5rem; align-items: center; }
.crypto-add > * { flex: 1; min-width: 0; }
.crypto-add > button { flex: none; }
code.addr { display: block; font-family: var(--mono); font-size: 12px; word-break: break-all; line-height: 1.35; }
.addr-box { display: grid; gap: .5rem; margin-top: .5rem; padding: .7rem; border: 1px solid var(--line-2); border-radius: 12px; background: var(--ink-2); }
.addr-box .addr { user-select: all; }
.addr-qr { justify-self: center; padding: .4rem; border-radius: 10px; background: #fff; line-height: 0; }
.pm-pick { display: grid; gap: .45rem; margin-top: .3rem; }
.pm-opt { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; text-align: left; border: 1px solid var(--line-2); border-radius: 14px; background: var(--ink-2); color: inherit; }
.pm-opt > .ico { color: var(--acc); }
.pm-opt .grow { display: grid; min-width: 0; }
.pm-opt small { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-opt .pm-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); }
.pm-opt.on { border-color: var(--acc); background: linear-gradient(120deg, #6271ff14, #8b5cf618); }
.pm-opt.on .pm-dot { border: 5px solid var(--acc); }
.tc-field textarea { text-transform: uppercase; letter-spacing: .08em; }
.tc-code { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .35rem; }
.tc-code code { font-family: var(--mono); font-size: 15px; letter-spacing: .06em; }
.shop-info .warn { color: #c2410c; font-size: 12px; }
.order-pm { margin-top: .5rem; }
.order-pm summary { cursor: pointer; color: var(--acc); font-weight: 600; font-size: 13px; }
.erase-all { justify-self: center; display: inline-flex; align-items: center; gap: .3rem; margin: .8rem auto 0; color: var(--danger); text-decoration-color: currentColor; }
.order-label { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; font-size: 13px; }
.order-label .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Premium: bitcoin unlock of shops */
.premium ul { margin: 0; padding-left: 1.2em; }
.premium-field { display: grid; grid-template-columns: auto 1fr auto; gap: .5em; align-items: center; }
.premium-field code { overflow-wrap: anywhere; user-select: all; }
.premium-field .addr { font-size: .85em; }
.premium-status { font-weight: 600; }
.premium-ok { display: flex; align-items: center; gap: .5em; font-size: 1.15em; color: var(--ok); }
.sales { display: grid; gap: .6em; max-height: 50vh; overflow-y: auto; }
.sale { display: grid; gap: .2em; padding: .6em .7em; border: 1px solid var(--line); border-radius: 12px; }
.sale .addr { font-size: .8em; overflow-wrap: anywhere; }

/* Archive: swipe a conversation sideways */
.swipe { position: relative; border-radius: 16px; overflow: hidden; }
.swipe + .swipe, .swipe + .archive-row { margin-top: 2px; }
.swipe > .row { touch-action: pan-y; }
.swipe.swiping > .row { background: var(--ink); }
.swipe-act { position: absolute; inset: 0; display: none; align-items: center; gap: .4rem; padding: 0 1.1rem; font-size: 13px; font-weight: 600; color: #fff; background: var(--paper-2); transition: background .15s; }
.swipe-act.left { justify-content: flex-start; }
.swipe-act.right { justify-content: flex-end; }
.swipe.swiping:not(.to-left) > .swipe-act.left, .swipe.swiping.to-left > .swipe-act.right { display: flex; }
.swipe.ready > .swipe-act { background: var(--acc); }
.archive-ico { background: var(--ink-3); color: var(--paper-2); display: grid; place-items: center; }
.archive-row .row-name { font-weight: 500; color: var(--paper-2); }
.archive-head { gap: .6rem; }
.archive-head .fine { margin-left: auto; }
.badge.muted { background: var(--paper-2); box-shadow: none; }
.toast-undo { display: inline-flex; align-items: center; gap: .8rem; }
.toast-undo .link { color: var(--acc); font-weight: 700; }
.fine.block { display: block; margin-top: .2rem; }

/* Owner's head count */
.owner-slot:empty { display: none; }
.stat-big { display: grid; justify-items: center; gap: .1rem; padding: 1rem; border-radius: 18px; background: var(--grad); color: #fff; }
.stat-big strong { font-size: 40px; font-weight: 800; line-height: 1.1; }
.stat-big span { font-size: 13px; opacity: .9; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.stat-tile { display: grid; gap: .1rem; padding: .7rem .8rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.sugg { display: grid; gap: .35rem; padding: .7rem .8rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.sugg-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.sugg .fine { margin: 0; }
.stat-tile strong { font-size: 20px; }
.stat-tile span { font-size: 12px; color: var(--dim); }

/* ---------- invitation card (short group link) ---------- */
.invite-card { display: grid; justify-items: center; gap: .45rem; text-align: center; padding: 1.4rem 1rem 1.1rem; border-radius: var(--r-lg); background: radial-gradient(120% 90% at 50% 0%, #6271ff1f, transparent 70%); }
.invite-card .avatar.big { width: 112px; height: 112px; border-radius: 50%; margin-bottom: .5rem; }
.invite-card .avatar.group.big::before { border-radius: 50%; }
.invite-card h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.invite-meta { color: var(--paper-2); font-size: 14px; }
.invite-about { font-size: 14px; line-height: 1.45; max-width: 34ch; white-space: pre-line; overflow-wrap: anywhere; }
.invite-you { color: var(--paper-2); font-size: 13px; margin-top: .3rem; }
.primary.wide { width: 100%; justify-content: center; }
.invite-banner { display: flex; align-items: center; gap: .6rem; max-width: 440px; padding: .75rem 1rem; border-radius: 14px; background: #6271ff1a; border: 1px solid #6271ff44; color: var(--paper); font-size: 14px; line-height: 1.4; }
.invite-banner > svg { flex: none; color: var(--acc); }
