/*
 * Flip the Coin: the tool's own components, styled in the site's design language (6 Oct 2026, on the UltraCompress Pro
 * template, the second of the twelve older tools brought onto it). Base: /libs/site-pages.css (tokens, Inter and Space
 * Grotesk, buttons, theme toggle, focus rings) and /libs/shared-nav.css (the site's header and footer). This file holds the
 * loading card, the toolbar, the coin card (the 3D canvas, the 2D fallback coin, the result badge, the Flip button and the
 * keyboard hint), the statistics card, the settings window, the frame-rate counter, the no-3D message and the information
 * sections. The 3D scene itself is drawn by the script into the canvas and follows the page theme (js/CoinFlip3D.js). The
 * original's starfield background, glass panels, floating gear button and own theme (flip-the-coin-theme) are gone: the
 * site's toggle owns the theme and the shared footer carries the links. Every id and class the scripts touch keeps its name.
 */

/* ----- Tokens the tool adds ----- */
:root {
    --surface: #ffffff;
    --surface-2: #f3f4f8;
    --ring: rgba(139, 92, 246, 0.18);
    --app-max: 1600px;
    --gold: #d4af37;
    --result-glow: rgba(139, 92, 246, 0.35);
}
:root:not([data-theme="light"]) {
    --surface: #14141f;
    --surface-2: rgba(255, 255, 255, 0.05);
}

/* ----- Page: full width, the page provides the side space ----- */
.container.app-container {
    max-width: calc(var(--app-max) + 2 * var(--content-gutter));
    margin-top: 16px;
}
@media (min-width: 640px) { .container.app-container { margin-top: 24px; } }

/* ----- The site header is the first thing on the page and stays at the top (11 Oct 2026: the Tools bar above it was removed; the header's own Tools link leads to the same page) ----- */
body { padding-top: 0; }
body > header { position: sticky; top: 0; z-index: 50; }
header .site-nav { position: relative; top: auto; }
.theme-toggle { top: 90px; }
@media (max-width: 639.98px) { .theme-toggle { top: 75px; } } /* the header is 81 px tall from 640 px, 65 px below */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ----- Hero: brand row, headline, tagline ----- */
.app-hero { margin: 0 0 2rem; text-align: center; }
.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-strong);
}
.app-brand img { width: 44px; height: 44px; border-radius: 12px; display: block; }
.app-hero h1 { margin-bottom: 0.75rem; }
.app-tagline { color: var(--text-2); font-size: 1.125rem; line-height: 1.6; max-width: 46rem; margin: 0 auto; }

/* ----- Buttons: the site's pills in the tool's sizes ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 9999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    padding: 12px 24px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text-strong); border: 1px solid var(--surface-border); padding: 11px 23px; }
.btn-secondary:hover:not(:disabled) { border-color: var(--brand); color: var(--link); transform: translateY(-2px); }
.btn-secondary.active, .btn-secondary[aria-pressed="true"] { background: var(--tint-brand); border-color: var(--brand); color: var(--link); box-shadow: 0 0 0 3px var(--ring); }
.btn-danger { background: var(--surface); color: var(--danger); border: 1px solid rgba(185, 28, 28, 0.35); padding: 11px 23px; }
.btn-danger:hover:not(:disabled) { background: var(--danger-strong); color: #fff; border-color: transparent; transform: translateY(-2px); }
.btn-sm { font-size: 0.85rem; padding: 9px 16px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-secondary.btn-sm, .btn-danger.btn-sm { padding: 8px 15px; }
.btn-icon.btn-sm { width: 38px; height: 38px; padding: 0; }
.btn-lg { font-size: 1.05rem; padding: 14px 32px; }
.btn-block { width: 100%; }

/* ----- The app: a loading card, then the toolbar and two columns ----- */
.app-shell { margin: 0 0 3rem; scroll-margin-top: 90px; }
.card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    box-shadow: var(--surface-shadow);
    overflow: hidden;
}
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--surface-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-title { margin: 0; font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--text-strong); }
.card-body { padding: 16px 20px 20px; }

.loading-screen { min-height: 320px; display: flex; align-items: center; justify-content: center; padding: 40px 20px; transition: opacity 0.5s ease; }
.loading-screen.hidden { opacity: 0; }
.loading-content { text-align: center; width: 100%; max-width: 320px; }
.loading-spinner { width: 52px; height: 52px; margin: 0 auto 18px; border: 4px solid var(--surface-2); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 1.25rem; margin: 0 0 6px; }
.loading-text { color: var(--text-2); margin: 0 0 16px; }
.loading-bar { width: 100%; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.loading-progress { height: 100%; width: 0; background: var(--gradient-brand); border-radius: 3px; transition: width 0.3s ease; }
.loading-percent { font-size: 0.85rem; color: var(--text-3); }

.app-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin: 0 0 1.25rem; }
.toolbar-left, .app-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.app-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }

/* ----- The coin card ----- */
.coin-card { display: flex; flex-direction: column; }
.coin-container {
    position: relative;
    width: 100%;
    height: clamp(360px, 58vh, 640px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    background: var(--surface-2);
}
.coin-canvas { width: 100% !important; height: 100% !important; display: block; max-width: 100%; }
.fallback-coin { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; perspective: 1000px; }
.coin-2d { width: 200px; height: 200px; position: relative; transform-style: preserve-3d; transition: transform 1s ease-out; }
.coin-2d.flipping { animation: flip2d 1.5s ease-out; }
@keyframes flip2d { 0% { transform: rotateY(0deg) rotateX(0deg); } 100% { transform: rotateY(1800deg) rotateX(360deg); } }
.coin-face { position: absolute; width: 100%; height: 100%; border-radius: 50%; backface-visibility: hidden; background-size: cover; background-position: center; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }
.coin-heads { background-image: url('assets/textures/heads.png'); background-color: var(--gold); }
.coin-tails { background-image: url('assets/textures/tails.png'); background-color: var(--gold); transform: rotateY(180deg); }

/* The coin in full view (Milan, 12 Oct 2026): during a flip the coin flies over the whole screen on a transparent
   canvas (js/CoinFlip3D.js, updateFlight), above a veil in the table's colours that fades the page and the coin table,
   as on the Dice Roller; the table stays in its card. Above the site header and the theme button, below the cookie
   banner; it takes the clicks while the coin flies. */
.coin-flight-layer { position: fixed; inset: 0; z-index: 5000; overflow: hidden; overscroll-behavior: contain; }
.coin-flight-veil {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.94) 0%, rgba(243, 241, 251, 0.92) 55%, rgba(235, 232, 247, 0.92) 100%);
    opacity: 0;
}
:root:not([data-theme="light"]) .coin-flight-veil {
    background: radial-gradient(ellipse at 50% 45%, rgba(42, 39, 64, 0.94) 0%, rgba(27, 26, 43, 0.94) 60%, rgba(20, 20, 31, 0.94) 100%);
}
.coin-flight-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* The result badge in the corner of the coin table, as the original */
.result-display { position: absolute; top: 14px; right: 14px; z-index: 5; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.result-display.show { opacity: 1; animation: resultPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
@keyframes resultPop { 0% { transform: scale(0); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
.result-toast {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 14px 22px;
    box-shadow: 0 16px 40px var(--result-glow);
    text-align: center;
    min-width: 150px;
}
.result-icon { font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1; margin-bottom: 6px; }
.result-text {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.coin-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 20px; border-top: 1px solid var(--surface-border); margin-top: auto; }
.keyboard-hint { margin: 0; font-size: 0.85rem; color: var(--text-3); }
kbd { padding: 2px 8px; background: var(--surface-2); border: 1px solid var(--surface-border); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; color: var(--text-2); }

/* ----- The statistics card ----- */
.stats-card { display: flex; flex-direction: column; }
.stats-panel { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-item { text-align: center; padding: 14px 10px; border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.stat-item:hover { transform: translateY(-2px); box-shadow: var(--surface-hover-shadow); }
.stat-item.streak { grid-column: 1 / -1; background: var(--tint-brand); border-color: var(--tint-brand-border); }
.stat-value { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); margin-top: 2px; }
.history-section { border-top: 1px solid var(--surface-border); padding-top: 14px; }
.history-title { margin: 0 0 8px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.history-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; align-content: flex-start; }
.history-empty { margin: 0; font-size: 0.85rem; color: var(--text-3); }
.history-item { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; font-size: 1.2rem; background: var(--surface-2); border: 1px solid var(--surface-border); transition: transform 0.15s ease; }
.history-item:hover { transform: scale(1.1); }
.history-item.heads { background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(212, 175, 55, 0.25)); }
.history-item.tails { background: linear-gradient(135deg, rgba(148, 163, 184, 0.25), rgba(100, 116, 139, 0.25)); }
.stats-actions { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--surface-border); padding-top: 14px; margin-top: auto; }

/* ----- Settings window (the script shows it with display: flex) ----- */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay { position: absolute; inset: 0; background: rgba(10, 10, 20, 0.6); backdrop-filter: blur(6px); }
.modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    padding: 20px;
    animation: modalSlideIn 0.25s ease;
}
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--surface-border); }
.modal-title { margin: 0; font-size: 1.15rem; }
.icon-btn, .modal-close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--chip-border);
    background: var(--chip);
    color: var(--text-strong);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { border-color: var(--brand); color: var(--link); }
.modal-body { display: flex; flex-direction: column; gap: 22px; }
.settings-section { display: flex; flex-direction: column; gap: 12px; }
.settings-heading { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.setting-item { display: flex; flex-direction: column; gap: 6px; }
.setting-item label { font-size: 0.9rem; font-weight: 600; color: var(--text-strong); }
.setting-item small { font-size: 0.78rem; color: var(--text-3); }
.theme-selector { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.theme-option { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.theme-option input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-preview { width: 64px; height: 64px; border-radius: 50%; border: 3px solid transparent; display: flex; align-items: center; justify-content: center; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.theme-option:hover .theme-preview { transform: scale(1.05); }
.theme-option input[type="radio"]:checked + .theme-preview { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.theme-option input[type="radio"]:focus-visible + .theme-preview { outline: 2px solid var(--brand); outline-offset: 2px; }
.theme-gold { background: linear-gradient(135deg, #ffd700, #d4af37); }
.theme-silver { background: linear-gradient(135deg, #e8e8e8, #a9a9a9); }
.theme-dollar { background: linear-gradient(135deg, #d4a574, #b87333); }
.theme-custom { background: var(--surface-2); color: var(--link); border-color: var(--surface-border); }
.theme-name { font-size: 0.8rem; font-weight: 600; color: var(--text-2); text-align: center; }
.custom-upload { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--surface-2); border-radius: 12px; border: 1px dashed var(--field-border); }
.file-label { display: flex; flex-direction: column; gap: 6px; }
.file-label span { font-size: 0.85rem; font-weight: 600; color: var(--text-strong); }
.file-label input[type="file"] { font-size: 0.85rem; color: var(--text); font-family: inherit; }
.select-input {
    padding: 10px 36px 10px 14px;
    background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
    border: 1px solid var(--field-border);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.select-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.select-input option { color: #0a0a14; background: #fff; }
.slider { width: 100%; height: 6px; border-radius: 3px; background: var(--surface-2); outline: none; appearance: none; -webkit-appearance: none; margin: 6px 0; cursor: pointer; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid #8B5CF6; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); cursor: pointer; }
.slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid #8B5CF6; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); cursor: pointer; }
.slider:focus-visible { box-shadow: 0 0 0 3px var(--ring); }
.checkbox-item { padding: 12px 14px; background: var(--surface-2); border-radius: 12px; }
.checkbox-item label { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.checkbox-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: #8B5CF6; flex-shrink: 0; }

/* ----- Frame-rate counter and the no-3D message ----- */
.fps-counter {
    position: fixed;
    top: 146px;
    right: 24px;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--link);
    z-index: 40;
    box-shadow: var(--surface-shadow);
}
#fps-value { font-size: 1rem; }
.error-message { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: calc(100% - 32px); max-width: 480px; text-align: center; padding: 28px 24px; z-index: 1100; }
.error-message h2 { font-size: 1.25rem; margin: 0 0 10px; }
.error-message p { color: var(--text-2); margin: 0 0 16px; }

/* ----- Information sections below the tool ----- */
.info-section { margin: 0 0 2.5rem; }
.info-section h2 { font-size: 1.75rem; margin: 0 0 1.25rem; }
.info-section > p { max-width: 70ch; color: var(--text-2); }
.info-section .info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1rem 0 1.5rem; }
.info-stack { display: grid; gap: 12px; }
.info-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    box-shadow: var(--surface-shadow);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); }
.info-card--small { padding: 16px; box-shadow: none; }
.info-card h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }
.info-card p { color: var(--text-2); margin-bottom: 0.75rem; }
.info-card p:last-child { margin-bottom: 0; }
.step-card { position: relative; padding-top: 24px; }
.step-num {
    position: absolute;
    top: -16px;
    left: 20px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 0.75rem; }
.step-head h3 { margin: 0; }
.step-emoji { font-size: 1.6rem; line-height: 1; }
.info-section details.info-card { padding: 0; }
.info-section details.info-card summary {
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-strong);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.info-section details.info-card summary::-webkit-details-marker { display: none; }
.info-section details.info-card summary::after { content: '+'; color: var(--link); font-weight: 700; font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.info-section details.info-card[open] summary::after { content: '\2212'; }
.info-section details.info-card p { padding: 0 20px 16px; margin: 0; color: var(--text-2); }

/* ----- Tablets and phones ----- */
@media (max-width: 1023px) {
    .app-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat-item.streak { grid-column: auto; }
    .info-section .info-grid, .info-three { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .theme-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
    .app-hero { margin-bottom: 1.5rem; }
    .app-tagline { font-size: 1rem; }
    .app-toolbar { gap: 10px; }
    .toolbar-left, .app-actions { width: 100%; }
    .toolbar-left .btn:not(.btn-icon) { flex: 1 1 auto; padding-left: 10px; padding-right: 10px; }
    .app-actions .btn { flex: 1 1 auto; }
    .coin-container { height: clamp(300px, 55vw, 420px); }
    .result-display { top: 10px; right: 10px; }
    .result-toast { min-width: 120px; padding: 10px 14px; }
    .coin-footer { padding: 14px 16px; }
    .coin-footer .btn { width: 100%; }
    .keyboard-hint { width: 100%; text-align: center; }
    .card-header { padding-left: 16px; padding-right: 16px; }
    .card-body { padding: 14px 16px 16px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-actions .btn { flex: 1; }
    .modal { padding: 8px; }
    .modal-content { padding: 16px; }
    .fps-counter { right: 16px; }
    .info-section h2 { font-size: 1.4rem; }
    .info-section .info-grid, .info-three { grid-template-columns: 1fr; }
    .info-card { padding: 16px; }
    .step-num { left: 16px; }
}
@media (hover: none) and (pointer: coarse) {
    .btn { min-height: 44px; }
    .history-item { width: 40px; height: 40px; font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
    .btn, .stat-item, .info-card, .history-item, .theme-preview, .loading-screen { transition: none; animation: none; }
    .result-display.show, .modal-content { animation: none; }
}
@media print {
    body > header, .theme-toggle, .app-toolbar, .coin-footer, .fps-counter, .info-section, footer, .modal { display: none !important; }
}

/* Phones: 16 px text, 44 px tap targets (AdSense audit H-04, 8 Oct 2026) */
@media (max-width: 639.98px) {
    main button, main select, main summary, main [role="button"],
    main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) { min-height: 44px; }
    div#history-list.history-list > p.history-empty,
    div.coin-footer > p.keyboard-hint { font-size: 1rem; }
    main button#mute-btn { min-width: 44px; }
}
