.hguide-launch {
  position: fixed;
  z-index: 32;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 4px 16px 4px 4px;
  border: 1px solid #8cab91;
  border-radius: 999px;
  background: #18392e;
  color: white;
  box-shadow: 0 4px 18px #102d222a;
  font: 600 15px/1.2 Golos, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
}
.hguide-launch img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #dae4d5; }

.hguide-dialog {
  --guide-ink: #18271f;
  --guide-muted: #526359;
  --guide-border: #cbd3c8;
  --guide-forest: #24583e;
  --guide-field: 46px;
  --guide-radius: 10px;
  --guide-pad: clamp(18px, 3vw, 32px);
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(696px, calc(100% - 32px));
  min-width: 0;
  max-width: none;
  height: fit-content;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - max(40px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 20px));
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--guide-border);
  border-radius: 18px;
  background: #f7f7f2;
  color: var(--guide-ink);
  box-shadow: 0 24px 85px #10291f38;
  font: 400 16px/1.45 Golos, "Segoe UI", Arial, sans-serif;
  text-align: start;
}
.hguide-dialog::backdrop { background: rgb(17 34 27 / 46%); }
.hguide-dialog[open] { display: block; }
.hguide-dialog *, .hguide-dialog *::before, .hguide-dialog *::after { box-sizing: border-box; }
.hguide-dialog [hidden] { display: none !important; }
.hguide-dialog .hguide-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: var(--guide-pad); }
.hguide-dialog .hguide-head {
  display: grid;
  position: static;
  grid-template-columns: minmax(0, 1fr) var(--guide-field);
  align-items: start;
  justify-content: stretch;
  gap: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.hguide-head > div { min-width: 0; }
.hguide-head small, .hguide-options small, .hguide-dialog .hguide-tip { color: var(--guide-muted); font-size: 13px; font-weight: 400; line-height: 1.4; }
.hguide-dialog h2, .hguide-dialog h3, .hguide-dialog p { margin: 0; letter-spacing: normal; overflow-wrap: anywhere; }
.hguide-dialog h2 { margin-top: 4px; color: var(--guide-ink); font: 500 clamp(24px, 3.5vw, 34px)/1.12 Georgia, "Times New Roman", serif; }
.hguide-dialog h3 { color: var(--guide-ink); font: 650 17px/1.3 Golos, "Segoe UI", Arial, sans-serif; }
.hguide-dialog button, .hguide-dialog .hguide-actions > a {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: var(--guide-field);
  margin: 0;
  padding: 10px 13px;
  border: 1px solid var(--guide-border);
  border-radius: var(--guide-radius);
  background: white;
  color: var(--guide-ink);
  appearance: none;
  font: 550 14px/1.35 Golos, "Segoe UI", Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
}
.hguide-dialog button:hover, .hguide-dialog .hguide-actions > a:hover { background: #edf2e9; border-color: #91a594; }
.hguide-dialog button:focus-visible, .hguide-dialog a:focus-visible, .hguide-dialog :is(textarea,input,select,summary):focus-visible, .hguide-launch:focus-visible { outline: 3px solid #5d8539; outline-offset: 2px; }
.hguide-dialog button:disabled { opacity: .6; cursor: wait; }
.hguide-dialog .hguide-primary { border-color: var(--guide-forest); background: var(--guide-forest); color: white; }
.hguide-dialog .hguide-primary:hover { border-color: #173d2c; background: #173d2c; }
.hguide-dialog .hguide-close {
  display: grid;
  place-items: center;
  justify-self: end;
  width: var(--guide-field);
  height: var(--guide-field);
  min-height: var(--guide-field);
  aspect-ratio: 1;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
  transform: none;
}
.hguide-dialog .hguide-icon { display: block; flex: none; width: 20px; height: 20px; margin: 0; }
.hguide-body { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: clamp(16px, 2.5vw, 26px); min-width: 0; }
.hguide-figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-self: start;
  gap: 4px;
  min-width: 0;
  padding: 0 7px 7px;
  border: 1px solid #dce3d8;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 40%, #f7f9ed, #e4ebdd);
  overflow: hidden;
}
.hguide-avatar { position: relative; width: 100%; height: 147px; }
.hguide-avatar :is(iframe,img) { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background: transparent; pointer-events: none; }
.hguide-avatar img { object-fit: contain; object-position: center; }
.hguide-avatar iframe, .hguide-avatar.is-live img { visibility: hidden; }
.hguide-avatar.is-live iframe { visibility: visible; }
.hguide-dialog .hguide-figure select { width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 6px 9px; border: 1px solid var(--guide-border); border-radius: 8px; background-color: #fff; color: var(--guide-ink); font: 500 14px/1.35 Golos, "Segoe UI", Arial, sans-serif; }
.hguide-pane, .hguide-form, .hguide-options, .hguide-results { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; min-width: 0; margin: 0; }
.hguide-options { grid-auto-rows: 1fr; gap: 8px; }
.hguide-dialog .hguide-options button { display: grid; grid-template-columns: 32px minmax(0, 1fr); justify-content: stretch; column-gap: 12px; min-height: 66px; padding: 10px 13px; text-align: start; }
.hguide-option-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #edf2e9; color: var(--guide-forest); }
.hguide-option-copy { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.hguide-option-copy strong { color: var(--guide-ink); font-size: 15px; font-weight: 650; }
.hguide-form label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; color: var(--guide-ink); font: 600 14px/1.4 Golos, "Segoe UI", Arial, sans-serif; }
.hguide-dialog textarea, .hguide-dialog input[type=file] { display: block; width: 100%; min-width: 0; max-width: 100%; margin: 0; border: 1px solid #99ac9b; border-radius: var(--guide-radius); background: white; color: var(--guide-ink); font: 400 16px/1.45 Golos, "Segoe UI", Arial, sans-serif; }
.hguide-dialog textarea { min-height: 100px; max-height: 250px; padding: 10px 12px; resize: vertical; }
.hguide-dialog input[type=file] { min-height: var(--guide-field); padding: 7px; font-size: 14px; }
.hguide-dialog input[type=file]::file-selector-button { min-height: 30px; padding: 4px 8px; border: 1px solid var(--guide-border); border-radius: 6px; background: #f1f4ed; color: var(--guide-ink); }
.hguide-dialog details { min-width: 0; border-top: 1px solid var(--guide-border); }
.hguide-dialog details summary { display: list-item; min-height: 44px; padding: 11px 0; font-size: 14px; font-weight: 550; cursor: pointer; }
.hguide-dialog [role=status]:empty { display: none; }
.hguide-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: 8px; min-width: 0; }
.hguide-actions > * { min-width: 0; }
.hguide-results article { display: grid; gap: 8px; min-width: 0; padding-top: 12px; border-top: 1px solid var(--guide-border); background: transparent; }
.hguide-results h3 a { color: var(--guide-forest); text-decoration: underline; text-underline-offset: 2px; }
.hguide-results article > p { color: var(--guide-muted); font-size: 14px; }
@media (max-width: 560px) {
  .hguide-dialog { --guide-pad: clamp(13px, 4vw, 20px); width: calc(100% - 20px); max-height: calc(100vh - 24px); max-height: calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 12px)); border-radius: 14px; }
  .hguide-dialog .hguide-shell { gap: 14px; }
  .hguide-body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hguide-figure { grid-template-columns: 57px minmax(0, 106px); column-gap: 12px; justify-content: start; align-items: center; padding: 0 12px 0 4px; border-radius: 10px; }
  .hguide-avatar { height: 59px; }
  .hguide-dialog .hguide-options button { min-height: 60px; }
  .hguide-launch { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); font-size: 14px; }
}
@media (max-width: 460px) { .hguide-actions { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .hguide-dialog, .hguide-launch { scroll-behavior: auto; } }
.hguide-dialog .hguide-criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hguide-criteria li { min-width: 0; max-width: 100%; }
.hguide-criteria li:not(:has(button)) {
  padding: 5px 9px;
  border-radius: 7px;
  background: #eaf0e6;
  color: var(--guide-ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.hguide-dialog .hguide-criteria button { gap: 8px; padding-inline: 10px; font-size: 14px; }
.hguide-dialog .hguide-criteria button svg { width: 15px; height: 15px; }
.hguide-results details ul { display: grid; gap: 5px; margin: 0 0 10px; padding-inline-start: 20px; font-size: 14px; }
.hguide-compare-toggle, .hguide-comparison {
  position: fixed; z-index: 31; right: max(16px, env(safe-area-inset-right));
  box-sizing: border-box; color: #20392d; background: #fff; border: 1px solid #a9b9a9;
  font: 500 15px/1.4 Golos, "Segoe UI", Arial, sans-serif;
}
.hguide-compare-toggle { min-height: 46px; bottom: max(72px, calc(env(safe-area-inset-bottom) + 62px)); border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.hguide-comparison {
  z-index: 33; bottom: max(72px, calc(env(safe-area-inset-bottom) + 62px)); width: min(32rem, calc(100vw - 32px));
  max-height: min(68dvh, 38rem); overflow: auto; overscroll-behavior: contain; padding: 15px; border-radius: 15px; box-shadow: 0 10px 32px #18271f26;
}
.hguide-comparison[hidden], .hguide-comparison [hidden] { display: none; }
.hguide-comparison header { display: flex; position: static; inset: auto; justify-content: space-between; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; }
.hguide-comparison h2 { margin: 0; font: 600 21px/1.2 Golos, "Segoe UI", sans-serif; }
.hguide-comparison button, .hguide-compare-bottom a, .hguide-comparison [data-login] { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 5px; padding: 7px 11px; border: 1px solid #b8c6b8; border-radius: 9px; background: #fff; color: #24533e; font: inherit; text-decoration: none; cursor: pointer; }
.hguide-comparison button[aria-pressed=true] { color: #fff; background: #24533e; }
.hguide-comparison [data-hide] { width: 46px; height: 46px; padding: 0; border-radius: 50%; }
.hguide-table-scroll { margin: 10px 0; overflow: auto; scrollbar-gutter: stable; }
.hguide-comparison table { border-collapse: separate; border-spacing: 0; margin: 0; min-width: 100%; font-size: 14px; }
.hguide-comparison th, .hguide-comparison td { padding: 8px; text-align: start; vertical-align: top; background: #fff; border: 0; border-bottom: 1px solid #dce4db; white-space: normal; }
.hguide-comparison td, .hguide-comparison th[scope=col]:not(:first-child) { min-width: 8.5rem; overflow-wrap: anywhere; }
.hguide-comparison th:first-child { position: sticky; left: 0; max-width: 6.8rem; min-width: 5rem; background: #f1f4ed; }
.hguide-comparison th a { color: #24533e; text-underline-offset: .2em; }
.hguide-compare-bottom { display: flex; flex-wrap: wrap; gap: 8px; }
.hguide-comparison [data-login] { margin-top: 8px; }
.hguide-comparison [role=status] { margin: 6px 0 0; font-size: 14px; }
.hguide-comparison [role=status]:empty { display:none; }
@media (max-width: 560px) { .hguide-comparison { right: 10px; width: calc(100vw - 20px); max-height: 62dvh; padding: 10px; } .hguide-compare-toggle { right: 12px; } }
.hguide-dialog [hidden] { display: none; }
