@font-face {
  font-family: KuzyaSerif;
  src: url("/static/assets/serif.ttf") format("truetype");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0b0806;
  --panel: #1c1711;
  --gold: #dcbd76;
  --text: #f9edcf;
  --muted: #c7b897;
  --red: #b72d19;
  --line: #806b43;
  --safe: max(env(safe-area-inset-bottom, 0px), var(--tg-content-bottom, 0px));
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    1rem/1.5 system-ui,
    sans-serif;
  padding-bottom: calc(104px + var(--safe));
  overflow-wrap: anywhere;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: var(--gold);
}
button:focus-visible,
a:focus-visible,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #f9cd61;
  outline-offset: 3px;
}
header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 840px;
  margin: auto;
  padding: calc(
      14px + max(env(safe-area-inset-top, 0px), var(--tg-content-top, 0px))
    )
    20px 14px;
  background: url("/static/assets/ornament.webp") right top/145px auto no-repeat;
  border-bottom: 1px solid #6e582f;
}
#brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
#brand img {
  height: 96px;
  width: 84px;
  object-fit: contain;
}
#brand span {
  font:
    42px/1.1 KuzyaSerif,
    Georgia,
    serif;
}
#brand small {
  display: block;
  font: 12px/2 system-ui;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}
.icon {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: #171109;
  color: var(--gold);
  font-size: 25px;
}
#back[hidden] {
  display: none;
}
main {
  max-width: 760px;
  margin: auto;
  padding: 24px 18px;
}
h1,
h2,
h3 {
  font-family: KuzyaSerif, Georgia, serif;
  line-height: 1.25;
}
h1 {
  font-size: 1.875rem;
  margin: 0 0 10px;
}
h2 {
  font-size: 1.5rem;
  margin: 0 0 18px;
}
h3 {
  font-size: 1.25rem;
  margin: 0 0 10px;
}
p {
  margin: 0 0 14px;
}
.muted,
small {
  color: var(--muted);
}
.intro {
  font-family: KuzyaSerif, Georgia, serif;
  font-size: 27px;
  margin-bottom: 18px;
}
.intro em {
  color: var(--gold);
  font-style: normal;
}
.catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0;
}
.service {
  border: 1px solid #a58a55;
  border-radius: 22px;
  min-height: 216px;
  padding: 14px 8px 16px;
  background: radial-gradient(
    ellipse at 50% 40%,
    #332416 0%,
    #17130e 55%,
    #100d09 100%
  );
  color: var(--text);
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  transition: border-color 0.15s;
}
.service:hover {
  border-color: #ffce62;
}
.service img {
  width: 100%;
  height: 142px;
  object-fit: contain;
}
.service span {
  font:
    1.4375rem/1.2 KuzyaSerif,
    Georgia,
    serif;
}
.service .initial {
  height: 42px;
  width: 34px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  margin-right: 1px;
}
.card,
fieldset {
  background: linear-gradient(130deg, #251d13, #15110d);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  margin: 0 0 18px;
  min-width: 0;
}
.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-radius: 22px;
  border: 1px solid var(--gold);
  margin-bottom: 24px;
  background: radial-gradient(ellipse at left, #342413, #100d09);
}
.hero img {
  height: 100px;
  width: 110px;
  object-fit: contain;
}
.hero h1 {
  font-size: 27px;
  margin: 0;
}
.hero small {
  display: block;
  margin-top: 5px;
}
.btn {
  display: block;
  text-align: center;
  text-decoration: none;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  background: #231c13;
  color: var(--text);
  margin-top: 10px;
}
.primary {
  background: linear-gradient(135deg, #d63c1d, #a41c0d);
  border: 1px solid #f3ca64;
  font-family: KuzyaSerif, Georgia, serif;
  font-size: 21px;
  box-shadow: inset 0 0 16px #df570e33;
}
.quiet {
  background: transparent;
}
.actions {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}
.actions .row {
  display: flex;
  gap: 8px;
}
.actions .row > * {
  flex: 1;
  min-width: 0;
}
.actions .btn {
  margin: 0;
}
.copy {
  white-space: pre-wrap;
  line-height: 1.7;
}
.copy::first-line {
  font-weight: 600;
}
.fine {
  font-size: 13px;
  color: var(--muted);
}
label {
  display: block;
  margin: 0 0 16px;
}
label > span,
legend {
  display: block;
  margin-bottom: 7px;
  color: var(--gold);
}
input,
select,
textarea {
  background: #2a241c;
  border: 1px solid #9c8354;
  border-radius: 12px;
  padding: 13px;
  width: 100%;
  min-height: 49px;
}
textarea {
  resize: vertical;
  min-height: 110px;
}
input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  accent-color: #cd3c19;
  flex-shrink: 0;
}
.check {
  display: flex;
  align-items: start;
  gap: 10px;
}
.check span {
  color: var(--text);
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pair label {
  min-width: 0;
}
.days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.days .check {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  gap: 6px;
}
.days span {
  margin: 0;
}
#price-info {
  color: var(--muted);
  font-size: 14px;
}
.photos {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 8px 0 16px;
}
.photos img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.photo-item {
  flex-shrink: 0;
  width: 100px;
}
.photo-item button {
  font-size: 12px;
  padding: 3px;
  min-height: 30px;
  margin-top: 4px;
}
input[type="file"] {
  font-size: 13px;
  padding: 10px;
}
.photo-view {
  width: 100%;
  max-height: 450px;
  object-fit: contain;
  border-radius: 14px;
}
.empty {
  text-align: center;
  padding: 35px 20px;
}
.loading {
  padding: 40px;
  text-align: center;
  color: var(--gold);
}
#status {
  position: fixed;
  bottom: calc(84px + var(--safe));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 720px;
  z-index: 20;
  background: #3c1b10;
  border: 1px solid #e2b768;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 25px #0008;
  margin: 0;
}
#status:empty {
  display: none;
}
#recovery {
  max-width: 720px;
  margin: 0 auto 22px;
  padding: 16px;
  border: 1px solid #e6ad50;
  border-radius: 12px;
  background: #302314;
}
#tabs {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 840px;
  background: #100c08ed;
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 10px 10px calc(10px + var(--safe));
  z-index: 10;
  gap: 6px;
}
#tabs button {
  flex: 1;
  min-height: 56px;
  background: transparent;
  color: var(--text);
  border: 0;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
#tabs button.active {
  color: #f1c55b;
  border-bottom-color: #d3361b;
}
svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.privacy {
  border-left: 2px solid var(--gold);
  padding-left: 13px;
  font-size: 13px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (min-width: 650px) {
  main {
    padding: 28px;
  }
  .catalog {
    gap: 20px;
  }
  .service {
    min-height: 275px;
  }
  .service img {
    height: 190px;
  }
  .service span {
    font-size: 27px;
  }
  .hero img {
    height: 130px;
    width: 160px;
  }
}
@media (max-width: 350px) {
  header {
    padding-left: 12px;
    padding-right: 12px;
  }
  #brand img {
    height: 72px;
    width: 60px;
  }
  #brand span {
    font-size: 34px;
  }
  main {
    padding: 18px 12px;
  }
  .service {
    min-height: 190px;
  }
  .service img {
    height: 118px;
  }
  .service span {
    font-size: 1.25rem;
  }
  .pair {
    grid-template-columns: 1fr;
  }
  .actions .row {
    flex-wrap: wrap;
  }
  .actions .row > * {
    flex-basis: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

header.compact #brand img {
  width: 52px;
  height: 70px;
}
header.compact #brand span {
  font-size: clamp(1.5rem, 8vw, 2.125rem);
}
