/* Oak Seal v2 uses content-sized cards in a two-column grid. */
.game-shell {
  --oak-stage-growth: max(0px, calc(var(--oak-skills-height, var(--skill-row)) - var(--skill-row)));
  height: calc(max(100dvh, 1000px) + var(--slate-extra-stage-height) + var(--oak-stage-growth));
  grid-template-rows: 90px max-content 114px minmax(180px, 1fr) max-content max-content;
}
.game-shell .forest { bottom: var(--oak-stage-growth); }
.helper-launch {
  bottom: calc(var(--oak-skills-height, var(--skill-row)) + var(--tap-row) + var(--dock-height) + var(--safe-bottom) + 20px);
}
.skills-grid.oak-skills {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  align-items: stretch;
  padding: 8px 8px 16px;
  background: linear-gradient(transparent, #0a2028 70%);
}
.oak-skills .oak-card {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  height: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
}
.oak-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid transparent;
  border-image-source: url('./assets/oak-seal-v2/card-oak.webp');
  border-image-slice: 118 100 67 112 fill;
  border-image-width: 44px 36px 25px 40px;
  border-image-repeat: stretch;
  pointer-events: none;
}
.oak-content {
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  grid-template-areas: 'medallion title' 'medallion description' 'medallion effect' 'medallion upgrade';
  column-gap: 2.6cqw;
  row-gap: 1.7cqw;
  align-content: center;
  align-items: center;
  min-height: max(57.27cqw, 156px);
  height: 100%;
  padding: 7.5cqw 5cqw 7.5cqw 4.5cqw;
}
.oak-medallion {
  grid-area: medallion;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  align-self: center;
  filter: drop-shadow(0 2px 2px #02070a80);
}
.oak-art { position: absolute; display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.oak-enamel { inset: 18%; width: 64%; height: 64%; }
.oak-talisman { inset: 23.5%; width: 53%; height: 53%; }
.oak-marker {
  position: absolute;
  width: 9.2%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, #17232b, #0a1117 74%);
  box-shadow: inset 0 1px 2px #000d, 0 1px 1px #9eacb2;
  pointer-events: none;
}
.oak-marker.lit::before {
  content: '';
  position: absolute;
  inset: 16%;
  border-radius: inherit;
  background: radial-gradient(circle at 46% 38%, #e7ffe0 10%, #70ff9b 35%, #22cb61 70%, #0b8636);
  box-shadow: 0 0 1.2cqw #42e67c;
}
.oak-title, .oak-label, .oak-effect { min-width: 0; margin: 0; }
.oak-title {
  grid-area: title;
  color: #fff0d9;
  font-size: clamp(14px, 5.45cqw, 25px);
  line-height: 1.1;
  font-weight: 800;
}
.oak-label { grid-area: description; color: #c1d0d6; font-size: clamp(11px, 3.86cqw, 18px); line-height: 1.25; }
.oak-effect {
  grid-area: effect;
  display: flex;
  flex-wrap: wrap;
  gap: .25em;
  color: #d6f2db;
  font-size: clamp(14px, 5.45cqw, 25px);
  line-height: 1.18;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.oak-effect > span { white-space: nowrap; }
.oak-skills .oak-upgrade:is(:enabled, :disabled) {
  grid-area: upgrade;
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: max(44px, 12.73cqw);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  box-shadow: none;
  color: #ffdc94;
  translate: none;
  transform: none;
  filter: none;
  opacity: 1;
}
.oak-upgrade-face {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35em;
  width: 100%;
  min-height: 44px;
  height: 100%;
  padding: 5px max(9px, 2.5cqw);
  color: #ffdc94;
  font-size: clamp(13px, 5.15cqw, 24px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: transform 90ms ease-out, filter 90ms ease-out;
}
.oak-upgrade-face::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid transparent;
  border-image-source: url('./assets/oak-seal-v2/upgrade-slate.webp');
  border-image-slice: 45 63 44 63 fill;
  border-image-width: 11px 16px;
  filter: drop-shadow(0 2px 1px #04090e8c);
  pointer-events: none;
}
.oak-upgrade-face img { width: clamp(13px, 5.2cqw, 25px); height: clamp(13px, 5.2cqw, 25px); object-fit: contain; }
.oak-chevron { width: .38em; height: .38em; border: solid currentColor; border-width: .13em 0 0 .13em; transform: translateY(20%) rotate(45deg); margin-left: .2em; }
.oak-upgrade:disabled .oak-upgrade-face { opacity: .65; }
.oak-upgrade:not(:disabled):active .oak-upgrade-face { transform: translateY(1px); }
.oak-upgrade:not(:disabled):hover .oak-upgrade-face { filter: brightness(1.06); }
.oak-upgrade:focus-visible, .oak-card:focus-visible { outline: 2px solid #d6f2db; outline-offset: 2px; }
@container (max-width: 239px) {
  .oak-content {
    grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
    grid-template-areas: 'title title' 'medallion description' 'medallion effect' 'upgrade upgrade';
    gap: 6px 5px;
    padding: 16px 12px 15px;
    min-height: 170px;
  }
  .oak-title { font-size: 14px; text-align: center; overflow-wrap: anywhere; }
  .oak-label { font-size: 11px; }
  .oak-effect { font-size: 14px; gap: 2px; }
  .oak-upgrade-face { padding-inline: 4px; gap: 3px; }
  .oak-card::before { border-image-width: 30px 19px 20px 22px; }
}
@media (max-width: 380px) {
  .skills-grid.oak-skills { gap: 8px; padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .oak-upgrade-face { transition: none; }
  .oak-upgrade:not(:disabled):active .oak-upgrade-face { transform: none; }
}
