:root {
    --bg: #f4f6f8;
    --bg-soft: #ffffff;
    --bg-muted: #eef2f6;
    --ink: #17212f;
    --muted: #647386;
    --line: #d8e0ea;
    --line-strong: #c3cedb;
    --brand: #1565b3;
    --brand-strong: #0b4f8c;
    --brand-soft: #eaf3fc;
    --accent: #c47b00;
    --danger: #c43631;
    --success: #218251;
    --radius: 8px;
    --shadow: 0 1px 2px rgba(21, 34, 47, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}

body {
    overflow-x: hidden;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.kiscon-date-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
}

.kiscon-tab-panel {
    padding: 0.7rem;
}

.kiscon-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.kiscon-subtab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.34rem 0.68rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.84rem;
    text-align: center;
}

.kiscon-subtab:hover {
    text-decoration: none;
    border-color: rgba(21, 101, 179, 0.5);
    background: var(--brand-soft);
}

.kiscon-subtab.is-active {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.kiscon-company-heading {
    margin-top: -0.35rem;
}

.kiscon-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.75rem;
}

.kiscon-summary-grid > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.7rem;
    background: #f7f9fc;
}

.kiscon-summary-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.kiscon-summary-grid strong {
    display: block;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.kiscon-htmlviewer {
    border: 1px solid #c8d4df;
    border-radius: 8px;
    overflow: hidden;
    background: #dfe5ea;
}

.kiscon-htmlviewer-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid #b9c5cf;
    background: #f8fafc;
}

.kiscon-htmlviewer-toolbar strong {
    color: #2b3b4c;
}

.kiscon-viewer-form {
    margin-left: auto;
}

.kiscon-htmlviewer-viewport {
    max-height: 78vh;
    overflow: auto;
    padding: 1.2rem;
    background: #eef2f5;
}

.kiscon-report-paper {
    width: min(100%, 820px);
    min-height: 920px;
    margin: 0 auto;
    padding: 3.2rem 3rem;
    border: 1px solid #8e8e8e;
    background: #fff;
    color: #111;
    box-shadow: 0 8px 18px rgba(21, 34, 53, 0.16);
}

.kiscon-report-issue {
    margin: 0 0 1rem;
    text-align: right;
    font-size: 0.86rem;
}

.kiscon-report-paper h2 {
    margin: 1.2rem 0 1.5rem;
    text-align: center;
    color: #000;
    font-size: 1.65rem;
    font-weight: 800;
}

.kiscon-certificate-table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    table-layout: fixed;
    color: #000;
    font-size: 0.92rem;
}

.kiscon-certificate-table th,
.kiscon-certificate-table td {
    border: 1px solid #111;
    padding: 0.58rem 0.65rem;
    vertical-align: middle;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.kiscon-certificate-table th {
    background: #cfcfcf;
    text-align: center;
    font-weight: 700;
}

.kiscon-certificate-items td {
    text-align: center;
}

.kiscon-info-board {
    margin-top: 0.8rem;
}

.kiscon-table-board {
    display: grid;
    gap: 1rem;
    margin-top: 0.8rem;
}

.property-owner-search-panel textarea {
    min-height: 5.4rem;
    resize: vertical;
    font-family: "Consolas", "Malgun Gothic", monospace;
}

.property-info-search-panel textarea {
    min-height: 5.4rem;
    resize: vertical;
    font-family: "Consolas", "Malgun Gothic", monospace;
}

.property-info-auth-panel .full-row {
    grid-column: 1 / -1;
}

.property-info-auth-clear-form {
    margin-top: 0.75rem;
}

.inline-fields {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.inline-fields input {
    min-width: 0;
}

.property-info-captcha-input {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.property-info-captcha-input img {
    width: 9rem;
    height: 3rem;
    object-fit: contain;
    border: 1px solid var(--line);
    background: #fff;
}

.property-info-captcha-input input {
    flex: 0 0 9rem;
    width: 9rem;
    min-width: 9rem;
}

.property-info-captcha-form {
    display: grid;
    grid-template-columns: minmax(12rem, 20rem) auto;
    gap: 0.55rem;
    align-items: end;
    margin-top: 1rem;
}

.property-info-captcha-form label {
    grid-column: 1 / -1;
    font-weight: 700;
}

.property-info-captcha-form .property-info-captcha-input {
    grid-column: 1 / -1;
}

.property-info-captcha-form .form-actions {
    grid-column: 1 / -1;
}

.property-info-section .table-wrap,
.property-info-sgg-panel .table-wrap {
    max-height: 34rem;
}

.property-info-certificate-panel {
    overflow: hidden;
}

.property-info-viewer-toolbar {
    gap: 0.65rem;
}

.property-info-viewer-page,
.property-info-viewer-zoom {
    border: 1px solid #c6cbd3;
    border-radius: 4px;
    background: #fff;
    color: #111;
    font-size: 0.82rem;
    line-height: 1;
    padding: 0.36rem 0.55rem;
}

.property-info-certificate-viewport {
    max-height: 82vh;
    background: #e7eaee;
}

.property-info-certificate-pages {
    display: grid;
    justify-content: center;
    min-width: max-content;
}

.property-info-certificate-page[hidden] {
    display: none !important;
}

.property-info-report-paper {
    width: 1040px;
    max-width: none;
    min-height: 0;
    padding: 2.3rem 2.15rem;
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
}

.property-info-cert-table {
    width: 100%;
    margin: 0 0 0.34rem;
    border-collapse: collapse;
    table-layout: fixed;
    color: #000;
    font-size: 0.78rem;
}

.property-info-cert-table th,
.property-info-cert-table td {
    border: 1px solid #333;
    padding: 0.28rem 0.34rem;
    vertical-align: middle;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.property-info-cert-table th {
    background: #efefef;
    font-weight: 700;
    text-align: center;
}

.property-info-cert-head th {
    width: 5.2rem;
}

.property-info-cert-head td {
    font-weight: 600;
}

.property-info-cert-title {
    width: 19rem;
    text-align: center;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0;
}

.property-info-cert-band {
    background: #bdbdbd !important;
    color: #000;
    font-size: 0.86rem;
}

.property-info-cert-compact th,
.property-info-cert-compact td {
    text-align: center;
}

.property-info-cert-compact td {
    min-height: 1.5rem;
}

.property-info-cert-footer {
    margin-top: 0.7rem;
    color: #000;
    font-size: 0.86rem;
}

.property-info-cert-footer p {
    margin: 0.2rem 0;
}

.property-info-cert-footer > div {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1.2rem;
    align-items: end;
    margin-top: 0.4rem;
}

.property-info-cert-footer strong {
    font-size: 1.12rem;
}

.property-info-cert-footer b {
    display: inline-block;
    min-width: 5.8rem;
    border: 1px solid #222;
    padding: 0.36rem 0.6rem;
    text-align: center;
    font-size: 1rem;
}

.property-info-cert-owner {
    text-align: right;
}

.property-info-detail-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #111;
    font-size: 0.88rem;
}

.property-info-detail-page-head strong {
    font-size: 1rem;
}

.property-info-report-paper h3 {
    margin: 0 0 1rem;
    color: #111;
    text-align: center;
    font-size: 1.28rem;
}

.property-info-detail-table {
    font-size: 0.72rem;
}

.property-info-detail-table th,
.property-info-detail-table td {
    padding: 0.3rem 0.34rem;
}

.property-owner-clear-cookie-form {
    margin-top: 0.75rem;
}

.property-owner-summary-grid,
.property-owner-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.75rem;
}

.property-owner-summary-grid > div,
.property-owner-result-grid > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.7rem;
    background: #f7f9fc;
}

.property-owner-summary-grid span,
.property-owner-result-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.property-owner-summary-grid strong,
.property-owner-result-grid strong {
    display: block;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.property-owner-main-owner {
    grid-column: span 2;
}

.property-owner-main-owner strong {
    color: var(--brand-strong);
    font-size: 1.28rem;
}

.property-owner-main-owner small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
}

.property-owner-field-table-wrap {
    margin-top: 1rem;
}

.property-owner-field-table th {
    width: 11rem;
}

.property-owner-candidate-table td form {
    margin: 0;
}

.property-owner-warning-list {
    color: #8a5a00;
}

.lookup-history-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.7rem;
}

.lookup-history-search-form .btn-ghost {
    grid-column: 1 / -1;
    justify-self: start;
}

.lookup-history-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.lookup-history-check-cell {
    width: 3rem;
    text-align: center;
}

.lookup-history-check-cell input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

.lookup-history-delete-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.corporate-registry-search-panel input[type="password"] {
    font-family: "Consolas", "Malgun Gothic", monospace;
}

.corporate-registry-search-panel [data-corporate-credential-field]:disabled {
    border-color: var(--line);
    background: #eef2f6;
    color: #5c6877;
    cursor: not-allowed;
}

.corporate-registry-provider-options {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.55rem;
}

.corporate-registry-provider-options .choice-card {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    min-height: 4.2rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
}

.corporate-registry-provider-options .choice-card input {
    margin-top: 0.22rem;
}

.corporate-registry-provider-options .choice-card strong,
.corporate-registry-provider-options .choice-card small {
    display: block;
}

.corporate-registry-provider-options .choice-card small {
    margin-top: 0.2rem;
    color: var(--muted);
}

.corporate-registry-provider-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(9rem, 0.28fr) minmax(0, 1fr);
    gap: 0.6rem;
    align-items: center;
    padding: 0.8rem;
    border: 1px solid #d9e4ef;
    border-radius: 8px;
    background: #fbfdff;
}

.corporate-registry-provider-fields[hidden] {
    display: none;
}

.corporate-registry-provider-fields .hint {
    grid-column: 1 / -1;
    margin: 0;
}

@media (max-width: 767px) {
    .corporate-registry-provider-options,
    .corporate-registry-provider-fields {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
    }
}

.corporate-registry-search-panel .corporate-required-label {
    color: var(--danger);
}

.corporate-registry-search-panel .required-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.15rem;
    margin-left: 0.35rem;
    padding: 0.08rem 0.34rem;
    border-radius: 999px;
    background: rgba(196, 54, 49, 0.1);
    color: var(--danger);
    font-size: 0.72rem;
    font-weight: 800;
    vertical-align: middle;
}

.corporate-registry-upload-panel .required-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.15rem;
    margin-left: 0.35rem;
    padding: 0.08rem 0.34rem;
    border-radius: 999px;
    background: rgba(196, 54, 49, 0.1);
    color: var(--danger);
    font-size: 0.72rem;
    font-weight: 800;
    vertical-align: middle;
}

.corporate-registry-search-panel .required-badge[hidden] {
    display: none;
}

.corporate-registry-search-panel .corporate-required-field {
    border-color: rgba(196, 54, 49, 0.72);
    background: #fff8f7;
}

.corporate-registry-search-panel .corporate-required-field:focus {
    outline-color: rgba(196, 54, 49, 0.2);
}

.corporate-registry-clear-form {
    margin-top: 0.75rem;
}

.corporate-registry-manual-collect {
    margin-top: 0.9rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.corporate-registry-manual-collect[hidden] {
    display: none;
}

.corporate-registry-manual-collect summary {
    cursor: pointer;
    color: #163a5f;
    font-weight: 800;
}

.corporate-registry-collect-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.corporate-registry-payment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.corporate-registry-payment-actions form,
.corporate-registry-candidate-table form {
    margin: 0;
}

.corporate-registry-upload-panel input[type="file"] {
    padding: 0.65rem;
    border: 1px dashed #9fb1c5;
    border-radius: 8px;
    background: #f8fafc;
}

.corporate-registry-upload-results .table-wrap {
    margin-bottom: 0.85rem;
}

.corporate-registry-upload-progress {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.35rem;
    padding: 0.68rem 0.8rem;
    border: 1px solid #c6ddf8;
    border-radius: 8px;
    background: var(--brand-soft);
    color: #1d4f85;
    font-size: 0.88rem;
}

.corporate-registry-upload-progress[hidden] {
    display: none;
}

.corporate-registry-upload-progress strong,
.corporate-registry-upload-progress span {
    display: block;
}

.corporate-registry-upload-progress ul {
    margin: 0.25rem 0 0;
    padding-left: 1.1rem;
}

.corporate-registry-upload-table td {
    vertical-align: top;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.corporate-registry-extra-fields {
    grid-column: 1 / -1;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.7rem;
    background: #f8fafc;
}

.corporate-registry-extra-fields summary {
    cursor: pointer;
    font-weight: 700;
}

.corporate-registry-extra-fields .form-grid {
    margin-top: 0.7rem;
}

.corporate-registry-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.75rem;
}

.corporate-registry-summary-grid > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.7rem;
    background: #f7f9fc;
}

.corporate-registry-summary-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.corporate-registry-summary-grid strong {
    display: block;
    overflow-wrap: anywhere;
}

.corporate-registry-pdf-panel .summary-head {
    align-items: center;
}

.corporate-registry-pdf-js-viewer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.corporate-registry-pdf-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.corporate-registry-pdf-page-indicator,
.corporate-registry-pdf-zoom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4rem;
    min-height: 2rem;
    padding: 0 0.55rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 700;
}

.corporate-registry-pdf-status {
    min-height: 1.25rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.corporate-registry-pdf-status[data-state="error"] {
    color: var(--danger);
    font-weight: 700;
}

.corporate-registry-pdf-canvas-wrap {
    width: 100%;
    min-height: 520px;
    max-height: min(78vh, 860px);
    overflow: auto;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef2f7;
    text-align: center;
}

.corporate-registry-pdf-canvas-wrap canvas {
    display: inline-block;
    max-width: 100%;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    vertical-align: top;
}

.corporate-registry-search-list-table td form {
    margin: 0;
}

.corporate-registry-raw-row td {
    background: #fbfcfe;
    color: var(--muted);
    font-size: 0.82rem;
}

.corporate-registry-field-table th {
    width: 15rem;
}

.corporate-registry-inline-pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-family: inherit;
}

.corporate-registry-file-data {
    min-height: 12rem;
    font-family: "Consolas", "Malgun Gothic", monospace;
    font-size: 0.82rem;
}

.corporate-registry-raw-response pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 0.82rem;
}

.kiscon-clean-table {
    border-collapse: collapse;
    background: #fff;
}

.kiscon-clean-table th,
.kiscon-clean-table td {
    border: 1px solid #d9e3ed;
    padding: 0.62rem 0.7rem;
    vertical-align: top;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.kiscon-clean-table th {
    background: #edf6fd;
    color: #1d3959;
    text-align: center;
    font-weight: 800;
}

.kiscon-clean-table tbody tr:nth-child(even) td {
    background: #fbfdff;
}

.kiscon-inline-pre,
.kiscon-detail-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: keep-all;
    overflow-wrap: anywhere;
    font-family: inherit;
}

.kiscon-detail-block {
    margin-top: 0.9rem;
}

.kiscon-detail-block summary,
.kiscon-more-tables summary {
    cursor: pointer;
    color: var(--brand-strong);
    font-weight: 700;
}

.kiscon-detail-block pre {
    margin-top: 0.6rem;
    max-height: 24rem;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.75rem;
    background: #f8fafc;
}

.kiscon-field-table td:first-child {
    width: 12rem;
    font-weight: 700;
    color: var(--ink);
    background: #f2f7fc;
}

.kiscon-result-table-wrap {
    margin-top: 0.75rem;
}

.kiscon-table-title {
    margin: 0 0 0.45rem;
    color: #1d3959;
    font-size: 0.98rem;
}

.kiscon-empty-message {
    margin: 0;
    padding: 0.9rem 1rem;
    border: 1px solid #d9e3ed;
    border-radius: 8px;
    background: #f8fbfe;
}

.kiscon-warning-list {
    margin-bottom: 0;
}

@media (max-width: 720px) {
    .corporate-registry-pdf-panel .summary-head {
        align-items: flex-start;
    }

    .corporate-registry-pdf-toolbar {
        align-items: stretch;
    }

    .corporate-registry-pdf-toolbar .btn {
        flex: 1 1 calc(33.333% - 0.45rem);
        white-space: nowrap;
    }

    .corporate-registry-pdf-page-indicator,
    .corporate-registry-pdf-zoom {
        flex: 1 1 calc(33.333% - 0.45rem);
    }

    .corporate-registry-pdf-canvas-wrap {
        min-height: 360px;
        max-height: 68vh;
        padding: 0.5rem;
    }

    .kiscon-htmlviewer-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .kiscon-viewer-form {
        margin-left: 0;
    }

    .kiscon-htmlviewer-viewport {
        padding: 0.65rem;
    }

    .kiscon-report-paper {
        min-height: 0;
        padding: 1.2rem 0.9rem;
    }

    .kiscon-certificate-table {
        font-size: 0.78rem;
    }

    .kiscon-certificate-table th,
    .kiscon-certificate-table td {
        padding: 0.42rem 0.35rem;
    }

    .property-info-report-paper {
        min-width: 980px;
        padding: 1.55rem 1.35rem;
    }

    .property-info-cert-table {
        font-size: 0.72rem;
    }

    .property-info-cert-title {
        font-size: 1.04rem;
    }

    .property-info-cert-footer > div {
        grid-template-columns: 1fr auto auto;
    }
}

.bg-orb {
    display: none;
}

.orb-1 {
    width: 240px;
    height: 240px;
    top: -40px;
    right: -40px;
    background: transparent;
}

.orb-2 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -70px;
    background: transparent;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 1px 0 rgba(21, 34, 47, 0.04);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    color: var(--ink);
    font-weight: 700;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    place-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: #fff;
    background: var(--brand);
    font-size: 0.82rem;
    letter-spacing: 0;
}

.brand-title {
    max-width: min(52vw, 300px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(0.86rem, 2.1vw, 0.98rem);
}

.menu-toggle {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    padding: 0.42rem 0.72rem;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    min-height: 2.2rem;
}

.main-nav {
    display: none;
}

.main-nav[data-open="true"] {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 1rem;
    right: 1rem;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 24px rgba(21, 34, 47, 0.12);
    max-height: calc(100vh - 84px);
    overflow-y: auto;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.42rem 0.55rem;
    border-radius: 7px;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 650;
}

.main-nav a:hover {
    background: var(--bg-muted);
    text-decoration: none;
}

.pwa-install-topbar-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.pwa-debug-panel {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 95;
    display: grid;
    gap: 0.55rem;
    width: min(360px, calc(100vw - 2rem));
    max-height: min(78vh, 620px);
    overflow-y: auto;
    padding: 0.85rem;
    border: 1px solid rgba(15, 108, 191, 0.22);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(21, 34, 53, 0.16);
}

.pwa-debug-title {
    color: var(--ink);
    font-size: 0.95rem;
}

.pwa-debug-body {
    display: grid;
    gap: 0.3rem;
}

.pwa-debug-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.pwa-debug-row strong {
    color: var(--ink);
    text-align: right;
}

.pwa-debug-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
}

.inline-form {
    margin: 0;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.68rem;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 0.82rem;
    font-weight: 600;
}

.container {
    width: min(1180px, calc(100vw - 1rem));
    margin: clamp(0.7rem, 2vw, 1.15rem) auto clamp(1.4rem, 3vw, 2rem);
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
    padding: 0.1rem 0 0.35rem;
    border-bottom: 1px solid var(--line);
}

.page-title {
    margin: 0;
    font-size: 1.22rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.panel {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(0.85rem, 1.35vw, 1.05rem);
    box-shadow: var(--shadow);
    margin-bottom: 0.85rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.stat-card {
    min-height: 5.4rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.85rem;
    box-shadow: var(--shadow);
}

.stat-label {
    margin: 0 0 0.3rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.stat-value {
    margin: 0;
    font-weight: 800;
    font-size: 1.28rem;
    line-height: 1.22;
}

.section-title {
    margin-top: 0;
    margin-bottom: 0.7rem;
    font-size: 1rem;
    line-height: 1.3;
    letter-spacing: 0;
}

.alert {
    padding: 0.68rem 0.85rem;
    border-radius: var(--radius);
    margin-bottom: 0.7rem;
    border: 1px solid transparent;
    font-size: 0.92rem;
}

.alert-success {
    background: #edf8f2;
    border-color: #b4e2c1;
    color: #22583b;
}

.alert-error {
    background: #fff1f1;
    border-color: #f0c4c4;
    color: #7f2a2a;
}

.alert-info {
    background: var(--brand-soft);
    border-color: #c6ddf8;
    color: #1d4f85;
}

.alert-warning {
    background: #fff7e8;
    border-color: #f0dcaa;
    color: #7b5a1d;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.46rem 0.82rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
    min-height: 2.2rem;
    touch-action: manipulation;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-strong);
}

.btn-secondary {
    background: #f6f9fc;
    color: #1c3554;
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    background: var(--brand-soft);
    border-color: #9eb9d5;
}

.btn-danger {
    background: #fff4f4;
    color: var(--danger);
    border-color: #f0c7c5;
}

.btn-danger:hover {
    background: #ffe5e5;
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    background: var(--bg-muted);
}

.btn-sm {
    padding: 0.32rem 0.58rem;
    font-size: 0.82rem;
    min-height: 1.9rem;
}

.form-stack,
.form-grid {
    display: grid;
    gap: 0.6rem;
}

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

label {
    font-size: 0.86rem;
    color: #26384d;
    font-weight: 700;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.58rem 0.68rem;
    font-size: 0.92rem;
    background: #fff;
    min-height: 2.35rem;
    line-height: 1.35;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(21, 101, 179, 0.18);
    border-color: rgba(21, 101, 179, 0.55);
}

textarea {
    resize: vertical;
}

.form-actions {
    margin-top: 0.35rem;
}

.push-consent-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 80;
    display: grid;
    gap: 0.65rem;
    width: min(420px, calc(100vw - 2rem));
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(21, 34, 53, 0.16);
}

.push-consent-text strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--ink);
    font-size: 0.96rem;
}

.push-consent-text p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.push-consent-check {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    color: #2a3b4f;
    font-size: 0.86rem;
    line-height: 1.45;
}

.push-consent-check input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.15rem;
    flex: 0 0 auto;
}

.push-consent-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
}

.app-access-panel {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: min(1120px, calc(100vw - 2rem));
    margin: 0.75rem auto 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.app-access-copy {
    min-width: 0;
}

.app-access-copy strong {
    display: block;
    color: var(--ink);
    font-size: 0.95rem;
}

.app-access-copy p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.app-access-detail {
    color: #2a3b4f !important;
}

.app-access-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.push-stats {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.search-form {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: 1fr;
    align-items: center;
}

.address-search-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.address-search-status[data-state="error"] {
    color: var(--danger);
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

.responsive-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.responsive-table thead {
    display: none;
}

.responsive-table tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.58rem;
    margin-bottom: 0.5rem;
    background: #fff;
    box-shadow: var(--shadow);
}

.responsive-table tr.row-withdrawn {
    background: #fff2f2;
    border-color: #efc5c5;
}

.responsive-table td {
    display: flex;
    align-items: flex-start;
    gap: 0.72rem;
    font-size: 0.88rem;
    line-height: 1.42;
    padding: 0.32rem 0;
    border-bottom: 1px dashed #e5ebf2;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.responsive-table td:last-child {
    border-bottom: 0;
}

.responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
    flex-shrink: 0;
    flex-basis: 6.2rem;
    max-width: 42%;
    display: inline-block;
}

.dashboard-activity-table a {
    font-weight: 800;
}

.dashboard-meta-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.18rem 0.46rem;
    border: 1px solid #d7e5f2;
    border-radius: 6px;
    background: #eef5fb;
    color: #254a6b;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.dashboard-meta-chip.is-progress {
    border-color: #cde6d6;
    background: #edf8f1;
    color: #2b653d;
}

.dashboard-status-text {
    display: block;
    color: #173a5c;
    font-weight: 700;
    line-height: 1.45;
}

.dashboard-content-text {
    display: block;
    color: #23384e;
    line-height: 1.48;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.member-base-withdrawn-chip {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #e79b9b;
    background: #ffe8e8;
    color: #993737;
    font-size: 0.75rem;
    font-weight: 700;
}

.member-base-edit {
    margin-bottom: 0.45rem;
}

.member-base-edit summary {
    cursor: pointer;
    color: var(--brand-strong);
    font-size: 0.85rem;
    font-weight: 700;
}

.member-base-edit-form {
    margin-top: 0.45rem;
    border: 1px solid #dbe3ec;
    border-radius: var(--radius);
    background: #f8fbff;
    padding: 0.55rem;
}

.member-base-edit-form input,
.member-base-edit-form select,
.member-base-edit-form textarea {
    padding: 0.48rem 0.56rem;
    font-size: 0.86rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.actions form {
    margin: 0;
}

.stats-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.stats-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.34rem 0.68rem;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #f7f9fc;
    color: #1c3554;
    font-size: 0.83rem;
    font-weight: 700;
    line-height: 1.2;
}

.stats-tab:hover {
    text-decoration: none;
    background: var(--brand-soft);
}

.stats-tab.is-active {
    border-color: transparent;
    background: var(--brand);
    color: #fff;
}

.stats-row-actions {
    display: grid;
    gap: 0.45rem;
}

.stats-row-actions form {
    margin: 0;
}

.stats-row-actions .comment-form {
    margin-top: 0;
}

.auth-wrap {
    width: min(480px, 100%);
    margin: 7vh auto 0;
}

.auth-link {
    margin-top: 0.75rem;
}

.privacy-consent-box {
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
    font-size: 0.85rem;
}

.privacy-consent-box h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    color: var(--ink);
    font-size: 0.98rem;
}

.privacy-required {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #fff0f0;
    color: #b42318;
    font-size: 0.78rem;
    font-weight: 800;
}

.privacy-consent-box p {
    margin: 0;
    color: var(--muted);
}

.privacy-consent-list {
    display: grid;
    gap: 0.4rem;
    margin: 0;
}

.privacy-consent-list div {
    display: grid;
    gap: 0.15rem;
}

.privacy-consent-list dt {
    color: #27415f;
    font-weight: 800;
}

.privacy-consent-list dd {
    margin: 0;
    color: #3f5064;
}

.privacy-check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.45rem;
    align-items: flex-start;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1.45;
}

.privacy-check input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.12rem;
    accent-color: var(--brand);
}

.muted {
    color: var(--muted);
    font-size: 0.88rem;
}

.label {
    margin: 0 0 0.25rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.72rem;
}

.detail-grid > div {
    min-width: 0;
    padding: 0.62rem;
    border: 1px solid #e6ecf3;
    border-radius: var(--radius);
    background: #f8fafc;
}

.detail-grid p {
    margin-top: 0;
}

.detail-grid p:last-child {
    margin-bottom: 0;
}

.detail-grid .full {
    grid-column: 1 / -1;
}

.activity-list {
    display: grid;
    gap: 0.65rem;
}

.activity-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
    background: #fff;
    box-shadow: var(--shadow);
}

.drone-search-form {
    grid-template-columns: 1fr;
}

.drone-period-field {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.35rem;
    align-items: center;
}

.drone-period-field span {
    color: var(--muted);
    font-size: 0.85rem;
}

.drone-due-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    border: 1px solid #d6dde8;
    background: #f4f7fb;
    color: #35516f;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.drone-due-chip-expired {
    border-color: #edb9b9;
    background: #fff0f0;
    color: #8e3131;
}

.drone-due-chip-due_soon {
    border-color: #f0d59b;
    background: #fff8e8;
    color: #7f5b1f;
}

.drone-due-chip-valid {
    border-color: #b8dcc2;
    background: #edf9f0;
    color: #2d6f41;
}

.drone-due-chip-unset {
    border-color: #d6dde8;
    background: #f4f7fb;
    color: #48627e;
}

.drone-due-chip-approval-review_required {
    border-color: #efcb8f;
    background: #fff8ea;
    color: #8f5a14;
}

.drone-due-chip-approval-canceled {
    border-color: #eab2bc;
    background: #fff1f4;
    color: #9b2e45;
}

.drone-due-chip-approval-expired {
    border-color: #cfd6e2;
    background: #f3f5f9;
    color: #4a586c;
}

.drone-row-expired {
    background: #fff8f8;
    border-color: #efcbcb;
}

.drone-row-due_soon {
    background: #fffdf5;
    border-color: #f0e1be;
}

.drone-row-approval-review_required {
    background: #fffdf3;
    border-color: #ead3a3;
}

.drone-row-approval-canceled {
    background: #fff7f8;
    border-color: #e9c4cc;
}

.drone-row-approval-expired {
    background: #f7f8fa;
    border-color: #dbe1ea;
}

.drone-area-open {
    white-space: nowrap;
}

.drone-permit-area-panel {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.drone-permit-area-panel[hidden] {
    display: none;
}

.drone-permit-area-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.drone-permit-area-head .section-title {
    margin-bottom: 0.2rem;
}

.drone-permit-area-body {
    display: grid;
    gap: 0.9rem;
}

.drone-permit-area-left {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.drone-permit-area-list {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.drone-permit-area-item {
    margin: 0;
}

.drone-permit-area-select {
    display: grid;
    gap: 0.25rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #d6dde8;
    border-radius: var(--radius);
    background: #f8fafc;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.drone-permit-area-select:hover,
.drone-permit-area-select:focus,
.drone-permit-area-select.is-active {
    border-color: var(--primary);
    background: #eef6ff;
}

.drone-permit-area-select strong {
    font-size: 0.94rem;
}

.drone-permit-area-select span,
.drone-permit-area-select small {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.drone-permit-area-result {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
}

.drone-permit-area-result-title {
    margin: 0;
    font-size: 1rem;
}

.drone-permit-area-empty {
    border: 1px dashed #cfd6e2;
    border-radius: var(--radius);
    padding: 1rem;
    color: var(--muted);
    background: #f8fafc;
}

.drone-permit-area-map-wrap {
    display: grid;
    gap: 0.35rem;
}

.drone-permit-area-map {
    width: 100%;
    min-height: 330px;
    border: 1px solid #d6dde8;
    border-radius: var(--radius);
    overflow: hidden;
    background: #eef4fb;
}

.drone-permit-area-map-status {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.drone-airspace-layout {
    display: grid;
    gap: 0.9rem;
}

.drone-airspace-main,
.drone-airspace-side {
    display: grid;
    gap: 0.75rem;
}

.drone-airspace-toolbar {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: 1fr;
}

.drone-airspace-toolbar-block {
    display: grid;
    gap: 0.35rem;
}

.drone-airspace-address-box {
    display: grid;
    gap: 0.45rem;
}

.drone-airspace-map-actions {
    margin-top: 0.15rem;
}

.drone-airspace-map {
    width: 100%;
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #eef4fb;
}

.drone-airspace-empty {
    padding: 0.9rem;
    border: 1px dashed #ccd9e8;
    border-radius: 12px;
    background: #f8fbff;
    color: var(--muted);
    font-size: 0.9rem;
}

.drone-airspace-verdict-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.drone-airspace-verdict-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.72rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
    background: #edf3fb;
    color: #335a7d;
}

.drone-airspace-verdict-badge.is-restricted {
    background: #ffe8e8;
    color: #993131;
}

.drone-airspace-verdict-badge.is-permit {
    background: #fff5df;
    color: #8b5b12;
}

.drone-airspace-verdict-badge.is-caution {
    background: #eef7e8;
    color: #426a1f;
}

.drone-airspace-verdict-badge.is-normal {
    background: #edf3fb;
    color: #335a7d;
}

.drone-airspace-history-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.drone-airspace-summary {
    margin: 0;
    color: #264868;
    font-weight: 600;
}

.drone-airspace-meta {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.drone-airspace-meta div {
    display: grid;
    gap: 0.15rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #fbfdff;
}

.drone-airspace-meta dt {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.drone-airspace-meta dd {
    margin: 0;
    color: var(--ink);
    font-size: 0.92rem;
    word-break: break-word;
}

.drone-airspace-subtitle {
    margin: 0;
    font-size: 0.95rem;
}

.drone-airspace-layer-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.drone-airspace-layer-item {
    display: grid;
    gap: 0.15rem;
    padding: 0.68rem 0.72rem;
    border: 1px solid #d8e3ef;
    border-radius: 12px;
    background: #fff;
}

.drone-airspace-layer-item strong {
    color: #214667;
    font-size: 0.9rem;
}

.drone-airspace-layer-item span {
    color: #4a6177;
    font-size: 0.85rem;
    word-break: break-word;
}

.drone-airspace-history-list {
    display: grid;
    gap: 0.7rem;
}

.drone-airspace-history-card {
    display: grid;
    gap: 0.45rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.drone-airspace-history-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.drone-airspace-history-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.58rem;
    border-radius: 999px;
    background: #edf3fb;
    color: #335a7d;
    font-size: 0.78rem;
    font-weight: 700;
}

.drone-airspace-history-text {
    margin: 0;
    color: #37536d;
    font-size: 0.88rem;
}

.drone-airspace-history-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.7rem;
    color: var(--muted);
    font-size: 0.82rem;
}

input.drone-approval-input {
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.01em;
    border-width: 1px;
    border-style: solid;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease;
    caret-color: currentColor;
}

input.drone-approval-input:focus {
    box-shadow: 0 0 0 3px rgba(45, 114, 184, 0.14);
}

input.drone-approval-input.drone-approval-input-normal,
input.drone-approval-input.drone-approval-input-unset {
    border-color: #d6dde8;
    background: #f4f7fb;
    color: #48627e;
}

input.drone-approval-input.drone-approval-input-requested {
    border-color: #dd9393;
    background: #d36464;
    color: #fff;
}

input.drone-approval-input.drone-approval-input-completed {
    border-color: #58b984;
    background: #3fb56f;
    color: #fff;
}

input.drone-approval-input.drone-approval-input-unneeded {
    border-color: #54b98b;
    background: #39b67d;
    color: #fff;
}

input.drone-approval-input.drone-approval-input-review_required {
    border-color: #a58ae7;
    background: #8a68d9;
    color: #fff;
    font-weight: 700;
}

input.drone-approval-input.drone-approval-input-canceled {
    border-color: #eab2bc;
    background: #fff1f4;
    color: #8a2b3f;
    font-weight: 700;
}

input.drone-approval-input.drone-approval-input-expired {
    border-color: #cfd6e2;
    background: #f3f5f9;
    color: #4a586c;
    font-weight: 700;
}

input.drone-approval-input.drone-approval-input-impossible {
    border-color: #d7a27f;
    background: #fff1e6;
    color: #8f4b17;
    font-weight: 700;
}

input.drone-approval-input.drone-approval-input-in_progress {
    border-color: #8fbce9;
    background: #edf5ff;
    color: #2f6296;
    font-weight: 700;
}

.activity-head {
    display: flex;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #edf1f5;
}

.activity-status {
    display: inline-flex;
    padding: 0.22rem 0.52rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: #10568e;
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.attachment-list ul,
.comment-list {
    margin: 0.4rem 0;
    padding-left: 1rem;
}

.photo-grid {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.photo-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 0.5rem;
    box-shadow: var(--shadow);
}

.photo-thumb-link {
    display: block;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid #dbe3ec;
    cursor: zoom-in;
}

.photo-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #eef3f9;
    display: block;
}

.photo-thumb-fallback {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 7px;
    border: 1px dashed #c9d6e6;
    background: #f5f8fc;
    color: #5f6c7d;
    display: grid;
    place-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.photo-name {
    margin: 0.42rem 0 0.12rem;
    font-size: 0.82rem;
    line-height: 1.3;
    word-break: break-all;
}

.photo-size {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.photo-actions {
    margin-top: 0.45rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.photo-actions form {
    margin: 0;
}

.business-card-gallery {
    grid-template-columns: 1fr;
}

.business-card-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.business-card-thumb {
    aspect-ratio: 16 / 10;
}

.business-card-title {
    margin-bottom: 0;
}

.business-card-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0.1rem 0;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
}

.business-card-status-success {
    background: #e9f8ef;
    border-color: #b9e4c9;
    color: #16683a;
}

.business-card-status-failed {
    background: #ffefef;
    border-color: #f4c7c7;
    color: #9d3131;
}

.business-card-status-pending {
    background: #edf4fc;
    border-color: #cbddf1;
    color: #2b4f75;
}

.business-card-meta {
    margin: 0.15rem 0;
    display: grid;
    gap: 0.3rem;
}

.business-card-meta div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0.35rem;
    font-size: 0.82rem;
}

.business-card-meta dt {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.business-card-meta dd {
    margin: 0;
    color: var(--ink);
    line-height: 1.3;
    word-break: break-word;
}

.business-card-meta-detail div {
    grid-template-columns: 80px 1fr;
    font-size: 0.9rem;
}

.local-preview {
    margin-top: 0.2rem;
}

.local-preview:empty {
    display: none;
}

.batch-progress {
    margin-top: 0.65rem;
    padding: 0.65rem 0.7rem 0.62rem;
    border: 1px solid #cfdeef;
    border-radius: 12px;
    background: #f7fbff;
}

.batch-progress[hidden] {
    display: none;
}

.batch-progress-head {
    margin: 0 0 0.36rem;
    color: #1f436a;
    font-size: 0.84rem;
    font-weight: 700;
}

.batch-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    color: #335676;
    font-size: 0.82rem;
}

.batch-progress-bar {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e2ebf7;
    overflow: hidden;
}

.batch-progress-fill {
    display: block;
    width: 0%;
    height: 100%;
    background: var(--brand);
    transition: width 0.18s ease;
}

.comment-list li {
    margin-bottom: 0.35rem;
}

.comment-list time {
    display: inline-block;
    margin-left: 0.45rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.comment-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.45rem;
    margin-top: 0.6rem;
}

.hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

body.drone-modal-open {
    overflow: hidden;
}

.drone-progress-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(8, 17, 27, 0.62);
}

.drone-progress-modal[hidden] {
    display: none;
}

.drone-progress-card {
    width: min(680px, 96vw);
    max-height: 86vh;
    overflow: auto;
    border: 1px solid #c7d8eb;
    border-radius: 14px;
    padding: 0.95rem;
    background: #fff;
    box-shadow: 0 18px 34px rgba(10, 24, 38, 0.2);
}

.drone-progress-elapsed {
    margin-top: 0.45rem;
    color: #23496f;
    font-size: 0.84rem;
    font-weight: 700;
}

.drone-progress-log {
    margin: 0.55rem 0 0;
    padding: 0.55rem 0.68rem;
    border: 1px solid #d5e1ef;
    border-radius: 10px;
    background: #f8fbff;
    max-height: 48vh;
    overflow: auto;
    list-style: none;
}

.drone-progress-log li {
    padding: 0.3rem 0;
    border-bottom: 1px dashed #d8e4f1;
    color: #224565;
    font-size: 0.84rem;
}

.drone-progress-log li:last-child {
    border-bottom: 0;
}

.drone-progress-actions {
    margin-top: 0.8rem;
    justify-content: flex-end;
}

.drone-progress-actions .btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.drone-choice-modal {
    position: fixed;
    inset: 0;
    z-index: 1350;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(8, 17, 27, 0.62);
}

.drone-choice-modal[hidden] {
    display: none;
}

.drone-choice-card {
    width: min(620px, 96vw);
    border: 1px solid #c7d8eb;
    border-radius: 14px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 18px 34px rgba(10, 24, 38, 0.2);
}

.drone-choice-options {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.drone-choice-option {
    display: grid;
    gap: 0.3rem;
    padding: 0.9rem;
    border: 1px solid #d5e1ef;
    border-radius: 12px;
    background: #f8fbff;
    cursor: pointer;
}

.drone-choice-option:has(input:checked) {
    border-color: #2d72b8;
    background: #edf5ff;
    box-shadow: inset 0 0 0 1px rgba(45, 114, 184, 0.15);
}

.drone-choice-option input {
    margin: 0;
}

.drone-choice-option-title {
    font-weight: 700;
    color: #163a5d;
}

.drone-choice-option-text {
    color: #44617e;
    font-size: 0.9rem;
}

.drone-choice-actions {
    margin-top: 0.95rem;
    justify-content: flex-end;
}

.token-mask-line {
    max-width: 100%;
}

.token-mask-value {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
    vertical-align: top;
}

.token-warning {
    color: #9d3131;
    font-weight: 700;
}

.permission-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
    align-items: center;
}

.permission-box {
    margin: 0;
}

.permission-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

.permission-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    color: #2a3b4f;
}

.permission-check input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.pagination {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.pagination-link {
    min-width: 2.2rem;
    padding: 0.36rem 0.62rem;
    border: 1px solid #cfdeef;
    border-radius: 10px;
    background: #eff5fb;
    color: #1c3554;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.2;
}

a.pagination-link:hover {
    text-decoration: none;
    background: #dfebf8;
}

button.pagination-link {
    cursor: pointer;
}

button.pagination-link:hover:not(:disabled) {
    background: #dfebf8;
}

button.pagination-link:disabled {
    cursor: default;
}

.pagination-link.is-current {
    border-color: transparent;
    background: var(--brand);
    color: #fff;
}

.pagination-link.is-disabled {
    border-color: #d6dde6;
    background: #f3f5f7;
    color: #96a2b2;
    cursor: default;
}

.pagination-ellipsis {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    padding: 0 0.15rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    background: rgba(12, 20, 30, 0.82);
    padding: 1rem;
}

.lightbox-overlay[hidden] {
    display: none;
}

.lightbox-dialog {
    position: relative;
    width: min(96vw, 1200px);
    max-height: 92vh;
    display: grid;
    place-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    background: #fff;
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    min-width: 64px;
    height: 36px;
    padding: 0 0.75rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #12253b;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

.lightbox-close:hover {
    background: #fff;
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    min-width: 72px;
    height: 40px;
    padding: 0 0.8rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #12253b;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

.lightbox-nav:hover {
    background: #fff;
}

.lightbox-nav[hidden] {
    display: none;
}

.lightbox-nav-prev {
    left: 1rem;
}

.lightbox-nav-next {
    right: 1rem;
}

.lightbox-counter {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 2;
    min-width: 78px;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    background: rgba(18, 37, 59, 0.88);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

@media (max-width: 599px) {
    .topbar {
        padding: 0.72rem 0.72rem;
    }

    .main-nav[data-open="true"] {
        left: 0.55rem;
        right: 0.55rem;
        padding: 0.72rem;
    }

    .container {
        width: calc(100vw - 0.7rem);
    }

    .app-access-panel {
        flex-direction: column;
        align-items: stretch;
        width: calc(100vw - 1rem);
        margin-top: 0.55rem;
        padding: 0.72rem;
    }

    .app-access-actions {
        justify-content: stretch;
    }

    .app-access-actions .btn {
        flex: 1 1 0;
    }

    .page-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-head .actions {
        width: 100%;
    }

    .page-head .actions .btn,
    .panel .actions .btn {
        flex: 1 1 100%;
    }

    .responsive-table td {
        gap: 0.55rem;
    }

    .responsive-table td::before {
        flex-basis: 5.4rem;
        max-width: 46%;
        font-size: 0.82rem;
    }
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }

    .search-form {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .drone-search-form {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .form-grid {
        grid-template-columns: 170px 1fr;
        align-items: center;
    }

    .drone-airspace-toolbar {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .form-grid .hint,
    .form-grid .form-actions,
    .form-grid .local-preview,
    .form-grid .address-search-actions {
        grid-column: 2;
    }

    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (min-width: 960px) {
    .permission-row {
        grid-template-columns: 1fr 320px;
    }
}

@media (min-width: 720px) {
    .business-card-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1120px) {
    .business-card-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1600px) {
    .business-card-gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .topbar {
        padding: 0.74rem 1.25rem;
    }

    .menu-toggle {
        display: none;
    }

    .main-nav,
    .main-nav[data-open="true"] {
        position: static;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 0.6rem 0.75rem;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
        max-height: none;
        overflow: visible;
    }

    .main-nav a {
        padding: 0.34rem 0.52rem;
    }

    .drone-search-form {
        grid-template-columns: minmax(220px, 1fr) 220px 220px auto;
    }

    .drone-airspace-layout {
        grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
        align-items: start;
    }

    .drone-permit-area-body {
        grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
        align-items: start;
    }

    .container {
        width: min(1240px, 96vw);
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .responsive-table thead {
        display: table-header-group;
    }

    .responsive-table tr {
        display: table-row;
        border: 0;
        border-radius: 0;
        padding: 0;
        margin-bottom: 0;
        box-shadow: none;
    }

    .responsive-table th,
    .responsive-table td {
        display: table-cell;
        padding: 0.62rem 0.56rem;
        border-bottom: 1px solid var(--line);
        font-size: 0.86rem;
        vertical-align: top;
    }

    .responsive-table th {
        background: #f2f5f8;
        color: #36495f;
        font-size: 0.8rem;
        font-weight: 800;
        text-align: left;
        white-space: nowrap;
    }

    .responsive-table tbody tr:hover {
        background: #f8fbff;
    }

    .responsive-table td::before {
        content: none;
    }

    .dashboard-activity-table {
        min-width: 1580px;
        table-layout: fixed;
    }

    .dashboard-activity-table th,
    .dashboard-activity-table td {
        padding: 0.66rem 0.58rem;
    }

    .dashboard-activity-table td:last-child {
        border-bottom: 1px solid var(--line);
    }

    .dashboard-activity-table .col-date {
        width: 5.6rem;
        white-space: nowrap;
    }

    .dashboard-activity-table .col-site {
        width: 14.6rem;
    }

    .dashboard-activity-table .col-address {
        width: 17rem;
    }

    .dashboard-activity-table .col-contractor {
        width: 8rem;
    }

    .dashboard-activity-table .col-branch {
        width: 7rem;
    }

    .dashboard-activity-table .col-progress {
        width: 8.5rem;
    }

    .dashboard-activity-table .col-writer {
        width: 5.4rem;
    }

    .dashboard-activity-table .col-status {
        width: 12.6rem;
    }

    .dashboard-activity-table .col-content {
        width: 19.4rem;
    }

    .detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .permission-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .container {
        width: min(1440px, 96.8vw);
    }
}

@media (min-width: 720px) {
    .property-info-captcha-form {
        grid-template-columns: max-content auto;
    }

    .property-info-captcha-form .property-info-captcha-input {
        grid-column: 1;
    }

    .property-info-captcha-form .form-actions {
        grid-column: 2;
    }
}

@media (min-width: 1440px) {
    .container {
        width: min(1660px, 97.2vw);
    }
}

@media (min-width: 1680px) {
    .container {
        width: min(1860px, 97.6vw);
    }
}

@media (min-width: 1920px) {
    .container {
        width: min(2060px, 98vw);
    }
}
