@font-face { font-family: Inter; src: url(/fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Simpler; src: url(/fonts/simpler-400.otf) format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Simpler; src: url(/fonts/simpler-600.otf) format("opentype"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: Simpler; src: url(/fonts/simpler-700.otf) format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #F6F4F4;
  --card: #FFFFFF;
  --ink: #000000;
  --ink2: #1F1F1F;
  --mut: #999999;
  --mut2: #6B6B6B;
  --line: #E6E3E3;
  --field: #F3F1F1;
  --danger: #E50000;
  --r: 2px;
  --pad: 24px;
  --nav: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: Inter, Simpler, -apple-system, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 14px/1.35 var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
img { display: block; }
a { color: inherit; }
[dir="auto"] { unicode-bidi: plaintext; }
.he { font-family: Simpler, Inter, sans-serif; }

#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; position: relative; }

/* ---------- splash / onboarding ---------- */
.splash { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; position: relative; }
.splash-name { font-size: 28px; font-weight: 400; letter-spacing: -0.02em; }
.splash-tag { color: var(--mut2); font-size: 14px; margin-top: -4px; }
.splash-foot { position: absolute; bottom: calc(28px + var(--safe-b)); color: var(--mut); font-size: 11px; }
.two-dots { display: flex; gap: 5px; }
.two-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }

/* ---------- screen chrome ---------- */
.screen { padding: calc(var(--safe-t) + 18px) var(--pad) calc(var(--nav) + max(var(--safe-b), 16px) + 28px); min-height: 100dvh; }
.screen.no-nav { padding-bottom: calc(var(--safe-b) + 28px); }
.title-row { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 12px; }
h1 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; margin: 0; line-height: 1.2; }
h2 { font-size: 14px; font-weight: 500; margin: 0; }
.sub { color: var(--mut); font-size: 12px; margin-top: 2px; }
.back-row { display: flex; align-items: center; justify-content: space-between; height: 44px; margin-bottom: 8px; }
.back { display: flex; align-items: center; gap: 10px; color: var(--mut); font-size: 12px; height: 44px; padding-right: 12px; }
.back svg { color: var(--ink); }
.dots-btn { width: 44px; height: 44px; display: grid; place-items: center; margin-right: -12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 32px 0 12px; }
.section-head .link { color: var(--mut); font-size: 12px; }
.muted { color: var(--mut); }
.small { font-size: 12px; }

/* ---------- boxes ---------- */
.box { background: var(--card); border-radius: var(--r); }
.rows > * + * { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; width: 100%; }
.row .grow { flex: 1; min-width: 0; }
.row .chev { color: var(--mut); font-size: 16px; }
.inset > * + * { border-top: 0; position: relative; }
.inset > * + *::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; border-top: 1px solid var(--line); }
.dashed { border: 1px dashed #CFCBCB; border-radius: var(--r); }

/* ---------- small atoms ---------- */
.pdot { width: 8px; height: 8px; border-radius: 1px; display: inline-block; flex: none; }
.plabel { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.plabels { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.avatar { border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-family: Simpler, Inter, sans-serif; font-weight: 600; flex: none; overflow: hidden; background-size: cover; background-position: center; }
.avatar.faded { opacity: .28; }
.meta { color: var(--mut); font-size: 11px; margin-top: 6px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.meta b { color: var(--ink); font-weight: 600; }
.tag-new { background: #fff; color: #000; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: var(--r); }

.btn { height: 46px; border-radius: var(--r); background: #000; color: #fff; font-size: 15px; font-weight: 500; width: 100%; display: grid; place-items: center; }
.btn.small { height: 36px; width: auto; padding: 0 16px; font-size: 14px; }
.btn.danger { background: var(--danger); }
.btn.ghost { background: none; color: #000; }
.btn:disabled { opacity: .35; }
.textbtn { color: var(--mut2); font-size: 14px; padding: 8px 4px; }

.chip { height: 30px; border-radius: 15px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--mut); border: 1px solid #DCD8D8; background: transparent; white-space: nowrap; }
.chip.on { color: #000; border-color: #000; background: #fff; font-weight: 500; }
.chip.fill.on { border-color: #fff; }
.chip.add { border-style: dashed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { height: 24px; border-radius: 12px; padding: 0 10px; font-size: 11px; background: #fff; display: inline-flex; align-items: center; }
.pill.on { background: #000; color: #fff; }

.field { width: 100%; border: 0; background: var(--field); border-radius: var(--r); padding: 12px 14px; font-size: 15px; outline: none; }
.field.white { background: #fff; }
textarea.field { resize: none; min-height: 88px; }
.label { color: var(--mut); font-size: 12px; margin: 18px 0 8px; }

.circle { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #B9B5B5; flex: none; display: grid; place-items: center; }
.circle.done { background: #000; border-color: #000; }

/* ---------- bottom nav ---------- */
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: #fff; border-top: 1px solid #E6E6E6; padding: 12px 0 max(var(--safe-b), 16px); }
.nav-in { max-width: 520px; margin: 0 auto; display: flex; justify-content: space-between; padding: 0 24px; height: 40px; }
.nav button { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; color: #999999; font-size: 10px; line-height: 12px; min-width: 20px; }
.nav button.on { color: #000; }

/* ---------- feed ---------- */
.feed-item + .feed-item { margin-top: 40px; }
.feed-img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: var(--r); background: #E8E5E5; }
.feed-under { margin-top: 12px; }
.feed-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; min-height: 36px; }
.feed-foot .count { color: var(--mut); font-size: 12px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.feed-foot .count.add { color: #000; }
.last-comment { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.last-comment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-to-project { font-size: 13px; padding: 4px 8px; border: 1px dashed #A8A4A4; border-radius: var(--r); display: inline-flex; gap: 4px; }
.feed-end { text-align: center; margin: 44px 0 4px; }
.feed-end .two-dots { justify-content: center; margin-bottom: 10px; }
.feed-end p { color: var(--mut); font-size: 13px; margin: 0 0 10px; }
.see-all { font-size: 12px; font-weight: 500; }

.link-tile { width: 100%; aspect-ratio: 2 / 1; border-radius: var(--r); background: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; gap: 4px; }
.link-tile .big { font-size: 18px; line-height: 1.25; }
.pdf-tile { width: 100%; aspect-ratio: 6 / 5; background: #E9E6E6; border-radius: var(--r); position: relative; display: grid; place-items: center; overflow: hidden; }
.pdf-tile img { height: 86%; width: auto; box-shadow: 0 1px 3px rgba(0,0,0,.08); background: #fff; }
.pdf-badge { position: absolute; top: 12px; left: 12px; background: #000; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: var(--r); }
.pdf-pages { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: var(--r); }

/* ---------- tiles ---------- */
.tiles { display: flex; gap: 10px; overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); scrollbar-width: none; scroll-snap-type: x mandatory; }
.tiles::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 calc((100% - 20px) / 3); max-width: 160px; height: 98px; background: #fff; border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; text-align: left; scroll-snap-align: start; }
.tile .name { font-size: 12px; font-weight: 500; margin-top: 10px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile .count { margin-top: auto; color: var(--mut); font-size: 11px; }
.tile.new { border: 1px dashed #BDB9B9; background: transparent; align-items: center; justify-content: center; gap: 6px; font-size: 13px; }

/* ---------- tasks ---------- */
.task { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 16px; direction: rtl; }
.task .t { flex: 1; font-family: Simpler, Inter, sans-serif; font-size: 14px; text-align: right; min-width: 0; padding: 12px 0; }
.task.is-done .t { color: var(--mut); text-decoration: line-through; }
.task.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 40% { background: #FFF4D6; } 100% { background: #fff; } }
.mytask { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; }
.mytask .proj { flex: none; max-width: 42%; }
.mytask .t { flex: 1; font-size: 12px; text-align: right; font-family: Simpler, Inter, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; }
.composer { direction: rtl; display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 52px; }
.composer input { flex: 1; border: 0; outline: 0; background: transparent; font-family: Simpler, Inter, sans-serif; font-size: 14px; text-align: right; min-width: 0; padding: 14px 0; }
.composer input::placeholder { color: var(--mut); }
.composer .plus { color: var(--mut); font-size: 18px; line-height: 1; }
.assignees { display: flex; direction: ltr; }
.assignees button + button { margin-left: -6px; }
.group-head { display: flex; align-items: center; gap: 8px; margin: 26px 0 10px; font-size: 12px; font-weight: 500; }
.group-head .n { color: var(--mut); font-weight: 400; font-size: 11px; }
.toggle-head { display: flex; align-items: center; gap: 6px; color: var(--mut); font-size: 12px; margin: 26px 0 10px; }

/* ---------- projects list ---------- */
.prow { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--r); padding: 10px 12px; height: 72px; margin-bottom: 8px; width: 100%; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .18s ease, box-shadow .18s ease; }
.prow .thumb { width: 52px; height: 52px; border-radius: var(--r); object-fit: cover; background: #E6E3E3; flex: none; }
.prow .name { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.prow .sub { margin-top: 3px; font-size: 11px; }
.prow.lifted { box-shadow: 0 12px 28px -10px rgba(0,0,0,.28); transform: scale(1.02); position: relative; z-index: 5; transition: box-shadow .18s ease; }
.prow.placeholder { opacity: .35; }
.newrow { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--r); height: 52px; padding: 0 16px; color: var(--mut); font-size: 14px; width: 100%; }

/* ---------- project page ---------- */
.ptitle { display: flex; align-items: center; gap: 10px; }
.ptitle .pdot { width: 10px; height: 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 14px; height: 28px; margin: 24px 0 24px; }
.seg button { border-radius: 14px; font-size: 13px; text-align: center; }
.seg button.on { background: #000; color: #fff; }
.masonry { display: flex; gap: 8px; align-items: flex-start; }
.masonry .col { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.masonry img, .masonry .mtile { width: 100%; border-radius: var(--r); background: #E6E3E3; }
.mtile.link { background: #fff; padding: 14px; font-size: 13px; aspect-ratio: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.mtile.pdf { position: relative; background: #E9E6E6; padding: 12px; }
.mtile.pdf img { box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cover-big { width: 100%; aspect-ratio: 345 / 240; object-fit: cover; border-radius: var(--r); margin-top: 20px; }
.empty { border: 1px dashed #CFCBCB; border-radius: var(--r); padding: 32px 24px; text-align: center; }
.empty h3 { font-size: 15px; font-weight: 500; margin: 0 0 6px; }
.empty p { margin: 0 0 16px; color: var(--mut); font-size: 13px; }

/* ---------- all finds grid ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid3 .cell { aspect-ratio: 1; position: relative; background: #E6E3E3; border-radius: var(--r); overflow: hidden; }
.grid3 .cell img { width: 100%; height: 100%; object-fit: cover; }
.grid3 .cell .tag-new { position: absolute; top: 6px; left: 6px; }
.grid3 .cell.pdf { display: grid; place-items: center; background: #E9E6E6; }
.grid3 .cell.pdf img { width: 70%; height: auto; }
.grid3 .cell.link { background: #fff; padding: 8px; font-size: 11px; display: flex; align-items: flex-end; }
.filters { display: flex; gap: 6px; margin: 16px 0 16px; overflow-x: auto; scrollbar-width: none; }

/* ---------- find page ---------- */
.find-img { width: 100%; border-radius: var(--r); background: #E6E3E3; }
.source-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-radius: var(--r); padding: 12px; margin-top: 18px; }
.source-box .t1 { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-box .t2 { color: var(--mut); font-size: 12px; margin-top: 2px; }
.source-box .open { font-weight: 500; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.comments { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.bubble { max-width: 72%; padding: 9px 12px 7px; border-radius: var(--r); background: #fff; font-family: Simpler, Inter, sans-serif; font-size: 13px; line-height: 1.35; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; white-space: pre-wrap; word-break: break-word; }
.bubble.mine { align-self: flex-start; }
.bubble.theirs { align-self: flex-end; }
.bubble .time { font-family: Inter, sans-serif; color: var(--mut); font-size: 9px; margin-top: 4px; direction: ltr; text-align: left; }
.bubble.held { box-shadow: 0 0 0 2px rgba(0,0,0,.08); }
.bubble.hl { animation: flash 2s ease-out; }
.reply { display: flex; gap: 10px; align-items: flex-end; margin-top: 18px; }
.reply .send { width: 36px; height: 36px; border-radius: 50%; background: #000; color: #fff; display: grid; place-items: center; flex: none; }
.reply .send:disabled { opacity: .3; }
.reply textarea { flex: 1; min-height: 40px; max-height: 140px; padding: 10px 12px; border: 0; border-radius: var(--r); background: #fff; font-family: Simpler, Inter, sans-serif; font-size: 13px; outline: none; resize: none; text-align: right; direction: rtl; }
.editing-bar { display: flex; justify-content: space-between; font-size: 12px; color: var(--mut); margin-top: 16px; }
.ctx-menu { position: fixed; z-index: 60; background: #fff; border-radius: var(--r); width: 200px; box-shadow: 0 10px 30px -8px rgba(0,0,0,.25); }
.ctx-menu button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0 16px; height: 44px; font-size: 14px; }
.ctx-menu button + button { border-top: 1px solid var(--line); }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; animation: fade .2s ease; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: #fff; max-width: 520px; margin: 0 auto; padding: 10px var(--pad) calc(var(--safe-b) + 24px); max-height: 92dvh; overflow-y: auto; animation: up .25s cubic-bezier(.2,.8,.2,1); }
.sheet .handle { width: 36px; height: 4px; border-radius: 2px; background: #DDD; margin: 0 auto 18px; }
.sheet h3 { font-size: 17px; font-weight: 500; margin: 0 0 6px; }
.sheet .desc { color: var(--mut); font-size: 13px; margin: 0 0 14px; }
.sheet .opt { display: block; width: 100%; padding: 12px 0; font-size: 16px; }
.sheet .opt small { display: block; color: var(--mut); font-size: 12px; margin-top: 3px; }
.sheet .opts > * + * { border-top: 1px solid var(--line); }
.sheet .opt.danger { color: var(--danger); }
.check-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; width: 100%; font-size: 14px; }
.check-row .box-check { margin-left: auto; width: 20px; height: 20px; border: 1.5px solid #BDB9B9; border-radius: var(--r); display: grid; place-items: center; }
.check-row .box-check.on { background: #000; border-color: #000; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 32px; height: 32px; border-radius: var(--r); position: relative; }
.swatch.on::after { content: ""; position: absolute; inset: -4px; border: 2px solid #000; border-radius: 3px; }
.swatch.round, .swatch.round.on::after { border-radius: 50%; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- toast & banners ---------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav) + max(var(--safe-b), 16px) + 16px); width: calc(min(100vw, 520px) - 48px); z-index: 70; background: #000; color: #fff; border-radius: var(--r); min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-size: 14px; animation: fade .2s ease; }
.toast.no-nav { bottom: calc(var(--safe-b) + 24px); }
.toast button { font-weight: 600; color: #fff; padding: 10px 0 10px 16px; }
.banner { background: #E9E6E6; border-radius: var(--r); padding: 10px 14px; font-size: 13px; color: var(--mut2); display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.queue-card { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: var(--r); padding: 12px; margin-bottom: 8px; }
.queue-card img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r); }
.queue-card .t1 { font-size: 14px; font-weight: 500; }
.queue-card .t2 { font-size: 12px; color: var(--mut); margin-top: 2px; }
.progress { height: 2px; background: var(--line); margin-top: 8px; border-radius: 1px; overflow: hidden; }
.progress i { display: block; height: 100%; background: #000; transition: width .3s; }

/* ---------- upload ---------- */
.topbar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 44px; margin-bottom: 16px; }
.topbar h1 { font-size: 16px; font-weight: 500; text-align: center; }
.picked { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: var(--r); padding: 10px; }
.picked .thumbs { display: flex; gap: 8px; overflow-x: auto; max-width: 62%; scrollbar-width: none; }
.picked .thumbs img { height: 96px; width: auto; max-width: 140px; object-fit: cover; border-radius: var(--r); flex: none; }
.bottom-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px calc(var(--safe-b) + 18px); background: linear-gradient(transparent, var(--bg) 30%); max-width: 520px; margin: 0 auto; z-index: 20; }

/* ---------- viewer ---------- */
.viewer { position: fixed; inset: 0; background: #000; z-index: 80; overflow: auto; display: flex; align-items: center; justify-content: center; animation: fade .2s; }
.viewer img { max-width: 100%; max-height: 100dvh; object-fit: contain; }
.viewer img.zoom { max-width: none; max-height: none; width: 200%; }
.viewer .close { position: fixed; top: calc(var(--safe-t) + 10px); right: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; z-index: 81; }

/* ---------- onboarding ---------- */
.onb { min-height: 100dvh; padding: calc(var(--safe-t) + 40px) var(--pad) calc(var(--safe-b) + 24px); display: flex; flex-direction: column; }
.onb .step { color: var(--mut); font-size: 12px; margin-bottom: 26px; }
.onb h1 { font-size: 26px; margin: 26px 0 8px; }
.onb p.lead { color: var(--mut); font-size: 15px; margin: 0 0 24px; line-height: 1.45; }
.onb .foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.onb .foot .note { color: var(--mut); font-size: 11px; margin-bottom: 10px; }
.pair { display: flex; align-items: center; }
.pair .slot { width: 72px; height: 72px; border-radius: 50%; border: 1.5px dashed #C9C5C5; margin-left: -12px; display: grid; place-items: center; color: var(--mut); font-size: 26px; font-weight: 300; background: var(--bg); }
.steps .srow { display: flex; gap: 14px; align-items: center; padding: 13px 16px; font-size: 14px; }
.steps .srow .n { color: var(--mut); font-size: 11px; width: 8px; }
.steps .srow .ic { margin-left: auto; }
.know { display: flex; gap: 14px; background: #fff; padding: 16px; border-radius: var(--r); }
.know .t1 { font-size: 14px; font-weight: 500; }
.know .t2 { font-size: 12px; color: var(--mut); margin-top: 3px; line-height: 1.4; }

/* ---------- settings ---------- */
.set-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 52px; width: 100%; }
.set-row .grow { flex: 1; min-width: 0; }
.set-row .t1 { font-size: 14px; }
.set-row .t2 { color: var(--mut); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-row .right { color: var(--mut); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.set-label { color: var(--mut); font-size: 12px; margin: 22px 0 8px; }
.switch { width: 44px; height: 26px; border-radius: 13px; background: #D8D5D5; position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: #000; }
.switch.on::after { transform: translateX(18px); }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 11px; background: var(--field); padding: 8px 10px; border-radius: var(--r); word-break: break-all; }
.howto { counter-reset: s; padding: 0; margin: 0; list-style: none; }
.howto li { counter-increment: s; position: relative; padding: 12px 16px 12px 40px; font-size: 14px; line-height: 1.45; }
.howto li::before { content: counter(s); position: absolute; left: 16px; top: 12px; color: var(--mut); font-size: 12px; }
.howto li + li { border-top: 1px solid var(--line); }
.howto b { font-weight: 600; }
.copy-line { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.copy-line .code { flex: 1; }

/* ---------- celebration ---------- */
.celebrate { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; animation: fade .25s ease; }
.celebrate .photo { position: relative; width: 280px; }
.celebrate .photo img { width: 100%; border-radius: var(--r); animation: lift .45s cubic-bezier(.2,.8,.2,1) both; }
.celebrate h2 { font-size: 22px; font-weight: 400; margin-top: 26px; animation: rise .3s .4s ease-out both; }
.celebrate .m { color: var(--mut); font-size: 13px; margin-top: 6px; animation: rise .3s .45s ease-out both; }
.celebrate.out { animation: fadeout .3s 1.3s ease both; }
.spark { position: absolute; color: #000; animation: pop .45s cubic-bezier(.3,1.6,.5,1) both, twinkle .6s .75s ease-in-out both; }
@keyframes lift { from { transform: scale(.92); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: translate(0,0) scale(0) rotate(0); } to { transform: translate(var(--dx), var(--dy)) scale(1) rotate(15deg); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes fadeout { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .spark { display: none; } .celebrate .photo img, .celebrate h2, .celebrate .m { animation: none; } }

.center-msg { text-align: center; padding: 60px 20px; color: var(--mut); }
.spinner { width: 18px; height: 18px; border: 2px solid #ddd; border-top-color: #000; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.plain-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.plain-steps li { counter-increment: s; display: flex; gap: 14px; font-size: 15px; line-height: 1.4; padding: 6px 0; }
.plain-steps li::before { content: counter(s); color: var(--mut); font-size: 13px; width: 10px; flex: none; padding-top: 1px; }
