/* Keep the two-column treasure game readable on narrow phones. */
@media (max-width: 600px) {
    .things-page .things-gallery-section { padding: 0.8rem; }
    .things-page .things-grid { gap: 0.7rem; }
    .things-page .thing-flip-card { padding: 0; }
    .things-page .thing-card-face {
        grid-template-columns: minmax(0, 1fr);
        padding: 1.1rem 0.65rem 0.8rem;
    }
    .things-page .thing-card h2 { font-size: 1.1rem; line-height: 1.2; overflow-wrap: anywhere; }
    .things-page .thing-card p { font-size: 1rem; line-height: 1.25; }
    .things-page .thing-card img { max-width: 100%; }
    .things-page .thing-card-hint { padding-inline: 0.5rem; font-size: 0.85rem; }
}

.things-gallery-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.things-gallery-tools p { margin: 0; color: #193a78; font-weight: 800; }
.things-reset, .things-reset-dialog button { min-height: 44px; padding: 0.5rem 1rem; border: 1px solid #c8b2e4; border-radius: 999px; color: #6523be; background: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.things-reset[hidden] { display: none; }
.things-page .thing-card:target, .things-page .thing-card:focus-visible { outline: 3px solid #6523be; outline-offset: 3px; }
.things-page .thing-card { scroll-margin-block: 2rem; }
.things-reset:focus-visible, .things-reset-dialog button:focus-visible { outline: 3px solid #6523be; outline-offset: 3px; }
.things-reset-dialog { width: min(28rem, calc(100% - 2rem)); padding: 1.5rem; border: 2px solid #e6d9f7; border-radius: 1.5rem; color: #193a78; background: #fffaf5; }
.things-reset-dialog::backdrop { background: #17244480; }
.things-reset-dialog h2 { margin: 0 0 0.75rem; color: #6523be; font-size: 1.6rem; line-height: 1.2; }
.things-reset-dialog p { margin: 0 0 1.25rem; line-height: 1.5; }
.things-reset-dialog form { display: flex; flex-wrap: wrap; gap: 0.65rem; }
@media (prefers-reduced-motion: reduce) { .things-page .thing-card-shell { transition: none; } }
