.aim-opening-lock { overflow: hidden }
.aim-opening-dialog {
  --aim-opening-ink: #f5f6fb;
  --aim-opening-muted: #c5cbda;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: auto;
  color: var(--aim-opening-ink);
  overscroll-behavior: contain;
}
.aim-opening-dialog[open] {
  display: flex;
  padding: clamp(12px, 4vw, 34px);
}
.aim-opening-dialog::backdrop { background: #040712d9; backdrop-filter: blur(6px) }
.aim-opening-box {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 570px);
  margin: auto;
  padding: clamp(20px, 5vw, 34px);
  border: 1px solid #8496ca58;
  border-radius: 22px;
  background: radial-gradient(ellipse at top left, #233058, transparent 58%), #101522;
  box-shadow: 0 16px 55px #0008;
  text-align: left;
}
.aim-opening-box h2 {
  color: inherit;
  margin: 0;
  max-width: calc(100% - 20px);
  font-size: clamp(26px, 5.7vw, 38px);
  font-weight: 750;
  line-height: 1.09;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
.aim-opening-box h2:focus { outline: none }
.aim-opening-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 1px solid #8793b35c;
  border-radius: 50%;
  background: #151e31;
  color: #fff;
  font: 24px/1 sans-serif;
  cursor: pointer;
}
.aim-opening-kicker {
  margin: 0 30px 10px 0;
  color: #adbeff;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 750;
  letter-spacing: .11em;
}
.aim-opening-intro, .aim-opening-example figcaption {
  margin: 12px 0 0;
  color: var(--aim-opening-muted);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.aim-opening-example { margin: 16px 0 0 }
.aim-opening-example img {
  display: block;
  width: 100%;
  max-height: min(240px, 36vh);
  object-fit: contain;
  border-radius: 12px;
  background: #080d19;
}
.aim-opening-stats {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #7f9af745;
  border-radius: 14px;
  background: #a2b7ff0d;
}
.aim-opening-stats .aim-opening-kicker { margin-right: 0 }
.aim-opening-rate { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; line-height: 1.2 }
.aim-opening-rate strong { font-size: clamp(26px, 7vw, 41px); color: #eaf0ff }
.aim-opening-rate span { font-size: 14px; font-weight: 650 }
.aim-opening-method, .aim-opening-models p {
  color: var(--aim-opening-muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 9px 0 0;
}
.aim-opening-models { border-top: 1px solid #8793b34d; margin-top: 12px; padding-top: 10px }
.aim-opening-models summary, .aim-opening-editor summary { font-weight: 700; cursor: pointer }
.aim-opening-models dl { max-height: 240px; overflow: auto; margin: 7px 0 0 }
.aim-opening-models dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid #8793b330;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.aim-opening-models dd { margin: 0; text-align: right; color: var(--aim-opening-muted) }
.aim-opening-button {
  min-height: 42px;
  padding: 8px 17px;
  border: 0;
  border-radius: 10px;
  color: #10162b;
  background: #ced8ff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.aim-opening-button:hover { background: #e3eaff }
.aim-opening-button:disabled { opacity: .6; cursor: wait }
.aim-opening-done { margin-top: 16px; width: 100% }
.aim-opening-dashboard {
  --opening-accent: #d5c2ff;
  --opening-border: rgba(181, 147, 255, .26);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 1.7vw, 17px);
  width: 100%;
  min-height: 74px;
  padding: 11px clamp(11px, 1.8vw, 19px);
  margin-bottom: 10px;
  text-align: left;
  color: var(--aura-text, #f7f3ff);
  background:
    radial-gradient(ellipse 52% 190% at 0% 5%, rgba(149, 99, 255, .17), transparent 78%),
    linear-gradient(110deg, #181326, #100d19 65%, #191227);
  border: 1px solid var(--opening-border);
  border-radius: 16px;
  font: inherit;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.aim-opening-dashboard-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(196, 164, 255, .26);
  border-radius: 12px;
  color: var(--opening-accent);
  background: linear-gradient(145deg, #3b295b, #271c3c);
}
.aim-opening-dashboard-icon svg { display: block; width: 23px; height: 23px }
.aim-opening-dashboard-label { display: grid; min-width: 0; gap: 4px }
.aim-opening-dashboard-kicker {
  color: var(--opening-accent);
  font: 600 .64rem/1.15 "IBM Plex Mono", Consolas, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.aim-opening-dashboard-title {
  font-size: clamp(.92rem, 1.55vw, 1.05rem);
  font-weight: 680;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.aim-opening-dashboard-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 36px;
  min-height: 36px;
  padding-inline: 12px;
  border: 1px solid rgba(196, 164, 255, .20);
  border-radius: 999px;
  color: var(--opening-accent);
  background: rgba(163, 119, 255, .08);
  font-size: .78rem;
  font-weight: 650;
  transition: background-color .18s ease;
}
.aim-opening-dashboard-arrow {
  width: 7px;
  height: 7px;
  margin-right: 2px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}
.aim-opening-dashboard:hover, .aim-opening-dashboard:focus-visible {
  border-color: rgba(196, 164, 255, .56);
  box-shadow: 0 0 20px rgba(156, 110, 255, .12);
}
.aim-opening-dashboard:is(:hover, :focus-visible) .aim-opening-dashboard-action { background-color: rgba(163, 119, 255, .19) }
.aim-opening-dashboard:focus-visible { outline: 2px solid #c3a7ff; outline-offset: 3px }
@media (max-width: 560px) {
  .aim-opening-dashboard { min-height: 66px; padding-block: 9px }
  .aim-opening-dashboard-icon { width: 36px; height: 36px; border-radius: 10px }
  .aim-opening-dashboard-icon svg { width: 20px; height: 20px }
  .aim-opening-dashboard-action { padding-inline: 0 }
  .aim-opening-dashboard-more { display: none }
}
@media (prefers-reduced-motion: reduce) {
  .aim-opening-dashboard, .aim-opening-dashboard-action { transition: none }
}
.aim-opening-editor {
  box-sizing: border-box;
  color: #ecf0fd;
  background: #161f34;
  border: 1px solid #8496ca58;
  border-radius: 12px;
  padding: 14px 17px;
  margin-bottom: 12px;
}
.aim-opening-editor form { display: grid; gap: 10px; max-width: 650px; margin-top: 10px }
.aim-opening-editor label { display: grid; gap: 3px; font-size: 14px }
.aim-opening-editor .aim-opening-toggle { display: flex; align-items: center; gap: 8px }
.aim-opening-editor [hidden] { display: none !important }
.aim-opening-editor input:not([type=checkbox]), .aim-opening-editor textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #8496ca80;
  border-radius: 6px;
  color: inherit;
  background: #0c1220;
}
.aim-opening-editor textarea { min-height: 60px; resize: vertical }
.aim-opening-editor p { margin: 0; font-size: 13px; color: #c5cbda }
.aim-opening-editor-image { max-width: min(320px, 100%); max-height: 160px; object-fit: contain }
.aim-opening-editor .aim-opening-button { justify-self: start }
