.cactus-welcome-dialog {
  width: min(900px, calc(100vw - 40px));
  height: min(720px, calc(100dvh - 40px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #65744d;
  border-radius: 22px;
  background: #20231e;
  color: #f4f7ed;
  box-shadow: 0 24px 90px #10150ed9;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.cactus-welcome-dialog[open] { display: grid; }
.cactus-welcome-dialog::backdrop { background: #10130fc9; backdrop-filter: blur(5px); }
.cactus-welcome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: .9rem 1.5rem;
  border-bottom: 1px solid #536044;
}
.cactus-welcome-top img { width: 150px; height: 38px; object-fit: contain; object-position: left center; }
.cactus-welcome-top-actions { display: flex; align-items: center; gap: .65rem; }
.cactus-welcome-progress { color: #dafa63; font-size: .9rem; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cactus-welcome-skip { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid #536044; border-radius: 50%; background: transparent; color: #f4f7ed; font-size: 1.55rem; line-height: 1; cursor: pointer; }
.cactus-welcome-skip:hover { border-color: #dafa63; color: #dafa63; }
.cactus-welcome-skip:focus-visible { outline: 3px solid #dafa63; outline-offset: 3px; }
.cactus-welcome-skip[hidden] { display: none !important; }
.cactus-welcome-demo { color: #f6d58b; font-size: .72rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.cactus-welcome-body {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: .8rem;
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 3.25rem);
}
.cactus-welcome-kicker { margin: 0; color: #dafa63; font-size: .78rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.cactus-welcome-body h1 { max-width: 17ch; margin: 0; color: #f7f9ef; font-size: clamp(2rem, 4.8vw, 3.6rem); line-height: 1.04; letter-spacing: -.035em; }
.cactus-welcome-body h1:focus { outline: none; }
.cactus-welcome-copy {
  width: 100%;
  max-height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: .35rem;
  color: #e1e7d8;
  font-size: 1.12rem;
  line-height: 1.62;
  scrollbar-color: #65744d transparent;
}
.cactus-welcome-copy > p { margin: 0 0 .8rem; }
.cactus-welcome-highlight {
  max-width: 100%;
  padding: .7rem 1rem;
  border-left: 4px solid #dafa63;
  color: #dafa63;
  font-size: clamp(1.2rem, 2.8vw, 1.8rem);
  font-weight: 800;
  line-height: 1.3;
}
.cactus-welcome-note { display: flex; min-height: 68px; box-sizing: border-box; align-items: center; max-width: 58ch; padding: .7rem .85rem; border-radius: 9px; background: #30372a; color: #e7edda; font-size: 1rem; line-height: 1.5; }
.cactus-welcome-status { min-height: 1.25rem; margin: 0; color: #f7c2ad; font-size: .85rem; }
.cactus-welcome-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem 1.5rem;
  border-top: 1px solid #536044;
  background: #1a1d18;
}
.cactus-welcome-footer button { width: auto; min-width: 132px; min-height: 48px; border-radius: 10px; }
.cactus-welcome-footer .cactus-welcome-back { border-color: #69765c; background: transparent; color: #f4f7ed; }
.cactus-welcome-footer .cactus-welcome-back:disabled { opacity: .5; cursor: default; }
.cactus-welcome-footer .cactus-welcome-enter { margin-left: auto; }
.cactus-welcome-footer .cactus-welcome-reset { border-color: #818a70; background: #30372a; color: #f4f7ed; font-size: .9rem; }

/* Final card: the full decision fits in one glance, with a scroll fallback only on short screens. */
.cactus-welcome-body.is-legal { gap: .55rem; padding: .9rem clamp(1.5rem, 4vw, 2.5rem) .6rem; }
.cactus-welcome-body.is-legal .cactus-welcome-kicker { font-size: .75rem; }
.cactus-welcome-body.is-legal h1 { max-width: 30ch; font-size: clamp(1.8rem, 3.5vw, 2.65rem); line-height: 1.08; }
.cactus-welcome-body.is-legal .cactus-welcome-copy {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  gap: .55rem;
  max-height: none;
  overflow: visible;
  padding: 0 .2rem 0 0;
  font-size: 1rem;
  line-height: 1.45;
}
.cactus-welcome-body.is-legal .cactus-welcome-text { max-width: 75ch; margin: 0; }
.cactus-welcome-legal { display: grid; gap: .65rem; margin-top: .05rem; }
.cactus-welcome-legal[hidden] { display: none !important; }
.cactus-welcome-legal-note {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: 0 !important;
  padding: .55rem .75rem;
  border-left: 3px solid #dafa63;
  border-radius: 0 9px 9px 0;
  background: #2b3026;
  color: #cbd4bf;
  font-size: .81rem;
  line-height: 1.35;
}
.cactus-welcome-legal-note > span:first-child { display: grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; border: 1px solid #dafa63; border-radius: 50%; color: #dafa63; font-size: .7rem; font-weight: 800; }
.cactus-welcome-legal-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: 0; }
.cactus-welcome-legal-heading { grid-column: 1 / -1; color: #aeb9a2; font-size: .75rem; font-weight: 750; letter-spacing: .11em; }
.cactus-welcome-body.is-legal .cactus-welcome-legal-links a {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: .65rem .8rem;
  border: 1px solid #536044;
  border-radius: 11px;
  background: #282d24;
  color: #f4f7ed;
  text-decoration: none;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.cactus-welcome-body.is-legal .cactus-welcome-legal-links a:hover { transform: translateY(-1px); border-color: #dafa63; background: #30372a; }
.cactus-welcome-body.is-legal .cactus-welcome-legal-links a:focus-visible { outline: 3px solid #dafa63; outline-offset: 2px; }
.cactus-welcome-legal-links a small { display: block; margin-bottom: .2rem; color: #acb99e; font-size: .75rem; font-weight: 750; letter-spacing: .08em; }
.cactus-welcome-legal-links a strong { display: block; font-size: .9rem; line-height: 1.25; }
.cactus-welcome-link-arrow { display: grid; min-width: 48px; height: 30px; flex: 0 0 auto; place-items: center; padding: 0 .55rem; border-radius: 999px; background: #39412f; color: #dafa63; font-size: .75rem; font-weight: 750; letter-spacing: .04em; }
.cactus-welcome-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.cactus-welcome-body.is-legal .cactus-welcome-check {
  display: flex;
  min-height: 72px;
  align-items: flex-start;
  gap: .65rem;
  margin: 0;
  padding: .65rem .75rem;
  border: 1px solid #536044;
  border-radius: 11px;
  background: #282d24;
  color: #e7edda;
  font-size: .875rem;
  line-height: 1.35;
  cursor: pointer;
}
.cactus-welcome-body.is-legal .cactus-welcome-check:has(input:checked) { border-color: #dafa63; background: #30372a; }
.cactus-welcome-body.is-legal .cactus-welcome-check input { width: 20px; height: 20px; flex: 0 0 20px; margin: .05rem 0 0; accent-color: #dafa63; cursor: pointer; }
.cactus-welcome-check > span { display: block; }
.cactus-welcome-check strong { display: block; margin-bottom: .15rem; color: #f4f7ed; font-size: .875rem; }
.cactus-welcome-check > span > span { display: block; }
.cactus-welcome-body.is-legal ~ .cactus-welcome-status { min-height: 0; flex: 0 0 auto; font-size: .78rem; }
.cactus-welcome-dialog.is-legal .cactus-welcome-footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.7fr); gap: .6rem; padding: .75rem 1.5rem; }
.cactus-welcome-dialog.is-legal .cactus-welcome-footer button { width: 100%; min-width: 0; min-height: 48px; margin: 0; }
.cactus-welcome-dialog.is-legal .cactus-welcome-enter { grid-column: 3; }
.cactus-welcome-dialog.is-legal .cactus-welcome-exit { border-color: #69765c; background: #30372a; color: #f4f7ed; }
.cactus-welcome-footer button:focus-visible { outline: 3px solid #dafa63; outline-offset: 3px; }
.cactus-welcome-footer button:disabled { opacity: .48; cursor: not-allowed; }

@media (max-width: 700px) {
  .cactus-welcome-dialog { width: calc(100vw - 24px); height: calc(100dvh - 12px); border-radius: 17px; }
  .cactus-welcome-top { min-height: 58px; padding: .7rem 1rem; }
  .cactus-welcome-top img { width: 126px; height: 34px; }
  .cactus-welcome-body { gap: .65rem; padding: 1.2rem 1.1rem; }
  .cactus-welcome-body h1 { font-size: clamp(1.8rem, 8vw, 2.45rem); }
  .cactus-welcome-copy { font-size: 1rem; line-height: 1.55; }
  .cactus-welcome-footer { gap: .5rem; padding: .7rem .8rem; }
  .cactus-welcome-footer button { min-width: 0; min-height: 46px; padding: .55rem .7rem; }
  .cactus-welcome-demo { max-width: 112px; font-size: .75rem; line-height: 1.15; text-align: right; }
  .cactus-welcome-body.is-legal { gap: .48rem; padding: .7rem .9rem .45rem; }
  .cactus-welcome-body.is-legal h1 { font-size: clamp(1.55rem, 6.2vw, 2rem); }
  .cactus-welcome-body.is-legal .cactus-welcome-copy { gap: .48rem; overflow: auto; font-size: .9rem; line-height: 1.36; }
  .cactus-welcome-legal { gap: .45rem; }
  .cactus-welcome-legal-note { padding: .4rem .55rem; font-size: .75rem; }
  .cactus-welcome-legal-links { grid-template-columns: 1fr; gap: .35rem; }
  .cactus-welcome-legal-heading { font-size: .75rem; }
  .cactus-welcome-body.is-legal .cactus-welcome-legal-links a { min-height: 48px; padding: .45rem .6rem; }
  .cactus-welcome-legal-links a small { font-size: .75rem; }
  .cactus-welcome-legal-links a strong { font-size: .875rem; }
  .cactus-welcome-link-arrow { min-width: 44px; height: 28px; padding: 0 .45rem; }
  .cactus-welcome-checks { grid-template-columns: 1fr; gap: .35rem; }
  .cactus-welcome-body.is-legal .cactus-welcome-check { min-height: 0; gap: .55rem; padding: .45rem .6rem; font-size: .875rem; line-height: 1.32; }
  .cactus-welcome-body.is-legal .cactus-welcome-check input { width: 19px; height: 19px; flex-basis: 19px; }
  .cactus-welcome-check strong { font-size: .875rem; }
  .cactus-welcome-dialog.is-legal .cactus-welcome-footer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .4rem; padding: .55rem .7rem; }
  .cactus-welcome-dialog.is-legal .cactus-welcome-footer button { min-height: 44px; padding: .45rem .55rem; font-size: .83rem; }
  .cactus-welcome-dialog.is-legal .cactus-welcome-enter { grid-column: 1 / -1; grid-row: 1; }
}

@media (max-width: 370px) {
  .cactus-welcome-dialog { width: calc(100vw - 14px); height: calc(100dvh - 14px); }
  .cactus-welcome-top { min-height: 50px; gap: .35rem; padding: .4rem .6rem; }
  .cactus-welcome-top img { width: 102px; height: 30px; }
  .cactus-welcome-demo { max-width: 82px; font-size: .7rem; }
  .cactus-welcome-progress { font-size: .74rem; }
  .cactus-welcome-body.is-legal { gap: .34rem; padding: .45rem .62rem .25rem; }
  .cactus-welcome-body.is-legal .cactus-welcome-kicker { font-size: .75rem; }
  .cactus-welcome-body.is-legal h1 { font-size: 1.35rem; }
  .cactus-welcome-body.is-legal .cactus-welcome-copy { gap: .34rem; font-size: .83rem; line-height: 1.25; }
  .cactus-welcome-legal { gap: .3rem; }
  .cactus-welcome-legal-note { gap: .4rem; padding: .3rem .42rem; font-size: .75rem; }
  .cactus-welcome-body.is-legal .cactus-welcome-legal-links a { min-height: 42px; padding: .35rem .45rem; }
  .cactus-welcome-legal-links a small { font-size: .75rem; }
  .cactus-welcome-legal-links a strong { font-size: .875rem; }
  .cactus-welcome-body.is-legal .cactus-welcome-check { gap: .4rem; padding: .32rem .42rem; font-size: .875rem; }
  .cactus-welcome-check strong { font-size: .875rem; }
  .cactus-welcome-dialog.is-legal .cactus-welcome-footer { gap: .3rem; padding: .4rem .5rem; }
  .cactus-welcome-dialog.is-legal .cactus-welcome-footer button { min-height: 40px; padding: .35rem .4rem; font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cactus-welcome-body.is-legal .cactus-welcome-legal-links a { transition: none; }
}

.cactus-welcome-dialog [hidden]{display:none!important}
