:root {
  --ink: #142238;
  --muted: #66758a;
  --paper: #f5f7fb;
  --panel: #ffffff;
  --line: #dce4ee;
  --blue: #2364d2;
  --blue-soft: #eaf1ff;
  --coral: #d86146;
  --coral-soft: #fff0eb;
  --lime: #5e7d22;
  --lime-soft: #f0f6df;
  --violet: #7055c5;
  --violet-soft: #f0edff;
  --shadow: 0 12px 28px rgba(30, 53, 83, .07);
}

* { box-sizing: border-box; }
html { color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-width: 320px; }
button, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(35, 100, 210, .3); outline-offset: 3px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; flex: 0 0 auto; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.topbar { min-height: 64px; padding: 0 max(20px, calc((100% - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); background: #b8efce; border-radius: 7px; }
.brand-mark .icon { width: 19px; height: 19px; }
.brand strong { display: block; font-size: 16px; line-height: 1; }
.brand small { display: block; margin-top: 4px; color: #aebed0; font-size: 8px; letter-spacing: .13em; }
.topbar-meta { color: #d4dfeb; font-size: 12px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; display: inline-block; margin-right: 6px; background: #84d19d; border-radius: 50%; }

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.workspace { padding: 38px 0 48px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.035em; }
.tool-total { color: var(--muted); font-size: 12px; }
.tool-total b { color: var(--ink); font-size: 14px; }

.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tool-card { min-height: 72px; display: flex; align-items: center; gap: 11px; padding: 12px 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 3px 12px rgba(36, 57, 82, .025); text-align: left; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.tool-card:hover { border-color: #a9bbd4; transform: translateY(-1px); }
.tool-card.active { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(35, 100, 210, .12); }
.tool-card strong { font-size: 14px; }
.tool-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; }
.tone-blue { color: var(--blue); background: var(--blue-soft); }
.tone-coral { color: var(--coral); background: var(--coral-soft); }
.tone-lime { color: var(--lime); background: var(--lime-soft); }
.tone-violet { color: var(--violet); background: var(--violet-soft); }

.tool-panel { margin-top: 16px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); animation: reveal .2s ease both; }
.hidden { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-head h2 { font-size: 20px; letter-spacing: -.025em; }
.panel-badge { padding: 5px 8px; color: var(--blue); background: var(--blue-soft); border-radius: 4px; font-size: 10px; font-weight: 750; }
.panel-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 22px; }
label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
textarea, select, .output-area { width: 100%; color: var(--ink); background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; }
textarea { min-height: 148px; padding: 12px; resize: vertical; line-height: 1.6; }
textarea::placeholder { color: #a0adbd; }
.form-meta, .form-row, .action-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-meta { margin: 7px 0 14px; color: var(--muted); font-size: 11px; }
.form-row { margin-bottom: 16px; }
.form-row label { margin: 0; }
.form-row select { width: 104px; padding: 7px 9px; }
.primary-button, .secondary-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border-radius: 6px; font-size: 12px; font-weight: 750; transition: background .16s ease, transform .16s ease; }
.primary-button { color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.primary-button:hover { background: #1d54b5; transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .6; }
.secondary-button { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.secondary-button:hover { background: #f3f6fa; }
.form-hint { min-height: 17px; margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-hint.error { color: #b23b2d; }
.result-box { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: #f8fafc; border: 1px dashed #c7d5e5; border-radius: 6px; text-align: center; }
.result-box.empty { color: var(--muted); }
.result-box strong { font-size: 13px; }
.qr-image { width: min(230px, 100%); height: auto; padding: 10px; background: #fff; border: 1px solid var(--line); }
.download-link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-size: 12px; font-weight: 750; text-decoration: none; }
.download-link .icon { width: 16px; height: 16px; }
.split-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split-editor textarea, .output-area { min-height: 236px; }
.output-area { margin: 0; padding: 12px; overflow: auto; white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.6; }
.action-row { justify-content: flex-start; margin-top: 14px; }
.action-row .form-hint { margin: 0; }
.uuid-result { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.uuid-result code { flex: 1; min-height: 52px; display: flex; align-items: center; padding: 12px; overflow: auto; color: var(--blue); background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.footer { display: flex; justify-content: space-between; padding: 20px 0 28px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.footer a { color: var(--blue); text-decoration: none; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 760px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } .panel-layout, .split-editor { grid-template-columns: 1fr; gap: 18px; } }
@media (max-width: 520px) { .topbar { padding: 0 16px; } .topbar-meta { display: none; } .shell { width: min(100% - 28px, 560px); } .workspace { padding-top: 26px; } .tool-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .tool-card { min-height: 64px; padding: 10px; } .tool-card strong { font-size: 13px; } .tool-icon { width: 32px; height: 32px; } .tool-panel { padding: 17px; } .action-row { flex-wrap: wrap; } .uuid-result { align-items: stretch; flex-direction: column; } }
