@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Noto+Sans+KR:wght@400;600;700&display=swap");

:root {
    --bg: #f7f2ed;
    --bg-accent: #efe7df;
    --ink: #1c1b1a;
    --muted: #6b6762;
    --brand: #d4683d;
    --brand-dark: #b65028;
    --card: #ffffff;
    --ring: rgba(212, 104, 61, 0.35);
    --shadow: 0 24px 60px rgba(28, 27, 26, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 20%, #f6dfcf 0%, transparent 55%),
        radial-gradient(circle at 85% 80%, #f1d6c0 0%, transparent 60%),
        linear-gradient(135deg, var(--bg), var(--bg-accent));
    font-family: "Space Grotesk", "Noto Sans KR", sans-serif;
    color: var(--ink);
    padding: 24px;
}

body.page-success {
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.shell {
    width: 100%;
    max-width: 460px;
}

.card {
    background: var(--card);
    border-radius: 22px;
    padding: 32px 26px 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(28, 27, 26, 0.08);
    backdrop-filter: blur(6px);
    animation: rise 700ms ease-out both;
}

.eyebrow,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.eyebrow {
    background: rgba(212, 104, 61, 0.12);
    color: var(--brand-dark);
}

.badge {
    background: rgba(31, 138, 76, 0.12);
    color: #1f8a4c;
}

h1 {
    margin: 16px 0 8px;
    font-size: 24px;
    font-weight: 700;
}

.lead {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

input {
    width: 100%;
    padding: 14px 14px;
    font-size: 15px;
    border-radius: 12px;
    border: 1px solid rgba(28, 27, 26, 0.15);
    background: #fffaf6;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--ring);
}

button {
    width: 100%;
    padding: 14px 0;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #e1784d);
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 200ms ease, opacity 150ms ease;
    box-shadow: 0 14px 30px rgba(212, 104, 61, 0.32);
}

button:hover {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.result {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
    min-height: 20px;
}

.success {
    color: #1f8a4c;
}

.fail {
    color: #c2412d;
}

.shake {
    animation: shake 280ms ease-in-out;
}

.hint {
    margin-top: 18px;
    font-size: 12px;
    color: var(--muted);
}

.hint.danger {
    color: #c2412d;
}

.icon {
    font-size: 44px;
    margin: 18px 0 6px;
}

.page-success h1 {
    color: #1f8a4c;
}

.page-success p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin: 14px 0 18px;
}

.email-box {
    background: #fffaf6;
    border: 1px solid rgba(28, 27, 26, 0.12);
    border-radius: 12px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--brand-dark);
    word-break: break-all;
}

.actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.copy {
    background: #f0ece7;
    color: var(--ink);
    box-shadow: none;
}

.sub {
    margin-top: 12px;
    font-size: 12px;
    color: var(--muted);
}

.notice {
    margin-top: 8px;
    font-size: 12px;
    color: #1f8a4c;
    min-height: 18px;
}

.prevent-capture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0f0f0f;
    z-index: 9999;
    display: none;
}

.mailer {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 15, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10000;
}

.mailer.open {
    display: flex;
}

.mailer-card {
    width: 100%;
    max-width: 360px;
    background: #ffffff;
    border-radius: 18px;
    padding: 22px 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(28, 27, 26, 0.08);
    text-align: left;
}

.mailer-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
}

.mailer-sub {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--muted);
}

.mailer-actions {
    display: grid;
    gap: 10px;
}

.mailer-actions button {
    width: 100%;
    padding: 12px 0;
    border-radius: 12px;
    border: 1px solid rgba(28, 27, 26, 0.12);
    background: #fffaf6;
    color: var(--ink);
    font-weight: 600;
    box-shadow: none;
}

.mailer-actions button:hover {
    transform: translateY(-1px);
}

.mailer-close {
    margin-top: 14px;
    background: #f0ece7;
    border: none;
    box-shadow: none;
    color: var(--ink);
}

.admin-meta {
    font-size: 12px;
    color: var(--muted);
    margin: 8px 0 18px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin: 12px 0 16px;
}

.admin-actions button {
    width: auto;
    padding: 10px 14px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(28, 27, 26, 0.08);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.admin-badge.pass {
    background: rgba(31, 138, 76, 0.12);
    color: #1f8a4c;
}

.admin-badge.fail {
    background: rgba(194, 65, 45, 0.12);
    color: #c2412d;
}

.admin-empty {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    padding: 18px 0;
}

.admin-danger {
    background: #f0ece7;
    color: var(--ink);
    box-shadow: none;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}
