*{box-sizing:border-box}:root{color-scheme:light dark;--ink:#252a30;--muted:#596572;--line:#c2cbd3;--action:#303d4b;--on-action:#ffffff;--bg:#ffffff;--surface:#ffffff;--hover:#edf0f3;--soft:#eceff2;--field-line:#8996a3;--focus:#526c88;--danger:#973c3c;--warning-ink:#78431e;--warning-bg:#faf3e8;--error-ink:#983b3b;--error-bg:#fbf1f1;--error-line:#c88f8f;--photo-bg:var(--surface);--backdrop:#17222d99}body{margin:0;background:var(--bg);color:var(--ink);font:16px Arial,Helvetica,sans-serif;line-height:1.45}button,input,select,textarea{font:inherit;color:inherit}button{border:1px solid var(--field-line);border-radius:4px;background:var(--surface);min-height:48px;padding:10px 16px;cursor:pointer;line-height:1.4}button:hover{background:var(--hover)}button:disabled{cursor:default;opacity:.5}button.primary{background:var(--action);border-color:var(--action);color:var(--on-action)}button.danger{color:var(--danger)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:2px}aside{position:fixed;top:0;left:0;bottom:0;width:220px;border-right:1px solid var(--line);padding:28px 18px;background:var(--surface)}aside h1{font-size:21px;margin:0 0 8px}aside p{font-size:12px;color:var(--muted);margin:0}nav{display:grid;gap:5px;margin-top:30px}nav button{text-align:left;border-color:transparent;background:transparent}nav button.active{background:var(--hover);border-color:var(--line);font-weight:600}.side-note{margin-top:36px;padding-top:18px;border-top:1px solid var(--line);line-height:1.8}main{margin-left:220px;padding:28px 32px;max-width:1600px;min-height:100vh}h2{font-size:28px;line-height:1.2;margin:0 0 9px}h3{font-size:20px;margin:0 0 16px}h4{font-size:17px;margin:15px 0 10px}p{margin:0 0 12px}.muted{color:var(--muted);font-size:14px}.header{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:22px}.header p{margin:0}.panel{background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:22px;margin-bottom:18px}.notice{font-size:13px;color:var(--muted);background:var(--soft);border:1px solid var(--line);border-radius:4px;padding:12px 15px;margin-bottom:18px}.warning{color:var(--warning-ink);background:var(--warning-bg)}.error{color:var(--error-ink);background:var(--error-bg);border:1px solid var(--error-line);padding:12px 15px;white-space:pre-line;margin:12px 0}.error:empty{display:none}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}.toolbar input{flex:1;min-width:180px}.toolbar select{width:auto;max-width:420px;min-width:180px}input,select,textarea{min-height:48px;padding:10px 12px;border:1px solid var(--field-line);border-radius:4px;background:var(--surface);max-width:100%;width:100%}input[type=checkbox]{width:24px;height:24px;min-height:24px;margin:0}textarea{min-height:88px;resize:vertical}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.field{display:grid;gap:7px;align-content:start;font-size:14px}.field.wide{grid-column:1/-1}.date-row{display:flex;gap:8px}.date-row input{min-width:0;flex:1}.date-row button{font-size:14px;padding:8px 10px}.check{display:flex;gap:12px;align-items:center;min-height:48px}.check span{flex:1}.steps{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:18px}.steps button{font-size:13px;min-height:42px;padding:8px 11px}.steps button.current{background:var(--action);color:var(--on-action);border-color:var(--action)}.steps button.done{background:var(--hover)}.save-state{font-size:13px;min-height:23px;margin:8px 0;color:var(--muted)}.save-state.failed{color:var(--error-ink)}.cart-bar{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:16px}.cart-bar button{width:100%;text-align:left}.wizard-nav{display:flex;gap:12px;justify-content:space-between;position:sticky;bottom:0;padding:14px 0;background:var(--bg);border-top:1px solid var(--line);z-index:5}.wizard-nav button{min-width:120px}.wizard-title{margin-bottom:6px}.summary{display:grid;grid-template-columns:1fr 1fr;gap:16px}.summary div{border-bottom:1px solid var(--line);padding-bottom:12px}.summary dt{font-size:13px;color:var(--muted);margin-bottom:4px}.summary dd{margin:0;overflow-wrap:anywhere}details{border:1px solid var(--line);padding:15px;border-radius:4px;margin:18px 0}summary{cursor:pointer;min-height:40px;font-weight:600}details .grid{margin-top:14px}.stats{display:flex;gap:12px;margin-bottom:18px}.stat{flex:1;background:var(--surface);border:1px solid var(--line);padding:15px 18px;font-size:13px;color:var(--muted)}.stat strong{display:block;font-size:25px;margin-top:4px;color:var(--ink)}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:14px}th{text-align:left;font-weight:400;color:var(--muted);font-size:12px;border-bottom:1px solid var(--line);padding:12px 8px}td{padding:17px 8px;border-bottom:1px solid var(--line);vertical-align:middle}tr:last-child td{border-bottom:0}td strong{display:block;margin-bottom:4px}td .muted{font-size:12px}.badge{display:inline-block;padding:4px 7px;background:var(--soft);border:1px solid var(--line);font-size:12px;border-radius:3px}.empty{padding:32px 12px;text-align:center;color:var(--muted)}.catalog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.product{background:var(--surface);border:1px solid var(--line);border-radius:4px;display:flex;flex-direction:column;overflow:hidden}.product figure{height:160px;margin:0;background:var(--photo-bg);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:center}.product img{width:100%;height:100%;object-fit:contain;padding:10px}.image-missing{color:var(--muted);font-size:14px;text-align:center;background:var(--soft);display:flex;align-items:center;justify-content:center;padding:15px;min-height:90px}.product .body{padding:16px;display:flex;flex:1;flex-direction:column;gap:8px}.product h3{font-size:16px;margin:0;line-height:1.4}.product .price{font-weight:600}.product .body>button{margin-top:auto}.pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0}.basket-item{display:flex;gap:16px;padding:20px 0;border-bottom:1px solid var(--line)}.basket-item:first-child{padding-top:0}.basket-item img,.basket-item .image-missing{width:100px;height:100px;object-fit:contain;flex:none}.basket-item .body{flex:1;min-width:0}.basket-item h3{font-size:17px;margin:0 0 6px}.basket-item .actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.basket-total{padding:18px 0;font-size:20px;font-weight:600}.actions{display:flex;gap:10px;flex-wrap:wrap}.backup-actions{display:grid;gap:14px;max-width:500px}dialog{border:1px solid var(--line);border-radius:6px;padding:25px;width:min(680px,94vw);max-height:90vh;color:var(--ink)}dialog::backdrop{background:var(--backdrop)}dialog .actions{justify-content:flex-end;margin-top:20px}dialog figure{margin:0 0 16px;height:190px}dialog figure img{width:100%;height:100%;object-fit:contain}#toast{display:none;position:fixed;bottom:20px;right:20px;max-width:min(520px,90vw);background:var(--action);color:var(--on-action);border-radius:4px;padding:14px 20px;z-index:100}.catalog-source{font-size:12px;color:var(--muted)}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:1100px){main{padding:25px 20px}.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}aside{width:195px}main{margin-left:195px}}@media(max-width:760px){aside{position:static;width:100%;padding:18px;border-right:0;border-bottom:1px solid var(--line)}aside h1{font-size:21px}nav{display:flex;gap:4px;margin-top:14px;overflow:auto}nav button{white-space:nowrap;font-size:14px;padding:8px 12px}.side-note{display:none}main{margin:0;padding:22px 14px}.header{align-items:flex-start;gap:12px}h2{font-size:25px}.header .primary{font-size:14px;white-space:nowrap;padding:10px 12px}.grid,.summary{grid-template-columns:1fr}.field.wide{grid-column:auto}.panel{padding:16px}.stats{gap:7px}.stat{font-size:11px;padding:12px 10px}.stat strong{font-size:23px}.catalog-grid{gap:10px}.product .body{padding:12px}.product figure{height:140px}.product h3{font-size:14px}.product .muted{font-size:12px}.product .price{font-size:14px}.product button{font-size:13px;padding:8px}.steps{gap:4px}.steps button{font-size:11px;padding:7px 8px}th:nth-child(3),td:nth-child(3){display:none}.basket-item{gap:10px}.basket-item img,.basket-item .image-missing{width:75px;height:85px;font-size:11px}.basket-item h3{font-size:15px}.wizard-nav button{min-width:100px}.date-row button{font-size:12px;padding:8px}.pagination{font-size:13px}.pagination button{font-size:13px;padding:8px 12px}}@media(max-width:400px){.catalog-grid{grid-template-columns:1fr}.product figure{height:190px}.basket-item{display:block}.basket-item img,.basket-item .image-missing{margin-bottom:10px}}

#toast{pointer-events:none}

.calendar-controls{display:grid;grid-template-columns:48px minmax(100px,1fr) minmax(75px,.65fr) 48px;gap:10px;align-items:end}.calendar-controls>button{min-width:48px;min-height:48px;padding:8px}.calendar-controls input,.calendar-controls select{width:100%;min-width:0}.calendar-heading{text-align:center;font-weight:600;margin:16px 0 10px}.calendar-weekdays,.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.calendar-weekdays span{padding:8px 0;text-align:center;font-size:13px;color:var(--muted)}.calendar-days button{min-width:0;min-height:44px;padding:8px 3px}.calendar-days button.selected{background:var(--action);color:var(--on-action);border-color:var(--action)}.calendar-days span{min-height:44px}@media(max-width:420px){.calendar-controls{grid-template-columns:44px minmax(80px,1fr) 70px 44px;gap:5px}.calendar-controls>button{min-width:44px}.calendar-controls input,.calendar-controls select{padding:8px 5px;font-size:15px}.calendar-days{gap:3px}.calendar-days button{min-height:42px;padding:8px 0;font-size:15px}dialog{padding:18px}}

.hall-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.hall-gallery button{padding:8px}.hall-gallery img{display:block;width:100%;height:220px;object-fit:contain;background:var(--surface)}.hall-photo-full{display:block;width:100%;max-height:65vh;object-fit:contain;background:var(--surface)}

dialog{background:var(--surface)}a{color:#245a91}input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}input[type=checkbox]{accent-color:var(--action)}
@media(prefers-color-scheme:dark){:root{--ink:#f0f2f5;--muted:#b4bec9;--line:#65717e;--action:#dce7f2;--on-action:#111820;--bg:#000000;--surface:#111111;--hover:#252b32;--soft:#1e252c;--field-line:#7c8997;--focus:#9bcaff;--danger:#ffaaaa;--warning-ink:#ffdbaf;--warning-bg:#332619;--error-ink:#ffb6b6;--error-bg:#341c20;--error-line:#bc7b85;--photo-bg:var(--surface);--backdrop:#000000bb}a{color:#9bcaff}}
@media print{:root{color-scheme:light;--ink:#000000;--muted:#333333;--line:#999999;--action:#000000;--on-action:#ffffff;--bg:#ffffff;--surface:#ffffff;--soft:#ffffff;--hover:#ffffff;--photo-bg:var(--surface);--error-ink:#000000;--error-bg:#ffffff;--warning-ink:#000000;--warning-bg:#ffffff}body,main,.panel,dialog,input,select,textarea{background:#ffffff!important;color:#000000!important}aside,.wizard-nav,.steps,.actions,#toast,button{display:none!important}main{margin:0;padding:0;max-width:none}a{color:#000000}th,td{color:#000000!important}.table-wrap{overflow:visible}table{min-width:0!important}th:nth-child(3),td:nth-child(3){display:table-cell!important}}


.trapeznye-tabs{display:flex;gap:8px;margin:0 0 18px;flex-wrap:wrap}.trapeznye-tabs button[aria-pressed="true"]{background:var(--action);color:var(--on-action);border-color:var(--action)}@media print{.trapeznye-tabs{display:none}}

main.trapeznye-map-screen{padding:16px 18px;max-width:none}main.trapeznye-map-screen .header{margin-bottom:12px}main.trapeznye-map-screen .trapeznye-tabs{margin-bottom:10px}.trapeznye-map-stage{padding:0;border:0;margin-bottom:12px}.trapeznye-map-stage>p{font-size:13px;margin:0 0 8px}#offline-hall-map-host{--map-height:max(640px,calc(100dvh - 340px))}.trapeznye-map-stage .offline-hall-map{border-radius:6px}.trapeznye-map-stage .offline-map-tools{padding:6px 10px}.trapeznye-map-stage .offline-map-info{padding:8px 12px}.trapeznye-map-stage .offline-map-attribution{padding:4px 12px}@media(max-width:760px){main.trapeznye-map-screen{padding:12px 10px}#offline-hall-map-host{--map-height:max(600px,calc(100dvh - 250px))}}

main.trapeznye-map-screen .header{margin-bottom:8px}main.trapeznye-map-screen h2{font-size:25px}#offline-hall-map-host{--map-height:max(600px,calc(100dvh - 210px))}.trapeznye-map-stage .offline-map-info{padding:5px 10px;font-size:13px}.trapeznye-map-stage .offline-map-attribution{font-size:11px;padding:3px 10px}.map-source-details{margin:0;padding:0 10px;border:0}.map-source-details summary{min-height:24px;font-size:12px;font-weight:400}.map-no-scroll{overflow:hidden}.trapeznye-map-stage.map-is-fullscreen{position:fixed;inset:0;width:100vw;height:100dvh;z-index:900;background:var(--bg);margin:0;padding:0;overflow:auto}.map-is-fullscreen #offline-hall-map-host{--map-height:calc(100dvh - 135px)}.map-is-fullscreen .offline-hall-map{border-radius:0}.offline-map-tools{flex-wrap:wrap}.offline-map-tools #map-fullscreen{margin-left:8px}

/* portrait-tablet-layout: full-width map without changing approved landscape. */
@media screen and (orientation:portrait) and (min-width:761px) and (max-width:1100px){aside{position:static;width:100%;padding:12px 14px;border-right:0;border-bottom:1px solid var(--line)}aside h1{font-size:18px;margin:0 0 3px}aside p{font-size:11px;line-height:1.3}nav{display:flex;gap:4px;margin-top:8px;overflow-x:auto;flex-wrap:nowrap}nav button{flex:none;white-space:nowrap;font-size:14px;min-height:44px;padding:8px 12px}.side-note{display:none}main{margin-left:0;margin-right:0;padding:18px 14px;max-width:none}main.trapeznye-map-screen{padding:12px 10px}#offline-hall-map-host{--map-height:max(540px,calc(100dvh - 315px))}.map-is-fullscreen #offline-hall-map-host{--map-height:calc(100dvh - 135px)}}

.phone-entry{display:flex;align-items:center;gap:8px}.phone-entry>span{font-weight:600;white-space:nowrap}.phone-entry>input{min-width:0;flex:1}.phone-country-options{display:flex;flex-direction:column;gap:4px;max-height:300px;overflow-y:auto}.phone-country-options button{text-align:left;flex-shrink:0;min-height:44px}

img[data-photo-product]{cursor:zoom-in}img[data-photo-product]:focus-visible{outline:3px solid var(--focus);outline-offset:3px}.product-photo-dialog{width:min(96vw,1100px);max-width:1100px}.product-photo-viewport{height:min(70dvh,720px);overflow:hidden;touch-action:none;cursor:grab;background:var(--photo-bg);user-select:none}.product-photo-viewport img{display:block;width:100%;height:100%;object-fit:contain;transform-origin:center;pointer-events:none;user-select:none;max-height:none}.product-photo-dialog .actions{align-items:center;flex-wrap:wrap}

/* Gallery leaves room for title, view selector and zoom controls. */
.product-photo-dialog .product-photo-viewport{height:min(52dvh,600px)}

.facility-option{display:block;width:100%;text-align:left;margin:.3rem 0}.facility-option small{display:block;margin-top:.2rem}.route-row{display:flex;align-items:center;gap:.5rem}.route-row label{flex:1}#cemetery-results{max-height:48vh;overflow:auto}
.address-options:not(:empty){max-height:12rem;overflow:auto;border:1px solid #bbb;border-radius:6px}.address-options button{display:block;width:100%;text-align:left;padding:.45rem .65rem}#route-eta{margin:.5rem 0;font-weight:600}

.route-schedule{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:.65rem;margin:.65rem 0}
.route-schedule div{padding:.6rem;border:1px solid currentColor;border-radius:6px}
.route-schedule dt{font-size:.85em;font-weight:600}
.route-schedule dd{margin:.25rem 0 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}

#order-sync-bar:not([hidden]){display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;padding:.45rem 1rem;font-size:.88rem;color:#424242;border-bottom:1px solid #dedede}
#order-sync-now{margin-inline-start:auto;min-height:44px;padding:.4rem .9rem}
#order-sync-conflicts:not([hidden]){padding:.4rem .8rem}

.sync-review {width:min(94vw,44rem);max-height:85vh;overflow:auto}
.sync-review section {padding-block:.6rem;border-top:1px solid var(--line)}
.sync-review details {margin:.8rem 0}
.sync-review summary {cursor:pointer;padding:.5rem 0}
.sync-review fieldset {min-width:0;margin:1rem 0;border:1px solid var(--line)}
.sync-review fieldset label {display:flex;align-items:center;gap:.4rem}
.sync-review input[type=checkbox] {width:auto;margin:0}
.sync-review pre {white-space:pre-wrap;overflow-wrap:anywhere;margin:.25rem 0 .8rem;font:inherit}

@media screen {
  html {
    scrollbar-gutter: stable;
  }

  html:has(dialog:modal) {
    overflow: hidden;
  }

  dialog:modal {
    overscroll-behavior: contain;
  }
}

.social-burial-package-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.social-burial-package-photo {
  position: relative;
  width: min(100%, 19rem);
  aspect-ratio: 491 / 740;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 4px;
  background: var(--photo-bg);
}

.social-burial-package-photo[data-scene="summer"] { --scene-left: 13; }
.social-burial-package-photo[data-scene="winter"] { --scene-left: 522; }
.social-burial-package-photo[data-scene="urn"] { --scene-left: 1032; }

.social-burial-package-photo img {
  position: absolute;
  inset: 0 auto auto 0;
  width: calc(100% * 1536 / 491);
  max-width: none;
  height: auto;
  /* The original is 1536 by 1024. Start each crop at y=60, above the printed captions. */
  transform: translate(calc(-100% * var(--scene-left) / 1536), calc(-100% * 60 / 1024));
}
