.pwa { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.pwa-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(250,249,247,.94);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pwa-top h1 { font: 600 22px/1.2 var(--serif); margin: 0; flex: 1; }
.counter { font-size: 13px; color: var(--muted); background: var(--chip); padding: 4px 10px; border-radius: 999px; }
.top-link { font-size: 14px; text-decoration: none; }
.pwa-main { max-width: 640px; margin: 0 auto; padding: 12px 16px 24px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px;
  font-size: 11px; color: var(--muted); text-decoration: none; }
.tabbar a span { font-size: 19px; line-height: 1.1; }
.tabbar a.on { color: var(--ink); font-weight: 600; }
.add-sheet { margin: 4px 0 14px; }
.add-sheet summary { list-style: none; width: 100%; }
.add-sheet summary::-webkit-details-marker { display: none; }
.add-sheet form { display: flex; gap: 8px; margin-top: 10px; }
.add-sheet input[type=url], .preview input, .preview select, .post-card textarea {
  flex: 1; min-width: 0; width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); }
.post-card textarea { height: auto; padding: 10px; font: 14px/1.4 var(--sans); }
.preview { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; display: grid; gap: 10px; }
.preview h3 { font-size: 13px; color: var(--muted); margin: 4px 0 0; font-weight: 600; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
.list { display: grid; gap: 10px; }
.row { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.row.paused { opacity: .6; }
.thumb { flex: 0 0 76px; height: 100px; border-radius: 10px; overflow: hidden; background: var(--chip); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .body { flex: 1; min-width: 0; }
.row .brand { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.row .title { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .price { margin-top: 4px; font-size: 14px; }
.row .meta, .post-card .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; }
.actions-row a, .actions-row button:not(.btn) { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font-size: 13px; }
.actions-row.big { gap: 8px; }
.actions-row.big .btn { flex: 1; text-decoration: none; height: 46px; font-size: 15px; }
.warn-text { color: var(--warn); } .sale-text { color: var(--sale); font-weight: 600; }
.note-row .html { font-size: 14px; line-height: 1.4; }
.section { font: 600 13px/1 var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.post-card .html { font-size: 14px; line-height: 1.45; margin: 8px 0; white-space: pre-line; }
.strip { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; }
.strip img { width: 84px; height: 112px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.status-switch { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.status-switch .chip span { padding: 5px 10px; font-size: 13px; }
.card-p { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; display: grid; gap: 10px; }
.who { display: flex; flex-direction: column; }
.who b { font: 600 20px/1.2 var(--serif); }
.plan-line { display: flex; gap: 8px; align-items: center; }
.plan-badge { padding: 3px 10px; border-radius: 999px; background: var(--chip); font-size: 13px; font-weight: 600; }
.plan-badge.pro { background: #e6effa; } .plan-badge.business { background: #efe7fa; }
.usage { display: grid; gap: 8px; }
.usage div { position: relative; isolation: isolate; display: flex; justify-content: space-between; font-size: 14px; padding-bottom: 8px; }
.usage div::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 4px; background: var(--chip); z-index: 0; }
.usage i { position: absolute; left: 0; bottom: 0; height: 4px; border-radius: 4px; background: var(--ink); max-width: 100%; z-index: 1; }
.plan-row { font-size: 14px; }
.links { grid-auto-flow: row; }
.links a { text-decoration: none; }
.hide-empty { display: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--sale); cursor: pointer; font-size: 15px; }
.empty-note { color: var(--muted); text-align: center; padding: 32px 12px; }
.small { font-size: 13px; }
.pwa-login { padding-top: 12vh; }
.pwa-login .logo { font-size: 54px; line-height: 1; }
.pwa-login h2 { font: 600 30px/1.2 var(--serif); margin: 10px 0; }
.pwa-login .btn { margin-top: 14px; width: 100%; }

/* ---------- Установка на экран ---------- */
.install-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.install-banner[hidden] { display: none; }
.install-banner img { border-radius: 10px; flex: none; }
.install-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.install-banner .btn { flex: none; padding: 0 16px; height: 40px; }
.install-close { flex: none; border: 0; background: none; color: var(--muted); font-size: 16px; padding: 6px; cursor: pointer; }
.ios-share { display: inline-block; width: 14px; height: 17px; vertical-align: -3px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 18' fill='none' stroke='%23007aff' stroke-width='1.6'%3E%3Cpath d='M7 1v10M3.5 4.5 7 1l3.5 3.5M4.5 7H1.8v9.7h10.4V7H9.5'/%3E%3C/svg%3E"); }
.install-steps { display: grid; gap: 12px; }
.install-card { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.install-steps ol { margin: 8px 0 0; padding-left: 20px; }
.install-steps li { margin: 6px 0; }
.install-hero { text-align: center; padding: 8px 0 18px; }
.install-hero img { display: block; margin: 0 auto 12px; border-radius: 22px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.install-banner [hidden], .install-hero [hidden] { display: none !important; }
