:root {
  --ink: #292929; --ink-deep: #0e0f0c; --muted: #6b6b63; --faint: #9a9a90; --line: #e6e6df;
  --paper: #f7f7f2; --cream: #fcfcf8; --white: #fff; --lime: #b2c248; --lime-soft: #e9eecb; --olive: #5b6f00;
  --olive-hover: #4b5c00; --tint: rgba(98, 90, 34, .06); --red: #b42318; --red-soft: #fdeceb; --amber-soft: #fbf3da;
  --serif: 'Newsreader', Georgia, serif; --sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }

/* layout */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--cream); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 10px 22px; font-weight: 650; font-size: 21px; letter-spacing: -.035em; text-decoration: none; }
.brand img { width: 24px; height: 24px; border-radius: 6px; }
.nav a { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: 14px; color: #3c3c36; transition: background-color .15s var(--ease); }
.nav a:hover { background: var(--tint); }
.nav a.on { background: var(--white); box-shadow: 0 0 0 1px var(--line); color: var(--ink-deep); font-weight: 500; }
.count { background: var(--olive); color: var(--cream); border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; font-weight: 600; }
.side .foot { margin-top: auto; padding: 10px; font-size: 13px; color: var(--muted); }
.side .foot button { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.main { padding: 44px clamp(20px, 5vw, 64px) 80px; max-width: 1040px; width: 100%; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.head h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.05; letter-spacing: -.02em; }
.head p { color: var(--muted); margin-top: 6px; }
.back { display: inline-block; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 14px; }
.back:hover { color: var(--ink); }
@media (max-width: 760px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; } .brand { padding-bottom: 0; } .side .foot { margin: 0 0 0 auto; } .nav { display: flex; flex-wrap: wrap; } }

/* cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.card + .card { margin-top: 14px; }
.card h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: -.01em; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 19px; }
.sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.row { display: flex; align-items: center; gap: 14px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.divide > * + * { border-top: 1px solid var(--line); }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; text-decoration: none; }
.list-item:first-child { padding-top: 0; }
.list-item:last-child { padding-bottom: 0; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* tiles */
.tile { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.tile.sm { width: 30px; height: 30px; border-radius: 8px; }
.tile.lg { width: 52px; height: 52px; border-radius: 13px; }
.tile .g { width: 58%; height: 58%; background: #fff; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.tile img { width: 60%; height: 60%; object-fit: contain; }
.tile.dark .g { background: #0d0d0d; }
.b-whatsapp { background: #25d366; } .b-linkedin { background: #0a66c2; } .b-x { background: #000; } .b-telegram { background: #2aabee; }
.b-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.b-messenger { background: radial-gradient(circle at 20% 100%, #0099ff 0%, #a033ff 60%, #ff5280 90%, #ff7061 100%); }
.b-imessage { background: linear-gradient(180deg, #5bf675, #0cbd2a); } .b-slack, .b-muse, .b-chatgpt, .b-other, .b-n8n, .b-cursor { background: #fff; border: 1px solid var(--line); }
.b-claude { background: #d97757; } .b-grok { background: #0a0a0a; } .b-instinct { background: #f3efec; border: 1px solid #e7e2dd; }
.b-other .g, .b-chatgpt .g, .b-cursor .g { background: #0d0d0d; }

/* choice cards */
.choice { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); cursor: pointer; text-align: left; transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease); }
.choice:hover:not(:disabled) { border-color: #cfcfc5; transform: translateY(-1px); box-shadow: 0 6px 18px -12px rgba(0,0,0,.25); }
.choice:disabled { opacity: .5; cursor: default; }
.choice b { font-weight: 500; display: block; }
.choice span { font-size: 13px; color: var(--muted); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--tint); color: #55554e; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill.ok { background: var(--lime-soft); color: #3d4a00; }
.pill.warn { background: var(--amber-soft); color: #7a5b00; }
.pill.bad { background: var(--red-soft); color: var(--red); }
.pill.plain::before { display: none; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 450; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.btn.primary { background: var(--olive); color: var(--cream); }
.btn.primary:hover { background: var(--olive-hover); }
.btn.dark { background: var(--ink); color: var(--cream); }
.btn.ghost { background: var(--white); border-color: var(--line); }
.btn.ghost:hover { background: var(--tint); }
.btn.danger { background: var(--white); border-color: #f1c9c5; color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
label.f { display: block; }
label.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
label.f > span.row { display: flex; }
input.in, select.in, textarea.in { width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(91,111,0,.12); }
textarea.in { resize: vertical; min-height: 80px; }
.err { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.note { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: #3c3c36; }
.note.warn { background: var(--amber-soft); border-color: #efe0ad; }
.seg { display: inline-flex; background: var(--tint); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; color: #55554e; }
.seg button.on { background: var(--white); color: var(--ink-deep); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d8d8ce; border-radius: 999px; transition: background-color .2s var(--ease); cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--olive); }
.switch input:checked + span::after { transform: translateX(16px); }
.mode { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode label { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: var(--white); }
.mode label:has(input:checked) { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(91,111,0,.12); }
.mode input { display: none; }
.mode b { display: block; font-weight: 500; font-size: 14px; }
.mode small { color: var(--muted); font-size: 12px; }

/* copy box */
.copy { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 12px; }
.copy code { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
ol.steps { margin: 0; padding-left: 20px; }
ol.steps li { margin: 6px 0; }
ol.steps li::marker { color: var(--olive); font-weight: 600; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .card { width: 100%; max-width: 420px; padding: 34px; }
.auth h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; letter-spacing: -.02em; margin: 18px 0 6px; }

/* QR frame */
.qrframe { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 12px; background: #f3f4f6; }
.guide { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }

/* activity */
.msg { display: flex; gap: 12px; padding: 12px 0; }
.msg .who { font-weight: 500; }
.msg .text { color: #3c3c36; white-space: pre-wrap; word-break: break-word; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 10; animation: up .25s var(--ease); }
@keyframes up { from { opacity: 0; transform: translate(-50%, 8px); } }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: s .8s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes s { to { transform: rotate(1turn); } }
