body.hops-active { overflow: hidden; }

dialog.hops-dialog {
  --hops-ink: #102c40;
  --hops-muted: #516777;
  --hops-line: #cbd9df;
  --hops-ice: #edf6f8;
  --hops-accent: #a7e3ee;
  width: min(32rem, calc(100% - 2rem));
  max-width: none;
  min-width: 0;
  max-height: min(90dvh, 52rem);
  margin: auto;
  padding: 0;
  box-sizing: border-box;
  color: var(--hops-ink);
  background: #fafdfe;
  color-scheme: light;
  border: 1px solid #e9f5f8;
  border-radius: 1.75rem;
  box-shadow: 0 2rem 6rem #041b3159;
  font: inherit;
  text-align: left;
  overflow-y: auto;
  overscroll-behavior: contain;
}
dialog.hops-dialog::backdrop { background: #071b2c95; backdrop-filter: blur(7px); }
.hops-dialog *, .hops-dialog *::before, .hops-dialog *::after { box-sizing: border-box; }
.hops-dialog [hidden] { display: none; }
.hops-dialog .hops-inner { padding: 1.55rem 2rem 2rem; }
.hops-dialog .hops-tools { display: flex; align-items: center; justify-content: space-between; margin: 0 0 1.6rem; }
.hops-dialog .hops-mark {
  width: 3.25rem; height: 3.25rem; display: grid; place-items: center;
  color: #184757; background: linear-gradient(138deg, #d8f1f4, #e8effa);
  border: 1px solid #c0e3e9; border-radius: 1rem;
}
.hops-dialog svg { width: 1.3rem; height: 1.3rem; display: block; pointer-events: none; }
.hops-dialog .hops-mark svg { width: 1.55rem; height: 1.55rem; }
.hops-dialog button, .hops-dialog input, .hops-dialog select {
  font: inherit; letter-spacing: inherit;
}
.hops-dialog button { cursor: pointer; }
.hops-dialog button:focus-visible, .hops-dialog input:focus-visible, .hops-dialog select:focus-visible {
  outline: 3px solid #266d83; outline-offset: 3px;
}
.hops-dialog .hops-close {
  display: grid; width: 2.8rem; height: 2.8rem; min-height: 44px; place-items: center; border-radius: 50%;
  margin: -.15rem -.4rem 0 0; padding: 0; border: 1px solid transparent; color: var(--hops-muted); background: transparent;
}
.hops-dialog .hops-close:hover { background: #e5eff2; color: var(--hops-ink); }
.hops-dialog .hops-demo {
  margin: 0 0 .5rem; color: #476977; font-size: .8rem; line-height: 1.2; font-weight: 650; letter-spacing: .035em;
}
.hops-dialog h2 {
  color: var(--hops-ink); font-family: inherit; font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 560; line-height: 1.1; margin: 0; letter-spacing: -.045em;
}
.hops-dialog h2:focus { outline: none; }
.hops-dialog .hops-description { margin: .6rem 0 0; line-height: 1.45; color: var(--hops-muted); font-size: 1rem; }
.hops-dialog .hops-form { display: grid; gap: 1.15rem; margin: 1.55rem 0 0; }
.hops-dialog .hops-field { display: grid; gap: .5rem; margin: 0; }
.hops-dialog .hops-field > span:first-child { font-size: .91rem; color: var(--hops-ink); font-weight: 580; }
.hops-dialog .hops-amount, .hops-dialog .hops-select, .hops-dialog .hops-copy {
  display: flex; width: 100%; min-width: 0; align-items: center; position: relative; min-height: 3.05rem;
  border: 1px solid var(--hops-line); border-radius: .8rem; background: #fff; overflow: visible;
}
.hops-dialog .hops-amount:focus-within, .hops-dialog .hops-select:focus-within, .hops-dialog .hops-copy:focus-within {
  outline: 2px solid #327987; outline-offset: 2px; border-color: #327987;
}
.hops-dialog .hops-amount > span { padding-left: .9rem; color: var(--hops-muted); font-size: 1rem; }
.hops-dialog .hops-amount input, .hops-dialog .hops-select select, .hops-dialog .hops-copy input {
  min-width: 0; width: 100%; min-height: 3rem; padding: .65rem .85rem; margin: 0;
  color: var(--hops-ink); border: none; background: none; border-radius: .8rem; box-shadow: none;
  outline: 0; font-size: 1rem; line-height: 1.4;
}
.hops-dialog .hops-amount input { padding-left: .48rem; }
.hops-dialog .hops-select select { appearance: none; padding-right: 2.65rem; cursor: pointer; }
.hops-dialog .hops-select svg { position: absolute; right: .8rem; color: #405d6b; }
.hops-dialog input::placeholder { color: #768792; opacity: 1; }
.hops-dialog .hops-amount:has([aria-invalid="true"]), .hops-dialog .hops-select:has([aria-invalid="true"]) { border-color: #9c364e; }
.hops-dialog .hops-bill-details { margin: -.55rem 0 0; color: var(--hops-muted); font-size: .93rem; }
.hops-dialog .hops-balance { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; color: var(--hops-muted); margin: .1rem 0; line-height: 1.5; font-size: .9rem; }
.hops-dialog .hops-balance strong { font-weight: 620; color: var(--hops-ink); }
.hops-dialog .hops-error, .hops-dialog .hops-feedback { margin: 0; color: #8c2b41; font-size: .91rem; line-height: 1.45; }
.hops-dialog .hops-feedback { margin: .5rem 0; color: #215567; }
.hops-dialog .hops-error:empty, .hops-dialog .hops-feedback:empty { display: none; }
.hops-dialog .hops-btn {
  display: inline-flex; width: 100%; align-items: center; justify-content: center; min-height: 3rem;
  border-radius: .8rem; border: 1px solid transparent; font-size: .98rem; font-weight: 620; line-height: 1.35;
  padding: .7rem .94rem; text-align: center; box-shadow: none;
}
.hops-dialog .hops-primary { color: white; background: #15394b; border-color: #15394b; }
.hops-dialog .hops-primary:hover { background: #205266; border-color: #205266; }
.hops-dialog .hops-secondary { background: transparent; border-color: var(--hops-line); color: var(--hops-ink); }
.hops-dialog .hops-secondary:hover { background: #edf5f7; border-color: #a9bdc6; }
.hops-dialog .hops-actions { display: flex; gap: .6rem; align-items: stretch; margin-top: 1.45rem; }
.hops-dialog .hops-actions .hops-secondary { flex: 0 1 30%; }
.hops-dialog .hops-actions .hops-primary { flex: 1; }
.hops-dialog .hops-inner > .hops-btn { margin-top: 1.5rem; }
.hops-dialog .hops-total { display: grid; gap: .35rem; margin: 1.4rem 0 1.3rem; padding: .95rem 0 1.1rem; border-block: 1px solid var(--hops-line); }
.hops-dialog .hops-total > span { color: var(--hops-muted); font-size: .91rem; }
.hops-dialog .hops-total strong { font-size: clamp(1.8rem, 6vw, 2.45rem); font-weight: 520; letter-spacing: -.055em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hops-dialog .hops-summary { display: grid; gap: .68rem; margin: 1.3rem 0; }
.hops-dialog .hops-summary > div { display: grid; grid-template-columns: minmax(6rem, .95fr) minmax(0, 1.35fr); align-items: baseline; gap: .85rem; line-height: 1.4; }
.hops-dialog .hops-summary dt { font-size: .9rem; color: var(--hops-muted); }
.hops-dialog .hops-summary dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-size: .95rem; color: var(--hops-ink); font-weight: 510; }
.hops-dialog .hops-copy input { font-family: ui-monospace, monospace; font-size: .9rem; }
.hops-dialog .hops-copy button { display: grid; place-items: center; width: 3rem; height: 2.85rem; flex: none; padding: 0; color: #215567; border: none; border-radius: .75rem; background: transparent; }
.hops-dialog .hops-copy button:hover { background: var(--hops-ice); }
.hops-dialog .hops-notices { display: grid; margin-top: 1.35rem; }
.hops-dialog .hops-notice {
  display: flex; gap: .85rem; align-items: center; background: transparent; color: var(--hops-ink); text-align: left;
  border: 0; border-bottom: 1px solid var(--hops-line); border-radius: 0; padding: .85rem 0;
}
.hops-dialog .hops-notice:hover { background: var(--hops-ice); }
.hops-dialog .hops-notice-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; background: var(--hops-ice); border-radius: 50%; }
.hops-dialog .hops-notice strong, .hops-dialog .hops-notice small { display: block; line-height: 1.45; }
.hops-dialog .hops-notice strong { font-size: .97rem; font-weight: 590; }
.hops-dialog .hops-notice small { margin-top: .1rem; font-size: .84rem; color: var(--hops-muted); }
@media (max-width: 36rem) {
  dialog.hops-dialog {
    --hops-ink: #18343c; --hops-muted: #50666c; --hops-line: #c9d5d7; --hops-ice: #e6eeec;
    width: 100%; margin: auto 0 0; max-height: calc(100dvh - max(18px,env(safe-area-inset-top)));
    border-radius: 24px 24px 0 0; border: 0; background: #fbfbf8;
    box-shadow: 0 -12px 60px #081b2b30; scroll-padding-block:16px;
  }
  .hops-dialog .hops-inner { padding: 16px var(--gutter,20px) calc(22px + env(safe-area-inset-bottom)); }
  .hops-dialog .hops-tools { margin-bottom: 12px; }
  .hops-dialog .hops-mark { width:44px; height:44px; border:1px solid #cbd9d9; background:#e8efed; border-radius:50%; }
  .hops-dialog .hops-mark svg { width:21px; height:21px; }
  .hops-dialog .hops-close { width:44px; height:44px; margin:0; color:#3f555e; }
  .hops-dialog h2 { font:400 clamp(1.9rem,8.1vw,2.45rem)/1.05 Georgia,"Times New Roman",serif; letter-spacing:-.052em; }
  .hops-dialog .hops-demo { font-size:.81rem; color:var(--hops-muted); letter-spacing:.015em; font-weight:500; }
  .hops-dialog .hops-description { font-size:.96rem; }
  .hops-dialog .hops-amount,.hops-dialog .hops-select { min-height:52px; border-radius:11px; }
  .hops-dialog .hops-amount input { font-size:1.22rem; min-height:50px; font-variant-numeric:tabular-nums; }
  .hops-dialog .hops-copy input { font-size:1rem; }
  .hops-dialog .hops-btn { min-height:50px; border-radius:12px; }
  .hops-dialog .hops-total strong { font-weight:465; }
}
@media (prefers-reduced-motion: no-preference) {
  dialog.hops-dialog[open] { animation: hops-reveal .2s ease-out; }
  @keyframes hops-reveal { from { opacity: .1; transform: translateY(.5rem); } to { opacity: 1; transform: translateY(0); } }
}
