:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface2: #ffffff;
  --border: #e3e8f0;
  --text: #0f172a;
  --muted: #5b6878;
  --accent: #2563eb;
  --success: #059669;
  --danger: #dc2626;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; min-height: 100vh; }

nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 20px; }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 52px; }
.logo { font-weight: 700; font-size: 1.1rem; }
.nav-badge { font-size: .75rem; color: var(--muted); background: var(--surface2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; }

.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }

.main-grid { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }

/* SECTION */
.section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.section-title { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

/* FORM */
.field { margin-bottom: 12px; }
.field label { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field input[type=text], .field input[type=url], .field select, .field textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; border-radius: 6px; font-size: .875rem; outline: none; font-family: inherit;
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.hint { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.counter { font-weight: 400; font-size: .75rem; }
.counter.warn { color: var(--danger); }
.counter.ok { color: var(--success); }
.field-row { display: flex; gap: 10px; }
.flex1 { flex: 1; }
.btn-sm { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 6px 14px; border-radius: 5px; cursor: pointer; font-size: .8rem; transition: background .15s; }
.btn-sm:hover { background: var(--border); }

/* GOOGLE PREVIEW */
.google-preview { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; }
.gp-url { font-size: .8rem; color: #5f9b5f; margin-bottom: 4px; word-break: break-all; }
.gp-title { font-size: 1.1rem; color: #2563eb; cursor: pointer; margin-bottom: 4px; line-height: 1.3; }
.gp-title:hover { text-decoration: underline; }
.gp-desc { font-size: .875rem; color: #aaa; line-height: 1.5; }

/* SOCIAL PREVIEW */
.social-preview { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); }
.sp-image { height: 200px; background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; overflow: hidden; }
.sp-image img { width: 100%; height: 100%; object-fit: cover; }
.sp-body { padding: 12px 14px; border-top: 1px solid var(--border); }
.sp-domain { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.sp-title { font-size: .95rem; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.sp-desc { font-size: .82rem; color: var(--muted); line-height: 1.4; }

/* CODE */
.code-block { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; font-family: 'Consolas', 'Monaco', monospace; font-size: .8rem; line-height: 1.7; color: var(--success); white-space: pre-wrap; word-break: break-all; max-height: 420px; overflow-y: auto; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; }
}
