.thanks-gallery{margin-top:30px;padding-top:26px;border-top:1px solid var(--border);min-width:0}
.thanks-window{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#b9afce transparent;padding:4px 3px 14px;overscroll-behavior-x:contain;touch-action:pan-x pan-y;outline-offset:3px}
.thanks-track{display:flex;width:max-content;gap:18px}
.thanks-set{display:flex;gap:18px;flex-shrink:0}
.thanks-letter{display:flex;flex-direction:column;flex:0 0 190px;width:190px;text-decoration:none!important}
.thanks-paper{display:flex;align-items:center;justify-content:center;height:250px;padding:8px;background:#fff;border:1px solid #dedbe4;border-radius:8px;box-shadow:0 3px 8px #1e18350a;transition:transform .2s,box-shadow .2s}
.thanks-paper img{width:100%;height:100%;object-fit:contain;object-position:center}
.thanks-letter:hover .thanks-paper,.thanks-letter:focus-visible .thanks-paper{transform:translateY(-3px);box-shadow:0 6px 16px #1e18351a}
.thanks-source{font-size:15px;line-height:1.4;font-weight:600;margin-top:12px;color:var(--text)}
.thanks-description{font-size:13px;line-height:1.5;color:var(--muted);margin-top:4px}
.letter-viewer{padding:0;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--text);width:min(1100px,calc(100% - 32px));max-width:none;max-height:calc(100dvh - 28px);overflow:auto;box-shadow:0 20px 90px #0005}
.letter-viewer::backdrop{background:#121019bd;backdrop-filter:blur(5px)}
.letter-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 22px;border-bottom:1px solid var(--border)}
.letter-toolbar h2{font-size:18px;line-height:1.4;letter-spacing:-.02em;max-width:850px}
.letter-count{display:block;color:var(--muted);font-size:13px;margin-top:4px}
.letter-close{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}
.letter-close svg{width:22px;height:22px}
.letter-stage{padding:16px;background:var(--soft);display:flex;align-items:center;justify-content:center}
.letter-full{display:block;max-width:100%;width:auto;height:auto;max-height:calc(100dvh - 220px);object-fit:contain;background:white;box-shadow:0 2px 12px #0001}
.letter-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 22px}
.letter-footer button{font-size:14px;min-height:42px;padding:9px 13px;border:1px solid var(--border);border-radius:9px;background:var(--surface)}
.letter-original{font-size:14px;text-decoration:underline;text-underline-offset:4px}
html.letter-is-open{overflow:hidden}
@media(max-width:700px){.thanks-letter{width:160px;flex-basis:160px}.thanks-paper{height:216px}.thanks-track,.thanks-set{gap:14px}.thanks-source{font-size:14px}.thanks-description{font-size:13px}.letter-viewer{width:calc(100% - 16px);border-radius:12px}.letter-toolbar{padding:14px;gap:12px}.letter-toolbar h2{font-size:16px}.letter-stage{padding:10px}.letter-footer{padding:12px;gap:8px;flex-wrap:wrap}.letter-footer button{font-size:13px;padding:8px 10px}.letter-original{font-size:13px}.letter-full{max-height:calc(100dvh - 240px)}}
@media(prefers-reduced-motion:reduce){.thanks-paper{transition:none}.thanks-letter:hover .thanks-paper{transform:none}}



.thanks-toggle{display:inline-flex;align-items:center;gap:12px;padding:8px 12px;min-height:38px;border:1px solid var(--border);border-radius:9px;background:var(--surface);font-size:14px;font-weight:500;line-height:1.4;cursor:pointer;list-style:none}
.thanks-toggle::-webkit-details-marker{display:none}
.thanks-toggle:after{content:'+';font-size:18px;line-height:1;color:var(--muted)}
.thanks-gallery[open]>.thanks-toggle:after{content:'−'}
.thanks-toggle:hover{background:var(--soft)}
.thanks-toggle:focus-visible{outline:3px solid #9a86ff;outline-offset:4px}
.thanks-gallery[open]>.thanks-window{margin-top:18px}
