/* PokojPin. Every neutral is Tailwind's zinc scale — the shadcn/ui
   default, gray with no blue cast anywhere in the chrome — and sky is
   the one accent (600/700 on light, 400/500 on dark). Light is the
   :root default; [data-theme="dark"] overrides it, and a head script
   stamps the attribute from the pp_theme cookie or the system
   preference before first paint, so there is never a flash. */

:root {
  --bg-canvas: #f4f4f5;      /* zinc-100 */
  --bg-page: #fafafa;        /* zinc-50  */
  --bg-panel: #ffffff;
  --bg-raised: #f4f4f5;      /* zinc-100 */
  --bg-input: #ffffff;
  --border: #e4e4e7;         /* zinc-200 */
  --border-strong: #d4d4d8;  /* zinc-300 */
  --text: #18181b;           /* zinc-900 */
  --text-dim: #52525b;       /* zinc-600 */
  --text-faint: #a1a1aa;     /* zinc-400 */
  --accent: #0284c7;         /* sky-600  */
  --accent-strong: #0369a1;  /* sky-700  */
  --accent-soft: #0284c71a;
  --accent-contrast: #ffffff;
  --panel-translucent: #ffffffdd;
  --shadow: 0 12px 40px #00000029;
  --shadow-soft: 0 6px 20px #00000022;
  --tile-filter: none;
  --radius: 12px;
  --font: -apple-system, "Segoe UI", Roboto, "Hiragino Sans", sans-serif;
}

:root[data-theme="dark"] {
  --bg-canvas: #09090b;      /* zinc-950 */
  --bg-page: #09090b;
  --bg-panel: #18181b;       /* zinc-900 */
  --bg-raised: #27272a;      /* zinc-800 */
  --bg-input: #09090b;
  --border: #27272a;         /* zinc-800 */
  --border-strong: #3f3f46;  /* zinc-700 */
  --text: #f4f4f5;           /* zinc-100 */
  --text-dim: #a1a1aa;       /* zinc-400 */
  --text-faint: #71717a;     /* zinc-500 */
  --accent: #38bdf8;         /* sky-400  */
  --accent-strong: #0ea5e9;  /* sky-500  */
  --accent-soft: #38bdf822;
  --accent-contrast: #082f49;/* sky-950  */
  --panel-translucent: #18181bdd;
  --shadow: 0 12px 40px #000a;
  --shadow-soft: 0 6px 20px #0006;
  /* The raster dims a touch so pins pop; only in the dark. */
  --tile-filter: brightness(.92) saturate(.9);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* Panel color behind everything, so a phone's notch and home-indicator
   safe areas blend with the top bar instead of flashing another shade. */
html { background: var(--bg-panel); }
body {
  margin: 0; display: flex; flex-direction: column;
  background: var(--bg-panel); color: var(--text);
  font: 14px/1.5 var(--font);
  padding-bottom: env(safe-area-inset-bottom);
  /* Page zoom belongs to the map alone: no double-tap or pinch zoom
     on the chrome around it. */
  touch-action: manipulation;
}

/* Scrollbars in the same palette as everything else: a thin track that
   disappears into the panel and a thumb the colour of a border. The
   filter bar and the photo strip opt out entirely further down. */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: 999px;
  border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---- chrome ---- */

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; background: var(--bg-panel);
  padding-top: calc(10px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
}
/* Pinch gestures starting on the chrome must never zoom the page;
   pan-x keeps the filter bar's sideways scroll working. */
.topbar, .statusbar { touch-action: pan-x; }
.filters { touch-action: pan-x; }
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none;
}
.brand .byline { font-weight: 500; font-size: 12px; color: var(--text-faint); margin-left: 2px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(160deg, #38bdf8, #2563eb);
  color: #fff; font-size: 15px; font-weight: 800;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.data-note { color: var(--text-faint); font-size: 12.5px; }

/* The two topbar switches — language and theme. Each is ONE control:
   pressing anywhere on it flips to the opposite state, so nobody has
   to aim for the half they want. The halves are only a display of
   which side is active. */
.flip-toggle {
  flex: 0 0 auto; display: flex; align-items: center;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 9px; padding: 2px; cursor: pointer; font: inherit;
}
.flip-toggle .opt {
  padding: 4px 9px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  border-radius: 7px; color: var(--text-dim); line-height: 1.35;
}
.flip-toggle .opt.on { background: var(--bg-raised); color: var(--text); }
.flip-toggle:hover .opt:not(.on) { color: var(--text); }
.mode-toggle .opt { font-size: 13px; padding: 3px 8px; }

/* ---- filter bar ---- */

.filters-wrap {
  display: flex; align-items: stretch;
  background: var(--bg-panel); border-bottom: 1px solid var(--border);
}
.f-arrow {
  flex: 0 0 26px; border: 0; cursor: pointer;
  background: var(--bg-panel); color: var(--text-dim);
  font-size: 18px; line-height: 1; padding: 0;
}
.f-arrow:first-child { border-right: 1px solid var(--border); }
.f-arrow:last-child { border-left: 1px solid var(--border); }
.f-arrow:hover:not(:disabled) { color: var(--text); background: var(--bg-raised); }
.f-arrow:disabled { opacity: .3; cursor: default; }
.f-arrow[hidden] { display: none; }

/* One thumb-scrollable row everywhere, exactly like a phone; the
   expand button at the end (desktop only) unfolds it into the old
   wrapped grid for anyone who prefers everything on screen at once. */
.filters {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: nowrap;
  flex: 1; min-width: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 10px 18px 12px; background: var(--bg-panel);
}
.filters::-webkit-scrollbar { display: none; }
.filters .f-field, .filters .btn { flex: 0 0 auto; }
@media (min-width: 761px) {
  .filters-wrap.f-open .filters { flex-wrap: wrap; overflow-x: visible; }
}
.f-expand {
  flex: 0 0 34px; align-self: stretch; border: 0; cursor: pointer;
  border-left: 1px solid var(--border);
  background: var(--bg-panel); color: var(--text-dim);
  display: grid; place-items: center; padding: 0;
}
.f-expand:hover { color: var(--text); background: var(--bg-raised); }
.f-expand-chev {
  width: 8px; height: 8px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translate(1px, -1px);
}
.filters-wrap.f-open .f-expand-chev { transform: rotate(135deg) translate(1px, -1px); }
.f-field { display: flex; flex-direction: column; gap: 4px; }
.f-field > span {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-faint);
}
.filters select, .filters input {
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 7px 10px; font: inherit; font-size: 13.5px;
}
.filters select:focus, .filters input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.f-price input { width: 110px; }
#fCity { width: 150px; }
/* Dynamic per-category dropdowns flow as normal bar items. */
.f-extra { display: contents; }
.f-extra select { max-width: 190px; }

.segmented { display: flex; background: var(--bg-input); border: 1px solid var(--border); border-radius: 9px; padding: 2px; }
.segmented button {
  border: 0; background: none; color: var(--text-dim); cursor: pointer;
  font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 7px;
}
.segmented button[aria-pressed="true"] { background: var(--bg-raised); color: var(--text); font-weight: 600; }
.segmented button:disabled { opacity: .35; cursor: default; }

.btn {
  border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 13.5px;
  background: var(--accent); color: var(--accent-contrast);
  border-radius: 9px; padding: 8px 16px;
}
.btn:hover { background: var(--accent-strong); }
.btn:disabled { opacity: .5; cursor: default; }

.statusbar {
  padding: 6px 18px; background: var(--bg-canvas);
  border-bottom: 1px solid var(--border); min-height: 30px;
}
.status { color: var(--text-dim); font-size: 12.5px; }
.status[data-busy="1"]::before {
  content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 7px;
  border: 2px solid var(--accent); border-top-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite; vertical-align: -1px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- map ---- */

/* The map and the list sit side by side: opening the list makes the
   map narrower rather than covering it, so "near the centre of the
   map" keeps meaning what it says. */
.stage { flex: 1; min-height: 0; display: flex; position: relative; }
/* Gaps while tiles load read as blank map, not a black void. */
#map { flex: 1; min-width: 0; height: 100%; background: #d9d5cf; }
.leaflet-container { background: #d9d5cf; }

.leaflet-tile-pane { filter: var(--tile-filter); }


.leaflet-container { font: 13px/1.45 var(--font); }
.leaflet-control-attribution {
  background: var(--panel-translucent) !important; color: var(--text-faint) !important;
}
.leaflet-control-attribution a { color: var(--text-dim) !important; }
.leaflet-control-zoom a {
  background: var(--bg-panel) !important; color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--bg-raised) !important; }

/* ---- listing bubble (our own element, always above the pins) ---- */

.pin-bubble {
  /* Above every Leaflet pane and above the pin canvas: a click on the
     card is a click on the card, never on the map behind it. */
  position: absolute; z-index: 1200; width: min(262px, calc(100vw - 20px));
  transform: translate(-50%, calc(-100% - 10px));
  background: var(--bg-panel); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  pointer-events: auto;
}
.pin-bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -7px;
  width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg);
  background: var(--bg-panel);
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}
/* Flipped under the pin when there is no headroom above it. */
.pin-bubble.below { transform: translate(-50%, 0); }
.pin-bubble.below::after {
  bottom: auto; top: -7px;
  transform: translateX(-50%) rotate(225deg);
}
.pin-bubble * { pointer-events: auto; }
.bubble-close {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 24px; height: 24px; border: 0; border-radius: 7px; cursor: pointer;
  background: #10101488; color: #fff; font-size: 15px; line-height: 1;
}
.bubble-close:hover { background: #101014cc; }

/* ---- listing bubble ---- */

.pin-bubble .pin-card .shot-track img { height: 150px; }
.leaflet-popup-content-wrapper {
  background: var(--bg-panel); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 0; overflow: hidden;
}
.leaflet-popup-content { margin: 0; width: 260px !important; }
.leaflet-popup-tip { background: var(--bg-panel); border: 1px solid var(--border-strong); }
.leaflet-popup-close-button { color: var(--text-dim) !important; font-size: 18px !important; padding: 6px 8px 0 0 !important; }

/* ---- the photo strip ----
   Every photo OLX published, swipeable. Native scroll-snap carries the
   gesture and its momentum; the arrows are the same thing for a mouse. */

.shots { position: relative; }
.shot-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}
.shot-track::-webkit-scrollbar { display: none; }
.shot-track img {
  display: block; flex: 0 0 100%; width: 100%; height: 150px;
  object-fit: cover; scroll-snap-align: center; background: var(--bg-input);
}
.shot-nav {
  position: absolute; z-index: 2; top: 50%; transform: translateY(-50%);
  width: 26px; height: 36px; border: 0; border-radius: 8px; cursor: pointer;
  background: #101014aa; color: #fff; font-size: 17px; line-height: 1; padding: 0;
}
.shot-nav:hover:not(:disabled) { background: #101014dd; }
.shot-nav:disabled { opacity: .25; cursor: default; }
.shot-nav.prev { left: 6px; }
.shot-nav.next { right: 6px; }
.shot-dots {
  position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%);
  display: flex; gap: 4px; pointer-events: none;
}
.shot-dots i { width: 5px; height: 5px; border-radius: 50%; background: #ffffff66; }
.shot-dots i.on { background: #fff; }

/* Posted within the last week. */
.badge-new {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: #052e16; background: #4ade80; border-radius: 999px; padding: 3px 8px;
}
.badge-new.inline { position: static; display: inline-block; }

/* ---- favorites ----
   The star on the card sits beside the close button; the one on a
   list row sits on the thumbnail. Both turn gold when saved. */

.bubble-fav {
  position: absolute; top: 6px; right: 34px; z-index: 3;
  width: 24px; height: 24px; border: 0; border-radius: 7px; cursor: pointer;
  background: #10101488; color: #ffffff99; font-size: 14px; line-height: 1; padding: 0;
}
.bubble-fav:hover { background: #101014cc; color: #fff; }
.bubble-fav.on { color: #fbbf24; }
.row-star {
  position: absolute; top: 4px; left: 4px; z-index: 2;
  width: 24px; height: 24px; border-radius: 7px; cursor: pointer;
  display: grid; place-items: center;
  background: #10101466; color: #ffffff88; font-size: 13px; line-height: 1;
}
.row-star:hover { background: #101014bb; color: #fff; }
.row-star.on { color: #fbbf24; }
/* A favorite whose listing has since expired. */
.row.gone .row-title { color: var(--text-faint); font-style: italic; }

.pin-card .body { padding: 10px 12px 12px; }
.pin-card .title {
  font-weight: 600; font-size: 13px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pin-card .price { font-size: 16px; font-weight: 700; color: var(--accent); margin-top: 5px; }
.pin-card .meta { color: var(--text-dim); font-size: 12px; margin-top: 3px; }
/* Never break "21 506 zł/m²" across two lines under the price. */
.pin-card .perm2 {
  font-size: 11px; color: var(--text-faint); font-weight: 500; white-space: nowrap;
}
/* OLX gives an exact address for only a small minority of listings,
   so a dot is usually a point inside a district, not a doorstep. */
.pin-card .approx {
  margin-top: 6px; display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-faint);
}
.pin-card .approx::before {
  content: ''; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid currentColor;
}
.pin-card .added { margin-top: 5px; font-size: 11.5px; color: var(--text-faint); }
.pin-card .stops {
  margin-top: 7px; font-size: 11.5px; color: var(--text-dim); line-height: 1.4;
}
.pin-card .stops[hidden] { display: none; }
.pin-card .stops span {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 1px;
}
.pin-card .loading { padding: 14px 12px; color: var(--text-dim); font-size: 13px; }
.pin-card a.go {
  display: inline-block; margin-top: 9px; font-size: 12.5px; font-weight: 600;
  color: var(--accent); text-decoration: none;
}
.pin-card a.go:hover { text-decoration: underline; }

/* ---- the sidebar ---- */

.side {
  flex: 0 0 340px; min-width: 0; display: none; flex-direction: column;
  background: var(--bg-panel); border-left: 1px solid var(--border);
}
.side-open .side { display: flex; }

.side-toggle {
  position: absolute; z-index: 700; top: 12px; right: 12px;
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer;
  background: var(--bg-panel); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; padding: 7px 11px;
  box-shadow: var(--shadow-soft);
}
.side-toggle:hover { background: var(--bg-raised); }
.side-open .side-toggle { right: 352px; }
/* A chevron pointing the way the panel will move. */
.side-chev {
  width: 7px; height: 7px; border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 1px;
}
.side-open .side-chev { transform: rotate(-135deg); margin: 0 1px 0 0; }
.side-open .side-toggle-label { display: none; }

.side-head {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
/* On a phone the list covers the map, so it carries its own way back;
   on a desktop the toggle beside it already does that job. */
.side-back { display: none; }
.side-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-faint);
}
.side-sort { align-self: flex-start; }
.side-sort button { padding: 4px 10px; font-size: 12.5px; }

.side-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.side-empty { margin: 0; padding: 16px 12px; color: var(--text-dim); font-size: 12.5px; }

.row {
  position: relative; display: flex; gap: 10px; width: 100%; text-align: left;
  border: 0; border-bottom: 1px solid var(--border); cursor: pointer;
  background: none; color: var(--text); font: inherit; padding: 9px 12px;
}
.row:hover { background: var(--bg-raised); }
.row.on { background: #22c55e1f; box-shadow: inset 3px 0 0 #22c55e; }
.row.seen { color: var(--text-dim); }
.row.seen .row-shot img { opacity: .55; }
.row-shot {
  flex: 0 0 84px; height: 63px; border-radius: 8px; overflow: hidden;
  background: var(--bg-input); position: relative;
}
.row-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title {
  font-size: 12.5px; line-height: 1.3; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* The NEW badge floats over the row's top-right corner; the title
   leaves it that corner instead of running underneath it. */
.row:has(.badge-new) .row-title { padding-right: 52px; }
.row-price { font-size: 13px; font-weight: 700; color: var(--accent); }
.row-meta { font-size: 11px; color: var(--text-faint); }
.row .badge-new { top: 9px; right: 12px; left: auto; padding: 2px 6px; font-size: 9px; }
/* Waiting on its card: the shape is there, the words are not. */
.row.pending .row-title, .row.pending .row-price {
  min-height: 11px; border-radius: 4px; background: var(--bg-raised);
  animation: pulse 1.2s ease-in-out infinite;
}
.row.pending .row-title { min-height: 26px; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---- small screens ---- */

/* On a phone there is no room to put a list beside the map, so it
   takes the whole map over instead: tap Lista, pick a listing, and the
   list hands you back to the map with that listing's card open. */
@media (max-width: 899px) {
  .side {
    position: absolute; inset: 0; z-index: 1300;
    border-left: 0;
  }
  /* The list is the whole surface, so the floating toggle would just be
     sitting on top of it. */
  .side-open .side-toggle { display: none; }
  .side-toggle { top: 10px; right: 10px; padding: 8px 13px; }
  .side-back {
    display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
    border: 0; background: none; cursor: pointer; padding: 2px 0;
    color: var(--accent); font: inherit; font-size: 14px; font-weight: 600;
  }
  .side-back::before {
    content: ''; width: 8px; height: 8px;
    border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }
  /* Thumb-sized rows, and a list that scrolls past the home indicator. */
  .row { padding: 11px 12px; }
  .row-shot { flex: 0 0 96px; height: 72px; }
  .row-title { font-size: 13.5px; }
  .row-price { font-size: 14px; }
  .side-list { padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 760px) {
  .data-note { display: none; }
  .topbar { padding: 8px 12px; }
  .brand { font-size: 14.5px; }
  /* The bar already scrolls in one row; phones just tighten it, and
     the expand button is a desktop affordance only. */
  .filters { gap: 10px; padding: 8px 12px 10px; }
  .f-expand { display: none; }
  .f-price input { width: 90px; }
  .btn { flex: 0 0 auto; padding: 8px 14px; }
  .statusbar { padding: 5px 12px; }
  .leaflet-popup-content { width: min(250px, calc(100vw - 70px)) !important; }
  .shot-track img { height: 128px; }
  .leaflet-control-zoom { display: none; }  /* pinch zoom does this on touch */
}

/* ---- free looks ---- */

/* Bottom-left of the map: how many card opens are left. The server
   keeps the real count; pressing the pill opens the purchase modal. */
.looks-pill {
  position: absolute; z-index: 700; left: 12px; bottom: 12px;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--panel-translucent); color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-soft);
  font: inherit; font-size: 12.5px; font-weight: 600;
}
.looks-pill:hover { background: var(--bg-raised); }
/* Clear of the map attribution once the screen narrows enough for
   the two to meet in the corner. */
@media (max-width: 899px) {
  .looks-pill { bottom: 32px; }
}
.looks-pill.out { color: #ef4444; }
.looks-pill[hidden] { display: none; }

/* ---- the paywall ----
   A full-screen scrim once the free looks run out. The scrim is dark
   in both themes — it is a veil, not a surface — and the card under
   it is the ordinary panel. */

.paywall {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  background: #09090bc9;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding: 20px;
}
.paywall[hidden] { display: none; }
.paywall-card {
  position: relative; width: min(430px, 100%); text-align: center;
  background: var(--bg-panel); border: 1px solid var(--border-strong);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: 36px 28px 26px;
}
.paywall-card h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.01em; }
.paywall-sub { margin: 0 0 22px; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.paywall-card .btn.buy {
  display: block; width: 100%; margin: 10px 0 0; padding: 13px 16px;
  font-size: 14.5px; border-radius: 11px;
}
.paywall-note { margin: 16px 0 0; font-size: 11.5px; color: var(--text-faint); }
.paywall-err { margin: 12px 0 0; font-size: 12.5px; color: #ef4444; }
.paywall-err[hidden] { display: none; }
/* Secondary (outline) purchase button, and the step-two extras. */
.btn.alt {
  background: none; color: var(--accent);
  border: 1px solid var(--accent); padding: 12px 16px;
}
.btn.alt:hover { background: var(--accent-soft); }
.paywall-back {
  margin-top: 14px; border: 0; background: none; cursor: pointer;
  color: var(--text-dim); font: inherit; font-size: 12.5px;
}
.paywall-back:hover { color: var(--text); }
#payEmailBox input, #codeRestoreBox input {
  width: 100%; margin-top: 10px; padding: 12px 14px;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 11px;
  font: inherit; font-size: 14px;
}
#payEmailBox input:focus, #codeRestoreBox input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
#payEmailBox[hidden], #payStep1[hidden], #payStep2[hidden], #codeRestoreBox[hidden] { display: none; }

.paywall-close {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--bg-raised); color: var(--text-dim); font-size: 16px; line-height: 1;
}
.paywall-close:hover { color: var(--text); }

/* ---- one-time codes ---- */

/* Sits centered in the topbar's empty middle; gone while unlimited
   looks are active, and gone on phones where there is no middle. */
.code-link {
  margin: 0 auto; border: 0; background: none; cursor: pointer;
  color: var(--accent); font: inherit; font-size: 13px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px;
}
.code-link:hover { text-decoration: underline; }
.code-link[hidden] { display: none; }
@media (max-width: 760px) { .code-link { display: none; } }

.code-input {
  width: 100%; padding: 12px 14px; text-align: center;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 11px;
  font: inherit; font-size: 15px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.code-input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

/* The second pill line: how long unlimited looks last. */
.looks-pill .sub {
  display: block; font-size: 10.5px; font-weight: 500;
  color: var(--text-dim); margin-top: 1px;
}

/* The account's own code, shown inside the modal for copying over. */
.code-own {
  margin: 0 0 14px; font-size: 13px; color: var(--text-dim);
}
.code-own b { color: var(--text); letter-spacing: .14em; font-size: 15px; }
