:root {
  --forest: #173f2d;
  --forest-2: #255d40;
  --terracotta: #b95839;
  --cream: #f5f0e6;
  --paper: #fffdf8;
  --ink: #1f2521;
  --muted: #6f756f;
  --line: rgba(31, 37, 33, .10);
  --shadow: 0 12px 36px rgba(33, 47, 38, .10);
  --radius: 22px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #e9e6df; }
body { margin: 0; color: var(--ink); background: #e9e6df; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(100%, 580px); min-height: 100dvh; margin: 0 auto; background: var(--cream); box-shadow: 0 0 50px rgba(0,0,0,.10); padding-bottom: calc(78px + var(--safe-bottom)); }
.hero { position: relative; min-height: 310px; padding: calc(24px + env(safe-area-inset-top, 0px)) 24px 28px; overflow: hidden; color: white; background: linear-gradient(155deg, #0e3021 0%, #1d5137 62%, #2b6847 100%); }
.hero::after { content: ""; position: absolute; inset: auto -10% -105px; height: 210px; background: var(--cream); border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
.mountains { position: absolute; inset: 55px -30px auto; height: 150px; opacity: .18; background: linear-gradient(135deg, transparent 22%, #fff 22.5% 29%, transparent 29.5%) 0 35px/145px 95px repeat-x, linear-gradient(45deg, transparent 28%, #fff 28.5% 34%, transparent 34.5%) 35px 60px/180px 75px repeat-x; }
.hero-topline { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.eyebrow, .section-kicker { font-size: 11px; line-height: 1.2; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.icon-button { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(255,255,255,.12); color: white; cursor: pointer; }
.hero h1 { position: relative; z-index: 2; margin: 34px 0 10px; max-width: 420px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 11vw, 66px); line-height: .92; font-weight: 500; letter-spacing: -.04em; }
.hero p { position: relative; z-index: 2; margin: 0; color: rgba(255,255,255,.78); font-size: 16px; }
.main-content { position: relative; z-index: 2; margin-top: -58px; min-height: 540px; }
.view { display: none; padding: 0 16px 28px; animation: fade .22s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: .2; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.search-panel { padding: 14px; border-radius: 25px; background: rgba(255,253,248,.97); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.search-box { display: grid; grid-template-columns: 28px 1fr; align-items: center; padding: 0 14px; height: 50px; border: 1px solid var(--line); border-radius: 16px; background: #fbf8f0; color: var(--muted); }
.search-box span { font-size: 25px; transform: rotate(-15deg); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 15px; }
.chips { display: flex; gap: 8px; padding-top: 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 9px 13px; border: 0; border-radius: 999px; background: #efe9dc; color: #555b56; font-size: 12px; cursor: pointer; }
.chip.active { color: white; background: var(--forest); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 28px 5px 14px; }
.section-heading h2, .page-intro h2, .about-card h2 { margin: 5px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 31px; line-height: 1.08; font-weight: 500; }
.section-kicker { color: var(--terracotta); }
.text-button { border: 0; padding: 8px 0; background: transparent; color: var(--forest-2); font-size: 12px; font-weight: 700; cursor: pointer; }
.places-list, .story-grid, .route-list { display: grid; gap: 11px; }
.place-card { display: grid; grid-template-columns: 94px minmax(0,1fr) 38px; gap: 13px; align-items: center; min-height: 118px; padding: 10px; border: 1px solid var(--line); border-radius: 19px; background: var(--paper); box-shadow: 0 5px 18px rgba(38, 48, 41, .04); cursor: pointer; }
.place-art, .story-art { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 14px; color: white; background: linear-gradient(145deg, var(--art-1, #315c45), var(--art-2, #9f7650)); }
.place-art { width: 94px; height: 96px; }
.place-art::before, .story-art::before { content: ""; position: absolute; width: 120%; height: 65%; bottom: -24%; border-radius: 50% 50% 0 0; background: rgba(255,255,255,.15); transform: rotate(-7deg); }
.place-art span, .story-art span { position: relative; z-index: 1; font-family: Georgia, serif; font-size: 34px; }
.place-card h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.23; }
.place-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.meta-pill { padding: 4px 7px; border-radius: 999px; background: #f0ecdf; color: #636861; font-size: 10px; }
.favorite-button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #8b8f8a; font-size: 23px; cursor: pointer; }
.favorite-button.saved { color: var(--terracotta); }
.page-intro { padding: 77px 5px 20px; }
.page-intro p { margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.story-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); cursor: pointer; }
.story-art { height: 170px; border-radius: 0; }
.story-art span { font-size: 54px; }
.story-content { padding: 17px; }
.story-content small { color: var(--terracotta); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.story-content h3 { margin: 7px 0; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.story-content p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.route-card { padding: 19px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); cursor: pointer; }
.route-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.route-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: white; background: var(--forest); font-size: 23px; }
.route-card h3 { margin: 13px 0 6px; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.route-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.route-count { color: var(--terracotta); font-size: 12px; font-weight: 800; }
.empty-state { padding: 50px 30px; text-align: center; color: var(--muted); }
.empty-symbol { font-size: 42px; color: var(--forest); }
.empty-state h3 { margin: 8px 0; color: var(--ink); }
.about-card { margin-top: 72px; padding: 22px; border: 1px solid var(--line); border-radius: 28px; background: var(--paper); }
.about-card > p { color: var(--muted); line-height: 1.65; }
.about-illustration { display: flex; align-items: flex-end; justify-content: center; gap: 12px; height: 115px; margin: -3px -3px 22px; border-radius: 20px; color: var(--forest); background: linear-gradient(180deg, #edf0e8, #f7f1e3); font-size: 43px; }
.about-illustration span:nth-child(2) { font-size: 65px; }
.feature-list { display: grid; gap: 16px; padding: 0; margin: 24px 0; list-style: none; }
.feature-list li { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; }
.feature-list li > span { font-size: 23px; color: var(--forest); }
.feature-list strong, .feature-list small { display: block; }
.feature-list small { margin-top: 3px; color: var(--muted); }
.notice { padding: 15px; border-radius: 16px; background: #f1ecdf; color: #5b625c; font-size: 13px; line-height: 1.5; }
.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); width: min(100%, 580px); min-height: calc(69px + var(--safe-bottom)); padding: 8px 4px var(--safe-bottom); transform: translateX(-50%); border-top: 1px solid var(--line); background: rgba(255,253,248,.94); backdrop-filter: blur(18px); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; border: 0; background: transparent; color: #787d78; cursor: pointer; }
.nav-item span { font-size: 21px; line-height: 1; }
.nav-item small { font-size: 9px; white-space: nowrap; }
.nav-item.active { color: var(--forest); font-weight: 800; }
.detail-view { padding: 0; margin-top: 58px; }
.detail-hero { min-height: 285px; padding: 18px; color: white; background: linear-gradient(145deg, var(--art-1), var(--art-2)); }
.detail-toolbar { display: flex; align-items: center; justify-content: space-between; }
.detail-toolbar button { width: 43px; height: 43px; border: 1px solid rgba(255,255,255,.34); border-radius: 50%; background: rgba(0,0,0,.16); color: white; font-size: 20px; cursor: pointer; }
.detail-title { margin-top: 105px; }
.detail-title h2 { margin: 0; max-width: 470px; font-family: Georgia, serif; font-size: 38px; line-height: 1.02; font-weight: 500; }
.detail-title p { margin: 10px 0 0; color: rgba(255,255,255,.8); }
.detail-body { position: relative; margin-top: -22px; padding: 24px 20px 36px; border-radius: 26px 26px 0 0; background: var(--cream); }
.detail-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.detail-tags span { padding: 7px 10px; border-radius: 999px; background: var(--paper); color: var(--forest); font-size: 11px; font-weight: 700; }
.detail-body h3 { margin: 26px 0 9px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.detail-copy { color: #444a45; font-family: Georgia, serif; font-size: 17px; line-height: 1.75; white-space: pre-line; }
.fact-box { margin: 24px 0; padding: 18px; border-left: 4px solid var(--terracotta); border-radius: 4px 17px 17px 4px; background: var(--paper); }
.fact-box strong { display: block; margin-bottom: 7px; color: var(--terracotta); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.fact-box p { margin: 0; line-height: 1.6; }
.source-note { margin-top: 28px; color: var(--muted); font-size: 11px; }
.route-place-list { margin-top: 16px; }
@media (min-width: 720px) {
  .app-shell { margin-top: 24px; margin-bottom: 24px; min-height: calc(100dvh - 48px); border-radius: 32px; overflow: hidden; }
  .bottom-nav { bottom: 24px; border-radius: 0 0 32px 32px; }
}

/* Фотографии и редакционная версия */
.hero {
  background-image: linear-gradient(180deg, rgba(8,28,19,.34), rgba(8,34,22,.88)), url('images/mira_avenue.jpg');
  background-size: cover;
  background-position: center 48%;
}
.hero::before { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(7,28,18,.34),transparent 75%); pointer-events:none; }
.mountains { display:none; }
.place-art.has-photo, .story-art.has-photo { background:#d9ddd7; }
.place-art.has-photo img, .story-art.has-photo img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:2; }
.photo-fallback { display:none; }
.has-photo .photo-fallback { display:block; opacity:.25; }
.photo-hero { background-size:cover; background-position:center; }
.photo-credit { margin:15px 0 2px; color:var(--muted); font-size:11px; line-height:1.45; }
.photo-credit a, .credits-link a { color:var(--forest-2); text-decoration:underline; text-underline-offset:3px; }
.source-details { margin-top:24px; padding:0 16px; border:1px solid var(--line); border-radius:16px; background:var(--paper); }
.source-details summary { padding:16px 0; color:var(--forest); font-weight:800; font-size:13px; cursor:pointer; }
.source-full-text { padding:0 0 18px; color:#535a55; font-family:Georgia,serif; font-size:15px; line-height:1.7; white-space:pre-line; }
.route-detail { padding-top:72px; }
.route-back { margin-bottom:20px; padding:10px 14px; border:1px solid var(--line); border-radius:999px; background:var(--paper); color:var(--forest); font-weight:800; cursor:pointer; }
.credits-link { margin-top:18px; font-size:13px; }
@media (min-width: 520px) {
  .story-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .story-card { display:flex; flex-direction:column; }
  .story-content { flex:1; }
}


/* Явная фотогалерея и исправление отображения изображений */
.photo-showcase { margin-top: 4px; }
.photo-heading { padding-bottom: 12px; }
.photo-heading h2 { margin: 5px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 27px; line-height: 1.08; font-weight: 500; }
.photo-count-badge { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: #efe9dc; color: var(--forest); font-size: 11px; font-weight: 800; }
.photo-strip { display: flex; gap: 12px; margin: 0 -20px; padding: 0 20px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.photo-strip::-webkit-scrollbar { display: none; }
.photo-tile { position: relative; flex: 0 0 76%; height: 220px; overflow: hidden; border-radius: 22px; background: #d8ddd7; box-shadow: 0 10px 30px rgba(25, 42, 31, .13); scroll-snap-align: start; cursor: pointer; }
.photo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-tile-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,18,12,.03) 30%, rgba(5,18,12,.84) 100%); }
.photo-tile-copy { position: absolute; z-index: 2; right: 17px; bottom: 16px; left: 17px; color: white; }
.photo-tile-copy small { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.photo-tile-copy h3 { margin: 5px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 22px; line-height: 1.12; font-weight: 500; }
.photo-error { background: linear-gradient(145deg, #315c45, #9f7650) !important; }
.reset-app-button { width: 100%; margin-top: 14px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: #efe9dc; color: var(--forest); font-size: 13px; font-weight: 800; cursor: pointer; }
@media (min-width: 520px) { .photo-tile { flex-basis: 66%; } }


/* PWA install UI */
.install-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(5,24,15,.54);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(0,0,0,.16);
}
.install-button.ready { background: #fff; color: var(--forest); }
.install-button span { font-size: 16px; line-height: 1; }
.location-actions { display: grid; grid-template-columns: 1fr 1.18fr; gap: 9px; margin-top: 17px; }
.location-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 47px;
  padding: 10px 12px;
  border: 1px solid rgba(23,63,45,.18);
  border-radius: 15px;
  background: var(--paper);
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.location-actions button.primary { border-color: var(--forest); background: var(--forest); color: #fff; }
.location-actions button span { font-size: 18px; }
.location-hint { margin: 8px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 16px;
  background: rgba(9,20,14,.58);
  backdrop-filter: blur(7px);
}
.modal-backdrop[hidden] { display: none; }
.install-modal {
  position: relative;
  width: min(100%, 540px);
  max-height: min(82dvh, 680px);
  overflow-y: auto;
  padding: 28px 22px 22px;
  border-radius: 28px 28px 22px 22px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #efe9dc; color: var(--forest); font-size: 25px; cursor: pointer; }
.install-modal-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 18px; border-radius: 18px; background: var(--forest); color: #fff; font-size: 28px; }
.install-modal h2 { margin: 7px 45px 13px 0; font-family: Georgia, serif; font-size: 29px; line-height: 1.08; font-weight: 500; }
.install-instructions { color: #474e49; line-height: 1.55; }
.install-instructions ol { margin: 12px 0 0; padding-left: 22px; }
.install-instructions li { margin: 10px 0; }
.install-warning { margin: 14px 0; padding: 13px 14px; border-left: 4px solid var(--terracotta); border-radius: 5px 15px 15px 5px; background: #f7ebdf; color: #695246; font-size: 12px; }
.primary-action { width: 100%; min-height: 48px; margin-top: 16px; border: 0; border-radius: 15px; background: var(--forest); color: #fff; font-weight: 800; cursor: pointer; }
@media (min-width: 720px) { .modal-backdrop { align-items: center; } }
@media (max-width: 390px) {
  .hero { padding-right: 18px; padding-left: 18px; }
  .eyebrow { max-width: 145px; }
  .install-button { padding: 8px 10px; font-size: 11px; }
  .location-actions { grid-template-columns: 1fr; }
}


/* PWA v5 */
.hero { min-height: 288px; padding-bottom: 40px; }
.main-content { margin-top: -52px; }
@media (max-width: 380px) {
  .hero-topline { gap: 8px; }
  .eyebrow { max-width: 150px; }
  .install-button { padding-inline: 9px; }
}


/* Mobile polish v6 */
html, body { max-width: 100%; overflow-x: hidden; }
.app-shell { overflow-x: clip; }
.view, .section-heading > div, .place-card > *, .search-box input { min-width: 0; }
.hero-topline { gap: 12px; }
.eyebrow { flex: 1 1 auto; min-width: 0; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.install-button { flex: 0 0 auto; width: auto; max-width: 124px; white-space: nowrap; }
.hero p {
  display: inline-block;
  max-width: calc(100% - 8px);
  margin-left: -8px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(5, 24, 15, .42);
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
}
.search-box input { text-overflow: ellipsis; }
.place-card h3, .detail-title h2, .story-content h3, .route-card h3 {
  overflow-wrap: anywhere;
  word-break: normal;
}
.catalog-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.catalog-heading .text-button {
  justify-self: end;
  white-space: nowrap;
  padding: 8px 11px;
  border: 1px solid rgba(23, 63, 45, .14);
  border-radius: 999px;
  background: rgba(255, 253, 248, .72);
}
.install-instructions { color: #3f4741; }
.install-steps { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: install-step; }
.install-steps li {
  position: relative;
  min-height: 38px;
  margin: 0;
  padding: 7px 0 12px 46px;
  line-height: 1.5;
  counter-increment: install-step;
}
.install-steps li::before {
  content: counter(install-step);
  position: absolute;
  top: 3px;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e7eee8;
  color: var(--forest);
  font-size: 13px;
  font-weight: 900;
}
.install-note, .install-ready-message {
  margin: 8px 0 0;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f1ecdf;
  color: #596159;
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .catalog-heading {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 9px;
  }
  .catalog-heading .text-button { justify-self: start; }
  .section-heading h2, .page-intro h2, .about-card h2 { font-size: clamp(27px, 8vw, 31px); }
}
@media (max-width: 360px) {
  .hero { padding-right: 16px; padding-left: 16px; }
  .hero h1 { font-size: 41px; }
  .hero p { font-size: 14px; }
  .eyebrow { max-width: 136px; font-size: 9px; letter-spacing: .11em; }
  .install-button { min-height: 36px; padding: 7px 9px; font-size: 10px; }
  .view { padding-right: 12px; padding-left: 12px; }
  .place-card { grid-template-columns: 82px minmax(0,1fr) 34px; gap: 9px; }
  .place-art { width: 82px; height: 88px; }
  .favorite-button { width: 32px; height: 32px; }
  .photo-strip { margin-right: -12px; margin-left: -12px; padding-right: 12px; padding-left: 12px; }
  .photo-tile { flex-basis: 84%; }
  .nav-item small { font-size: 8px; }
}

/* Редакционная и фотозаполняемая версия v7 */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.personal-photo { position: relative; }
.place-art.personal-photo::after,
.photo-tile.personal-photo::after {
  content: "МОЁ ФОТО";
  position: absolute;
  z-index: 4;
  top: 9px;
  left: 9px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(8, 34, 22, .86);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 3px 10px rgba(0,0,0,.16);
}
.photo-editor-panel {
  margin: 17px 0 14px;
  padding: 16px;
  border: 1px solid rgba(23, 63, 45, .14);
  border-radius: 18px;
  background: linear-gradient(145deg, #f4efe3, #fffdf8);
  box-shadow: 0 8px 24px rgba(29, 53, 38, .07);
}
.photo-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.photo-editor-heading > div { min-width: 0; }
.photo-editor-heading strong {
  display: block;
  color: var(--forest);
  font-size: 15px;
  line-height: 1.25;
}
.photo-editor-heading small {
  display: block;
  margin-top: 4px;
  color: #667069;
  font-size: 11px;
  line-height: 1.45;
}
.photo-editor-heading > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: var(--forest);
  color: #fff;
  font-size: 20px;
}
.photo-editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.photo-editor-actions button,
.photo-backup-actions button {
  min-width: 0;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid rgba(23, 63, 45, .18);
  border-radius: 13px;
  background: #fffdf8;
  color: var(--forest);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
}
.photo-editor-actions button.primary {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}
.photo-editor-actions button.danger {
  grid-column: 1 / -1;
  border-color: rgba(145, 61, 44, .24);
  background: #f8ebe6;
  color: #833b2d;
}
.photo-editor-panel > p {
  margin: 11px 1px 0;
  color: #747c76;
  font-size: 10px;
  line-height: 1.45;
}
.photo-backup-card {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(23, 63, 45, .13);
  border-radius: 20px;
  background: #f4efe3;
}
.photo-backup-card h3 {
  margin: 6px 0 7px;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.14;
}
.photo-backup-card p {
  margin: 0;
  color: #5e675f;
  font-size: 12px;
  line-height: 1.55;
}
.photo-backup-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.photo-backup-actions button:first-child {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}
.app-toast {
  position: fixed;
  z-index: 200;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  max-width: 460px;
  margin: 0 auto;
  padding: 13px 16px;
  border-radius: 14px;
  background: #173f2d;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 12px 34px rgba(0,0,0,.24);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.app-toast.visible { opacity: 1; transform: translateY(0); }
.app-toast[data-tone="success"] { background: #1f5b3e; }
.app-toast[data-tone="error"] { background: #843b30; }
@media (max-width: 380px) {
  .photo-editor-actions,
  .photo-backup-actions { grid-template-columns: minmax(0, 1fr); }
  .photo-editor-actions button.danger { grid-column: auto; }
}
