/**
 * assets/privacy-center.css
 * NERCIA Sovereign Privacy & Data Governance Center (v3.0)
 */

:root {
    --pv-bg: #04060e;
    --pv-bg-elev: rgba(12, 16, 28, 0.86);
    --pv-bg-card: rgba(15, 20, 34, 0.92);
    --pv-gold: #ffd700;
    --pv-gold-soft: #f5d061;
    --pv-gold-border: rgba(255, 215, 0, 0.24);
    --pv-gold-border-strong: rgba(255, 215, 0, 0.52);
    --pv-emerald: #10b981;
    --pv-emerald-soft: #34d399;
    --pv-danger: #ef4444;
    --pv-text: #f8fafc;
    --pv-text-sub: rgba(226, 232, 240, 0.82);
    --pv-text-muted: rgba(148, 163, 184, 0.85);
    --pv-font-head: 'Orbitron', 'Inter', 'Noto Sans JP', sans-serif;
    --pv-font-body: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body.nercia-privacy-body {
    font-family: var(--pv-font-body);
    background-color: var(--pv-bg);
    background-image:
        radial-gradient(ellipse 68% 42% at 15% 0%, rgba(255, 205, 45, 0.08) 0%, transparent 65%),
        radial-gradient(ellipse 60% 45% at 88% 18%, rgba(16, 185, 129, 0.06) 0%, transparent 65%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(30, 58, 138, 0.14) 0%, transparent 70%),
        linear-gradient(180deg, #04060e 0%, #070a15 50%, #04050c 100%);
    background-attachment: fixed;
    color: var(--pv-text);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 0 !important;
}

/* Multilingual Dual-Text Visibility */
html[data-pv-lang="ja"] .pv-en {
    display: none !important;
}
html[data-pv-lang="en"] .pv-ja {
    display: none !important;
}

/* =========================================================================
   1. STICKY SOVEREIGN HEADER & LEGAL SUITE NAV
   ========================================================================= */
.pv-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(5, 8, 17, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.22);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65);
}

.pv-header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pv-brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.pv-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.pv-brand-emblem {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #fff6c2 0%, #ffd700 45%, #9a6704 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #060812;
    font-family: var(--pv-font-head);
    font-weight: 900;
    font-size: 15px;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.45), inset 0 1px 2px #fff;
    flex-shrink: 0;
}

.pv-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.pv-brand-name {
    font-family: var(--pv-font-head);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.22em;
    background: linear-gradient(90deg, #ffffff 0%, #ffe680 55%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pv-brand-sub {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(245, 208, 97, 0.78);
}

.pv-legal-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 4px;
}

.pv-legal-tab {
    text-decoration: none;
    color: var(--pv-text-muted);
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pv-legal-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.pv-legal-tab.active {
    color: #090c14;
    background: linear-gradient(135deg, #fff3b0 0%, #ffd700 60%, #e5a912 100%);
    box-shadow: 0 2px 14px rgba(255, 215, 0, 0.35);
}

.pv-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pv-terminal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    color: #ffe885;
    background: rgba(255, 215, 0, 0.10);
    border: 1px solid rgba(255, 215, 0, 0.38);
    padding: 6px 13px;
    border-radius: 999px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pv-terminal-btn:hover {
    background: rgba(255, 215, 0, 0.20);
    border-color: #ffd700;
    transform: translateY(-1px);
}

/* =========================================================================
   2. HERO BANNER & AT-A-GLANCE TRUST CARDS
   ========================================================================= */
.pv-hero {
    max-width: 1320px;
    margin: 0 auto;
    padding: 44px 24px 28px;
}

.pv-hero-box {
    position: relative;
    background:
        linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(13, 18, 32, 0.94) 45%, rgba(8, 12, 24, 0.97) 100%);
    border: 1px solid var(--pv-gold-border-strong);
    border-radius: 24px;
    padding: 36px 38px 32px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.72),
        0 0 40px rgba(255, 215, 0, 0.08),
        inset 0 1px 0 rgba(255, 248, 215, 0.22);
    overflow: hidden;
}

.pv-hero-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd700 30%, #ffffff 50%, #ffd700 70%, transparent);
}

.pv-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.pv-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--pv-font-head);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.14em;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.42);
    color: #6ee7b7;
}

.pv-pill-badge.gold {
    background: rgba(255, 215, 0, 0.10);
    border-color: rgba(255, 215, 0, 0.42);
    color: #ffe580;
}

.pv-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.pv-hero-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 900;
    line-height: 1.28;
    letter-spacing: 0.02em;
    background: linear-gradient(95deg, #ffffff 0%, #fff4c2 48%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 14px;
}

.pv-hero-lead {
    font-size: 15px;
    color: var(--pv-text-sub);
    max-width: 920px;
    margin-bottom: 26px;
}

.pv-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
    color: var(--pv-text-muted);
}

.pv-meta-item strong {
    color: #ffe885;
    font-weight: 700;
    margin-right: 6px;
}

/* 4 Executive Summary Highlights */
.pv-highlights-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.pv-highlight-card {
    background: rgba(12, 17, 30, 0.90);
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-radius: 18px;
    padding: 20px 18px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.pv-highlight-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.45);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

.pv-hl-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 215, 0, 0.11);
    border: 1px solid rgba(255, 215, 0, 0.30);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}

.pv-highlight-card h3 {
    font-size: 14.5px;
    font-weight: 800;
    color: #fff4c2;
    margin-bottom: 6px;
    line-height: 1.4;
}

.pv-highlight-card p {
    font-size: 12.5px;
    color: var(--pv-text-muted);
    line-height: 1.65;
}

/* =========================================================================
   3. MAIN 2-COLUMN DESKTOP WORKSPACE (STICKY TOC + ARTICLES)
   ========================================================================= */
.pv-main-layout {
    max-width: 1320px;
    margin: 0 auto;
    padding: 8px 24px 72px;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* Sticky Sidebar TOC */
.pv-sidebar {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pv-toc-card {
    background: var(--pv-bg-card);
    border: 1px solid var(--pv-gold-border);
    border-radius: 20px;
    padding: 20px 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.pv-toc-heading {
    font-family: var(--pv-font-head);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: #ffd700;
    padding: 0 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pv-toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.pv-toc-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--pv-text-muted);
    transition: all 0.16s ease;
    line-height: 1.35;
}

.pv-toc-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.pv-toc-link.active {
    color: #ffe885;
    background: rgba(255, 215, 0, 0.12);
    border-left: 3px solid #ffd700;
    font-weight: 800;
}

.pv-toc-num {
    font-family: var(--pv-font-head);
    font-size: 10.5px;
    font-weight: 800;
    color: rgba(255, 215, 0, 0.72);
    min-width: 22px;
}

.pv-sidebar-actions {
    background: var(--pv-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pv-util-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 11px;
    border: 1px solid rgba(255, 215, 0, 0.30);
    background: rgba(255, 215, 0, 0.07);
    color: #fff2be;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
}

.pv-util-btn:hover {
    background: rgba(255, 215, 0, 0.16);
    border-color: #ffd700;
}

/* Mobile Jump Chips (visible < 1024px) */
.pv-mobile-toc {
    display: none;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 2px 14px;
    margin-bottom: 8px;
    scrollbar-width: none;
}
.pv-mobile-toc::-webkit-scrollbar {
    display: none;
}
.pv-mobile-chip {
    flex-shrink: 0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    color: #ffe885;
    background: rgba(15, 20, 34, 0.92);
    border: 1px solid rgba(255, 215, 0, 0.28);
    padding: 6px 13px;
    border-radius: 999px;
}

/* =========================================================================
   4. ARTICLE CARDS, TABLES & INTERACTIVE CONSENT MANAGER
   ========================================================================= */
.pv-content-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* Interactive Consent Control Card */
.pv-consent-panel {
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.10) 0%, rgba(14, 20, 36, 0.96) 55%, rgba(255, 215, 0, 0.06) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.45);
    border-radius: 22px;
    padding: 26px 28px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
}

.pv-consent-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pv-consent-title {
    font-size: 17px;
    font-weight: 900;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 9px;
}

.pv-consent-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
}

.pv-consent-status-pill.is-accepted {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.55);
    color: #6ee7b7;
}

.pv-consent-status-pill.is-declined {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.55);
    color: #fcd34d;
}

.pv-consent-desc {
    font-size: 13.5px;
    color: var(--pv-text-sub);
    margin-bottom: 18px;
}

.pv-consent-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pv-cbtn {
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-family: var(--pv-font-body);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.pv-cbtn.optout {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}
.pv-cbtn.optout:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #fff;
}

.pv-cbtn.accept {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}
.pv-cbtn.accept:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.pv-cbtn.reset {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--pv-text-sub);
}
.pv-cbtn.reset:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.pv-consent-toast {
    margin-top: 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #6ee7b7;
    min-height: 20px;
}

/* Standard Legal Section Card */
.pv-section-card {
    background: var(--pv-bg-card);
    border: 1px solid rgba(255, 215, 0, 0.16);
    border-radius: 22px;
    padding: 28px 32px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
    transition: border-color 0.2s ease;
}

.pv-section-card:hover {
    border-color: rgba(255, 215, 0, 0.32);
}

.pv-sec-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.16);
}

.pv-sec-num {
    font-family: var(--pv-font-head);
    font-size: 12px;
    font-weight: 900;
    color: #090c14;
    background: linear-gradient(135deg, #fff3b0 0%, #ffd700 100%);
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.pv-section-card h2 {
    font-size: 1.22rem;
    font-weight: 800;
    color: #fff5c8;
    line-height: 1.35;
    margin: 0;
    border: none;
    padding: 0;
}

.pv-section-card p {
    font-size: 14.5px;
    color: var(--pv-text-sub);
    margin-bottom: 12px;
}

.pv-section-card p:last-child {
    margin-bottom: 0;
}

.pv-section-card ul {
    padding-left: 20px;
    margin: 10px 0 14px;
}

.pv-section-card li {
    font-size: 14px;
    color: var(--pv-text-sub);
    margin-bottom: 8px;
}

.pv-section-card li strong {
    color: #fff3b8;
}

.pv-section-card a {
    color: #ffd700;
    text-underline-offset: 3px;
}

.pv-section-card code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    background: rgba(255, 215, 0, 0.10);
    border: 1px solid rgba(255, 215, 0, 0.25);
    color: #ffe885;
    padding: 2px 7px;
    border-radius: 6px;
}

/* Specification KV Grid */
.pv-kv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.pv-kv-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
}

.pv-kv-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--pv-text-muted);
    margin-bottom: 4px;
    letter-spacing: 0.04em;
}

.pv-kv-val {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    word-break: break-word;
}

/* Structured Data Matrix Table */
.pv-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 14px 0;
    border-radius: 14px;
    border: 1px solid rgba(255, 215, 0, 0.20);
}

.pv-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 580px;
    font-size: 13.5px;
}

.pv-table th {
    background: rgba(255, 215, 0, 0.10);
    color: #ffe885;
    font-weight: 800;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.22);
    white-space: nowrap;
}

.pv-table td {
    padding: 13px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--pv-text-sub);
    vertical-align: top;
}

.pv-table tr:last-child td {
    border-bottom: none;
}

.pv-tag-local {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
}

.pv-tag-ttl {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #7dd3fc;
}

/* Rights Grid (Section 4) */
.pv-rights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.pv-right-box {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 14px;
    padding: 14px 16px;
}

.pv-right-box h4 {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffe885;
    margin-bottom: 4px;
}

.pv-right-box p {
    font-size: 12.8px;
    color: var(--pv-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Callout Alert Boxes */
.pv-callout {
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 14px;
    font-size: 13.5px;
}

.pv-callout.gold {
    background: rgba(255, 215, 0, 0.07);
    border: 1px solid rgba(255, 215, 0, 0.30);
    color: #fff3c4;
}

.pv-callout.warn {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

/* Contact Desk Footer CTA */
.pv-contact-desk {
    background:
        linear-gradient(135deg, rgba(255, 215, 0, 0.10) 0%, rgba(14, 19, 34, 0.96) 60%);
    border: 1px solid var(--pv-gold-border-strong);
    border-radius: 22px;
    padding: 28px 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.pv-contact-copy h3 {
    font-size: 18px;
    font-weight: 900;
    color: #fff4c2;
    margin-bottom: 6px;
}

.pv-contact-copy p {
    font-size: 13.5px;
    color: var(--pv-text-sub);
}

.pv-contact-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pv-copy-email-btn {
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.48);
    color: #ffe885;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
}

.pv-copy-email-btn:hover {
    background: rgba(255, 215, 0, 0.22);
}

.pv-mail-btn {
    background: linear-gradient(135deg, #ffe98a 0%, #ffd700 100%);
    color: #090c14 !important;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.35);
}

.pv-footer-bar {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 24px 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 12.5px;
    color: var(--pv-text-muted);
}

.pv-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.pv-footer-links a {
    color: var(--pv-text-sub);
    text-decoration: none;
}

.pv-footer-links a:hover {
    color: #ffd700;
}

/* =========================================================================
   5. MOBILE THUMB-FRIENDLY UX & RESPONSIVE / PRINT STYLES (v3.1)
   ========================================================================= */

/* Hidden on Desktop by default */
.pv-mobile-legal-strip,
.pv-mobile-fold-bar,
.pv-mobile-dock,
.pv-sheet-backdrop {
    display: none;
}

@media (max-width: 1120px) {
    html {
        scroll-padding-top: 114px;
    }
    .pv-highlights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pv-legal-tabs {
        display: none;
    }
    /* Mobile Legal Suite Pill Strip directly under header */
    .pv-mobile-legal-strip {
        display: flex;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        padding: 7px 14px 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .pv-mobile-legal-strip::-webkit-scrollbar {
        display: none;
    }
    .pv-mlegal-pill {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        min-height: 34px;
        padding: 5px 13px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none;
        color: rgba(226, 232, 240, 0.85);
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.12);
        transition: all 0.18s ease;
    }
    .pv-mlegal-pill.active {
        color: #090c14;
        background: linear-gradient(135deg, #fff3b0 0%, #ffd700 100%);
        border-color: #ffd700;
        font-weight: 900;
        box-shadow: 0 2px 12px rgba(255, 215, 0, 0.35);
    }
}

@media (max-width: 1023px) {
    .pv-main-layout {
        grid-template-columns: 1fr;
    }
    .pv-sidebar {
        display: none;
    }
    .pv-mobile-toc {
        display: flex;
    }
    .pv-mobile-chip {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        padding: 6px 14px;
    }
}

@media (max-width: 768px) {
    /* Quick Fold/Expand All Bar */
    .pv-mobile-fold-bar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 14px;
        border-radius: 14px;
        background: rgba(15, 20, 34, 0.88);
        border: 1px solid rgba(255, 215, 0, 0.22);
    }
    .pv-fold-label {
        font-size: 12px;
        font-weight: 700;
        color: #ffe885;
    }
    .pv-fold-btns {
        display: flex;
        gap: 6px;
    }
    .pv-fold-btn {
        min-height: 34px;
        padding: 5px 12px;
        border-radius: 999px;
        border: 1px solid rgba(255, 215, 0, 0.35);
        background: rgba(255, 215, 0, 0.10);
        color: #fff4c2;
        font-family: var(--pv-font-body);
        font-size: 11.5px;
        font-weight: 800;
        cursor: pointer;
    }
    .pv-fold-btn:active {
        background: rgba(255, 215, 0, 0.25);
    }

    /* Tap-to-Fold Accordion Article Headers */
    .pv-sec-header {
        cursor: pointer;
        min-height: 44px;
        position: relative;
        padding-right: 28px;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    .pv-sec-header::after {
        content: '▾';
        position: absolute;
        right: 4px;
        top: 50%;
        transform: translateY(-56%);
        font-size: 16px;
        color: #ffd700;
        font-weight: 900;
        transition: transform 0.2s ease;
    }
    .pv-section-card.is-collapsed {
        padding-top: 16px;
        padding-bottom: 16px;
    }
    .pv-section-card.is-collapsed .pv-sec-header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
    .pv-section-card.is-collapsed .pv-sec-header::after {
        content: '▸';
    }
    .pv-section-card.is-collapsed > :not(.pv-sec-header) {
        display: none !important;
    }

    /* Thumb-Zone Fixed Bottom Quick Dock */
    .pv-mobile-dock {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 950;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(6, 9, 18, 0.95);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid rgba(255, 215, 0, 0.30);
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.72);
    }
    .pv-dock-item {
        appearance: none;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 12px;
        min-height: 48px;
        padding: 5px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: #e2e8f0;
        text-decoration: none;
        font-family: var(--pv-font-body);
        font-size: 10.5px;
        font-weight: 800;
        line-height: 1.15;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .pv-dock-item:active {
        transform: scale(0.97);
        background: rgba(255, 215, 0, 0.14);
    }
    .pv-dock-item.gold {
        background: linear-gradient(135deg, #ffe98a 0%, #ffd700 100%);
        border-color: #ffd700;
        color: #090c14 !important;
        font-weight: 900;
        box-shadow: 0 2px 12px rgba(255, 215, 0, 0.32);
    }
    .pv-dock-ico {
        font-size: 15px;
        line-height: 1;
    }

    /* Prevent Bottom Dock overlap with Footer & Back-to-Top button */
    .pv-footer-bar {
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }
    .nc-back-top {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Slide-Up TOC Bottom Sheet Modal */
    .pv-sheet-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(2, 4, 10, 0.76);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        display: none;
        align-items: flex-end;
        justify-content: center;
    }
    .pv-sheet-backdrop.open {
        display: flex;
    }
    .pv-sheet-panel {
        width: 100%;
        max-height: 78vh;
        background: linear-gradient(180deg, #10172b 0%, #090d1a 100%);
        border-top: 1.5px solid rgba(255, 215, 0, 0.52);
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.85);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .pv-sheet-handle {
        width: 42px;
        height: 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.25);
        margin: 10px auto 4px;
        flex-shrink: 0;
    }
    .pv-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 18px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: #fff4c2;
        font-size: 15px;
        flex-shrink: 0;
    }
    .pv-sheet-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.16);
        background: rgba(255, 255, 255, 0.06);
        color: #f8fafc;
        font-size: 15px;
        font-weight: 800;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .pv-sheet-list {
        overflow-y: auto;
        padding: 10px 14px calc(22px + env(safe-area-inset-bottom, 0px));
        display: flex;
        flex-direction: column;
        gap: 7px;
        -webkit-overflow-scrolling: touch;
    }
    .pv-sheet-item {
        width: 100%;
        min-height: 46px;
        padding: 10px 14px;
        border-radius: 13px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.035);
        color: #f1f5f9;
        font-family: var(--pv-font-body);
        font-size: 13.5px;
        font-weight: 700;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 11px;
        cursor: pointer;
    }
    .pv-sheet-item:active {
        background: rgba(255, 215, 0, 0.16);
        border-color: rgba(255, 215, 0, 0.45);
    }
    .pv-sheet-item.highlight {
        background: rgba(16, 185, 129, 0.13);
        border-color: rgba(16, 185, 129, 0.45);
        color: #a7f3d0;
    }
    .pv-sheet-num {
        font-family: var(--pv-font-head);
        font-size: 11px;
        font-weight: 900;
        min-width: 28px;
        height: 24px;
        border-radius: 6px;
        background: rgba(255, 215, 0, 0.16);
        color: #ffe885;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
}

@media (max-width: 680px) {
    .pv-header-inner {
        padding: 10px 14px;
        gap: 8px;
    }
    .pv-brand-sub,
    .pv-terminal-btn {
        display: none;
    }
    .pv-hero {
        padding: 20px 14px 14px;
    }
    .pv-hero-box {
        padding: 22px 16px;
        border-radius: 18px;
    }
    .pv-hero-title {
        font-size: 1.48rem;
        line-height: 1.32;
    }
    .pv-hero-lead {
        font-size: 13.5px;
        line-height: 1.72;
    }
    .pv-highlights-grid,
    .pv-kv-grid,
    .pv-rights-grid {
        grid-template-columns: 1fr;
    }
    .pv-main-layout {
        padding: 4px 14px 36px;
    }
    .pv-section-card,
    .pv-consent-panel,
    .pv-contact-desk {
        padding: 20px 16px;
        border-radius: 18px;
    }
    .pv-section-card h2 {
        font-size: 1.06rem;
    }

    /* Zero Horizontal Scroll: Stacked Mobile Data Cards for Legal Tables */
    .pv-table-wrap {
        border: none;
        border-radius: 0;
        overflow-x: visible;
        margin: 12px 0;
    }
    .pv-table {
        min-width: 0;
        display: block;
    }
    .pv-table thead {
        display: none;
    }
    .pv-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .pv-table tr {
        display: block;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 215, 0, 0.22);
        border-radius: 14px;
        padding: 14px 15px;
    }
    .pv-table td {
        display: block;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        font-size: 13px;
        line-height: 1.65;
    }
    .pv-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    .pv-table td.pv-td-primary {
        padding-top: 0;
        padding-bottom: 9px;
        margin-bottom: 4px;
        border-bottom: 1px solid rgba(255, 215, 0, 0.22);
        font-size: 14px;
        color: #ffe885;
    }
    html[data-pv-lang="ja"] .pv-table td[data-label-ja]::before {
        content: attr(data-label-ja);
        display: block;
        font-size: 11px;
        font-weight: 800;
        color: rgba(255, 215, 0, 0.85);
        letter-spacing: 0.03em;
        margin-bottom: 3px;
    }
    html[data-pv-lang="en"] .pv-table td[data-label-en]::before {
        content: attr(data-label-en);
        display: block;
        font-size: 11px;
        font-weight: 800;
        color: rgba(255, 215, 0, 0.85);
        letter-spacing: 0.03em;
        margin-bottom: 3px;
    }

    /* Full-Width 48px Thumb-Friendly Action Buttons */
    .pv-consent-btn-row {
        flex-direction: column;
        gap: 9px;
    }
    .pv-cbtn {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        font-size: 13.5px;
        text-align: center;
    }
    .pv-contact-btns {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    .pv-copy-email-btn,
    .pv-mail-btn {
        width: 100%;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 13.5px;
    }
}

@media print {
    body.nercia-privacy-body {
        background: #ffffff !important;
        color: #111827 !important;
    }
    .pv-header,
    .pv-sidebar,
    .pv-mobile-toc,
    .pv-mobile-legal-strip,
    .pv-mobile-fold-bar,
    .pv-mobile-dock,
    .pv-sheet-backdrop,
    .pv-consent-btn-row,
    .nercia-lang-wrapper {
        display: none !important;
    }
    .pv-section-card.is-collapsed > * {
        display: block !important;
    }
    .pv-main-layout {
        display: block;
    }
    .pv-hero-box,
    .pv-section-card,
    .pv-highlight-card,
    .pv-consent-panel,
    .pv-contact-desk {
        background: #ffffff !important;
        color: #111827 !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        break-inside: avoid;
        margin-bottom: 14px;
    }
    .pv-hero-title,
    .pv-section-card h2,
    .pv-section-card p,
    .pv-section-card li,
    .pv-table th,
    .pv-table td {
        color: #111827 !important;
        -webkit-text-fill-color: #111827 !important;
    }
}

