:root {
      --ink: #0F1C24;
      --bg: #050505;
      --surface: #141414;
      --accent: #2F6F7E;
      --blue: #2B6CFF;
      --danger: #B00020;
      --open: #C9A227;
      --accept: #2D8A57;
      --muted: #9AADB4;
      --nav: #0B0B0B;
      --phone-w: 390px;
      --phone-h: 844px;
      --phone-scale: 1;
    }
    * { box-sizing: border-box; }
    html, body { margin: 0; height: 100%; }
    body {
      font-family: "Segoe UI", Roboto, system-ui, sans-serif;
      background: radial-gradient(1200px 700px at 50% -10%, #1c3944 0%, #07090b 48%, #050505 100%);
      color: #e8eef0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    button, input, textarea { font: inherit; }
    button { cursor: pointer; }
    img { max-width: 100%; display: block; }

    .page {
      flex: 1;
      min-height: 0;
      width: min(1280px, 100%);
      margin: 0 auto;
      padding: 8px 16px 12px;
      display: grid;
      grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) minmax(200px, 260px);
      gap: 16px 20px;
      align-items: stretch;
      overflow: hidden;
    }
    .col {
      overflow: auto;
      min-height: 0;
      max-height: 100%;
      padding-right: 4px;
    }
    @media (max-width: 1080px) {
      html, body { height: auto; min-height: 100%; overflow: auto; }
      body { display: block; }
      .page {
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: visible;
        height: auto;
      }
      .phone-wrap { order: -1; width: 100%; height: auto; }
      .col { width: min(430px, 100%); max-height: none; overflow: visible; }
    }
    .col h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.4px; }
    .col .brand { color: var(--blue); font-weight: 700; margin-bottom: 10px; }
    .col p { color: #c5d2d7; line-height: 1.45; margin: 0 0 10px; font-size: 14px; }
    .badge {
      display: inline-block;
      background: #c9a22722;
      color: #e8c86a;
      border: 1px solid #c9a22766;
      border-radius: 999px;
      padding: 4px 10px;
      font-size: 12px;
      font-weight: 700;
      margin-bottom: 10px;
    }
    .hint {
      background: #141414;
      border: 1px solid #ffffff14;
      border-radius: 16px;
      padding: 14px 16px;
      margin: 0 0 12px;
    }
    .hint h3 { margin: 0 0 6px; font-size: 14px; }
    .hint p, .hint li { color: var(--muted); font-size: 13px; line-height: 1.45; }
    .hint ul { margin: 0; padding-left: 18px; }
    .demo-btn, .ghost {
      width: 100%;
      border: 0;
      border-radius: 12px;
      padding: 12px 14px;
      margin: 0 0 8px;
      font-weight: 700;
      color: #fff;
    }
    .demo-btn { background: var(--blue); }
    .demo-btn.warn { background: var(--open); color: #1a1404; }
    .demo-btn.danger { background: var(--danger); }
    .ghost { background: #1a1a1a; border: 1px solid #ffffff22; }
    .ghost.on { outline: 2px solid var(--blue); }

    .phone-wrap {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 0;
      min-height: 0;
      height: 100%;
    }
    .phone-scale {
      width: calc(var(--phone-w) * var(--phone-scale));
      height: calc(var(--phone-h) * var(--phone-scale));
      flex: 0 0 auto;
    }
    .phone {
      width: 390px;
      height: 844px;
      background: #000;
      border-radius: 46px;
      padding: 10px;
      box-shadow: 0 30px 80px #000a, 0 0 0 1px #333 inset;
      position: relative;
      transform: scale(var(--phone-scale));
      transform-origin: top left;
    }
    .phone-inner {
      height: 100%;
      background: var(--bg);
      border-radius: 36px;
      overflow: hidden;
      position: relative;
      display: flex;
      flex-direction: column;
    }
    .notch {
      position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
      width: 118px; height: 28px; background: #000; border-radius: 16px; z-index: 40;
    }
    .status {
      height: 42px; padding: 12px 16px 0;
      display: flex; justify-content: space-between; align-items: center;
      font-size: 12px; font-weight: 700; color: #fff; z-index: 30; gap: 8px;
    }
    .status span { opacity: .92; }
    .app { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
    .screen { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
    .scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
    .home-bar { height: 18px; display: flex; justify-content: center; align-items: center; }
    .home-bar i { width: 118px; height: 4px; background: #fff5; border-radius: 4px; display: block; }

    .wordmark { text-align: center; padding: 6px 8px 2px; }
    .wordmark .row { display: flex; justify-content: center; align-items: center; gap: 8px; }
    .wordmark b { font-size: 30px; letter-spacing: -1px; line-height: 1; }
    .wordmark small { display: block; color: var(--blue); font-weight: 700; font-size: 12px; margin-top: 2px; }
    .bell { width: 28px; height: 28px; object-fit: contain; filter: brightness(10); }

    .nav {
      background: var(--nav);
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      padding: 6px 4px 4px;
      border-top: 1px solid #ffffff10;
    }
    .nav button {
      background: none; border: 0; color: #8aa0a8; padding: 6px 2px;
      display: flex; flex-direction: column; align-items: center; gap: 3px;
      font-size: 11px; font-weight: 600;
    }
    .nav button.active { color: #fff; }
    .nav button.active .ico { background: #2b6cff38; }
    .ico { width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; }
    .ico svg { width: 18px; height: 18px; fill: currentColor; }

    .head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 4px 8px 8px 16px;
    }
    .head h2 { margin: 0; font-size: 20px; }
    .link { background: none; border: 0; color: var(--blue); font-weight: 700; padding: 8px; }
    .appbar {
      height: 48px; display: flex; align-items: center; gap: 4px;
      padding: 0 8px; color: #fff;
    }
    .appbar h2 { flex: 1; text-align: center; font-size: 17px; margin: 0 36px 0 0; }
    .iconbtn {
      width: 40px; height: 40px; border: 0; background: none; color: #fff;
      display: grid; place-items: center; border-radius: 20px;
    }
    .iconbtn svg { width: 22px; height: 22px; fill: currentColor; }

    .grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
      padding: 0 16px 16px;
    }
    .tile {
      background: var(--surface); border-radius: 18px; overflow: hidden;
      border: 0; padding: 0; color: #fff; text-align: left; position: relative;
    }
    .tile img { height: 108px; width: 100%; object-fit: cover; }
    .tile .meta { padding: 10px 12px 12px; }
    .tile .meta b { display: block; font-size: 14px; }
    .tile .meta span { color: var(--muted); font-size: 12px; }
    .tile .x {
      position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
      border: 0; border-radius: 13px; background: #0008; color: #fff; font-size: 16px;
    }
    .tile.edit { cursor: grab; outline: 1px dashed #2b6cff66; }
    .help { color: var(--muted); font-size: 12px; padding: 0 16px 8px; }

    .list { padding: 12px 16px 20px; display: flex; flex-direction: column; gap: 12px; }
    .card {
      background: var(--surface); border-radius: 16px; padding: 10px 10px 10px 10px;
      display: flex; gap: 10px; align-items: center; color: #fff; border: 0; text-align: left; width: 100%;
    }
    .card img, .thumb {
      width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #1a1a1a;
    }
    .thumb { display: grid; place-items: center; }
    .card .t { flex: 1; min-width: 0; }
    .card b { display: block; }
    .card span { color: var(--muted); font-size: 12px; }
    .row-tile {
      display: flex; align-items: center; gap: 12px;
      padding: 12px 16px; color: #fff; width: 100%; background: none; border: 0; text-align: left;
    }
    .row-tile + .row-tile { border-top: 1px solid #ffffff10; }
    .row-tile .sub { color: var(--muted); font-size: 13px; }
    .row-tile svg { width: 20px; height: 20px; fill: #fff8; }
    .switch {
      width: 46px; height: 26px; border-radius: 13px; background: #333; position: relative; border: 0;
    }
    .switch.on { background: var(--blue); }
    .switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 10px; display: block; }
    .switch.on i { left: 23px; }

    .fill {
      width: calc(100% - 32px); margin: 8px 16px; border: 0; border-radius: 12px;
      padding: 14px; font-weight: 700; color: #fff;
    }
    .fill.blue { background: var(--blue); }
    .fill.red { background: var(--danger); }
    .fill.ghost {
      background: transparent; color: #fff; border: 1px solid #fff3; width: calc(100% - 32px);
    }
    .muted { color: var(--muted); }
    .center { text-align: center; }

    .welcome {
      background: #000 center/cover no-repeat;
      flex: 1; display: flex; flex-direction: column; position: relative;
    }
    .welcome .shade { position: absolute; inset: 0; background: #0009; }
    .welcome .inner { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; padding: 18px 22px 22px; }
    .welcome img.icon { width: 88px; height: 88px; margin: 18px auto 10px; }
    .welcome h3 { text-align: center; margin: 8px 0 6px; }
    .welcome p { text-align: center; color: #c9d4d8; }
    .shot { height: 140px; width: 100%; object-fit: cover; border-radius: 16px; margin-top: auto; }

    .preview-wait {
      background: #101010; height: 100%; display: grid; place-items: center; color: #fff9;
    }
    .station { flex: 1; display: flex; flex-direction: column; min-height: 0; }
    .station .title { text-align: center; color: #ffffffb3; font-weight: 600; }
    .station .sub { text-align: center; color: var(--muted); font-size: 12px; }
    .frame {
      margin: 12px 22px 8px; flex: 1; min-height: 0; border-radius: 22px; overflow: hidden; position: relative; background: #101010;
    }
    .frame img { width: 100%; height: 100%; object-fit: cover; }
    .ring-banner {
      position: absolute; left: 0; right: 0; bottom: 0; background: #0008; color: #fff;
      text-align: center; padding: 16px; font-weight: 700;
    }
    .toast {
      position: absolute; top: 12px; left: 12px; right: 12px; text-align: center;
      background: var(--accept); color: #fff; font-weight: 700; border-radius: 20px; padding: 8px 14px; font-size: 13px;
    }
    .cam-chip {
      position: absolute; top: 12px; right: 12px;
      background: #000de; color: #fff; border: 1px solid #ffffff44; border-radius: 10px; overflow: hidden;
      padding: 8px 12px; font-weight: 700; font-size: 12px; display: flex; gap: 6px; align-items: center;
      max-width: calc(100% - 24px);
    }
    .cam-chip svg, .thumb svg, .card > svg, .row-tile > svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }
    .btns { display: flex; justify-content: space-evenly; padding: 8px 12px 10px; }
    .rwrap { text-align: center; color: #fff; font-size: 13px; font-weight: 600; }
    .rbtn {
      width: 74px; height: 74px; border-radius: 50%; border: 0; color: #fff;
      display: grid; place-items: center; margin: 0 auto 8px;
    }
    .rbtn.lg { width: 82px; height: 82px; }
    .rbtn svg { width: 28px; height: 28px; fill: currentColor; }
    .rbtn.red { background: var(--danger); }
    .rbtn.gold { background: var(--open); }
    .rbtn.green { background: var(--accept); }
    .rbtn.blue { background: var(--blue); }
    .rbtn.dark { background: #1a1a1a; border: 1.4px solid #ffffff3d; }

    .field {
      width: calc(100% - 32px); margin: 8px 16px; background: transparent; color: #fff;
      border: 1px solid #ffffff3d; border-radius: 10px; padding: 12px; min-height: 96px;
    }
    .err { color: var(--danger); text-align: center; padding: 0 16px 8px; font-size: 13px; }
    .offline {
      background: #3A2A10; color: #FDE68A; text-align: center; padding: 8px; font-size: 13px;
    }
    .modal {
      position: absolute; inset: 0; background: #0008; display: grid; place-items: center; z-index: 50; padding: 24px;
    }
    .dialog {
      background: var(--surface); border-radius: 16px; padding: 18px; width: 100%;
    }
    .dialog h3 { margin: 0 0 8px; }
    .dialog p { color: #ffffffb3; margin: 0 0 14px; }
    .dialog input {
      width: 100%; background: #0b0b0b; border: 1px solid #fff2; color: #fff;
      border-radius: 10px; padding: 10px; margin-bottom: 12px;
    }
    .dacts { display: flex; justify-content: flex-end; gap: 8px; }
    .dacts button { border: 0; background: none; color: var(--blue); font-weight: 700; padding: 8px 10px; }
    .dacts .go { background: var(--blue); color: #fff; border-radius: 8px; }
    .dacts .go.red { background: var(--danger); }
    .snack {
      position: absolute; left: 16px; right: 16px; bottom: 92px; z-index: 45;
      background: #222; color: #fff; border-radius: 8px; padding: 12px; font-size: 13px;
      box-shadow: 0 8px 24px #0008;
    }
    .splash { flex: 1; display: grid; place-items: center; text-align: center; }
    .splash img { width: 96px; height: 96px; margin: 0 auto 16px; }
    .pulse { animation: pulse 1.4s ease-in-out infinite; }
    @keyframes pulse { 50% { opacity: .55; } }
    .spin {
      width: 28px; height: 28px; border: 3px solid #fff3; border-top-color: var(--blue);
      border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .sec { padding: 8px 16px 16px; font-size: 18px; font-weight: 800; }
    .logo-foot { display: flex; justify-content: center; padding: 28px 24px 40px; }
    .logo-foot img { height: 72px; object-fit: contain; }
    .dot { width: 10px; height: 10px; border: 1px solid #fff8; border-radius: 50%; margin: 0 auto 6px; }
    .preview-chip {
      background: #c9a227; color: #1a1404; font-size: 10px; font-weight: 800;
      border-radius: 8px; padding: 3px 7px; letter-spacing: .3px; opacity: 1 !important;
    }
    .check { color: var(--blue); font-weight: 800; }
    .cst-preview-bar {
      flex: 0 0 auto;
      width: min(1280px, 100%);
      margin: 0 auto;
      padding: 8px 16px 0;
    }
    .cst-preview-bar a {
      display: inline-flex;
      align-items: center;
      color: #e8eef0;
      text-decoration: none;
      font-weight: 700;
      font-size: 13px;
      background: #1a1a1a;
      border: 1px solid #ffffff22;
      border-radius: 12px;
      padding: 8px 12px;
    }
    .cst-preview-bar a:hover { outline: 2px solid #2b6cff; }
