/* App chrome: flat, Notion-style, hairlines, one type family. */
:root {
  --bg: #f7f7f8;
  --surface: #fff;
  --line: #e6e6ea;
  --text: #1f2547;
  --muted: #6b7280;
  --navy: #263166;
  --cyan: #00b3e2;
  --sea: #89d0c7;
  --radius: 8px;
  --font: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 260px 1fr 120px; gap: 16px; align-items: center;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo { height: 22px; width: auto; }
.brand__name { font-weight: 500; color: var(--muted); letter-spacing: 0.01em; }
.fetch { display: flex; gap: 8px; max-width: 760px; width: 100%; justify-self: center; }
.fetch input { flex: 1; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); outline: none; }
.fetch input:focus { border-color: var(--cyan); background: #fff; }
.topbar__right { display: flex; justify-content: flex-end; }

.btn { height: 38px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; cursor: pointer; white-space: nowrap; transition: background 0.12s, border-color 0.12s; }
.btn:hover { background: #f2f3f5; }
.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 500; }
.btn--primary:hover { background: #1d2650; }
.btn--ghost { background: transparent; }
.btn--small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.link { background: none; border: 0; color: var(--navy); text-decoration: underline; cursor: pointer; padding: 0; }
.file-btn { display: inline-flex; align-items: center; margin-top: 10px; }

.banner { margin: 12px 20px 0; padding: 10px 14px; border: 1px solid #f3c2c2; background: #fff5f5; color: #9b1c1c; border-radius: var(--radius); }
.banner.is-ok { border-color: #c7e8d6; background: #f0faf4; color: #1d5c3a; }

.layout { display: grid; grid-template-columns: 340px 1fr 340px; gap: 16px; padding: 16px 20px 40px; align-items: start; }
@media (max-width: 1400px) { .layout { grid-template-columns: 320px 1fr; } .panel--right { grid-column: 1 / -1; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.panel--left, .panel--right { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; }
.panel--main { min-width: 0; }

.block { padding: 16px; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block--muted { color: var(--muted); }
.block__title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; }
.block__title small { font-weight: 400; text-transform: none; letter-spacing: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; }
.chip:hover { border-color: #c9cbd3; }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field label small { color: #9aa0ad; }
.field input, .field textarea, .field select { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; outline: none; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--cyan); }
.field--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.field[data-show] { display: none; }
.field[data-show].is-on { display: block; }

.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.row--check { gap: 8px; cursor: pointer; font-size: 13px; }

.agents { display: flex; flex-direction: column; gap: 6px; }
.agent-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.agent-row img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; background: #e6e9f0; }
.agent-row .name { font-weight: 500; }
.agent-row .pos { font-size: 12px; color: var(--muted); }
.agent-row input { margin-left: auto; }

.photo-help { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #e6e9f0; cursor: crosshair; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.is-hero { outline: 2px solid var(--cyan); outline-offset: -2px; }
.thumb .focus { position: absolute; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: rgba(0, 179, 226, 0.9); transform: translate(-50%, -50%); pointer-events: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); }
.thumb .tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); padding: 14px 4px 4px; opacity: 0; transition: opacity 0.12s; }
.thumb:hover .tools { opacity: 1; }
.thumb .tools button { width: 24px; height: 22px; border: 0; border-radius: 4px; background: rgba(255, 255, 255, 0.9); font-size: 12px; cursor: pointer; line-height: 1; }
.thumb .tag { position: absolute; top: 4px; left: 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.05em; background: var(--cyan); color: #fff; padding: 2px 6px; border-radius: 4px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.toolbar__right { display: flex; gap: 8px; }
.tabs { display: flex; gap: 4px; }
.tab { height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; line-height: 1; }
.tab span { font-size: 11px; color: var(--muted); }
.tab:hover { background: #f2f3f5; }
.tab.is-active { background: #eef0f5; border-color: var(--line); font-weight: 500; }

.carousel-opts { display: flex; gap: 20px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.carousel-opts label { display: flex; align-items: center; gap: 8px; }
.carousel-opts select, .carousel-opts input[type='number'] { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; width: auto; }
.carousel-opts input[type='number'] { width: 64px; }

.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 16px; }
.designs.is-story { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.design { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.design.is-selected { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.design__head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.design__head b { font-weight: 500; }
.design__head small { color: var(--muted); margin-left: auto; }
.design__head input { margin: 0; }
.preview { position: relative; width: 100%; overflow: hidden; background: #eaecf1; }
.preview .canvas { position: absolute; top: 0; left: 0; }
.design__foot { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }
.design__foot .btn { flex: 1; }

.panel--right textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 6px; line-height: 1.45; resize: vertical; outline: none; font-size: 13px; }
.panel--right textarea:focus { border-color: var(--cyan); }
.meta { font-size: 12px; line-height: 1.6; word-break: break-word; }
.meta a { color: var(--navy); }

.empty { max-width: 640px; margin: 80px auto; text-align: center; padding: 0 20px; }
.empty__stamp { width: 72px; margin-bottom: 20px; }
.empty h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; color: var(--navy); margin-bottom: 12px; }
.empty p { color: var(--muted); line-height: 1.5; }
.empty__examples { margin-top: 20px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

.progress { position: fixed; inset: 0; z-index: 50; background: rgba(247, 247, 248, 0.7); display: flex; align-items: center; justify-content: center; }
.progress__box { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Offscreen full-size stage for exports */
.stage { position: fixed; left: -20000px; top: 0; width: 1080px; pointer-events: none; }

/* Highlights list */
.hl-list { display: flex; flex-direction: column; gap: 8px; }
.hl-item { border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
.hl-item__addr { font-size: 12px; font-weight: 500; margin-bottom: 6px; }
.hl-item__row { display: grid; grid-template-columns: 1fr 2fr; gap: 6px; }
.hl-item__row input { width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.field--inline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.field--inline label { margin: 0; }
.field--inline input { width: 72px; }
.panel--right .meta { margin-top: 8px; color: var(--muted); font-size: 12px; }
.topbar__right { gap: 8px; }
.topbar__right a.btn { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.brand a { display: flex; }

/* Caption library page */
.lib { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 20px 40px; align-items: start; max-width: 1400px; margin: 0 auto; }
@media (max-width: 1000px) { .lib { grid-template-columns: 1fr; } }
.lib__p { line-height: 1.55; color: var(--muted); }
.lib textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 6px; line-height: 1.45; font-size: 13px; resize: vertical; outline: none; }
.lib textarea:focus { border-color: var(--cyan); }
.lib__inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.lib__inline select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.lib__list { display: flex; flex-direction: column; gap: 10px; }
.lib__item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.lib__item pre { white-space: pre-wrap; font: inherit; font-size: 13px; line-height: 1.45; margin: 6px 0 0; }
.lib__meta { display: flex; gap: 8px; align-items: center; }
.lib__meta .link { margin-left: auto; font-size: 12px; }
.pill { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; background: #eef0f5; color: var(--muted); padding: 2px 8px; border-radius: 999px; }

/* Multi-link box on the PPD page */
.fetch--multi textarea { flex: 1; min-height: 38px; max-height: 120px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); outline: none; resize: vertical; line-height: 1.4; font-size: 13px; }
.fetch--multi textarea:focus { border-color: var(--cyan); background: #fff; }

/* Slide cards: quiet header, tools under the image */
.design__head { justify-content: flex-start; }
.design__head b { width: 18px; color: var(--muted); font-weight: 500; }
.design__head span { color: var(--text); }
.design__tools { display: flex; gap: 4px; justify-content: center; padding: 6px; border-top: 1px solid var(--line); }
.design__tools button { width: 30px; height: 26px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; }
.design__tools button:hover { background: #f2f3f5; color: var(--text); border-color: var(--line); }
.design__tools button[data-download] { margin-left: auto; }
.design__tools button[data-drop] { color: #b42318; }
.design__foot { display: none; }
.thumb.has-pin::after { content: ''; position: absolute; right: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 2px #fff; }

/* Home: agent picker + catalog */
.home { max-width: 1100px; margin: 40px auto 60px; padding: 0 20px; }
.home__head { text-align: center; max-width: 620px; margin: 0 auto 24px; }
.home__head h1 { font-size: 26px; font-weight: 600; color: var(--navy); margin: 12px 0 8px; }
.home__head p { color: var(--muted); line-height: 1.5; }
.chips--big { justify-content: center; gap: 8px; margin-bottom: 24px; }
.chips--big .chip { height: 34px; padding: 0 14px; }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; text-align: left; padding: 0; }
.cat:hover { border-color: #c9cbd3; }
.cat.is-picked { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.cat__img { aspect-ratio: 4 / 3; background: #e6e9f0; object-fit: cover; width: 100%; }
.cat__body { padding: 10px 12px 12px; }
.cat__addr { font-weight: 500; }
.cat__sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.cat__meta { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.cat__meta .pill { text-transform: none; letter-spacing: 0; }
.cat__meta .pill.is-sale { background: #e8f7fc; color: #0b7ea3; }
.cat__meta .pill.is-sold { background: #eef0f5; color: var(--navy); }
.cat__meta .pill.is-lease { background: #e9f6f3; color: #1e7a6a; }
.home__foot { margin-top: 20px; text-align: center; color: var(--muted); font-size: 12px; }
.home__foot .link { margin-left: 8px; }
.catalog-bar { display: flex; gap: 10px; align-items: center; justify-content: center; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.catalog__h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 18px 0 10px; }
.thumb .tools { justify-content: center; }
.thumb .tools button { width: auto; padding: 0 8px; }

.story-line { flex: 1; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; outline: none; }
.story-line:focus { border-color: var(--cyan); }
.home__foot { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.block__title { margin-bottom: 8px; }
.row--check { margin-top: 6px; }

.week { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.week:empty { display: none; }
.week__text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.week__text b { color: var(--text); font-weight: 500; }

/* Reposition overlay */
.adjust { position: fixed; inset: 0; z-index: 60; background: rgba(20, 22, 30, 0.72); display: flex; align-items: center; justify-content: center; }
.adjust__box { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.adjust__stage { position: relative; overflow: hidden; border-radius: 6px; background: #000; cursor: grab; touch-action: none; user-select: none; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.adjust__stage.is-dragging { cursor: grabbing; }
.adjust__stage .canvas { position: absolute; top: 0; left: 0; pointer-events: none; }
.adjust__bar { display: flex; gap: 14px; align-items: center; color: #fff; font-size: 13px; }
.design .preview { cursor: zoom-in; }

.made-by { text-align: center; padding: 24px 0 32px; font-size: 12px; color: var(--muted); }
.made-by a { color: var(--muted); }

.hint { padding: 8px 16px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.adjust__strip { display: flex; gap: 6px; max-width: 90vw; overflow-x: auto; padding: 4px; }
.adjust__thumb { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #333; cursor: pointer; }
.adjust__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adjust__thumb.is-on { border-color: var(--cyan); }

/* ---------- Mobile bar + more-options (desktop hides both) ---------- */
.mbar { display: none; }
.more-btn { display: none; }
.design__tools button[data-adjust] { font-size: 13px; }
.mbar .btn.is-ready { background: #0b7ea3; border-color: #0b7ea3; }
.chip--ghost { border-style: dashed; color: var(--muted); }
.mobile-nav { display: none; }

/* =====================================================================
   Phones (and small tablets). Built for one thumb: open, tap your name,
   tap a listing, swipe through the slides, save. Everything else folds away.
   ===================================================================== */
@media (max-width: 820px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 15px; padding-bottom: calc(80px + env(safe-area-inset-bottom)); overflow-x: hidden; }
  input, select, textarea { font-size: 16px; }
  .btn { height: 46px; padding: 0 16px; font-size: 15px; }
  .btn--small { height: 42px; }
  .chip { height: 40px; padding: 0 14px; font-size: 14px; }

  /* Header: mark on the left, one small nav on the right. The paste box is off by default on the agent page. */
  .topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px calc(10px); }
  .brand__logo { height: 18px; }
  .brand__name { display: none; }
  .fetch { order: 3; width: 100%; max-width: none; display: none; }
  .topbar.show-fetch .fetch { display: flex; }
  body[data-mode='ppd'] .fetch { display: flex; }
  .fetch input, .fetch--multi textarea { height: 46px; }
  .topbar__right { gap: 6px; }
  .topbar__right .btn { height: 34px; padding: 0 9px; font-size: 12px; }
  body[data-mode='agent'] .topbar__right a[href='/library.html'] { display: none; }
  .brand__logo { height: 16px; }

  /* Home */
  .home { margin: 8px auto 30px; padding: 0 14px; }
  .empty__stamp { width: 56px; margin-bottom: 10px; }
  .home__head { margin-bottom: 14px; }
  .home__head h1 { font-size: 24px; }
  .home__head p { font-size: 14px; }
  .chips--big { gap: 8px; margin-bottom: 16px; }
  .chips--big .chip { height: 42px; }
  .catalog { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat { border-radius: 12px; }
  .cat__img { aspect-ratio: 1; }
  .cat__body { padding: 8px 10px 10px; }
  .cat__addr { font-size: 14px; line-height: 1.25; }
  .cat__sub { font-size: 12px; }
  .cat__meta { flex-wrap: wrap; gap: 4px; font-size: 11px; }
  .catalog-bar { flex-direction: column; align-items: stretch; text-align: center; gap: 8px; }
  .catalog-bar .btn { width: 100%; }
  .week { flex-direction: column; align-items: stretch; padding: 12px; }
  .week .btn { width: 100%; }
  .home__foot { flex-direction: column; gap: 8px; margin-top: 16px; }
  .home__foot span { font-size: 12px; }

  /* Studio: slides first, options folded, caption last */
  .layout { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 8px 0 20px; }
  .panel { border-radius: 0; border-left: 0; border-right: 0; width: 100%; min-width: 0; }
  .panel--left, .panel--right { position: static; max-height: none; overflow: visible; }
  .panel--main { order: 0; }
  .panel--left { order: 1; }
  .panel--right { order: 2; }
  .block { padding: 14px; }
  .more-btn { display: block; width: calc(100% - 28px); margin: 14px 14px 0; }
  .panel--left .block[data-more] { display: none; }
  .panel--left.is-open .block[data-more] { display: block; }
  .field--3 { grid-template-columns: repeat(3, 1fr); }

  /* Tabs as a segmented control */
  .toolbar { padding: 10px 14px; gap: 8px; }
  .tabs { display: flex; width: 100%; background: #eef0f5; border-radius: 10px; padding: 3px; gap: 0; }
  .tab { flex: 1; height: 40px; justify-content: center; border-radius: 8px; font-size: 14px; padding: 0 6px; }
  .tab span { display: none; }
  .tab.is-active { background: #fff; border-color: transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
  .toolbar__right { display: none; }
  .hint { padding: 8px 14px 4px; font-size: 12px; border: 0; }

  /* Slides: one big slide at a time, swipe sideways, like the post itself */
  .designs, .designs.is-story {
    display: flex; grid-template-columns: none; gap: 12px; padding: 8px 14px 14px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .designs::-webkit-scrollbar { display: none; }
  .design { flex: 0 0 calc(100vw - 56px); scroll-snap-align: center; border-radius: 12px; }
  .designs.is-story .design { flex-basis: calc(100vw - 96px); }
  .design__head { padding: 8px 12px; font-size: 13px; }
  .design__tools { gap: 4px; padding: 6px; }
  .design__tools button { width: 44px; height: 40px; font-size: 18px; border-radius: 8px; }
  .design__tools button[data-adjust] { font-size: 15px; }
  .preview { cursor: default; }

  /* Photos block */
  .photos { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .thumb .tools { opacity: 1; padding: 10px 2px 2px; }
  .thumb .tools button { height: 24px; font-size: 11px; padding: 0 6px; }
  .thumb .tag { font-size: 9px; }

  /* Caption */
  .panel--right textarea { font-size: 15px; }
  .row .btn { flex: 1; }

  /* Bottom bar */
  .mbar {
    display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }
  .mbar .btn { flex: 1; height: 50px; font-size: 16px; }
  .mbar .btn:not(.btn--primary) { flex: 0 0 auto; padding: 0 14px; font-size: 14px; }

  /* Move / swap overlay */
  .adjust { align-items: flex-end; }
  .adjust__box { width: 100%; background: #14161e; border-radius: 16px 16px 0 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); gap: 10px; }
  .adjust__bar { flex-direction: column; gap: 8px; text-align: center; padding: 0 16px; font-size: 13px; }
  .adjust__bar .btn { height: 46px; width: 100%; }
  .adjust__strip { max-width: 100vw; padding: 4px 12px; }
  .adjust__thumb { width: 66px; height: 50px; }

  .progress__box { margin: 0 20px; }
  .banner { margin: 10px 14px 0; font-size: 14px; }
  .lib { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .made-by { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

@media (max-width: 820px) and (min-width: 600px) {
  .catalog { grid-template-columns: repeat(3, 1fr); }
  .design { flex-basis: 380px; }
  .designs.is-story .design { flex-basis: 300px; }
}

/* Ready sheet: full screen, one big button in the middle */
.ready { position: fixed; inset: 0; z-index: 70; background: #fff; display: flex; align-items: center; justify-content: center; }
.ready__close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.ready__body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; width: min(420px, 100%); text-align: center; }
.ready__count { font-size: 64px; font-weight: 600; color: var(--navy); line-height: 1; }
.ready__label { color: var(--muted); margin-bottom: 18px; }
.ready__save { width: 100%; height: 64px; font-size: 19px; border-radius: 14px; }
.ready__note { color: var(--muted); font-size: 14px; }
.ready__caption { margin-top: 18px; height: 46px; }
