/* 小组合作沿用纸张、薄荷绿和柔和的四组识别色。 */
.record-views { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
#collection-entry b { min-width: 18px; padding: 1px 5px; border-radius: 6px; background: #ecefdc; font-size: 10px; }
#team-toggle[aria-pressed="true"] { color: #326d50; background: #e9f2e7; border-color: #c8ddbe; }
.sticker-setting { display: grid; gap: 8px; padding: 10px 14px; font-size: 13px; }
.sticker-setting select { width: 100%; min-height: 42px; border: 1px solid #d4dfcd; border-radius: 9px; background: #f7faf2; padding: 6px 8px; color: var(--ink); font: inherit; }
#settingsMenu { max-height: calc(100dvh - 28px); overflow-y: auto; }
.team-board { padding: 0 20px 20px; }
.team-mode .board-footer, .team-mode .page-footer { display: none; }
.team-mode .board-header { flex-direction: row; }
.board-actions { margin-left: auto; justify-content: flex-end; }
.board-actions #team-toggle, .board-actions .board-settings { flex: 0 0 auto; white-space: nowrap; }
#team-next-round { order: -1; }
.team-mode .board-actions { flex-wrap: nowrap; min-width: 0; }
.team-mode .board-actions .button { flex: 0 0 auto; white-space: nowrap; }
.team-mode .board-settings { margin-left: 0; }
.team-primary { background: #e8f2da; border-color: #bdd29d; color: #3f6448; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.group-panel { min-width: 0; padding: 15px; border: 1px solid #e2e8dc; border-top: 4px solid var(--team); border-radius: 18px; background: #fdfefb; }
.group-complete { background: #f7fbed; }
.group-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.group-number { display: grid; place-items: center; background: var(--team); color: white; width: 34px; height: 34px; border-radius: 10px; font-weight: 800; flex-shrink: 0; }
.group-title h3 { flex: 1; min-width: 0; font-size: 16px; overflow-wrap: anywhere; }
.group-count { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.group-title span:not(.group-number) { font-size: 11px; color: #778371; }
.puzzle-scroll { overflow-x: auto; padding: 2px; }
.puzzle-canvas { min-width: calc(var(--cols) * 44px); position: relative; width: min(100%, 340px); aspect-ratio: 1; margin-inline: auto; overflow: visible; border: 3px solid white; border-radius: 14px; box-shadow: 0 0 0 1px #e0e6d7; background: #f1f3e9; }
.puzzle-canvas > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; }
.puzzle-pieces { position: absolute; inset: 0; display: grid; overflow: visible; grid-template-columns: repeat(var(--cols),minmax(0,1fr)); grid-template-rows: repeat(var(--rows),minmax(0,1fr)); }
/* 每块图像独立翻转，重绘使用原始时间继续播放。 */
/* 点击区域仍覆盖整块拼图，SVG 只负责绘制凹凸边缘。 */
.puzzle-piece { position: relative; display: block; min-width: 0; padding: 0; border: 0; background: transparent; color: #52674a; perspective: 650px; isolation: isolate; pointer-events: auto; --piece-paper: #f1f5e9; }
.piece-flipper { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transform: rotateY(0deg); }
.puzzle-piece.is-done .piece-flipper { transform: rotateY(180deg); }
.puzzle-piece.is-flipping .piece-flipper { animation: puzzle-flip 540ms cubic-bezier(.2,.65,.3,1) var(--flip-delay) both; }
.piece-front, .piece-back { position: absolute; inset: 0; display: flex; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: visible; pointer-events: none; }
.piece-front { flex-direction: column; align-items: center; justify-content: center; padding: 12% 18%; }
.puzzle-piece:nth-child(3n+2) { --piece-paper: #e2edd7; }
.puzzle-piece:nth-child(3n) { --piece-paper: #f8efd6; }
.piece-art { position: absolute; left: -20%; top: -20%; width: 140%; height: 140%; max-width: none; overflow: visible; pointer-events: none; }
.piece-paper { fill: var(--piece-paper); stroke: #aaba9a; stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: visiblePainted; }
.piece-seam { fill: none; stroke: #ffffffe6; stroke-width: 1.4; vector-effect: non-scaling-stroke; pointer-events: none; }
.piece-art image { pointer-events: visiblePainted; }
.piece-front b { position: relative; font-size: clamp(14px,1.7vw,25px); font-variant-numeric: tabular-nums; }
.piece-front small { position: relative; font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.piece-back { transform: rotateY(180deg); align-items: flex-end; padding: 3px; }
.piece-back > span { position: relative; font-size: 10px; line-height: 17px; padding: 0 4px; background: #ffffffe6; color: #386c4b; border-radius: 4px; }
.piece-back > i { position: absolute; right: 4px; bottom: 1px; color: #398257; font-size: 22px; font-style: italic; text-shadow: 0 1px white,1px 0 white,-1px 0 white; }
.puzzle-piece:focus-visible { z-index: 2; outline-offset: -4px; }
@media (hover: hover) { .puzzle-piece:hover:not(.is-done) .piece-front { filter: brightness(.96); } }
@keyframes puzzle-flip { from { transform: rotateY(var(--flip-from)); } to { transform: rotateY(var(--flip-to)); } }
.puzzle-spare { position: relative; pointer-events: none; }
.puzzle-spare .piece-art image { pointer-events: none; }
.group-reward { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.group-reward small, .group-reward strong { display: block; }
.group-reward small { font-size: 10px; color: #8a967d; margin-bottom: 3px; }
.group-reward strong { font-size: 13px; }
.group-reward .button { font-size: 11px; padding: 7px 10px; min-height: 36px; }
.group-empty { min-height: 180px; display: grid; place-content: center; gap: 12px; text-align: center; font-size: 13px; color: #8a967d; }

.game-dialog { margin: auto; padding: 24px; width: min(960px, calc(100% - 32px)); max-height: calc(100dvh - 40px); border: 1px solid #dce5d5; border-radius: 24px; background: #fbfcf6; color: var(--ink); overflow-y: auto; box-shadow: 0 20px 80px #193a3d33; }
.game-dialog::backdrop { background: #263c3a88; backdrop-filter: blur(4px); }
.game-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.game-dialog-header .section-kicker { font-size: 11px; color: #8b9a79; }
.game-dialog-header h2 { font-size: 25px; margin-block: 4px; }
.game-dialog-header p { font-size: 12px; color: #7e8b75; }
.dialog-close { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; background: #edf1e6; color: #6e8065; font-size: 24px; }
.game-dialog-open { overflow: hidden; }

#member-move-status { font-size: 12px; color: #6a825a; }
#member-move-status:not(:empty) { margin-bottom: 12px; }
.groups-dialog-header { align-items: center; }
.groups-header-copy { flex: 1; min-width: 0; }
.group-distribute-actions { display: flex; gap: 8px; flex-shrink: 0; }
.group-distribute-actions .button { min-height: 42px; white-space: nowrap; }
.groups-dialog { width: min(1440px,calc(100% - 32px)); }
.group-drop-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.group-drop-zone { min-width: 0; border: 1px solid #dce5d2; border-top: 4px solid var(--team); border-radius: 14px; padding: 10px; background: #f1f5eb; transition: background .15s, box-shadow .15s; }
.group-drop-zone.is-drop-target { background: #e1edcf; box-shadow: inset 0 0 0 2px var(--team); }
.group-drop-heading label { display: grid; gap: 6px; color: #73816a; font-size: 11px; }
.group-drop-heading input, .group-drop-heading select { width: 100%; min-width: 0; min-height: 38px; padding: 7px; border: 1px solid #d5dfca; border-radius: 8px; background: white; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; }
.group-drop-target { width: 100%; height: 30px; margin-top: 6px; border-radius: 7px; color: #49663a; background: #e2edda; font-size: 11px; }
.group-drop-target:disabled { opacity: .4; cursor: default; }
.group-member-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(68px,1fr)); align-content: start; gap: 7px; padding-top: 10px; min-height: 140px; }
.member-chip { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; width: 100%; min-width: 0; min-height: 56px; padding: 7px 3px; border: 1px solid #d8e1cd; border-radius: 9px; background: #fffefa; color: #53674b; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.member-chip b { flex-shrink: 0; font-size: 21px; font-variant-numeric: tabular-nums; color: var(--team); }
.member-chip span { overflow-wrap: anywhere; font-size: 13px; text-align: center; }
.member-chip.is-selected { border-color: var(--team); box-shadow: inset 0 0 0 1px var(--team); background: #fff9de; }
.member-chip.is-dragging { opacity: .25; }
.member-drag-ghost { position: fixed; z-index: 20; pointer-events: none; max-width: 180px; padding: 12px 18px; border: 2px solid #94af7a; border-radius: 12px; background: #fffdf0; color: #44623b; font-size: 15px; font-weight: 700; box-shadow: 0 9px 22px #385b4538; transform: rotate(-4deg); }
.group-drop-empty { grid-column: 1 / -1; width: 100%; padding: 32px 0; text-align: center; font-size: 12px; color: #929f83; pointer-events: none; }
.group-editor-footer { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 15px; border-top: 1px solid #e0e7d6; }
#group-edit-counts { flex: 1 1 100%; font-size: 12px; color: #75866a; }
#group-edit-error { flex: 1; color: #ab4a3e; font-size: 12px; }
.album-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 7px; padding-bottom: 8px; margin-bottom: 4px; scrollbar-width: thin; }
.album-tabs .button { flex-shrink: 0; white-space: nowrap; font-size: 12px; }
.album-tabs [aria-pressed="true"] { background: #e4eed6; border-color: #c5d5b5; }
.album-dialog { --album-gap: clamp(4px, 1vw, 16px); }
#album-dialog { inset: 0; width: 100%; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); overflow: hidden; }
#album-dialog[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
#album-dialog .game-dialog-header { margin-bottom: 12px; }
.album-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: var(--album-gap); align-content: start; min-height: 0; margin-top: 8px; padding: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.album-stamp { position: absolute; top: 3%; right: 3%; width: 38%; pointer-events: none; }
.album-stamp .honor-stamp { background: #fffaf0dc; box-shadow: 0 1px 4px #6c392429; transform: rotate(12deg); }
.collection-card { border: 1px solid #e0e4d8; background: white; border-radius: clamp(5px, 1vw, 15px); overflow: hidden; text-align: left; align-self: start; min-width: 0; }
.collection-card:disabled { cursor: default; opacity: 1; }
.collection-picture { position: relative; background: #eceee8; aspect-ratio: 1; }
.collection-picture img { width: 100%; height: 100%; display: block; object-fit: cover; }
.collection-card.locked img { filter: grayscale(1); opacity: .22; }
.collection-card.unlocked:hover { border-color: #a1bf88; box-shadow: 0 3px 12px #4d6c4718; }
/* 大屏荣誉画册：大图与可滚动的收藏证书并列。 */
.collection-dialog { width: min(1560px,calc(100% - 32px)); padding: clamp(18px,2.4vw,36px); background: #fffcf1; }
.collection-title-row { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.collection-dialog .game-dialog-header h2 { font-size: clamp(18px,1.7vw,25px); line-height: 1.4; margin: 0; }
.collection-dialog .game-dialog-header .section-kicker { flex-shrink: 0; font-size: 12px; color: #a17730; }
.collection-detail { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(340px,1fr); gap: clamp(24px,3vw,48px); align-items: start; }
#collection-full-image { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: contain; background: #f1eddc; border: 6px solid white; border-radius: 24px; box-shadow: 0 5px 25px #8e713817; }
#collection-history { min-width: 0; max-height: calc(100dvh - 180px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 20px; scrollbar-width: thin; text-align: center; }
.honor-heading > span { color: #a27836; font-size: clamp(16px,1.4vw,20px); font-weight: 700; letter-spacing: .14em; }
.honor-heading h3 { color: #546e4b; font-size: clamp(28px,2.6vw,40px); line-height: 1.4; margin: 9px 0 18px; }
.honor-record { padding-bottom: 24px; }
.honor-record + .honor-record { border-top: 2px dashed #e3d4b6; padding-top: 26px; }
.honor-stamp { position: relative; width: 100%; aspect-ratio: 1; color: #ad3f35; transform: rotate(9deg); border-radius: 50%; background: #fffaf0e8; box-shadow: 0 3px 12px #6c392426; container-type: inline-size; }
.honor-stamp svg { display: block; width: 100%; height: 100%; overflow: visible; }
.honor-stamp circle { fill: none; stroke: currentColor; stroke-width: 3; }
.honor-stamp .stamp-dashed { stroke-width: 1.5; stroke-dasharray: 2 4; }
.honor-stamp .stamp-inner { stroke-width: 1.5; }
.stamp-ring, .stamp-date, .stamp-star { fill: currentColor; font-weight: 800; }
.stamp-ring { font-size: 19px; letter-spacing: 3px; }
.stamp-date { font-size: 17px; letter-spacing: 1px; }
.stamp-star { font-size: 25px; }
.stamp-group { position: absolute; inset: 32% 23%; display: grid; place-items: center; overflow-wrap: anywhere; font-size: 20px; font-size: 10.4cqi; line-height: 1.25; font-weight: 900; }
.stamp-group-long { font-size: 16px; font-size: 7.9cqi; }

.honor-time { display: block; margin: 10px 0 22px; color: #8a7758; font-size: 18px; }
.honor-members { border: 1px solid #eadfc8; border-radius: 17px; background: #fffef9; text-align: left; }
.honor-members summary { padding: 13px 16px; color: #73603f; font-size: 20px; font-weight: 700; cursor: pointer; }
.honor-members > div { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 15px; }
.honor-members span { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; background: #f1f4e7; font-size: 18px; color: #50674a; }
.honor-members b { font-size: 20px; color: #8c713d; }
.collection-image-stage { position: relative; width: min(calc(100% - 40px), calc(100dvh - 200px)); margin: 26px 20px 0 0; aspect-ratio: 1; justify-self: center; overflow: visible; }
.collection-honor { position: absolute; top: -5%; right: -5%; width: clamp(128px, 34%, 248px); pointer-events: none; }
.honor-group { font-size: clamp(25px,2.5vw,36px); line-height: 1.4; color: #546e4b; overflow-wrap: anywhere; margin: 0 0 12px; }
.honor-stamp-choice { margin: 0 0 14px; min-height: 40px; padding: 7px 18px; border: 1px solid #dabdb1; border-radius: 20px; background: #fffaf1; color: #985647; font-size: 17px; }
.honor-stamp-choice[aria-pressed="true"] { color: #fffaf0; background: #ad5145; border-color: #ad5145; }
.collection-image-status { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: #eef1e7; color: #7d8d70; font-size: 13px; border-radius: 17px; }
.collection-assembling #collection-full-image { opacity: .12; filter: saturate(.75); }
.collection-fragments { position: absolute; inset: 0; z-index: 2; overflow: visible; pointer-events: none; border-radius: 24px; }
.collection-fragment { position: absolute; width: 25%; height: 25%; display: block; background-repeat: no-repeat; border: 1px solid #fff9; box-shadow: 0 2px 7px #40513935; transform-origin: center; will-change: transform, opacity; }
.collection-fragments + .collection-image-status { z-index: 3; }
.collection-title-row .section-kicker { white-space: nowrap; }
.context-menu-item[role="switch"] { display: flex; align-items: center; gap: 6px; }
.context-menu-item[role="switch"] strong { margin-left: auto; color: #4c7b55; }
@media (min-width: 1200px) { .team-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } .puzzle-canvas { width: min(100%, 280px); } .group-panel { padding: 12px; }  }
@media (max-width: 820px) {
    .group-drop-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .collection-detail { grid-template-columns: 1fr; }
    #collection-history { max-height: none; overflow: visible; padding-inline: 0; }
    .collection-image-stage { width: calc(100% - 28px); margin: 20px 12px 0 0; }

    .team-grid { gap: 12px; }
    .group-panel { padding: 10px; }
    .group-title { gap: 7px; }
    .group-title h3 { font-size: 14px; }
}
@media (max-width: 620px) {
    .team-mode .board-actions .button { flex: 0 0 auto; }
    .team-mode .board-actions .action-label { font-size: 0; }
    .team-mode .board-actions .action-label::after { content: attr(data-short); font-size: 11px; }
    .group-drop-grid { gap: 8px; }
    .group-member-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .group-drop-zone { padding: 8px; }
    .group-member-list { min-height: 100px; }
    .record-views { gap: 8px; }
    .record-views .report-button { width: auto; min-width: 50px; }
    .record-views .report-label { white-space: nowrap; }
    .team-board { padding: 0 12px 16px; }
    .team-grid { grid-template-columns: 1fr; }
    .group-panel { padding: 13px; }
    .group-title h3 { font-size: 16px; }
    .piece-front b { font-size: 22px; }
    .game-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 20px); padding: 15px; border-radius: 18px; }
    .game-dialog-header h2 { font-size: 21px; }
    .groups-dialog-header { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
    .groups-dialog-header .dialog-close { grid-column: 2; grid-row: 1; }
    .group-distribute-actions { grid-column: 1 / -1; grid-row: 2; }
    .group-distribute-actions .button { flex: 1; }
    .collection-title-row { gap: 7px; }
    .album-tabs { gap: 5px; }
    .album-tabs .button { font-size: 11px; min-height: 40px; padding-inline: 9px; }

    .collection-detail { grid-template-columns: 1fr; gap: 16px; }
    .collection-image-stage { width: calc(100% - 28px); margin: 20px 12px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .puzzle-piece.is-flipping .piece-flipper { animation: none; } }
@media print { .game-dialog, .record-views { display: none !important; } .group-panel { break-inside: avoid; } }

.group-category-field { margin-top: 9px; }
.record-view-icon { width: 24px; height: 24px; flex-shrink: 0; fill: #eaf0df; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.album-view-icon { fill: #fff2ce; color: #8e7439; }
@media (min-width: 821px) and (max-height: 800px) {
    .honor-heading h3 { font-size: 28px; margin-bottom: 12px; }

    .honor-time { margin: 8px 0 16px; }
}
/* 从原图块飞出，金边双面奖牌在屏幕中央旋转，再回到原位。 */
.puzzle-reward-open { overflow: hidden; }
.puzzle-piece.reward-away { background: transparent; }
.puzzle-piece.reward-away .piece-flipper { visibility: hidden; }
.puzzle-reward { position: fixed; inset: 0; margin: 0; padding: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; background: transparent; overflow: hidden; color: #fff9df; }
.puzzle-reward::backdrop { background: #122c3bd6; backdrop-filter: blur(3px); }
.reward-flight { position: absolute; left: 0; top: 0; transform-origin: top left; perspective: 900px; z-index: 2; will-change: transform; }
.reward-medal { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; }
.reward-medal-face { position: absolute; inset: 0; border-radius: 10%; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0 0 2px #fff6b1,0 0 0 4px #dda944,0 2px 0 6px #97651a,0 0 14px 4px #ffdf8b99; overflow: hidden; }
.reward-medal-front { background-repeat: no-repeat; background-color: #fff2c9; transform: translateZ(2px); }
.reward-medal-front canvas { display: block; width: 100%; height: 100%; }
.reward-medal-front::after { content: ''; position: absolute; inset: -80%; background: linear-gradient(115deg,transparent 38%,#fff9 47%,#fff 50%,#fff9 53%,transparent 62%); transform: translateX(-65%); animation: medal-sheen 1.8s .15s ease-in-out both; }
.reward-medal-back { transform: rotateY(180deg) translateZ(2px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; color: #8b5c1e; background: radial-gradient(circle at 30% 25%,#fffce0,#f4cc69 65%,#d9a43c); text-align: center; }
.reward-medal-back span { font-size: clamp(16px,2.5vw,28px); font-weight: 700; }
.reward-medal-back strong { font-size: 20px; line-height: 1.1; }
.reward-aura { position: absolute; width: 100vmin; height: 100vmin; top: 43%; left: 50%; margin: -50vmin 0 0 -50vmin; border-radius: 50%; background: repeating-conic-gradient(from 0deg,#ffe6a31a 0deg 12deg,transparent 12deg 24deg); mask-image: radial-gradient(circle,#000 12%,transparent 67%); animation: reward-rays 2.3s ease-out both; }
.reward-sparkles { position: absolute; left: 50%; top: 43%; pointer-events: none; }
.reward-sparkles i { position: absolute; color: #ffe6a0; font-style: normal; font-size: clamp(20px,3vw,42px); text-shadow: 0 0 18px #ffce64; animation: medal-spark 1.8s var(--spark-delay) ease-out both; }
.reward-cheer { position: absolute; z-index: 3; left: 18px; right: 18px; top: 73%; text-align: center; display: grid; gap: 7px; animation: reward-cheer-in .45s .18s both; }
.reward-cheer p { font-size: clamp(18px,2.2vw,30px); color: #ffedbe; font-weight: 700; }
.reward-cheer strong { font-size: clamp(26px,4vw,54px); line-height: 1.2; text-shadow: 0 3px 0 #7d5c34; }
.reward-cheer > span { font-size: clamp(16px,1.8vw,24px); color: #d7e7d7; }
.reward-skip { position: absolute; right: max(18px,env(safe-area-inset-right)); top: max(18px,env(safe-area-inset-top)); min-height: 44px; padding: 9px 17px; color: #fff5d2; border: 1px solid #e3cd8a77; border-radius: 24px; background: #183b44b3; font-size: 16px; z-index: 4; }
.reward-returning .reward-cheer, .reward-returning .reward-aura, .reward-returning .reward-sparkles { opacity: 0; transition: opacity .22s; }
.reward-returning .reward-cheer, .reward-returning .reward-aura { animation: none; }
.reward-returning .reward-medal-face { box-shadow: none; border-radius: 0; transition: box-shadow .45s,border-radius .45s; }
.reward-reduced .reward-aura, .reward-reduced .reward-sparkles { display: none; }
.reward-reduced .reward-medal-front::after { display: none; }
@keyframes medal-sheen { from { transform: translateX(-65%); } to { transform: translateX(65%); } }
@keyframes reward-rays { from { transform: rotate(-15deg) scale(.7); opacity: 0; } 30% { opacity: 1; } to { transform: rotate(22deg) scale(1.15); opacity: .7; } }
@keyframes medal-spark { 0% { transform: translate(0,0) scale(0); opacity: 0; } 25% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--spark-x),var(--spark-y)) scale(.5) rotate(70deg); opacity: 0; } }
@keyframes reward-cheer-in { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (max-height: 500px) and (orientation: landscape) { .reward-cheer { top: 73%; gap: 2px; } .reward-cheer p, .reward-cheer > span { font-size: 15px; } .reward-cheer strong { font-size: 24px; } }
@media print { .puzzle-reward { display: none !important; } }
@media (min-width: 821px) and (max-width: 1100px) { .group-drop-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }

/* 筛选与右侧操作采用同一组胶囊按钮尺寸。 */
.board-header { --toolbar-height: 36px; flex-direction: row; align-items: center; }
.board-header .filter-tabs, .board-header .board-actions { display: flex; align-items: center; gap: 3px; padding: 4px; border: 0; border-radius: 11px; background: #f4f6f0; }
.board-header .board-actions { flex-wrap: nowrap; margin-top: 0; }
.board-header .filter-tab, .board-header .board-actions .button { height: var(--toolbar-height); min-height: var(--toolbar-height); border: 1px solid transparent; border-radius: 8px; padding: 0 12px; font-size: 12px; line-height: 1.3; font-weight: 500; color: #7b8577; background: transparent; }
.board-header .filter-tab.active, .board-header #team-toggle[aria-pressed="true"], .board-header #board-set-btn[aria-expanded="true"] { background: #fff; color: #406b4c; border-color: #e5eadf; box-shadow: 0 2px 3px #293e3410; font-weight: 600; }
.board-header .board-actions .button > span[aria-hidden] { font-size: 17px; }
.board-header .board-next-round { flex-shrink: 0; height: calc(var(--toolbar-height) + 8px); min-height: 0; margin: 0; padding: 0 12px; border: 1px solid #d4e3c9; border-radius: 11px; color: #406b4c; background: #edf4e5; font-size: 12px; font-weight: 700; white-space: nowrap; }
@media (hover: hover) { .board-header .board-actions .button:hover { background: #fff; color: #406b4c; border-color: #e5eadf; } }
@media (max-width: 820px) {
    .board-header { display: grid; grid-template-columns: minmax(0,1fr) auto; }
    .team-mode .board-header { display: grid; grid-template-columns: minmax(0,1fr) auto; }
    .board-header .filter-bar { grid-column: 1; min-width: 0; }
    .board-header .board-next-round { grid-column: 2; }
    .board-header .board-actions { grid-column: 1 / -1; justify-self: end; align-self: center; }
}
@media (max-width: 620px) {
    .board-header { --toolbar-height: 39px; }
    .board-header .filter-tab, .board-header .board-actions .button { padding-inline: 6px; font-size: 11px; }
    .board-header .filter-tabs { width: 100%; }
    .board-header .filter-tab { min-width: 0; padding-inline: 4px; }
    .board-header .board-next-round { padding-inline: 8px; font-size: 11px; }
    .board-header .board-actions .button { flex: 0 0 auto; }
}
@media (max-width: 400px) { .board-header .filter-tab .status-dot { display: none; } .board-header .filter-tab { gap: 3px; font-size: 10px; } }
@media print { .board-next-round { display: none !important; } }

.game-dialog.name-import-dialog { width: min(620px,calc(100% - 28px)); padding: clamp(16px,3vw,26px); }
.name-import-dialog form { display: grid; gap: 14px; }
.name-import-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.name-import-header .section-kicker { font-size: 12px; color: #789070; }
.name-import-header h2 { margin: 3px 0 0; color: #314b48; }
.name-import-intro { color: #526763; line-height: 1.7; font-size: 15px; }
.name-import-file-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px; border: 1px dashed #c8d9c0; border-radius: 13px; background: #f5f9ef; }
.name-import-file-row span { min-width: 0; overflow-wrap: anywhere; color: #62765c; font-size: 12px; }
.name-import-text-label { display: grid; gap: 7px; color: #526763; font-size: 14px; font-weight: 700; }
.name-import-text-label textarea { width: 100%; min-height: 150px; height: min(32dvh,260px); resize: vertical; padding: 12px 14px; border: 1px solid #cbd9c5; border-radius: 13px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.7; }
.name-import-effect, .name-import-hint { font-size: 12px; line-height: 1.6; }
.name-import-effect { color: #687b68; }
.name-import-hint { color: #42764d; }
.name-import-hint.is-error { color: #ac503f; }
.name-import-buttons { display: flex; justify-content: flex-end; gap: 10px; }

/* 图册入口紧跟小组切换，沿用工具栏的等高胶囊样式。 */
.board-actions #collection-entry { flex: 0 0 auto; }
.board-actions #collection-entry .record-view-icon, .board-actions #random-call .record-view-icon { width: 20px; height: 20px; }
.random-call-icon path { stroke-width: 3; }
@media (max-width: 620px) {
    #album-dialog { padding: max(10px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }
    #album-dialog .game-dialog-header { padding-inline: 5px; }
    #album-dialog .game-dialog-header .section-kicker { display: none; }
    .board-header .board-actions .button { gap: 4px; }
    .board-actions #collection-entry .record-view-icon, .board-actions #random-call .record-view-icon { width: 17px; height: 17px; }
    #collection-entry b { display: none; }
}
@media (max-width: 370px) {
    .board-actions #random-call .action-label { font-size: 0; }
    .board-actions #random-call .action-label::after { content: attr(data-short); font-size: 11px; }
}
