@charset "UTF-8";
:root {
  color-scheme: dark;
  --page: #0e1916;
  --panel: #15231e;
  --panel-raised: #1a2c25;
  --edge: #304338;
  --edge-soft: #2b3d32;
  --text: #f0f3e9;
  --muted: #a6b6a9;
  --dim: #91a397;
  --lime: #c5ec9b;
  --jade: #4aa988;
  --amber: #efb978;
  --fold: #8193a7;
  --call: #4bb08d;
  --raise: #e3bd75;
  --jam: #dc8978;
  --body-font:
    "Inter", "Pretendard", "Noto Sans KR", "Malgun Gothic", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --number-font:
    "Inter", "Pretendard", "Noto Sans KR", "Malgun Gothic", "Segoe UI",
    sans-serif;
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--text);
  background: var(--page);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  line-height: 1.5;
}
button,
select,
input {
  font: inherit;
}
button {
  color: var(--text);
  cursor: pointer;
}
button:disabled,
input:disabled,
select:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  position: relative;
  z-index: 2;
}
button,
select,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  transition:
    background-color 0.13s,
    border-color 0.13s,
    color 0.13s;
}
a {
  color: var(--lime);
  text-underline-offset: 0.2em;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.skip:focus {
  position: fixed;
  z-index: 20;
  background: var(--lime);
  color: #13221b;
  padding: 0.6rem 1rem;
}
.topbar {
  background: #172820;
  border-bottom: 1px solid #334437;
}
.topbar-inner,
.workspace {
  width: min(100% - clamp(2rem, 7vw, 7.5rem), 1496px);
  margin-inline: auto;
}
.topbar-inner {
  height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.63rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--number-font);
  font-weight: 750;
  font-size: 1.45rem;
  letter-spacing: -0.065em;
  line-height: 1;
}
.brand-light {
  font-weight: 460;
}
.brand-tile {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: var(--lime);
  color: #213c29;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 1.48rem;
  font-weight: 900;
  font-style: italic;
  text-indent: -0.12em;
  line-height: 1;
  padding-bottom: 2px;
}
.top-actions {
  display: flex;
  align-items: center;
  column-gap: 1.15rem;
}
.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.08rem;
  border: none;
  background: none;
  color: #c8d5c7;
  font-size: 0.9rem;
  font-weight: 560;
}
.text-action:hover {
  color: #fff;
}
.nav-divider {
  width: 1px;
  height: 14px;
  background: var(--edge);
}
.icon {
  pointer-events: none;
  display: inline-block;
  flex: none;
  position: relative;
  width: 17px;
  height: 17px;
}
.icon::before,
.icon::after {
  position: absolute;
}
.icon-info,
.matrix-help-icon {
  border: 1.35px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 11px;
  line-height: 14px;
  text-align: center;
  font-style: normal;
  width: 16px;
  height: 16px;
}
.icon-link::before,
.icon-link::after {
  content: "";
  border: 1.45px solid currentColor;
  width: 10px;
  height: 6px;
  border-radius: 5px;
  transform: rotate(-40deg);
}
.icon-link::before {
  top: 7px;
  left: 0;
}
.icon-link::after {
  top: 3px;
  left: 6px;
}
.workspace {
  padding: clamp(1.5rem, 3.7vh, 2.6rem) 0 3rem;
}
.workspace-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.1rem;
  margin: 0 0 1.2rem;
}
.game-type {
  color: #a9c1a6;
  font-size: 0.81rem;
  font-weight: 620;
}
.game-type span {
  padding: 0 0.38rem;
  color: #819882;
}
h1 {
  margin-top: 0.19rem;
  font-weight: 720;
  font-size: clamp(1.9rem, 3.25vw, 3.1rem);
  line-height: 1.24;
  letter-spacing: -0.07em;
}
.primary {
  border: 1px solid #cdeaa3;
  background: var(--lime);
  color: #203522;
  border-radius: 8px;
  padding: 0.67rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.58rem;
  font-weight: 700;
  font-size: 0.93rem;
  white-space: nowrap;
  min-height: 42px;
}
.primary:hover {
  background: #def7bd;
}
.icon-tune {
  width: 15px;
  height: 15px;
  background:
    linear-gradient(currentColor, currentColor) 0 4px/15px 1.25px no-repeat,
    linear-gradient(currentColor, currentColor) 0 10px/15px 1.25px no-repeat;
}
.icon-tune::before,
.icon-tune::after {
  width: 4px;
  height: 5px;
  border-radius: 1.5px;
  background: currentColor;
  content: "";
}
.icon-tune::before {
  left: 3px;
  top: 2px;
}
.icon-tune::after {
  right: 3px;
  top: 8px;
}
.scenario-strip {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.05rem;
}
.scenario-strip:empty {
  display: none;
}
.chip,
.scenario-strip > :is(span, div, button) {
  display: inline-flex;
  align-items: center;
  gap: 0.53rem;
  padding: 0.45rem 0.73rem;
  min-height: 33px;
  background: #1a2a21;
  border: 1px solid #324338;
  color: #dce7d7;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 550;
}
.chip small,
.scenario-strip small,
.chip em {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 500;
}
.chip b,
.scenario-strip strong {
  font-weight: 670;
  color: #eff3e8;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  min-width: 0;
}
.section-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.group-title {
  display: flex;
  gap: 0.62rem;
  align-items: center;
  min-width: 0;
}
.group-title h2 {
  font-size: 1.13rem;
  line-height: 1.35;
  font-weight: 690;
  letter-spacing: -0.045em;
}
.group-title > .icon {
  color: #acc8a4;
}
.icon-route {
  width: 17px;
  height: 12px;
  background: linear-gradient(currentColor, currentColor) center/10px 1.4px
    no-repeat;
}
.icon-route::before,
.icon-route::after {
  content: "";
  border: 1.2px solid;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  top: 3px;
  background: var(--panel);
}
.icon-route::before {
  left: 0;
}
.icon-route::after {
  right: 0;
}
.icon-grid {
  width: 15px;
  height: 15px;
  border: 1.3px solid currentColor;
  border-radius: 3px;
  background:
    linear-gradient(currentColor, currentColor) center/1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center/100% 1px no-repeat;
}
.icon-cards::before,
.icon-cards::after {
  content: "";
  width: 10px;
  height: 13px;
  border: 1.3px solid currentColor;
  border-radius: 2px;
}
.icon-cards::before {
  transform: rotate(-15deg);
  left: 1px;
  top: 2px;
}
.icon-cards::after {
  left: 6px;
  top: 2px;
  background: var(--panel);
}
.mini-action,
.history-steppers button,
.dialog-close,
.dialog button:not(.primary):not(.dialog-close) {
  border: 1px solid #405347;
  background: #203227;
  color: #d7e5d5;
  border-radius: 6px;
  padding: 0.32rem 0.66rem;
  font-size: 0.84rem;
  font-weight: 590;
  min-height: 31px;
}
.mini-action:hover:not(:disabled),
.history-steppers button:hover:not(:disabled),
.dialog button:hover:not(:disabled) {
  background: #304737;
  border-color: #5d7764;
}
.section-count {
  margin-left: 0.04rem;
  color: #97af98;
  font: 580 0.84rem/1.45 var(--number-font);
  letter-spacing: 0.01em;
}
.action-panel {
  margin-bottom: 1rem;
  padding: 0.89rem 1.18rem 0.93rem;
}
.history-titlebar .group-title h2 {
  font-size: 0.99rem;
}
.history-tools,
.history-steppers {
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
}
.history-steppers {
  gap: 0;
}
.history-steppers button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  font-size: 0;
}
.history-steppers button:first-child {
  border-radius: 6px 0 0 6px;
}
.history-steppers button:last-child {
  border-radius: 0 6px 6px 0;
  border-left: 0;
}
.chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-top: 1.55px solid;
  border-right: 1.55px solid;
}
.chevron.left {
  transform: translateX(1px) rotate(-135deg);
}
.chevron.right {
  transform: translateX(-1px) rotate(45deg);
}
.history-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.38rem 0.07rem 0.65rem;
  margin-top: 0.18rem;
  scrollbar-width: thin;
  scrollbar-color: #4a6551 transparent;
}
.history-track:empty {
  min-height: 0.65rem;
}
.history-track > button,
.history-step {
  padding: 0.32rem 0.68rem;
  border: 1px solid #3a4b3e;
  border-radius: 5px;
  background: #1b2e23;
  color: #d0dfcd;
  font-size: 0.84rem;
  font-weight: 580;
  white-space: nowrap;
  flex: 0 0 auto;
}
.history-track
  > :is(
    button.selected,
    button.active,
    button[aria-current="step"],
    button[aria-current="true"]
  ),
.history-step.current {
  color: #e0f3c8;
  border-color: #80a86f;
  background: #2e4430;
}
.history-track > button:hover {
  border-color: #72976e;
}
.decision-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(0.7rem, 1.45vw, 1.8rem);
  row-gap: 0.55rem;
  border-top: 1px solid var(--edge-soft);
  padding-top: 0.76rem;
}
.decision-stat {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
  font-variant-numeric: tabular-nums;
}
.decision-stat small {
  color: var(--dim);
  font-size: 0.77rem;
  font-weight: 540;
}
.decision-stat strong {
  font-size: 0.98rem;
  color: #e8eee3;
  line-height: 1.35;
  font-weight: 680;
}
.actor-stat {
  padding-right: 0.2rem;
}
.actor-stat strong {
  color: var(--lime);
}
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.33rem;
  flex: 1 1 auto;
}
.action-buttons button,
.move {
  background: #23352b;
  border: 1px solid #455b49;
  border-radius: 6px;
  color: #e6ede1;
  padding: 0.4rem 0.62rem;
  font-size: 0.86rem;
  font-weight: 620;
  white-space: nowrap;
  min-height: 33px;
}
.action-buttons button:hover:not(:disabled) {
  background: #334b38;
  border-color: #789477;
}
.action-buttons [data-kind="fold"],
.action-buttons .fold {
  color: #bdcbd8;
}
.action-buttons [data-kind="call"],
.action-buttons [data-kind="check"],
.action-buttons .call {
  color: #9dddc0;
}
.action-buttons [data-kind="raise"],
.action-buttons [data-kind="bet"],
.action-buttons .raise {
  color: #edcb91;
}
.action-buttons [data-kind="allin"],
.action-buttons .jam {
  color: #f2b2a0;
}
.custom-form {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.input-amount {
  display: flex;
  align-items: center;
  background: #14251c;
  border: 1px solid #405446;
  border-radius: 5px;
  overflow: hidden;
  color: var(--dim);
  font-family: var(--number-font);
}
.input-amount:focus-within {
  outline: 2px solid var(--lime);
}
.input-amount input {
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  min-width: 0;
  width: 3.85rem;
  font-size: 0.86rem;
  padding: 0.36rem 0.42rem;
  height: 31px;
}
.input-amount input:focus-visible {
  outline: 0;
}
.input-amount > span:last-child {
  margin-right: 0.43rem;
  font-size: 0.74rem;
}
.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(315px, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.range-panel,
.detail-panel {
  padding: 1.06rem 1.12rem 0.96rem;
}
.range-panel > .section-titlebar,
.detail-panel > .section-titlebar {
  margin-bottom: 1rem;
}
.matrix {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  column-gap: 2px;
  row-gap: 2px;
  align-content: start;
  border-radius: 5px;
}
.matrix .cell,
.matrix button {
  display: grid;
  position: relative;
  place-items: center;
  overflow: hidden;
  border: none;
  border-radius: 2px;
  background-color: #233c30;
  color: #f0f4e9;
  font-family: var(--number-font);
  font-size: clamp(0.66rem, 0.95vw, 0.9rem);
  font-weight: 660;
  font-variant-numeric: tabular-nums;
  padding: 0 0.04rem 0.16rem;
  height: clamp(27px, 2.5vw, 38px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.matrix :is(button, .cell)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--mix, #42664e);
  pointer-events: none;
}
.matrix .pair,
.matrix [data-pair="true"] {
  background-color: #2a4737;
}
.matrix button:hover {
  background-color: #35513e;
  z-index: 1;
}
.matrix :is(.selected, [aria-pressed="true"], [aria-selected="true"]) {
  background-color: #39553b;
  color: white;
  box-shadow: inset 0 0 0 1.8px var(--lime);
  z-index: 1;
}
.matrix :is(.selected, [aria-pressed="true"], [aria-selected="true"])::after {
  left: 2px;
  right: 2px;
  bottom: 2px;
}
.matrix button:disabled {
  color: #a0b0a2;
  opacity: 0.52;
  background: #25352b;
}
.range-foot {
  display: flex;
  align-items: flex-start;
  gap: 0.48rem;
  padding-top: 0.78rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--edge-soft);
  color: var(--dim);
  font-size: 0.79rem;
  line-height: 1.65;
}
.matrix-help-icon {
  flex: none;
  width: 13px;
  height: 13px;
  font-size: 9px;
  line-height: 10px;
  margin-top: 3px;
  color: #aabda7;
}
.range-table {
  max-height: min(500px, 65vh);
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--edge-soft);
  padding: 0.44rem 0.35rem;
  font-size: 0.85rem;
}
th {
  color: var(--muted);
  font-weight: 600;
}
th[scope="col"],
.range-table thead th {
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 1;
}
.range-table button {
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0;
}
.detail-panel {
  display: flex;
  flex-direction: column;
}
.hand-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 126px;
  gap: 1rem;
  padding: 1.12rem 1.35rem;
  overflow: hidden;
  border: 1px solid #3e5b43;
  border-radius: 9px;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 85% 15%, #45633a 0, transparent 52%),
    linear-gradient(106deg, #213e2c, #2b4a32 65%, #2b4c34);
}
.hand-banner::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 310px;
  aspect-ratio: 1;
  top: -130%;
  right: -120px;
  border: 1px solid #607d52;
  border-radius: 50%;
  box-shadow:
    0 0 0 23px #56764a15,
    0 0 0 24px #6b865b41,
    0 0 0 48px #55744818,
    0 0 0 49px #6b865b35,
    0 0 0 72px #55744818,
    0 0 0 73px #6b865b30;
}
.hand-selection {
  display: grid;
  gap: 0.36rem;
  min-width: 0;
  z-index: 1;
}
.hand-selection h3 {
  font-family: var(--number-font);
  color: #f3f6e9;
  font-weight: 670;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  letter-spacing: -0.07em;
  line-height: 1.04;
}
.combo-label {
  display: inline-flex;
  align-items: center;
  position: relative;
  max-width: 9.8rem;
}
select {
  border: 1px solid var(--edge);
  background-color: #203529;
  color: var(--text);
  border-radius: 5px;
  appearance: none;
  padding: 0.5rem 1.72rem 0.5rem 0.55rem;
  background-image:
    linear-gradient(45deg, transparent 48%, #afc6af 50%),
    linear-gradient(135deg, #afc6af 48%, transparent 50%);
  background-position:
    calc(100% - 13px) 52%,
    calc(100% - 9px) 52%;
  background-size:
    4px 4px,
    4px 4px;
  background-repeat: no-repeat;
}
.combo-label select {
  padding: 0.22rem 1.45rem 0.25rem 0.51rem;
  background-color: #233d2c;
  border: 1px solid #537256;
  font-size: 0.8rem;
}
.cards {
  margin: 0 0.5rem 0 0;
  display: flex;
  align-items: center;
  height: 90px;
  flex: none;
}
.playing-card {
  width: 48px;
  height: 68px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  line-height: 1;
  padding: 5px 7px;
  background: linear-gradient(160deg, #fbf7e8, #e9e3cd);
  border: 1px solid #e3dfcb;
  border-radius: 5px;
  color: #25362a;
  box-shadow: 0 6px 13px #111c1580;
  font-family: Georgia, "Times New Roman", serif;
  position: relative;
  transform: rotate(-10deg) translateY(-1px);
}
.playing-card + .playing-card {
  margin-left: -9px;
  transform: rotate(10deg) translateY(5px);
}
.playing-card b {
  font:
    bold 1.38rem/0.96 Georgia,
    serif;
}
.playing-card i {
  font:
    normal 0.9rem/1 Georgia,
    "Segoe UI Symbol",
    serif;
}
.playing-card::after {
  position: absolute;
  content: "♠";
  right: 5px;
  bottom: 1px;
  color: currentColor;
  font-size: 1.85rem;
  line-height: 1;
  opacity: 0.77;
}
.playing-card.diamonds,
.playing-card.hearts {
  color: #aa4b36;
}
.playing-card.diamonds::after {
  content: "♦";
}
.playing-card.hearts::after {
  content: "♥";
}
.playing-card.clubs::after {
  content: "♣";
}
.action-mix {
  margin-top: 1.2rem;
}
.mix-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.mix-head h3 {
  font-size: 0.98rem;
  letter-spacing: -0.035em;
  font-weight: 680;
}
.mix-head > span {
  color: var(--dim);
  font-size: 0.78rem;
}
.distribution {
  display: flex;
  width: 100%;
  height: 12px;
  margin: 0.62rem 0 0.9rem;
  background: #293c30;
  border-radius: 4px;
  overflow: hidden;
}
.distribution > * {
  height: 100%;
  display: block;
}
.distribution > * + * {
  box-shadow: inset 1px 0 #16261c;
}
.freq-key {
  display: grid;
  grid-template-columns: 1fr 4.5rem 3.7rem;
  color: var(--dim);
  font-size: 0.78rem;
  padding-bottom: 0.3rem;
}
.freq-key > :nth-child(n + 2) {
  text-align: right;
}
.frequency-row {
  display: grid;
  align-items: center;
  grid-template-columns: 0.55rem minmax(0, 1fr) 4.1rem 3.3rem;
  gap: 0.4rem;
  padding: 0.58rem 0;
  border-top: 1px solid var(--edge-soft);
  font-size: 0.91rem;
  min-height: 36px;
}
.frequency-row > :first-child,
.swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--action-color, #98b598);
  display: inline-block;
}
.frequency-row > :nth-child(2) {
  color: #e1e9dc;
  font-weight: 575;
}
.frequency-row small,
.frequency-row > :nth-child(3) {
  font-family: var(--number-font);
  color: #b0c4b2;
  font-size: 0.83rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.frequency-row strong {
  text-align: right;
  font-family: var(--number-font);
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  font-size: 0.99rem;
}
.frequency-row.best small,
.frequency-row.best > :nth-child(3) {
  color: var(--lime);
}
.comparison:empty,
.model-status:empty {
  display: none;
}
.comparison:not(:empty) {
  margin-top: 0.7rem;
  border-top: 1px solid #426043;
  padding-top: 0.7rem;
  color: #c8d9be;
  font-size: 0.85rem;
}
.comparison h4 {
  margin: 0 0 0.3rem;
  font-size: 0.9rem;
}
.model-status {
  border-top: 1px solid var(--edge-soft);
  margin: auto 0 0;
  padding-top: 0.66rem;
  color: #9eb29d;
  font-size: 0.79rem;
  line-height: 1.65;
  white-space: pre-line;
}
.action-mix + .model-status {
  margin-top: 0.85rem;
}
.dialog {
  background: #192a21;
  color: var(--text);
  border: 1px solid #4b6450;
  border-radius: 15px;
  max-width: min(570px, calc(100% - 24px));
  width: 100%;
  max-height: 90dvh;
  padding: 0;
  box-shadow: 0 22px 90px #07100bb3;
}
.wide-dialog {
  max-width: min(860px, calc(100% - 24px));
}
.dialog::backdrop {
  background: #07120dc7;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 1.2rem;
  gap: 0.5rem;
  border-bottom: 1px solid var(--edge);
}
.dialog-head h2 {
  font-size: 1.15rem;
  letter-spacing: -0.04em;
}
.dialog-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  font-size: 1.28rem;
  line-height: 1;
}
.dialog-body {
  padding: 1.1rem 1.2rem 1.3rem;
  min-width: 0;
  overflow-x: auto;
}
.dialog-body :is(select, input) {
  max-width: 100%;
  min-width: 0;
  border: 1px solid #49604d;
  border-radius: 6px;
  color: var(--text);
  background-color: #17271e;
  font-size: 0.92rem;
}
.dialog-body input {
  padding: 0.46rem 0.56rem;
}
.dialog-body label {
  color: #bdcebc;
  font-size: 0.88rem;
}
.dialog-body h3 {
  margin: 0.8rem 0 0.4rem;
  font-size: 1rem;
}
.dialog-body p,
.dialog-body li {
  color: #c0d0c0;
  font-size: 0.94rem;
  line-height: 1.68;
}
.prose p + p {
  margin-top: 0.7rem;
}
.prose h3,
.prose h4 {
  margin: 0.85rem 0 0.32rem;
}
.dialog-body :is(.form-grid, .fields, .settings-grid) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.8rem;
}
.dialog-body :is(.form-grid, .fields, .settings-grid) label {
  display: grid;
  gap: 0.23rem;
}
.dialog-body :is(.dialog-actions, .form-actions) {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.toast:not(:empty) {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  border: 1px solid #58715a;
  border-radius: 8px;
  background: #273c2d;
  box-shadow: 0 4px 24px #0005;
  color: var(--text);
  padding: 0.6rem 1rem;
  max-width: min(90vw, 650px);
  text-align: center;
  font-size: 0.9rem;
}
@media (min-width: 1640px) {
  .study-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(410px, 1fr);
  }
  .matrix button,
  .matrix .cell {
    height: 41px;
  }
}
@media (max-width: 1090px) {
  .topbar-inner,
  .workspace {
    width: calc(100% - 3rem);
  }
  .study-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(295px, 1fr);
  }
  .decision-controls {
    column-gap: 0.8rem;
  }
  .range-panel,
  .detail-panel {
    padding: 0.95rem;
  }
}
@media (max-width: 820px) {
  .topbar-inner,
  .workspace {
    width: calc(100% - 2.2rem);
  }
  .study-layout {
    grid-template-columns: 1fr;
  }
  .detail-panel {
    grid-row: 1;
  }
  .matrix button,
  .matrix .cell {
    height: clamp(26px, 5vw, 36px);
    font-size: clamp(0.61rem, 1.7vw, 0.85rem);
  }
  .decision-controls {
    row-gap: 0.65rem;
  }
  .action-buttons {
    flex-basis: 50%;
  }
  .detail-panel {
    display: grid;
    grid-template-columns: minmax(155px, 0.85fr) minmax(0, 1.15fr);
    column-gap: 1rem;
    align-items: start;
  }
  .detail-panel > .section-titlebar,
  .model-status {
    grid-column: 1/-1;
  }
  .action-mix {
    margin: 0.15rem 0 0.25rem;
  }
  .hand-banner {
    min-height: 142px;
  }
  .frequency-row {
    padding: 0.4rem 0;
  }
}
@media (max-width: 570px) {
  .topbar-inner,
  .workspace {
    width: calc(100% - 1.5rem);
  }
  .topbar-inner {
    height: 55px;
  }
  .brand {
    font-size: 1.24rem;
    gap: 0.47rem;
  }
  .brand-tile {
    width: 28px;
    height: 28px;
    font-size: 1.29rem;
    border-radius: 8px;
  }
  .top-actions {
    gap: 0.58rem;
  }
  .text-action {
    font-size: 0.8rem;
    gap: 0.28rem;
  }
  .top-actions .icon {
    transform: scale(0.85);
  }
  .workspace {
    padding-top: 1.2rem;
  }
  .workspace-intro {
    gap: 0.55rem;
    margin-bottom: 0.8rem;
  }
  .game-type {
    font-size: 0.72rem;
  }
  h1 {
    margin-top: 0.2rem;
    font-size: clamp(1.55rem, 6.4vw, 2rem);
  }
  .primary {
    min-height: 36px;
    padding: 0.43rem 0.64rem;
    font-size: 0.82rem;
    gap: 0.35rem;
  }
  .scenario-strip {
    gap: 0.33rem;
    margin-bottom: 0.7rem;
  }
  .scenario-strip > :is(span, div, button) {
    padding: 0.25rem 0.45rem;
    min-height: 27px;
    font-size: 0.77rem;
  }
  .scenario-strip small,
  .chip small {
    font-size: 0.72rem;
  }
  .action-panel {
    padding: 0.7rem;
    margin-bottom: 0.7rem;
  }
  .history-titlebar {
    gap: 0.3rem;
  }
  .history-track {
    padding-top: 0.24rem;
  }
  .decision-controls {
    gap: 0.55rem 1rem;
  }
  .decision-stat small {
    font-size: 0.71rem;
  }
  .decision-stat strong {
    font-size: 0.9rem;
  }
  .action-buttons {
    width: 100%;
    flex-basis: 100%;
  }
  .action-buttons button,
  .move {
    font-size: 0.8rem;
    padding: 0.34rem 0.47rem;
    min-height: 30px;
  }
  .study-layout {
    gap: 0.7rem;
  }
  .range-panel,
  .detail-panel {
    padding: 0.72rem;
  }
  .panel {
    border-radius: 10px;
  }
  .group-title {
    gap: 0.42rem;
  }
  .group-title h2 {
    font-size: 1rem;
  }
  .detail-panel {
    display: flex;
  }
  .detail-panel > .section-titlebar,
  .range-panel > .section-titlebar {
    margin-bottom: 0.65rem;
  }
  .hand-banner {
    width: 100%;
    min-height: 90px;
    padding: 0.65rem 0.9rem;
  }
  .cards {
    height: 66px;
  }
  .playing-card {
    width: 37px;
    height: 53px;
    padding: 4px;
  }
  .playing-card b {
    font-size: 1.1rem;
  }
  .playing-card i {
    font-size: 0.7rem;
  }
  .playing-card::after {
    font-size: 1.45rem;
  }
  .action-mix {
    width: 100%;
    margin-top: 0.8rem;
  }
  .detail-panel > .section-titlebar,
  .model-status {
    width: 100%;
  }
  .frequency-row {
    min-height: 31px;
    padding: 0.3rem 0;
  }
  .distribution {
    height: 9px;
    margin: 0.45rem 0 0.55rem;
  }
  .matrix {
    gap: 1.2px;
  }
  .matrix button,
  .matrix .cell {
    height: clamp(22px, 6.3vw, 30px);
    font-size: clamp(0.54rem, 2.1vw, 0.72rem);
  }
  .matrix :is(button, .cell)::after {
    height: 3px;
  }
  .range-foot {
    padding-top: 0.55rem;
    margin-top: 0.6rem;
  }
  .dialog-head,
  .dialog-body {
    padding: 0.8rem;
  }
  .dialog-body th,
  .dialog-body td {
    font-size: 0.78rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}
