:root {
    color-scheme: light;
}

.address-generator-body {
    margin: 0;
    min-height: 100vh;
    color: #14213a;
    background: radial-gradient(circle at 15% 10%, #d9ebff 0, transparent 35%), radial-gradient(circle at 90% 15%, #ebe7ff 0, transparent 38%), #eef5ff;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.address-generator-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 32px auto 60px;
}

.address-generator-topbar,
.address-generator-panel,
.address-result,
.address-generator-note {
    border: 1px solid #cfe0f5;
    border-radius: 26px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 50px rgba(43, 87, 145, .12);
}

.address-generator-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 30px 34px;
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(232,242,255,.96));
}

.address-generator-topbar h1,
.address-result-head h2 {
    margin: 4px 0 8px;
    color: #111d35;
}

.address-generator-topbar h1 { font-size: clamp(28px, 4vw, 44px); }
.address-generator-topbar p { margin: 0; color: #687995; }

.address-generator-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
}

.address-generator-free-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: #087a52;
    background: #e4f8ef;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
}

.address-generator-home,
.address-generator-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

.address-generator-home {
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid #cbdcf2;
    border-radius: 14px;
    color: #1769dc;
    background: #fff;
    font-weight: 750;
}

.address-generator-panel,
.address-result,
.address-generator-note { margin-top: 22px; padding: 28px; }

.address-generator-controls label {
    display: block;
    margin-bottom: 10px;
    color: #536582;
    font-weight: 750;
}

.address-generator-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.address-generator-action-row select,
.address-generator-action-row button {
    min-height: 58px;
    border-radius: 16px;
    font: inherit;
}

.address-generator-action-row select {
    width: 100%;
    padding: 0 18px;
    border: 1px solid #cbdcf2;
    color: #17223a;
    background: #f8fbff;
    font-weight: 700;
}

.address-generator-action-row button,
.copy-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #2774e8, #185fcf);
    box-shadow: 0 10px 24px rgba(36, 106, 220, .22);
    font-weight: 800;
    cursor: pointer;
}

.address-generator-action-row button { padding: 0 28px; }
.address-generator-action-row button:disabled { opacity: .65; cursor: wait; }

.address-generator-status { min-height: 22px; margin: 12px 2px 0; color: #71809a; }
.address-generator-status.error { color: #d83333; }

.address-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.copy-primary { min-height: 42px; padding: 0 17px; border-radius: 12px; }

.address-format-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.address-format-card,
.address-detail-card {
    border: 1px solid #d8e4f4;
    border-radius: 18px;
    background: #f8fbff;
}

.address-format-card { padding: 18px; }
.address-format-card > h3 { margin: 0 0 14px; font-size: 16px; }
.address-field { padding: 15px; border: 1px solid #e1eaf6; border-radius: 14px; background: #fff; }
.address-field + .address-field { margin-top: 12px; }
.address-name-field { background: linear-gradient(135deg, #f3f8ff, #fff); }
.address-field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.address-field-head strong { color: #17223a; font-size: 15px; }
.address-name-value { margin: 0; color: #24344f; font-size: 17px; font-weight: 750; overflow-wrap: anywhere; }
.address-single-line { margin: 0; color: #24344f; line-height: 1.65; overflow-wrap: anywhere; }
.address-postal-lines { margin: 12px 0 0; padding: 13px; border-radius: 12px; background: #f8fbff; color: #536582; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.copy-inline { flex: 0 0 auto; border: 0; padding: 7px 11px; border-radius: 9px; color: #1769dc; background: #eaf3ff; font-weight: 750; cursor: pointer; }
.copy-inline:disabled { color: #97a5bb; background: #eef2f7; cursor: default; }

.address-detail-card { margin-top: 16px; padding: 16px 18px; }
.address-detail-card h3 { margin: 0; font-size: 16px; font-weight: 800; }
.address-components { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 16px 0 0; }
.address-components div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; padding: 9px 0; border-bottom: 1px solid #e5edf8; }
.address-components dt { color: #71809a; }
.address-components dd { margin: 0; overflow-wrap: anywhere; }

.address-generator-note { color: #65748d; line-height: 1.65; }
.address-generator-note strong { color: #23334e; }
.address-generator-note p { margin: 8px 0 0; }
.address-generator-note a { color: #1769dc; }
.hidden { display: none !important; }

.store-topbar-side { display: flex; align-items: center; gap: 18px; }
.address-generator-entry { min-height: 38px; padding: 0 14px; border: 1px solid #c8daf1; border-radius: 12px; color: #1769dc; background: rgba(255,255,255,.78); font-weight: 750; }

@media (max-width: 760px) {
    .address-generator-shell { width: min(100% - 20px, 1120px); margin-top: 10px; }
    .address-generator-topbar {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        padding: 22px;
        border-radius: 22px;
    }
    .address-generator-topbar > div { min-width: 0; }
    .address-generator-topbar h1 {
        margin: 9px 0 10px;
        font-size: clamp(30px, 9.2vw, 38px);
        line-height: 1.16;
        letter-spacing: -.03em;
    }
    .address-generator-topbar p { font-size: 14px; line-height: 1.7; }
    .address-generator-eyebrow {
        flex-wrap: nowrap;
        gap: 8px;
        font-size: 13px !important;
        line-height: 1.2 !important;
        white-space: nowrap;
    }
    .address-generator-free-badge { flex: 0 0 auto; }
    .address-generator-home {
        width: 100%;
        min-height: 44px;
        box-sizing: border-box;
        padding: 0 15px;
        border-radius: 13px;
    }
    .address-generator-panel, .address-result, .address-generator-note { padding: 20px; border-radius: 22px; }
    .address-generator-action-row { grid-template-columns: 1fr; }
    .address-format-grid { grid-template-columns: 1fr; }
    .address-result-head { align-items: flex-start; }
    .copy-primary { white-space: nowrap; }
    .address-format-card { padding: 14px; }
    .address-field { padding: 13px; }
    .address-components { grid-template-columns: 1fr; }
    .store-topbar-side { align-items: flex-end; flex-direction: column; gap: 8px; }
}

@media (max-width: 390px) {
    .address-generator-topbar h1 { font-size: 29px; }
}
