/* Zemitá horská paleta */
:root {
  --forest: #2f4a3a;
  --forest-2: #3f5f4b;
  --moss: #7d907a;
  --bark: #6b4f3a;
  --ochre: #c8873a;
  --ochre-d: #a96c25;
  --stone: #e9e4da;
  --cream: #f7f4ee;
  --ink: #23271f;
  --muted: #5d6357;
  --line: #d8d1c3;
  --free: #e4ecd9;
  --inquiry: #f3d79c;
  --booked: #c98b7a;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.6; font-size: 17px; }
img, svg { max-width: 100%; display: block; }
a { color: var(--forest); }
a:hover { color: var(--ochre-d); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--forest); font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 1rem; }
h3, .h3 { font-size: 1.25rem; margin: 1.2rem 0 .5rem; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.note { color: var(--muted); font-size: .95rem; }

.btn { display: inline-block; background: var(--ochre); color: #fff; border: 0; border-radius: 999px; padding: .75rem 1.5rem; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--ochre-d); color: #fff; }
.btn-small { padding: .4rem .9rem; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--forest); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--stone); color: var(--forest); }

/* Hlavička */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--forest); }
.main-nav { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.main-nav a { text-decoration: none; font-size: .95rem; }
.main-nav a.btn { color: #fff; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a { text-decoration: none; font-size: .8rem; font-weight: 700; padding: .25rem .45rem; border-radius: 6px; color: var(--muted); }
.lang-switch a.active { background: var(--forest); color: #fff; }

/* Hero */
.hero { position: relative; padding: 0; background: linear-gradient(#e6e3d8, var(--cream)); overflow: hidden; }
.hero-art { position: absolute; inset: auto 0 0 0; height: 70%; }
.hero-art svg { width: 100%; height: 100%; }
.hero-text { position: relative; padding-top: 80px; padding-bottom: 220px; max-width: 760px; margin-left: max(20px, calc((100vw - 1140px) / 2 + 20px)); }
.hero-text p { font-size: 1.15rem; color: var(--muted); }

.hero-photo { background-size: cover; background-position: center 35%; min-height: min(78vh, 640px); display: flex; align-items: flex-end; }
.hero-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,30,24,0) 30%, rgba(20,30,24,.72) 100%), linear-gradient(90deg, rgba(20,30,24,.45), rgba(20,30,24,0) 70%); }
.hero-photo .hero-text { padding-top: 120px; padding-bottom: 56px; }
.hero-photo h1 { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero-photo .hero-text p { color: #f3efe6; text-shadow: 0 1px 8px rgba(0,0,0,.4); }

.intro p { max-width: 70ch; font-size: 1.1rem; }

/* Galerie */
.house-block .g-house { padding-top: 56px; }
.g-grid { columns: 3 260px; column-gap: 14px; }
.g-item { display: block; margin-bottom: 14px; border-radius: var(--radius); overflow: hidden; break-inside: avoid; background: var(--stone); }
.g-item img { width: 100%; height: auto; transition: transform .3s; }
.g-item:hover img { transform: scale(1.03); }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(15,20,16,.92); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 6px; }
.lb-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }

/* Apartmány */
.apartments { background: var(--stone); }
.apt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.apt-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.apt-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.apt-body h3 { margin-top: 0; font-size: 1.5rem; }
.apt-body h3 a { text-decoration: none; }
.link-arrow { margin-top: auto; font-weight: 600; text-decoration: none; }
.features { list-style: none; padding: 0; margin: .5rem 0 1rem; display: flex; flex-wrap: wrap; gap: 6px; }
.features li { background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .65rem; font-size: .85rem; color: var(--bark); }
.illu { position: relative; aspect-ratio: 16 / 9; background: var(--stone); }
.illu svg { width: 100%; height: 100%; }
.illu.photo img { width: 100%; height: 100%; object-fit: cover; }
.g-apt { padding-top: 0; }
.illu span { position: absolute; right: 10px; bottom: 8px; font-size: .75rem; color: #fff; background: rgba(35,39,31,.55); padding: .1rem .5rem; border-radius: 6px; }

/* Lyžování */
.ski-inner { background: var(--forest); color: var(--cream); border-radius: var(--radius); padding: 40px; }
.ski-inner h2 { color: #fff; }
.ski-inner p { max-width: 70ch; font-size: 1.1rem; margin: 0; }
.ski-features { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; }
.ski-features li { padding-left: 1.4rem; position: relative; }
.ski-features li::before { content: "❄"; position: absolute; left: 0; color: var(--ochre); }
.g-winter, .g-summer, .g-interior { padding-top: 8px; }
.g-item { position: relative; }
.g-item::after { content: attr(data-cap); position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: .8rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); opacity: 0; transition: opacity .2s; }
.g-item:hover::after, .g-item:focus::after { opacity: 1; }

/* Ceník */
.prices { background: var(--stone); }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 1rem; }
.price-card { background: #fff; border-radius: var(--radius); padding: 20px; border-top: 4px solid var(--ochre); }
.price-card:nth-child(2) { border-top-color: var(--moss); }
.price-grid-3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.price-grid-3 .price-card:nth-child(1) { border-top-color: var(--moss); }
.price-grid-3 .price-card:nth-child(2) { border-top-color: var(--ochre); }
.price-card.price-top { border-top-color: var(--forest); }
.price-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 0 0 1rem; }
.price-more > div { background: #fff; border-radius: var(--radius); padding: 20px; }
.price-more h3 { margin: 0 0 .6rem; }
.extras { width: 100%; border-collapse: collapse; }
.extras th, .extras td { text-align: left; padding: .45rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.extras th { font-weight: 500; padding-right: 1rem; }
.extras td { font-weight: 600; color: var(--forest); text-align: right; }
.extras td small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.stay-rules, .pay-terms, .storno { margin: .8rem 0 0; padding-left: 1.2rem; }
.stay-rules li, .pay-terms li, .storno li { margin: .25rem 0; }
.storno-title { margin: 1rem 0 0; }

.price-card h3 { margin: 0; }
.price-card .months { color: var(--muted); margin: .2rem 0 .6rem; font-size: .95rem; }
.price-card .price { font-size: 1.8rem; font-family: var(--serif); color: var(--forest); margin: 0; }
.price-card .price small { font-size: .9rem; color: var(--muted); font-family: var(--sans); }
.price-card .unit { margin: 0; color: var(--muted); font-size: .9rem; }

/* Okolí */
.area-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.acts { list-style: none; padding: 0; margin: 0; }
.acts li { padding: .7rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.acts span { color: var(--muted); font-size: .95rem; }

/* Poptávka + kalendář */
.inquiry { background: #fff; border-top: 1px solid var(--line); }
.inquiry-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .inquiry-grid { grid-template-columns: 1fr; } }
.cal-box h3 { margin-top: 0; }
.calendar .cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.calendar .cal-nav button { background: var(--stone); border: 0; border-radius: 8px; padding: .35rem .8rem; cursor: pointer; font: inherit; }
.calendar .cal-nav button:disabled { opacity: .4; cursor: default; }
.calendar .months { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.calendar .month h4 { margin: 0 0 6px; font-family: var(--serif); color: var(--forest); font-size: 1.05rem; text-transform: capitalize; }
.calendar .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendar .dow { font-size: .7rem; text-align: center; color: var(--muted); text-transform: uppercase; }
.calendar .day { aspect-ratio: 1; border: 0; border-radius: 6px; font: 500 .85rem var(--sans); background: var(--free); color: var(--ink); cursor: pointer; padding: 0; position: relative; }
.calendar .day.inquiry { background: var(--inquiry); }
.calendar .day.booked { background: var(--booked); color: #fff; cursor: not-allowed; }
.calendar .day.past { background: transparent; color: #b4b2aa; cursor: default; }
.calendar .day.half-in { background: linear-gradient(135deg, var(--free) 50%, var(--booked) 50%); }
.calendar .day.half-out { background: linear-gradient(135deg, var(--booked) 50%, var(--free) 50%); color: #fff; }
.calendar .day.sel { outline: 2px solid var(--forest); outline-offset: -2px; font-weight: 700; }
.calendar .day.range { box-shadow: inset 0 0 0 999px rgba(47,74,58,.18); }
.calendar .day.today::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--forest); }
.calendar .empty { visibility: hidden; }
.calendar-static .day { cursor: default; }
.legend { list-style: none; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.legend .d-free { background: var(--free); } .legend .d-inquiry { background: var(--inquiry); } .legend .d-booked { background: var(--booked); }
.hint { font-size: .9rem; color: var(--muted); }

.inq-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; background: var(--cream); padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); }
.inq-form .full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; color: var(--bark); }
input, select, textarea { font: 400 1rem var(--sans); padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ochre); outline-offset: 1px; border-color: transparent; }
label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; color: var(--ink); }
label.check input { width: auto; margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
.estimate { margin: 0; padding: .7rem 1rem; background: #fff; border-radius: 8px; border-left: 4px solid var(--ochre); }
.form-msg { margin: 0; padding: .7rem 1rem; border-radius: 8px; background: #f8e1da; color: #7a2e1d; }
.form-msg.ok { background: var(--free); color: var(--forest); }

/* Detail apartmánu */
.apt-detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .apt-detail-grid { grid-template-columns: 1fr; } }
.apt-detail .illu { border-radius: var(--radius); overflow: hidden; }
.crumbs { font-size: .9rem; color: var(--muted); }
.result { text-align: center; padding: 100px 20px; }
.result.ok h1 { color: var(--forest); }
.result.err h1 { color: #7a2e1d; }
.prose { max-width: 760px; }

/* Patička */
.site-footer { background: var(--forest); color: var(--cream); padding: 48px 0; }
.site-footer h2, .site-footer h3 { color: #fff; margin-top: 0; }
.site-footer a { color: #f1d6ad; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr 2fr; } }
.site-footer .map { display: block; width: 100%; height: 260px; border: 0; border-radius: 10px; background: #e7e2d3; }
.site-footer .map-links { margin-top: 10px; font-size: .95rem; }

@media (max-width: 720px) {
  .main-nav { order: 3; width: 100%; margin-left: 0; gap: 6px 14px; padding-bottom: 10px; }
  .brand { font-size: .95rem; flex: 1; min-width: 0; }
  .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand img { width: 26px; height: 26px; }
  .header-inner { gap: 10px; padding-top: 8px; }
  .lang-switch { margin-left: auto; }
  .main-nav a.btn { flex-shrink: 0; }
  .hero-text { padding-top: 48px; padding-bottom: 160px; }
  .hero-photo { min-height: 72vh; }
  .hero-photo .hero-text { padding-top: 80px; padding-bottom: 36px; }
  .inq-form { grid-template-columns: 1fr; }
  section { padding: 40px 0; }
}

/* ---------- Admin ---------- */
body.admin { font-size: 15px; background: #f3f1ec; }
.admin-main { padding-top: 24px; padding-bottom: 60px; }
.admin-main section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.admin .header-inner form { margin: 0; }
.flash { background: var(--free); color: var(--forest); padding: .7rem 1rem; border-radius: 8px; }
.flash.err { background: #f8e1da; color: #7a2e1d; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--stone); vertical-align: top; font-size: .9rem; }
.tbl th { background: var(--stone); color: var(--bark); font-weight: 600; }
.tbl td.msg { max-width: 260px; white-space: pre-wrap; }
.tbl form { display: inline-block; margin: 2px 0; }
.tbl tr.st-rejected td { color: #9a9a92; }
.badge { display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: var(--stone); margin-bottom: 4px; }
.tr-new .badge, .st-new .badge { background: var(--inquiry); }
.b-booked { background: var(--booked); color: #fff; } .b-blocked { background: #8b8b84; color: #fff; } .b-inquiry { background: var(--inquiry); }
.admin-form { display: flex; flex-direction: column; gap: 14px; max-width: 980px; }
.admin-form.inline, .admin-form .inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.admin-form.inline label, .admin-form .inline label { flex: 1 1 160px; }
.admin-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; background: #fff; display: grid; gap: 10px; }
.admin-form legend { font-weight: 700; color: var(--forest); padding: 0 6px; }
.content-form fieldset { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .content-form fieldset { grid-template-columns: 1fr; } }
.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.admin-cals { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.admin-cals .cal-box { background: #fff; padding: 14px; border-radius: var(--radius); }
.admin-form button { align-self: flex-start; }
body.login { display: grid; place-items: center; min-height: 100vh; }
.login-box { background: #fff; padding: 32px; border-radius: var(--radius); width: min(380px, 92vw); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.login-box form { display: flex; flex-direction: column; gap: 14px; }

.estimate p { margin: 0; }
.estimate .est-detail { color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.estimate .est-warn { color: #9a3b1e; font-weight: 600; font-size: .95rem; margin-top: .4rem; }
.extras .nb { white-space: nowrap; font-weight: 500; }
.tbl td.state { min-width: 230px; }
.tbl .confirm-form { display: flex; flex-direction: column; gap: 4px; margin: 4px 0; }
.tbl .confirm-form label { font-size: .8rem; color: var(--muted); }
.tbl .confirm-form input { width: 9rem; display: block; }
.pay-state { list-style: none; margin: 4px 0 6px; padding: 0; font-size: .82rem; }
.pay-state li { margin: 2px 0; }
.tbl .state .badge.b-booked { background: var(--free); color: var(--forest); }
.adm-dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.adm-dialog::backdrop { background: rgba(35,39,31,.45); }
.adm-dialog form { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.adm-dialog h3 { margin: 0; }
.adm-dialog .dlg-sub { margin: -6px 0 0; color: var(--muted); font-size: .9rem; }
.adm-dialog label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.adm-dialog label.check { flex-direction: row; align-items: center; gap: 8px; }
.adm-dialog textarea, .adm-dialog input[type=number] { font: inherit; font-weight: 400; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
.adm-dialog .inline { display: flex; gap: 12px; flex-wrap: wrap; }
.adm-dialog .inline label { flex: 1 1 150px; }
.adm-dialog .note { margin: 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
