/* ========== D&D Charakterbogen – Einheitliches Design ========== */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;700&family=Uncial+Antiqua&display=swap');

/* 1. GRUNDLAGEN & FARBEN */
:root {
    --parchment: #f4e7d3;
    --ink: #3e2723;
    --accent: #8b0000;
    --accent-dark: #4a0000;
    --border: #5d4037;
    --tan: #d2b48c;
    --glass: rgba(255, 255, 255, 0.4);
    --success: #2e7d32;
    --error: #c62828;
    --touch-min: 44px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background: #1a1a1a;
    color: var(--ink);
    font-family: 'Crimson Text', Georgia, serif;
    margin: 0;
    padding: 20px 12px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* 2. CONTAINER & BOGEN */
.sheet {
    background: var(--parchment);
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    border: 2px solid var(--accent);
    padding: 24px 20px;
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.5), inset 0 0 60px rgba(139, 69, 19, 0.08);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sheet-content {
    flex: 1;
    padding: 0 0 20px;
}

/* 3. AUTH-SEITEN (Login, Register, Passwort vergessen) – einheitlich */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px 0;
}

.auth-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 32px 24px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    text-align: center;
}

.auth-card h2 {
    color: var(--accent);
    font-family: 'Crimson Text', serif;
    text-transform: uppercase;
    margin: 0 0 8px;
    font-size: 1.6em;
}
.auth-card .auth-subtitle {
    font-size: 0.95em;
    color: var(--ink);
    margin: 0 0 20px;
    opacity: 0.9;
}

.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    margin: 10px 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    font-family: inherit;
    font-size: 1.05em;
    color: var(--ink);
}

.auth-card input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.2);
}

.auth-card .btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 20px;
    width: 100%;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.05em;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 3px 0 #5a0000;
    margin-top: 16px;
    min-height: var(--touch-min);
}

.auth-card .btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #5a0000;
}

/* Auth: Form-Gruppen (Label über Input, untereinander wie inventar/index) */
.auth-form {
    text-align: left;
    margin-bottom: 20px;
}
.auth-form .form-group {
    margin-bottom: 16px;
}
.auth-form .form-group:last-of-type {
    margin-bottom: 0;
}
.auth-form label {
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    color: var(--border);
    margin-bottom: 6px;
    font-weight: bold;
}
.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"] {
    margin: 0;
}
.auth-form .btn {
    margin-top: 20px;
}

/* Auth: Links untereinander, klares Schema */
.auth-links {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 20px;
    text-align: center;
}
.auth-links li {
    margin-bottom: 10px;
}
.auth-links li:last-child {
    margin-bottom: 0;
}
.auth-card .auth-links .link {
    margin-top: 0;
    display: inline-block;
}

.auth-card .link {
    display: block;
    margin-top: 16px;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95em;
}

.auth-card .link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.auth-card .error,
.auth-card .msg {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}

.auth-card .error {
    background: #ffebee;
    color: var(--error);
    border: 1px solid var(--error);
}

.auth-card .msg:not(.error) {
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid var(--success);
}

.create-card {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.create-card h2 {
    color: var(--accent);
    font-size: 1.6em;
    margin-bottom: 12px;
    font-family: 'Uncial Antiqua', serif;
}

.create-card input[type="text"] {
    font-size: 1.2em;
    text-align: center;
    margin: 16px 0;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--tan);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.6);
    font-family: 'Crimson Text', serif;
}

/* Charakterbogen-Sektionen (view_char) – übersichtlich & lesbar */
.char-section {
    border: 2px solid var(--tan);
    padding: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.char-section h3 {
    font-family: 'Uncial Antiqua', serif;
    font-size: 1.05em;
    color: var(--accent);
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--tan);
}

.char-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid var(--tan);
    border-radius: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.4);
}

.char-section-row .char-section-label {
    text-transform: uppercase;
    font-size: 0.75em;
    font-weight: bold;
    color: var(--border);
}

.char-section-row .char-section-value {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--accent);
}

.char-skills-grid {
    display: inline-grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px 40px;
    text-align: left;
    width: 100%;
}

.char-combat-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0 35px;
}

.char-hp-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 35px;
}

.char-hp-inner {
    width: 100%;
    max-width: 320px;
}

.char-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.skills-section {
    border-top: 2px double var(--accent);
    padding-top: 30px;
    text-align: center;
}

.skills-section h3 {
    font-family: 'Uncial Antiqua', serif;
    color: var(--accent);
    margin-bottom: 25px;
}

.skill-label small {
    opacity: 0.6;
}

.modal-title {
    color: var(--accent);
    border-bottom: 2px double var(--tan);
    margin-bottom: 20px;
    font-family: 'Uncial Antiqua', serif;
}

.inv-toggle-btn {
    padding: 4px 8px;
    font-size: 0.7em;
    border: 1px solid var(--tan);
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

/* 4. NAVIGATION & FOOTER */
.sheet-navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: -24px -20px 20px -20px;
    padding: 10px 8px;
    background: rgba(139, 0, 0, 0.06);
    border-bottom: 2px solid var(--accent);
    z-index: 10;
}

.nav-item {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    padding: 10px 8px;
    text-decoration: none;
    color: var(--ink);
    font-weight: bold;
    font-size: 0.8em;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: var(--touch-min);
}

.nav-item:hover {
    background: rgba(139, 0, 0, 0.1);
    color: var(--accent);
}

.nav-item.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.nav-icon {
    flex-shrink: 0;
}

.sheet-footer {
    margin: 24px -20px -24px -20px;
    padding: 14px 16px;
    background: rgba(139, 0, 0, 0.06);
    border-top: 2px solid var(--accent);
    text-align: center;
    font-size: 0.85em;
    opacity: 0.9;
}

.sheet-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
}

.sheet-footer a:hover {
    text-decoration: underline;
}

/* 4b. DASHBOARD SEITEN */
.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 0 20px;
}

.welcome-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px double var(--accent);
}

.welcome-header h1 {
    font-size: 2em;
    color: var(--accent);
    margin: 0 0 8px;
    font-family: 'Uncial Antiqua', serif;
}

.welcome-header p {
    margin: 0;
    font-size: 1em;
    opacity: 0.85;
}

/* 5. DASHBOARD / HELDEN-AUSWAHL */
.char-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding: 16px 0;
}

.char-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.char-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--tan);
    border-radius: 8px;
    padding: 16px;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.5);
    min-height: var(--touch-min);
    flex: 1;
}

.char-card-edit {
    font-size: 0.85em;
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    text-align: right;
    padding: 2px 0;
}

.char-card-edit:hover {
    text-decoration: underline;
}

.char-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.char-card-icon {
    font-size: 1.8em;
    margin-right: 14px;
    background: rgba(0,0,0,0.05);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.char-card-name {
    display: block;
    font-size: 1.15em;
    font-weight: bold;
    color: var(--accent);
}

.char-card-sub {
    font-size: 0.85em;
    opacity: 0.75;
    font-style: italic;
}

.add-card {
    border-style: dashed;
    background: rgba(255, 255, 255, 0.6);
    justify-content: center;
}

.add-card .char-card-info.add-card-info {
    text-align: center;
}

.dashboard-actions {
    text-align: center;
    margin-top: 24px;
}

.add-card .char-card-icon {
    background: var(--accent);
    color: white;
    border: none;
}

.back-link,
.logout-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--ink);
    text-decoration: none;
    font-weight: bold;
    opacity: 0.8;
    padding: 8px 0;
    min-height: var(--touch-min);
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
}

.back-link:hover,
.logout-link:hover {
    opacity: 1;
    color: var(--accent);
}

/* 6. CHARAKTERBOGEN */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid var(--tan);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
}

.stat-box label {
    display: block;
    font-size: 0.7em;
    font-weight: bold;
    color: var(--border);
    text-transform: uppercase;
}

.stat-box input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1.6em;
    font-weight: bold;
    font-family: inherit;
    color: #1a1a1a;
}

.stat-box .mod {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--accent);
    margin-top: -4px;
}

.combat-box {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid var(--tan);
    border-radius: 8px;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
}

.combat-box.circle { border-radius: 50%; }

.combat-box label {
    font-size: 0.65em;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--border);
}

.combat-box input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1.6em;
    font-weight: bold;
    color: var(--accent);
}

.hp-section {
    text-align: center;
    border: 2px solid var(--tan);
    border-radius: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
}

.hp-section .hp-label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8em;
    color: var(--border);
}

.hp-display {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.03);
    padding: 6px 10px;
    border-radius: 8px;
}

.hp-display input {
    width: 48px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.3em;
    font-weight: bold;
    color: var(--ink);
}

.hp-btn {
    background: var(--accent);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2em;
    transition: transform 0.1s;
}

.hp-btn:active { transform: scale(0.92); }

/* 7. TABELLEN & BUTTONS */
.dnd-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 0.95em;
}

.dnd-table th {
    text-align: left;
    border-bottom: 2px solid var(--accent);
    color: var(--accent);
    padding: 10px 8px;
    font-family: 'Uncial Antiqua', serif;
    font-size: 0.95em;
}

.dnd-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(139, 0, 0, 0.12);
}

.save-btn {
    background: var(--accent);
    color: var(--parchment);
    border: 2px solid var(--accent-dark);
    padding: 14px 20px;
    border-radius: 6px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
    font-family: 'Uncial Antiqua', serif;
    font-size: 1.05em;
    box-shadow: 0 4px 0 var(--accent-dark);
    text-transform: uppercase;
    margin: 16px 0;
    min-height: var(--touch-min);
    transition: all 0.2s ease;
}

.save-btn:hover {
    background: #a50000;
    transform: translateY(-1px);
    box-shadow: 0 5px 0 var(--accent-dark);
}

.save-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--accent-dark);
}

/* 8. ARCHIV / FORMULARE (Items, Zauber, Talente) */
.archive-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 20px;
}

.archive-page-title {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px double var(--accent);
}

.archive-page-title h1 {
    font-size: 1.8em;
    color: var(--accent);
    margin: 0 0 6px;
    font-family: 'Uncial Antiqua', serif;
}

.archive-page-title p {
    margin: 0;
    font-size: 0.95em;
    opacity: 0.85;
}

.archive-card-main {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 24px 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15), inset 0 0 40px rgba(139, 69, 19, 0.06);
    position: relative;
}

.archive-card-main::before,
.archive-card-main::after {
    content: "⚔";
    position: absolute;
    font-size: 1rem;
    opacity: 0.25;
    color: var(--accent);
}
.archive-card-main::before { top: 8px; left: 8px; }
.archive-card-main::after { bottom: 8px; right: 8px; }

.archive-card-main .archive-form-title {
    font-size: 1.2em;
    color: var(--accent);
    margin: 0 0 20px;
    text-align: center;
    font-family: 'Uncial Antiqua', serif;
    border-bottom: 2px double var(--tan);
    padding-bottom: 10px;
}

.archive-list-empty {
    text-align: center;
    color: var(--border);
    margin: 0;
}

.archive-list-card .item-row-name {
    color: var(--accent);
}

.archive-list-card .item-row-meta {
    opacity: 0.7;
}

.form-row-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}
.form-row-checkbox label {
    margin: 0;
    text-transform: none;
    font-weight: normal;
}

.archive-form-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.archive-form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.archive-form-section h3 {
    font-size: 1em;
    color: var(--accent);
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Uncial Antiqua', serif;
}

.archive-list-card {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 20px;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), inset 0 0 40px rgba(139, 69, 19, 0.05);
}

.archive-list-card h3 {
    font-size: 1.1em;
    color: var(--accent);
    margin: 0 0 16px;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tan);
    font-family: 'Uncial Antiqua', serif;
}

.archive-list-card .item-row:last-child {
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

.archive-card-main label,
.form-grid label {
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    color: var(--border);
    margin-bottom: 6px;
    font-weight: bold;
    font-family: 'Crimson Text', serif;
}

.archive-card-main input,
.archive-card-main select,
.archive-card-main textarea,
.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tan);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--ink);
    font-family: 'Crimson Text', serif;
    font-size: 1em;
}

.archive-card-main input:focus,
.archive-card-main select:focus,
.archive-card-main textarea:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.15);
}

.category-box {
    display: none;
    margin-top: 16px;
    padding: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px dashed var(--tan);
}

.item-list {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 2px double var(--accent);
}

.add-item-box {
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--tan);
    border-radius: 10px;
    padding: 20px;
    margin-top: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
}

.equipped-row {
    background: rgba(139, 0, 0, 0.08) !important;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(255, 255, 255, 0.5);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--tan);
}

.edit-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--accent);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85em;
    transition: all 0.2s;
    white-space: nowrap;
}

.edit-link:hover {
    background: var(--accent);
    color: white;
}

.msg-success {
    background: #c8e6c9;
    color: #1b5e20;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid #81c784;
    font-weight: bold;
    text-align: center;
    font-style: italic;
}

.msg-error {
    background: #ffcdd2;
    color: #b71c1c;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid #e57373;
    text-align: center;
    font-style: italic;
}

/* 9. BADGES */
.item-badge,
.info-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    margin-right: 6px;
    margin-top: 4px;
    text-transform: uppercase;
}

.rk-badge {
    background: #eceff1;
    border: 1px solid #cfd8dc;
    color: #37474f;
}

.stealth-disadv,
.stealth-bad {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
}

.stealth-normal,
.stealth-good {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}

.mastery-tag {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    margin-left: 6px;
    text-transform: uppercase;
}

/* 10. MOBILE & RESPONSIVE */
.hide-mobile {
    display: table-cell;
}

@media screen and (max-width: 768px) {
    body {
        padding: 12px 8px;
    }

    .sheet {
        padding: 16px 12px;
    }

    .sheet-navbar {
        margin: -16px -12px 16px -12px;
        padding: 8px 6px;
    }

    .nav-item {
        font-size: 0.75em;
        padding: 8px 6px;
        min-height: 42px;
    }

    .sheet-footer {
        margin: 16px -12px -16px -12px;
        padding: 12px 10px;
        font-size: 0.8em;
    }

    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-box input {
        font-size: 1.4em;
    }

    .combat-box {
        width: 80px;
        height: 80px;
    }

    .combat-box input {
        font-size: 1.4em;
    }

    .char-selection-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .char-stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .char-combat-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .archive-card-main {
        padding: 18px 14px;
    }

    .dnd-table {
        font-size: 0.85em;
    }

    .dnd-table th,
    .dnd-table td {
        padding: 8px 6px;
    }

    .hide-mobile {
        display: none;
    }

    .item-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media screen and (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .auth-card {
        padding: 24px 16px;
    }

    .auth-card h2 {
        font-size: 1.4em;
    }
}
