.hsb {
	--hsb-wood: var(--wp--preset--color--wood, #3b2a20);
	--hsb-cedar: var(--wp--preset--color--cedar, #b5653a);
	--hsb-lake: var(--wp--preset--color--lake, #2f6f6a);
	--hsb-paper: var(--wp--preset--color--paper, #f7f3ec);
	--hsb-line: #dfd5c6;
	--hsb-free: #d9ebe2;
	--hsb-pending: #f3d9a4;
	--hsb-confirmed: #c98a6a;
	--hsb-busy: #8c7b6f;
	color: var(--hsb-wood);
}
.hsb *, .hsb *::before, .hsb *::after { box-sizing: border-box; }
.hsb [hidden] { display: none !important; }

.hsb-step { margin: 0 0 2.25rem; }
.hsb-step-title { display: flex; align-items: center; gap: .6rem; margin: 0 0 .9rem; font-size: 1.3rem; }
.hsb-num { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--hsb-lake); color: #fff; font-size: 1rem; font-weight: 700; flex: none; }
.hsb-hint { margin: .5rem 0; font-size: .92rem; opacity: .8; }

/* Sauna picker */
.hsb-saunas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.hsb-sauna { position: relative; display: block; cursor: pointer; }
.hsb-sauna input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.hsb-sauna-box { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: 1rem; background: #fff; border: 2px solid var(--hsb-line); border-radius: 12px; transition: border-color .15s, box-shadow .15s, background .15s; }
.hsb-sauna:hover .hsb-sauna-box { border-color: var(--hsb-cedar); }
.hsb-sauna-name { font-weight: 700; font-size: 1.1rem; }
.hsb-sauna-cap { font-size: .9rem; opacity: .75; }
.hsb-sauna-check { font-size: .85rem; font-weight: 700; color: var(--hsb-lake); visibility: hidden; }
.hsb-sauna input:checked + .hsb-sauna-box { border-color: var(--hsb-lake); background: #eef6f3; box-shadow: 0 0 0 3px rgba(47, 111, 106, .18); }
.hsb-sauna input:checked + .hsb-sauna-box .hsb-sauna-check { visibility: visible; }
.hsb-sauna input:focus-visible + .hsb-sauna-box { outline: 3px solid var(--hsb-cedar); outline-offset: 2px; }

/* Calendar: one row per day, one button per 3-hour slot */
.hsb-cal { background: #fff; border: 1px solid var(--hsb-line); border-radius: 12px; padding: .75rem; }
.hsb-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.hsb-cal-nav button { padding: .45rem .8rem; background: var(--hsb-paper); color: var(--hsb-wood); border: 1px solid var(--hsb-line); border-radius: 8px; font: inherit; font-size: .9rem; cursor: pointer; }
.hsb-cal-nav button:disabled { opacity: .35; cursor: default; }
.hsb-cal-title { text-align: center; font-size: .98rem; }
.hsb-cal-grid { min-height: 12rem; transition: opacity .15s; }
.hsb-cal-grid.is-loading { opacity: .45; }
.hsb-row { display: grid; grid-template-columns: 4.6rem repeat(var(--hsb-cols, 3), minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; align-items: stretch; }
.hsb-slot-label { text-align: center; font-size: .85rem; font-weight: 700; padding-bottom: .15rem; }
.hsb-day { display: flex; flex-direction: column; justify-content: center; font-size: .85rem; line-height: 1.25; }
.hsb-day b { font-size: 1rem; }
.hsb-day.is-today { color: var(--hsb-lake); }
.hsb-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-height: 3.5rem; padding: .35rem .3rem; border: 2px solid transparent; border-radius: 10px; background: var(--hsb-free); color: var(--hsb-wood); font: inherit; line-height: 1.2; text-align: center; cursor: pointer; transition: transform .1s, box-shadow .15s, border-color .15s; }
.hsb-cell b { font-size: .92rem; }
.hsb-cell small { font-size: .74rem; opacity: .85; }
.hsb-cell:not(:disabled):hover { border-color: var(--hsb-lake); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(59, 42, 32, .12); }
.hsb-cell.is-free { background: var(--hsb-free); border-color: #b9d9c9; }
.hsb-cell.is-pending { background: repeating-linear-gradient(135deg, #f8e3b4, #f8e3b4 8px, #f3d596 8px, #f3d596 16px); border-color: #e0b55c; }
.hsb-cell.is-open { background: #fff; border-color: var(--hsb-lake); border-style: dashed; color: var(--hsb-lake); }
.hsb-cell.is-private, .hsb-cell.is-full { background: var(--hsb-cedar); color: #fff; cursor: not-allowed; }
.hsb-cell.is-busy { background: var(--hsb-busy); color: #fff; cursor: not-allowed; }
.hsb-cell.is-closed { background: #f1ede6; color: #b5a99a; cursor: default; min-height: 2.2rem; }
.hsb-cell:disabled { opacity: 1; }
.hsb-cell.is-selected { background: var(--hsb-lake); border: 2px solid var(--hsb-lake); color: #fff; box-shadow: 0 0 0 3px rgba(47, 111, 106, .25); }
.hsb-cell.is-selected b::before { content: "✓ "; }
.hsb-cell:focus-visible { outline: 2px solid var(--hsb-wood); outline-offset: 2px; }
.hsb-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem 1rem; list-style: none; margin: .9rem 0 0; padding: .75rem 0 0; border-top: 1px solid var(--hsb-line); font-size: .85rem; }
.hsb-legend li { display: flex; gap: .45rem; align-items: flex-start; }
.hsb-dot { display: inline-block; flex: none; width: 1rem; height: 1rem; margin-top: .15rem; border-radius: 4px; border: 2px solid transparent; }
.hsb-dot.is-free { background: var(--hsb-free); border-color: #b9d9c9; }
.hsb-dot.is-pending { background: repeating-linear-gradient(135deg, #f8e3b4, #f8e3b4 3px, #e9c26f 3px, #e9c26f 6px); border-color: #e0b55c; }
.hsb-dot.is-open { background: #fff; border: 2px dashed var(--hsb-lake); }
.hsb-dot.is-private { background: var(--hsb-cedar); }
.hsb-dot.is-busy { background: var(--hsb-busy); }
.hsb-dot.is-selected { background: var(--hsb-lake); }

/* Private or open sauna */
.hsb-privacy { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.hsb-privacy legend { padding: 0; margin-bottom: .4rem; font-size: .92rem; font-weight: 600; }
.hsb-choice { position: relative; display: block; cursor: pointer; }
.hsb-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.hsb-choice-box { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .8rem 1rem; background: #fff; border: 2px solid var(--hsb-line); border-radius: 10px; }
.hsb-choice-box small { font-size: .82rem; opacity: .8; }
.hsb-choice input:checked + .hsb-choice-box { border-color: var(--hsb-lake); background: #eef6f3; box-shadow: 0 0 0 3px rgba(47, 111, 106, .18); }
.hsb-choice input:checked + .hsb-choice-box b::before { content: "✓ "; color: var(--hsb-lake); }
.hsb-choice input:disabled + .hsb-choice-box { opacity: .45; }
.hsb-choice input:focus-visible + .hsb-choice-box { outline: 3px solid var(--hsb-cedar); outline-offset: 2px; }
.hsb-join-note { grid-column: 1 / -1; margin: 0; padding: .6rem .9rem; background: #eef6f3; border-left: 4px solid var(--hsb-lake); border-radius: 6px; font-size: .9rem; }
.hsb-people-note { font-weight: 400; opacity: .75; }

/* Form */
.hsb-summary { margin: 0 0 1rem; padding: .7rem 1rem; background: #eef6f3; border-left: 4px solid var(--hsb-lake); border-radius: 6px; font-weight: 600; }
.hsb-summary:empty { display: none; }
.hsb-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 1rem; }
.hsb-field { display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; font-weight: 600; }
.hsb-field-wide { grid-column: 1 / -1; }
.hsb-field input, .hsb-field select, .hsb-field textarea { width: 100%; padding: .65rem .75rem; background: #fff; color: var(--hsb-wood); border: 1px solid #c9bcab; border-radius: 8px; font: inherit; font-weight: 400; font-size: 1rem; }
.hsb-field input:focus, .hsb-field select:focus, .hsb-field textarea:focus { outline: 2px solid var(--hsb-lake); outline-offset: 1px; border-color: var(--hsb-lake); }
.hsb-accept { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.hsb-accept input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; flex: none; accent-color: var(--hsb-lake); }
.hsb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hsb-error { margin: 1rem 0 0; padding: .75rem 1rem; background: #fbe9e4; border-left: 4px solid #b3402a; border-radius: 6px; color: #7a2314; font-weight: 600; }
.hsb-submit { display: inline-block; margin-top: 1.1rem; padding: .85rem 1.6rem; background: var(--hsb-cedar); color: #fff !important; border: 0; border-radius: 999px; font: inherit; font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer; }
.hsb-submit:hover { background: var(--hsb-wood); }
.hsb-submit:disabled { opacity: .6; cursor: wait; }
.hsb-submit.hsb-danger { background: #b3402a; }
.hsb-done { padding: 1.5rem; background: #eef6f3; border: 1px solid #bcd9cf; border-radius: 12px; }
.hsb-done h3 { margin-top: 0; }
.hsb-details { list-style: none; padding: 1rem; margin: 1rem 0; background: #fff; border: 1px solid var(--hsb-line); border-radius: 10px; }

@media (max-width: 600px) {
	.hsb-saunas { grid-template-columns: 1fr; }
	.hsb-sauna-box { flex-direction: row; align-items: center; flex-wrap: wrap; gap: .25rem .75rem; padding: .8rem 1rem; }
	.hsb-sauna-check { margin-left: auto; }
	.hsb-fields { grid-template-columns: 1fr; }
	.hsb-cal { padding: .5rem; }
	.hsb-submit { width: 100%; text-align: center; }
}

/* Pick a sauna on the photo */
.hsb-picker { position: relative; margin: 0 0 .75rem; border-radius: 12px; overflow: hidden; background: #17110d; line-height: 0; }
.hsb-picker img { display: block; width: 100%; height: auto; }
.hsb-spot { position: absolute; margin: 0; border: 3px solid transparent; border-radius: 46% 46% 10% 10% / 38% 38% 8% 8%; cursor: pointer; line-height: 1.2; transition: background .15s, box-shadow .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.hsb-spot:hover { background: rgba(255, 255, 255, .16); }
.hsb-spot.is-active { border: 3px solid #f6c36b; background: rgba(246, 195, 107, .2); box-shadow: 0 0 0 4px rgba(246, 195, 107, .3), 0 0 34px rgba(246, 195, 107, .75); }
.hsb-spot-tag { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px); padding: .25rem .7rem; border-radius: 999px; background: rgba(35, 24, 18, .88); color: #fff; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.hsb-spot.is-active .hsb-spot-tag { background: #f6c36b; color: #3b2a20; }
.hsb-spot.is-active .hsb-spot-tag::before { content: "✓ "; }
@media (max-width: 600px) {
	.hsb-spot-tag { font-size: .7rem; padding: .15rem .45rem; transform: translate(-50%, -3px); }
	.hsb-picker + .hsb-saunas { grid-template-columns: repeat(3, 1fr); gap: .4rem; }
	.hsb-picker + .hsb-saunas .hsb-sauna-box { flex-direction: column; align-items: flex-start; padding: .6rem .65rem; gap: .1rem; }
	.hsb-picker + .hsb-saunas .hsb-sauna-name { font-size: 1rem; }
	.hsb-picker + .hsb-saunas .hsb-sauna-cap { font-size: .75rem; }
	.hsb-picker + .hsb-saunas .hsb-sauna-check { display: none; }
}

@media (max-width: 600px) {
	.hsb-row { grid-template-columns: 3.1rem repeat(var(--hsb-cols, 3), minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
	.hsb-day { font-size: .72rem; }
	.hsb-day b { font-size: .9rem; }
	.hsb-slot-label { font-size: .72rem; }
	.hsb-cell { min-height: 3.6rem; padding: .3rem .15rem; }
	.hsb-cell b { font-size: .8rem; }
	.hsb-cell small { font-size: .66rem; }
	.hsb-legend { grid-template-columns: 1fr; }
	.hsb-privacy { grid-template-columns: 1fr; }
}

/* Admin decision page opened from the email */
.hsb-admin-form { margin-top: 1rem; }
.hsb-admin-buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.hsb-submit.hsb-ok { background: var(--hsb-lake); }
.hsb-submit.hsb-ghost { background: #fff; color: var(--hsb-wood) !important; box-shadow: inset 0 0 0 2px var(--hsb-line); }
.hsb-submit.hsb-ghost:hover { background: var(--hsb-paper); }
.hsb-details li { padding: .15rem 0; }

/* Statistics: [harku_statistika] */
.hsb-stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.hsb-stat { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1rem; background: #fff; border-radius: 14px; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.hsb-stat b { font-size: 2.2rem; line-height: 1.1; color: var(--hsb-lake); font-variant-numeric: tabular-nums; }
.hsb-stat span { font-size: .9rem; line-height: 1.3; }
.hsb-stat-details { margin-top: 1rem; padding: .8rem 1rem; background: #fff; border-radius: 12px; }
.hsb-stat-details summary { cursor: pointer; font-weight: 700; }
.hsb-stat-details table { width: 100%; margin-top: .7rem; border-collapse: collapse; font-size: .95rem; }
.hsb-stat-details th, .hsb-stat-details td { padding: .4rem .5rem; border-bottom: 1px solid var(--hsb-line); text-align: right; font-weight: 400; }
.hsb-stat-details th:first-child { text-align: left; }
.hsb-stat-details thead th, .hsb-stat-year th, .hsb-stat-year td { font-weight: 700; }
.hsb-stat-year { background: var(--hsb-paper); }
.hsb-stat-note { margin: .8rem 0 0; font-size: .82rem; opacity: .8; text-align: center; }
.hs-band .hsb-stat-note { color: #fff; }
@media (max-width: 700px) { .hsb-stat-tiles { grid-template-columns: repeat(2, 1fr); } .hsb-stat b { font-size: 1.8rem; } }
.hsb-stat-repeat { margin: 1rem 0 0; padding: .8rem 1rem; background: #fff; border-radius: 12px; text-align: center; }
.hsb-stat-repeat b { color: var(--hsb-lake); font-size: 1.15em; }

/* Winter swimmers only */
.hsb-sauna-members { align-self: flex-start; margin-top: .2rem; padding: .1rem .5rem; border-radius: 999px; background: #f8e3b4; color: #5b3d00; font-size: .74rem; font-weight: 700; line-height: 1.4; }
.hsb-sauna-members.is-all { background: var(--hsb-free); color: #1f4f3a; }
.hsb-members-note { margin: 0 0 .7rem; padding: .7rem 1rem; background: #f8e3b4; border-left: 4px solid #e0b55c; border-radius: 6px; font-size: .92rem; }
.hsb-code-field small { font-weight: 400; opacity: .8; }
