.game-dialog[data-collection] {
  --dialog-width: 31rem;
  --collection-edge: clamp(.68rem, 3vw, 1.15rem);
  --collection-line: #c3ab78a1;
  --collection-text: #294536;
  --collection-muted: #4f5f4d;
  padding: 0; border: 1px solid #c2ab77; border-radius: 16px 7px 16px 7px;
  background: radial-gradient(ellipse at 14% 0%, #edf2df, transparent 63%), linear-gradient(156deg,#fffdf1,#f6edcf);
  box-shadow: inset 0 0 0 1px #ffffef, 0 4px 0 #aa895a8a, 0 18px 48px #20372a7d;
  color: var(--collection-text);
}
.game-dialog[data-collection]::backdrop { background: #243c30a1; }
.collection-heading {
  position: relative; flex: none; padding: clamp(.75rem, 3dvh, 1.38rem) calc(var(--collection-edge) + var(--touch))
    clamp(.66rem, 2dvh, 1rem) var(--collection-edge);
  border-bottom: 1px solid var(--collection-line);
  background: linear-gradient(90deg, #edf2df83, #edf2df0e 78%),
    #e5efdb url("assets/profile-collection-header-celadon.webp") center / cover no-repeat;
}
.collection-heading::after {
  content: ""; position: absolute; bottom: -1px; left: var(--collection-edge); width: 2.4rem; height: 2px;
  background: #b99559; box-shadow: 0 0 6px #d0b9826c;
}
.game-dialog .collection-heading h2 {
  margin: 0 0 .2rem; padding: 0; color: #244635; text-align: left;
  font: 800 clamp(1.32rem, 5.8vw, 1.86rem)/1.12 "Songti SC", "Noto Serif CJK SC", serif;
  letter-spacing: .065em;
}
.collection-heading p { margin: 0; color: #4d5e49; font-size: var(--text-small); font-variant-numeric: tabular-nums; }
.game-dialog[data-collection] .dialog-close {
  top: .45rem; right: .5rem; border: 1px solid #b8a375; border-radius: 9px 3px 9px 3px;
  background: linear-gradient(145deg, #fff9e3, #e2ead4); color: #3c5842;
  box-shadow: inset 0 0 0 2px #fffef080, 0 2px 7px #43533335;
}
.collection-close-icon { display: grid; place-items: center; }
.collection-close-icon .icon { width: 1.18rem; height: 1.18rem; stroke-width: 1.5; }
.game-dialog[data-collection] button:focus-visible, .game-dialog[data-collection] .avatar-options-scroll:focus-visible {
  outline: 2px solid #536e4c; outline-offset: -2px;
}
.game-dialog[data-collection] .dialog-body { color: var(--collection-text); }
.game-dialog[data-collection] .dialog-actions {
  justify-content: flex-end; margin: 0; padding: .42rem var(--collection-edge) .55rem;
  border-top: 1px solid #b39b675f; background: linear-gradient(110deg,#f3edd9,#f9f4e1);
}
.game-dialog[data-collection] .dialog-actions:empty { display: none; }
.game-dialog[data-collection] .dialog-actions .game-button {
  flex: 0 1 auto; min-width: 6.5rem; min-height: 44px; padding: .25rem .7rem;
  border: 1px solid #a8a979; border-radius: 8px 3px 8px 3px;
  background: linear-gradient(#f1f3df,#e1e8cf); color: #34543c; box-shadow: inset 0 1px #fffeee;
  font-size: var(--text-label);
}
.game-dialog[data-collection] .dialog-actions .game-button:active { background: #d6e3c4; }
.game-dialog[data-collection="achievement"] .dialog-scroll {
  position: relative; padding: .18rem var(--collection-edge) .65rem;
  overflow-x: hidden;
}
.game-dialog[data-collection="achievement"] .dialog-body { display: flow-root; }
.achievement-group-title {
  display: flex; align-items: center; gap: .45rem; margin: .65rem 0 .26rem;
  color: #3d5c46; font-size: var(--text-label); letter-spacing: .07em;
}
.achievement-group-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg,#b29b6d84,transparent); }
.achievement-choice {
  position: relative; display: grid; align-content: start; justify-items: stretch; width: 100%; height: 100%; min-width: 0;
  padding: .18rem .24rem .33rem; border: 1px solid #bdc8ab; border-radius: 9px 4px 9px 4px;
  background: linear-gradient(102deg, #edf2e3, #fbf8e9 82%); color: var(--collection-text); text-align: left;
}
.achievement-choice .achievement-plate { width: 100%; }
.achievement-choice[aria-pressed="true"] {
  border-color: #a59058; background: linear-gradient(105deg, #dde9d0, #edf2db);
  box-shadow: inset 0 0 0 1px #fff4d0ae;
}
.achievement-choice[data-ready="true"]::before { top: .28rem; right: .28rem; }
.achievement-choice:disabled { border-color: #c9cbbf; background: #efefe7; }
.achievement-choice-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .12rem .24rem; padding-inline: .12rem;
  color: var(--collection-muted); font-size: var(--text-micro); line-height: 1.28; font-variant-numeric: tabular-nums;
}
.achievement-choice-progress { margin-inline-start: auto; color: #5e655a; white-space: nowrap; }
.achievement-choice-meta strong { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: auto; white-space: nowrap; }
.achievement-choice-progress + strong { margin-inline-start: 0; }
.achievement-choice-meta .icon { width: 12px; height: 12px; }
.achievement-choice-selected { color: #3c6443; }
.achievement-choice-locked { color: #535b51; }
.game-dialog[data-collection="portrait"] .dialog-scroll,
.game-dialog[data-collection="portrait"] .dialog-body {
  display: flex; flex-direction: column; min-height: 0; overflow: clip; padding: 0;
}
.avatar-picker-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: none; margin: .36rem var(--collection-edge);
  border-block-end: 1px solid #bba77966;
}
.avatar-picker-tabs button {
  min-height: 44px; padding: .28rem .32rem; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: #536453; font-size: var(--text-label); font-weight: 780;
}
.avatar-picker-tabs button[aria-pressed="true"] {
  border-color: #ac8c55; background: linear-gradient(0deg,#c9dec0a3,transparent 86%); color: #274f39;
}
.avatar-options-scroll {
  min-height: 0; padding: .1rem var(--collection-edge) .65rem;
  overflow: hidden auto; overscroll-behavior: contain;
  scroll-padding: .22rem;
}
.avatar-options {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 4.35rem), 1fr)); gap: .45rem;
}
.avatar-choice {
  position: relative; display: grid; align-content: start; justify-items: center; gap: .22rem; min-width: 0;
  padding: .25rem .18rem .4rem; border: 1px solid #c0c9af; border-radius: 9px 3px 9px 3px;
  background: linear-gradient(155deg, #f4f7e9, #eef0df 67%); color: #385443;
  font-weight: 780; font-size: var(--text-small); line-height: 1.24; text-wrap: balance;
}
.avatar-choice-art {
  display: grid; place-items: center; width: min(100%, 3.9rem); aspect-ratio: 1;
  background: radial-gradient(ellipse, #fbf2cb, #deebd2a3 48%, transparent 69%);
}
.avatar-choice-art > img { width: 75%; height: auto; aspect-ratio: 1; object-fit: contain; }
.avatar-choice .frame-swatch { width: 97%; }
.avatar-choice .frame-swatch img { width: 68%; height: 68%; }
.avatar-choice .frame-swatch .avatar-frame { width: 100%; height: 100%; }
.avatar-choice[aria-pressed="true"] {
  border-color: #ae985e; background: radial-gradient(ellipse at 50% 13%, #faf0ce, #e7edce 64%, #dce8cc);
  box-shadow: inset 0 0 0 1px #ffffebc9; color: #284a36;
}
.avatar-choice[data-locked="true"] { color: #545c4f; background: #ebece2; border-color: #c9cabd; }
.avatar-choice[data-locked="true"] img { filter: grayscale(.8); opacity: .65; }
.avatar-choice-lock {
  position: absolute; top: .25rem; right: .25rem; display: grid; place-items: center; width: 1.15rem; aspect-ratio: 1;
  border: 1px solid #a9b39f; border-radius: 50%; background: #e9efdf; color: #526250; pointer-events: none;
}
.avatar-choice-lock .icon { width: .72rem; height: .72rem; }
.frame-choice[data-locked="true"] .frame-swatch::after { display: none; }
@media (hover: hover) and (pointer: fine) {
  .achievement-choice:enabled:hover, .avatar-choice:hover { border-color: #a89358; }
}
