:root{
    --accent:#2563eb;      /* blue */
    --accent-soft:#eaf1ff; /* very light blue */
    --bg:#ffffff;
    --text:#111111;
    --muted:#666666;
    --line:#e9e9e9;
    --hover:#f5f5f5;
    --focus:#111111;
  }
  
  *{ box-sizing:border-box; }
  html,body{ height:100%; }
  
  body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    line-height:1.25;
  }
  
  a{ color:inherit; text-decoration:none; }
  a:focus-visible, button:focus-visible, input:focus-visible{
    outline:2px solid var(--focus);
    outline-offset:2px;
  }
  
  .topbar{
    position:sticky;
    top:0;
    background:rgba(255,255,255,.92);
    backdrop-filter:saturate(180%) blur(10px);
    border-bottom:1px solid var(--line);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:18px 28px;
    z-index:10;
  }
  .topbar-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
  }
  
  .topbar-accent{
    height:3px;
    background: linear-gradient(90deg, var(--accent), #22c55e, #f97316);
    opacity: .9;
  }
  
  .menu{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
  }
  
  .tab{
    height:34px;
    width:92px;
    padding:0 12px;
    border-radius:999px;
    border:1px solid var(--line);
    background:#fff;
    color:#111;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
  }
  
  .tab:hover{ background: var(--hover); }
  
  .tab.is-active{
    border-color: rgba(37, 99, 235, .35);
    background: var(--accent-soft);
    color: #0f172a;
  }
  
  .item{
    cursor:pointer;
    align-items: center;
    transition: background 120ms ease, transform 120ms ease;

  }
  
  .item:active {
    transform: scale(0.99);
  }
  
  .item:focus-within{
    outline:2px solid rgba(37, 99, 235, .35);
    outline-offset:-2px;
  }
  
  .item-right{
    display:flex;
    align-items:center;
    gap:10px;
    flex-shrink:0;
  }
  
  .icon-btn:hover{ background: var(--hover); }
  
  .badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    color: var(--muted);
  }
  
  .container{
    max-width:980px;
    margin:0 auto;
    padding:0 28px 64px;
  }
  
  .hero{
    padding:92px 0 34px;
  }
  
  .hero-inner{
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  
  .hero-title{
    margin:0;
    font-size:72px;
    letter-spacing:-0.05em;
    font-weight:700;
  }
  
  .hero-subtitle{
    margin:0;
    font-size:20px;
    color:var(--muted);
  }
  
  .hero-cta{
    margin-top:18px;
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
  }
  
  .hero-meta{
    font-size:12px;
    color:var(--muted);
  }
  
  .section{
    padding:28px 0;
  }
  
  .section-head{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:16px;
    border-top:1px solid var(--line);
    padding-top:18px;
  }
  
  .section-title{
    margin:0;
    font-size:18px;
    font-weight:700;
    letter-spacing:-0.01em;
  }
  
  .section-hint{
    margin:0;
    font-size:13px;
    color:var(--muted);
  }
  
  .list{
    margin-top:18px;
    display:flex;
    flex-direction:column;
    gap:16px;        /* вот оно — расстояние */
    border:none;
    border-radius:0;
    overflow:visible;
  }
  
  .item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
  
    padding:18px;
  
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
  
    cursor:pointer;
    transition: box-shadow 120ms ease, transform 120ms ease;
  }
  
  .item:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
  }
  
  .item:hover{
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,.06);
  }
  
  .item-left{ min-width:0; }
  
  .big{
    font-size: clamp(40px, 6vw, 58px);
    line-height: 1;
    font-weight:700;
    letter-spacing:-0.03em;
    font-variant-numeric: tabular-nums;
    margin:0;
  }
  
  .desc{
    margin:6px 0 0;
    color:var(--muted);
    font-size:14px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:680px;
  }
  
  .item-right{
    display:flex;
    align-items:flex-end;
    gap:10px;
    flex-shrink:0;
  }
  
  .pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:40px;
    font-size:13px;
    color:var(--muted);
    border:1px solid var(--line);
    padding:0 12px;
    border-radius:999px;
  }
  
  .icon-btn{
    height:40px;
    padding:0 12px;
    border-radius:10px;
    border:1px solid var(--line);
    background:#fff;
    cursor:pointer;
    font-weight:600;
    font-size:13px;
    white-space:nowrap;
  }
  
  .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    height:40px;
    padding:0 14px;
    border-radius:10px;
    font-weight:600;
    font-size:14px;
    border:1px solid transparent;
    cursor:pointer;
    user-select:none;
  }
  
  .btn-solid{
    background: var(--accent);
    color:#fff;
  }
  
  .btn-solid:hover{ opacity:.92; }
  
  .btn-outline{
    background:#fff;
    color:#111;
    border-color:var(--line);
  }
  
  .btn-outline:hover{
    background: var(--hover);
  }

  .btn-outline:disabled{
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
  }
  
  .form{
    margin-top:18px;
    display:grid;
    gap:14px;
    max-width:560px;
  }
  
  .field{
    display:grid;
    gap:6px;
  }
  
  .label{
    font-size:12px;
    color:var(--muted);
  }
  
  .hint{
    margin:6px 0 0;
    font-size:12px;
    color:var(--muted);
  }
  
  .input{
    height:42px;
    border:1px solid var(--line);
    border-radius:10px;
    padding:0 12px;
    font-size:14px;
    background:#fff;
    color:#111;
  }
  
  .input:focus{
    border-color:#111;
  }
  
  .grid-2{
    display:grid;
    gap:12px;
    grid-template-columns: 1fr 1fr;
  }
  
  .radio-row{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
  }
  
  .radio{
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px 12px;
    border:1px solid var(--line);
    border-radius:12px;
  }

  .radio.radio-with-hint {
    align-items: flex-start;
    gap: 10px;
  }
  .radio-with-hint .radio-label {
    display: block;
    font-weight: 600;
  }
  .radio-with-hint .radio-hint {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
  }
  
  .radio input{ accent-color:#111; }
  
  .tiny{
    font-size:12px;
    color:var(--muted);
    margin:0;
  }
  .tiny.slow-mode {
    color: var(--warning, #b8860b);
    font-weight: 500;
  }

  .footer {
    border-top: 1px solid var(--line);
    padding: 32px 0 40px;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }
  .footer p,
  .footer a {
    text-align: center;
  }
  .footer-brand {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
  }
  .footer-legal,
  .footer-since {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    opacity: 0.9;
  }
  .footer-since {
    margin-top: 2px;
  }
  .footer-email {
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s ease;
  }
  .footer-email:hover {
    color: var(--accent);
  }
  
  @media (max-width: 720px){
    .topbar{ padding:16px 16px; }
    .topbar-inner{ gap: 20px; }
    .container{ padding:0 16px 52px; }
    .hero{ padding:64px 0 24px; }
    .hero-title{ font-size:46px; }
    .big{ font-size:40px; }
    .desc{ max-width:320px; }
    .grid-2{ grid-template-columns: 1fr; }
    .footer {
      align-items: center;
      text-align: center;
    }
    .footer p,
    .footer a {
      text-align: center;
    }
    .menu{
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      justify-content: initial;
    }
    .tab{
      width: 100%;
      justify-content: center;
    }
  }

  .brand{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:700;
    letter-spacing:-0.02em;
    font-size:18px;
  }
  
  .mark{
    width:10px;
    height:10px;
    border-radius:999px;
    background: var(--accent);
    box-shadow: 0 0 0 6px var(--accent-soft);
  }

  .likes-inline{
    margin-top:6px;
    font-size:13px;
    font-weight:600;
    color:#dc2626; /* красивый красный */
    display:inline-flex;
    align-items:center;
    gap:6px;
  }

  #apiHint::before{
    content:"";
    display:inline-block;
    width:8px;
    height:8px;
    border-radius:999px;
    background:#ef4444;
    margin-right:6px;
    vertical-align:middle;
    box-shadow: 0 0 0 0 rgba(239,68,68,.6);
    animation: pulse 1.8s infinite;
  }
  
  @keyframes pulse{
    0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
    70% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  }

  #refreshHint{
    margin-left: 8px;
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }

  .modal{
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
  }
  
  .modal.is-open{ display: block; }
  
  .modal-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(17,17,17,.55);
  }
  
  .modal-card{
    position: relative;
    margin: 10vh auto 0;
    max-width: 420px;
    width: calc(100% - 32px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
    padding: 16px;
    outline: none;
  }
  
  .modal-head{
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }
  
  .modal-title{
    font-weight: 800;
    letter-spacing: -0.02em;
  }
  
  .modal-sub{
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
  }
  
  .turnstile-box{
    display: flex;
    justify-content: center;
    padding: 10px 0 6px;
    min-height: 74px;
  }
  
  .modal-foot{
    display:flex;
    justify-content: space-between;
    align-items:center;
    margin-top: 8px;
  }

  .page-fade {
    position: fixed;
    inset: 0;
    background: #0b0f19;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    z-index: 9999;
  }
  
  .page-fade.is-on {
    opacity: 1;
    pointer-events: auto;
  }

  /* ----- Dark design: city bg + blur + overlay + gradients + glass cards ----- */
  .page-dark {
    background: #0a0b14;
    color: #fff;
    min-height: 100vh;
  }
  /* 1. Фото города */
  .page-dark::before {
    content: "";
    position: fixed;
    inset: -20%;
    background: url("skyscrapers.png") center center / cover no-repeat;
    /* 2. Blur (лёгкий) */
    filter: blur(6px);
    transform: scale(1.15);
    pointer-events: none;
    z-index: 0;
  }
  /* 3. Тёмный overlay + 4. Цветные радиальные градиенты */
  .page-dark::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse 100% 70% at 50% 0%, rgba(88, 28, 135, 0.35) 0%, transparent 55%),
      radial-gradient(ellipse 80% 100% at 85% 60%, rgba(30, 58, 138, 0.3) 0%, transparent 50%),
      radial-gradient(circle at 15% 30%, rgba(99, 102, 241, 0.2) 0%, transparent 45%),
      linear-gradient(180deg, rgba(10, 11, 20, 0.72) 0%, rgba(10, 11, 20, 0.88) 100%);
    pointer-events: none;
    z-index: 1;
  }
  .page-dark .container { position: relative; z-index: 2; }

  .page-dark .topbar {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .page-dark .topbar-accent {
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    opacity: 0.9;
  }
  .page-dark .brand { color: #fff; }
  .page-dark .mark {
    background: #a855f7;
    box-shadow: 0 0 0 6px rgba(168, 85, 247, 0.25);
  }
  .page-dark .tab {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
  }
  .page-dark .tab:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  .page-dark .tab.is-active {
    background: rgba(168, 85, 247, 0.35);
    border-color: rgba(168, 85, 247, 0.5);
    color: #fff;
  }

  .page-dark .hero-title { color: #fff; }
  .page-dark .hero-subtitle { color: rgba(255, 255, 255, 0.65); }
  .page-dark .section-hint { color: rgba(255, 255, 255, 0.55); }
  .page-dark .section-head { border-top-color: rgba(255, 255, 255, 0.1); }
  .page-dark .section-title { color: #fff; }
  .page-dark #refreshHint { color: rgba(255, 255, 255, 0.5); }

  /* 5. Glass-карточки сверху */
  .page-dark .item {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  }
  .page-dark .item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  }
  .page-dark .big { color: #fff; }
  .page-dark .desc {
    color: rgba(255, 255, 255, 0.7);
  }
  .page-dark .likes-inline { color: #f87171; }
  .page-dark .icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
  }
  .page-dark .icon-btn:hover {
    background: rgba(255, 255, 255, 0.14);
  }
  .page-dark .btn-outline {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
  }
  .page-dark .btn-outline:hover {
    background: rgba(255, 255, 255, 0.14);
  }
  .page-dark .btn-solid {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
  }
  .page-dark .btn-solid:hover { opacity: 0.9; }

  .page-dark .label,
  .page-dark .hint,
  .page-dark .tiny { color: rgba(255, 255, 255, 0.6); }
  .page-dark .tiny.slow-mode { color: #fbbf24; }
  .page-dark .input {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
  }
  .page-dark .input::placeholder { color: rgba(255, 255, 255, 0.4); }
  .page-dark .input:focus { border-color: rgba(168, 85, 247, 0.6); }
  .page-dark .radio {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
  }
  .page-dark .radio input { accent-color: #a855f7; }
  .page-dark .footer { border-top-color: rgba(255, 255, 255, 0.1); }
  .page-dark .footer-brand { color: rgba(255, 255, 255, 0.95); }
  .page-dark .footer-legal,
  .page-dark .footer-since { color: rgba(255, 255, 255, 0.45); }
  .page-dark .footer-email { color: rgba(255, 255, 255, 0.55); }
  .page-dark .footer-email:hover { color: #a78bfa; }
  .page-dark .radio-with-hint .radio-hint { color: rgba(255, 255, 255, 0.55); }
  .page-dark a { color: #a78bfa; }
  .page-dark a:hover { color: #c4b5fd; }

  /* ----- Load overlay: full-screen block + circular progress ----- */
  .load-overlay {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: #0a0b14;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  .load-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .load-overlay-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: load-spin 0.85s linear infinite;
  }
  .load-overlay-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
  }
  @keyframes load-spin {
    to { transform: rotate(360deg); }
  }
