@font-face {
    font-family: "PromptLocal";
    src: url("../assets/webfonts/Prompt-Light.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "PromptLocal";
    src: url("../assets/webfonts/Prompt-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --ucheck-purple: #5b2b93;
    --ucheck-purple-2: #7440ad;
    --ucheck-purple-soft: #f4eefb;
    --ucheck-ink: #2f2738;
    --ucheck-muted: #726a78;
    --ucheck-border: #e7dff0;
    --ucheck-bg: #f8f6fb;
    --ucheck-white: #fff;
    --ucheck-success: #287a59;
    --ucheck-shadow: 0 18px 50px rgba(72, 43, 96, .13);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--ucheck-bg);
    color: var(--ucheck-ink);
    font-family: "PromptLocal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ucheck-shell { max-width: 980px; }

.ucheck-hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 62px;
    color: white;
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.14), transparent 27%),
        radial-gradient(circle at 0% 100%, rgba(255,255,255,.10), transparent 25%),
        linear-gradient(145deg, #3f176b 0%, var(--ucheck-purple) 55%, #7b4bb1 100%);
}

.ucheck-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -80px -10%;
    height: 130px;
    border-radius: 50% 50% 0 0;
    background: var(--ucheck-bg);
}

.brand-row {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 26px;
}

.brand-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 22px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 25px rgba(0,0,0,.13);
}

.brand-eyebrow {
    font-size: .78rem;
    opacity: .86;
    margin-bottom: 1px;
}

.brand-row h1 {
    margin: 0;
    font-size: clamp(1.75rem, 5vw, 2.7rem);
    line-height: 1.04;
    font-weight: 600;
}

.brand-row p {
    margin: 6px 0 0;
    font-size: .96rem;
    opacity: .92;
}

.search-card {
    position: relative;
    z-index: 3;
    width: min(100%, 700px);
    margin: 0 auto;
    padding: 24px;
    color: var(--ucheck-ink);
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 24px;
    box-shadow: var(--ucheck-shadow);
}

.search-head {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin-bottom: 21px;
}

.search-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--ucheck-purple);
    background: var(--ucheck-purple-soft);
    border-radius: 14px;
}

.search-head h2 {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 600;
}

.search-head p {
    margin: 5px 0 0;
    color: var(--ucheck-muted);
    font-size: .88rem;
    line-height: 1.55;
}

.form-label,
.verify-group legend {
    margin-bottom: 8px;
    font-size: .91rem;
    font-weight: 600;
}

.form-control {
    min-height: 52px;
    border: 1px solid var(--ucheck-border);
    border-radius: 14px;
    font-size: 1rem;
}

.form-control:focus {
    border-color: #a98ac8;
    box-shadow: 0 0 0 .23rem rgba(91,43,147,.10);
}

.verify-group {
    padding: 0;
    border: 0;
}

.verify-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.verify-switch label { cursor: pointer; }

.verify-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.verify-switch span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px;
    text-align: center;
    color: #645a6d;
    background: #faf9fb;
    border: 1px solid var(--ucheck-border);
    border-radius: 14px;
    transition: .18s ease;
}

.verify-switch input:checked + span {
    color: var(--ucheck-purple);
    background: var(--ucheck-purple-soft);
    border-color: #b99bd5;
    box-shadow: inset 0 0 0 1px rgba(91,43,147,.08);
    font-weight: 600;
}

.form-hint {
    margin-top: 7px;
    color: var(--ucheck-muted);
    font-size: .78rem;
}

.btn-search {
    min-height: 54px;
    color: white;
    background: linear-gradient(135deg, var(--ucheck-purple), var(--ucheck-purple-2));
    border: 0;
    border-radius: 15px;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(91,43,147,.20);
}

.btn-search:hover,
.btn-search:focus {
    color: white;
    background: linear-gradient(135deg, #4b207c, #6d39a3);
}

.privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 13px;
    color: #756e79;
    font-size: .75rem;
    text-align: center;
}

.content-area {
    position: relative;
    z-index: 4;
    margin-top: -15px;
    padding-bottom: 55px;
}

.quick-help {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 24px;
}

.quick-help-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 13px;
    align-items: center;
    padding: 17px;
    background: var(--ucheck-white);
    border: 1px solid var(--ucheck-border);
    border-radius: 18px;
}

.quick-help-card > i {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--ucheck-purple);
    background: var(--ucheck-purple-soft);
    border-radius: 14px;
    font-size: 1.2rem;
}

.quick-help-card h3 {
    margin: 0;
    font-size: .93rem;
    font-weight: 600;
}

.quick-help-card p {
    margin: 4px 0 0;
    color: var(--ucheck-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.btn-soft {
    color: var(--ucheck-purple);
    background: var(--ucheck-purple-soft);
    border: 1px solid #dbcceb;
    border-radius: 12px;
    font-size: .8rem;
}

.section-card {
    margin-bottom: 17px;
    padding: 20px;
    background: white;
    border: 1px solid var(--ucheck-border);
    border-radius: 21px;
    box-shadow: 0 8px 30px rgba(72,43,96,.06);
}

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

.section-title h2,
.section-title h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.result-count {
    color: var(--ucheck-purple);
    background: var(--ucheck-purple-soft);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .73rem;
    white-space: nowrap;
}

.result-list {
    display: grid;
    gap: 12px;
}

.case-card {
    width: 100%;
    padding: 17px;
    text-align: left;
    background: #fff;
    border: 1px solid var(--ucheck-border);
    border-radius: 17px;
    transition: .16s ease;
}

.case-card:hover {
    border-color: #bfa6d5;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(91,43,147,.08);
}

.case-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.case-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 5px 9px;
    color: var(--ucheck-purple);
    background: var(--ucheck-purple-soft);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
}

.case-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.case-card p {
    margin: 5px 0 0;
    color: var(--ucheck-muted);
    font-size: .82rem;
}

.case-arrow { color: var(--ucheck-purple); margin-top: 6px; }

.back-btn {
    margin-bottom: 12px;
    padding: 0;
    color: var(--ucheck-purple);
    background: transparent;
    border: 0;
    font-size: .86rem;
}

.detail-header {
    color: white;
    background: linear-gradient(135deg, #4a1f79, #7442ab);
    border: 0;
}

.detail-header .case-type {
    color: #4a1f79;
    background: rgba(255,255,255,.92);
}

.detail-header h2 {
    margin: 2px 0 7px;
    font-size: 1.28rem;
    font-weight: 600;
}

.detail-header p { margin: 0; opacity: .9; font-size: .86rem; }

.status-now {
    margin-top: 15px;
    padding: 15px;
    color: var(--ucheck-ink);
    background: rgba(255,255,255,.95);
    border-radius: 16px;
}

.status-now small {
    display: block;
    color: var(--ucheck-muted);
    font-size: .72rem;
}

.status-now strong {
    display: block;
    margin-top: 3px;
    color: var(--ucheck-purple);
    font-size: 1.08rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.info-item small {
    display: block;
    color: var(--ucheck-muted);
    font-size: .72rem;
}

.info-item strong {
    display: block;
    margin-top: 2px;
    font-size: .88rem;
    font-weight: 600;
}

.contact-box {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 15px;
    background: var(--ucheck-purple-soft);
    border-radius: 16px;
}

.contact-box small {
    display: block;
    color: var(--ucheck-muted);
    font-size: .72rem;
}

.contact-box strong {
    display: block;
    margin-top: 3px;
    font-size: .9rem;
}

.btn-call {
    flex: 0 0 auto;
    color: white;
    background: var(--ucheck-purple);
    border: 0;
    border-radius: 12px;
}

.timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-item {
    position: relative;
    padding: 0 0 21px 34px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 18px;
    bottom: -4px;
    width: 2px;
    background: #ded4e8;
}

.timeline-item:last-child::before { display: none; }

.timeline-dot {
    position: absolute;
    left: 2px;
    top: 2px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: white;
    background: #b6a8c2;
    border-radius: 50%;
    font-size: .58rem;
}

.timeline-item.current .timeline-dot {
    width: 22px;
    height: 22px;
    left: 0;
    top: 0;
    background: var(--ucheck-purple);
    box-shadow: 0 0 0 5px rgba(91,43,147,.11);
}

.timeline-status {
    font-size: .88rem;
    font-weight: 600;
}

.timeline-date {
    margin-top: 3px;
    color: var(--ucheck-muted);
    font-size: .74rem;
}

.file-list,
.appointment-list {
    display: grid;
    gap: 9px;
}

.file-item,
.appointment-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    color: var(--ucheck-ink);
    text-decoration: none;
    background: #fbfafc;
    border: 1px solid var(--ucheck-border);
    border-radius: 14px;
}

.file-item:hover { color: var(--ucheck-purple); }

.file-item i,
.appointment-item > i { color: var(--ucheck-purple); }

.file-item .meta,
.appointment-item .meta {
    margin-left: auto;
    color: var(--ucheck-muted);
    font-size: .72rem;
}

.line-cta {
    display: flex;
    align-items: center;
    gap: 13px;
}

.line-cta .line-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #2e7d5a;
    background: #edf8f1;
    border-radius: 15px;
    font-size: 1.45rem;
}

.line-cta h3 {
    margin: 0;
    font-size: .94rem;
    font-weight: 600;
}

.line-cta p {
    margin: 4px 0 0;
    color: var(--ucheck-muted);
    font-size: .77rem;
}

.line-cta .btn { margin-left: auto; }

.ucheck-footer {
    padding: 20px 0 28px;
    color: #807684;
    text-align: center;
    font-size: .76rem;
}

.empty-state {
    padding: 26px 18px;
    text-align: center;
}

.empty-state i {
    font-size: 2rem;
    color: #aa92be;
}

.empty-state h3 {
    margin: 12px 0 4px;
    font-size: 1rem;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    color: var(--ucheck-muted);
    font-size: .8rem;
}

@media (max-width: 767.98px) {
    .ucheck-hero { padding: 24px 0 54px; }
    .ucheck-shell { padding-left: 15px; padding-right: 15px; }
    .brand-logo { width: 58px; height: 58px; border-radius: 18px; }
    .brand-row { gap: 12px; margin-bottom: 20px; }
    .brand-eyebrow { font-size: .7rem; }
    .brand-row p { font-size: .8rem; }
    .search-card { padding: 19px 16px; border-radius: 21px; }
    .search-head h2 { font-size: 1.05rem; }
    .search-head p { font-size: .78rem; }
    .verify-switch { grid-template-columns: 1fr; }
    .verify-switch span { justify-content: flex-start; padding-left: 15px; }
    .quick-help { grid-template-columns: 1fr; }
    .quick-help-card { grid-template-columns: auto 1fr; }
    .quick-help-card .btn { grid-column: 1 / -1; }
    .info-grid { grid-template-columns: 1fr; }
    .contact-box { align-items: flex-start; flex-direction: column; }
    .btn-call { width: 100%; }
    .line-cta { align-items: flex-start; flex-wrap: wrap; }
    .line-cta .btn { width: 100%; margin-left: 0; }
}


/* ===== R2 additions ===== */
.quick-help-button {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}
.quick-help-button:hover {
    border-color: #bfa6d5;
    box-shadow: 0 8px 22px rgba(91,43,147,.07);
}
.quick-arrow {
    color: var(--ucheck-purple);
    font-size: .8rem;
}
.footer-brand {
    color: #625768;
    font-weight: 600;
    margin-bottom: 5px;
}
.stats-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 8px;
    line-height: 1.5;
}
.stats-line strong { color: var(--ucheck-purple); }
.stats-sub { margin-top: 2px; font-size: .72rem; }
.prototype-note { margin-top: 5px; opacity: .7; }

.v2-modal {
    border: 0;
    border-radius: 20px;
    overflow: hidden;
}
.v2-modal .modal-header {
    border-bottom: 1px solid var(--ucheck-border);
}
.v2-modal .modal-title {
    color: var(--ucheck-purple);
    font-size: 1rem;
    font-weight: 600;
}
.manual-step {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid #f0ebf4;
}
.manual-step > span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: var(--ucheck-purple);
    border-radius: 50%;
    font-weight: 600;
}
.manual-step strong { font-size: .9rem; }
.manual-step p {
    margin: 3px 0 0;
    color: var(--ucheck-muted);
    font-size: .78rem;
    line-height: 1.5;
}
.manual-note {
    margin-top: 14px;
    padding: 12px;
    color: #5e5264;
    background: var(--ucheck-purple-soft);
    border-radius: 13px;
    font-size: .76rem;
}
.office-list {
    display: grid;
    gap: 10px;
}
.office-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 13px;
    color: var(--ucheck-ink);
    text-decoration: none;
    background: #faf8fc;
    border: 1px solid var(--ucheck-border);
    border-radius: 14px;
}
.office-item:hover { color: var(--ucheck-purple); }
.office-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--ucheck-purple);
    background: var(--ucheck-purple-soft);
    border-radius: 12px;
}
.office-item strong {
    display: block;
    font-size: .84rem;
}
.office-item small {
    display: block;
    margin-top: 3px;
    color: var(--ucheck-muted);
    font-size: .74rem;
}
.office-phone {
    margin-left: auto;
    color: var(--ucheck-purple);
}

.survey-history-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 13px;
    padding: 13px;
    background: var(--ucheck-purple-soft);
    border-radius: 14px;
}
.survey-history-head > i {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--ucheck-purple);
    background: #fff;
    border-radius: 12px;
}
.survey-history-head small {
    display: block;
    color: var(--ucheck-muted);
    font-size: .7rem;
}
.survey-history-head strong {
    display: block;
    margin-top: 2px;
    font-size: .86rem;
}
.survey-history-head a {
    margin-left: auto;
    color: var(--ucheck-purple);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
}

.detail-tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}
.detail-tool {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 8px 10px;
    color: var(--ucheck-purple);
    background: #fff;
    border: 1px solid var(--ucheck-border);
    border-radius: 13px;
    font-size: .76rem;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}
.detail-tool:hover {
    color: var(--ucheck-purple);
    background: var(--ucheck-purple-soft);
}

@media (max-width: 767.98px) {
    .detail-tools { grid-template-columns: 1fr; }
    .survey-history-head { align-items: flex-start; flex-wrap: wrap; }
    .survey-history-head a { width: 100%; margin-left: 49px; }
}


/* ===== R3 hierarchy ===== */
.case-context {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: -6px 0 16px;
    padding: 0 4px;
    color: #6f6474;
    font-size: .76rem;
    line-height: 1.55;
}
.case-context i {
    margin-top: 3px;
    color: var(--ucheck-purple);
}

.extra-section { padding-bottom: 14px; }

.extra-panel {
    overflow: hidden;
    margin-top: 9px;
    border: 1px solid var(--ucheck-border);
    border-radius: 15px;
    background: #fff;
}
.extra-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--ucheck-ink);
    background: #fbfafc;
    border: 0;
    font-family: inherit;
    font-size: .84rem;
    font-weight: 600;
    text-align: left;
}
.extra-toggle span {
    display: flex;
    align-items: center;
    gap: 9px;
}
.extra-toggle span i { color: var(--ucheck-purple); }
.extra-toggle > i {
    color: #927da5;
    font-size: .72rem;
    transition: transform .18s ease;
}
.extra-toggle[aria-expanded="true"] > i { transform: rotate(180deg); }
.extra-body {
    padding: 13px;
    border-top: 1px solid var(--ucheck-border);
}


/* =====================================================================
   R5 FINAL VISUAL CANDIDATE
   Visual-only layer: no search / REG / SURVEY / timeline logic changes.
   Purple = UCheck brand. Green = LINE only. Warm gold = key-data accent.
   ===================================================================== */

:root {
    --ucheck-purple: #5a2b91;
    --ucheck-purple-2: #7647a7;
    --ucheck-purple-deep: #3f1d68;
    --ucheck-purple-soft: #f4effa;
    --ucheck-ink: #2d2733;
    --ucheck-muted: #756d7b;
    --ucheck-border: #e8e1ef;
    --ucheck-bg: #faf8fc;

    --ucheck-gold: #a87118;
    --ucheck-gold-deep: #6f4706;
    --ucheck-gold-soft: #fff8e9;
    --ucheck-gold-border: #ead8ae;

    --line-green: #06c755;
    --line-green-dark: #059e45;
    --line-green-soft: #ecfbf2;
}

/* Keep the brand purple rich, but reduce the "all-purple" feeling. */
.ucheck-hero {
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.13), transparent 25%),
        radial-gradient(circle at 0% 100%, rgba(255,255,255,.08), transparent 24%),
        linear-gradient(145deg, #3d1a64 0%, #5a2b91 58%, #7650a1 100%);
}

.search-card {
    border-color: rgba(255,255,255,.88);
    box-shadow: 0 18px 48px rgba(61, 29, 104, .12);
}

/* ---------- Main-page helpers: LINE card + three compact shortcuts ---------- */
.quick-help {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 22px;
}

.quick-line-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 13px;
    align-items: center;
    padding: 15px 16px;
    background: #fff;
    border: 1px solid var(--ucheck-border);
    border-radius: 17px;
    box-shadow: 0 6px 20px rgba(72,43,96,.045);
}

.quick-line-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--line-green);
    background: var(--line-green-soft);
    border-radius: 13px;
    font-size: 1.38rem;
}

.quick-line-copy h3 {
    margin: 0;
    color: var(--ucheck-ink);
    font-size: .9rem;
    font-weight: 600;
}

.quick-line-copy p {
    margin: 3px 0 0;
    color: var(--ucheck-muted);
    font-size: .74rem;
    line-height: 1.45;
}

.btn-line {
    color: #fff;
    background: var(--line-green);
    border: 1px solid var(--line-green);
    border-radius: 12px;
    font-size: .78rem;
    font-weight: 600;
}

.btn-line:hover,
.btn-line:focus {
    color: #fff;
    background: var(--line-green-dark);
    border-color: var(--line-green-dark);
}

.quick-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.quick-shortcut {
    min-height: 68px;
    padding: 9px 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--ucheck-purple);
    background: #fff;
    border: 1px solid var(--ucheck-border);
    border-radius: 15px;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.15;
    box-shadow: 0 5px 15px rgba(72,43,96,.035);
}

.quick-shortcut i {
    font-size: 1.05rem;
    color: var(--ucheck-purple);
}

.quick-shortcut:hover,
.quick-shortcut:focus {
    color: var(--ucheck-purple-deep);
    background: var(--ucheck-purple-soft);
    border-color: #cdb9df;
}

/* Legacy R2 quick-help card styles are intentionally overridden by R5 markup. */

/* ---------- Key data hierarchy ---------- */
.detail-header {
    background: linear-gradient(135deg, #43206d 0%, #653397 62%, #7650a1 100%);
    box-shadow: 0 12px 30px rgba(64, 29, 105, .12);
}

.detail-header h2 {
    margin-bottom: 11px;
    letter-spacing: .01em;
}

.deed-highlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 13px;
    margin-top: 6px;
    padding: 11px 13px;
    color: var(--ucheck-ink);
    background: var(--ucheck-gold-soft);
    border: 1px solid var(--ucheck-gold-border);
    border-radius: 14px;
}

.deed-highlight-label {
    color: #74664f;
    font-size: .78rem;
    line-height: 1.3;
}

.deed-highlight-number {
    min-width: 125px;
    text-align: right;
}

.deed-highlight-number small {
    display: block;
    margin-bottom: 1px;
    color: #907b58;
    font-size: .66rem;
    line-height: 1.1;
}

.deed-highlight-number strong {
    display: block;
    color: var(--ucheck-gold-deep);
    font-size: clamp(1.3rem, 4vw, 1.65rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: .025em;
}

.status-now {
    margin-top: 12px;
    border: 1px solid rgba(255,255,255,.62);
    box-shadow: none;
}

.status-now strong {
    color: var(--ucheck-purple-deep);
    font-size: 1.1rem;
}

/* Multi-result list: title-deed number is no longer buried in body text. */
.case-deed {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 7px;
    padding: 5px 8px;
    background: var(--ucheck-gold-soft);
    border: 1px solid var(--ucheck-gold-border);
    border-radius: 10px;
}

.case-deed span {
    color: #75664e;
    font-size: .7rem;
}

.case-deed strong {
    color: var(--ucheck-gold-deep);
    font-size: .93rem;
    font-weight: 600;
}

/* Supporting context should be readable, but never compete with current status/deed. */
.case-context {
    color: #655c69;
    font-size: .78rem;
}

.section-card {
    border-radius: 18px;
    box-shadow: 0 7px 22px rgba(72,43,96,.045);
}

.timeline-item.current .timeline-dot {
    background: var(--ucheck-purple);
}

.timeline-item:not(.current) .timeline-dot {
    background: #a99caf;
}

.contact-box {
    background: #f7f3fb;
    border: 1px solid #e5daed;
}

.btn-call {
    background: var(--ucheck-purple);
}
.btn-call:hover,
.btn-call:focus {
    color: #fff;
    background: var(--ucheck-purple-deep);
}

/* LINE is the only green functional component. */
.line-cta {
    border-color: #dcefe3;
}
.line-cta .line-icon {
    color: var(--line-green);
    background: var(--line-green-soft);
}

/* ---------- Compact 3-button helper bar ---------- */
.detail-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.detail-tool {
    min-width: 0;
    min-height: 58px;
    padding: 8px 5px;
    flex-direction: column;
    gap: 5px;
    color: var(--ucheck-purple);
    border-radius: 12px;
    font-size: .69rem;
    line-height: 1.12;
    white-space: nowrap;
}

.detail-tool i {
    font-size: .98rem;
}

.detail-tool span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-tool:hover,
.detail-tool:focus {
    background: var(--ucheck-purple-soft);
    border-color: #cdb9df;
}

/* Slightly calmer expandable secondary content. */
.extra-toggle {
    background: #fcfbfd;
}
.extra-toggle span i {
    color: var(--ucheck-purple);
}

/* ---------- Mobile polish ---------- */
@media (max-width: 767.98px) {
    .ucheck-hero {
        padding-top: 20px;
    }

    .search-card {
        padding: 17px 15px;
    }

    /* Keep verification choice readable without stacking into two tall rows. */
    .verify-switch {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .verify-switch span {
        min-height: 46px;
        justify-content: center;
        padding: 8px 6px;
        gap: 5px;
        font-size: .73rem;
        line-height: 1.2;
    }

    .quick-line-card {
        grid-template-columns: auto 1fr auto;
        padding: 13px;
    }

    .quick-line-copy p {
        display: none;
    }

    .quick-line-copy h3 {
        font-size: .82rem;
    }

    .btn-line {
        padding: 7px 9px;
        font-size: .7rem;
    }

    .quick-shortcut {
        min-height: 64px;
        font-size: .68rem;
    }

    .section-card {
        padding: 16px;
        margin-bottom: 14px;
    }

    .deed-highlight {
        padding: 10px 11px;
    }

    .deed-highlight-label {
        font-size: .72rem;
    }

    .deed-highlight-number {
        min-width: 108px;
    }

    .deed-highlight-number strong {
        font-size: 1.38rem;
    }

    /* Critical: keep the three helper buttons in ONE row on mobile. */
    .detail-tools {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .detail-tool {
        min-height: 58px;
        padding: 7px 3px;
        font-size: .65rem;
    }

    .detail-tool i {
        font-size: .92rem;
    }

    .survey-history-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .survey-history-head a {
        width: 100%;
        margin-left: 49px;
    }
}

@media (max-width: 360px) {
    .verify-switch span {
        font-size: .68rem;
    }

    .quick-shortcut,
    .detail-tool {
        font-size: .61rem;
    }

    .deed-highlight {
        align-items: flex-end;
    }

    .deed-highlight-label {
        max-width: 44%;
    }
}


/* =====================================================================
   R6 MOBILE FINAL
   Mobile-only visual compaction. No search / timeline / contact logic changed.
   ===================================================================== */

@media (max-width: 767.98px) {

    /* Overall vertical rhythm */
    .content-area {
        padding-bottom: 34px;
    }

    .section-card {
        padding: 14px;
        margin-bottom: 12px;
        border-radius: 16px;
    }

    .section-title {
        margin-bottom: 11px;
    }

    .section-title h2,
    .section-title h3 {
        font-size: .96rem;
    }

    /* Current responsible person: one compact row, not card-inside-card */
    .contact-box {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 11px 12px;
        background: #f8f5fb;
        border: 1px solid #e7deef;
        border-radius: 13px;
    }

    .contact-main {
        min-width: 0;
    }

    .contact-box small {
        font-size: .68rem;
        line-height: 1.35;
    }

    .contact-box strong {
        margin-top: 2px;
        font-size: .88rem;
        line-height: 1.35;
    }

    .contact-phone {
        margin-top: 3px;
        color: #7b7180;
        font-size: .72rem;
        line-height: 1.2;
    }

    .btn-call {
        width: auto;
        min-width: 96px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 8px 11px;
        border-radius: 11px;
        font-size: .75rem;
        white-space: nowrap;
    }

    .btn-call i {
        margin: 0 !important;
    }

    /* Extra info: remove the "card inside card" effect on mobile */
    .extra-section {
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        margin-bottom: 12px;
    }

    .extra-section-title {
        padding: 0 2px;
        margin-bottom: 8px;
    }

    .extra-panels {
        display: grid;
        gap: 8px;
    }

    .extra-panel {
        margin-top: 0;
        background: #fff;
        border: 1px solid var(--ucheck-border);
        border-radius: 14px;
        box-shadow: 0 5px 16px rgba(72,43,96,.035);
    }

    .extra-toggle {
        min-height: 48px;
        padding: 11px 13px;
        border-radius: 14px;
        font-size: .82rem;
    }

    .extra-body {
        padding: 11px;
    }

    /* Survey history within accordion */
    .survey-history-head {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        align-items: center;
        margin-bottom: 10px;
        padding: 10px 11px;
        border-radius: 12px;
    }

    .survey-history-head > i {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .survey-history-head small {
        font-size: .66rem;
    }

    .survey-history-head strong {
        font-size: .8rem;
    }

    .survey-history-head a {
        width: auto;
        margin-left: 0;
        font-size: .7rem;
        white-space: nowrap;
    }

    .appointment-item {
        padding: 10px 11px;
    }

    /* LINE: one compact horizontal strip */
    .line-cta {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 12px 13px;
        border-radius: 15px;
    }

    .line-cta .line-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 1.15rem;
    }

    .line-copy {
        min-width: 0;
    }

    .line-copy h3 {
        margin: 0;
        font-size: .83rem;
        line-height: 1.3;
    }

    .line-copy p {
        display: none;
    }

    .line-cta .btn {
        width: auto;
        margin-left: 0;
        padding: 7px 10px;
        font-size: .7rem;
        white-space: nowrap;
        border-radius: 10px;
    }

    /* Three helper buttons: force one row on mobile */
    .detail-tools {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .detail-tool {
        min-width: 0;
        min-height: 54px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 7px 2px;
        border-radius: 11px;
        font-size: .64rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    .detail-tool span {
        overflow: visible;
        text-overflow: clip;
    }

    /* Home shortcuts: same compact 3-across behavior */
    .quick-shortcuts {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px;
    }

    .quick-shortcut {
        min-height: 60px;
        padding: 7px 3px;
        font-size: .64rem;
        line-height: 1.1;
    }

    /* Home LINE strip stays compact */
    .quick-line-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 11px 12px;
        gap: 9px;
        border-radius: 15px;
    }

    .quick-line-icon {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
        border-radius: 12px;
    }

    .quick-line-copy h3 {
        font-size: .8rem;
        line-height: 1.3;
    }

    .quick-line-copy p {
        display: none;
    }

    .quick-line-card .btn-line {
        padding: 7px 9px;
        font-size: .68rem;
        white-space: nowrap;
    }

    /* Footer a little tighter */
    .ucheck-footer {
        padding: 16px 0 20px;
    }

    .stats-line {
        gap: 3px 6px;
        font-size: .7rem;
    }

    .stats-sub {
        font-size: .67rem;
    }
}

/* Extra-narrow devices: keep the 3-up helper row readable */
@media (max-width: 360px) {
    .detail-tool,
    .quick-shortcut {
        font-size: .59rem;
    }

    .btn-call {
        min-width: 88px;
        padding-left: 9px;
        padding-right: 9px;
    }

    .line-cta .btn,
    .quick-line-card .btn-line {
        padding-left: 8px;
        padding-right: 8px;
    }
}


/* =====================================================================
   R7 FINAL CANDIDATE
   Final hierarchy/proportion pass.
   ===================================================================== */

/* Detail page should not stretch into a giant empty desktop canvas. */
#detailSection {
    width: min(100%, 900px);
    margin-left: auto;
    margin-right: auto;
}

/* Summary is complete enough to stand alone, so no duplicated context row. */
.summary-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.summary-location {
    color: rgba(255,255,255,.78);
    font-size: .72rem;
    white-space: nowrap;
}

.summary-subject-label {
    margin-bottom: 1px;
    color: rgba(255,255,255,.72);
    font-size: .7rem;
}

.detail-header {
    padding: 18px;
}

.detail-header h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.deed-highlight-label small {
    display: block;
    color: #907b58;
    font-size: .65rem;
    line-height: 1.1;
}

.deed-highlight-label strong {
    display: block;
    margin-top: 2px;
    color: #66573e;
    font-size: .88rem;
    font-weight: 600;
}

/* Timeline: current first, compact history below it. */
.timeline-item {
    padding-bottom: 15px;
}

.timeline-item::before {
    top: 18px;
    bottom: -1px;
}

.timeline-item.current {
    padding-bottom: 18px;
}

.timeline-item.current .timeline-status {
    color: var(--ucheck-purple-deep);
}

.timeline-date {
    font-size: .71rem;
}

.file-copy {
    min-width: 0;
    display: block;
}

.file-copy strong {
    display: block;
    color: var(--ucheck-ink);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.35;
}

.file-copy small {
    display: block;
    margin-top: 2px;
    color: var(--ucheck-muted);
    font-size: .68rem;
}

.file-item > i {
    flex: 0 0 auto;
}

.file-item .meta {
    flex: 0 0 auto;
}

/* Desktop landing: keep primary content visually contained at 100% zoom. */
@media (min-width: 992px) and (min-height: 700px) {
    .ucheck-hero {
        padding-top: 22px;
        padding-bottom: 48px;
    }

    .brand-row {
        margin-bottom: 18px;
    }

    .search-card {
        padding: 19px 21px;
    }

    .quick-help {
        margin-top: 16px;
        gap: 9px;
    }

    .quick-line-card {
        padding-top: 11px;
        padding-bottom: 11px;
    }

    .quick-shortcut {
        min-height: 56px;
    }

    .ucheck-footer {
        padding-top: 14px;
        padding-bottom: 18px;
    }
}

@media (max-width: 767.98px) {
    #detailSection {
        width: 100%;
    }

    .detail-header {
        padding: 15px;
    }

    .summary-topline {
        align-items: flex-start;
        flex-wrap: wrap;
        margin-bottom: 8px;
    }

    .summary-location {
        width: 100%;
        font-size: .67rem;
        white-space: normal;
    }

    .detail-header h2 {
        font-size: 1.13rem;
        margin-bottom: 9px;
    }

    .timeline-item {
        padding-bottom: 13px;
    }

    .timeline-item.current {
        padding-bottom: 16px;
    }

    .file-copy strong {
        font-size: .79rem;
    }
}



/* QR Phase 1 */
.qr-hidden-deed { display: none !important; }
