:root {
    --blue: #ae2832;
    --blue-dark: #8e1f28;
    --navy: #11243f;
    --gold: #d7b56d;
    --ink: #1f2937;
    --muted: #4b5563;
    --line: #e5e7eb;
    --card: #ffffff;
    --green: #166534;
    --green-soft: #d1fae5;
    --green-line: #6ee7b7;
    --danger: #b91c1c;
    --shadow: 0 10px 30px rgba(17, 36, 63, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7f7 0%, #f8f1f1 46%, #fffaf8 100%);
    min-height: 100vh;
}
button, input, textarea { font: inherit; }
.skip {
    position: absolute;
    left: 12px;
    top: -40px;
    background: #fff;
    padding: 8px 12px;
    z-index: 80;
}
.skip:focus { top: 12px; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-top: 6px solid var(--blue);
    border-bottom: 1px solid #f3e4e6;
}
.header-inner, .hero-inner, .steps-inner, .sheet {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}
.header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
}
.brand-logo, .hero-orb, .icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    flex: 0 0 auto;
}
.brand-logo {
    width: 48px;
    height: 48px;
    background: var(--blue);
    color: #fff;
    box-shadow: 0 8px 18px rgba(174, 40, 50, 0.28);
}
.brand-logo .tl-letter { font-weight: 700; font-size: 20px; }
.brand-logo img, .hero-orb img, .icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.brand-name { font-weight: 700; font-size: 20px; line-height: 1.2; color: var(--blue); }
.brand-tag { color: var(--muted); font-size: 14px; }

.hero { padding: 72px 0 36px; text-align: center; }
.hero-orb {
    width: 80px;
    height: 80px;
    background: #fff;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
    font-size: 36px;
}
.hero h2, .sheet h2 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}
.lede, .sheet-intro p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto 28px;
}
.trust-badge {
    display: flex;
    gap: 12px;
    align-items: center;
    text-align: left;
    width: min(440px, 100%);
    margin: 0 auto 28px;
    padding: 14px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbf6ea, #f3e6c8);
    border: 1px solid #e4cf9a;
}
.trust-lock { font-size: 22px; }
.trust-title { color: #6e5420; font-weight: 700; font-size: 14px; }
.trust-text { color: #8a6a2f; font-size: 12px; }

.btn-safe, .edit-bar button, .edit-actions .btn-safe {
    appearance: none;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: var(--blue);
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 650;
    box-shadow: 0 8px 18px rgba(174, 40, 50, 0.18);
}
.btn-safe:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(142, 31, 40, 0.28); }
.btn-safe:disabled { opacity: 0.7; transform: none; cursor: wait; }
.cta-wrap { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

.steps { background: rgba(255, 255, 255, 0.55); padding: 64px 0 72px; }
.steps h3 { text-align: center; font-size: 28px; margin: 0 0 36px; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #f0e4e6;
    border-radius: 18px;
    padding: 28px 22px 26px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card h4 { margin: 14px 0 8px; font-size: 18px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.icon-circle { width: 64px; height: 64px; font-size: 26px; }
.tone-blue { background: #f8e4e6; }
.tone-green { background: #f8efd8; }
.tone-purple { background: #e7edf5; }
.site-footer { text-align: center; color: #64748b; font-size: 14px; padding: 8px 16px 36px; }

.panel { padding: 48px 0 72px; }
.sheet {
    width: min(760px, calc(100% - 32px));
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 40px 36px 32px;
}
.sheet.center { text-align: center; }
.sheet-intro { text-align: center; margin-bottom: 20px; }
.sheet-icon, .ok-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff5f5;
    font-size: 26px;
}
.ok-badge { width: 76px; height: 76px; background: #dcfce7; color: #15803d; font-size: 32px; }
.sheet h2 { font-size: 30px; }
.field { margin-bottom: 22px; }
.label-line { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
label, .fake-label { font-size: 14px; font-weight: 650; color: #374151; }
.composer { position: relative; }
textarea, .edit-input, .human-check input {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    background: #fafafa;
    color: var(--ink);
    resize: vertical;
}
textarea:focus, .edit-input:focus, .human-check input:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(174, 40, 50, 0.15);
}
.field-meta, .fine { display: flex; justify-content: space-between; color: #6b7280; font-size: 13px; margin-top: 8px; }
.fine { display: block; text-align: center; }
.meta-note { color: var(--blue); font-weight: 650; }

.file-drop {
    border: 2px dashed #d1d5db;
    border-radius: 14px;
    background: #f9fafb;
    text-align: center;
    padding: 22px 16px;
    cursor: pointer;
}
.file-drop:hover, .file-drop.dragover { border-color: var(--blue); background: #fff5f5; }
.file-drop strong, .file-drop small { display: block; }
.file-drop small { color: #6b7280; margin-top: 4px; }
.clip { display: block; font-size: 28px; margin-bottom: 6px; }
.file-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 8px;
}
.file-item strong, .file-item small { display: block; }
.file-item small { color: #6b7280; font-size: 12px; }
.file-remove, .text-btn, .text-link, .btn-quiet {
    border: 0;
    background: transparent;
    color: var(--blue-dark);
    cursor: pointer;
    font-weight: 650;
}
.file-remove { color: var(--danger); }
.text-link { margin-top: 14px; text-decoration: underline; }

.privacy { background: #fff5f5; border-radius: 14px; padding: 18px 18px 8px; margin-bottom: 22px; }
.privacy h3 { margin: 0 0 12px; font-size: 16px; display: flex; gap: 8px; align-items: center; }
.privacy ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.privacy li { display: flex; gap: 8px; align-items: flex-start; color: #374151; font-size: 14px; }
.privacy li > span[aria-hidden="true"] { color: #16a34a; }

.human-check {
    border: 1px solid #f0d0d3;
    background: #f8fbff;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 22px;
}
.human-check p { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.captcha-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.captcha-row img { border-radius: 8px; border: 1px solid #f0d0d3; background: #fff; }
.human-check input { max-width: 220px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}
.receipt {
    text-align: left;
    background: #f8fafc;
    border-radius: 16px;
    padding: 18px 18px 8px;
    margin: 8px auto 22px;
}
.receipt h3 { margin: 0 0 12px; font-size: 18px; }
.receipt-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.receipt-row span { color: #6b7280; font-size: 13px; width: 100%; }
.receipt-row strong { color: var(--ink); font-size: 16px; }
#referenceId { color: var(--blue-dark); font-size: 22px; letter-spacing: 0.04em; }
#successSection .cta-wrap { display: flex; width: fit-content; margin: 0 auto; }
#successSection .text-link { display: block; width: fit-content; margin: 16px auto 0; }
.pill {
    background: #f8e4e6;
    color: var(--blue-dark);
    border-radius: 999px;
    padding: 4px 10px;
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
}
.receipt-note { color: #374151; font-size: 14px; line-height: 1.5; background: #fff5f5; border-radius: 10px; padding: 12px; }
.tl-value.is-block { white-space: pre-wrap; }

.tl-pencil {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #fff;
    color: var(--blue-dark);
    cursor: pointer;
    vertical-align: middle;
    box-shadow: 0 4px 12px rgba(174, 40, 50, 0.16);
}
.tl-media { position: relative; }
.tl-media > .tl-pencil { position: absolute; top: -4px; right: -4px; }
.tl-pencil-float { position: absolute; top: 8px; right: 8px; }
.tl-media-inner { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; border-radius: inherit; overflow: hidden; }

.edit-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    background: var(--navy);
    color: #fff;
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 16px 40px rgba(15, 39, 68, 0.28);
}
.edit-bar span { color: #dbe7f5; font-size: 14px; flex: 1; }
.edit-bar button, .edit-bar a {
    background: #fff;
    color: var(--navy);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: none;
}
body.is-admin { padding-bottom: 92px; }
.edit-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.edit-modal[hidden] { display: none; }
.edit-card {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
}
.edit-card h3 { margin: 0 0 12px; }
.edit-label { display: block; font-size: 14px; font-weight: 650; margin: 10px 0; }
.edit-label input[type="file"] { display: block; margin-top: 6px; font-weight: 500; }
.check-line { display: flex; gap: 8px; align-items: center; margin: 12px 0; font-size: 14px; }
.edit-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-quiet { padding: 10px 14px; }

@media (max-width: 800px) {
    .step-grid, .privacy ul { grid-template-columns: 1fr; }
    .sheet { padding: 28px 18px; }
    .hero { padding-top: 40px; }
    .edit-bar { left: 8px; right: 8px; }
}
