[hidden] { display: none !important; }
:root {
  --bg: #f5f7fa; --card: #ffffff; --ink: #142033; --muted: #5b6b80; --line: #dfe5ec;
  --accent: #1e6b52; --accent-ink: #ffffff; --accent-soft: #e3f1ec;
  --warn-bg: #fef3c7; --warn-ink: #78350f; --err: #b42318;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 16px 64px; }
.wide { max-width: 1200px; }
header.top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
header.top .logo { font-weight: 700; letter-spacing: .2px; }
header.top .logo span { color: var(--accent); }
header.top .right { margin-left: auto; color: var(--muted); font-size: 14px; }
.banner { background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; padding: 8px 16px; text-align: center; }
h1 { font-size: 26px; line-height: 1.2; margin: 18px 0 8px; }
h2 { font-size: 19px; margin: 22px 0 8px; }
p.lead { color: var(--muted); margin-top: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
input[type=text], textarea { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
textarea { min-height: 120px; resize: vertical; }
button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 12px 16px; background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary, .btn.secondary { background: var(--accent-soft); color: var(--accent); }
button.ghost, .btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.idea { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; text-align: left; color: var(--ink); font-weight: 500; }
.idea .e { font-size: 24px; display: block; }
.idea:hover, .idea.on { border-color: var(--accent); background: var(--accent-soft); }
.chat .msg { margin: 10px 0; padding: 10px 14px; border-radius: 14px; max-width: 92%; white-space: pre-wrap; }
.chat .user { background: var(--accent); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat .lab { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.q { margin: 14px 0; }
.q .t { font-weight: 600; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 500; padding: 9px 12px; border-radius: 999px; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.q input[type=text], .q textarea { margin-top: 8px; padding: 9px 12px; }
.q textarea { min-height: 0; }
.doc h1 { font-size: 22px; margin-top: 0; }
.doc h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 16px 0 4px; }
.doc ul { padding-left: 20px; margin: 4px 0; }
.events { list-style: none; padding: 0; margin: 0; max-height: 340px; overflow: auto; font-size: 15px; }
.events li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.events li.status { color: var(--muted); }
.events li.done { color: var(--accent); font-weight: 600; }
.events li.error { color: var(--err); font-weight: 600; }
.events li.request { font-style: italic; }
.spin { display: inline-block; width: 16px; height: 16px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: r 1s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes r { to { transform: rotate(360deg); } }
.live { display: grid; gap: 12px; }
.frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.qr img { width: 150px; height: 150px; }
.muted { color: var(--muted); }
.err { color: var(--err); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
select, input.small { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.gcard h3 { margin: 0 0 4px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 15px; display: none; z-index: 9; max-width: 90vw; }
.examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.excard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; }
.excard .exhead { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.excard .e { font-size: 26px; }
.excard p { margin: 8px 0; color: var(--muted); font-size: 15px; flex: 1; }
.excard .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.excard .tags span { font-size: 12px; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 2px 8px; }
.excard .btn, .excard button { padding: 9px 14px; font-size: 15px; }
#sugg { gap: 6px; }
#sugg .chip { font-size: 13px; font-weight: 500; padding: 5px 10px; }
.excard .thumb { display: block; margin: -14px -14px 12px; height: 170px; overflow: hidden; border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--line); background: #f1f5f9; }
.excard .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.gcard .gthumb { display: block; margin: -16px -16px 12px; height: 200px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line); background: #f1f5f9; }
.gcard .gthumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
