:root {
  --bg: #0b0c0f;
  --p1: #121419;
  --p2: #181b21;
  --p3: #20242c;
  --line: #2a2f38;
  --line2: #363c47;
  --tx: #e9ebef;
  --tx2: #a4abb8;
  --tx3: #6d7482;
  --acc: #ff5a36;
  --acc2: #ff8a5c;
  --ai1: #8b6cff;
  --ai2: #ff4fa3;
  --in: #3fb8ff;
  --hold: #3a404c;
  --out: #ff7a4a;
  --kf: #ffd24a;
  --r: 8px;
  --f: 'Inter', 'Noto Sans JP', 'Hiragino Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--tx); font: 13px/1.45 var(--f); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sp { flex: 1; }
.dim { color: var(--tx3); }
small { color: var(--tx3); }

/* buttons */
.btn { height: 32px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line2); background: var(--p3); cursor: pointer; white-space: nowrap; font-weight: 600; }
.btn:hover { border-color: #4a5160; background: #262b34; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: #ff6d4d; }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; border-color: #5a2b2b; color: #ff8a8a; }
.btn.ai { border: 0; color: #fff; background: linear-gradient(100deg, var(--ai1), var(--ai2)); box-shadow: 0 6px 22px -8px #a35cff; }
.btn.ai i { font-style: normal; margin-right: 4px; }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.ic { width: 32px; height: 32px; border-radius: 7px; border: 1px solid transparent; background: transparent; cursor: pointer; display: inline-grid; place-items: center; font-size: 15px; color: var(--tx2); }
.ic:hover { background: var(--p3); color: var(--tx); }
.ic.tog.on { color: var(--acc); }
.mini { height: 22px; min-width: 22px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--p2); cursor: pointer; font-size: 11px; color: var(--tx2); }
.mini:hover { color: var(--tx); border-color: var(--line2); }

/* ---------------------------------------------------------------- home */
#home { min-height: 100vh; }
.h-top { display: flex; align-items: center; gap: 12px; padding: 16px 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(11, 12, 15, .86); backdrop-filter: blur(14px); z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand b { font-size: 17px; letter-spacing: -.01em; }
.brand span { color: var(--tx3); }
.h-hero { padding: 56px 28px 28px; max-width: 980px; margin: 0 auto; text-align: center; }
.h-hero h1 { font-size: 34px; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 800; }
.h-hero p { color: var(--tx2); margin: 0 0 26px; }
.ai-big { text-align: left; border-radius: 14px; padding: 2px; background: linear-gradient(110deg, var(--ai1), var(--ai2), var(--acc)); box-shadow: 0 20px 60px -30px #a35cff; }
.ai-big textarea { width: 100%; display: block; border: 0; resize: none; background: var(--p1); border-radius: 12px 12px 0 0; padding: 16px 18px; font-size: 15px; outline: none; }
.ai-row { display: flex; align-items: center; gap: 10px; background: var(--p1); border-radius: 0 0 12px 12px; padding: 8px 10px 10px 14px; }
.ai-img { cursor: pointer; color: var(--tx2); border: 1px dashed var(--line2); border-radius: 6px; padding: 3px 10px; font-size: 12px; }
.ai-img:hover { color: var(--tx); border-color: var(--tx3); }
.ai-img.sm { padding: 1px 6px; }
.ai-thumbs img { height: 30px; border-radius: 4px; margin-right: 4px; vertical-align: middle; }
.h-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 28px; justify-content: center; }
.h-cats button { border: 1px solid var(--line); background: var(--p1); border-radius: 99px; padding: 5px 12px; cursor: pointer; color: var(--tx2); }
.h-cats button.on { background: var(--tx); color: #111; border-color: var(--tx); }
.h-cats button small { opacity: .6; margin-left: 2px; }
.h-cats .brk { flex-basis: 100%; height: 0; }
.h-cats button.genre:not(.on) { border-color: color-mix(in srgb, var(--acc) 55%, var(--line)); color: var(--tx); }
.h-grid-wrap { padding: 10px 28px 60px; }
.h-grid-wrap h2 { font-size: 15px; margin: 22px 0 12px; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.card { position: relative; border-radius: 10px; background: var(--p1); border: 1px solid var(--line); cursor: pointer; overflow: hidden; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--line2); }
.thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: url(/img/bg-talk.jpg) center/cover; }
.thumb::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .18); pointer-events: none; }
.th-host { position: absolute; inset: 0; z-index: 1; }
/* each card's live design is laid out on its own: a font arriving or a card measuring its text does not lay out the whole page again; cards off screen are not rendered */
.th-host { contain: strict; }
.thumb { content-visibility: auto; }
.card .meta { padding: 9px 12px 11px; display: flex; flex-direction: column; gap: 1px; }
.card .meta b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .del { position: absolute; top: 8px; right: 8px; z-index: 2; opacity: 0; }
.card:hover .del { opacity: 1; }
.card .star { position: absolute; top: 6px; left: 6px; z-index: 2; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 16px; line-height: 28px; cursor: pointer; opacity: 0; transition: opacity .15s, transform .1s; }
.card:hover .star, .card .star.on, .card .star:focus-visible { opacity: 1; }
.card .star.on { color: #ffc83d; }
.card .star:active { transform: scale(.88); }
.h-cats button.fav:not(.on) { color: #ffc83d; border-color: color-mix(in srgb, #ffc83d 50%, var(--line)); }
.grid > .empty { grid-column: 1 / -1; color: var(--tx3); padding: 30px 0; text-align: center; }

/* ---------------------------------------------------------------- editor */
#editor { height: 100vh; display: flex; flex-direction: column; }
.e-top { height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--p1); flex: none; }
.e-top .home img { width: 24px; height: 24px; border-radius: 6px; }
.dname { width: 220px; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 5px 8px; font-weight: 600; font-size: 14px; }
.dname:hover, .dname:focus { border-color: var(--line2); outline: none; background: var(--p2); }
.save-state { color: var(--tx3); font-size: 12px; min-width: 70px; white-space: nowrap; }
.save-state.err { color: #ff7a7a; cursor: pointer; text-decoration: underline dotted; }
.ai-bar { display: flex; align-items: center; gap: 6px; width: min(560px, 38vw); height: 34px; padding: 0 4px 0 12px; border-radius: 9px; background: var(--p2); border: 1px solid transparent; background-image: linear-gradient(var(--p2), var(--p2)), linear-gradient(100deg, var(--ai1), var(--ai2)); background-origin: border-box; background-clip: padding-box, border-box; }
.ai-bar i { font-style: normal; color: #b49cff; font-weight: 800; }
.ai-bar input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; }
#bgSel { height: 32px; background: var(--p2); border: 1px solid var(--line); border-radius: 7px; padding: 0 6px; color: var(--tx2); }
.e-main { flex: 1; display: grid; grid-template-columns: 196px 1fr 318px; min-height: 0; }
.e-left { border-right: 1px solid var(--line); background: var(--p1); overflow: auto; display: flex; flex-direction: column; }
.add { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); }
.add button { border: 1px solid var(--line); background: var(--p2); border-radius: 8px; padding: 8px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--tx2); }
.add button:hover { color: var(--tx); border-color: var(--line2); background: var(--p3); }
.add b { font-size: 17px; line-height: 1; color: var(--tx); }
.add span { font-size: 11px; }
.data-panel { padding: 10px; }
.data-panel h4 { margin: 4px 0 8px; font-size: 12px; }
.data-panel h4 small { font-weight: 400; }
.dp { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.dp span { font-size: 11px; color: var(--tx2); }
.dp input[type=text], .dp input[type=number], .dp textarea, .dp select { width: 100%; background: var(--p2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; }
.dp input[type=color] { width: 100%; height: 26px; border: 1px solid var(--line); background: var(--p2); border-radius: 6px; padding: 2px; }
.dp-foot { display: flex; gap: 6px; margin-top: 6px; }
.data-panel p { font-size: 12px; }

.e-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stage { flex: 1; position: relative; overflow: hidden; display: grid; place-items: center; background: radial-gradient(ellipse at center, #15181e, #0b0c0f); min-height: 200px; user-select: none; }
.cv-wrap { position: relative; box-shadow: 0 0 0 1px #2c313b, 0 30px 80px -30px #000; }
.cv-bg, .cv-host, .cv-guides, .cv-ov { position: absolute; inset: 0; }
.cv-host { overflow: hidden; }
.cv-guides { pointer-events: none; }
.cv-guides > div { position: absolute; }
.g-safe { border: 1px dashed rgba(255, 255, 255, .13); }
.g-title { border: 1px dashed rgba(255, 255, 255, .07); }
.g-cx { left: 50%; top: 0; bottom: 0; border-left: 1px dashed rgba(255, 255, 255, .06); }
.g-cy { top: 50%; left: 0; right: 0; border-top: 1px dashed rgba(255, 255, 255, .06); }
.cv-ov { pointer-events: none; }
.cvsel { position: absolute; outline: 1px solid var(--acc); outline-offset: 0; }
.cvsel.locked { outline-color: #888; outline-style: dashed; }
.cvsel .h { position: absolute; width: 9px; height: 9px; background: #fff; border: 1px solid var(--acc); border-radius: 2px; pointer-events: auto; transform: translate(-50%, -50%); }
.h-nw { left: 0; top: 0; cursor: nwse-resize; } .h-n { left: 50%; top: 0; cursor: ns-resize; } .h-ne { left: 100%; top: 0; cursor: nesw-resize; }
.h-e { left: 100%; top: 50%; cursor: ew-resize; } .h-se { left: 100%; top: 100%; cursor: nwse-resize; } .h-s { left: 50%; top: 100%; cursor: ns-resize; }
.h-sw { left: 0; top: 100%; cursor: nesw-resize; } .h-w { left: 0; top: 50%; cursor: ew-resize; }
.cvsel .h-rot { left: 50%; top: -26px; border-radius: 50%; cursor: grab; background: var(--acc); }
.cvsel .anc { position: absolute; width: 7px; height: 7px; border: 1.5px solid var(--acc); border-radius: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, .4); }
.mq-band { position: absolute; border: 1px solid var(--acc); background: rgba(255, 90, 54, .08); }
.snap { position: absolute; background: #ff3d9a; }
.snap.v { top: 0; bottom: 0; width: 1px; }
.snap.h { left: 0; right: 0; height: 1px; }

/* timeline */
.timeline { height: 270px; flex: none; border-top: 1px solid var(--line); background: var(--p1); display: flex; flex-direction: column; }
.tl-bar { height: 40px; display: flex; align-items: center; gap: 4px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.tl-bar .play { color: var(--tx); font-size: 13px; }
.tc { font: 600 13px/1 'JetBrains Mono', ui-monospace, monospace; margin-left: 8px; color: var(--tx); min-width: 64px; }
.phase { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--p3); color: var(--tx2); }
.phase.in { background: rgba(63, 184, 255, .16); color: var(--in); }
.phase.out { background: rgba(255, 122, 74, .16); color: var(--out); }
.hold-in { color: var(--tx2); font-size: 12px; display: flex; align-items: center; gap: 4px; margin-right: 8px; }
.hold-in input { width: 56px; background: var(--p2); border: 1px solid var(--line); border-radius: 5px; padding: 3px 5px; }
.tl-body { flex: 1; display: grid; grid-template-columns: 196px 1fr; min-height: 0; }
.tl-names { overflow: hidden; border-right: 1px solid var(--line); padding-top: 24px; }
.tl-tracks { position: relative; overflow: auto; }
.tl-ruler { position: sticky; top: 0; height: 24px; background: var(--p1); border-bottom: 1px solid var(--line); z-index: 3; }
.tl-ruler i { position: absolute; top: 14px; height: 10px; border-left: 1px solid var(--line2); font: 10px/1 var(--f); color: var(--tx3); font-style: normal; padding-left: 3px; }
.tl-ruler i.mj { top: 4px; height: 20px; color: var(--tx2); }
.tl-ruler .zone { position: absolute; bottom: 0; height: 3px; font-size: 0; }
.zone.in { background: var(--in); } .zone.hold { background: var(--hold); } .zone.out { background: var(--out); }
.stepm { position: absolute; top: 2px; font-size: 10px; color: var(--kf); border-left: 1px solid var(--kf); padding-left: 3px; }
.nm, .row { height: 28px; border-bottom: 1px solid #1a1d23; }
.nm { display: flex; align-items: center; gap: 6px; padding-right: 4px; cursor: pointer; color: var(--tx2); }
.nm:hover { background: var(--p2); }
.nm.sel, .row.sel { background: rgba(255, 90, 54, .09); }
.nm.sel { color: var(--tx); }
.nm.hid .lbl { opacity: .4; }
.nm .lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm .ty { width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; font-size: 11px; background: var(--p3); flex: none; }
.nm .mini { height: 18px; min-width: 18px; padding: 0 3px; font-size: 10px; opacity: 0; border: 0; background: transparent; }
.nm:hover .mini, .nm .mini.eye { opacity: 1; }
.nm .tw { border: 0; background: none; cursor: pointer; color: var(--tx3); padding: 0; width: 12px; }
.tl-names .empty { padding: 14px; color: var(--tx3); font-size: 12px; }
.tl-rows { position: relative; }
.row { position: relative; }
.clip { position: absolute; top: 4px; height: 20px; border-radius: 5px; background: #2b313b; border: 1px solid #3a4250; cursor: grab; overflow: hidden; }
.row.sel .clip { border-color: var(--acc); }
.clip .seg { position: absolute; top: 0; bottom: 0; }
.clip .seg.in { left: 0; background: linear-gradient(90deg, rgba(63, 184, 255, .55), rgba(63, 184, 255, .25)); }
.clip .seg.out { background: linear-gradient(90deg, rgba(255, 122, 74, .25), rgba(255, 122, 74, .55)); }
.clip .cap { position: absolute; left: 6px; top: 2px; font-size: 10px; color: #dfe6f2; white-space: nowrap; pointer-events: none; }
.clip .h-in { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.clip .h-in:hover { background: rgba(255, 255, 255, .25); }
.clip .h-end { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; background: var(--out); cursor: ew-resize; }
.clip.t-text { background: #2f3445; } .clip.t-rect, .clip.t-shape, .clip.t-ellipse { background: #33303a; } .clip.t-group { background: #283a36; }
.kf { position: absolute; top: 9px; width: 9px; height: 9px; background: var(--kf); transform: translateX(-50%) rotate(45deg); }
.tl-head { position: absolute; top: 0; width: 0; z-index: 4; pointer-events: none; }
.tl-head::before { content: ''; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--acc); }
.tl-head i { position: absolute; left: -6px; top: 0; width: 12px; height: 12px; background: var(--acc); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tl-out { position: absolute; top: 0; width: 10px; margin-left: -5px; z-index: 3; cursor: ew-resize; }
.tl-out::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; border-left: 2px dashed var(--out); }

/* inspector */
.e-right { border-left: 1px solid var(--line); background: var(--p1); overflow-y: auto; padding-bottom: 40px; }
.ins-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--p1); z-index: 2; }
.lname { flex: 1; min-width: 0; background: var(--p2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-weight: 600; }
.ltype { font-size: 11px; color: var(--tx3); }
.multi { padding: 8px 12px; background: rgba(255, 90, 54, .1); color: var(--acc2); font-size: 12px; }
.ins-sec { border-bottom: 1px solid var(--line); }
.ins-sec h4 { margin: 0; padding: 10px 12px; font-size: 12px; cursor: pointer; display: flex; align-items: center; letter-spacing: .02em; }
.ins-sec h4::after { content: '▾'; margin-left: auto; color: var(--tx3); }
.ins-sec.closed h4::after { content: '▸'; }
.ins-sec.closed .ins-body { display: none; }
.ins-body { padding: 0 12px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.ins-body h5 { grid-column: 1/-1; margin: 8px 0 0; font-size: 11px; color: var(--tx2); font-weight: 600; text-transform: none; border-top: 1px solid var(--line); padding-top: 10px; }
.f { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.f.wide, .f.area, .f.color, .anim, .timing, .eff, .grad, .field, .toks, .note { grid-column: 1/-1; }
.f > span { font-size: 11px; color: var(--tx2); }
.f input[type=text], .f input[type=number], .f select, .f textarea { width: 100%; background: var(--p2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; min-width: 0; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: #4d5566; outline: none; }
.f textarea { resize: vertical; font-family: 'Noto Sans JP', var(--f); }
.f.num { position: relative; }
.f.num em { position: absolute; right: 24px; bottom: 6px; font-style: normal; font-size: 10px; color: var(--tx3); pointer-events: none; }
.f.num .kbtn { position: absolute; right: 4px; bottom: 5px; }
.scrub { cursor: ew-resize; user-select: none; }
.kbtn { width: 16px; height: 16px; border: 0; background: none; color: #4a505c; cursor: pointer; font-size: 10px; padding: 0; }
.kbtn.has { color: #9b8540; }
.kbtn.on { color: var(--kf); }
.f.rng { display: grid; grid-template-columns: 1fr auto auto; align-items: center; grid-column: 1/-1; gap: 2px 8px; }
.f.rng > span { grid-column: 1/-1; }
.f.rng input { width: 100%; accent-color: var(--acc); }
.f.rng output { font-size: 11px; color: var(--tx2); width: 34px; text-align: right; }
.f.chk { flex-direction: row; align-items: center; gap: 6px; font-size: 12px; color: var(--tx2); }
.f.chk input { accent-color: var(--acc); }
.cv { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cv input[type=color] { width: 30px; height: 26px; padding: 1px; border: 1px solid var(--line); border-radius: 6px; background: var(--p2); }
.cv .hex { flex: 1; min-width: 70px; background: var(--p2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font: 11px ui-monospace, monospace; }
.cv .alpha { width: 60px; accent-color: var(--tx2); }
.cmenu { width: 28px; background: var(--p2); border: 1px solid var(--line); border-radius: 6px; color: var(--tx3); }
.bound { display: inline-flex; align-items: center; gap: 6px; background: rgba(139, 108, 255, .15); border: 1px solid rgba(139, 108, 255, .4); color: #cbbdff; border-radius: 99px; padding: 2px 4px 2px 3px; font-size: 12px; }
.bound i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); }
.bound .mini { height: 16px; min-width: 16px; padding: 0; border-radius: 50%; }
.grad { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.gbar { height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.grow { display: flex; align-items: center; gap: 6px; }
.grow select, .grow input { background: var(--p2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; }
.grow input { width: 64px; }
.grow em { font-style: normal; color: var(--tx3); }
.stop { display: flex; align-items: center; gap: 6px; }
.stop input[type=range] { flex: 1; accent-color: var(--tx2); }
.stop .hex { width: 84px; flex: none; }
.toks { display: flex; flex-wrap: wrap; gap: 4px; }
.tok { border: 1px solid rgba(139, 108, 255, .4); background: rgba(139, 108, 255, .12); color: #cbbdff; border-radius: 99px; padding: 2px 8px; font-size: 11px; cursor: pointer; }
.tok.add { border-style: dashed; background: transparent; color: var(--tx2); border-color: var(--line2); }
.eff { display: flex; flex-direction: column; gap: 6px; }
.effb { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 8px; border-radius: 8px; background: var(--p2); }
.anim { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.prow { flex-direction: row; gap: 6px; }
.prow select { flex: 1; }
.mini.play { color: var(--in); }
.timing { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.anchor { flex-direction: row; align-items: center; gap: 12px; }
.apick { display: grid; grid-template-columns: repeat(3, 14px); gap: 3px; }
.apick button { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line2); background: var(--p2); cursor: pointer; padding: 0; }
.apick button.on { background: var(--acc); border-color: var(--acc); }
.align { display: flex; flex-wrap: wrap; gap: 3px; }
.note { font-size: 12px; color: var(--tx2); background: var(--p2); border-radius: 6px; padding: 6px 8px; }
.field { background: var(--p2); border-radius: 8px; padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.fhead { grid-column: 1/-1; display: flex; align-items: center; gap: 6px; }
.flabel { flex: 1; min-width: 0; background: var(--p1); border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; }
.fhead code { font-size: 10px; color: #cbbdff; }
.ftype { font-size: 10px; color: var(--tx3); }
.fimg { height: 40px; margin-top: 4px; border-radius: 4px; }
.ins-foot { display: flex; gap: 6px; padding: 12px; }

/* dialogs */
.dlg { border: 1px solid var(--line2); background: var(--p1); color: var(--tx); border-radius: 14px; padding: 0; max-width: 680px; width: 92vw; box-shadow: 0 40px 120px -30px #000; }
.dlg.wide { max-width: 1280px; height: 86vh; }
.dlg::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--p1); z-index: 2; }
.dlg-head .h-cats { padding: 0; justify-content: flex-start; flex: 1; }
.dlg-head input { background: var(--p2); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; width: 160px; }
.dlg .grid { padding: 14px; }
.dlg-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ex-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--p2); }
.ex-card h3 { margin: 0 0 4px; font-size: 14px; }
.ex-card p { margin: 0 0 10px; color: var(--tx2); font-size: 12px; }
.ex-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ex-msg { font-size: 12px; color: var(--tx2); }
.cmd { background: #07080a; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: 12px ui-monospace, monospace; color: #b9f3c9; overflow: auto; margin: 0; }

#toast { position: fixed; inset: auto auto 26px 50%; margin: 0; border: 0; overflow: visible; transform: translate(-50%, 20px); background: #f3f4f6; color: #111; padding: 9px 16px; border-radius: 9px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: 80vw; white-space: pre-line; text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#busy { position: fixed; inset: 0; background: rgba(5, 6, 8, .6); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 60; }
.busy-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 36px; border-radius: 16px; background: var(--p1); border: 1px solid var(--line2); }
.busy-card small { color: var(--tx3); }
#boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--tx2); font-size: 14px; z-index: 5; }
#boot.err .spin { display: none; }
.spin { width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(var(--ai1), var(--ai2), var(--acc), var(--ai1)); -webkit-mask: radial-gradient(circle, transparent 13px, #000 14px); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .e-main { grid-template-columns: 160px 1fr 280px; }
  .ai-bar { width: 30vw; }
}

.h-grid-wrap h2.fold button{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:8px}
.h-grid-wrap h2.fold .caret{font-style:normal;display:inline-block;transition:transform .2s;opacity:.7}
.h-grid-wrap h2.fold.folded .caret{transform:rotate(-90deg)}
.h-grid-wrap h2.fold button:focus-visible{outline:2px solid var(--accent,#a78bfa);outline-offset:4px;border-radius:4px}

.sets .set { margin: 0 0 26px; }
.sets .set h3 { font-size: 13px; font-weight: 700; color: var(--tx2); margin: 0 0 10px; letter-spacing: .04em; }
.sets .set .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .sets .set .grid { grid-template-columns: 1fr; } }

.btn.more { grid-column: 1 / -1; justify-self: center; margin: 8px auto 4px; display: block; padding: 8px 22px; }

.dp-gpx { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 12px; }
.dp-gpx small { font-size: 11px; }
.dp-img { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 8px 4px 4px; background: var(--p2); border: 1px dashed var(--line); border-radius: 6px; color: var(--tx2); font-size: 11px; text-align: left; cursor: pointer; }
.dp-img img { width: 56px; height: 36px; object-fit: contain; background: #fff; border-radius: 4px; flex: none; }
.dp-img em { font-style: normal; }
.dp-img:hover, .dp-img.over { border-color: var(--accent, #a78bfa); color: var(--tx); }
.img-badge { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 2px 7px 2px 20px; border-radius: 999px; background: #000000b0; color: #fff; font-size: 11px; line-height: 16px; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='1.4' d='M2.5 4.5h2.2l1-1.5h4.6l1 1.5h2.2v8h-11z'/%3E%3Ccircle cx='8' cy='8.4' r='2.4' fill='none' stroke='%23fff' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 12px; background-position: 6px center; }

/* ---------------------------------------------------------------- gallery filters: use row, taste row, search line */
.browse { max-width: 1240px; margin: 0 auto; padding: 4px 28px 0; display: flex; flex-direction: column; gap: 8px; }
.browse .h-cats { padding: 0; align-items: center; }
.browse .h-cats button:disabled { opacity: .3; cursor: default; }
.br-lab { font-size: 11px; color: var(--tx3); letter-spacing: .08em; margin-right: 4px; min-width: 52px; text-align: right; }
.br-uses button { font-weight: 600; }
.br-gap { width: 10px; }
.br-kinds button { font-size: 12.5px; padding: 4px 11px; }
.br-kinds button.set:not(.on) { border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); }
.br-subs { padding: 0 0 2px !important; }
.br-subs button { padding: 3px 10px; font-size: 12px; background: transparent !important; }
.br-subs button.on { background: var(--p3) !important; color: var(--tx); border-color: var(--line2); }
.br-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 2px; }
.br-q { background: var(--p1); border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px; width: 230px; color: var(--tx); }
.br-q:focus { outline: none; border-color: var(--line2); }
.br-line .br-quick { border: 1px solid var(--line); background: var(--p1); border-radius: 99px; padding: 5px 12px; cursor: pointer; color: var(--tx2); }
.br-line .br-quick.on { background: var(--tx); color: #111; border-color: var(--tx); }
.br-line .br-quick small { opacity: .6; }
.br-line .br-quick:disabled { opacity: .3; }
.br-more { border: 0; background: transparent; color: var(--tx2); cursor: pointer; font-size: 12.5px; padding: 5px 6px; }
.br-more:hover, .br-more.open { color: var(--tx); }
.br-more i { font-style: normal; display: inline-block; transition: transform .15s; opacity: .7; }
.br-more.open i { transform: rotate(180deg); }
.br-more b { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 99px; background: var(--acc); color: #111; font-size: 11px; line-height: 16px; text-align: center; }
.br-active { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.br-active button { border: 0; background: color-mix(in srgb, var(--acc) 22%, var(--p2)); color: var(--tx); border-radius: 99px; padding: 3px 6px 3px 10px; cursor: pointer; font-size: 12px; }
.br-active button i { font-style: normal; opacity: .7; margin-left: 2px; }
.br-clear { border: 0; background: transparent; color: var(--tx2); text-decoration: underline; cursor: pointer; font-size: 12px; }
.br-panel { background: var(--p1); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.br-row { display: flex; gap: 8px; align-items: baseline; }
.br-row .br-lab { flex: none; min-width: 96px; }
.br-row .h-cats { justify-content: flex-start; flex: 1; }
.br-row .h-cats button { font-size: 12px; padding: 3px 10px; }
.dlg .browse { padding: 10px 14px 0; max-width: none; }
.card.stack::before, .card.stack::after { content: ''; position: absolute; left: 10px; right: 10px; top: -5px; height: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--p2); }
.card.stack { overflow: visible; margin-top: 5px; }
.card.stack .thumb { border-radius: 10px 10px 0 0; }
.n-badge { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 2px 8px; border-radius: 999px; background: #000000b8; color: #fff; font-size: 11px; line-height: 16px; pointer-events: none; }
.card.set .n-badge { background: var(--acc); color: #111; font-weight: 700; }
#dlgGroup .dlg-head small { font-size: 12px; }

/* ---------------------------------------------------------------- template packs: preview stills, locked cards, #/packs */
.pv { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; border-radius: 6px; background: var(--p3); }
.pv:not(.none):not(.loaded) { background: linear-gradient(100deg, var(--p3) 30%, var(--p2) 50%, var(--p3) 70%) 0 0 / 300% 100%; animation: pv-wait 1.4s linear infinite; }
@keyframes pv-wait { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .pv:not(.none):not(.loaded) { animation: none; } }
.pv img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv.none::after { content: attr(data-name); position: absolute; inset: 0; display: grid; place-items: center; padding: 6px 8px; text-align: center; font-size: 11px; line-height: 1.35; color: var(--tx3); overflow: hidden; }
.th-host > .pv { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.card.locked .meta b { color: var(--tx2); }
.trial-badge { position: absolute; right: 8px; top: 8px; z-index: 2; padding: 2px 8px; border-radius: 999px; background: #0d7a4fe6; color: #fff; font-size: 11px; line-height: 16px; pointer-events: none; }
.h-trial { margin: 4px max(28px, calc((100% - 1184px) / 2)) 12px; padding: 12px 14px; border: 1px solid #2f6f55; border-radius: 10px; background: rgba(32, 150, 100, .08); font-size: 13px; color: var(--tx2); }
.h-trial p { margin: 0 0 8px; line-height: 1.6; }
.h-trial p b { color: #9fe3b8; margin-right: 8px; }
.h-trial-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.h-trial-list a { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 9px; border: 1px solid var(--line2); background: var(--p2); color: var(--tx); font-size: 12px; text-decoration: none; min-width: 0; }
.h-trial-list a b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-trial-list a:hover { border-color: #9fe3b8; }
.h-trial-list .pv.blank::after { font-size: 28px; color: var(--tx2); }
@media (min-width: 900px) { .h-trial-list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .h-trial-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
@media (max-width: 560px) { .h-trial { margin: 4px 16px 12px; } }
.lock-badge { position: absolute; right: 8px; top: 8px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; pointer-events: none;
  background: #000000b8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3.5' y='7' width='9' height='6.5' rx='1.3' fill='%23fff'/%3E%3Cpath d='M5.6 7V5.2a2.4 2.4 0 0 1 4.8 0V7' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") center/14px no-repeat; }

#packs { min-height: 100vh; display: flex; flex-direction: column; }
#packs a.btn { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.pk-wrap { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 28px 40px; }
.pk-hero { padding: 44px 0 22px; text-align: center; }
.pk-hero h1 { font-size: 30px; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 800; }
.pk-hero p { color: var(--tx2); margin: 0; }
.pk-notice { margin: 0 0 16px; padding: 10px 14px; border-radius: 9px; border: 1px solid var(--line2); background: var(--p2); font-weight: 600; }
.pk-notice.ok { border-color: #2f6b4a; background: #14261c; color: #9fe3b8; }
.pk-notice.err { border-color: #5a2b2b; background: #2a1616; color: #ff9c9c; }
.pk-empty { text-align: center; color: var(--tx2); padding: 60px 0; font-size: 15px; }
.pk-list { display: flex; flex-direction: column; gap: 14px; }
.pk-card { border: 1px solid var(--line); background: var(--p1); border-radius: 12px; padding: 16px 18px; scroll-margin-top: 76px; transition: border-color .15s, box-shadow .3s; }
.pk-card.picked { border-color: var(--acc); }
.pk-card.focus { border-color: var(--acc2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 35%, transparent); }
.pk-card.bundle { background: var(--p2); border-color: var(--line2); }
.pk-card.bundle.picked { border-color: var(--acc); }
.pk-head { display: flex; align-items: flex-start; gap: 16px; }
.pk-title { flex: 1; min-width: 0; }
.pk-title h2 { margin: 0 0 2px; font-size: 17px; }
.pk-title p { margin: 0; color: var(--tx2); }
.pk-buy { display: flex; align-items: center; gap: 12px; flex: none; }
.pk-buy b { font-size: 17px; }
.pk-pick { position: relative; cursor: pointer; }
.pk-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pk-pick span { display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line2); background: var(--p3); font-weight: 600; }
.pk-pick:hover span { border-color: #4a5160; }
.pk-pick input:checked + span { background: var(--acc); border-color: var(--acc); color: #fff; }
.pk-pick input:checked + span::before { content: '✓'; margin-right: 5px; }
.pk-pick input:focus-visible + span { outline: 2px solid var(--acc2); outline-offset: 2px; }
.pk-owned { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid #2f6b4a; background: #14261c; color: #9fe3b8; font-weight: 600; }
.pk-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 12px; }
.pk-more { margin-top: 10px; border: 0; background: transparent; color: var(--tx2); cursor: pointer; padding: 4px 0; }
.pk-more:hover { color: var(--tx); }
.pk-more i { font-style: normal; display: inline-block; opacity: .7; transition: transform .15s; }
.pk-more[aria-expanded=true] i { transform: rotate(180deg); }
.pk-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 8px; margin-top: 10px; }
.pk-all figure { margin: 0; min-width: 0; }
.pk-all figcaption { font-size: 11px; color: var(--tx2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-title .pk-inc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pk-inc span { font-size: 11.5px; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line2); color: var(--tx2); }
.pk-inc span.has { border-color: #2f6b4a; color: #9fe3b8; }
.pk-inc span.has::before { content: '✓ '; }
.pk-title .pk-note { font-size: 12px; margin-top: 8px; color: var(--tx2); }
.pk-key { margin-top: 26px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; background: var(--p1); }
.pk-key h3 { margin: 0 0 8px; font-size: 13px; }
.pk-key form { display: flex; gap: 8px; }
.pk-key input { flex: 1; max-width: 420px; height: 32px; background: var(--p2); border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; }
.pk-key input:focus { outline: none; border-color: #4d5566; }
.pk-key p { margin: 8px 0 0; font-size: 12px; color: var(--tx2); }
.pk-key-msg.ok { color: #9fe3b8; }
.pk-key-msg.err { color: #ff9c9c; }
.pk-link { border: 0; background: transparent; color: var(--tx2); text-decoration: underline; cursor: pointer; padding: 0; font-size: 12px; }
.pk-foot { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 12px 28px; border-top: 1px solid var(--line); background: rgba(11, 12, 15, .9); backdrop-filter: blur(14px); }
.pk-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pk-sum span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-sum .pk-err { color: #ff9c9c; }
.pk-total { display: flex; align-items: baseline; gap: 8px; }
.pk-total b { font-size: 20px; }
.pk-foot .btn { height: 38px; padding: 0 20px; }
.pk-foot .btn:disabled { opacity: .45; cursor: default; }
.pk-one .pk-buy { flex-direction: column; align-items: flex-end; gap: 2px; }
.pk-one .pk-buy small { color: var(--tx2); }
.pk-big { font-size: 26px !important; letter-spacing: -.01em; }
.pk-sub { margin: 26px 0 10px; font-size: 14px; color: var(--tx2); font-weight: 600; }
.pk-quote { margin-top: 14px; border: 1px solid var(--line2); border-radius: 12px; padding: 16px 18px; background: var(--p1); }
.pk-quote h3 { margin: 0 0 10px; font-size: 15px; }
.pk-quote p { margin: 0 0 10px; color: var(--tx2); }
.pk-quote .pk-quote-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-quote label { display: block; font-size: 12px; font-weight: 600; margin: 4px 0 6px; }
.pk-quote input { width: 100%; max-width: 520px; height: 34px; background: var(--p2); border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; color: inherit; }
.pk-quote input:focus { outline: none; border-color: #4d5566; }
.pk-quote .pk-hint { font-size: 12px; margin: 6px 0 0; }
.pk-qmsg { margin: 8px 0 0 !important; font-size: 13px; font-weight: 600; }
.pk-boost h3 small { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--tx3); }
.pk-bo-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-bo { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; padding: 6px 14px; border: 1px solid var(--line2); border-radius: 999px; font-size: 13px !important; cursor: pointer; }
.pk-bo input { width: auto !important; height: auto !important; margin: 0; accent-color: #9fe3b8; }
.pk-bo.on { border-color: #9fe3b8; color: #9fe3b8; }
.pk-bo-custom { display: flex; align-items: center; gap: 8px; margin-top: 10px; max-width: 220px; }
.pk-bo-custom[hidden] { display: none; }
.pk-qmsg.ok { color: #9fe3b8 !important; }
.pk-qmsg.err { color: #ff9c9c !important; }
.pk-total s { color: var(--tx2); font-size: 13px; }
@media (max-width: 560px) { #packs .h-top .brand span { display: none; } }
@media (max-width: 760px) {
  .pk-head { flex-wrap: wrap; }
  .pk-strip { grid-template-columns: repeat(4, 1fr); }
  .pk-foot { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
}

/* ---------------------------------------------------------------- home: header, Pinterest-like grid (2026-12-01) */
.h-top .h-new { height: 38px; padding: 0 18px; border-radius: 99px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 8px 24px -12px var(--acc); }
/* back to the product site (LP) from the template list */
.h-top .h-site { color: var(--tx2); font-size: 13px; text-decoration: none; white-space: nowrap; padding: 6px 4px; }
.h-top .h-site:hover { color: var(--tx); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .h-top .h-site .h-site-long { display: none; } #home .h-top { padding: 14px 16px; gap: 8px; } }
@media (max-width: 420px) { #home .h-top .brand b { display: none; } }
.h-top .h-new i { font-style: normal; font-size: 17px; line-height: 1; margin-top: -1px; }
.h-me { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line2); background: var(--p3); color: var(--tx); }
.h-me:hover { border-color: #4a5160; }
#home .h-hero { padding: 18px 28px 4px; }
.grid.pin { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.pin-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.grid.pin > .more, .grid.pin > .empty { flex-basis: 100%; }
.grid.pin .card { background: transparent; border: 0; border-radius: 0; overflow: visible; }
.grid.pin .card:hover { transform: none; }
.grid.pin .thumb { border-radius: 16px; }
.grid.pin .thumb::after { transition: background .15s; }
.grid.pin .card:hover .thumb::after { background: rgba(0, 0, 0, .06); }
.grid.pin .card.v .thumb { aspect-ratio: 9 / 16; }
.grid.pin .card .meta { padding: 7px 4px 0; }
.grid.pin .card .meta b { font-size: 13px; font-weight: 600; }
.grid.pin .card .meta small { display: none; }
.grid.pin .card .star { top: 10px; right: 10px; left: auto; width: 34px; height: 34px; line-height: 34px; background: rgba(255, 255, 255, .92); color: #15171c; font-size: 17px; }
.grid.pin .card .star.on { background: var(--acc); color: #fff; }
.grid.pin .card .del { top: 10px; left: 10px; right: auto; }
.grid.pin .card.stack { margin-top: 6px; }
.grid.pin .card.stack .thumb { border-radius: 16px; }
.grid.pin .card.stack::before, .grid.pin .card.stack::after { left: 14px; right: 14px; top: -6px; height: 8px; border-radius: 12px 12px 0 0; }
@media (max-width: 560px) {
  .h-top .h-new { padding: 0 14px; }
  .grid.pin, .pin-col { gap: 12px; }
}

/* ---------------------------------------------------------------- my page (#/account) */
.ac-wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 20px 60px; }
.ac-wrap h1 { font-size: 26px; margin: 36px 0 18px; font-weight: 800; letter-spacing: -.01em; }
.ac-card { border: 1px solid var(--line); background: var(--p1); border-radius: 14px; padding: 16px 20px; margin-bottom: 14px; }
.ac-card h2 { font-size: 14px; margin: 0 0 10px; }
.ac-card h2 small { color: var(--tx2); font-weight: 500; margin-left: 6px; }
.ac-lead { color: var(--tx2); margin: 0 0 12px; }
.ac-card p:last-child { margin-bottom: 0; }
.ac-line { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ac-card h2 + .ac-line { border-top: 0; }
.ac-line > span { width: 9em; color: var(--tx2); font-size: 13px; }
.ac-line > b { font-weight: 600; }
.ac-line > small { color: var(--tx2); }
.ac-line.col { flex-direction: column; align-items: stretch; gap: 8px; }
.ac-line.col > span { width: auto; }
.ac-line b.ok { color: #9fe3b8; }
.ac-line b.err { color: #ff9c9c; }
.ac-line .btn.sm { height: 28px; padding: 0 12px; margin-left: auto; }
.ac-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-row input { flex: 1; min-width: 200px; max-width: 360px; height: 34px; background: var(--p2); border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; color: inherit; }
.ac-row input:focus { outline: none; border-color: #4d5566; }
.ac-row .btn { height: 34px; }
.ac-msg { margin: 8px 0 0; font-size: 13px; }
.ac-msg.ok { color: #9fe3b8; }
.ac-msg.err { color: #ff9c9c; }
.ac-msg.info { color: var(--tx2); }
.ac-msg.busy::before, .pk-key-msg.busy::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -2px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--acc); animation: spin .8s linear infinite; }
.ac-list { list-style: none; margin: 0; padding: 0; }
.ac-list li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ac-list li:first-child { border-top: 0; }
.ac-list li em { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: #14261c; color: #9fe3b8; border: 1px solid #2f6b4a; }
.ac-list li small, .ac-list.buys li span { color: var(--tx2); font-size: 12px; }
.ac-list.buys li b { flex: 1; font-weight: 600; }
.ac-note { color: var(--tx2); font-size: 12px; margin: 10px 0 0; }
.ac-note a { color: inherit; }
.btn.danger { color: #ff9c9c; }
@media (max-width: 560px) { #account .h-top .brand span { display: none; } .ac-line > span { width: auto; } }
/* home filters: a big search on top; the chip rows fold under "絞り込み" */
#homeCats { padding: 4px 28px 0; }
#homeCats .br-line { order: -1; margin: 0 0 6px; }
#homeCats .br-q { flex: 0 1 520px; height: 44px; padding: 0 20px; font-size: 14px; background: var(--p2); border-color: var(--line2); }
#homeCats.folded > .h-cats { display: none; }
.br-fold { height: 36px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line2); background: var(--p2); color: var(--tx); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.br-fold:hover { border-color: #4a5160; }
.br-fold i { font-style: normal; opacity: .7; transition: transform .15s; }
.br-fold.open i { transform: rotate(180deg); }
.br-fold.has { border-color: var(--acc); }
.br-fold b { background: var(--acc); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; line-height: 18px; }
@media (max-width: 560px) { #homeCats { padding: 4px 16px 0; } }
.h-top a.btn { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
#homeCats.folded .br-quick, #homeCats.folded .br-more, #homeCats.folded > .br-panel { display: none; }
.ac-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.ac-check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--acc); flex: none; }
.ac-check span { display: flex; flex-direction: column; gap: 4px; }
.ac-check small { color: var(--tx2); font-size: 12px; line-height: 1.6; }
.ac-card a.btn { display: inline-flex; align-items: center; height: 34px; padding: 0 18px; text-decoration: none; }

/* export dialog: the Resolve connector (installed with one line) */
.cn-state { font-size: 12px; font-weight: 600; margin: 0 0 8px !important; }
.cn-state.ok { color: #9fe3b8 !important; }
.cn-state.off { color: #ff6b5e !important; }
/* connector missing: the state line and the install steps in one red box */
.cn-box.off { border: 1.5px solid #ff6b5e; border-radius: 8px; padding: 10px 12px; background: rgba(255, 107, 94, .06); }
.cn-box.off .cn-note { margin-bottom: 0 !important; }
.cn-alt { margin: 10px 0 0 !important; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--tx2); }
.cn-install { border-top: 1px solid var(--line); padding-top: 8px; }
.cn-install summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.cn-tabs { display: flex; gap: 6px; margin: 10px 0 8px; }
.cn-tabs button { border: 1px solid var(--line2); background: var(--p3); color: var(--tx2); border-radius: 99px; padding: 4px 14px; cursor: pointer; font-weight: 600; }
.cn-tabs button.on { background: var(--tx); color: #111; border-color: var(--tx); }
.cn-cmd { display: flex; gap: 8px; align-items: stretch; }
.cn-cmd code { flex: 1; min-width: 0; background: #07080a; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: 12px ui-monospace, monospace; color: #b9f3c9; overflow-x: auto; white-space: nowrap; user-select: all; }
.cn-note { margin-top: 8px !important; }
/* マイページ「保存したデザイン」: the file input's label as a button, same height as the button beside it */
.ac-card p.ac-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.ac-card p.ac-row > .btn { display: inline-flex; align-items: center; margin: 0; cursor: pointer; }
/* マイページ「Claude から使う」: the one line to register the connector with Claude Code */
.ac-cmd { flex: 1; min-width: 0; display: block; padding: 8px 10px; background: var(--p2); border: 1px solid var(--line); border-radius: 7px; font: 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; user-select: all; }

/* first-run settings (js/setup.js): edition of Resolve and the size of new designs */
.su-group { margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.su-group h3 { margin: 0 0 2px; font-size: 14px; }
.su-opt input { accent-color: var(--acc); }
.su-lead { margin: 0; font-size: 12px; }
.ex-ed { font-size: 11px; font-weight: 600; color: var(--tx2); border: 1px solid var(--line2); border-radius: 99px; padding: 1px 8px; margin-left: 4px; vertical-align: 1px; }
.ex-ed:empty { display: none; }
.ex-link { background: none; border: 0; color: var(--tx2); text-decoration: underline; font-size: 12px; cursor: pointer; padding: 0 0 0 6px; }
.ex-sub { margin: 12px 0 0 !important; font-size: 11px !important; color: var(--tx3) !important; }
.ex-msg.err { color: #ff6b5e; font-weight: 600; }
/* A newer Marquee was deployed while this tab stayed open (app.js codeIsStale). */
#updBar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; gap: 12px; align-items: center; background: #f3f4f6; color: #111; padding: 8px 10px 8px 16px; border-radius: 10px; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.35); max-width: calc(100vw - 32px); }
#updBar .btn { white-space: nowrap; }

/* "Wonder Mountains 会員の方" (js/member.js): on the buy page and the my page */
.pk-member .mb-lead, .ac-card .mb-lead { margin: 0 0 10px; font-size: 13px; color: var(--tx2); line-height: 1.7; }
.mb-lead a { color: inherit; }
.mb-sub { margin: 0 0 8px; font-size: 12.5px; color: var(--tx2); }
.pk-member .ac-row input { max-width: 360px; }
.mb-devs { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.mb-dev { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.mb-dev input { accent-color: var(--acc); }
.mb-dev span { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.mb-dev small { color: var(--tx2); font-size: 12px; }
.pk-mem-note { margin-top: 6px !important; font-size: 13px; }
.pk-mem-note .pk-link { font-size: 13px; margin-left: 6px; }
