/* My Wi‑Fi Device & Camera Finder — ToolSphere console UI */
.lan-app {
    --lan-ink: #f4f7fb;
    --lan-muted: #93a4b8;
    --lan-dim: #64748b;
    --lan-line: rgba(148, 163, 184, 0.14);
    --lan-line-strong: rgba(0, 174, 239, 0.28);
    --lan-panel: rgba(10, 18, 32, 0.78);
    --lan-panel-2: rgba(14, 24, 42, 0.92);
    --lan-accent: #00aeef;
    --lan-accent-soft: #5ec8f5;
    --lan-ok: #3ddc97;
    --lan-warn: #f5c84c;
    --lan-danger: #f87171;
    --lan-radius: 18px;
    --lan-ease: cubic-bezier(0.22, 1, 0.36, 1);
    width: 100%;
    color: var(--lan-ink);
}

.tool-widget:has(.lan-app) {
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
}

.lan-shell {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid var(--lan-line);
    border-radius: 24px;
    background:
        linear-gradient(165deg, rgba(12, 22, 38, 0.96) 0%, rgba(6, 11, 20, 0.98) 55%, #050912 100%);
    padding: clamp(1.1rem, 2.2vw, 1.65rem);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

.lan-mesh {
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.45;
    background:
        radial-gradient(ellipse 70% 48% at 0% -10%, rgba(0, 174, 239, 0.22), transparent 58%),
        radial-gradient(ellipse 45% 40% at 100% 0%, rgba(61, 220, 151, 0.08), transparent 50%),
        linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
    background-size: auto, auto, 28px 28px, 28px 28px;
    mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}

.lan-shell > *:not(.lan-mesh) { position: relative; z-index: 1; }

/* —— Hero —— */
.lan-hero {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr;
    gap: 1.15rem;
    margin-bottom: 1.15rem;
    align-items: stretch;
    animation: lan-rise 0.55s var(--lan-ease) both;
}

.lan-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lan-accent-soft);
}

.lan-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lan-ok);
    box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55);
    animation: lan-pulse 2.2s ease-out infinite;
}

.lan-title {
    margin: 0 0 0.55rem;
    font-size: clamp(1.45rem, 2.8vw, 2.05rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
    color: #f8fafc;
}

.lan-sub {
    margin: 0 0 1rem;
    max-width: 38rem;
    color: var(--lan-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.lan-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.lan-steps li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem 0.4rem 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--lan-line);
    background: rgba(8, 14, 26, 0.55);
    font-size: 0.78rem;
    font-weight: 650;
    color: #dbe7f3;
}

.lan-steps li span {
    display: grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(0, 174, 239, 0.35), rgba(0, 119, 182, 0.2));
    color: #e8f7ff;
    font-size: 0.72rem;
    font-weight: 800;
}

.lan-hero-aside {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lan-radar {
    position: relative;
    height: 118px;
    border-radius: 16px;
    border: 1px solid var(--lan-line-strong);
    background:
        radial-gradient(circle at center, rgba(0, 174, 239, 0.12), transparent 62%),
        rgba(5, 12, 22, 0.85);
    overflow: hidden;
}

.lan-radar-ring {
    position: absolute;
    inset: 50%;
    border: 1px solid rgba(0, 174, 239, 0.22);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.lan-radar-ring:nth-child(1) { width: 36px; height: 36px; }
.lan-radar-ring:nth-child(2) { width: 68px; height: 68px; }
.lan-radar-ring:nth-child(3) { width: 100px; height: 100px; }

.lan-radar-core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: var(--lan-accent);
}

.lan-radar-sweep {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 55%;
    height: 2px;
    transform-origin: left center;
    background: linear-gradient(90deg, rgba(0, 174, 239, 0.85), transparent);
    animation: lan-sweep 3.2s linear infinite;
}

.lan-shell.is-scanning .lan-radar-sweep { animation-duration: 1.1s; }
.lan-shell.is-scanning .lan-radar {
    border-color: rgba(0, 174, 239, 0.55);
}

.lan-notice {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(61, 220, 151, 0.28);
    background: linear-gradient(145deg, rgba(8, 60, 48, 0.35), rgba(8, 18, 28, 0.55));
}

.lan-notice-icon { flex: 0 0 auto; color: #86efc5; margin-top: 0.1rem; }
.lan-notice strong { display: block; color: #b7f5d8; font-size: 0.86rem; margin-bottom: 0.15rem; }
.lan-notice span { display: block; color: var(--lan-muted); font-size: 0.78rem; line-height: 1.45; }

/* —— Phone banner —— */
.lan-phone-banner[hidden],
.lan-net[hidden],
.lan-result[hidden] { display: none !important; }

.lan-phone-banner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 0.95rem;
    padding: 0.95rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 174, 239, 0.3);
    background: linear-gradient(120deg, rgba(0, 100, 140, 0.28), rgba(8, 16, 30, 0.7));
    animation: lan-rise 0.45s var(--lan-ease) both;
}

.lan-phone-copy strong { display: block; color: #ccebff; font-size: 0.9rem; margin-bottom: 0.2rem; }
.lan-phone-copy p { margin: 0; color: var(--lan-muted); font-size: 0.8rem; line-height: 1.45; }
.lan-phone-copy em { font-style: normal; color: #e2f3ff; }

.lan-phone-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: flex-end;
}

.lan-phone-row code {
    max-width: min(100%, 28rem);
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: rgba(2, 8, 18, 0.65);
    border: 1px solid var(--lan-line);
    color: #e8eef7;
    font-family: var(--mono, ui-monospace, monospace);
    font-size: 0.74rem;
    word-break: break-all;
    user-select: all;
    -webkit-user-select: all;
}

/* —— Scan bar —— */
.lan-scan-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--lan-line);
    background: var(--lan-panel);
}

.lan-mode { flex: 1 1 200px; max-width: 280px; }

.lan-label {
    display: block;
    margin-bottom: 0.32rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lan-dim);
}

.lan-optional { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--lan-dim); }

.lan-select,
.lan-input {
    width: 100%;
    padding: 0.68rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--lan-line);
    background: rgba(3, 8, 18, 0.72);
    color: var(--lan-ink);
    font-family: inherit;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.lan-select:hover,
.lan-input:hover { border-color: rgba(0, 174, 239, 0.28); }

.lan-select:focus,
.lan-input:focus {
    outline: none;
    border-color: rgba(0, 174, 239, 0.55);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.12);
    background: rgba(4, 12, 24, 0.9);
}

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

.lan-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.68rem 1.05rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform 0.18s var(--lan-ease), background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

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

.lan-btn-primary {
    background: linear-gradient(135deg, #12b6ef 0%, #0284c7 100%);
    color: #fff;
    border: none;
    box-shadow: 0 10px 28px rgba(2, 132, 199, 0.28);
}

.lan-btn-primary:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.lan-btn-ghost {
    background: rgba(15, 23, 42, 0.55);
    border-color: var(--lan-line);
    color: #c9d6e5;
}

.lan-btn-ghost:hover {
    border-color: rgba(0, 174, 239, 0.35);
    background: rgba(0, 174, 239, 0.08);
    color: #e8f4ff;
}

/* —— Status / network —— */
.lan-status {
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.95rem;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
    border: 1px solid var(--lan-line);
    background: rgba(12, 20, 34, 0.8);
    color: #dbe7f3;
    animation: lan-rise 0.35s var(--lan-ease) both;
}

.lan-status.info,
.lan-status.tool-status.info { border-color: rgba(0, 174, 239, 0.35); color: #ccebff; }
.lan-status.success,
.lan-status.tool-status.success { border-color: rgba(61, 220, 151, 0.35); color: #baf7d8; }
.lan-status.error,
.lan-status.tool-status.error { border-color: rgba(248, 113, 113, 0.4); color: #fecaca; }

.lan-net {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
    animation: lan-rise 0.4s var(--lan-ease) both;
}

.lan-net-item {
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--lan-line);
    background: var(--lan-panel);
}

.lan-net-item em {
    display: block;
    font-style: normal;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lan-dim);
    margin-bottom: 0.25rem;
}

.lan-net-item strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    color: #f1f5f9;
}

.lan-net-note {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    color: var(--lan-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

/* —— Sections —— */
.lan-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.lan-section-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lan-accent-soft);
}

.lan-section-head h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.lan-hint {
    margin: 0.35rem 0 0;
    color: var(--lan-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.lan-connect-panel > .lan-hint { margin-bottom: 0.85rem; }

.lan-count-chip {
    min-width: 2rem;
    padding: 0.28rem 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--lan-line-strong);
    background: rgba(0, 174, 239, 0.12);
    color: #d7f1ff;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
}

.lan-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
    padding: 2rem 1.25rem;
    border-radius: 16px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    background: rgba(6, 12, 22, 0.45);
    color: var(--lan-muted);
}

.lan-empty-state svg { color: rgba(0, 174, 239, 0.55); margin-bottom: 0.25rem; }
.lan-empty-state strong { color: #e2e8f0; font-size: 0.95rem; }
.lan-empty-state span { max-width: 26rem; font-size: 0.82rem; line-height: 1.5; }
.lan-empty-compact { padding: 1.4rem 1rem; }
.lan-empty { margin: 0; color: var(--lan-muted); font-size: 0.82rem; line-height: 1.45; }

/* —— Wall —— */
.lan-wall {
    margin-bottom: 1rem;
    padding: 1.05rem 1.1rem 1.2rem;
    border-radius: var(--lan-radius);
    border: 1px solid rgba(0, 174, 239, 0.2);
    background:
        linear-gradient(180deg, rgba(0, 174, 239, 0.06), transparent 42%),
        var(--lan-panel-2);
}

.lan-wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.85rem;
}

.lan-cam-card {
    border: 1px solid var(--lan-line);
    border-radius: 16px;
    background: rgba(4, 10, 20, 0.72);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, transform 0.25s var(--lan-ease);
    animation: lan-rise 0.45s var(--lan-ease) both;
}

.lan-cam-card:hover {
    border-color: rgba(0, 174, 239, 0.35);
    transform: translateY(-2px);
}

.lan-cam-card.is-ok { border-color: rgba(61, 220, 151, 0.42); }
.lan-cam-card.is-mid { border-color: rgba(245, 200, 76, 0.38); }

.lan-cam-preview {
    position: relative;
    aspect-ratio: 16 / 10;
    background:
        radial-gradient(circle at 30% 20%, rgba(0, 174, 239, 0.12), transparent 45%),
        #070e18;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lan-cam-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lan-cam-placeholder {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--lan-line);
    background: rgba(0, 174, 239, 0.08);
    color: rgba(148, 193, 220, 0.75);
}

.lan-cam-badge {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: rgba(4, 10, 20, 0.82);
    color: #e2e8f0;
    border: 1px solid var(--lan-line);
    backdrop-filter: blur(6px);
}

.lan-cam-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lan-dim);
}

.lan-cam-card.is-ok .lan-cam-badge { color: #b7f5d8; border-color: rgba(61, 220, 151, 0.35); }
.lan-cam-card.is-ok .lan-cam-badge::before { background: var(--lan-ok); }
.lan-cam-card.is-mid .lan-cam-badge { color: #fde68a; border-color: rgba(245, 200, 76, 0.35); }
.lan-cam-card.is-mid .lan-cam-badge::before { background: var(--lan-warn); }

.lan-cam-meta {
    padding: 0.75rem 0.85rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.lan-cam-meta strong { color: #f1f5f9; font-size: 0.92rem; }
.lan-cam-meta span {
    color: var(--lan-accent-soft);
    font-size: 0.76rem;
    font-weight: 700;
    font-family: var(--mono, ui-monospace, monospace);
}
.lan-cam-meta em { font-style: normal; color: var(--lan-muted); font-size: 0.74rem; line-height: 1.4; }

.lan-cam-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem 0.85rem;
}

.lan-cam-actions .lan-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.74rem;
}

/* —— Device list + form —— */
.lan-grid-wrap {
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    gap: 0.95rem;
}

.lan-panel {
    border: 1px solid var(--lan-line);
    border-radius: var(--lan-radius);
    background: var(--lan-panel);
    padding: 1.05rem 1.1rem 1.15rem;
}

.lan-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 460px;
    overflow: auto;
    padding-right: 0.15rem;
}

.lan-list::-webkit-scrollbar { width: 8px; }
.lan-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 8px;
}

.lan-device-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.45rem;
    align-items: stretch;
    animation: lan-rise 0.4s var(--lan-ease) both;
}

.lan-device {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 0.8rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--lan-line);
    background: rgba(3, 9, 18, 0.55);
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s var(--lan-ease);
}

.lan-device:hover {
    border-color: rgba(0, 174, 239, 0.4);
    background: rgba(0, 174, 239, 0.08);
    transform: translateY(-1px);
}

.lan-device-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(0, 174, 239, 0.22);
    background: rgba(0, 174, 239, 0.1);
    color: var(--lan-accent-soft);
}

.lan-device-icon svg { display: block; }

.lan-device-body { min-width: 0; display: flex; flex-direction: column; gap: 0.12rem; }
.lan-device-body strong { color: #f1f5f9; font-size: 0.9rem; }
.lan-device-body em {
    font-style: normal;
    color: var(--lan-accent-soft);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.04em;
}
.lan-device-body span { color: var(--lan-muted); font-size: 0.72rem; }
.lan-device-hint { color: #9fe8c8 !important; }

.lan-device-cta {
    font-size: 0.7rem;
    font-weight: 800;
    color: #d9f0ff;
    padding: 0.32rem 0.55rem;
    border-radius: 8px;
    background: rgba(0, 174, 239, 0.18);
    border: 1px solid rgba(0, 174, 239, 0.22);
}

.lan-add-quick { align-self: center; white-space: nowrap; }

.lan-form { display: flex; flex-direction: column; }
.lan-field { margin-bottom: 0.75rem; }
.lan-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.lan-form-actions { margin-bottom: 0.35rem; }

.lan-result {
    margin-top: 0.95rem;
    padding-top: 0.95rem;
    border-top: 1px solid var(--lan-line);
    animation: lan-rise 0.35s var(--lan-ease) both;
}

.lan-result-banner {
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    font-size: 0.84rem;
    margin-bottom: 0.75rem;
    line-height: 1.45;
}

.lan-result-banner.is-ok {
    background: rgba(8, 60, 48, 0.4);
    border: 1px solid rgba(61, 220, 151, 0.35);
    color: #b7f5d8;
}

.lan-result-banner.is-mid {
    background: rgba(90, 55, 10, 0.32);
    border: 1px solid rgba(245, 200, 76, 0.32);
    color: #fde68a;
}

.lan-result-block { margin-bottom: 0.75rem; }
.lan-result-block strong {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lan-dim);
    margin-bottom: 0.35rem;
}

.lan-result-block ul {
    margin: 0;
    padding-left: 1.05rem;
    color: var(--lan-muted);
    font-size: 0.8rem;
}

.lan-result-block a { color: #7dd3fc; text-decoration: none; }
.lan-result-block a:hover { text-decoration: underline; }

.lan-rtsp li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.4rem;
}

.lan-rtsp code {
    font-size: 0.72rem;
    word-break: break-all;
    color: #e2e8f0;
    font-family: var(--mono, ui-monospace, monospace);
}

.lan-copy {
    border: 1px solid var(--lan-line);
    background: rgba(15, 23, 42, 0.75);
    color: #cbd5e1;
    border-radius: 8px;
    padding: 0.22rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.lan-copy:hover { border-color: rgba(0, 174, 239, 0.4); color: #e8f4ff; }

/* —— Footer features —— */
.lan-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
    margin-top: 1.15rem;
}

.lan-feature {
    position: relative;
    padding: 0.95rem 1rem 0.95rem 1.15rem;
    border-radius: 14px;
    border: 1px solid var(--lan-line);
    background: rgba(8, 14, 26, 0.55);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lan-feature-mark {
    position: absolute;
    left: 0;
    top: 0.85rem;
    bottom: 0.85rem;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--lan-accent), transparent);
}

.lan-feature strong { color: #eef4fb; font-size: 0.86rem; }
.lan-feature span { color: var(--lan-muted); font-size: 0.76rem; line-height: 1.45; }

/* —— Motion —— */
@keyframes lan-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes lan-pulse {
    0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(61, 220, 151, 0); }
    100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

@keyframes lan-sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.lan-device-row:nth-child(1) { animation-delay: 0.02s; }
.lan-device-row:nth-child(2) { animation-delay: 0.05s; }
.lan-device-row:nth-child(3) { animation-delay: 0.08s; }
.lan-device-row:nth-child(4) { animation-delay: 0.11s; }
.lan-device-row:nth-child(5) { animation-delay: 0.14s; }
.lan-cam-card:nth-child(1) { animation-delay: 0.03s; }
.lan-cam-card:nth-child(2) { animation-delay: 0.07s; }
.lan-cam-card:nth-child(3) { animation-delay: 0.11s; }
.lan-cam-card:nth-child(4) { animation-delay: 0.15s; }

@media (max-width: 960px) {
    .lan-hero,
    .lan-grid-wrap,
    .lan-features,
    .lan-field-row,
    .lan-phone-banner,
    .lan-net { grid-template-columns: 1fr; }

    .lan-wall-head,
    .lan-section-head { flex-direction: column; }

    .lan-device-row { grid-template-columns: 1fr; }
    .lan-scan-bar { flex-direction: column; align-items: stretch; }
    .lan-mode { max-width: none; }
    .lan-actions { width: 100%; }
    .lan-btn {
        flex: 1 1 auto;
        min-height: 44px;
        touch-action: manipulation;
    }
    .lan-select,
    .lan-input {
        font-size: 16px;
        min-height: 44px;
    }
    .lan-list { max-height: none; }
    .lan-wall-grid { grid-template-columns: 1fr; }
    .lan-phone-row { justify-content: stretch; flex-direction: column; align-items: stretch; }
    .lan-phone-row code { max-width: none; }
    .lan-radar { height: 100px; }
}

@media (prefers-reduced-motion: reduce) {
    .lan-radar-sweep,
    .lan-live-dot,
    .lan-hero,
    .lan-device-row,
    .lan-cam-card,
    .lan-status,
    .lan-net,
    .lan-result,
    .lan-phone-banner { animation: none !important; }
    .lan-btn:hover,
    .lan-device:hover,
    .lan-cam-card:hover { transform: none; }
}
