/* ═══════════════════════════════════════════════════════════════ */
/*  SEND ANYTHING — Modern Light & Dark Design System             */
/*  Fully Responsive for Mobile Phones & Tablets                 */
/* ═══════════════════════════════════════════════════════════════ */

:root {
    /* ── Light Mode (Default) ──────────────────────────────────── */
    --bg-primary: #f3edfa;
    --bg-secondary: #fbf7f2;
    --bg-card: #fffaf6;
    --bg-card-hover: #ffffff;
    --bg-input: #f7f0eb;
    --bg-input-focus: #fffdfb;
    --bg-header: rgba(246, 240, 251, 0.9);
    
    --border-subtle: #eadff0;
    --border-hover: #d7c5e9;
    --border-dashed: #c6addb;
    --border-focus: #9875c7;
    
    --brand-primary: #9875c7;
    --brand-primary-hover: #7f5bab;
    --brand-accent: #d88c9e;
    --brand-gradient: linear-gradient(135deg, #b69ad8 0%, #9270bd 100%);
    
    --text-primary: #302638;
    --text-secondary: #51445a;
    --text-muted: #7e7287;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    --shadow-card: 0 18px 42px -18px rgba(89, 62, 117, 0.24), 0 5px 14px -7px rgba(97, 67, 91, 0.14);
    --shadow-brand: 0 8px 20px rgba(143, 106, 188, 0.3);
    --bg-mesh-1: rgba(194, 166, 222, 0.2);
    --bg-mesh-2: rgba(226, 190, 202, 0.19);
    --bg-mesh-3: rgba(172, 145, 208, 0.16);
    --hero-title-color: #72538f;
    --hero-ornament: linear-gradient(145deg, #dfc9ed, #f8e8e2 80%);
    --hero-frame-border: #fff7ef;
    --hero-frame-bg: #e8d8ca;
    --hero-sparkle-bg: #fffaf6;
    --dropzone-bg: linear-gradient(135deg, #fbf5f2, #f4ebf7);
    --illustration-glow: rgba(89, 62, 117, 0.2);
    --brand-tint: rgba(152, 117, 199, 0.12);
    --panel-surface: linear-gradient(135deg, rgba(255, 250, 246, 0.96), rgba(243, 237, 250, 0.94));
    --control-shadow: 0 7px 16px rgba(89, 62, 117, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* ── Dark Mode Variant ───────────────────────────────────────── */
[data-theme="dark"] {
    --bg-primary: #191421;
    --bg-secondary: #241d2d;
    --bg-card: #2a2233;
    --bg-card-hover: #342a3e;
    --bg-input: #241d2c;
    --bg-input-focus: #30263a;
    --bg-header: rgba(25, 20, 33, 0.88);
    
    --border-subtle: #40334c;
    --border-hover: #594568;
    --border-dashed: #745b88;
    --border-focus: #c3a4e3;
    
    --brand-primary: #c3a4e3;
    --brand-primary-hover: #d4b9ed;
    --brand-accent: #e4a7b5;
    --brand-gradient: linear-gradient(135deg, #a783ce 0%, #d38ca5 100%);
    
    --text-primary: #f7effb;
    --text-secondary: #ddcfe7;
    --text-muted: #b2a1be;
    
    --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-brand: 0 8px 25px rgba(167, 131, 206, 0.28);
    --bg-mesh-1: rgba(195, 164, 227, 0.16);
    --bg-mesh-2: rgba(228, 167, 181, 0.13);
    --bg-mesh-3: rgba(167, 131, 206, 0.14);
    --hero-title-color: #d4b9ed;
    --hero-ornament: linear-gradient(145deg, #382a47, #392831 80%);
    --hero-frame-border: #46374f;
    --hero-frame-bg: #2d2335;
    --hero-sparkle-bg: #33283c;
    --dropzone-bg: linear-gradient(135deg, #2d2435, #30263a);
    --illustration-glow: rgba(195, 164, 227, 0.3);
    --brand-tint: rgba(195, 164, 227, 0.15);
    --panel-surface: linear-gradient(135deg, rgba(42, 34, 51, 0.97), rgba(36, 29, 45, 0.96));
    --control-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Typography & Links ───────────────────────────────────────── */
a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* ── App Background (Floating Mesh Gradients) ────────────────── */
.app-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 20%, var(--bg-mesh-1) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, var(--bg-mesh-2) 0%, transparent 55%),
        radial-gradient(circle at 50% 85%, var(--bg-mesh-3) 0%, transparent 60%),
        var(--bg-primary);
    z-index: 0;
    pointer-events: none;
}

/* ── Cloud Shader Background Layer (Aceternity-inspired) ────── */
/* Atmospheric cloud effect behind all content — CSS only       */
.cloud-shader-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    will-change: transform;
}

/* Individual cloud blob — soft radial gradient ellipse */
.cloud-shader-bg .cloud-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    will-change: transform;
}

/* Cloud 1 — large indigo, top-left drift */
.cloud-shader-bg .cloud-blob--1 {
    width: 55vw;
    height: 45vh;
    top: -10%;
    left: -10%;
    background: radial-gradient(ellipse at center, var(--bg-mesh-2) 0%, transparent 70%);
    animation: cloud-drift-1 28s ease-in-out infinite alternate;
}

/* Cloud 2 — cyan accent, top-right sweep */
.cloud-shader-bg .cloud-blob--2 {
    width: 50vw;
    height: 40vh;
    top: -5%;
    right: -15%;
    background: radial-gradient(ellipse at center, var(--bg-mesh-1) 0%, transparent 70%);
    animation: cloud-drift-2 32s ease-in-out infinite alternate;
    opacity: 0.4;
}

/* Cloud 3 — violet, center-bottom float */
.cloud-shader-bg .cloud-blob--3 {
    width: 60vw;
    height: 50vh;
    bottom: -15%;
    left: 20%;
    background: radial-gradient(ellipse at center, var(--bg-mesh-3) 0%, transparent 70%);
    animation: cloud-drift-3 35s ease-in-out infinite alternate;
    opacity: 0.35;
}

/* Cloud 4 — smaller indigo, mid-layer depth */
.cloud-shader-bg .cloud-blob--4 {
    width: 35vw;
    height: 30vh;
    top: 30%;
    left: 50%;
    background: radial-gradient(ellipse at center, var(--bg-mesh-2) 0%, transparent 65%);
    animation: cloud-drift-4 25s ease-in-out infinite alternate;
    opacity: 0.3;
    filter: blur(100px);
}

/* Cloud 5 — wide atmospheric haze, very slow */
.cloud-shader-bg .cloud-blob--5 {
    width: 70vw;
    height: 35vh;
    top: 15%;
    left: -5%;
    background: radial-gradient(ellipse at center, var(--bg-mesh-1) 0%, transparent 75%);
    animation: cloud-drift-5 40s ease-in-out infinite alternate;
    opacity: 0.2;
    filter: blur(120px);
}

/* Cloud 6 — subtle glow accent at bottom-right */
.cloud-shader-bg .cloud-blob--6 {
    width: 40vw;
    height: 40vh;
    bottom: 5%;
    right: -5%;
    background: radial-gradient(ellipse at center, var(--bg-mesh-3) 0%, transparent 70%);
    animation: cloud-drift-6 30s ease-in-out infinite alternate;
    opacity: 0.25;
    filter: blur(90px);
}

/* Atmospheric glow overlay — soft vignette glow */
.cloud-shader-bg .cloud-atmo-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 0%, var(--bg-mesh-2) 0%, transparent 55%);
    opacity: 0.15;
    animation: atmo-pulse 20s ease-in-out infinite alternate;
}

/* ── Cloud Drift Keyframes ──────────────────────────────────── */
@keyframes cloud-drift-1 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(8vw, 5vh) scale(1.08); }
    100% { transform: translate(3vw, 10vh) scale(1.02); }
}

@keyframes cloud-drift-2 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-10vw, 6vh) scale(1.1); }
    100% { transform: translate(-5vw, 3vh) scale(0.95); }
}

@keyframes cloud-drift-3 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(6vw, -8vh) scale(1.05); }
    100% { transform: translate(-4vw, -4vh) scale(1.1); }
}

@keyframes cloud-drift-4 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-7vw, 4vh) scale(1.12); }
    100% { transform: translate(5vw, -3vh) scale(0.9); }
}

@keyframes cloud-drift-5 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(5vw, 3vh) scale(1.05); }
    100% { transform: translate(-3vw, 6vh) scale(1.02); }
}

@keyframes cloud-drift-6 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-6vw, -5vh) scale(1.08); }
    100% { transform: translate(4vw, -2vh) scale(0.95); }
}

@keyframes atmo-pulse {
    0%   { opacity: 0.12; }
    50%  { opacity: 0.2; }
    100% { opacity: 0.14; }
}

/* ── Reduced Motion: disable all cloud animations ───────────── */
@media (prefers-reduced-motion: reduce) {
    .cloud-shader-bg .cloud-blob,
    .cloud-shader-bg .cloud-atmo-glow {
        animation: none !important;
    }
}

/* ── Mobile: smaller blurs for GPU perf ─────────────────────── */
@media (max-width: 768px) {
    .cloud-shader-bg .cloud-blob {
        filter: blur(60px);
        opacity: 0.3;
    }
    .cloud-shader-bg .cloud-blob--4,
    .cloud-shader-bg .cloud-blob--5 {
        display: none; /* hide extra layers on mobile for perf */
    }
    .cloud-shader-bg .cloud-atmo-glow {
        opacity: 0.1;
    }
}

@media (max-width: 430px) {
    .cloud-shader-bg .cloud-blob {
        filter: blur(50px);
        opacity: 0.25;
    }
    .cloud-shader-bg .cloud-blob--6 {
        display: none;
    }
}

/* ── Navigation ──────────────────────────────────────────────── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg-header);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.3s ease;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.brand-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
    background: #ffffff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.theme-toggle-icon {
    display: block;
}

[data-theme="dark"] .theme-icon-moon {
    display: none;
}

html:not([data-theme="dark"]) .theme-icon-sun {
    display: none;
}

.header-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--brand-gradient);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-brand);
    transition: all 0.2s ease;
}

.header-action-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .nav-links, .header-action-btn {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
}

/* ── Mobile Drawer Menu ──────────────────────────────────────── */
.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem 1.5rem;
    flex-direction: column;
    gap: 0.85rem;
    z-index: 99;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mobile-nav-drawer.open {
    display: flex;
}

.mobile-nav-drawer a {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.4rem 0;
}

/* ── Layout & Hero Section ───────────────────────────────────── */
.main-wrapper {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
    width: 100%;
    box-sizing: border-box;
}

.hero-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero-section--illustrated {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
    min-height: 370px;
    margin: 0 auto 2rem;
    max-width: 1000px;
    text-align: left;
}

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

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.hero-section--illustrated .hero-title {
    max-width: 620px;
    color: var(--hero-title-color);
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8), 0 7px 18px rgba(94, 65, 123, 0.12);
}

.hero-section--illustrated .hero-subtitle {
    justify-content: flex-start;
    max-width: 600px;
    color: var(--text-secondary);
}

.hero-section--illustrated .hero-description {
    max-width: 520px;
    margin: 0.85rem 0 0;
    text-align: left;
}

.hero-art {
    position: relative;
    width: min(100%, 370px);
    height: 340px;
    justify-self: center;
    isolation: isolate;
}

.hero-art::before {
    position: absolute;
    z-index: -1;
    inset: 10% 7% 2%;
    content: "";
    border-radius: 48% 48% 30% 30%;
    background: var(--hero-ornament);
    box-shadow: inset 8px 8px 20px rgba(255, 255, 255, 0.78), 0 22px 44px rgba(90, 62, 116, 0.18);
}

.hero-art-frame {
    position: absolute;
    inset: 2% 13% 0;
    overflow: hidden;
    border: 9px solid var(--hero-frame-border);
    border-radius: 46% 46% 27px 27px;
    background: var(--hero-frame-bg);
    box-shadow: 0 10px 26px rgba(94, 65, 123, 0.2);
}

.hero-art-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 14%;
}

.hero-art-sparkle {
    position: absolute;
    z-index: 1;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 50%;
    background: var(--hero-sparkle-bg);
    box-shadow: var(--shadow-card);
    font-size: 1.2rem;
}

.hero-art-sparkle--top {
    top: 10%;
    right: 4%;
}

.hero-art-sparkle--bottom {
    bottom: 12%;
    left: 3%;
    color: var(--brand-primary);
}

.hero-section--illustrated .hero-title br {
    display: block;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-subtitle .arrow {
    color: var(--brand-primary);
    font-weight: 700;
}

/* ── Segmented Mode Switcher (Upload / Receive Tabs) ────────── */
.mode-switch-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.mode-switch {
    display: inline-flex;
    flex-wrap: wrap;
    background: transparent;
    padding: 0;
    border: 0;
    gap: 0.65rem;
    width: 100%;
    max-width: 740px;
    box-sizing: border-box;
}

.mode-btn {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--text-muted);
    background: linear-gradient(145deg, var(--bg-card-hover), var(--bg-card));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--control-shadow);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.mode-btn.active {
    color: #ffffff;
    background: var(--brand-gradient);
    border-color: transparent;
    box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.mode-btn:hover:not(.active) {
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

/* ── Dual Transfer Cards Grid ────────────────────────────────── */
.transfer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: start;
    max-width: 740px;
    margin: 0 auto;
    min-width: 0;
}

.transfer-grid > * {
    min-width: 0;
}

.card {
    background: linear-gradient(150deg, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.card-illustration {
    display: flex;
    justify-content: center;
    margin: -0.35rem auto 0.85rem;
}

.card-illustration img {
    width: 82px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 5px 8px var(--illustration-glow));
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.card-subtitle {
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ── Dropzone & Upload Box ───────────────────────────────────── */
.dropzone {
    position: relative;
    border: 2px dashed var(--border-dashed);
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.25rem;
    text-align: center;
    background: var(--dropzone-bg);
    cursor: pointer;
    box-shadow: var(--control-shadow);
    overflow: hidden;
    isolation: isolate;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    margin-bottom: 1rem;
}

.dropzone::before {
    position: absolute;
    z-index: -1;
    top: -70px;
    left: 50%;
    width: 220px;
    height: 170px;
    content: "";
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--brand-tint);
    filter: blur(28px);
    pointer-events: none;
}

.dropzone-mascot {
    position: absolute;
    right: 0.4rem;
    bottom: 0;
    z-index: 0;
    width: 112px;
    height: 154px;
    object-fit: contain;
    filter: drop-shadow(0 6px 8px var(--illustration-glow));
    pointer-events: none;
}

.dropzone-icon,
.dropzone-title,
.dropzone-sub {
    position: relative;
    z-index: 1;
}

.upload-card .dropzone {
    min-height: 210px;
    padding: 2.25rem 6rem 2.25rem 1.25rem;
}

.dropzone:hover, .dropzone.drag-active {
    border-color: var(--brand-primary);
    box-shadow: 0 12px 24px rgba(89, 62, 117, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transform: translateY(-2px);
}

.dropzone-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    background: var(--brand-tint);
    border-radius: 50%;
}

.dropzone-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.dropzone-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.input-pill {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 0.1rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    box-shadow: inset 0 2px 5px rgba(55, 39, 68, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-pill:focus-within {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px var(--brand-tint), inset 0 2px 5px rgba(55, 39, 68, 0.04);
}

.input-pill input {
    width: 100%;
    min-width: 0;
    padding: 0.7rem 0.8rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.9rem;
}

.input-pill input::placeholder,
.input-pill textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.dropzone-actions {
    display: flex;
    gap: 0.75rem;
}

.dropzone-actions .btn-secondary {
    background: var(--bg-card);
    box-shadow: var(--control-shadow);
    font-weight: 600;
}

.dropzone-actions .btn-secondary:first-child {
    color: #ffffff;
    background: var(--brand-gradient);
    border-color: transparent;
    box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.dropzone-actions .btn-secondary:first-child:hover {
    color: #ffffff;
    filter: brightness(1.04);
}

/* ── Options Controls Row (Password & Expiration) ────────────── */
.options-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.option-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-box {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    outline: none;
    transition: all 0.2s ease;
}

.input-box::placeholder {
    color: #94a3b8;
}

.input-box:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

select.input-box {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

select.input-box option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.receive-code-input {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-align: center;
    padding: 0.9rem 1rem;
    background: var(--bg-input);
}

.receive-code-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

/* ── Primary Action Buttons ──────────────────────────────────── */
.btn-primary {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--brand-gradient);
    border: none;
    border-radius: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-brand);
    transition: all 0.2s ease;
    min-height: 48px;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 42px;
}

.btn-secondary:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

/* ── Selected File List ──────────────────────────────────────── */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 1.25rem;
    padding-right: 0.25rem;
    min-width: 0;
    max-width: 100%;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.file-item-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(79, 70, 229, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.file-item-details {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-item-remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    transition: color 0.15s ease;
}

.file-item-remove:hover {
    color: var(--danger);
}

/* ── Upload Progress ─────────────────────────────────────────── */
.progress-container {
    margin-top: 1.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.progress-track {
    width: 100%;
    height: 8px;
    background: var(--border-subtle);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: 9999px;
    width: 0%;
    transition: width 0.2s ease;
}

/* ── Result Code Display ─────────────────────────────────────── */
.result-card {
    margin-top: 1.5rem;
    background: rgba(2, 132, 199, 0.06);
    border: 1px solid rgba(2, 132, 199, 0.25);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.code-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--brand-primary);
    margin: 0.75rem 0;
    user-select: all;
    overflow-wrap: break-word;
    word-break: break-all;
}

/* ── Alert Danger Box ────────────────────────────────────────── */
.alert-danger {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── Modal Backdrop ──────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-card {
    max-width: 400px;
    width: 100%;
    border: 1px solid var(--border-hover);
    box-shadow: var(--shadow-card);
}

/* ── How It Works Section ────────────────────────────────────── */
.how-it-works-section {
    margin-top: 4.5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.25rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 1.5rem;
}

.feature-guides {
    margin-top: 3rem;
}

.feature-guides-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.feature-guide-card {
    display: block;
    padding: 1.25rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}

.feature-guide-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.feature-guide-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.feature-guide-card:hover {
    border-color: var(--border-hover);
}

.guide-article {
    max-width: 860px;
}

.guide-hero {
    margin: 2rem auto 2.5rem;
    max-width: 720px;
}

.guide-hero h1 {
    margin: 0.5rem 0 1rem;
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1.15;
}

.guide-hero > p {
    line-height: 1.7;
}

.guide-cta {
    display: inline-flex;
    width: auto;
    margin-top: 1.25rem;
    padding: 0.75rem 1.5rem;
}

.guide-copy {
    padding: clamp(1.25rem, 4vw, 2.25rem);
}

.guide-copy h2 {
    margin: 2rem 0 0.75rem;
    font-size: 1.35rem;
}

.guide-copy h2:first-child {
    margin-top: 0;
}

.guide-copy h3 {
    margin: 1.25rem 0 0.4rem;
    font-size: 1rem;
}

.guide-copy p,
.guide-copy li {
    color: var(--text-muted);
    line-height: 1.75;
}

.guide-copy p + p {
    margin-top: 0.75rem;
}

.guide-copy ol {
    padding-left: 1.4rem;
}

.guide-copy li + li {
    margin-top: 0.45rem;
}

.guide-copy a {
    color: var(--brand-primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.guide-related {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.guide-related a {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-primary);
}

.step-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--brand-gradient);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.15rem;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
}

.step-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Toast Notifications ─────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.25s ease;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Utilities ───────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.w-full { width: 100%; }

/* ── Footer ──────────────────────────────────────────────────── */
.app-footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 1.25rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    background: var(--bg-secondary);
}

.page-main {
    position: relative;
}

.page-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(130px, 210px);
    align-items: center;
    gap: clamp(1rem, 4vw, 2.5rem);
    margin: 0 auto 1.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background: var(--panel-surface);
    box-shadow: var(--shadow-card);
    text-align: left;
}

.page-hero-copy {
    min-width: 0;
}

.page-hero-copy h1 {
    margin-bottom: 0.5rem;
    color: var(--hero-title-color);
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.page-hero-copy p {
    max-width: 620px;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.page-hero-art {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    align-self: stretch;
    min-width: 0;
    min-height: 150px;
}

.page-hero-art img {
    display: block;
    width: auto;
    max-width: min(100%, 190px);
    height: clamp(150px, 20vw, 225px);
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 8px 10px var(--illustration-glow));
}

.guide-hero.page-hero-panel {
    grid-template-columns: minmax(0, 1fr) minmax(130px, 210px);
    max-width: 100%;
    margin: 0 auto 1.5rem;
    text-align: left;
}

.guide-hero.page-hero-panel .page-hero-copy > p:first-child {
    margin-bottom: 0.5rem;
    color: var(--brand-primary);
    font-weight: 700;
}

.guide-hero.page-hero-panel .guide-cta {
    width: auto;
    margin-top: 1rem;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.page-theme-toggle {
    flex: 0 0 auto;
}

.history-refresh-btn {
    width: auto;
    margin-top: 0.9rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin: 1.15rem 0;
}

.footer-nav a:hover {
    color: var(--text-primary);
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.65rem;
    text-align: left;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════ */
/*  MOBILE PHONE RESPONSIVE BREAKPOINTS                           */
/* ═══════════════════════════════════════════════════════════════ */

@media (max-width: 868px) {
    .transfer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .main-wrapper {
        padding: 1.5rem 0.85rem 3rem;
    }

    .page-hero-panel,
    .guide-hero.page-hero-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 1.1rem;
    }

    .page-hero-art {
        justify-self: end;
        width: 90px;
        min-height: 100px;
        margin-top: -0.4rem;
    }

    .page-hero-art img {
        max-width: 90px;
        height: 112px;
    }

    .hero-section--illustrated {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
        min-height: 0;
        text-align: center;
    }

    .hero-section--illustrated .hero-title {
        font-size: clamp(2.2rem, 10vw, 3rem);
    }

    .hero-section--illustrated .hero-subtitle {
        justify-content: center;
    }

    .hero-section--illustrated .hero-description {
        margin-right: auto;
        margin-left: auto;
        text-align: center;
    }

    .hero-art {
        width: min(76vw, 300px);
        height: 285px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        letter-spacing: -0.02em;
    }

    .hero-subtitle {
        font-size: 0.875rem;
        gap: 0.35rem;
    }

    .card {
        padding: 1.35rem 1rem;
        border-radius: var(--radius-lg);
    }

    .dropzone {
        padding: 1.75rem 1rem;
    }

    .upload-card .dropzone {
        min-height: 190px;
        padding: 1.75rem 5rem 1.75rem 0.75rem;
    }

    .dropzone-mascot {
        right: 0.2rem;
        width: 78px;
        height: 112px;
    }

    .dropzone-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 0.5rem;
    }

    .dropzone-title {
        font-size: 0.95rem;
    }

    .options-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .dropzone-actions {
        flex-direction: row;
        gap: 0.45rem;
    }

    .dropzone-actions .btn-secondary {
        width: auto;
        min-width: 0;
        flex: 1;
        padding: 0.6rem 0.45rem;
        font-size: 0.78rem;
        gap: 0.3rem;
        white-space: normal;
    }

    .code-display {
        font-size: clamp(1.4rem, 6vw, 1.75rem);
        letter-spacing: clamp(0.06em, 2vw, 0.12em);
    }

    .receive-code-input {
        font-size: 1.1rem;
        padding: 0.75rem;
        letter-spacing: 0.12em;
    }

    .section-title {
        font-size: 1.65rem;
    }

    .how-it-works-section {
        margin-top: 3.5rem;
        padding-top: 2rem;
    }

    /* Received text header — wrap on mobile */
    .received-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* P2P sub-switch — stack on narrow screens */
    .p2p-subswitch {
        flex-direction: column;
    }

    /* Toast position fix for mobile */
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 16px;
        text-align: center;
    }
}

/* ── Tabs 2x2 grid for screens ≤480px ──────────────────────── */
@media (max-width: 480px) {
    .mode-switch {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 0;
        gap: 0.5rem;
    }
    .mode-btn {
        min-height: 46px;
        padding: 0.6rem 0.5rem;
        font-size: 0.82rem;
        gap: 0.35rem;
    }
    .mode-btn svg {
        width: 15px;
        height: 15px;
        flex-shrink: 0;
    }
    .card-subtitle {
        font-size: 0.82rem;
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 1.75rem;
    }
    .card {
        padding: 1.15rem 0.75rem;
    }
    .mode-switch {
        padding: 0;
        gap: 0.4rem;
    }
    .mode-btn {
        padding: 0.55rem 0.4rem;
        font-size: 0.78rem;
        gap: 0.25rem;
    }
    .receive-code-input {
        font-size: 1rem;
        letter-spacing: 0.08em;
        padding: 0.65rem 0.5rem;
    }
    .code-display {
        font-size: 1.35rem;
        letter-spacing: 0.06em;
    }
    /* Steps grid single column */
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .feature-guides-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 340px) {
    .main-wrapper {
        padding: 1.25rem 0.5rem 2.5rem;
    }
    .card {
        padding: 1rem 0.5rem;
    }
    .mode-btn {
        padding: 0.5rem 0.3rem;
        font-size: 0.72rem;
        gap: 0.2rem;
    }
    .mode-btn svg {
        width: 13px;
        height: 13px;
    }
}

/* ═══════════════════════════════════════════════════════════════ */
/*  TEXT COMPOSER & VIEWER STYLES                                 */
/* ═══════════════════════════════════════════════════════════════ */
.text-composer-wrapper {
    position: relative;
}

.text-composer-area {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    outline: none;
    resize: vertical;
    min-height: 160px;
    max-height: 400px;
    line-height: 1.6;
    transition: border-color 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.text-composer-area:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.received-text-viewer {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    max-height: 360px;
    overflow-y: auto;
}

.received-text-pre {
    margin: 0;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    user-select: text;
}

/* ═══════════════════════════════════════════════════════════════ */
/*  SAFE FILE PREVIEW MODAL STYLES                                */
/* ═══════════════════════════════════════════════════════════════ */
.preview-modal-card {
    max-width: 850px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow: hidden;
}

.preview-modal-body {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    max-height: calc(90vh - 120px);
    padding: 0.75rem;
}

.preview-img-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.preview-image {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.preview-pdf-container {
    width: 100%;
    height: 65vh;
}

.preview-pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.preview-code-block {
    width: 100%;
    max-height: 60vh;
    overflow: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-primary);
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.preview-media-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════ */
/*  DIRECT P2P WEBRTC STYLES                                      */
/* ═══════════════════════════════════════════════════════════════ */
.p2p-subswitch .btn-secondary.active-tab {
    background: var(--brand-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.p2p-session-box {
    background: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.p2p-peer-list {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-height: 50px;
}

.p2p-local-share-note {
    padding: 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    line-height: 1.5;
}

.offline-share-card {
    min-width: 0;
}

.offline-share-notice,
.offline-share-status,
.offline-share-fallback {
    padding: 0.85rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.offline-share-notice p {
    margin: 0.35rem 0 0;
}

.offline-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1rem 0;
}

.offline-share-actions > button {
    min-width: 0;
    flex: 1 1 10rem;
}

.offline-share-actions [hidden] {
    display: none;
}

.offline-support-list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0.85rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-input);
}

.offline-support-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.offline-support-list li:last-child {
    border-bottom: 0;
}

.offline-support-list strong {
    text-align: right;
    overflow-wrap: anywhere;
}

.offline-share-fallback {
    margin-top: 0.75rem;
}

.text-link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand-primary);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.offline-share-guide-link {
    display: inline-block;
    margin-top: 0.75rem;
}

.p2p-peer-item {
    gap: 0.5rem;
    cursor: pointer;
}

.p2p-peer-item input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    accent-color: var(--brand-primary);
}

.p2p-peer-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.p2p-peer-item .status-badge {
    flex: 0 0 auto;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-expired {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════ */
/*  PWA Install Banner                                            */
/* ═══════════════════════════════════════════════════════════════ */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-card, #ffffff);
    border-top: 1px solid var(--border-subtle, #e2e8f0);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1rem;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease;
}

.pwa-install-banner.pwa-banner-visible {
    transform: translateY(0);
    opacity: 1;
}

.pwa-install-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.pwa-install-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1;
}

.pwa-install-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: contain;
}

.pwa-install-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-desc {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-install-btn {
    padding: 0.5rem 1.15rem;
    background: var(--brand-gradient, linear-gradient(135deg, #4f46e5 0%, #2563eb 100%));
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.pwa-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.pwa-install-btn:active {
    transform: translateY(0);
}

.pwa-dismiss-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted, #64748b);
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
    line-height: 1;
    padding: 0;
}

.pwa-dismiss-btn:hover {
    background: var(--bg-input, #f1f5f9);
    color: var(--text-primary, #0f172a);
}

/* ── PWA Banner Mobile Adjustments ──────────────────────────── */
@media (max-width: 420px) {
    .pwa-install-banner {
        padding: 0.65rem 0.75rem;
    }

    .pwa-install-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .pwa-install-title {
        font-size: 0.82rem;
    }

    .pwa-install-desc {
        font-size: 0.7rem;
    }

    .pwa-install-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.8rem;
    }
}
