/*
Theme Name: Haapsalu Elekter
Theme URI: https://haapsaluelekter.ee
Author: Haapsalu Elekter UÜ
Description: Eesti keeles koduleht Haapsalu Elekter UÜ-le. Sama logo ja värvid mis Facebooki lehel.
Version: 1.39.7
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: haapsalu-elekter
*/

:root {
  --bg: #f4f8fb;
  --ink: #072447;
  --muted: #4d647c;
  --card: #ffffff;
  --line: #d7e4ef;
  --blue: #0551af;
  --blue-deep: #042a63;
  --cyan: #3ec4d6;
  --danger: #8f3d2b;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1140px, calc(100% - 2rem)); margin: 0 auto; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.03em; line-height: 1.08; margin: 0.4rem 0 0; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }

.topbar { background: var(--blue-deep); color: white; font-size: 0.88rem; overflow: hidden; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; }
.topbar a { color: var(--cyan); text-decoration: none; font-weight: 650; }
.ticker { overflow: hidden; flex: 1; min-width: 0; }
.ticker-track { display: flex; gap: 1.6rem; width: max-content; animation: he-ticker 48s linear infinite; }
.ticker-item { white-space: nowrap; }
.ticker-item a { color: white; font-weight: 560; }
.ticker-item a:hover { color: var(--cyan); }
.ticker-item::before { content: "·"; margin-right: 1.6rem; color: var(--cyan); }
@keyframes he-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.update-screen { min-height: 100vh; display: grid; align-items: center; padding: 2.5rem 0; }
.update-card { background: white; border: 1px solid var(--line); border-radius: 1.4rem; padding: clamp(1.4rem, 3vw, 2.4rem); }
.update-card h1 { max-width: 16ch; }
.update-timer { margin: 1.3rem 0 0; }
.update-timer strong { display: block; margin-top: 0.25rem; color: var(--blue); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 750; letter-spacing: -0.04em; line-height: 1.15; }
.update-stat { margin: 0.55rem 0 0; color: var(--muted); max-width: 40rem; }
.update-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.update-grid section { background: var(--bg); border-radius: 1rem; padding: 1.1rem 1.2rem; }
.update-grid h2 { font-size: 1.15rem; margin: 0 0 0.6rem; }
.update-clock .price-figure { font-size: clamp(2rem, 4vw, 3rem); margin: 0.2rem 0; }
@media (max-width: 720px) {
  .update-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.6rem; gap: 1rem; }
.header-tools { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand img { width: 2.7rem; height: 2.7rem; border-radius: 0.7rem; }
.brand small { display: block; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.68rem; color: var(--muted); }
.brand strong { font-size: 1.2rem; font-weight: 700; }
.nav { display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex: 1; }
.nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 560; }
.nav a:hover { color: var(--blue); }
.call, .button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan);
  color: var(--blue-deep);
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button.light { background: white; color: var(--blue); }
.mobile-only { display: none; }
.menu-toggle { display: none; background: white; border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.8rem; }

.hero-wrap { background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%); }
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; padding: 4.2rem 0 2rem; }
.kicker { letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); font-size: 0.75rem; font-weight: 700; margin: 0; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 38rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.hero-visual {
  position: relative;
  min-height: 26rem;
  border-radius: 2rem;
  background: linear-gradient(120deg, var(--cyan) 0 46%, var(--blue) 46% 100%);
  box-shadow: 0 24px 50px rgba(5, 81, 175, 0.18);
}
.hero-mark { position: absolute; inset: 0; display: grid; place-items: center; }
.hero-mark img, img.logo-lg { width: 11rem; height: 11rem; object-fit: cover; border-radius: 1.6rem; box-shadow: 0 16px 40px rgba(4, 42, 99, 0.25); }
.float-card {
  position: absolute;
  left: -1.4rem;
  bottom: 1.6rem;
  background: white;
  border-radius: 1.1rem;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 12px 30px rgba(7, 36, 71, 0.12);
}
.float-card strong { display: block; }
.float-card span { color: var(--muted); font-size: 0.9rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: -0.5rem;
}
.facts article {
  background: white;
  border-radius: 1.2rem;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 10px 30px rgba(7, 36, 71, 0.06);
}
.facts strong { display: block; color: var(--blue); font-size: 1.25rem; }
.facts span { color: var(--muted); font-size: 0.92rem; }

.price-board {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1.1rem;
  background: white;
  border-radius: 1.4rem;
  padding: 1.4rem 1.4rem 1.15rem;
  margin: 0 auto 1rem;
  box-shadow: 0 10px 30px rgba(7, 36, 71, 0.06);
}
.price-now, .price-day { width: min(100%, 40rem); }
.price-figure { margin: 0.2rem 0 0; color: var(--blue); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 750; letter-spacing: -0.04em; line-height: 1; }
.price-figure span { font-size: 1rem; letter-spacing: 0; font-weight: 650; }
.price-note, .price-vat, .price-source { color: var(--muted); margin: 0.35rem 0 0; }
.price-vat { color: var(--ink); font-weight: 650; }
.price-range { display: flex; justify-content: center; gap: 1.6rem; margin: 0 0 0.45rem; color: var(--muted); font-size: 0.88rem; }
.price-bars { display: flex; align-items: flex-end; gap: 3px; height: 7.5rem; }
.price-bars span { flex: 1; border-radius: 0.35rem 0.35rem 0.15rem 0.15rem; background: color-mix(in srgb, var(--cyan) 70%, white); min-height: 4px; }
.price-bars span.is-now { background: var(--blue); }
.price-source { font-size: 0.82rem; }

.section { padding: 4.2rem 0; }
.section-head { max-width: 38rem; margin-bottom: 1.6rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 1.4rem;
  padding: 1.4rem;
  text-decoration: none;
  min-height: 100%;
  box-shadow: 0 10px 30px rgba(7, 36, 71, 0.05);
}
.card:hover { transform: translateY(-3px); }
.icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--cyan) 28%, white);
  color: var(--blue);
  font-weight: 750;
}
.card p, .steps p, .about-panel p { color: var(--muted); }
.more { margin-top: auto; padding-top: 1rem; color: var(--blue); font-weight: 700; }

.band { background: var(--blue); color: white; }
.band .kicker, .cta .kicker { color: var(--cyan); }
.band p { color: color-mix(in srgb, white 78%, transparent); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin: 0; padding: 0; list-style: none; }
.num { font-size: 2rem; font-weight: 750; color: var(--cyan); margin: 0; }
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 2rem; align-items: center; }
.about-panel {
  background: linear-gradient(160deg, var(--cyan), var(--blue));
  color: white;
  border-radius: 2rem;
  min-height: 22rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}
.about-panel p { color: white; margin: 0.15rem 0; }
.checks { padding-left: 1.1rem; }
.checks li { margin: 0.4rem 0; }
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--blue-deep);
  color: white;
  border-radius: 1.8rem;
  padding: 2rem;
}
.cta p { color: color-mix(in srgb, white 75%, transparent); }

.panel { background: white; border-radius: 1.4rem; padding: 1.4rem; box-shadow: 0 10px 30px rgba(7, 36, 71, 0.05); }
.panel dt { color: var(--muted); font-size: 0.88rem; }
.panel dd { margin: 0 0 0.8rem; font-weight: 650; }
.list { list-style: none; margin: 2rem 0 0; padding: 0; }
.list a { display: grid; grid-template-columns: 16rem 1fr; gap: 1rem; padding: 1.2rem; margin-bottom: 0.7rem; text-decoration: none; background: white; border-radius: 1.2rem; }
.service-group { margin-top: 2.2rem; }
.service-group h2 { font-size: 1.6rem; }
.subcats { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin: 0.8rem 0 0; padding: 0; }
.subcats a { display: flex; flex-direction: column; gap: 0.25rem; background: white; border-radius: 1rem; padding: 0.9rem 1rem; text-decoration: none; min-height: 100%; }
.subcats span { color: var(--muted); font-size: 0.92rem; }
.points { padding-left: 1.1rem; }
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 2rem; }
.places { padding-top: 0; }
.places h3 { margin-top: 1.4rem; font-size: 1.15rem; }
.places p { color: var(--muted); }
.places-more { margin-top: 0.6rem; }
.places-more summary { cursor: pointer; color: var(--blue); font-weight: 700; }
.privacy .cookie-open {
  border: 0;
  padding: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
label { display: block; font-size: 0.92rem; margin-bottom: 0.3rem; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: white; border-radius: 0.8rem;
  padding: 0.7rem 0.8rem; font: inherit; color: inherit;
}
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.field { margin-bottom: 0.8rem; }
.notice { background: color-mix(in srgb, var(--cyan) 25%, white); border-radius: 0.8rem; padding: 0.8rem 1rem; }
.notice.error { background: #fde8e4; }
.hp,
.hp label,
.hp input {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
}
.sc-cart-wrapper,
.wp-block-surecart-slide-out-cart,
.wp-block-surecart-cart-icon,
.he-shop-off .widget_shopping_cart,
.he-shop-off .woocommerce-mini-cart,
.he-shop-off .woocommerce-cart-form,
.he-shop-off .wc-block-mini-cart,
.he-shop-off .wc-block-cart,
.he-shop-off .wc-block-checkout,
.he-shop-off .wp-block-woocommerce-mini-cart,
.he-shop-off .wp-block-woocommerce-cart,
.he-shop-off .wp-block-woocommerce-checkout { display: none !important; }
.map { width: 100%; height: 16rem; border: 0; border-radius: 1.2rem; margin-top: 1rem; }
.back { color: var(--muted); text-decoration: none; }

.site-footer { background: var(--blue-deep); color: white; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; padding: 3rem 0 1.5rem; }
.site-footer a { color: white; text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.site-footer img { width: 4.2rem; height: 4.2rem; border-radius: 0.9rem; }
.site-footer .muted, .site-footer p { color: color-mix(in srgb, white 78%, transparent); }
.legal { border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.82rem; color: color-mix(in srgb, white 65%, transparent); padding: 0.9rem 0 1.3rem; }
.legal a { color: white; }
.privacy h2, .service-page h2 { margin-top: 1.8rem; font-size: 1.35rem; }
.privacy p, .privacy li { max-width: 42rem; }
.privacy ul { margin: 0.4rem 0 1rem; padding-left: 1.2rem; }
.form-note { color: var(--muted); font-size: 0.92rem; }
.news-list { display: grid; gap: 0.8rem; margin: 1.2rem 0; }
.news-card { background: white; border-radius: 1.2rem; padding: 1.1rem 1.2rem; }
.news-card h2, .news-card h3 { margin-top: 0.2rem; }
.news-card a { text-decoration: none; }
.price { display: block; margin: 0.6rem 0 1rem; color: var(--blue); font-size: 1.35rem; }
.cart-link { text-decoration: none; font-weight: 700; color: var(--blue); white-space: nowrap; }
.cart-list { list-style: none; padding: 0; }
.cart-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; background: white; border-radius: 1rem; padding: 0.9rem 1rem; margin-bottom: 0.6rem; }
.cart-list form { display: flex; gap: 0.4rem; align-items: center; }
.cart-list input[type="number"] { width: 4.5rem; }
.cart-total { font-size: 1.25rem; font-weight: 750; color: var(--blue); }
.buy-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
.buy-row input[type="number"] { width: 5rem; }
.media-empty { display: grid; place-items: center; min-height: 220px; border-radius: 1rem; background: linear-gradient(120deg, var(--cyan), var(--blue)); color: white; font-weight: 700; text-decoration: none; }
.entry { margin-top: 1rem; }
.shop-grid form { margin-top: auto; }
.media img, .hero-photo img, .card img, .gallery img { width: 100%; height: auto; border-radius: 1rem; object-fit: cover; }
.media img, .card > a img { height: 220px; }
.hero-photo { margin: 1rem 0; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.entry img { max-width: 100%; height: auto; border-radius: 1rem; }
#he-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
#he-gallery span { position: relative; }
#he-gallery img { width: 90px; height: 90px; object-fit: cover; }
#he-gallery .he-remove { display: block; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: white; border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 0.8rem 1rem 1rem; }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 0.35rem; }
  .call.desktop { display: none; }
  .mobile-only { display: inline-flex; }
  .hero, .split, .contact-grid, .grid-2, .steps, .footer-grid, .facts, .list a, .subcats, .fields, .cta, .price-board { grid-template-columns: 1fr; }
  .cta { display: grid; }
  .hero-visual { min-height: 18rem; }
  .float-card { left: 1rem; }
  .topbar-inner { flex-direction: column; gap: 0.1rem; }
}

.cookie-dock { position: fixed; right: 1rem; bottom: 1rem; z-index: 80; width: min(28rem, calc(100% - 2rem)); }
.cookie-box {
  position: relative;
  background: white;
  color: var(--ink);
  border-radius: 0.7rem;
  box-shadow: 0 16px 40px rgba(4, 42, 99, 0.22);
  padding: 1.15rem 1.15rem 0.85rem;
}
.cookie-box h2 { font-size: 1.2rem; margin: 0 1.8rem 0.55rem 0; }
.cookie-box p, .cookie-prefs span { color: var(--muted); font-size: 0.92rem; margin: 0 0 0.9rem; }
.account-link, .account-trigger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 0; background: transparent; color: var(--ink);
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  min-height: 44px; padding: 0.2rem 0.15rem; white-space: nowrap;
}
.account-trigger .ui-icon:last-child { width: 1rem; height: 1rem; color: var(--muted); transform: rotate(90deg); }
.account-trigger[aria-expanded="true"] .ui-icon:last-child { transform: rotate(-90deg); }
.account-name { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.ui-icon { display: inline-flex; width: 1.35rem; height: 1.35rem; flex: 0 0 auto; }
.ui-icon svg { width: 100%; height: 100%; display: block; }
.account-backdrop { position: fixed; inset: 0; background: rgba(7, 20, 40, 0.28); z-index: 40; }
.account-panel {
  position: fixed; z-index: 41; top: 5.2rem; right: 1rem;
  width: min(24rem, calc(100vw - 2rem)); max-height: calc(100vh - 6.4rem); overflow: auto;
  background: white; border: 1px solid var(--line); border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(4, 42, 99, 0.16); padding: 0.85rem 0.85rem 1rem;
}
.account-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.account-logout { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; text-decoration: none; color: var(--blue); min-height: 44px; }
.account-kicker { margin: 0.8rem 0 0.45rem; color: var(--muted); font-size: 0.92rem; font-weight: 650; }
.account-row {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  text-align: left; border: 1px solid transparent; border-radius: 0.85rem;
  background: white; color: inherit; font: inherit; padding: 0.75rem 0.7rem;
  margin: 0 0 0.35rem; min-height: 4.2rem; cursor: pointer;
}
.account-row strong, .row-copy strong { display: block; font-size: 1rem; }
.account-row .row-copy span, .home-row .row-copy span, .quick-row .row-copy span { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.account-row.is-active { background: color-mix(in srgb, var(--cyan) 16%, white); border-color: color-mix(in srgb, var(--blue) 28%, white); }
.account-row.is-disabled { cursor: default; color: var(--muted); background: #f7f9fb; }
.account-row .ui-icon:last-child { margin-left: auto; color: var(--blue); }
.account-foot { display: grid; gap: 0.45rem; margin: 0.7rem 0 0; }
.account-foot .button { width: 100%; }
.account-quiet { text-align: center; color: var(--blue); font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.login-page { display: grid; justify-items: center; }
.login-dialog { border: 0; padding: 0; background: transparent; width: min(32rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; }
.login-dialog::backdrop { background: rgba(7, 20, 40, 0.45); }
.login-card { position: relative; width: min(32rem, 100%); background: white; border-radius: 1.1rem; padding: 1.5rem 1.4rem 1.2rem; box-shadow: 0 18px 50px rgba(4, 42, 99, 0.12); }
.login-card h1 { font-size: 1.45rem; text-align: center; margin: 0 1.5rem 1rem; font-weight: 600; }
.login-x { position: absolute; top: 0.55rem; right: 0.55rem; border: 0; background: transparent; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink); width: 44px; height: 44px; }
.account-panel .login-x { position: static; }
.login-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem 1.3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.login-tabs button { border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--muted); padding: 0.65rem 0.1rem; cursor: pointer; min-height: 44px; }
.login-tabs button[aria-selected="true"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
#he-google-button { min-height: 44px; display: flex; justify-content: center; }
.login-methods { display: grid; gap: 0.8rem; margin: 0.4rem 0 1.2rem; }
.login-methods article { border: 1px solid var(--line); border-radius: 0.9rem; padding: 0.85rem 1rem; background: white; }
.login-methods .button { margin-top: 0.7rem; }
.login-submit { width: 100%; background: var(--blue-deep); color: white; margin-top: 0.2rem; }
body.he-account { background: #fff; }
.section.portal { padding-top: 1.5rem; padding-bottom: 3.2rem; }
.portal.wrap { width: min(1220px, calc(100% - 2.4rem)); }
.portal-back { margin: 0 0 0.6rem; }
.portal-back a { display: inline-flex; align-items: center; gap: 0.2rem; text-decoration: none; font-weight: 700; color: var(--blue); min-height: 44px; }
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 0.4rem 0 1.35rem; }
.home-head h1 { font-size: clamp(2.4rem, 4vw, 3.15rem); margin: 0; letter-spacing: -0.04em; }
.home-sub { margin: 0.3rem 0 0; color: var(--muted); font-size: 1.05rem; }
.home-actions { display: flex; flex: 0 0 auto; flex-wrap: nowrap; justify-content: flex-end; gap: 0.65rem; }
.home-actions .button, .home-alert .button, .account-foot .button { gap: 0.4rem; }
.home-alert {
  display: flex; align-items: center; gap: 0.85rem;
  background: #fff8ea; border: 1px solid #f0e0b8; border-radius: 0.95rem;
  padding: 0.9rem 1rem; margin: 0 0 1.6rem;
}
.home-alert p { margin: 0; flex: 1; }
.home-alert .ui-icon { color: #9a5b00; }
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(190px, 1fr) minmax(200px, 1fr); gap: 1.5rem; align-items: start; }
.home-main, .home-links, .bill-card {
  background: white; border: 1px solid var(--line); border-radius: 1.05rem; overflow: hidden;
}
.home-row, .quick-row {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.05rem; min-height: 4.7rem;
  border-bottom: 1px solid var(--line); text-decoration: none; color: inherit;
}
.home-row:last-child, .quick-row:last-child { border-bottom: 0; }
.home-row:hover, .quick-row:hover, .account-row:hover { background: #f5f9fc; }
.account-row.is-disabled:hover { background: #f7f9fb; }
.home-row .ui-icon, .quick-row .ui-icon, .account-row .ui-icon { color: var(--blue); }
.home-row .ui-icon:last-child { margin-left: auto; width: 1.05rem; height: 1.05rem; color: var(--muted); }
.row-copy { min-width: 0; }
.bill-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.7rem 1.1rem 1.25rem; }
.bill-card.is-clear { background: #f4fbf7; }
.bill-card.is-open { background: #fffaf3; }
.bill-mark { width: 3.1rem; height: 3.1rem; border-radius: 999px; display: grid; place-items: center; margin-bottom: 0.85rem; }
.bill-mark.ok { background: #e5f6ec; color: #1c7c45; }
.bill-mark.warn { background: #fff1d6; color: #9a5b00; }
.bill-mark .ui-icon { width: 1.6rem; height: 1.6rem; color: inherit; }
.bill-card strong { font-size: 1.12rem; }
.bill-sum { margin: 0.45rem 0 0.15rem; font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; }
.bill-late { margin: 0; color: var(--muted); font-size: 0.92rem; }
.bill-link { display: inline-flex; align-items: center; gap: 0.15rem; margin-top: 0.85rem; color: var(--blue); font-weight: 700; text-decoration: none; min-height: 44px; }
.bill-link .ui-icon { width: 1rem; height: 1rem; }
.portal h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.portal .home-head h1 { font-size: clamp(2.4rem, 4vw, 3.15rem); margin: 0; letter-spacing: -0.04em; }
.portal .login-card h1 { font-size: 1.45rem; text-align: center; margin: 0 1.5rem 1rem; font-weight: 600; }
.portal h2 { font-size: 1.35rem; margin-top: 1.6rem; }
.portal .section { padding-top: 2rem; }
.portal-switch { margin: 0 0 1rem; }
.portal-switch label { display: block; font-weight: 700; margin: 0 0 0.35rem; }
.portal-switch select { width: 100%; max-width: 28rem; min-height: 44px; }
.portal-switch option:disabled { color: var(--muted); }
.portal-add-company { position: relative; z-index: 2; }
.portal-add-company .button { min-height: 44px; }
.portal-switch .button { min-height: 44px; margin-top: 0.45rem; }
.portal-add-company { margin: 0 0 1rem; }
.portal-add-company a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.portal-nav { display: flex; flex-wrap: wrap; gap: 0.45rem 0.9rem; margin: 0 0 1.2rem; }
.portal-nav a { text-decoration: none; font-weight: 700; color: var(--blue); }
.portal-nav a[aria-current="page"] { color: var(--blue-deep); border-bottom: 2px solid var(--cyan); }
.portal-drop { border: 1px dashed var(--blue); border-radius: 0.9rem; padding: 0.9rem; background: white; margin: 0.4rem 0 0.8rem; }
.portal-files { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0 0.8rem; }
.portal-files figure { margin: 0; width: 88px; }
.portal-files img { width: 88px; height: 88px; object-fit: cover; border-radius: 0.5rem; }
.portal-files button { display: block; margin-top: 0.2rem; border: 0; background: transparent; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.portal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 1rem 0 1.2rem; }
.portal-stats article, .portal-card {
  background: white;
  border-radius: 1.2rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 30px rgba(7, 36, 71, 0.05);
}
.portal-stats span, .portal-card span { display: block; color: var(--muted); font-size: 0.92rem; }
.portal-stats strong { display: block; color: var(--blue); font-size: 1.45rem; }
.portal-list { display: grid; gap: 0.7rem; }
.portal-card h3 { margin: 0.2rem 0; font-size: 1.2rem; }
.portal-card h3 a, .portal-card > a { text-decoration: none; }
.portal-card p { margin: 0.35rem 0; }
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.4rem 0 1rem; }
.type-option {
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  border: 1px solid var(--line); border-radius: 0.9rem; padding: 0.85rem; background: white; font-weight: 700; cursor: pointer;
}
.type-option:has(input:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--cyan) 24%, white); color: var(--blue); }
.portal [data-for][hidden], .portal [data-kind][hidden] { display: none !important; }
.sid-code { font-size: 2rem; letter-spacing: 0.2em; font-weight: 700; color: var(--blue); }
.sid-results { display: grid; gap: 0.45rem; margin: 0.6rem 0 1rem; }
.sid-hit { text-align: left; border: 1px solid var(--line); background: white; border-radius: 0.8rem; padding: 0.75rem 0.9rem; font: inherit; cursor: pointer; }
.portal-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.55rem; }
.portal-gallery a { display: block; background: white; border-radius: 0.9rem; overflow: hidden; }
.portal-gallery img { width: 100%; height: 140px; object-fit: cover; border-radius: 0; }
.portal-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.portal-docs li { background: white; border-radius: 1rem; padding: 0.85rem 1rem; }
.portal-docs a { font-weight: 700; color: var(--blue); }
.portal-docs span { display: block; color: var(--muted); font-size: 0.92rem; }
.he-lightbox { border: 0; border-radius: 1rem; padding: 1rem; max-width: min(920px, calc(100vw - 2rem)); background: white; color: var(--ink); }
.he-lightbox::backdrop { background: rgba(4, 42, 99, 0.72); }
.he-lightbox img { max-height: 75vh; margin: 0.4rem auto; }
.he-lightbox button { border: 0; background: transparent; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; }
.he-lightbox p { margin: 0.2rem 0 0; color: var(--muted); }
.portal-help {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: color-mix(in srgb, var(--cyan) 18%, white);
  border-radius: 0.9rem;
  color: var(--ink);
}
.portal-faq { display: grid; gap: 0.55rem; margin-top: 0.6rem; }
.portal-faq details {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(7, 36, 71, 0.05);
}
.portal-faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.95rem 1.1rem;
  min-height: 44px;
  line-height: 1.35;
}
.portal-faq summary::-webkit-details-marker { display: none; }
.portal-faq summary { list-style: none; }
.portal-faq summary::after { content: "+"; float: right; color: var(--blue); margin-left: 0.8rem; }
.portal-faq details[open] summary::after { content: "–"; }
.portal-faq details[open] summary { color: var(--blue-deep); }
.portal-faq .portal-faq-a { padding: 0 1.1rem 1rem; color: var(--muted); }
@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-head { flex-direction: column; align-items: stretch; }
  .home-actions { justify-content: flex-start; width: 100%; flex-wrap: wrap; }
  .home-actions .button { flex: 1 1 12rem; }
  .bill-card { order: -1; }
  .account-panel { top: 0; right: 0; width: min(24rem, 100%); height: 100vh; max-height: none; border-radius: 0; }
}
@media (max-width: 860px) {
  .portal-stats, .type-switch { grid-template-columns: 1fr; }
  .portal-nav { gap: 0.35rem 0.7rem; }
  .portal-faq summary { padding: 1rem 1rem; }
  .account-name { max-width: 6.2rem; }
  .header-tools { gap: 0.35rem; }
}

.cookie-x {
  position: absolute; top: 0.7rem; right: 0.7rem;
  width: 1.8rem; height: 1.8rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.cookie-actions button {
  flex: 1 1 6.4rem;
  border-radius: 0.35rem;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}
.cookie-accept, .cookie-save { background: var(--cyan); color: var(--blue-deep); border: 0; }
.cookie-deny, .cookie-view, .cookie-back { background: white; color: var(--ink); border: 1px solid #c5d0dc; }
.cookie-box a.cookie-privacy,
.cookie-box a.cookie-privacy:hover {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  color: var(--blue);
  font-size: 0.88rem;
}
.cookie-prefs ul { list-style: none; margin: 0 0 0.8rem; padding: 0; }
.cookie-prefs li { margin-bottom: 0.7rem; }
.cookie-prefs label { display: flex; align-items: center; gap: 0.45rem; font-weight: 700; margin: 0; }
.cookie-prefs input { width: auto; }
.cookie-prefs span { display: block; margin: 0.15rem 0 0 1.5rem; }
.companies-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 0 0 1.2rem;
}
.companies-head h1 { margin: 0; }
.companies-head .button { gap: 0.4rem; flex: 0 0 auto; }
.company-list { display: grid; gap: 0.8rem; }
.company-card h2 { margin: 0 0 0.2rem; font-size: 1.25rem; }
.company-card p { margin: 0.15rem 0; }
.company-status { font-weight: 700; }
.company-status.is-ok { color: #1c7c45; }
.company-status.is-wait { color: #9a5b00; }
.company-status.is-no { color: #9b2c2c; }
.company-card form { margin-top: 0.75rem; }
.portal-companies-link { margin-top: 1.4rem; }
@media (max-width: 860px) {
  .companies-head { flex-direction: column; align-items: flex-start; }
}

body.he-idle-open { overflow: hidden; }
.idle-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(7, 20, 40, 0.45);
}
.idle-modal {
  position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(28rem, calc(100vw - 2rem));
  background: white; border-radius: 1.1rem; padding: 1.5rem 1.4rem 1.3rem;
  box-shadow: 0 18px 50px rgba(4, 42, 99, 0.16);
}
.idle-modal[hidden], .idle-backdrop[hidden] { display: none; }
.idle-modal h2 { margin: 0 0 0.6rem; font-size: 1.45rem; text-align: center; }
.idle-modal p { margin: 0 0 0.7rem; color: var(--muted); text-align: center; }
.idle-kicker { color: var(--ink); font-weight: 700; }
.idle-label { margin-bottom: 0.15rem; font-size: 0.92rem; }
.idle-count {
  margin: 0 0 1.1rem; text-align: center;
  font-size: 3rem; font-weight: 650; letter-spacing: 0.04em; color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
}
.idle-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.idle-actions .button { flex: 1 1 10rem; justify-content: center; }
@media (max-width: 860px) {
  .idle-modal {
    left: 0; right: 0; top: auto; bottom: 0; transform: none;
    width: 100%; border-radius: 1.1rem 1.1rem 0 0;
    padding-bottom: calc(1.3rem + env(safe-area-inset-bottom));
  }
}

.legal .cookie-open {
  border: 0;
  cursor: pointer;
  font: inherit;
  background: none;
  color: white;
  padding: 0;
  text-decoration: underline;
}

.he-status { --he-status: var(--blue); }
.he-status-planned { --he-status: var(--cyan); }
.he-status-confirmed { --he-status: var(--blue); }
.he-status-in_progress { --he-status: var(--blue-deep); }
.he-status-done { --he-status: var(--muted); }
.he-status-cancelled { --he-status: var(--line); }
.he-status-mark {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--he-status);
  display: inline-block;
  vertical-align: middle;
}
.he-book { max-width: 100%; }
.he-book h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.he-book h2 { font-size: 1.25rem; }
.he-book-head p { color: var(--muted); margin-top: 0.35rem; }
.he-choices, .he-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.he-choice, .he-slot, .he-day, .he-nav {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 0.8rem;
  font: inherit;
  cursor: pointer;
  text-align: left;
  padding: 0.55rem 0.7rem;
}
.he-choice { display: flex; flex-direction: column; justify-content: center; }
.he-choice span, .he-day small { color: var(--muted); font-size: 0.78rem; }
.he-choice.is-on, .he-slot.is-on, .he-day.is-selected {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.he-choice.is-on span, .he-day.is-selected small { color: #fff; }
.he-step { margin: 1.2rem 0; }
.he-step label, .he-change label { display: block; font-weight: 650; margin: 0.6rem 0 0.25rem; }
.he-step input, .he-step select, .he-change textarea {
  width: 100%;
  max-width: 36rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.55rem 0.7rem;
  font: inherit;
}
.he-book-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 1.4rem; align-items: start; }
.he-month, .he-day-col { min-width: 0; }
.he-month-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.he-month-bar h2 { margin: 0; }
.he-nav { width: 44px; padding: 0; text-align: center; font-size: 1.4rem; }
.he-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.he-cal-head span { text-align: center; color: var(--muted); font-size: 0.8rem; font-weight: 650; }
.he-day { text-align: center; padding: 0.35rem 0.1rem; min-width: 0; }
.he-day.is-today { box-shadow: inset 0 0 0 2px var(--blue); }
.he-day.is-few { box-shadow: inset 0 -3px 0 var(--cyan); }
.he-day.is-full { background: #e7eef5; color: var(--muted); }
.he-day:disabled, .he-day.is-closed, .he-day.is-past { background: #eef3f7; color: var(--muted); cursor: not-allowed; }
.he-day:focus-visible, .he-slot:focus-visible, .he-choice:focus-visible, .he-nav:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.he-skel, .he-skel-line {
  display: block;
  min-height: 44px;
  border-radius: 0.7rem;
  background: linear-gradient(90deg, #e7eef5 0%, #f7fbfe 50%, #e7eef5 100%);
  background-size: 200% 100%;
}
.he-slots .he-slot { text-align: center; font-weight: 650; }
.he-book-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(244, 248, 251, 0), var(--bg) 35%);
}
.he-book-bar .button { width: 100%; }
.he-book-live { min-height: 1.4rem; color: var(--muted); }
.he-hold { font-weight: 650; color: var(--blue-deep); }
.he-summary { margin: 0.5rem 0 1rem; }
.he-summary div { margin: 0.45rem 0; }
.he-summary dt { color: var(--muted); font-size: 0.85rem; }
.he-summary dd { margin: 0; font-weight: 650; }
.he-success .he-check { font-size: 2.4rem; color: var(--blue); margin: 0; }
.he-next { margin: 0 0 1rem; }
.he-upcoming { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.he-quote { color: var(--muted); }
.required-note { margin: 0 0 0.85rem; color: var(--danger); font-size: 0.9rem; }
.req { color: var(--danger); font-weight: 700; text-decoration: none; }
.he-claim-form fieldset.field { border: 0; margin: 0 0 0.8rem; padding: 0; }
.he-claim-form legend { font-weight: 650; margin-bottom: 0.45rem; }
.he-form-summary {
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.8rem;
  background: #fde8e4;
  color: var(--danger);
  overflow-wrap: anywhere;
}
.he-form-summary[hidden] { display: none; }
.field.is-error,
.field.is-error input,
.field.is-error textarea,
.field.is-error select {
  scroll-margin-top: 6.5rem;
  scroll-margin-bottom: 4.5rem;
}
.field.is-error input,
.field.is-error textarea,
.field.is-error select {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}
fieldset.field.is-error { border: 1px solid var(--danger); border-radius: 0.8rem; padding: 0.7rem 0.8rem 0.2rem; }
.field-error { margin: 0.35rem 0 0; color: var(--danger); font-size: 0.92rem; overflow-wrap: anywhere; }
.he-file-picked { margin-top: 0.45rem; }
.he-file-picked[hidden] { display: none; }
.he-file-meta { margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.he-file-size { display: block; color: var(--muted); font-size: 0.9rem; }
.he-file-clear {
  min-height: 44px;
  margin-top: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: white;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.he-saved-file { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .he-claim-form .fields { grid-template-columns: 1fr; }
  .he-claim-form .button { width: 100%; }
}
@media (min-width: 900px) {
  .he-book-bar { position: static; background: none; padding-top: 1rem; }
  .he-book-bar .button { width: auto; }
}
@media (max-width: 899px) {
  .he-book-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 359px) {
  .he-choices, .he-slots { grid-template-columns: 1fr; }
}
