:root {
    --bg-dark: #0f0f17;
    --card-bg: rgba(26, 26, 40, 0.4);
    --card-border: rgba(255, 255, 255, 0.1);
    --accent-primary: #8a6fff;
    --accent-hover: #9d85ff;
    --text-main: #f0f0f5;
    --text-muted: #9a9ab0;
    --tile-bg: #fdfbf7;
    --tile-text: #222230;
    --shadow-crisp: 0 12px 24px -6px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-size-adjust: none;
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/roboto-v30-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/roboto-v30-latin-700.woff2') format('woff2');
}

body {
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.background-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), image-set(url('background_1200.avif') type('image/avif'), url('background_1200.webp') type('image/webp'), url('background_1200.jpg') type('image/jpeg')) center center / cover no-repeat;
    filter: blur(8px);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 10%, rgba(138, 111, 255, 0.15), transparent 60%);
    z-index: -2;
    pointer-events: none;
}

.container { width: 100%; max-width: 870px; }

.header { text-align: center; margin-bottom: 2.5rem; }

.logo { display: inline-flex; align-items: center; gap: 0.5rem; }

.logo-icon { color: var(--accent-primary); font-size: 2rem; }

.logo-text {
    font-size: 4.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #b3a1ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline, .sub-tagline { font-size: 1.1rem; margin-top: 0.2rem; }
.tagline { color: var(--text-muted); }
.sub-tagline { color: #ff80b3; }

.card {
    background: rgba(26, 26, 40, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-crisp);
    margin-bottom: 2rem;
    transition: transform 0.2s ease;
}

.card-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.card-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.3rem; }
.card-subtitle { color: var(--text-muted); font-size: 0.95rem; }

.game-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.4rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.selector-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

.radio-label input[type="radio"] { display: none; }

.radio-btn {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.radio-label input[type="radio"]:checked + .radio-btn {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(138, 111, 255, 0.4);
}

.input-wrapper { margin-bottom: 1.5rem; }
.input-label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.95rem; }

.letter-input {
    text-align: center;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.letter-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(138, 111, 255, 0.2);
}

.input-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hint-icon { color: var(--accent-primary); }

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    flex: 1;
    min-width: 0;
    align-items: center;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(138, 111, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(138, 111, 255, 0.4);
}

.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.loader-drawer {
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    animation: slideDown 0.3s ease forwards;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-left: 0.5rem;
}

.loader-steps {
    list-style: none;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
}

.loader-steps li {
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    line-height: 1.2;
}

.loader-steps li:last-child { margin-bottom: 0; }

.step-icon { font-size: 1rem; flex-shrink: 0; }

.results-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    animation: fadeIn 0.4s ease;
}

.results-section:focus, .error-box:focus { outline: none; }

.results-header {
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.results-title { font-size: 1.1rem; color: var(--text-muted); font-weight: 600; }

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.word-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    width: 100%;
}

.word-card:hover {
    transform: translateX(4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.tiles-wrapper {
    display: flex;
    gap: 0.16rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.2rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tiles-wrapper::-webkit-scrollbar { display: none; }

.tile {
    background: var(--tile-bg);
    color: var(--tile-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 700;
    font-size: 1.2rem;
    width: 28px;
    height: 32px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 0 #ccc, 0 3px 6px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    flex-shrink: 0;
    -webkit-font-smoothing: antialiased;
}

.tile sub {
    position: absolute;
    bottom: 1px;
    right: 3px;
    font-size: 0.55rem;
    font-weight: 700;
    color: #555;
    line-height: 1;
}

.word-score {
    background: rgba(138, 111, 255, 0.2);
    color: #dcd0ff;
    border: 1px solid rgba(138, 111, 255, 0.4);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 1rem;
}

.quick-tips {
    background: rgba(26, 26, 40, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.8rem 2.5rem;
    box-shadow: var(--shadow-crisp);
}

.tips-title {
    order: 2;
    font-size: 1.15rem;
    margin: 0;
    color: #fff;
    flex: 1;
    min-width: 0;
    line-height: 1.2;
}

.tips-list {
    list-style: none;
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.tip-item {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tip-bullet { color: var(--accent-primary); font-size: 0.8rem; }

.tip-code {
    background: rgba(138, 111, 255, 0.15);
    color: #dcd0ff;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

.footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-subtext { margin-top: 0.3rem; color: #666680; }
.hidden { display: none !important; }

.error-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 80, 80, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.3);
    border-radius: 10px;
    color: #ff9999;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 400px; }
}

.lang-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
}

.lang-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.lang-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(138, 111, 255, 0.4);
}

.lang-btn:visited, .lang-btn:link, .lang-btn.active:hover, .lang-btn.active:visited { color: inherit; }

.digraph-selector { display: none; }
.digraph-selector:not(.hidden) { display: inline-flex; }
.digraph-selector .radio-btn { white-space: nowrap; width: auto; min-width: max-content; flex-shrink: 0; }

/* ── Shared Tooltip Base ── */
.info-tooltip, .tip-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-primary);
    font-size: 0.7rem;
    font-weight: 800;
    cursor: help;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.info-tooltip:hover, .info-tooltip:focus-visible,
.tip-tooltip:hover, .tip-tooltip:focus-visible {
    background: var(--accent-primary);
    color: #fff;
    transform: scale(1.1);
}

.info-tooltip::after, .tip-tooltip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 135%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(26, 26, 40, 0.95);
    color: var(--text-main);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.info-tooltip::before, .tip-tooltip::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(26, 26, 40, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s;
}

.info-tooltip:hover::after, .info-tooltip:focus-visible::after,
.info-tooltip:hover::before, .info-tooltip:focus-visible::before,
.tip-tooltip:hover::after, .tip-tooltip:focus-visible::after,
.tip-tooltip:hover::before, .tip-tooltip:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tip-specific overrides */
.tip-tooltip { vertical-align: middle; }
.tip-tooltip::after { max-width: 280px; line-height: 1.5; }

.skrabbl-bot-peeker picture { display: block; }

.skrabbl-bot-img {
    width: 80px;
    height: auto;
    max-width: 110px;
    display: block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.5));
    transform-origin: bottom center;
    cursor: pointer;
    transform: rotate(-2deg);
}

.skrabbl-bot-peeker:hover .skrabbl-bot-img { transform: scale(1.15) rotate(0deg); }

.skrabbl-bot-peeker {
    position: absolute;
    top: -82px;
    right: -10px;
    z-index: 10;
    pointer-events: auto;
}

.skrabbl-bot-wiggle {
    animation: bot-wiggle-anim 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

@keyframes bot-wiggle-anim {
    0% { transform: rotate(-3deg); }
    25% { transform: rotate(3deg); }
    50% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
    100% { transform: rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) { .skrabbl-bot-wiggle { animation: none; } }

/* ── Portal Tooltip ── */
.tooltip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9999;
    max-width: min(320px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    overflow: auto;
    background: rgba(26, 26, 40, 0.97);
    color: var(--text-main, #f0f0f5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.5;
    white-space: normal;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    will-change: opacity, transform;
}

.tooltip.is-open { opacity: 1; transform: translateY(0); }

.tooltip::before {
    content: '';
    position: absolute;
    left: var(--caret-x, 50%);
    bottom: -6px;
    width: 11px;
    height: 11px;
    background: inherit;
    border: inherit;
    border-top: none;
    border-left: none;
    transform: translateX(-50%) rotate(45deg);
}

.tooltip.is-below::before {
    bottom: auto;
    top: -6px;
    border: inherit;
    border-right: none;
    border-bottom: none;
}

html.js-tooltips .info-tooltip::before,
html.js-tooltips .info-tooltip::after,
html.js-tooltips .tip-tooltip::before,
html.js-tooltips .tip-tooltip::after { content: none !important; }

/* ── Guide Header ── */
.guide-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-bot-img {
    order: 1;
    width: 50px;
    height: auto;
    flex-shrink: 0;
    display: block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    vertical-align: middle;
}

.guide-toggle {
    order: 3;
    display: inline-flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.guide-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    margin: 0;
}

.guide-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.guide-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(138, 111, 255, 0.4);
}

/* ── Mastery Content ── */
.mastery-content h3, .mastery-content h4, .mastery-content h5 {
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.mastery-content h3 { font-size: 1.3rem; margin-top: 1.5rem; }
.mastery-content h4 { font-size: 1.05rem; margin-top: 1.2rem; }
.mastery-content h5 { font-size: 0.92rem; margin-top: 1rem; }

.mastery-content strong { color: var(--text-muted); font-weight: 700; }

.mastery-content p, .mastery-content ul li, .mastery-content blockquote, .mastery-content td {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.mastery-content p { margin-bottom: 0.8rem; }

.mastery-content blockquote {
    border-left: 3px solid var(--accent-primary);
    margin: 1rem 0;
    padding: 0.6rem 1rem;
    background: rgba(138, 111, 255, 0.08);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.mastery-content hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 1.5rem auto;
    width: 80%;
}

.mastery-content ul { list-style: none; margin: 0.8rem 0; padding: 0; }

.mastery-content ul li {
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.mastery-content ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-size: 0.7rem;
    top: 0.25rem;
}

.mastery-content code {
    background: rgba(138, 111, 255, 0.15);
    color: #dcd0ff;
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.mastery-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 0.5rem;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mastery-content thead th {
    text-align: left;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mastery-content tbody td {
    padding: 0.6rem 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.mastery-content tbody tr:last-child td { border-bottom: none; }
.mastery-content tbody tr:hover { background: rgba(138, 111, 255, 0.06); }

.mastery-content tbody td:first-child {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 700;
    color: #dcd0ff;
}

/* ════════════════════════════════════════════════════════════════════════════════════ */
/*                                  MEDIA QUERIES                                      */
/* ════════════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    .game-selector {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.6rem;
        padding: 0.5rem;
        border-radius: 16px;
    }

    .selector-label { width: 100%; text-align: center; margin-bottom: 0.4rem; }

    .selector-dict .radio-btn { width: 100%; text-align: center; padding: 0.5rem; border-radius: 12px; }

    .selector-game .radio-label { flex: 0 0 45%; max-width: 140px; }
    .selector-game .radio-btn { width: 100%; text-align: center; padding: 0.5rem; border-radius: 12px; }

    .form-actions { flex-direction: column; align-items: stretch; }
    .checkbox-group { width: 100%; margin-bottom: 0.75rem; }
    .btn { width: 100%; justify-content: center; min-height: 48px; }

    .guide-header {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 0.5rem;
    }

    .tips-title { order: 2; width: 100%; text-align: center; margin-bottom: 0.2rem; }
    .guide-bot-img { order: 1; width: 50px; }
    .guide-toggle { order: 3; width: 100%; justify-content: center; }

    .card { padding: 1rem; }
    .loader-steps { padding: 0.5rem; }
    .quick-tips { padding: 1rem; }

    .tip-item { display: block; margin-bottom: 0.5rem; }
    .tip-bullet { display: inline-block; margin-right: 0.4rem; }

    .word-card { padding: 0.6rem 0.8rem; }
    .tiles-wrapper { gap: 0.08rem; }

    .tile {
        width: 22px;
        height: 26px;
        font-size: 1rem;
        box-shadow: 0 1px 0 #ccc, 0 2px 4px rgba(0, 0, 0, 0.4);
    }

    .tile sub { font-size: 0.45rem; bottom: 0.5px; right: 1.5px; }

    .word-score { margin-left: 0.5rem; padding: 0.2rem 0.5rem; font-size: 0.75rem; }

    .mastery-content table { font-size: 0.78rem; }
    .mastery-content thead th, .mastery-content tbody td { padding: 0.5rem 0.6rem; }

    .skrabbl-bot-peeker { right: -12px; top: -62px; }
    .skrabbl-bot-img { width: 60px; transform: rotate(-2deg); }
    .skrabbl-bot-peeker:hover .skrabbl-bot-img { transform: scale(1.1) rotate(2deg); }
}
