:root {
  --bg: #f5f7fb; --card: #fff; --text: #1d2433; --muted: #5b6577; --line: #dde3ee;
  --brand: #1f6feb; --brand-dark: #1857bd; --ok: #1a7f37; --bad: #c62828; --warn-bg: #fff7e0;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 20px; }
.brand span { color: var(--brand); }
nav { display: flex; gap: 6px; }
.tab { border: 1px solid var(--line); background: #fff; padding: 8px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 14px; }
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.hero { padding: 20px 0 8px; }
.hero h1 { margin: 0 0 6px; font-size: clamp(22px, 4vw, 32px); }
.sub { margin: 0; color: var(--muted); }
.privacy { display: inline-block; margin: 10px 0 0; background: #e8f5ec; color: var(--ok); padding: 4px 10px; border-radius: 8px; font-size: 14px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.card h2 { font-size: 17px; margin: 0 0 10px; }
.card h2:not(:first-child) { margin-top: 20px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 8px 0 4px; }
select, input[type=number] { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.row { display: flex; gap: 10px; }
.row > label { flex: 1; }
.row input { margin-top: 4px; }
.spec { margin-top: 10px; background: #eef4ff; border-radius: 8px; padding: 10px; font-size: 14px; }
.spec b { color: var(--brand-dark); }

.drop { display: flex; align-items: center; justify-content: center; text-align: center; border: 2px dashed var(--line); border-radius: 12px; padding: 24px 12px; cursor: pointer; color: var(--muted); margin-top: 8px; }
.drop:hover, .drop.over { border-color: var(--brand); color: var(--brand); }
.drop input { display: none; }

.editor { background: repeating-conic-gradient(#eef1f6 0 25%, #fff 0 50%) 0 0 / 20px 20px; border-radius: 10px; padding: 12px; text-align: center; }
#editor { max-width: 100%; border: 1px solid var(--line); background: #fff; touch-action: none; cursor: grab; }
#editor.dragging { cursor: grabbing; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
input[type=range] { width: 100%; }
.tools { margin: 8px 0; }

button.primary, a.primary { display: inline-block; width: 100%; text-align: center; border: 0; background: var(--brand); color: #fff; padding: 12px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; margin-top: 10px; }
button.primary:hover, a.primary:hover { background: var(--brand-dark); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 14px; }
.chips button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.result { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.result img { max-width: 45%; max-height: 220px; border: 1px solid var(--line); background: #fff; }
.result > div { flex: 1; }
.result p { margin: 0 0 6px; font-size: 14px; }
.status.ok { color: var(--ok); font-weight: 600; }
.status.bad { color: var(--bad); font-weight: 600; }

a.brand { color: inherit; text-decoration: none; }
.card h2 small { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=date] { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); margin-top: 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; }
.spec small { color: var(--muted); }
.spec .note { display: block; margin-top: 6px; color: #8a5a00; }
output { font-weight: 600; color: var(--text); }

.ad-slot:empty { display: none; }
.ad-slot { margin: 12px 0; text-align: center; min-height: 90px; }

.content { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.content h2 { font-size: 20px; margin: 0 0 10px; }
.content h3 { font-size: 16px; margin: 18px 0 6px; }
.content table { border-collapse: collapse; width: 100%; max-width: 520px; font-size: 14px; }
.content th, .content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.content th { background: #f0f4fb; }
.links ul { columns: 2; padding-left: 18px; margin: 0; }
.links li { margin: 4px 0; break-inside: avoid; }
.links a { color: var(--brand-dark); }
@media (max-width: 600px) { .links ul { columns: 1; } }

.notice { background: var(--warn-bg); border: 1px solid #f0d98a; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 24px; }
