/* Compact 2-cell collection HUD. Hide leftover「本局获得」parchment. */

.a15-mid-panels {
  display: none !important;
}

.a15-progress-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 4%;
  box-sizing: border-box;
  width: 22%;
  aspect-ratio: 2.35 / 1;
  padding: 1.4% 1.3% 1.6%;
  overflow: hidden;
  border: .18em solid #2c1608;
  border-radius: .45em;
  background:
    linear-gradient(180deg, #6a3d1c 0%, #3d2110 100%);
  box-shadow:
    inset 0 0 0 .12em rgba(196, 148, 86, .55),
    0 .18em .35em rgba(12, 4, 1, .45);
}

.a15-progress-board > img {
  display: none !important;
}

.a15-progress-cell,
.a15-progress-unique,
.a15-progress-total {
  position: relative;
  inset: auto;
  top: auto;
  left: auto;
  right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  height: auto;
  min-width: 0;
  padding: 7% 4% 8%;
  border-radius: .28em;
  background:
    radial-gradient(ellipse at 30% 18%, rgba(255, 246, 214, .55), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 8px, rgba(92, 48, 18, .07) 9px),
    #e6cf9a;
  box-shadow: inset 0 0 0 1px rgba(92, 48, 18, .28);
}

.a15-progress-cell span {
  display: block !important;
  flex: 0 0 auto;
  margin: 0;
  color: #23150d;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "FangSong", serif;
  font-size: clamp(15px, 1.7vw, 26px);
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.05;
  text-shadow: 0 1px 0 rgba(255, 244, 214, .7);
}

.a15-progress-cell b,
.a15-progress-cell b.art-number {
  display: flex !important;
  flex: 1 1 auto;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 0;
  margin-top: auto;
  padding-bottom: 10%;
  transform: none !important;
  gap: 1px;
  color: #6b2418;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.a15-progress-cell .art-digit {
  display: block;
  height: clamp(14px, 1.7vw, 22px);
  filter: drop-shadow(0 1px 0 rgba(88, 32, 8, .35));
}

.a15-progress-cell .art-number-symbol {
  color: #6b2418;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: .72em;
  font-weight: 900;
}

@media (max-aspect-ratio: 4 / 5) {
  .a15-progress-board {
    position: absolute !important;
    left: 3.5% !important;
    top: max(13.5%, calc(env(safe-area-inset-top) + 11.5%)) !important;
    width: min(31vw, 168px) !important;
    max-width: 168px;
    aspect-ratio: 2.15 / 1;
    padding: 5px 5px 6px;
    gap: 5px;
  }

  .a15-progress-cell {
    padding: 8% 3% 12%;
  }

  .a15-progress-cell span {
    font-size: clamp(11px, 3.1vw, 14px);
    letter-spacing: .06em;
  }

  .a15-progress-cell b,
  .a15-progress-cell b.art-number {
    align-items: flex-end;
    margin-top: auto;
    padding-bottom: 8%;
  }

  .a15-progress-cell .art-digit {
    height: clamp(11px, 3.2vw, 15px);
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .a15-progress-board {
    top: 1.2%;
    width: 24%;
  }
}

/* Landscape header: one 3-column strip so left / logo / right stay aligned across widths. */
@media (min-aspect-ratio: 4 / 5) {
  .a15-main-shell .topbar {
    position: absolute;
    inset: auto;
    left: clamp(8px, 1.4vw, 22px);
    right: clamp(8px, 1.4vw, 22px);
    top: max(6px, env(safe-area-inset-top));
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(132px, 0.95fr) minmax(140px, 1.2fr) minmax(168px, 1.05fr);
    align-items: start;
    column-gap: clamp(6px, 1.1vw, 18px);
    pointer-events: none;
  }

  .a15-progress-board {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 268px;
    justify-self: start;
  }

  .a15-main-shell .title-brand {
    position: relative !important;
    left: auto !important;
    top: 0 !important;
    width: min(100%, 320px) !important;
    justify-self: center;
  }

  .a15-top-actions {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    max-width: 360px;
    justify-self: end;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: clamp(4px, 0.6vw, 10px);
  }

  .a15-round-action {
    width: clamp(52px, 7vw, 86px) !important;
    flex: 0 0 auto;
  }

  .a15-side-tools {
    width: min(48%, 150px) !important;
  }
}

@media (max-aspect-ratio: 4 / 5) {
  .a15-side-tools {
    margin-top: 0 !important;
  }
}

@media (min-aspect-ratio: 4 / 5) and (max-height: 520px) {
  .a15-progress-board { max-width: 200px; }
  .a15-main-shell .title-brand { width: min(100%, 220px) !important; }
  .a15-round-action { width: clamp(40px, 9vh, 62px) !important; }
}

/* Play canvas fills the desk. HUD stays above via z-index so cards/hands
   are not chopped by the old 24% frame line. */
.a15-main-shell .game-frame {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 2;
  overflow: hidden;
}

.a15-main-shell #game-canvas {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
