/* =========================================================
   SafeNavi Final UI Style
   기존 HTML 구조 기준 / PC + 모바일 반응형 / 전체 페이지 통합
   ========================================================= */

/* =========================================================
   1. Base
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
    background: #f4f7fb;
    color: #111827;
    line-height: 1.65;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

strong {
    font-weight: 900;
    color: #0f172a;
}

/* =========================================================
   2. Header
   ========================================================= */

.top-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    min-height: 70px;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e5e7eb;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 23px;
    font-weight: 900;
    color: #2563eb;
    letter-spacing: -0.05em;
    white-space: nowrap;
}

.top-header nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.top-header nav a {
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    color: #374151;
    transition: 0.15s ease;
}

.top-header nav a:hover {
    background: #eaf1ff;
    color: #2563eb;
}

/* =========================================================
   3. Common Layout
   ========================================================= */

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 24px 72px;
}

.page-title {
    margin-bottom: 30px;
}

.badge {
    display: inline-flex;
    align-items: center;
    margin: 0 0 12px;
    padding: 8px 15px;
    border-radius: 999px;
    background: #dbeafe;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.page-title h1 {
    margin: 0 0 14px;
    font-size: 38px;
    line-height: 1.22;
    letter-spacing: -0.06em;
    color: #020617;
}

.page-title p {
    max-width: 850px;
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.8;
}

h1,
h2,
h3 {
    color: #020617;
}

h2 {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: -0.04em;
}

h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.4;
    letter-spacing: -0.03em;
}

p {
    margin-top: 0;
}

.small-text {
    margin-top: 10px;
    margin-bottom: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

/* =========================================================
   4. Cards / Boxes
   ========================================================= */

.content-card,
.result-card,
.feature-card,
.info-card,
.score-card,
.score-box,
.safety-score-box,
.answer-box,
.rag-answer,
.copy-guide,
.share-message-box,
.alert-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.content-card {
    padding: 28px;
    margin-bottom: 24px;
}

.result-card,
.feature-card,
.info-card,
.score-card,
.score-box,
.safety-score-box,
.answer-box,
.rag-answer,
.copy-guide,
.share-message-box {
    padding: 26px;
}

.alert-box {
    padding: 16px 18px;
    margin-bottom: 22px;
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
    font-weight: 800;
}

/* =========================================================
   5. Buttons
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: none;
    border-radius: 13px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
    transition: 0.15s ease;
}

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

.btn.primary,
.primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 9px 18px rgba(37, 99, 235, 0.22);
}

.btn.primary:hover,
.primary:hover {
    background: #1d4ed8;
}

.btn.secondary,
.secondary {
    background: #eef2ff;
    color: #1d4ed8;
}

.btn.secondary:hover,
.secondary:hover {
    background: #dbeafe;
}

/* =========================================================
   6. Home Page
   ========================================================= */

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 320px;
    gap: 56px;
    align-items: center;
    padding: 44px 0 54px;
}

.hero-left h1 {
    margin: 18px 0 22px;
    font-size: 46px;
    line-height: 1.18;
    letter-spacing: -0.07em;
    color: #020617;
}

.hero-description {
    max-width: 720px;
    margin: 0;
    color: #475569;
    font-size: 17px;
    line-height: 1.85;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.hero-right {
    width: 100%;
}

.location-card {
    width: 100%;
    padding: 28px;
}

.location-card h2 {
    margin-bottom: 20px;
}

.location-card p {
    margin: 14px 0;
    color: #1f2937;
}

.location-card strong {
    display: inline-block;
    min-width: 42px;
    margin-right: 5px;
    color: #111827;
}

.home-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-top: 12px;
}

.home-card-grid .feature-card {
    min-height: 240px;
    padding: 30px 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.home-card-grid .feature-card h2 {
    margin-bottom: 18px;
    font-size: 22px;
    line-height: 1.35;
}

.home-card-grid .feature-card p {
    margin: 0 0 22px;
    color: #475569;
    line-height: 1.75;
}

.card-link {
    margin-top: auto;
    color: #2563eb;
    font-weight: 900;
}

/* 기존 index.html 구조도 대응 */

.hero {
    max-width: 920px;
    margin: 0 auto 32px;
    padding: 30px 0;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: 40px;
    line-height: 1.22;
    letter-spacing: -0.06em;
}

.hero p {
    color: #475569;
    font-size: 17px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* =========================================================
   7. Forms
   ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.form-grid label,
label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 14px;
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 13px;
    background: #ffffff;
    color: #111827;
    font-size: 15px;
    outline: none;
}

textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.7;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-button {
    display: flex;
    gap: 10px;
    align-items: center;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================================================
   8. Generic Grid
   ========================================================= */

.card-grid,
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
    align-items: stretch;
}

.result-card {
    position: relative;
    min-width: 0;
}

.result-card h2 {
    padding-right: 48px;
}

.result-card .sub-text {
    color: #64748b;
}

/* =========================================================
   9. Safety Page
   ========================================================= */

.score-number,
.safety-score {
    display: block;
    font-size: 54px;
    font-weight: 900;
    color: #2563eb;
    line-height: 1.1;
}

.score-box,
.safety-score-box {
    text-align: center;
}

.risk-list,
.action-list {
    margin: 0;
    padding-left: 20px;
}

.risk-list li,
.action-list li {
    margin-bottom: 8px;
}

/* =========================================================
   10. Shelter Page
   ========================================================= */

.location-guide {
    margin: 0 0 18px;
    padding: 14px;
    border-radius: 15px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.65;
}

.location-guide p {
    margin: 0;
}

#shelterMap {
    width: 100%;
    height: 430px;
    margin-top: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
}

.rank {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.22);
}

.info-list {
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.info-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    font-size: 14px;
}

.info-list li:last-child {
    border-bottom: none;
}

.score-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.score-detail span {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.reason {
    margin: 14px 0 0;
    padding: 14px;
    border-radius: 15px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 14px;
    line-height: 1.7;
}

.route-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.route-btn {
    min-height: 40px;
    padding: 10px 13px;
    font-size: 14px;
}

.route-notice {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.45;
}

.user-location-marker {
    font-size: 30px;
    line-height: 34px;
    text-align: center;
}

.shelter-rank-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
}

/* =========================================================
   11. Guide / RAG Page
   ========================================================= */

.guide-input-card {
    padding: 30px;
}

.guide-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.guide-card-header h2 {
    margin-bottom: 8px;
}

.guide-sub-text {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.guide-form textarea {
    width: 100%;
    min-height: 150px;
    font-size: 15px;
    line-height: 1.75;
}

.guide-action-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.example-question-box {
    margin-top: 26px;
    padding: 20px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.example-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.example-label {
    margin: 0;
    font-size: 15px;
    font-weight: 900;
    color: #0f172a;
}

.example-title-row span {
    color: #64748b;
    font-size: 13px;
}

.example-question-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.example-chip {
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 15px;
    background: #ffffff;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
    line-height: 1.45;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
    transition: 0.15s ease;
}

.example-chip:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.rag-result-card,
.reference-card {
    padding: 30px;
}

.rag-section-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.rag-section-title h2 {
    margin-bottom: 6px;
}

.rag-section-title p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.rag-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.22);
}

.secondary-icon {
    background: #0f766e;
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.18);
}

.rag-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
    max-width: 720px;
}

.rag-meta-item {
    padding: 14px 16px;
    border-radius: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.rag-meta-item span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.rag-meta-item strong {
    color: #0f172a;
    font-size: 15px;
}

.rag-answer-text,
.answer-box,
.rag-answer {
    max-width: 900px;
    color: #1f2937;
    font-size: 15.5px;
    line-height: 1.9;
    word-break: keep-all;
    white-space: pre-line;
}

.rag-answer-text {
    padding: 20px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.reference-list {
    max-width: 900px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.reference-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 15px;
}

.reference-list li:last-child {
    border-bottom: none;
}

.reference-list li strong {
    color: #1d4ed8;
}

.reference-list li span {
    margin-left: auto;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

/* =========================================================
   12. Share Page
   ========================================================= */

.share-input-card {
    padding: 30px;
}

.share-form {
    grid-template-columns: 1fr 1fr 1fr auto;
}

.generated-share-card,
.short-share-card,
.share-empty-card {
    padding: 30px;
}

.share-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.share-result-header h2 {
    margin-bottom: 6px;
}

.share-result-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.share-result-label {
    display: inline-block;
    margin-bottom: 8px !important;
    color: #2563eb !important;
    font-size: 12px !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.share-status-badge {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 13px;
    font-weight: 900;
}

.share-message-preview {
    max-width: 900px;
    padding: 22px 24px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1f2937;
    font-size: 15.5px;
    line-height: 1.85;
    white-space: pre-line;
    word-break: keep-all;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.short-preview {
    background: #ffffff;
}

.share-button-row {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.share-status-text {
    margin-top: 12px;
    color: #2563eb;
    font-weight: 800;
}

.share-empty-card p {
    max-width: 760px;
    color: #475569;
    line-height: 1.75;
}

.share-message-box,
.copy-guide {
    white-space: pre-wrap;
}

/* =========================================================
   13. Footer
   ========================================================= */

footer {
    margin-top: 60px;
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

/* =========================================================
   14. Responsive
   ========================================================= */

@media screen and (max-width: 1000px) {
    .home-hero {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 30px 0 36px;
    }

    .home-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-left h1 {
        font-size: 38px;
    }

    .card-grid,
    .feature-grid,
    .result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid,
    .share-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .top-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 16px;
        gap: 10px;
    }

    .logo {
        font-size: 21px;
    }

    .top-header nav {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
    }

    .top-header nav a {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 8px 10px;
        font-size: 13px;
    }

    .container {
        width: 100%;
        padding: 22px 14px 56px;
    }

    .page-title {
        margin-bottom: 20px;
    }

    .page-title h1,
    .hero h1,
    .hero-left h1 {
        font-size: 29px;
        line-height: 1.25;
    }

    .page-title p,
    .hero p,
    .hero-description {
        font-size: 14px;
        line-height: 1.7;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    .home-hero {
        padding: 22px 0 28px;
    }

    .hero-buttons,
    .action-buttons {
        flex-direction: column;
        gap: 10px;
        margin-top: 22px;
    }

    .hero-buttons .btn,
    .action-buttons .btn {
        width: 100%;
    }

    .home-card-grid,
    .card-grid,
    .feature-grid,
    .result-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .home-card-grid .feature-card {
        min-height: auto;
        padding: 18px;
    }

    .home-card-grid .feature-card h2 {
        font-size: 19px;
        margin-bottom: 10px;
    }

    .content-card,
    .result-card,
    .feature-card,
    .info-card,
    .score-card,
    .score-box,
    .safety-score-box,
    .answer-box,
    .rag-answer,
    .copy-guide,
    .share-message-box,
    .guide-input-card,
    .rag-result-card,
    .reference-card,
    .share-input-card,
    .generated-share-card,
    .short-share-card,
    .share-empty-card {
        width: 100%;
        padding: 18px;
        margin-bottom: 14px;
        border-radius: 16px;
    }

    .location-card {
        padding: 18px;
    }

    .form-grid,
    .share-form {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .form-button,
    .button-row,
    .route-buttons,
    .share-button-row,
    .guide-action-row {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .btn,
    button,
    .route-btn {
        width: 100%;
        min-height: 46px;
        font-size: 15px;
        text-align: center;
    }

    input,
    select,
    textarea {
        min-height: 44px;
        font-size: 15px;
        padding: 12px;
    }

    #shelterMap {
        height: 320px;
        border-radius: 14px;
    }

    .rank {
        position: static;
        margin-bottom: 12px;
    }

    .result-card h2 {
        padding-right: 0;
    }

    .info-list li {
        font-size: 14px;
    }

    .reason {
        font-size: 13px;
        line-height: 1.6;
        padding: 12px;
    }

    .score-detail {
        gap: 7px;
    }

    .score-detail span {
        font-size: 12px;
    }

    .small-text,
    .route-notice {
        font-size: 12px;
    }

    .score-number,
    .safety-score {
        font-size: 42px;
    }

    .example-title-row,
    .share-result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .example-question-grid,
    .rag-meta-grid {
        grid-template-columns: 1fr;
    }

    .example-chip {
        width: 100%;
        text-align: left;
    }

    .rag-answer-text,
    .share-message-preview {
        max-width: 100%;
        padding: 16px;
        font-size: 14.5px;
        line-height: 1.75;
    }

    .reference-list li {
        display: block;
        font-size: 14px;
        line-height: 1.6;
    }

    .reference-list li span {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 18px 12px 46px;
    }

    .page-title h1,
    .hero h1,
    .hero-left h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 17px;
    }

    .content-card,
    .result-card,
    .feature-card,
    .info-card,
    .score-card,
    .score-box,
    .safety-score-box,
    .answer-box,
    .rag-answer,
    .copy-guide,
    .share-message-box,
    .guide-input-card,
    .rag-result-card,
    .reference-card,
    .share-input-card,
    .generated-share-card,
    .short-share-card,
    .share-empty-card {
        padding: 14px;
        border-radius: 14px;
    }

    #shelterMap {
        height: 280px;
    }

    .btn,
    button,
    .route-btn {
        min-height: 44px;
        font-size: 14px;
    }

    .score-number,
    .safety-score {
        font-size: 36px;
    }
}

/* =========================================================
   Safety Page Upgrade
   오늘의 안전지수 화면 가독성 개선
   ========================================================= */

.safety-hero-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
    padding: 32px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbeafe;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.safety-label {
    margin: 0 0 10px;
    color: #2563eb;
    font-size: 14px;
    font-weight: 900;
}

.safety-score-number {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-bottom: 14px;
    color: #020617;
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.07em;
}

.safety-score-number span {
    margin-bottom: 8px;
    color: #475569;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.safety-level-badge {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.safety-summary {
    max-width: 520px;
    margin: 18px 0 0;
    color: #475569;
    line-height: 1.75;
}

.safety-score-side {
    display: flex;
    align-items: center;
}

.risk-meter {
    width: 100%;
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.risk-meter-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.risk-meter-top span {
    color: #64748b;
    font-size: 14px;
    font-weight: 800;
}

.risk-meter-top strong {
    font-size: 22px;
}

.risk-bar {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.risk-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.risk-meter p {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.65;
}

.safety-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.safety-stat-card {
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.safety-stat-card span {
    display: block;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.safety-stat-card strong {
    display: block;
    margin-bottom: 10px;
    color: #2563eb;
    font-size: 30px;
    font-weight: 900;
}

.safety-stat-card p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
}

.safety-detail-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.section-kicker {
    margin: 0 0 6px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.risk-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.risk-chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 900;
}

.safety-action-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.safety-action-list li {
    position: relative;
    padding: 12px 0 12px 28px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    line-height: 1.65;
}

.safety-action-list li:last-child {
    border-bottom: none;
}

.safety-action-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

.empty-text {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.safety-data-card {
    padding: 28px;
}

.data-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.data-summary-grid div {
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.data-summary-grid span {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.data-summary-grid strong {
    display: block;
    color: #020617;
    font-size: 24px;
    font-weight: 900;
}

/* Guide reference score fix */
.reference-score {
    min-width: 90px;
    text-align: right;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
}

/* 모바일 대응 */
@media screen and (max-width: 900px) {
    .safety-hero-card,
    .safety-detail-grid {
        grid-template-columns: 1fr;
    }

    .safety-stat-grid {
        grid-template-columns: 1fr;
    }

    .data-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 768px) {
    .safety-hero-card {
        padding: 22px;
        border-radius: 20px;
    }

    .safety-score-number {
        font-size: 56px;
    }

    .safety-score-number span {
        font-size: 20px;
    }

    .risk-meter {
        padding: 18px;
    }

    .data-summary-grid {
        grid-template-columns: 1fr;
    }

    .reference-score {
        text-align: left;
        margin-top: 4px;
    }
}