/* Interactive American Mahjong Defense, Safe Discards & Exposure Reader */

.guide-content,
.guide-section {
  min-width: 0;
}

.hero-actions,
.mf-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.toc {
  margin-bottom: 18px;
}

.toc a {
  display: block;
  padding: 4px 0;
}

.vs-matrix-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.df-card {
  background: var(--sheet);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0 24px;
  box-shadow: var(--shadow-card);
}

.df-step-label {
  display: block;
  font: 700 11.5px/1.3 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.df-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.df-btn {
  appearance: none;
  min-height: 48px;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--parchment);
  color: var(--ink-pine);
  font: 700 12.5px/1.25 var(--sans);
  text-align: left;
  cursor: pointer;
  transition: transform 130ms ease, border-color 140ms ease, background 140ms ease;
}

.df-btn small {
  display: block;
  font: 500 11px/1.25 var(--sans);
  color: var(--muted);
  margin-top: 3px;
}

html[data-salon-theme="baize"] .df-btn {
  background: rgba(255, 255, 255, 0.05);
}

.df-btn:hover:not([aria-pressed="true"]) {
  border-color: var(--green);
  transform: translateY(-1px);
}

.df-btn[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #fffdf8;
}

.df-btn[aria-pressed="true"] small {
  color: rgba(255, 255, 255, 0.85);
}

html[data-salon-theme="baize"] .df-btn[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #14251d;
}

html[data-salon-theme="baize"] .df-btn[aria-pressed="true"] small {
  color: rgba(20, 37, 29, 0.82);
}

/* Emerald Felt Opponent Rack & Discard Risk Analyzer */
.df-felt-stage {
  border-radius: 11px;
  background: linear-gradient(180deg, #163327 0%, #0d2219 100%);
  border: 1px solid #2b5844;
  padding: 15px;
  color: #f6f0e3;
  margin-bottom: 14px;
}

.df-stage-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.df-board-badge {
  padding: 4px 10px;
  border-radius: 6px;
  background: #fffdf7;
  color: #163024;
  font: 800 11.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.df-risk-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font: 800 10.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

.df-risk-pill.safe {
  background: #a7f3d0;
  color: #064e3b;
}

.df-risk-pill.caution {
  background: #fde68a;
  color: #78350f;
}

.df-risk-pill.danger {
  background: #fecaca;
  color: #7f1d1d;
}

.df-rack-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 12px;
}

.df-rack-kicker {
  display: block;
  font: 800 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ec0b0;
  margin-bottom: 7px;
}

.df-tile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.df-meld-sep {
  width: 8px;
}

.df-tile {
  width: 38px;
  height: 50px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fffdf8 0%, #f1e8d4 100%);
  border: 1px solid #d7ccb4;
  box-shadow: 0 3px 0 #baa989, 0 5px 10px rgba(0, 0, 0, 0.26);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #163024;
  font-family: var(--sans);
}

.df-tile.is-joker {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border-color: #d97706;
  color: #78350f;
}

.df-tile.is-candidate {
  outline: 2px solid #fde68a;
  outline-offset: 2px;
}

.df-tile b {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.05;
}

.df-tile span {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #4a5d52;
  margin-top: 2px;
}

.df-verdict-box {
  padding: 11px 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.df-verdict-title {
  margin: 0 0 5px;
  font: 800 14.5px/1.3 var(--sans);
  color: #fffdf8;
}

.df-verdict-desc {
  margin: 0 0 7px;
  font: 400 13px/1.5 var(--sans);
  color: rgba(246, 240, 227, 0.92);
}

.df-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font: 700 11.5px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #fde68a;
}

.df-load-btn {
  appearance: none;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--parchment);
  color: var(--ink-pine);
  font: 700 11.5px/1.2 var(--sans);
  cursor: pointer;
}

html[data-salon-theme="baize"] .df-load-btn {
  background: rgba(255, 255, 255, 0.08);
}

.df-load-btn:hover {
  border-color: var(--green);
}

@media (prefers-reduced-motion: reduce) {
  .df-btn {
    transition: none !important;
  }
}

@media (max-width: 700px) {
  .df-btn-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
