/* Стиль planmera.com: Cormorant Garamond + Inter, белый и тёплый беж, акцент #C4A882, тонкие линии, квадратные кнопки. */
:root {
  --black: #1A1A1A; --white: #fff; --warm: #F7F3EE; --accent: #C4A882; --muted: #888880; --border: #E8E4DF;
  --accent-ink: #8C6F4B; --neg: #A4553F; --pos: #5E7A57; --warn: #FBF1E3; --warn-ink: #8A4B12;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--white); color: var(--black); font: 300 16px/1.6 var(--sans); }
body.lb-open { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: var(--accent-ink); }
#app { max-width: 1080px; margin: 0 auto; padding: 0 16px 24px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.top { display: flex; align-items: baseline; gap: 14px; padding: 22px 0 18px; border-bottom: 1px solid var(--border); }
.brand { display: block; flex: none; color: var(--black); text-decoration: none; }
.brand img { display: block; height: 26px; width: auto; }
.brand-sub { text-transform: uppercase; letter-spacing: .18em; font-size: 11px; color: var(--muted); }
.langs { margin-left: auto; }
.langs button { border: 1px solid var(--border); background: transparent; padding: 4px 12px; margin-left: 6px; font-size: 12px; letter-spacing: .1em; }
.langs button.on { background: var(--black); color: var(--white); border-color: var(--black); }

.progress { height: 1px; background: var(--border); margin-top: 18px; }
.progress div { height: 1px; background: var(--accent); transition: width .3s; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 14px 0 0; }
.crumbs button { width: 30px; height: 30px; border: 1px solid var(--border); background: var(--white); font-size: 12px; color: var(--muted); }
.crumbs .done button { background: var(--warm); color: var(--black); }
.crumbs .on button { background: var(--black); color: var(--white); border-color: var(--black); }

.step { background: var(--white); padding: 34px 0 8px; }
.hero { height: 300px; margin: 0 0 30px; background: center/cover no-repeat; }
.kicker { text-transform: uppercase; letter-spacing: .2em; font-size: 11px; color: var(--muted); margin: 0; }
h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 5.4vw, 56px); line-height: 1.08; margin: 10px 0 14px; }
.lead { color: var(--muted); max-width: 68ch; margin: 0 0 8px; font-size: 16px; }
.field { margin-top: 34px; }
.field h2, .field label.h2 { display: block; font-family: var(--serif); font-size: 24px; font-weight: 400; margin: 0 0 6px; }
h2.section { font-family: var(--serif); font-weight: 300; font-size: 32px; margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--border); }

/* карта */
.map { max-width: 820px; }
.map-search { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.map-search input { flex: 1; min-width: 200px; }
.ghost.sm { padding: 10px 16px; font-size: 11px; }
.map-box { height: 340px; border: 1px solid var(--border); background: var(--warm); z-index: 0; }
.map-box.failed { display: grid; place-items: center; color: var(--muted); font-size: 14px; padding: 20px; text-align: center; }
.map-addr { margin-top: 8px; }

/* вложения */
.files { max-width: 640px; }
.flist { list-style: none; padding: 0; margin: 0 0 8px; }
.flist li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.flist li.up { color: var(--muted); }
.flist .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flist .fsize, .flist small { color: var(--muted); font-size: 12px; }
.flist .x { border: 0; background: transparent; font-size: 20px; color: var(--muted); padding: 0 6px; }
.flist.done li { border: 0; padding: 2px 0; }
.fbtn { display: inline-block; border: 1px dashed var(--accent); padding: 12px 20px; cursor: pointer; font-size: 13px; letter-spacing: .06em; color: var(--accent-ink); background: var(--warm); }
.fbtn:hover { border-style: solid; }
.fbtn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fbtn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.ferr { color: var(--neg); font-size: 13px; margin: 6px 0 0; }
.req { color: var(--accent); }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; max-width: 75ch; }
.hint.err { color: var(--neg); }

input[type=text], input[type=number], input[type=month], textarea {
  width: 100%; max-width: 640px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 0;
  background: var(--white); color: var(--black); font: 300 16px var(--sans);
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
button:focus-visible, .card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { display: flex; align-items: center; gap: 10px; }
.num input { max-width: 180px; }
.num span { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--border); background: var(--white); padding: 8px 16px; font-size: 13px; letter-spacing: .04em; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--black); color: var(--white); border-color: var(--black); }
.chip.add { border-style: dashed; color: var(--muted); }

.scale { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scale .end { color: var(--muted); font-size: 14px; }
.dot { width: 42px; height: 42px; border: 1px solid var(--border); background: var(--white); }
.dot.on { background: var(--black); color: var(--white); border-color: var(--black); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.cards.big { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { margin: 0; padding: 0; border: 1px solid var(--border); background: var(--white); text-align: left; position: relative; display: flex; flex-direction: column; cursor: pointer; transition: border-color .2s; }
.card:hover { border-color: var(--accent); }
.ph { position: relative; overflow: hidden; }
.ph img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; background: var(--warm); transition: transform .5s; }
.card:hover .ph img { transform: scale(1.03); }
.zoom { position: absolute; left: 10px; top: 10px; width: 34px; height: 34px; border: 0; background: rgba(255,255,255,.9); color: var(--black); font-size: 17px; line-height: 1; opacity: .85; }
.zoom:hover { opacity: 1; background: var(--white); }
.card .cap, .card figcaption { padding: 12px 14px; display: block; font-size: 15px; }
.card .cap b { display: block; font-weight: 400; font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.card .cap small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 3px; }
.card.pick.on { border-color: var(--black); box-shadow: inset 0 0 0 1px var(--black); }
.card.pick.on::after { content: "✓"; position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; background: var(--black); color: var(--white); display: grid; place-items: center; }
.sw { display: flex; padding: 0 14px 14px; gap: 4px; }
.sw i { flex: 1; height: 12px; border: 1px solid rgba(0,0,0,.06); }
.rate .card { cursor: default; }
.rate .ph { cursor: zoom-in; }
.rate .votes { display: flex; gap: 4px; padding: 0 12px 12px; margin-top: auto; }
.rate .v { flex: 1; border: 1px solid var(--border); background: var(--white); padding: 6px 0; font-size: 15px; }
.rate .v small { display: none; }
.rate .v:hover { border-color: var(--accent); }
.rate .v.on { background: var(--black); color: var(--white); border-color: var(--black); }
.rate .v-2.on { background: var(--neg); border-color: var(--neg); }
.rate .v2.on { background: var(--pos); border-color: var(--pos); }
.legend { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.legend i { font-style: normal; display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--border); color: var(--black); }
.ph.noimg { aspect-ratio: 3/2; display: grid; place-items: center; background: var(--warm); font-family: var(--serif); font-size: 22px; text-align: center; padding: 12px; }
.rooms .room.head { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 2px; }

.rooms .room { display: grid; grid-template-columns: 1fr 1fr 2fr auto; gap: 8px; margin-bottom: 8px; align-items: start; }
.rooms .rf { display: block; min-width: 0; }
.rooms .rl { display: none; }  /* на компьютере подписи в строке-заголовке, на телефоне над каждым полем */
.rooms .room input, .rooms .room textarea { max-width: none; }
.rooms .x { border: 1px solid var(--border); background: var(--white); width: 44px; height: 46px; }
.addbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.notice { background: var(--warm); padding: 16px 18px; font-size: 14px; max-width: 80ch; border-left: 2px solid var(--accent); }
.notice.warn { background: var(--warn); color: var(--warn-ink); border-left-color: var(--warn-ink); margin-bottom: 18px; }
.notice p { margin: 0 0 8px; } .notice p:last-child { margin: 0; }

.summary h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 34px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.summary .edit { flex: none; border: 0; background: none; padding: 6px 0; font: 400 13px var(--sans); color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.summary .row { display: grid; grid-template-columns: minmax(180px, 1fr) 2.4fr; gap: 16px; padding: 7px 0; font-size: 15px; align-items: start; }
.summary .row > span { color: var(--muted); }
.summary .row b { font-weight: 400; white-space: pre-wrap; }
.sublabel { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.thumbs.dim img { filter: grayscale(.7); opacity: .75; }
.thumb { margin: 0; cursor: zoom-in; }
.thumb img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; background: var(--warm); }
.thumb figcaption { font-size: 13px; padding-top: 4px; }
.thumb i { font-style: normal; color: var(--accent-ink); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 10px; }
/* Кнопки «Назад / Далее» прилипают к низу экрана: «Далее» видно, даже когда шаг выше экрана. */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 30px; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border);
  position: sticky; bottom: 0; z-index: 1100; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 -10px 24px -18px rgba(0,0,0,.35); }
.nav .pos { color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.primary, .ghost { padding: 14px 30px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.primary { background: var(--black); color: var(--white); border: 1px solid var(--black); }
.primary:hover:not(:disabled) { background: var(--accent-ink); border-color: var(--accent-ink); }
.ghost { background: transparent; border: 1px solid var(--black); }
.ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.ghost.danger { border-color: var(--border); color: var(--neg); }
.sent { padding-top: 70px; text-align: center; }
.sent .lead { margin: 0 auto; }
.sent .actions { justify-content: center; }
.sent a.primary { text-decoration: none; display: inline-block; }
.sent .contact { margin-top: 34px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.sent .contact a { color: var(--black); text-decoration: none; border-bottom: 1px solid var(--border); }
.ticket { display: inline-grid; grid-template-columns: auto auto; gap: 6px 18px; align-items: baseline; margin: 10px auto 18px; padding: 18px 26px; border: 1px solid var(--border); background: var(--warm); text-align: left; }
.ticket span { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--muted); }
.ticket b { font-family: var(--serif); font-weight: 400; font-size: 28px; }
.ticket b.code { font-family: var(--sans); font-size: 18px; letter-spacing: .12em; }

/* просмотр на весь экран */
.lb { position: fixed; inset: 0; z-index: 2000; background: rgba(20,18,16,.94); display: flex; align-items: center; justify-content: center; }
.lb figure { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.lb img { max-width: 92vw; max-height: calc(92vh - 48px); object-fit: contain; display: block; }
.lb figcaption { color: #eee; padding-top: 12px; font-size: 14px; display: flex; gap: 14px; align-items: baseline; }
.lb figcaption b { font-family: var(--serif); font-weight: 400; font-size: 22px; }
.lb figcaption span { color: #aaa; font-size: 12px; letter-spacing: .1em; }
.lb button { position: absolute; background: transparent; border: 0; color: #fff; font-size: 44px; line-height: 1; padding: 10px 18px; opacity: .8; }
.lb button:hover { opacity: 1; }
.lb-x { top: 10px; right: 12px; }
.lb-p { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-n { right: 6px; top: 50%; transform: translateY(-50%); }

/* Телефон: одна колонка, крупные кнопки под палец, номера шагов одной строкой, «Далее» во всю ширину. */
@media (max-width: 640px) {
  .top { padding: 16px 0 14px; align-items: center; }
  .brand-sub { display: none; }
  .langs button { padding: 7px 12px; }
  .progress, .progress div { height: 2px; }
  .crumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 12px -16px 0; padding: 0 16px 2px; }
  .crumbs::-webkit-scrollbar { display: none; }
  .crumbs li { flex: none; }
  .crumbs button { width: 34px; height: 34px; font-size: 12px; }
  .step { padding-top: 22px; }
  .hero { height: 190px; margin: 0 -16px 22px; }
  .lead { font-size: 15px; }
  .field { margin-top: 28px; }
  .field h2, .field label.h2 { font-size: 22px; }
  h2.section { font-size: 26px; }

  .cards, .cards.big { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card .cap { padding: 10px 10px 12px; }
  .card .cap b { font-size: 17px; }
  .card .cap small { font-size: 12px; }
  .chip { padding: 10px 14px; }

  /* оценка картинок: по одной в ряд, кнопки с подписью вместо легенды */
  .cards.rate { grid-template-columns: 1fr; gap: 16px; }
  .rate .legend { display: none; }
  .rate figcaption { font-family: var(--serif); font-size: 20px; padding: 10px 12px 8px; }
  .rate .votes { gap: 6px; }
  .rate .v { min-height: 54px; padding: 6px 2px; font-size: 18px; line-height: 1; }
  .rate .v small { display: block; margin-top: 4px; font-size: 10px; line-height: 1.15; letter-spacing: 0; }

  /* помещения: каждое отдельной карточкой с подписями полей */
  .rooms .room.head { display: none; }
  .rooms .room { display: block; position: relative; padding: 14px 14px 4px; margin-bottom: 12px; border: 1px solid var(--border); background: var(--white); }
  .rooms .rf { margin-bottom: 10px; }
  .rooms .rl { display: block; margin-bottom: 4px; padding-right: 40px; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
  .rooms .x { position: absolute; top: 2px; right: 2px; width: 40px; height: 34px; border: 0; background: transparent; font-size: 22px; color: var(--muted); }

  .map-search input { flex: 1 1 100%; min-width: 0; }
  .map-search button { flex: 1; }
  .map-box { height: 280px; }
  .fbtn { display: block; text-align: center; }

  .summary h3 { font-size: 24px; }
  .summary .row { grid-template-columns: 1fr; gap: 2px; }
  .thumbs { grid-template-columns: 1fr 1fr; }
  .actions .primary, .actions .ghost, .sent .actions a.primary { flex: 1 1 100%; text-align: center; }

  .sent { padding-top: 36px; }
  .ticket { display: grid; grid-template-columns: 1fr; gap: 2px; width: 100%; padding: 16px; text-align: center; }
  .ticket b { white-space: nowrap; }
  .ticket span + b + span { margin-top: 12px; }

  /* липкая панель: «Назад» компактная, «Далее» на всю оставшуюся ширину */
  .nav .pos, .nav > span:empty { display: none; }
  .nav .ghost { flex: none; padding: 14px 16px; }
  .nav .primary { flex: 1; padding: 14px 18px; }

  /* просмотр картинки: стрелки внизу, под большой палец */
  .lb { background: rgba(20,18,16,.97); }
  .lb figure { max-width: 100vw; }
  .lb img { max-width: 100vw; max-height: calc(100vh - 160px); }
  .lb figcaption { padding: 12px 16px 0; flex-wrap: wrap; justify-content: center; text-align: center; }
  .lb-p, .lb-n { top: auto; bottom: 14px; transform: none; font-size: 40px; }
}
@media print {
  .top .langs, .progress, .crumbs, .nav, .actions, .hint, .notice.warn, .hero, .zoom, .summary .edit { display: none !important; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .summary h3 { break-after: avoid; }
}
