:root {
  --ink: #1f1e1b;
  --muted: #746f68;
  --paper: #fbfaf6;
  --surface: rgba(255, 254, 250, 0.94);
  --line: rgba(31, 30, 27, 0.14);
  --line-strong: rgba(31, 30, 27, 0.26);
  --soft: #efebe3;
  --soft-2: #e7e1d8;
  --accent: #343434;
  --accent-soft: #e9e4dc;
  --warm: #c98538;
  --warm-dark: #9d5f1e;
  --success: #147a46;
  --shadow: 0 18px 50px rgba(31, 30, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:not([data-route="gallery"]) .gallery-bar,
body:not([data-route="gallery"]) .gallery-shell {
  display: none;
}

body[data-route="gallery"] .route-screen,
.route-screen[hidden] {
  display: none;
}

.route-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(24px, 5vw, 64px);
  background:
    linear-gradient(120deg, rgba(251, 250, 246, 0.98), rgba(245, 240, 231, 0.9)),
    radial-gradient(circle at 78% 18%, rgba(201, 133, 56, 0.14), transparent 34%);
}

.route-brand {
  position: absolute;
  top: clamp(22px, 4vw, 44px);
  left: clamp(24px, 5vw, 64px);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 2vw, 38px);
  font-weight: 720;
  text-decoration: none;
}

.route-card {
  width: min(560px, 100%);
  padding: clamp(28px, 4.8vw, 52px);
  border: 1px solid rgba(31, 30, 27, 0.14);
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.86);
  box-shadow: 0 20px 70px rgba(31, 30, 27, 0.1);
}

.route-card p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.55;
}

.route-card #routeEyebrow {
  margin-bottom: 14px;
  color: var(--warm-dark);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.route-card h1 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.02;
}

.gallery-bar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 2.5vw, 42px);
  min-height: 72px;
  padding: 0 clamp(20px, 3.4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.93);
  backdrop-filter: blur(18px);
}

.brand-meta {
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2vw, 30px);
  min-width: 0;
}

.brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 1.7vw, 34px);
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
}

.brand-meta span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 1.5vw, 22px);
  min-width: 0;
}

.icon-button,
.viewer-action,
.close,
.arrow {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 38px;
  min-height: 38px;
  padding: 6px;
  color: var(--ink);
}

.icon-button.is-active svg {
  fill: currentColor;
}

.icon-button span {
  min-width: 1.2em;
  color: var(--muted);
  font-size: 14px;
}

.expires {
  color: var(--muted);
  white-space: nowrap;
  font-size: 14px;
}

.download-menu {
  position: relative;
}

.account-menu {
  position: relative;
  flex: none;
}

.account-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(31, 30, 27, 0.13);
  border-radius: 999px;
  color: rgba(31, 30, 27, 0.58);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  line-height: 1;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.account-button:hover,
.account-button[aria-expanded="true"] {
  border-color: rgba(157, 95, 30, 0.24);
  background: #fffaf4;
  color: var(--warm-dark);
  box-shadow: 0 7px 18px rgba(31, 30, 27, 0.07);
}

.account-button.is-verified {
  border-color: rgba(20, 122, 70, 0.3);
  color: var(--success);
  background: rgba(20, 122, 70, 0.08);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
}

.account-avatar svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke-width: 1.85;
}

.account-panel {
  position: absolute;
  z-index: 45;
  top: calc(100% + 12px);
  right: -10px;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(201, 133, 56, 0.36);
  border-radius: 10px;
  background: #fffaf4;
  box-shadow: 0 18px 46px rgba(23, 23, 23, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.account-menu:hover .account-panel,
.account-menu:focus-within .account-panel,
.account-menu.is-open .account-panel {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.account-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.account-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.account-member {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.account-member b,
.account-member span,
.account-member em {
  color: var(--muted);
  font-style: normal;
}

.account-member b {
  color: var(--ink);
  font-weight: 700;
}

.account-detail b {
  color: var(--ink);
  font-weight: 700;
}

.account-benefits {
  display: grid;
  gap: 4px;
}

.account-benefits p {
  color: var(--ink);
  font-weight: 650;
}

.account-benefits ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.account-benefits li::before {
  content: "•";
  margin-right: 6px;
  color: var(--warm-dark);
}

.account-wallet-block {
  display: grid;
  gap: 4px;
  padding-top: 2px;
}

.account-wallet-block > p,
.account-wallet-group > span {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 650;
}

.account-wallet-group {
  display: grid;
  gap: 2px;
}

.account-wallet-group ul {
  display: grid;
  gap: 2px;
  margin: 0 0 2px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.account-wallet-group li::before {
  content: "•";
  margin-right: 6px;
  color: var(--warm-dark);
}

.account-wallet-group b {
  color: var(--ink);
  font-weight: 700;
}

.account-wallet-group em {
  color: var(--muted);
  font-style: normal;
}

.account-wallet-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.account-panel-login {
  justify-self: start;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(31, 30, 27, 0.12);
  border-radius: 9px;
  color: var(--ink);
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.account-panel-login:hover {
  border-color: rgba(157, 95, 30, 0.28);
  background: #fff7ee;
}

.account-panel-logout {
  justify-self: start;
  padding: 2px 0;
  border: 0;
  color: var(--warm-dark);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(31, 30, 27, 0.15);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 640;
}

.download-button:hover,
.download-button[aria-expanded="true"] {
  border-color: rgba(157, 95, 30, 0.26);
  background: #fffaf4;
}

.download-button svg {
  width: 17px;
  height: 17px;
}

.menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.98);
  box-shadow: var(--shadow);
}

.menu.is-open {
  display: grid;
}

.menu button {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 520;
  line-height: 1.2;
}

.menu button:hover {
  background: var(--soft);
}

.gallery-shell {
  width: min(1920px, calc(100% - clamp(28px, 5.8vw, 124px)));
  margin: 0 auto;
  padding: 38px 0 96px;
}

.gallery-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
}

.gallery-title p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
}

.gallery-title h1 {
  margin: 0;
  font-size: clamp(28px, 2.1vw, 42px);
  line-height: 1.08;
}

.gallery-title strong {
  color: var(--muted);
  font-weight: 540;
  white-space: nowrap;
}

.photo-grid,
.retouch-grid {
  display: grid;
  gap: clamp(14px, 1.35vw, 24px);
  align-items: start;
}

.photo-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.gallery-shell {
  width: min(1920px, calc(100% - clamp(22px, 3.6vw, 72px)));
  padding-top: 18px;
  padding-bottom: 120px;
}

.gallery-title,
.photo-grid {
  display: none;
}

.retouch-view {
  display: grid;
  gap: 20px;
}

.retouch-offer {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  gap: clamp(20px, 2vw, 34px);
  padding: clamp(18px, 1.6vw, 26px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 14px 42px rgba(31, 30, 27, 0.06);
}

.retouch-pitch {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
}

.retouch-pitch h2 {
  margin: 0;
  font-size: clamp(22px, 1.45vw, 30px);
  line-height: 1.12;
}

.retouch-pitch p {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.48;
}

.retouch-submit {
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.retouch-submit:hover:not(:disabled) {
  background: #111111;
}

.how-button,
.quiet-button {
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(31, 30, 27, 0.35);
  text-underline-offset: 4px;
  font-size: 14px;
}

.retouch-included {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.42;
}

.retouch-samples-block {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.sample-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.how-wrap {
  position: relative;
}

.how-panel {
  display: grid;
  position: absolute;
  z-index: 34;
  top: calc(100% + 9px);
  left: 0;
  gap: 10px;
  width: min(380px, calc(100vw - 34px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.98);
  box-shadow: var(--shadow);
}

.how-panel[hidden] {
  display: none;
}

.how-panel div {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
}

.how-panel a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(31, 30, 27, 0.34);
  text-underline-offset: 3px;
}

.how-panel strong {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
}

.retouch-sample-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.1vw, 20px);
  align-items: center;
}

.compare-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.compare-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.compare-open img {
  display: block;
  width: 100%;
  height: auto;
}

.compare-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 28px rgba(31, 30, 27, 0.1);
}

.retouch-picker {
  scroll-margin-top: 110px;
}

.retouch-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 16px;
}

.retouch-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
}

.retouch-controls button,
.retouch-scale button {
  width: 112px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.retouch-controls button.is-active,
.retouch-scale button.is-active {
  color: var(--paper);
  background: var(--accent);
}

.retouch-scale {
  display: inline-flex;
  flex: none;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
}

.retouch-scale button {
  display: grid;
  width: 42px;
  min-width: 42px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  place-items: center;
}

.retouch-scale-icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linejoin: round;
}

.retouch-controls span {
  display: inline-block;
  min-width: 3ch;
  margin-left: 4px;
  text-align: left;
}

.retouch-controls .retouch-clear-button {
  width: 168px;
  margin-left: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.35);
}

.retouch-controls .retouch-clear-button:hover,
.retouch-controls .retouch-clear-button.is-confirming {
  color: var(--ink);
  background: var(--accent-soft);
}

.retouch-controls [data-retouch-filter="selected"] {
  width: 150px;
}

.retouch-empty {
  max-width: 520px;
  margin: 34px auto;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  text-align: center;
}

.retouch-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-shell[data-retouch-columns="6"] .retouch-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.photo,
.retouch-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--soft);
}

.photo.is-hidden {
  display: none;
}

.photo-open,
.retouch-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.photo img,
.retouch-open img {
  display: block;
  width: 100%;
  height: auto;
}

.photo::after,
.retouch-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.38), transparent);
  transition: opacity 180ms ease;
}

.photo:hover::after,
.retouch-card:hover::after {
  opacity: 1;
}

.photo-actions {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 9px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.photo:hover .photo-actions,
.photo:focus-within .photo-actions {
  opacity: 1;
  transform: translateY(0);
}

.photo-action,
.retouch-heart,
.retouch-download {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  color: white;
  background: rgba(31, 30, 27, 0.34);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.photo-action svg,
.retouch-heart svg,
.retouch-download svg {
  width: 20px;
  height: 20px;
}

.retouch-card.is-selected .retouch-heart,
.viewer-action.is-selected {
  color: white;
  background: rgba(31, 30, 27, 0.74);
}

.retouch-card.is-selected .retouch-heart svg,
.viewer-action.is-selected svg {
  fill: currentColor;
}

.retouch-card {
  border-color: var(--line);
}

.retouch-card.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.retouch-card.is-filtered-out {
  display: none;
}

.retouch-heart {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
}

.retouch-download {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 10px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.retouch-card:hover .retouch-download,
.retouch-card:focus-within .retouch-download {
  opacity: 1;
  transform: translateY(0);
}

.retouch-dock {
  position: fixed;
  z-index: 35;
  left: 50%;
  bottom: 18px;
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  width: min(1240px, calc(100% - 42px));
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(251, 250, 246, 0.95);
  box-shadow: 0 16px 46px rgba(31, 30, 27, 0.16);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.gallery-shell[data-retouch-submitted="true"] {
  padding-bottom: 36px;
}

.gallery-shell[data-retouch-submitted="true"] .retouch-dock {
  display: none;
}

.retouch-submitted {
  display: grid;
  gap: 4px;
  max-width: 720px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 28px rgba(31, 30, 27, 0.08);
}

.retouch-submitted[hidden] {
  display: none;
}

.retouch-submitted strong {
  font-size: 15px;
  line-height: 1.2;
}

.retouch-submitted span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.dock-intro {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.summary-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--accent-soft);
}

.summary-icon svg {
  width: 20px;
  height: 20px;
}

.dock-intro h2 {
  margin: 0 0 3px;
  font-size: 14px;
  line-height: 1.15;
}

.dock-intro p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.dock-selected {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.dock-selected strong {
  font-size: 14px;
  line-height: 1;
}

.dock-selected span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.dock-selected .dock-route {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--accent);
  font-size: 11px;
}

.dock-selected .dock-route[hidden] {
  display: none;
}

.dock-route-lock {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.retouch-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft-2);
}

.retouch-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.dock-bonus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(201, 133, 56, 0.28);
  border-radius: 10px;
  background: #fffaf4;
  cursor: pointer;
  text-align: left;
}

.bonus-copy {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dock-bonus strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 750;
}

.bonus-copy small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.25;
}

.bonus-copy small:empty {
  display: none;
}

.bonus-switch {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  width: 42px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  flex: none;
  transition: background 160ms ease, border-color 160ms ease;
}

.bonus-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.36);
  box-shadow: none;
  transition: transform 160ms ease, background 160ms ease;
}

.dock-bonus.is-active {
  border-color: rgba(20, 122, 70, 0.22);
  background: #f5fbf7;
}

.dock-bonus.is-active .bonus-switch {
  border-color: rgba(20, 122, 70, 0.42);
  background: rgba(20, 122, 70, 0.12);
}

.dock-bonus.is-active .bonus-switch span {
  transform: translateX(18px);
  background: var(--success);
}

.dock-bonus.is-empty {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.42);
  cursor: default;
}

.dock-bonus.is-empty .bonus-switch {
  display: none;
}

.dock-actions {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1fr) minmax(280px, 0.9fr);
  gap: 10px;
  align-items: center;
  justify-content: end;
  min-width: 0;
}

.dock-secondary,
.dock-clear {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}

.dock-secondary--all {
  white-space: normal;
  line-height: 1.15;
}

.dock-secondary {
  color: var(--ink);
}

.dock-secondary:hover,
.dock-clear:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.dock-secondary.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dock-clear {
  color: var(--muted);
}

.dock-clear.is-confirming {
  border-color: var(--accent);
  color: var(--ink);
  background: var(--accent-soft);
}

.retouch-dock .retouch-submit {
  min-width: 240px;
  min-height: 50px;
  padding: 0 18px;
  white-space: nowrap;
  font-size: 15px;
}

.retouch-submit:disabled {
  color: rgba(31, 30, 27, 0.46);
  background: var(--soft-2);
  cursor: default;
}

.bonus-dialog {
  width: min(420px, calc(100vw - 28px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: transparent;
}

.confirm-dialog {
  width: min(640px, calc(100vw - 28px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: transparent;
}

.bonus-dialog::backdrop,
.confirm-dialog::backdrop {
  background: rgba(31, 30, 27, 0.44);
  backdrop-filter: blur(8px);
}

.bonus-panel {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(201, 133, 56, 0.42);
  border-radius: 14px;
  background: #fffaf4;
  box-shadow: var(--shadow);
}

.confirm-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.98);
  box-shadow: var(--shadow);
}

.bonus-panel h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.confirm-panel h2 {
  margin: 0;
  padding-right: 42px;
  font-size: 23px;
  line-height: 1.16;
}

.bonus-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.confirm-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.confirm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.confirm-close:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.confirm-selection {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
}

.confirm-panel .confirm-count {
  display: none;
}

.confirm-quote {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.confirm-quote span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1;
}

.confirm-quote strong {
  margin-left: 4px;
  color: var(--ink);
  font-weight: 750;
}

.confirm-carousel {
  min-width: 0;
}

.confirm-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.confirm-thumbs::-webkit-scrollbar {
  display: none;
}

.confirm-thumbs.can-scroll-right {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), rgba(0, 0, 0, 0.18));
  mask-image: linear-gradient(90deg, #000 calc(100% - 30px), rgba(0, 0, 0, 0.18));
}

.confirm-thumbs.can-scroll-left {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.18), #000 30px);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.18), #000 30px);
}

.confirm-thumbs.can-scroll-left.can-scroll-right {
  -webkit-mask-image: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.18),
    #000 30px,
    #000 calc(100% - 30px),
    rgba(0, 0, 0, 0.18)
  );
  mask-image: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.18),
    #000 30px,
    #000 calc(100% - 30px),
    rgba(0, 0, 0, 0.18)
  );
}

.confirm-thumb {
  flex: 0 0 88px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  aspect-ratio: 1.22;
  background: var(--soft);
  scroll-snap-align: start;
  cursor: default;
}

.confirm-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.confirm-body {
  display: block;
}

.confirm-points {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 0 2px;
  list-style: none;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.confirm-points li {
  position: relative;
  padding-left: 28px;
}

.confirm-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  font-size: 11px;
}

.confirm-preview {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
}

.confirm-preview strong,
.confirm-preview span {
  display: block;
}

.confirm-preview strong {
  margin-bottom: 3px;
  font-size: 15px;
}

.confirm-preview span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.confirm-compare {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  cursor: zoom-in;
}

.confirm-compare img {
  display: block;
  width: 100%;
  height: auto;
}

.confirm-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
}

.confirm-submit-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.confirm-submit-block > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.bonus-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.bonus-login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  gap: 8px;
  align-items: center;
}

.bonus-club-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.bonus-club-note a {
  color: var(--accent);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bonus-flow {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px 12px 10px 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  line-height: 1.3;
}

.bonus-panel input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 15px;
}

.bonus-panel input::placeholder {
  color: rgba(31, 30, 27, 0.42);
}

.bonus-panel-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.confirm-actions {
  order: 1;
  display: grid;
  grid-template-columns: minmax(132px, auto) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 2px;
}

.bonus-panel-actions .retouch-submit,
.confirm-actions .retouch-submit {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
}

.bonus-login-row .retouch-submit {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 780;
}

.confirm-actions .dock-clear {
  min-height: 38px;
  padding: 0 8px;
  border-color: transparent;
  color: var(--accent);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bonus-status.error {
  color: #8f332b;
}

.bonus-status[hidden] {
  display: none;
}

.close--dialog {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}

.close--dialog:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.viewer,
.sample-viewer {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #070707;
}

.viewer::backdrop,
.sample-viewer::backdrop {
  background: #070707;
}

.viewer[open],
.sample-viewer[open] {
  display: grid;
  place-items: center;
}

.viewer-frame {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.viewer img {
  max-width: calc(100vw - 108px);
  max-height: calc(100vh - 112px);
  object-fit: contain;
}

.sample-viewer img {
  display: block;
  max-width: calc(100vw - 12vw);
  max-height: calc(100vh - 12vh);
  height: auto;
  object-fit: contain;
}

.viewer figcaption {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.84);
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewer-action,
.close,
.arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.close {
  position: fixed;
  z-index: 3;
  top: 24px;
  right: 24px;
}

.close.close--dialog {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}

.arrow {
  position: fixed;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
}

.prev {
  left: 24px;
}

.next {
  right: 24px;
}

.menu--up {
  top: auto;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 176px;
  color: var(--ink);
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 26px;
  max-width: min(520px, calc(100% - 32px));
  padding: 13px 16px;
  border-radius: 10px;
  color: white;
  background: rgba(31, 30, 27, 0.92);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.photo:focus-visible,
.photo-open:focus-visible,
.retouch-open:focus-visible,
.icon-button:focus-visible,
.download-button:focus-visible,
.account-button:focus-visible,
.menu button:focus-visible,
.photo-action:focus-visible,
.viewer-action:focus-visible,
.retouch-heart:focus-visible,
.retouch-download:focus-visible,
.compare-open:focus-visible,
.retouch-submit:focus-visible,
.dock-secondary:focus-visible,
.dock-clear:focus-visible,
.dock-bonus:focus-visible,
.retouch-scale button:focus-visible,
.bonus-panel input:focus-visible,
.close:focus-visible,
.arrow:focus-visible {
  outline: 2px solid rgba(31, 30, 27, 0.72);
  outline-offset: 4px;
}

@media (min-width: 1900px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 1180px) {
  .gallery-bar {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px 18px 12px;
  }

  .brand-meta {
    min-height: 34px;
  }

  .tools {
    justify-content: flex-end;
    gap: 10px;
    min-height: 42px;
    padding-top: 4px;
  }

  .expires {
    display: none;
  }

  .retouch-offer {
    grid-template-columns: 1fr;
  }

  .dock-intro {
    display: none;
  }

  .retouch-dock {
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  }

  .dock-actions {
    grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) minmax(230px, 1fr);
  }
}

@media (max-width: 860px) {
  .gallery-shell {
    width: calc(100% - 18px);
    padding-top: 22px;
  }

  .gallery-title {
    display: block;
    width: calc(100% - 10px);
    margin: 0 auto;
    padding-bottom: 16px;
  }

  .gallery-title h1 {
    font-size: 26px;
  }

  .gallery-title strong {
    display: block;
    margin-top: 10px;
  }

  .gallery-shell {
    width: calc(100% - 16px);
    padding-bottom: 102px;
  }

  .retouch-offer {
    padding: 14px;
    border-radius: 10px;
  }

  .retouch-pitch {
    gap: 12px;
  }

  .retouch-pitch p {
    max-width: none;
    font-size: 13px;
    line-height: 1.42;
  }

  .retouch-pitch .retouch-included {
    font-size: 13px;
  }

  .retouch-sample-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .retouch-toolbar {
    display: block;
    margin-left: 4px;
    margin-right: 4px;
  }

  .retouch-controls {
    margin-left: 4px;
    margin-right: 4px;
  }

  .retouch-scale {
    display: none;
  }

  .retouch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .photo,
  .retouch-card {
    margin-bottom: 8px;
    border-radius: 7px;
  }

  .photo-actions {
    right: 8px;
    bottom: 8px;
    opacity: 1;
    transform: none;
  }

  .photo-action,
  .retouch-heart,
  .retouch-download {
    width: 34px;
    height: 34px;
  }

  .retouch-heart {
    top: 8px;
    right: 8px;
  }

  .retouch-download {
    right: 8px;
    bottom: 8px;
    opacity: 1;
    transform: none;
  }

  .retouch-dock {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: minmax(0, 0.82fr) minmax(158px, 1fr);
    gap: 7px 10px;
    align-items: center;
    width: auto;
    padding: 8px 10px 9px;
    border-radius: 16px;
    transform: none;
  }

  .dock-selected {
    grid-column: 1;
    grid-row: 1;
    gap: 3px;
  }

  .dock-selected strong {
    font-size: 17px;
    line-height: 1.05;
  }

  .dock-selected span {
    font-size: 11px;
    line-height: 1.15;
  }

  .dock-selected .dock-route {
    font-size: 11px;
  }

  .retouch-progress {
    height: 4px;
  }

  .dock-bonus {
    grid-column: 2;
    grid-row: 2;
    min-height: 38px;
    padding: 5px 7px;
    border-radius: 11px;
    gap: 7px;
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .gallery-shell[data-payment-required="false"] .dock-bonus {
    display: none;
  }

  .dock-bonus strong {
    font-size: 11px;
  }

  .bonus-copy small {
    font-size: 10px;
  }

  .bonus-switch {
    width: 34px;
    height: 20px;
  }

  .bonus-switch span {
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
  }

  .dock-bonus.is-active .bonus-switch span {
    transform: translateX(14px);
  }

  .dock-actions {
    display: contents;
  }

  .dock-secondary--all {
    grid-column: 1;
    grid-row: 2;
    overflow: hidden;
    font-size: 0;
    text-overflow: ellipsis;
  }

  .gallery-shell[data-payment-required="false"] .dock-secondary--all {
    grid-column: 1 / 3;
  }

  .dock-secondary--all::before {
    content: "Обработать все фото за 39 BYN";
    font-size: 11px;
  }

  .dock-secondary,
  .dock-clear {
    min-height: 38px;
    padding: 0 9px;
    border-radius: 11px;
    font-size: 12px;
  }

  .dock-secondary--all {
    font-size: 0;
  }

  .dock-clear {
    min-height: 38px;
  }

  .retouch-dock .retouch-submit {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0 13px;
    border-radius: 12px;
    font-size: 14px;
  }
}

@media (max-width: 620px) {
  .gallery-bar {
    padding: 9px 12px 10px;
  }

  .brand-meta {
    gap: 12px;
  }

  .brand {
    font-size: 24px;
  }

  .brand-meta span {
    font-size: 12px;
  }

  .tools {
    min-height: 38px;
  }

  .download-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .account-button {
    width: 38px;
    height: 38px;
  }

  .account-button.is-verified {
    width: 38px;
  }

  .account-panel {
    right: -70px;
    width: min(320px, calc(100vw - 24px));
  }

  .icon-button {
    min-width: 34px;
    min-height: 34px;
  }

  .photo-grid,
  .retouch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .retouch-dock {
    grid-template-columns: minmax(0, 0.82fr) minmax(158px, 1fr);
  }

  .dock-actions {
    display: contents;
  }

  .dock-secondary,
  .dock-clear {
    min-height: 34px;
  }

  .retouch-dock .retouch-submit {
    width: auto;
    min-width: 174px;
  }

  .confirm-dialog {
    width: min(430px, calc(100vw - 18px));
  }

  .bonus-dialog {
    width: min(390px, calc(100vw - 18px));
  }

  .bonus-panel {
    gap: 10px;
    padding: 14px;
  }

  .bonus-panel h2 {
    font-size: 19px;
  }

  .bonus-panel p {
    font-size: 13px;
  }

  .bonus-login-row {
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 8px;
  }

  .bonus-panel input,
  .bonus-login-row .retouch-submit {
    min-height: 42px;
    border-radius: 10px;
    font-size: 14px;
  }

  .bonus-panel input {
    padding: 0 12px;
  }

  .confirm-panel {
    gap: 11px;
    padding: 16px;
  }

  .confirm-panel h2 {
    font-size: 20px;
  }

  .confirm-panel p {
    font-size: 13px;
  }

  .confirm-selection {
    gap: 8px;
    padding: 10px;
  }

  .confirm-panel .confirm-count {
    font-size: 11px;
  }

  .confirm-quote {
    gap: 5px;
  }

  .confirm-quote span {
    min-height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }

  .confirm-thumbs {
    gap: 6px;
  }

  .confirm-thumb {
    flex-basis: 70px;
  }

  .confirm-body,
  .confirm-footer {
    grid-template-columns: 1fr;
  }

  .confirm-points {
    gap: 7px;
    padding: 0 0 0 4px;
    font-size: 13px;
  }

  .confirm-points li {
    padding-left: 24px;
  }

  .confirm-preview {
    display: none;
  }

  .confirm-actions {
    grid-template-columns: 1fr 1.2fr;
  }

  .confirm-actions .retouch-submit {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .viewer img {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 124px);
  }

  .sample-viewer img {
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 104px);
  }

  .arrow {
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .viewer figcaption {
    left: 16px;
    right: 16px;
    bottom: 78px;
  }

  .viewer-actions {
    position: fixed;
    right: 84px;
    bottom: 18px;
  }
}

@media (max-width: 430px) {
  .retouch-dock {
    grid-template-columns: minmax(0, 0.78fr) minmax(150px, 1fr);
  }

  .dock-actions {
    display: contents;
  }

  .dock-secondary--all {
    grid-column: 1;
  }

  .gallery-shell[data-payment-required="false"] .dock-secondary--all {
    grid-column: 1 / 3;
  }

  .dock-bonus {
    grid-column: 2;
  }

  .retouch-dock .retouch-submit {
    grid-column: 2;
  }

  .retouch-dock .retouch-submit {
    width: 100%;
    min-width: 0;
  }
}
