/* Homix live screens: calendar, routine, fees, subscription. Uses the tokens from style.css. */
.hx-state { text-align: center; padding: 34px 16px; color: var(--muted); }
.hx-state p { margin: 0 0 12px; }
.hx-spin { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 12px; animation: hx-spin .8s linear infinite; }
@keyframes hx-spin { to { transform: rotate(360deg); } }
.hx-muted { color: var(--muted); font-size: 14px; margin: 8px 0; }
.hx-btn { border: 0; border-radius: 14px; padding: 12px 20px; font-weight: 700; background: var(--primary-dark); color: #fff; cursor: pointer; }
.hx-btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.hx-btn.wide { width: 100%; margin-top: 14px; padding: 15px; background: var(--primary); }
.hx-btn:disabled { opacity: .6; cursor: default; }
.hx-pill { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.hx-pill.solid { background: var(--primary); border-color: var(--primary); color: #fff; }

/* child chooser + segmented tabs */
.hx-kids, .hx-seg { display: flex; gap: 6px; background: var(--surface-soft); padding: 4px; border-radius: 14px; margin-bottom: 12px; }
.hx-kids button, .hx-seg button { flex: 1; border: 0; background: transparent; border-radius: 11px; padding: 9px 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.hx-kids button.on, .hx-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(25, 30, 35, .08); }

/* routine */
.hx-weeknav, .hx-calnav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.hx-weeknav span { flex: 1; text-align: center; font-weight: 700; font-size: 14px; }
.hx-weeknav > button:not(.hx-pill), .hx-calnav > button:not(.hx-pill) { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 20px; line-height: 1; cursor: pointer; }
.day-selector .day { position: relative; }
.day-selector .day.is-today:not(.active) small { color: var(--primary); }
.hx-pip { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.hx-pip.chg { background: var(--warning); }
.hx-dayhead { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 12px; }
.hx-banner { border-radius: 16px; padding: 16px; background: var(--surface-soft); display: grid; gap: 2px; margin-bottom: 12px; }
.hx-banner span { color: var(--muted); font-size: 14px; }
.hx-banner.holiday, .hx-banner.off { background: #fbecec; color: #8e3030; }
.hx-banner.holiday span, .hx-banner.off span { color: #a85a5a; }
.hx-banner.chg { background: #fbf1df; color: #8a5a10; }
.hx-banner.chg span { color: #a07a35; }
.hx-now, .hx-next { font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.hx-now { background: var(--primary); color: #fff; }
.hx-next { background: var(--surface-soft); color: var(--muted); }

/* calendar */
.hx-monthpick { flex: 1; position: relative; text-align: center; font-weight: 800; font-size: 17px; cursor: pointer; }
.hx-monthpick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.hx-chips { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.hx-chips button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; cursor: pointer; }
.hx-chips button.on { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.hx-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; touch-action: pan-y; }
.hx-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 0 6px; }
.hx-cell { aspect-ratio: 1 / 1.05; border: 1.5px solid transparent; background: transparent; border-radius: 12px; display: grid; align-content: center; justify-items: center; gap: 3px; cursor: pointer; padding: 0; color: var(--text); }
.hx-cell b { font-size: 14px; font-weight: 600; }
.hx-cell.wk b { color: var(--muted); }
.hx-cell.wk { background: var(--surface-soft); }
.hx-cell.today b { color: var(--primary); font-weight: 800; }
.hx-cell.today { border-color: var(--primary); }
.hx-cell.sel { background: var(--primary-dark); }
.hx-cell.sel b { color: #fff; }
.hx-cell span { display: flex; gap: 3px; min-height: 6px; }
.hx-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); margin-right: 5px; }
.hx-cell .hx-dot { margin: 0; }
.hx-dot.holiday { background: var(--danger); }
.hx-dot.exam { background: var(--warning); }
.hx-dot.event { background: #3d7fb0; }
.hx-dot.off, .hx-dot.changed { background: #8a8f94; }
.hx-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin: 10px 2px 14px; }
.hx-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; display: grid; gap: 8px; }
.hx-ev { display: grid; gap: 1px; border-left: 4px solid var(--primary); background: var(--surface-soft); border-radius: 4px 12px 12px 4px; padding: 10px 12px; text-align: left; border-top: 0; border-right: 0; border-bottom: 0; width: 100%; font: inherit; color: inherit; }
button.hx-ev { cursor: pointer; margin-top: 8px; }
.hx-ev span { font-size: 13px; color: var(--muted); }
.hx-ev small { font-size: 13px; color: var(--text); }
.hx-ev.holiday { border-left-color: var(--danger); }
.hx-ev.exam { border-left-color: var(--warning); }
.hx-ev.event { border-left-color: #3d7fb0; }
.hx-ev.off, .hx-ev.changed { border-left-color: #8a8f94; }
.hx-monthlist h4, .hx-h { margin: 18px 2px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* fees */
.hx-feehead .hx-who { margin: 0 2px 12px; color: var(--muted); font-size: 14px; }
.hx-feehero { background: var(--primary-dark); color: #fff; border-radius: 22px; padding: 22px; margin-bottom: 8px; }
.hx-feehero small { opacity: .7; font-weight: 600; }
.hx-feehero strong { display: block; font-size: 38px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 4px; }
.hx-feehero p { margin: 0 0 14px; opacity: .8; font-size: 14px; }
.hx-feehero.clear strong { color: #7fe0b3; }
.hx-feehero.late strong { color: #ffb3a8; }
.hx-bar { height: 8px; background: rgba(255, 255, 255, .18); border-radius: 99px; overflow: hidden; }
.hx-bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.hx-barlab { display: flex; justify-content: space-between; font-size: 12px; opacity: .75; margin-top: 6px; }
.hx-rows { display: grid; gap: 8px; }
.hx-row { display: flex; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; text-align: left; font: inherit; color: inherit; width: 100%; }
.hx-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.hx-row span, .hx-row small { font-size: 13px; color: var(--muted); }
.hx-row.pay { cursor: pointer; }
.hx-row.void { opacity: .55; text-decoration: line-through; }
.hx-row ul { list-style: none; padding: 8px 0 0; margin: 6px 0 0; border-top: 1px dashed var(--border); display: grid; gap: 4px; font-size: 13px; color: var(--text); }
.hx-row li { display: flex; justify-content: space-between; gap: 12px; }
.hx-amt { font-weight: 800; white-space: nowrap; text-align: right; display: grid; gap: 4px; align-content: start; justify-items: end; }
.hx-amt.ok { color: var(--success); font-weight: 700; }
.hx-tag { font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; background: var(--surface-soft); color: var(--muted); }
.hx-tag.bad { background: #fbecec; color: #a13b3b; }
.hx-tag.warn { background: #fbf1df; color: #8a5a10; }
.hx-paid { margin-top: 16px; }
.hx-paid summary { cursor: pointer; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.hx-foot { font-size: 12px; color: var(--muted); text-align: center; margin: 20px 8px 0; }
.hx-homefee { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 22px; text-align: left; cursor: pointer; box-shadow: var(--shadow); color: var(--text); }
.hx-homefee small { display: block; color: var(--muted); font-weight: 600; }
.hx-homefee strong { font-size: 18px; }
.hx-homefee span { color: var(--primary); font-weight: 700; white-space: nowrap; }
.hx-homefee.late strong { color: var(--danger); }
.hx-homefee.clear strong { color: var(--success); }

/* locked */
.hx-lock { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); min-height: 220px; }
.hx-lock-teaser { padding: 16px; display: grid; gap: 10px; filter: blur(5px); opacity: .55; pointer-events: none; }
.hx-fk { height: 70px; border-radius: 14px; background: var(--surface-soft); }
.hx-fk.s { height: 46px; }
.hx-lock-body { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 18px; background: linear-gradient(transparent, rgba(255, 255, 255, .88) 35%); }
.hx-lock-body h3 { margin: 0; font-size: 18px; }
.hx-lock-body p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.hx-lock-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--primary-dark); display: grid; place-items: center; }
.hx-lock-icon svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* subscription screen */
body.hp-open { overflow: hidden; }
#homixPlan { position: fixed; inset: 0; z-index: 200; background: var(--background); overflow-y: auto; -webkit-overflow-scrolling: touch; }
#homixPlan[hidden] { display: none; }
.hp-wrap { max-width: 520px; margin: 0 auto; padding: 20px 16px 48px; position: relative; }
.hp-close { position: sticky; top: 8px; float: right; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 15px; }
.hp-hero { background: var(--primary-dark); color: #fff; border-radius: 24px; padding: 26px 22px; margin-bottom: 14px; }
.hp-hero small { letter-spacing: .14em; font-weight: 800; color: var(--primary); }
.hp-price { font-size: 58px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 6px 0 8px; }
.hp-price span { font-size: 17px; font-weight: 600; opacity: .7; letter-spacing: 0; }
.hp-hero p { margin: 0; opacity: .85; line-height: 1.5; }
.hp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.hp-card h3 { margin: 0 0 14px; font-size: 17px; }
.hp-status { border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; display: grid; gap: 2px; font-size: 14px; }
.hp-status.ok { background: #e6f4ed; color: #1d6b4a; }
.hp-status.wait { background: #fbf1df; color: #8a5a10; }
.hp-status.old { background: #fbecec; color: #8e3030; }
.hp-values { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.hp-values li { display: flex; gap: 12px; }
.hp-values p { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.hp-tick { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #e6f4ed; display: grid; place-items: center; margin-top: 1px; }
.hp-tick svg { width: 15px; height: 15px; fill: none; stroke: var(--success); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hp-one { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--border); text-align: center; font-weight: 700; color: var(--muted); font-size: 13px; }
.hp-months { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp-months button { position: relative; border: 2px solid var(--border); background: var(--surface); border-radius: 16px; padding: 16px 12px 12px; display: grid; gap: 2px; text-align: center; cursor: pointer; color: var(--text); }
.hp-months button.on { border-color: var(--primary); background: #fdf3ec; }
.hp-months em { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: var(--primary); color: #fff; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.hp-months span { color: var(--muted); font-weight: 700; }
.hp-per { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.hp-step { display: flex; gap: 12px; padding: 4px 0 16px; }
.hp-step > span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-dark); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.hp-step > div { flex: 1; min-width: 0; }
.hp-meth { display: flex; gap: 6px; margin: 10px 0; }
.hp-meth button { flex: 1; border: 1.5px solid var(--border); background: var(--surface); border-radius: 12px; padding: 9px 4px; font-weight: 700; cursor: pointer; color: var(--text); }
.hp-meth button.on { border-color: var(--primary-dark); background: var(--primary-dark); color: #fff; }
.hp-num { display: flex; align-items: center; gap: 10px; background: var(--surface-soft); border-radius: 12px; padding: 10px 12px; }
.hp-num code { flex: 1; font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.hp-num button { border: 0; background: var(--primary-dark); color: #fff; border-radius: 9px; padding: 7px 14px; font-weight: 700; cursor: pointer; }
.hp-hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
#hpForm label { display: block; font-weight: 600; font-size: 14px; margin-top: 12px; }
#hpForm input { width: 100%; padding: 12px; margin-top: 4px; border: 1.5px solid var(--border); border-radius: 12px; font: inherit; background: var(--surface); color: var(--text); }
#hpForm input:focus { outline: none; border-color: var(--primary); }
.hp-err { color: var(--danger); font-size: 14px; min-height: 1.2em; margin-top: 6px; }
.hp-card.faq details { border-top: 1px solid var(--border); padding: 12px 0; }
.hp-card.faq details:first-of-type { border-top: 0; }
.hp-card.faq summary { cursor: pointer; font-weight: 700; }
.hp-card.faq p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) { .hx-spin { animation: none; } }