:root {
  --bg: #eef2f8; --bg-top: #dfe7fb;
  --card: #ffffff; --text: #111827; --muted: #667085; --faint: #98a2b3; --line: #e6e9f0; --soft: #f3f5fa;
  --accent: #3563f0; --accent-ink: #ffffff; --accent-soft: #eaf0ff; --ok: #12a150; --danger: #d92d20; --warn: #b54708;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117; --bg-top: #16203a;
    --card: #161b26; --text: #eef1f6; --muted: #9ba4b5; --faint: #6b7385; --line: #262d3b; --soft: #1d2331;
    --accent: #7092ff; --accent-ink: #0b1020; --accent-soft: #1e2a4d; --ok: #3ccf7f; --danger: #ff6b5e; --warn: #f0b451;
    --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: linear-gradient(180deg, var(--bg-top) 0, var(--bg) 320px) no-repeat, var(--bg);
  color: var(--text); min-height: 100vh; min-height: 100dvh;
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  letter-spacing: -.005em;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--accent); }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 56px; }
.top { display: flex; align-items: center; gap: 10px; padding: 18px 2px 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 2px 8px rgba(53,99,240,.3); }
.me {
  margin-left: auto; color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 45vw; border: 1px solid var(--line); background: var(--card); cursor: pointer; padding: 6px 12px; border-radius: 999px;
}
.me:hover { border-color: var(--accent); }
.icon-btn { border: 0; background: transparent; width: 40px; height: 40px; border-radius: 12px; display: inline-grid; vertical-align: middle; place-items: center; cursor: pointer; color: var(--text); }
.icon-btn:hover { background: var(--soft); }
.icon-btn svg { width: 22px; height: 22px; }
.top .icon-btn { background: var(--card); border: 1px solid var(--line); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 18px; }
#app > .card + .card, #app > .card + section { margin-top: 14px; }
.stack > * + * { margin-top: 12px; }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.card-head .ico svg { width: 20px; height: 20px; }
.card-head h2 { margin: 0; font-size: 17px; font-weight: 750; color: var(--text); letter-spacing: -.01em; }
.card-head p { margin: 0; font-size: 13px; color: var(--muted); }
.card-head .grow { flex: 1; min-width: 0; }

.field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 6px 2px; }
.target-row select { width: 100%; font-weight: 600; }
.lock-note { font-size: 12.5px; color: var(--warn); margin: 6px 2px 0; }

.drop {
  display: grid; place-items: center; text-align: center; border: 1.5px dashed #c9d3ea; border-radius: var(--radius-sm);
  padding: 30px 12px; cursor: pointer; transition: border-color .15s, background .15s; background: linear-gradient(180deg, var(--accent-soft), var(--soft));
}
@media (prefers-color-scheme: dark) { .drop { border-color: #34405a; } }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.disabled { opacity: .55; pointer-events: none; }
.drop svg { width: 34px; height: 34px; color: var(--accent); }
.drop b { display: block; font-size: 16px; margin-top: 6px; }
.drop span { color: var(--muted); font-size: 13px; }

.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row .grow { flex: 1; }
.btn {
  border: 0; border-radius: 12px; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 650;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; min-height: 42px;
  transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--soft); color: var(--text); font-weight: 550; border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); font-weight: 550; }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
select, input[type=text], input[type=password], input[type=number], input[type=url], textarea {
  border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 9px 12px; min-height: 44px; width: 100%;
}
select { width: auto; padding-right: 30px; }
select:disabled { opacity: .6; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label.field { display: block; }
label.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* upload queue */
.q { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.q:first-child { border-top: 0; }
.q .info { flex: 1; min-width: 0; }
.q .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 550; }
.bar { height: 6px; background: var(--soft); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.q.done .bar > i { background: var(--ok); }
.q.err .bar > i { background: var(--danger); }
.q .meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* receive panel */
.receive { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; background: var(--soft); border-radius: var(--radius-sm); padding: 14px; }
.receive .qr { margin: 0; }
.receive .qr img { width: 132px; height: 132px; }
.receive .url { font-size: 13px; word-break: break-all; color: var(--text); font-weight: 550; }
.receive .exp { font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; }
@media (max-width: 440px) { .receive { grid-template-columns: 1fr; justify-items: center; text-align: center; } .receive .row { justify-content: center; } }

/* inbox */
h2 { font-size: 15px; margin: 28px 4px 10px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 26px 4px 10px; }
.section-title h2 { margin: 0; font-size: 17px; color: var(--text); font-weight: 750; }
.section-title .count { font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.section-title .grow { flex: 1; }
.section-title .sel-toggle { min-height: 30px; padding: 4px 14px; }
.section-title .list-more { width: 34px; height: 34px; }
.selbar { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px 10px 8px 14px; margin: 0 0 10px; }
.selbar[hidden] { display: none; }
.sel-all { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.selbar-acts { display: flex; gap: 6px; flex-wrap: wrap; }
input.sel, .sel-all input { width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; flex: 0 0 auto; accent-color: var(--accent); cursor: pointer; }
.list.selecting .item { cursor: pointer; }
.list.selecting .item .acts { display: none; }
.list.selecting .item.picked { background: var(--accent-soft); }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%,40% { background: var(--accent-soft); } 100% { background: transparent; } }
.thumb { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 22px; height: 22px; }
.item .info { flex: 1; min-width: 0; }
.item .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.item .textbody { font-size: 14px; white-space: pre-wrap; word-break: break-word; max-height: 4.6em; overflow: hidden; }
.item .textbody.open { max-height: none; }
.item .acts { display: flex; gap: 2px; flex: 0 0 auto; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); margin-left: 6px; vertical-align: 1px; }
.tag.acc { background: var(--accent-soft); color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 32px 12px; }

/* dialogs */
dialog {
  border: 0; border-radius: 20px; padding: 0; background: var(--card); color: var(--text); width: min(440px, calc(100vw - 24px));
  box-shadow: 0 24px 64px rgba(0,0,0,.25); max-height: calc(100dvh - 32px);
}
dialog::backdrop { background: rgba(10,14,28,.45); backdrop-filter: blur(2px); }
.dlg { padding: 22px; }
.dlg h3 { margin: 0 0 14px; font-size: 18px; font-weight: 750; }
.dlg .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.menu-list { list-style: none; margin: 0; padding: 8px; }
.menu-list button { width: 100%; text-align: left; border: 0; background: transparent; padding: 12px 14px; border-radius: 12px; cursor: pointer; display: flex; gap: 12px; align-items: center; }
.menu-list button:hover { background: var(--soft); }
.menu-list svg { width: 20px; height: 20px; color: var(--muted); }
.menu-list .sep { height: 1px; background: var(--line); margin: 6px 8px; }
.menu-list .ver { font-size: 12px; color: var(--faint); padding: 8px 14px 4px; }
.result { background: var(--soft); border-radius: 14px; padding: 16px; text-align: center; }
.result .pin { font-size: 30px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.result .url { font-size: 13px; word-break: break-all; color: var(--muted); margin-top: 4px; }
.qr { display: grid; place-items: center; margin: 10px 0 0; }
.qr img { width: 168px; height: 168px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 12px; }

.group-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--card); }
.group-card .meta { font-size: 12.5px; color: var(--muted); }
.member-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.member-list li { font-size: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--muted); }
.member-list li.self { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.dlg section + section { margin-top: 20px; }
.dlg h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 700; }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: #1d2433; color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14px; opacity: 0; transition: .2s; pointer-events: none;
  max-width: calc(100vw - 32px); z-index: 10; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--danger); color: #fff; }
#toast.act { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px; }
#toast button { border: 0; background: rgba(255,255,255,.16); color: #fff; font-weight: 700; border-radius: 10px; padding: 8px 12px; cursor: pointer; }

.center-card { max-width: 420px; margin: 8vh auto 0; }
.center-card h1 { font-size: 22px; margin: 0 0 4px; font-weight: 800; }
.banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); margin-bottom: 12px; font-size: 14px; border: 1px solid transparent; }
.banner .grow { flex: 1; }
.pin-input { font-size: 24px !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp 0.8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  .card { padding: 16px; }
  .item { padding: 12px 13px; gap: 10px; }
  .thumb { width: 40px; height: 40px; }
}

.folder-kids .item { padding-left: 36px; background: var(--soft); }
.folder-kids .item .thumb { width: 34px; height: 34px; }
.folder { border-top: 1px solid var(--line); }
.folder:first-child { border-top: 0; }
.list > .folder > .item:first-child { border-top: 0; }

/* public PIN page */
.pin-intro { background: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; color: var(--muted); word-break: break-all; }
.pin-intro b { color: var(--text); }
.pin-wrap { position: relative; display: block; }
.pin-boxes { display: flex; gap: 8px; justify-content: center; }
.pin-box { flex: 1 1 0; max-width: 52px; height: 60px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.pin-box.cur { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pin-hidden { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; font-size: 16px; color: transparent; caret-color: transparent; border: 0 !important; background: transparent !important; min-height: 0 !important; }
.pin-boxes.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* public upload page */
.to-line { display: flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; }
.to-line .to-ico { display: inline-flex; width: 20px; color: var(--accent); }
.to-line b { font-weight: 700; }
.sent-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.q.sent .sent-ok { width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.q.sent .sent-ok svg { width: 16px; height: 16px; }

/* ---------- 1.6.0 ---------- */
/* tabs (phones only) */
.tabs-seg { display: none; }
#app.tabbed .tabs-seg { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin: 0 0 14px; box-shadow: var(--shadow); position: sticky; top: calc(6px + env(safe-area-inset-top)); z-index: 6; }
.tabs-seg button { flex: 1; border: 0; background: transparent; padding: 10px 6px; border-radius: 10px; font-weight: 700; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tabs-seg button.on { background: var(--accent); color: var(--accent-ink); }
.tabs-seg .n { background: var(--danger); color: #fff; border-radius: 999px; font-size: 11.5px; min-width: 20px; padding: 0 6px; line-height: 20px; }
.tabs-seg button.on .n { background: var(--accent-ink); color: var(--accent); }
#app.tabbed[data-tab="inbox"] #sendCard, #app.tabbed[data-tab="inbox"] #recvCard { display: none; }
#app.tabbed[data-tab="send"] .section-title, #app.tabbed[data-tab="send"] #selBar, #app.tabbed[data-tab="send"] #list { display: none !important; }
#app.tabbed[data-tab="send"] #recvCard { margin-top: 14px; }
#app.tabbed[data-tab="inbox"] .section-title { margin-top: 4px; }
.fab { display: none; }
#app.tabbed[data-tab="inbox"]:not(.selecting-mode) .fab { display: inline-flex; position: fixed; right: calc(18px + env(safe-area-inset-right)); bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 8; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 14px 20px 14px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 750; font-size: 16px; box-shadow: 0 10px 26px rgba(53,99,240,.38); cursor: pointer; }
.fab svg { width: 22px; height: 22px; }
#app.tabbed[data-tab="inbox"] #list { margin-bottom: 76px; }
#app.tabbed[data-tab="inbox"] .selbar { top: calc(64px + env(safe-area-inset-top)); }

/* inbox rows */
.day { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 9px 16px 6px; background: var(--soft); border-top: 1px solid var(--line); letter-spacing: .02em; }
.list > .day:first-child { border-top: 0; }
.list > .day + .item, .list > .day + .folder, .list > .day + .folder > .item:first-child { border-top: 0; }
.item .name { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.nm { display: inline-flex; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.nm-head { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nm-tail { white-space: nowrap; flex: 0 0 auto; }
.item .name .tag { margin-left: 0; flex: 0 0 auto; }
.caret { color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.item .meta { white-space: normal; }
.item .meta .m1, .item .meta .m2 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta .m1 { display: flex; gap: 6px; align-items: center; }
.item .meta .m1 .tag { margin-left: 0; }
.item .meta .m2 { color: var(--faint); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; flex: 0 0 auto; margin-right: 2px; vertical-align: 2px; }
.tag.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.tag.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.tag.once { background: var(--accent-soft); color: var(--accent); }
.item .textbody { max-height: 4.65em; }
.item .textbody a { color: var(--accent); word-break: break-all; }
.more-btn { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 13px; padding: 2px 0; cursor: pointer; }
.thumb.tap { cursor: zoom-in; }
.thumb { position: relative; }
.thumb.vid::after, .sheet-prev.vid::after { content: ''; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center/16px no-repeat; }
.sheet-prev.vid::after { width: 54px; height: 54px; background-size: 32px; }
.empty { display: grid; justify-items: center; gap: 4px; }
.empty-ico { width: 44px; height: 44px; color: var(--faint); margin-bottom: 4px; }
.empty-ico svg { width: 44px; height: 44px; }
.empty span { font-size: 13.5px; }
@media (pointer: coarse) { .list .item { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }

/* bottom sheet */
@media (max-width: 760px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; max-height: 88dvh; padding-bottom: env(safe-area-inset-bottom); animation: up .22s ease; }
  dialog.sheet .dlg::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: -8px auto 14px; }
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet-prev { position: relative; display: grid; place-items: center; width: 100%; height: 190px; border: 0; padding: 0; border-radius: 14px; background: var(--soft); overflow: hidden; margin-bottom: 12px; cursor: zoom-in; }
.sheet-prev img { width: 100%; height: 100%; object-fit: contain; }
.sheet-prev.plain { height: 96px; cursor: default; }
.big-ico { width: 46px; height: 46px; color: var(--muted); display: inline-flex; }
.big-ico svg { width: 46px; height: 46px; }
.sheet-text { background: var(--soft); border-radius: 14px; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; max-height: 34dvh; overflow: auto; margin-bottom: 12px; font-size: 14.5px; }
.sheet-text a { color: var(--accent); word-break: break-all; }
.sheet-title { word-break: break-all; margin-bottom: 12px !important; }
.acts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.act { display: grid; justify-items: center; gap: 4px; border: 0; background: var(--soft); border-radius: 14px; padding: 12px 4px 10px; font-size: 13px; font-weight: 650; color: var(--text); cursor: pointer; }
.act span { display: inline-flex; width: 22px; height: 22px; }
.act svg { width: 22px; height: 22px; }
.act:hover { background: var(--accent-soft); }
.act.danger { color: var(--danger); }
.link-btn { display: block; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 14px; padding: 6px 0 10px; cursor: pointer; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 4px 0 0; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 600; white-space: nowrap; }
.kv dd { margin: 0; word-break: break-all; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.menu-list button.danger, .menu-list button.danger svg { color: var(--danger); }
.btn.danger-fill { background: var(--danger); color: #fff; }

/* send confirmation */
.pick-sum { display: grid; gap: 2px; margin-bottom: 12px; }
.pick-sum span { color: var(--muted); font-size: 13.5px; }
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.pick { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--soft); display: grid; place-items: center; max-width: 100%; }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.pick.more { font-weight: 700; color: var(--muted); }
.pick-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.pick-list li { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.pick-list .nm { flex: 1 1 auto; }
.pl-ico { width: 20px; height: 20px; color: var(--muted); flex: 0 0 auto; display: inline-flex; }
.pl-ico svg { width: 20px; height: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips .tag { margin-left: 0; font-size: 12.5px; }
.dup-box { display: grid; gap: 2px; background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 8px; }
.dup-box b { color: var(--warn); }
.dup-box.err b { color: var(--danger); }

/* upload rows */
.q.warn .bar > i { background: var(--warn); }
.q.warn .meta { color: var(--warn); }
.q.paused .bar > i { background: var(--faint); }

/* viewer */
body.noscroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 50; background: #0b0d12; color: #fff; display: grid; grid-template-rows: auto 1fr; }
.vw-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) 8px calc(14px + env(safe-area-inset-left)); background: linear-gradient(#0b0d12, rgba(11,13,18,.6)); }
.vw-top .icon-btn { color: #fff; }
.vw-top .icon-btn:hover { background: rgba(255,255,255,.1); }
.vw-count { font-variant-numeric: tabular-nums; font-size: 13px; color: #aab; flex: 0 0 auto; }
.vw-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.vw-stage { display: grid; place-items: center; overflow: hidden; touch-action: pan-y pinch-zoom; padding-bottom: env(safe-area-inset-bottom); }
.vw-stage img, .vw-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.vw-cant { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 20px; }
.vw-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.vw-nav svg { width: 26px; height: 26px; }
.vw-nav.prev { left: calc(10px + env(safe-area-inset-left)); }
.vw-nav.next { right: calc(10px + env(safe-area-inset-right)); }
@media (pointer: coarse) { .vw-nav { display: none; } }

/* offline */
#offline .center-card { text-align: left; }
.off-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); color: var(--warn); display: grid; place-items: center; }
.off-ico svg { width: 24px; height: 24px; }
.off-list { margin: 0; padding-left: 20px; color: var(--text); display: grid; gap: 4px; font-size: 14px; }
.pick-list .small { white-space: nowrap; }
.textbody .dot { margin-right: 6px; }
.me:empty { display: none; }
