:root {
  --bg: #f4f5f8; --card: #fff; --ink: #1f2430; --muted: #6b7280; --line: #e2e5ec;
  --brand: #714b67; --brand-ink: #fff; --ok: #1a7f4b; --warn: #a15c00; --err: #b42318;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
code, pre { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
pre { background: #f0f1f5; padding: 10px; border-radius: 6px; overflow: auto; max-height: 360px; }
.topbar { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 20px; text-decoration: none; color: var(--ink); }
.brand span { color: var(--brand); } .brand small { font-weight: 400; color: var(--muted); font-size: 13px; }
.topbar nav { display: flex; gap: 16px; flex: 1; } .topbar nav a { text-decoration: none; }
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.footer { text-align: center; padding: 24px; font-size: 12px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .hidden { display: none; }
h1 { font-size: 24px; margin: 8px 0 16px; } h2 { font-size: 18px; margin: 0 0 12px; } h3 { font-size: 15px; margin: 20px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
.card.inner { background: #fafbfc; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.field label { font-weight: 600; font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=number], input:not([type]), select, textarea {
  padding: 8px 10px; border: 1px solid #c9ced8; border-radius: 6px; font: inherit; background: #fff; width: 100%; }
input[type=color] { width: 64px; height: 36px; padding: 2px; border: 1px solid #c9ced8; border-radius: 6px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b79bb0; border-color: var(--brand); }
.has-error input, .has-error select { border-color: var(--err); }
.req { color: var(--err); } .err { color: var(--err); } .ok { color: var(--ok); }
.checks { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; } .checks.vertical { flex-direction: column; gap: 6px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.choice { display: flex; flex-direction: column; gap: 6px; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: #f8f1f6; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 8px 16px; border: 1px solid #c9ced8; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f1f2f6; } .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.1); } .btn.ghost { background: transparent; } .btn.small { padding: 3px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline, .inline-form { display: inline-flex; gap: 8px; align-items: center; }
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border: 1px solid; }
.alert.ok { background: #e8f6ee; border-color: #b7e0c8; color: #11522f; }
.alert.warn { background: #fff4e0; border-color: #f0d49a; color: #7a4600; }
.alert.err, .alert.error { background: #fdecea; border-color: #f2b8b2; color: #8a1c13; }
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; }
.stepper li a { display: block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; color: var(--muted); font-size: 13px; }
.stepper li.done a { color: var(--ok); border-color: #b7e0c8; } .stepper li.current a { background: var(--brand); color: #fff; border-color: var(--brand); }
.stepper li.skip a { opacity: .5; }
.table { width: 100%; border-collapse: collapse; } .table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.table.compact td, .table.compact th { padding: 4px 8px; font-size: 13px; } .table-wrap { overflow-x: auto; }
.row-err { background: #fff5f4; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid; }
.badge.changed, .badge.success { background: #e8f6ee; color: var(--ok); border-color: #b7e0c8; }
.badge.no_change { background: #eef0f4; color: #4b5563; border-color: var(--line); }
.badge.error { background: #fdecea; color: var(--err); border-color: #f2b8b2; }
.badge.partial, .badge.skipped, .badge.running { background: #fff4e0; color: var(--warn); border-color: #f0d49a; }
.errors-list { margin: 6px 0; padding-left: 18px; font-size: 13px; color: var(--err); } .warn-list { color: var(--warn); }
.logo-preview { max-width: 200px; max-height: 100px; display: block; margin: 8px 0; border: 1px solid var(--line); padding: 4px; background: #fff; }
.meta { display: grid; grid-template-columns: 180px 1fr; gap: 4px 12px; margin: 0; } .meta dt { color: var(--muted); } .meta dd { margin: 0; }
code.wrap { white-space: pre-wrap; word-break: break-word; }
details summary { cursor: pointer; color: var(--brand); }
@media (max-width: 640px) { .meta { grid-template-columns: 1fr; } .topbar { padding: 10px 12px; } }

.brand-icon { width: 24px; height: 24px; vertical-align: -5px; margin-right: 8px; border-radius: 5px; }
.login-logo { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto 1rem; }

.cur-selected { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; min-height: 2.2rem; margin-bottom: .6rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .5rem; border-radius: 999px; background: #e7eef9; color: #0b3d6e; font-weight: 600; }
.chip-x { border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; line-height: 1; color: inherit; padding: 0 .1rem; }
.cur-results { list-style: none; margin: .2rem 0 0; padding: 0; border: 1px solid #d0d7de; border-radius: 6px; max-height: 260px; overflow: auto; background: #fff; }
.cur-results li { padding: .45rem .6rem; cursor: pointer; }
.cur-results li[data-code]:hover, .cur-results li[data-code]:focus { background: #eef4fb; outline: none; }
.cur-suggest { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.btn.small { padding: .2rem .6rem; font-size: .9rem; }

.layout-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
@media (max-width: 960px) { .layout-split { grid-template-columns: 1fr; } }
.layout-preview { position: sticky; top: 1rem; }
.preview-thumb { position: relative; display: block; width: 100%; padding: 0; border: 1px solid #d0d7de; border-radius: 6px; background: #fff; cursor: zoom-in; overflow: hidden; }
.preview-thumb img { display: block; width: 100%; height: auto; transition: opacity .2s; }
.preview-thumb img.dim { opacity: .35; }
.lp-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 600; color: #0b3d6e; }
.lp-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .78); display: flex; flex-direction: column; }
.lp-modal[hidden] { display: none; }
.lp-toolbar { display: flex; gap: .5rem; align-items: center; justify-content: center; padding: .6rem; background: #fff; }
.lp-canvas { flex: 1; overflow: auto; padding: 1rem; text-align: center; }
.lp-canvas img { width: 100%; max-width: none; height: auto; background: #fff; box-shadow: 0 4px 24px rgba(0,0,0,.4); cursor: zoom-in; }
body.no-scroll { overflow: hidden; }
