/* Chord Designer: Moon Clay Black Cherry theme (Claymorphism + Surrealism) from the Claude Design redesign, 2026-09-28, with grain textures. */
:root {
  --bg: #0f1117;
  --panel: #15171f;
  --raised: #1c1f29;
  --pop: #1c1f29;
  --sunk: #12141b;
  --on: #2c303d;
  --fg: #f2f1f7;
  --muted: #b2b3c6;
  --dim: #898aa0;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.1);
  --accent: #ff5070;
  --gold: #c7b0ff;
  --rec: #ff5a5a;
  --warn: #ffcd6b;
  --ink: #1e0409;
  --clay: inset -3px -4px 7px rgba(4, 5, 10, .5), inset 3px 3px 6px rgba(224, 227, 244, .1), 0 5px 12px rgba(4, 5, 10, .5);
  --well: inset 3px 4px 9px rgba(4, 5, 10, .7), inset -2px -2px 6px rgba(200, 204, 230, .07);
  --slab: inset -8px -10px 20px rgba(4, 5, 10, .55), inset 8px 8px 18px rgba(200, 204, 230, .08), 0 24px 50px rgba(4, 5, 10, .6);
  --cherry: inset -4px -6px 10px rgba(138, 20, 40, .45), inset 4px 5px 10px rgba(255, 255, 255, .35), 0 10px 22px rgba(255, 80, 112, .3);
  /* Grain textures: fine for wells and the page, medium for panels, coarse for the backdrop. */
  --grain-fine: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E");
  --grain-card: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  --grain-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E");
  --violet: inset -4px -6px 10px rgba(74, 42, 138, .45), inset 4px 5px 10px rgba(255, 255, 255, .35), 0 10px 22px rgba(199, 176, 255, .3);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--grain-fine), var(--bg); color: var(--fg); font: 400 14px Outfit, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
#app { min-height: 100vh; background: var(--grain-back), repeating-linear-gradient(135deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 7px), var(--bg); background-attachment: fixed; }
.orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orbs i { position: absolute; border-radius: 50%; }
.orbs .moon { right: 8vw; top: 12vh; width: 30vmin; height: 30vmin; background: #e8e0cf; box-shadow: inset -18px -22px 40px rgba(90, 80, 60, .55), inset 12px 12px 30px rgba(255, 255, 255, .5), 0 0 90px rgba(232, 224, 207, .25); opacity: .35; }
.orbs .plum { left: 5vw; top: 55vh; width: 70px; height: 70px; background: #c7b0ff; box-shadow: inset -10px -12px 18px rgba(60, 20, 120, .5), inset 8px 8px 14px rgba(255, 255, 255, .4); opacity: .4; }
.orbs .cherry { right: 30vw; bottom: 10vh; width: 40px; height: 40px; background: #ff5070; box-shadow: inset -6px -8px 12px rgba(120, 60, 0, .5), inset 5px 5px 10px rgba(255, 255, 255, .4); opacity: .35; }
button, input { font-family: inherit; }
button { color: inherit; }
input[type=range] { accent-color: var(--accent); }
@keyframes cdpulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.lbl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.flex1 { flex: 1; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* header */
.hdr { position: sticky; top: 0; z-index: 40; background: var(--grain-fine), rgba(15, 17, 23, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hdr-in { max-width: 1320px; margin: 0 auto; padding: 12px clamp(14px, 3vw, 28px); display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.brand { font-family: 'Bagel Fat One', sans-serif; font-size: 24px; white-space: nowrap; line-height: 1; }
.brand em { color: var(--accent); font-style: normal; }
.dd { position: relative; }
.dd-btn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 17px; border: 1px solid rgba(255, 255, 255, .12); background: var(--raised); box-shadow: var(--clay); cursor: pointer; font-size: 14px; white-space: nowrap; }
.dd-btn b { font-weight: 600; }
.chev { color: var(--muted); font-size: 9px; }
.scrim { position: fixed; inset: 0; z-index: 1; }
.pop { position: absolute; top: 48px; left: 0; z-index: 2; background: var(--pop); border: 1px solid var(--line2); border-radius: 24px; box-shadow: 0 24px 60px rgba(4, 5, 10, .55); display: flex; flex-direction: column; }
.pop.right { left: auto; right: 0; }
.keypop { width: 300px; padding: 14px; gap: 12px; }
.keygrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.keygrid button { height: 38px; border-radius: 14px; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid rgba(255, 255, 255, .08); background: var(--raised); }
.keygrid button.on { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.instpop { width: 220px; padding: 6px; gap: 2px; border-radius: 20px; }
.instpop button { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 12px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; }
.instpop button.on { background: var(--on); color: var(--fg); }
.instpop button span { color: var(--accent); }
.vol { display: flex; align-items: center; gap: 8px; }
.vol input { width: 96px; }

/* segmented control */
.seg { display: flex; padding: 3px; background: var(--grain-fine), var(--bg); box-shadow: var(--well); border: 1px solid var(--line); border-radius: 17px; gap: 2px; }
.seg button { flex: 1; border: 0; border-radius: 12px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; background: transparent; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--on); color: var(--fg); }
.seg button.off { opacity: .35; }
.seg.sm { border-radius: 15px; }
.seg.sm button { padding: 5px 10px; font-size: 12px; border-radius: 10px; }

/* layout */
main { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: 24px clamp(14px, 3vw, 28px) 80px; display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--grain-card), var(--panel); border: 0; border-radius: 34px; box-shadow: var(--slab); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.row.transport { column-gap: 10px; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.chooser { position: relative; flex: 3 1 560px; min-width: 0; gap: 18px; }
.aside { flex: 1 1 320px; min-width: 0; position: sticky; top: 84px; gap: 14px; }
h1, h2, h3 { margin: 0; font-family: Outfit, sans-serif; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: 21px; white-space: nowrap; }
h2 { font-size: 25px; }
.aside h2 { font-size: 21px; }
.sub { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* buttons */
.btn { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .08); background: var(--raised); box-shadow: var(--clay); font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.icon { width: 36px; padding: 0; justify-content: center; font-size: 17px; }
.btn.play { height: 44px; min-width: 92px; padding: 0 20px 0 16px; border: 0; background: var(--accent); color: var(--ink); box-shadow: var(--cherry); font-size: 15px; font-weight: 600; justify-content: center; }
.btn.gold { border-color: rgba(199, 176, 255, .45); background: transparent; box-shadow: none; color: var(--gold); font-weight: 600; }
.btn.rec { border-color: rgba(255, 90, 90, .5); background: transparent; box-shadow: none; color: #ff9c9c; font-weight: 600; }
.btn.rec i { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); }
.btn.rec.on { background: var(--rec); color: var(--ink); border-color: var(--rec); }
.btn.rec.on i { border-radius: 2px; width: 8px; height: 8px; background: var(--ink); }
.pill { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: #3a3d4e; }
.pill.on { background: var(--on); border-color: rgba(255, 80, 112, .45); color: var(--fg); }
.pill.on i { background: var(--dotc, var(--accent)); }
.pill.sm { height: 32px; padding: 0 12px; font-size: 12px; }
.tempo { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--grain-fine), var(--bg); box-shadow: var(--well); border: 1px solid var(--line); }
.tempo input { width: 110px; }
.tempo b { font-weight: 600; color: var(--accent); min-width: 62px; }

/* timeline */
.tl-scroll { overflow-x: auto; padding-bottom: 2px; }
.tl { position: relative; }
.ruler { display: flex; height: 22px; }
.ruler div { flex: 1; font-size: 11px; font-weight: 500; color: var(--dim); padding-left: 6px; }
.lane { position: relative; height: 88px; border-radius: 20px; background: var(--grain-fine), var(--bg); box-shadow: var(--well); border: 1px solid rgba(255, 255, 255, .06); overflow: hidden; }
.bars { position: absolute; inset: 0; display: flex; }
.bars div { flex: 1; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(255, 255, 255, .035) calc(25% - 1px), rgba(255, 255, 255, .035) 25%); }
.bars div:first-child { border-left: 0; }
.blk { position: absolute; top: 7px; bottom: 7px; margin-left: 3px; border-radius: 15px; border: 1.5px solid; cursor: pointer; padding: 8px 10px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-width: 0; }
.blk .nm { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk .num { font-size: 12px; color: var(--muted); white-space: nowrap; }
.blk .len { font-size: 11px; color: var(--muted); white-space: nowrap; }
.blk .tools { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 3px; }
.blk .tools button { width: 22px; height: 20px; border-radius: 9px; border: 0; background: rgba(4, 5, 10, .45); font-size: 11px; cursor: pointer; padding: 0; }
.blk .tools button:hover { background: rgba(4, 5, 10, .7); color: var(--accent); }
.blk .len { padding-right: 50px; overflow: hidden; text-overflow: ellipsis; }
.blk.narrow { padding-right: 30px; }
.blk.narrow .len { padding-right: 0; }
.blk.narrow .tools { flex-direction: column; right: 4px; bottom: 5px; }
.blk .grip { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; touch-action: none; }
.blk .grip.l { left: 0; }
.blk .grip.r { right: 0; }
.blk .grip:hover { background: rgba(199, 176, 255, .35); }
.next { position: absolute; top: 7px; bottom: 7px; margin-left: 3px; border-radius: 15px; border: 1.5px dashed rgba(255, 255, 255, .15); background: transparent; color: var(--dim); font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 6px; white-space: nowrap; overflow: hidden; }
.next.on { border-color: rgba(199, 176, 255, .8); background: rgba(199, 176, 255, .08); color: var(--gold); }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); box-shadow: 0 0 12px var(--gold); pointer-events: none; }
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; background: rgba(255, 80, 112, .08); border: 1px solid rgba(255, 80, 112, .35); border-radius: 20px; }
.selbar > b { font-size: 14px; font-weight: 600; color: var(--accent); }
.selbar .btn2 { height: 32px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--raised); box-shadow: var(--clay); font-size: 13px; cursor: pointer; }
.selbar .done { height: 32px; padding: 0 14px; border-radius: 14px; border: 0; background: var(--accent); color: var(--ink); box-shadow: var(--cherry); font-size: 13px; font-weight: 600; cursor: pointer; }

/* inversion control */
.seg.inv button { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 3px 10px; line-height: 1.2; }
.seg.inv button small { font-size: 10px; opacity: .7; min-height: 12px; }

/* start point */
.ruler { position: relative; cursor: pointer; }
.ruler:hover { background: rgba(255, 255, 255, .03); border-radius: 8px; }
.cue { position: absolute; bottom: 0; width: 0; height: 0; margin-left: -6px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--accent); pointer-events: none; }
.cueline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed rgba(255, 80, 112, .7); pointer-events: none; z-index: 2; }

/* saved progressions */
.savepop { width: 320px; padding: 14px; gap: 8px; z-index: 20; }
.libpop { width: 360px; max-height: 60vh; overflow-y: auto; padding: 6px; gap: 2px; z-index: 20; }
.libitem { display: flex; align-items: center; gap: 4px; border-radius: 14px; }
.libitem:hover { background: var(--on); }
.libitem .star { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 17px; cursor: pointer; flex: none; }
.libitem .star.on { color: var(--gold); }
.libload { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; cursor: pointer; padding: 7px 4px; display: flex; flex-direction: column; gap: 1px; }
.libload b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.libload small { font-size: 11px; color: var(--muted); }
.libdel { flex: none; height: 28px; min-width: 28px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.libdel:hover, .libdel.on { color: var(--accent); background: rgba(255, 80, 112, .12); }
.dontask { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.dontask input { accent-color: var(--accent); width: 16px; height: 16px; }

/* moves and chords options */
.opts-btn { height: 38px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line2); background: var(--raised); box-shadow: var(--clay); white-space: nowrap; font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.opts-btn.on, .dd-btn.on, .dd .btn.on { border-color: rgba(255, 80, 112, .6); }
.dots { display: flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; }
.optspop { position: absolute; left: 16px; right: 16px; margin-top: 8px; margin-left: auto; z-index: 31; max-width: 600px; padding: 16px; background: var(--pop); border: 1px solid var(--line2); border-radius: 24px; box-shadow: 0 24px 60px rgba(4, 5, 10, .55); display: flex; flex-direction: column; gap: 16px; }
.optsscrim { position: fixed; inset: 0; z-index: 30; }
.grp { display: flex; flex-direction: column; gap: 8px; }
.grp-h { display: flex; align-items: center; gap: 10px; }
.link { border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.link.muted { color: var(--muted); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; flex: none; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: #3a3d4e; }
.chip.on { color: var(--fg); }
.chip small { opacity: .6; font-size: 12px; }
.optsfoot { display: flex; flex-wrap: wrap; gap: 14px 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.typed { display: flex; gap: 6px; }
.typed input { flex: 1; min-width: 0; height: 34px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line2); background: var(--grain-fine), var(--bg); box-shadow: var(--well); color: var(--fg); font: 500 13px Outfit, sans-serif; outline: none; }
.typed button { height: 34px; padding: 0 14px; border-radius: 15px; border: 0; background: var(--gold); color: var(--ink); box-shadow: var(--violet); font-size: 13px; font-weight: 600; cursor: pointer; }

/* recording banner */
.recbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; border-radius: 20px; background: rgba(255, 90, 90, .1); border: 1px solid rgba(255, 90, 90, .45); }
.recbar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); animation: cdpulse 1.2s ease-in-out infinite; }
.recbar b { font-weight: 600; color: #ff9c9c; }
.recbar .stop { height: 32px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--rec); color: var(--ink); box-shadow: var(--cherry); font-size: 13px; font-weight: 600; cursor: pointer; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed rgba(255, 255, 255, .12); border-radius: 20px; }

/* recording pad */
.pad { display: flex; flex-direction: column; gap: 16px; }
.padrow { display: flex; flex-direction: column; gap: 8px; }
.padkeys { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.padkey { height: 72px; border-radius: 20px; border: 2px solid var(--col); background: color-mix(in oklch, var(--col) 18%, #1c1f29); box-shadow: var(--clay); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.padkey b { font-size: 18px; font-weight: 700; }
.padkey small { font-size: 11px; color: #d9d9e8; }
.padkey:active { background: color-mix(in oklch, var(--col) 45%, #1c1f29); box-shadow: var(--well); transform: translateY(1px); }

/* map */
.zoombtn { width: 32px; height: 32px; border-radius: 14px; border: 1px solid var(--line2); background: var(--raised); box-shadow: var(--clay); font-size: 16px; cursor: pointer; }
.zoombtn.fit { width: auto; padding: 0 12px; color: var(--accent); font-size: 12px; font-weight: 600; }
.map { overflow-x: auto; overflow-y: hidden; border-radius: 24px; background: var(--grain-fine), radial-gradient(circle, rgba(200, 204, 230, .1) 1.2px, transparent 1.6px) 0 0 / 22px 22px, radial-gradient(ellipse at 20% 50%, #21242f 0%, #12141b 70%); border: 1px solid rgba(255, 255, 255, .06); }
.map-in { position: relative; }
.map-sc { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.colhead { position: absolute; top: 16px; width: 120px; text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.mnode { position: absolute; width: 110px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.mnode .box { position: relative; width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; }
.mnode .shape { border: 2px solid; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.mnode .shape > span { display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.1; }
.mnode .shape b { font-weight: 700; white-space: nowrap; }
.mnode .shape small { font-size: 9px; color: #d9d9e8; white-space: nowrap; }
.mnode .add { position: absolute; top: -8px; right: -10px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--gold); color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(4, 5, 10, .5); }
.mnode .feel { font-size: 11px; font-weight: 500; text-align: center; line-height: 1.25; }
.pnode { position: absolute; width: 110px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pnode .pbtn { position: relative; border-radius: 24px; border: 2px solid; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; }
.pnode .pbtn b { font-size: 15px; font-weight: 700; }
.pnode .pbtn small { font-size: 10px; color: #d9d9e8; }
.pnode .idx { position: absolute; top: -9px; right: -9px; width: 20px; height: 20px; border-radius: 50%; background: var(--fg); color: var(--bg); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pnode .plab { font-size: 11px; font-weight: 500; color: var(--muted); text-align: center; }
.pnode .rep { height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(255, 80, 112, .5); background: transparent; color: var(--accent); font-size: 11px; font-weight: 600; cursor: pointer; }
.pnode .rep.on { background: var(--accent); color: var(--ink); }

/* cards */
.gcards { display: flex; flex-direction: column; gap: 22px; }
.ghead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ghead i { width: 10px; height: 10px; border-radius: 50%; align-self: center; }
.ghead b { font-size: 15px; font-weight: 600; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.ocard { display: flex; align-items: stretch; background: var(--raised); border: 1px solid rgba(255, 255, 255, .06); border-radius: 20px; overflow: hidden; min-height: 76px; }
.ocard.hot { background: var(--on); border-color: var(--gold); }
.ocard .pv { flex: 1; min-width: 0; text-align: left; padding: 10px 12px; background: transparent; border: 0; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.ocard .pv .t { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.ocard .pv .t b { font-size: 17px; font-weight: 600; }
.ocard .pv .t span { font-size: 13px; color: var(--muted); font-weight: 500; }
.ocard .pv .n { font-size: 12px; color: var(--muted); }
.ocard .pv .f { font-size: 12px; font-weight: 500; }
.ocard .ad { width: 44px; flex: none; border: 0; border-left: 1px solid rgba(255, 255, 255, .06); background: rgba(199, 176, 255, .08); color: var(--gold); font-size: 20px; font-weight: 500; cursor: pointer; }
.ocard .ad:hover { background: rgba(199, 176, 255, .2); }
.feelcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.feelcol { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 24px; background: var(--sunk); border: 1px solid rgba(255, 255, 255, .05); }
.feelcol > div:first-child { display: flex; flex-direction: column; gap: 2px; padding: 2px 2px 6px; }
.feelcol > div:first-child b { font-size: 15px; font-weight: 600; }
.feelcol > div:first-child span { font-size: 12px; color: var(--muted); }
.frow { display: flex; align-items: stretch; background: var(--raised); border: 1px solid rgba(255, 255, 255, .06); border-radius: 19px; overflow: hidden; }
.frow.hot { background: var(--on); border-color: var(--gold); }
.frow .pv { flex: 1; min-width: 0; text-align: left; padding: 8px 10px; background: transparent; border: 0; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.frow .pv > i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.frow .pv > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.frow .pv .t { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.frow .pv .t b { font-size: 15px; font-weight: 600; }
.frow .pv .t span { font-size: 12px; color: var(--muted); }
.frow .pv small { font-size: 11px; color: var(--muted); }
.frow .ad { width: 40px; flex: none; border: 0; border-left: 1px solid rgba(255, 255, 255, .06); background: rgba(199, 176, 255, .08); color: var(--gold); font-size: 18px; cursor: pointer; }

/* finish the phrase */
.sugbox { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 20px; background: var(--sunk); border: 1px solid rgba(255, 255, 255, .05); }
.sugbox .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.sugbox .chip { height: 28px; padding: 0 10px; font-weight: 600; }
.sugbox .chip small { font-weight: 500; opacity: .55; }
.suglist { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 330px); min-height: 240px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.sug { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 20px; background: var(--raised); border: 1px solid rgba(255, 255, 255, .06); }
.sug.on { background: var(--on); border-color: rgba(255, 80, 112, .5); }
.sug .sp { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid rgba(255, 80, 112, .4); background: transparent; color: var(--accent); font-size: 12px; cursor: pointer; }
.sug .cs { flex: 1; min-width: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.sug .cs div { display: flex; flex-direction: column; gap: 1px; }
.sug .cs b { font-size: 16px; font-weight: 600; }
.sug .cs small { font-size: 11px; color: var(--muted); }
.sug .use { height: 34px; padding: 0 14px; flex: none; border-radius: 999px; border: 0; background: var(--gold); color: var(--ink); box-shadow: var(--violet); font-size: 13px; font-weight: 600; cursor: pointer; }
.more { flex: none; height: 38px; border-radius: 20px; border: 1px dashed rgba(255, 255, 255, .16); background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; }
.nomatch { padding: 16px; border-radius: 20px; border: 1px dashed rgba(255, 255, 255, .14); color: #d9d9e8; font-size: 13px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.softbtn { border: 0; background: var(--on); box-shadow: var(--clay); color: var(--gold); height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; }

/* modal and toast */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(4, 5, 10, .62); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal > div { width: min(460px, 100%); background: var(--pop); border: 1px solid rgba(255, 205, 107, .4); border-radius: 31px; box-shadow: 0 30px 80px rgba(4, 5, 10, .6); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.modal .warn { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--warn); font-weight: 600; }
.modal h3 { font-size: 22px; line-height: 1.35; }
.modal p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.modal .opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 20px; border: 1px solid var(--line2); background: var(--on); box-shadow: var(--clay); cursor: pointer; }
.modal .opt b { font-size: 14px; font-weight: 600; }
.modal .opt span { font-size: 12px; color: var(--muted); }
.modal .opt.main { border: 0; background: var(--gold); color: var(--ink); box-shadow: var(--violet); }
.modal .opt.main span { color: var(--ink); opacity: .75; }
.modal .anyway { align-self: center; border: 0; background: transparent; color: var(--muted); font-size: 12px; text-decoration: underline; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 10px 18px; border-radius: 999px; background: var(--on); border: 1px solid rgba(255, 255, 255, .12); font-size: 13px; font-weight: 500; box-shadow: 0 12px 40px rgba(4, 5, 10, .5); max-width: 90vw; text-align: center; }

@media (max-width: 720px) {
  .aside { position: static; }
  .suglist { max-height: none; }
}
