.rank-shell { max-width: 620px; }

.rank-hero {
  min-height: 168px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
  border-radius: 18px;
  color: var(--ink);
  background: linear-gradient(115deg, rgba(255,248,232,.98), rgba(230,218,190,.96));
  box-shadow: var(--shadow);
}

.rank-hero::after {
  content: 'A K Q J';
  position: absolute;
  right: -18px;
  bottom: -12px;
  color: rgba(17,34,29,.045);
  font: 700 4.5rem/1 "Bodoni 72", Didot, serif;
  transform: rotate(-8deg);
}

.rank-hero .section-kicker { color: #587067; }
.rank-hero-value { font: 700 6rem/.9 "Bodoni 72", Didot, serif; letter-spacing: -.06em; }
.rank-hero-value.empty { color: #9ba9a3; }
.rank-hero-value.low { color: #27825d; }
.rank-hero-value.neutral { color: #a97912; }
.rank-hero-value.high { color: #c33f32; }
.rank-hero .undo-button { z-index: 1; }

.rank-entry-panel { margin-bottom: 14px; }
.simple-rank-pad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.simple-rank-button {
  min-width: 0;
  min-height: 66px;
  display: grid;
  place-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--cream);
  background: rgba(0,0,0,.17);
  transition: transform .1s ease, background .15s ease;
}

.simple-rank-button.low { border-color: rgba(93,204,139,.42); background: rgba(39,130,93,.12); }
.simple-rank-button.neutral { border-color: rgba(229,185,75,.42); background: rgba(169,121,18,.12); }
.simple-rank-button.high { border-color: rgba(226,85,62,.44); background: rgba(195,63,50,.12); }
.simple-rank-button.low strong { color: #8de4b2; }
.simple-rank-button.neutral strong { color: #f3cf71; }
.simple-rank-button.high strong { color: #ff9484; }
.simple-rank-button strong { font: 700 1.55rem/1 "Bodoni 72", Didot, serif; }
.simple-rank-button small { color: var(--muted); font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; }
.simple-rank-button:active { transform: scale(.94); background: var(--cream); color: var(--ink); }
.simple-rank-button:disabled { opacity: .28; cursor: not-allowed; }

.rank-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 13px; color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; }
.rank-legend span::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; vertical-align: 1px; }
.rank-legend .low::before { background: var(--green); }
.rank-legend .neutral::before { background: var(--yellow); }
.rank-legend .high::before { background: var(--red); }

.simple-history { display: flex; gap: 7px; min-height: 48px; margin-top: 13px; overflow-x: auto; }
.simple-history > span:not(.muted) {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 48px;
  border-radius: 7px;
  color: var(--ink);
  background: var(--paper);
  font: 700 1.2rem/1 "Bodoni 72", Didot, serif;
}
.simple-history > span.low { color: #27825d; }
.simple-history > span.neutral { color: #9d7112; }
.simple-history > span.high { color: #c33f32; }

.rank-composition { display: grid; gap: 8px; margin-top: 16px; }
.rank-row { display: grid; grid-template-columns: 24px 1fr 26px; gap: 10px; align-items: center; }
.rank-row b, .rank-row strong { font: 700 .82rem/1 "SFMono-Regular", monospace; }
.rank-row > span { height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.rank-row i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.rank-row strong { text-align: right; color: var(--muted); }
.rank-row strong.low { color: var(--yellow); }

.accuracy-note { padding: 18px 4px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.accuracy-note strong { color: var(--cream); }
.accuracy-note p { margin: 5px 0 10px; }
.accuracy-note a { color: var(--cream); text-underline-offset: 3px; }

@media (min-width: 540px) {
  .simple-rank-pad { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
