* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
    margin: 0;
    background: #f4f5f7;
    color: #1f2430;
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}
a { color: #24315f; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px 40px; }
.top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 -16px 16px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 3px solid #24315f;
}
.top img { width: 109px; height: 50px; }
.top h1 { margin: 0; color: #24315f; font-size: 22px; font-weight: 600; }
.top .back { margin-left: auto; font-size: 14px; }
.hero, .panel, .book-card {
    margin: 0 0 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e4e7ee;
    border-radius: 12px;
}
.hero { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: center; }
.hero img { width: 160px; height: 120px; object-fit: cover; border-radius: 8px; }
.hero h2, .panel h2, .book-card h2 { margin: 0 0 6px; color: #24315f; font-size: 20px; }
.price { margin: 8px 0 0; font-size: 18px; font-weight: 650; }
.policies { margin: 0; padding-left: 18px; }
.policies li { margin: 0 0 6px; }
.notice {
    margin: 0 0 16px;
    padding: 10px 12px;
    background: #fde8ea;
    border: 1px solid #e3a3ab;
    border-radius: 8px;
}
.calendar { margin: 0 0 16px; }
.cal-nav { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.cal-nav button, .btn {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #24315f;
    border-radius: 6px;
    background: #24315f;
    color: #fff;
    font: inherit;
    cursor: pointer;
}
.btn.secondary, .cal-nav button { background: #fff; color: #24315f; }
.btn:disabled, .cal-nav button:disabled { opacity: 0.45; cursor: default; }
.months { display: block; }
.month { display: table; width: 100%; margin: 0 0 12px; border-collapse: collapse; background: #fff; border: 1px solid #e4e7ee; border-radius: 12px; overflow: hidden; }
.calendar.is-ready .months { display: flex; gap: 12px; align-items: flex-start; }
.calendar.is-ready .month { display: none; width: auto; margin: 0; }
.calendar.is-ready .month.is-on { display: table; flex: 1; }
.month caption { padding: 8px; background: #24315f; color: #fff; font-weight: 600; }
.month th, .month td { width: 14.28%; padding: 2px; text-align: center; font-size: 13px; }
.day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font: inherit;
}
.is-open { background: #e7f5ec; cursor: pointer; }
.is-taken { background: #f0d4d8; color: #8a1f2b; }
.is-past { color: #9aa0ab; }
.is-chosen { outline: 2px solid #24315f; background: #24315f; color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0 0; font-size: 13px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.swatch.is-open { background: #b7e0c4; }
.swatch.is-taken { background: #e7b4bb; }
.swatch.is-past { background: #d5d8df; }
.form-grid { display: grid; gap: 12px; }
label.field { display: block; font-size: 14px; font-weight: 600; }
label.field input, label.field select, .choice input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px;
    border: 1px solid #c5c9d4;
    border-radius: 6px;
    font: inherit;
    font-weight: 400;
}
.choice { display: flex; gap: 16px; font-weight: 400; }
.choice label { display: flex; align-items: center; gap: 6px; min-height: 36px; }
.choice input { width: auto; margin: 0; }
.quote { margin: 0; padding: 12px; background: #f4f5f7; border-radius: 8px; }
.quote div { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 4px; }
.quote .total { margin-top: 8px; padding-top: 8px; border-top: 1px solid #d5d8df; font-weight: 700; }
.banner { margin: 0 0 12px; padding: 10px 12px; background: #fff8d6; border: 1px solid #e0c56a; border-radius: 8px; }
.banner.error { background: #fde8ea; border-color: #e3a3ab; }
.banner.ok { background: #e7f5ec; border-color: #9fd0b1; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; }
.facts dt { color: #6b7280; }
.facts dd { margin: 0; font-weight: 600; }
.stay { margin: 0 0 12px; padding: 12px; border: 1px solid #e4e7ee; border-radius: 10px; }
.stay h3 { margin: 0 0 4px; font-size: 17px; }
.stay .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hint { margin: 0; color: #4b5263; font-size: 14px; }
@media (max-width: 700px) {
    .hero { grid-template-columns: 1fr; }
    .hero img { width: 100%; height: 180px; }
    .top { flex-wrap: wrap; }
    .top h1 { font-size: 18px; }
    .day { width: 36px; height: 36px; }
}
