:root {
    color-scheme: dark;
    --ink: #202621;
    --panel: #292f29;
    --panel-raised: #333a31;
    --olive: #3a4437;
    --rust: #a84b35;
    --paper: #d6d0ba;
    --light: #f4f0e4;
    --muted: #b7b8a8;
    --gold: #e1bd8b;
    --rule: #596151;
    --control-border: #818b76;
    --green: #879275;
    font-family: "DejaVu Sans", "Trebuchet MS", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--light); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--light); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
summary { min-height: 24px; }
.ambient-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.site-shell { position: relative; z-index: 1; max-width: 1160px; min-height: 100vh; margin: auto; padding: 0 28px; display: flex; flex-direction: column; }
.topbar { min-height: 84px; display: flex; align-items: center; gap: 40px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--light); }
.brand-mark { width: 56px; height: 56px; flex: none; object-fit: contain; }
.brand small, .brand strong { display: block; }
.brand small { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: 1.7px; }
.brand strong { font: bold 19px "DejaVu Serif", Georgia, serif; }
.main-nav { display: flex; flex-wrap: wrap; gap: 12px 25px; flex: 1; }
.desktop-navigation { flex: 1; min-width: 0; }
.mobile-navigation { display: none; }
.main-nav a, .account { color: var(--muted); font-size: 12px; }
.main-nav a:hover, .account a:hover { color: var(--light); }
.main-nav [aria-current="page"] { color: var(--light); text-decoration: underline; text-underline-offset: 5px; }
.account { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; min-width: 0; }
.account form { margin: 0; }
.link-button { border: 0; padding: 0; color: var(--gold); background: none; }
.logout-button { justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.logout-button:hover { color: var(--light); }
.main-content { flex: 1; padding: 38px 0 60px; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0 26px; border-top: 1px solid var(--rule); color: #999d8d; font-size: 10px; letter-spacing: .4px; text-transform: uppercase; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading h1, h1 { margin: 2px 0 6px; color: var(--light); font: bold 34px/1.13 "DejaVu Serif", Georgia, serif; }
h2 { margin: 0; font: bold 22px/1.2 "DejaVu Serif", Georgia, serif; }
h3 { margin: 0; font: bold 16px/1.3 "DejaVu Serif", Georgia, serif; }
.eyebrow { margin: 0 0 5px; color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: 1.7px; text-transform: uppercase; }
.muted { color: var(--muted); }
.page-heading .muted { margin: 5px 0 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 16px; border: 1px solid transparent; border-radius: 2px; font-size: 12px; font-weight: 700; letter-spacing: .3px; text-decoration: none; transition: background .15s ease, border-color .15s ease; }
.button-primary { background: var(--rust); color: var(--light); }
.button-primary:hover { background: #b45138; color: white; }
.button-secondary { border-color: var(--control-border); background: transparent; color: var(--light); }
.button-secondary:hover { border-color: var(--gold); color: var(--gold); }
.button-danger { background: #743a2d; color: var(--light); }
.button-danger:hover { background: var(--rust); }
.button-small { min-height: 32px; padding: 6px 11px; font-size: 11px; }
.button-icon { width: 42px; height: 40px; padding: 8px; }
.button-icon .game-icon { margin: 0; color: inherit; }
.button-icon[data-tooltip] { position: relative; }
.button-icon[data-tooltip]::before, .button-icon[data-tooltip]::after { position: absolute; left: 50%; z-index: 20; display: none; visibility: hidden; transform: translateX(-50%); }
.button-icon[data-tooltip]::before { content: ""; bottom: 100%; width: 100%; height: 6px; }
.button-icon[data-tooltip]::after { content: attr(data-tooltip); bottom: calc(100% + 6px); width: max-content; max-width: min(260px, calc(100vw - 32px)); padding: 6px 10px; border: 1px solid var(--rule); border-left: 3px solid var(--rust); background: var(--panel-raised); color: var(--light); box-shadow: 0 4px 12px rgba(0,0,0,.4); font-size: 11px; font-weight: 700; line-height: 1.4; white-space: normal; text-align: center; }
.button-icon[data-tooltip]:not([data-tooltip-dismissed]):hover::before, .button-icon[data-tooltip]:not([data-tooltip-dismissed]):hover::after, .button-icon[data-tooltip]:not([data-tooltip-dismissed]):focus-visible::before, .button-icon[data-tooltip]:not([data-tooltip-dismissed]):focus-visible::after { display: block; visibility: visible; }
.button-icon[data-tooltip][data-tooltip-edge="left"]::after { left: 0; transform: none; }
.button-icon[data-tooltip][data-tooltip-edge="right"]::after { left: auto; right: 0; transform: none; }
.lazy-more-actions { display: flex; justify-content: flex-end; }
[data-lazy-more][hidden] { display: none; }
[data-lazy-more][aria-disabled="true"] { cursor: progress; }
.button-wide { width: 100%; }
.text-link { color: var(--gold); font-size: 12px; font-weight: 700; }
.content-section { margin: 34px 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; margin-bottom: 13px; padding: 0 0 9px; border-bottom: 1px solid var(--rule); color: var(--light); font-size: 11px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
h2.section-heading { font-family: inherit; line-height: inherit; }
.section-heading > :is(h2, h3) { margin: 0; font: inherit; }
.section-count { min-width: 28px; padding: 3px 7px; border: 1px solid var(--rule); color: var(--gold); font-size: 10px; text-align: center; }
.campaign-card { display: flex; justify-content: space-between; gap: 25px; margin: 10px 0; padding: 20px; border: 1px solid var(--rule); border-left: 3px solid var(--rust); background: var(--panel); color: var(--light); }
.campaign-card:hover { border-color: var(--gold); background: #30372f; }
.campaign-card h2 { margin: 2px 0 5px; font-size: 19px; }
.campaign-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.campaign-card-meta { min-width: 125px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 9px; color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border: 1px solid var(--rule); font-size: 9px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; white-space: nowrap; }
.badge-approved, .badge-closed { border-color: #68785b; color: #bac8a8; }
.badge-pending, .badge-open { border-color: #9d774d; color: #e4c18c; }
.badge-locked { color: #a9aa9a; }
.badge-active { border-color: #68785b; color: #bac8a8; }
.badge-completed { border-color: var(--rust); color: #dfa08b; }
.empty-state { padding: 24px; border: 1px dashed var(--rule); color: var(--muted); font-size: 12px; text-align: center; }
.campaign-discovery { min-width: 0; }
.campaign-discovery h2 { margin: 0 0 16px; font-size: 18px; color: var(--gold); }
.carousel-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.carousel-controls[hidden] { display: none; }
.campaign-banner { margin: 0; padding: 0; list-style: none; border: 1px solid var(--rule); border-top: 3px solid var(--rust); background: var(--panel); overflow: hidden; }
.campaign-banner-slide { min-height: 320px; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 20px 32px; padding: 32px; animation: campaign-banner-in .6s ease; }
.campaign-banner-with-image { grid-template-columns: minmax(0, 1fr) minmax(180px, 320px); }
.campaign-banner-slide[hidden] { display: none; }
.campaign-banner-media { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.campaign-banner-image { display: block; max-width: 100%; max-height: 260px; width: auto; height: auto; object-fit: contain; border: 1px solid var(--rule); border-radius: 2px; }
.campaign-banner-content { min-width: 0; overflow-wrap: anywhere; }
.campaign-banner-content h3 { margin: 12px 0; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; }
.campaign-discovery-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; color: var(--paper); font-size: 14px; }
.campaign-banner-invitation { margin: 18px 0; color: var(--muted); font-size: 12px; }
.campaign-banner-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 16px; }
.carousel-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.carousel-dot { width: 26px; height: 36px; padding: 8px; border: 0; background: transparent; }
.carousel-dot::after { content: ""; display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--control-border); }
.carousel-dot[aria-pressed="true"]::after { background: var(--gold); }
.carousel-pause { display: inline-flex; align-items: center; justify-content: center; padding: 8px; border: 0; color: var(--muted); background: transparent; }
.carousel-pause svg { display: block; }
.carousel-pause[hidden] { display: none; }
.carousel-dot:focus-visible, .carousel-pause:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.campaign-discovery > .empty-state { margin: 20px 0; }
@keyframes campaign-banner-in { from { opacity: .25; } to { opacity: 1; } }
@media (max-width: 720px) {
    .campaign-banner-slide { padding: 24px; }
    .campaign-banner-with-image { grid-template-columns: minmax(0, 1fr); }
    .campaign-banner-media { justify-self: end; width: min(70%, 260px); }
}
@media (prefers-reduced-motion: reduce) { .campaign-banner-slide { animation: none; } }
.auth-wrap { min-height: 66vh; display: grid; place-items: center; }
.auth-card { width: min(100%, 440px); padding: 34px; border: 1px solid var(--rule); border-top: 3px solid var(--rust); background: var(--panel); }
.auth-card h1 { font-size: 28px; }
.auth-card .muted { margin: 0 0 22px; font-size: 12px; }
.legacy-login { margin-top: 20px; }
.legacy-login > summary { cursor: pointer; color: var(--light); font-size: 12px; font-weight: 700; }
.legacy-login[open] > summary { margin-bottom: 12px; color: var(--gold); }
.stack-form { display: grid; gap: 17px; }
.stack-form label, label { display: grid; gap: 6px; color: var(--light); font-size: 11px; font-weight: 700; }
label small, .field-label small { color: var(--muted); font-size: 10px; font-weight: 400; }
input, textarea, select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--control-border); border-radius: 0; outline: none; background: #222923; color: var(--light); font-size: 12px; font-weight: 400; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(225,189,139,.12); }
textarea { resize: vertical; line-height: 1.5; }
.auth-foot { margin: 22px 0 0; padding-top: 17px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 11px; }
.notice { margin: 0 0 18px; padding: 12px 16px; border-left: 3px solid var(--green); background: var(--panel); font-size: 12px; }
.notice-success { border-color: var(--green); }
.notice-info { border-color: var(--gold); }
.notice-error { border-color: var(--rust); }
.notice ul { margin: 7px 0 0; padding-left: 18px; color: #e7b6a3; }
.toast-region { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: grid; gap: 12px; width: min(460px, calc(100% - 36px)); max-height: calc(100dvh - 36px); overflow-y: auto; pointer-events: none; }
.toast { --toast-accent: #536044; position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 18px; border: 2px solid var(--toast-accent); border-left-width: 6px; background: #ece8d8; color: var(--ink); font-size: 13px; font-weight: 500; box-shadow: 0 10px 32px rgba(0,0,0,.6); pointer-events: auto; }
.toast::before { content: "\2713"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; background: var(--toast-accent); color: var(--light); font-size: 20px; font-weight: 700; line-height: 1; }
.toast.notice-success, .toast.notice-error { border-color: var(--toast-accent); }
.toast.notice-error { --toast-accent: var(--rust); background: #f2dfd3; }
.toast.notice-error::before { content: "!"; }
.toast[data-toast-timeout] { border-bottom-color: #b4b8a3; }
.toast-progress { position: absolute; left: -6px; right: -2px; bottom: -2px; height: 3px; background: var(--toast-accent); transform-origin: right center; pointer-events: none; }
.toast:focus-visible { outline: 2px solid var(--gold); outline-offset: -5px; }
.toast ul { color: #623523; }
.toast a { color: #623523; text-decoration: underline; }
.toast-content { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--toast-accent); background: transparent; color: var(--toast-accent); font-size: 22px; line-height: 1; }
.toast-close:hover, .toast-close:focus-visible { background: var(--toast-accent); color: var(--light); }
.form-page { display: grid; gap: 18px; }
.form-page > *, .form-grid > *, .roster-top-fields > *, .member-list > * { min-width: 0; }
.form-panel { padding: 17px; border: 1px solid var(--rule); background: var(--panel); }
.form-panel > .section-heading { margin: -1px 0 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }
.compact-heading { margin: 15px 0 4px; align-items: center; }
.compact-heading h2 { font-size: 23px; }
.journey-builder { display: grid; gap: 13px; }
.journey-editor .section-heading { margin-bottom: 14px; }
.date-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 5px; }
.form-actions .muted { font-size: 11px; }
.icon-button { min-width: 24px; min-height: 24px; border: 1px solid var(--control-border); padding: 6px 10px; background: transparent; color: var(--muted); font-size: 10px; }
.icon-button:hover { border-color: var(--rust); color: #e6a28c; }
.rich-editor { border: 1px solid var(--control-border); background: #222923; }
.editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 7px; border-bottom: 1px solid var(--rule); background: var(--panel-raised); }
.editor-toolbar button, .editor-toolbar select { width: auto; min-width: 28px; min-height: 28px; padding: 4px 7px; border: 1px solid var(--control-border); background: #252c26; color: var(--light); font-size: 10px; }
.editor-toolbar button:hover { border-color: var(--gold); }
.editor-canvas { min-height: 155px; padding: 12px; outline: 0; color: var(--light); font-size: 12px; }
.editor-canvas:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.editor-canvas h2, .mission-content h2 { font-size: 20px; }
.editor-canvas h3, .mission-content h3 { font-size: 16px; }
.editor-canvas blockquote, .mission-content blockquote { margin: 9px 0; padding: 5px 12px; border-left: 2px solid var(--rust); color: var(--muted); }
.editor-canvas table, .mission-content table { width: 100%; border-collapse: collapse; }
.editor-canvas td, .editor-canvas th, .mission-content td, .mission-content th { padding: 5px; border: 1px solid var(--rule); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 300; padding: 12px 16px; background: var(--light); color: var(--ink); font-weight: 700; transform: translateY(calc(-100% - 12px)); }
.skip-link:focus { transform: none; color: var(--ink); }
:is(a, button, input, select, textarea, summary, [tabindex], [contenteditable]):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.editor-canvas:focus-visible { outline-offset: -3px; }
.toast :is(a, button):focus-visible, .skip-link:focus-visible { outline-color: var(--ink); }
.main-nav a, .link-button, .site-footer a { display: inline-flex; align-items: center; min-height: 24px; }
.journey-list { display: grid; gap: 10px; }
.journey-card { display: grid; grid-template-columns: 47px 1fr; gap: 16px; padding: 17px; border: 1px solid var(--rule); background: var(--panel); }
.journey-current { border-color: #8f624b; box-shadow: inset 3px 0 var(--rust); }
.journey-number { color: var(--gold); font: bold 21px "DejaVu Serif", Georgia, serif; }
.journey-details > p { margin: 6px 0; font-size: 12px; }
.journey-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.journey-title-row h3 { font-size: 16px; }
.mission-details { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 9px; color: var(--gold); font-size: 11px; }
.mission-details summary { cursor: pointer; }
.mission-content { padding: 10px 0; color: var(--light); }
.mission-content table { margin: 9px 0; }
.master-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 10px; }
.master-controls form, .button-row form { margin: 0; }
.request-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 13px 5px; border-bottom: 1px solid var(--rule); }
.request-row > div:first-child { display: grid; gap: 2px; }
.request-row small { color: var(--muted); font-size: 10px; }
.button-row { display: flex; align-items: center; gap: 9px; }
.tiny-tag { margin-left: 5px; color: var(--gold); font: 700 8px "DejaVu Sans", sans-serif; letter-spacing: .7px; }
.callout-row, .approval-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 26px 0; padding: 18px; border: 1px solid #81513f; background: #302c27; }
.callout-row h2 { font-size: 20px; }
.callout-row p:not(.eyebrow) { margin: 4px 0 0; font-size: 11px; }
.roster-row { padding-left: 12px; padding-right: 12px; background: rgba(41,47,41,.55); }
.roster-top-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.member-list { display: grid; gap: 14px; }
.member-card { padding: 17px; border: 1px solid var(--rule); border-left: 3px solid #68745a; background: var(--panel); }
.member-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.member-card-heading h3 { font-size: 19px; }
.member-card-heading .eyebrow { margin-bottom: 2px; }
.member-fields { gap: 12px; }
.field-label { display: grid; gap: 4px; margin-bottom: 7px; color: var(--light); font-size: 11px; font-weight: 700; }
.weapon-grid { display: grid; grid-template-columns: 1.55fr .65fr .75fr 1.15fr; gap: 7px; margin-top: 6px; }
.weapon-grid input { min-width: 0; }
.weapon-head { color: var(--gold); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.weapon-editor { padding-top: 10px; border-top: 1px solid var(--rule); }
.approval-bar { border-color: var(--gold); }
.approval-bar > div { display: grid; gap: 3px; }
.approval-bar span { color: var(--muted); font-size: 11px; }
.data-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.data-panel { min-height: 85px; padding: 13px; border: 1px solid var(--rule); background: var(--panel); }
.data-panel h3 { margin-bottom: 6px; color: var(--gold); font-size: 11px; letter-spacing: .7px; text-transform: uppercase; }
.data-panel p { margin: 0; color: var(--muted); font-size: 12px; }
.preserve-lines { white-space: pre-wrap; }
.member-readonly { margin-bottom: 13px; padding: 16px; border: 1px solid var(--rule); background: var(--panel); }
.member-readonly-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.member-readonly-heading h2 { font-size: 20px; }
.stat-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 12px; }
.stat-strip div { display: grid; justify-items: center; padding: 9px 3px; border-top: 2px solid var(--rust); background: var(--olive); }
.stat-strip strong { font: bold 15px "DejaVu Serif", Georgia, serif; }
.stat-strip span { color: var(--muted); font-size: 8px; text-align: center; text-transform: uppercase; }
.table-wrap { overflow-x: auto; margin: 10px 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { padding: 8px; color: var(--gold); background: var(--olive); font-size: 9px; letter-spacing: .6px; text-align: left; text-transform: uppercase; }
.data-table td { padding: 8px; border-bottom: 1px solid var(--rule); color: var(--light); vertical-align: top; }
.data-table .diff-before { color: #e6a28c; }
.data-table .diff-after { color: #c4d0a9; }
.revision-card { margin: 9px 0; border: 1px solid var(--rule); background: var(--panel); }
.revision-card summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 13px; cursor: pointer; list-style: none; }
.revision-card summary::-webkit-details-marker { display: none; }
.revision-card summary > span:first-child { display: grid; gap: 3px; }
.revision-card summary small { color: var(--muted); font-size: 10px; }
.revision-card .table-wrap { margin: 0; }
.revision-no-change { padding: 0 13px 13px; font-size: 11px; }

@media (max-width: 720px) {
    .site-shell { padding: 0 16px; }
    .topbar { position: relative; min-height: 72px; gap: 8px; padding: 12px 0; }
    .brand { gap: 7px; flex: none; }
    .brand-mark { width: 40px; height: 40px; }
    .desktop-navigation, .desktop-language { display: none; }
    .account { flex: 1; flex-wrap: nowrap; justify-content: flex-end; gap: 2px; margin-left: auto; }
    .account-name { min-width: 0; }
    .account-username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-navigation { display: block; flex: none; margin-left: auto; }
    .account + .desktop-language + .mobile-navigation { margin-left: 0; }
    .mobile-navigation > summary { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule); color: var(--gold); cursor: pointer; list-style: none; }
    .mobile-navigation > summary::-webkit-details-marker { display: none; }
    .mobile-navigation[open] > summary, .mobile-navigation > summary:hover { border-color: var(--gold); }
    .mobile-nav-indicator { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--rust); }
    .mobile-navigation-panel { position: absolute; z-index: 20; top: 100%; right: 0; width: min(280px, 100%); padding: 12px; border: 1px solid var(--rule); background: var(--panel); box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
    .mobile-navigation-panel .main-nav { display: flex; flex-direction: column; gap: 0; width: 100%; }
    .mobile-navigation-panel .main-nav a { min-height: 44px; }
    .mobile-navigation-panel .lang-switch { margin: 8px 0 0; }
    .main-content { padding-top: 25px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .heading-actions > .button-icon[data-tooltip]:first-child::after { left: 0; transform: none; }
    .campaign-heading { position: relative; }
    .campaign-heading-main { padding-right: 46px; }
    .campaign-heading .options-menu { position: absolute; top: 0; right: 0; }
    .campaign-heading-has-options .campaign-heading-main { padding-right: 88px; }
    .campaign-heading-has-options .share-icon-button { position: absolute; top: 0; right: 46px; }
    .page-heading h1, h1 { font-size: 28px; }
    .campaign-card { flex-direction: column; }
    .campaign-card-meta { flex-direction: row; justify-content: space-between; align-items: center; }
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .date-pair, .roster-top-fields, .data-columns { grid-template-columns: 1fr; }
    .master-controls, .callout-row, .approval-bar { align-items: flex-start; flex-direction: column; }
    .journey-card { grid-template-columns: 32px 1fr; padding: 12px; }
    .journey-title-row { align-items: flex-start; }
    .request-row { align-items: flex-start; flex-direction: column; }
    .button-row { flex-wrap: wrap; }
    .stat-strip { grid-template-columns: repeat(3, 1fr); }
    .weapon-grid { grid-template-columns: 1.2fr .7fr .7fr 1fr; gap: 4px; }
    .weapon-grid input { padding: 7px 5px; font-size: 10px; }
    .site-footer { flex-direction: column; }
    .form-actions { align-items: flex-start; flex-direction: column; }
}

.stat-table-wrap { overflow-x: auto; }
.stat-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.stat-table th { padding: 6px 4px; color: var(--muted); font-size: 9px; text-align: center; text-transform: uppercase; border-bottom: 2px solid var(--rust); }
.stat-table td { padding: 6px 4px; }
.stat-table input { width: 100%; text-align: center; font-weight: bold; }

.backstory-toggle > summary { cursor: pointer; margin-bottom: 8px; }
.backstory-toggle > summary small { color: var(--muted); font-weight: normal; }
[data-xp-summary] { display: block; margin-top: 4px; }

.backstory-toggle > summary { display: flex; align-items: center; gap: 10px; list-style: none; padding: 10px 12px; border: 1px dashed var(--rust); background: var(--olive); cursor: pointer; user-select: none; }
.backstory-toggle > summary::-webkit-details-marker { display: none; }
.backstory-toggle > summary::before { content: "▸"; color: var(--rust); font-size: 16px; transition: transform .15s; }
.backstory-toggle[open] > summary::before { transform: rotate(90deg); }
.backstory-toggle > summary::after { content: "Mostrar"; margin-left: auto; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.backstory-toggle[open] > summary::after { content: "Ocultar"; }
html[lang="en"] .backstory-toggle > summary::after { content: "Show"; }
html[lang="en"] .backstory-toggle[open] > summary::after { content: "Hide"; }
.backstory-toggle > summary:hover { border-style: solid; }

.skill-picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.skill-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.skill-option { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line, #3a4034); background: var(--olive); cursor: pointer; }
.skill-option input { width: auto; margin-top: 3px; }
.skill-option span { display: grid; gap: 2px; }
.skill-option small { color: var(--muted); font-size: 10px; }
.skill-option:has(input:checked) { border-color: var(--rust); }
.skill-option:has(input:disabled) { opacity: .45; cursor: not-allowed; }
@media (max-width: 700px) { .skill-options { grid-template-columns: 1fr; } }

.gear-section { padding-top: 10px; border-top: 1px solid var(--rule); display: grid; gap: 6px; }
.gear-section .weapon-grid { grid-template-columns: 1.6fr .7fr .7fr 1.2fr auto; }
.gear-row-equipment { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 6px; }
.gear-section [data-add-gear] { justify-self: start; margin-top: 4px; }
.table-title { margin: 14px 0 6px; font-size: 11px; text-transform: uppercase; color: var(--gold); }
@media (max-width: 700px) { .gear-section .weapon-grid { grid-template-columns: 1fr 1fr; } }

.faction-benefits { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; display: grid; gap: 3px; }
.faction-benefits:empty { display: none; }

.salvage-field { display: grid; gap: 4px; margin-bottom: 12px; }

.alliance-table { margin-top: 12px; }
.alliance-current { outline: 2px solid var(--rust); background: var(--olive); }
.alliance-allied { color: #8fbf7a; }
.alliance-enemy { color: #eca088; }
.alliance-neutral { color: var(--muted); }
.alliance-table [hidden] { display: none; }
.alliance-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.alliance-cell { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--line, #3a4034); background: var(--olive); }
.alliance-cell span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) { .alliance-row { grid-template-columns: 1fr; } }

.k-cost { display: block; margin-top: 4px; color: var(--gold); }
.k-total { margin: 4px 0 0; }
.k-total strong { color: var(--gold); font-size: 1.2em; }

.nav-badge { display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 4px; border-radius: 9px; background: var(--rust); color: #fff; font-size: 10px; text-align: center; }
.notification { display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 12px 14px; margin-bottom: 6px; border-left: 3px solid var(--muted); background: var(--olive); color: inherit; text-decoration: none; }
.notification:hover { filter: brightness(1.15); }
.notification-meta { display: grid; }
.notification-meta small { color: var(--muted); text-transform: uppercase; font-size: 9px; }
.notification-urgent { border-left-color: #d9674a; }
.notification-action { border-left-color: var(--rust); }
.notification-warning { border-left-color: var(--gold); }
.notification-info { border-left-color: #6f8f6a; }
@media (max-width: 700px) { .notification { grid-template-columns: 1fr; } }
.badge-rejected { border-color: #a5513f; color: #e29a86; }
.reject-form { display: grid; gap: 8px; margin-bottom: 14px; }

.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.roster-card { display: grid; gap: 10px; align-content: start; padding: 15px; border: 1px solid var(--rule); background: rgba(41,47,41,.55); }
.saved-roster-list { display: grid; gap: 16px; }
.roster-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.roster-card-faction { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.roster-card-members { margin: 0; font-size: 12px; }
.roster-card .stat-strip { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .roster-grid { grid-template-columns: 1fr; } }

.help-index { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.help-index a { padding: 6px 12px; border: 1px solid var(--rule); background: var(--panel); color: var(--gold); font-size: 11px; letter-spacing: .6px; text-transform: uppercase; text-decoration: none; }
.help-index a:hover { border-color: var(--gold); }
.help-block { display: grid; gap: 8px; }
.help-block details { border: 1px solid var(--rule); background: var(--panel); }
.help-block summary { padding: 11px 14px; cursor: pointer; color: var(--light); font-weight: 700; font-size: 13px; }
.help-block details[open] summary { color: var(--gold); border-bottom: 1px solid var(--rule); }
.help-block details > :not(summary) { margin: 0; padding: 10px 14px 0; font-size: 12px; color: var(--muted); }
.help-block details > :last-child { padding-bottom: 12px; }
.help-block ul { padding-left: 32px; }
.content-section { scroll-margin-top: 20px; }

.lang-switch { display: inline-flex; align-items: center; flex-shrink: 0; gap: 8px; min-height: 44px; margin-left: auto; padding: 9px 16px; border: 1px solid var(--rule); border-radius: 2px; color: var(--gold); font-size: 12px; letter-spacing: .3px; }
.lang-switch:hover { background: var(--panel-raised); border-color: var(--gold); color: var(--gold); }
.lang-switch:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.language-flag { display: block; width: 27px; height: 18px; }
.checkbox-label { flex-direction: row; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.checkbox-label input { width: auto; }

.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.join-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.join-import, .import-bar label { display: grid; gap: 4px; font-size: 11px; }
.import-bar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.stat-strip-3 { grid-template-columns: 2fr 1fr 1fr; }
.roster-card .stat-strip-3 { grid-template-columns: 2fr 1fr 1fr; }
.stat-faction strong { font-size: 13px; text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.member-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.member-lines li { display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 10px; align-items: baseline; padding: 6px 10px; background: var(--olive); font-size: 12px; }
.member-lines span { color: var(--muted); }
.member-lines em { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); }

.profile-form { max-width: 420px; }
.account-name { color: inherit; text-decoration: none; }
.account-name:hover { color: var(--gold); }
@media (max-width: 700px) { .member-lines li { grid-template-columns: 1fr auto; } .member-lines li span { grid-column: 1 / -1; grid-row: 2; } }
.card-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.card-actions form { margin: 0; }
.page-heading > .button, .heading-actions { flex-shrink: 0; }
.page-heading .button { white-space: nowrap; }

@media print {
    .print-only { display: block !important; }
    @page { size: A4; margin: 10mm; }
    :root { color-scheme: light; }
    body { background: #fff !important; color: #111 !important; font-size: 9.5pt; line-height: 1.3; }
    .topbar, .site-footer, .no-print, .notice-success { display: none !important; }
    .site-shell { max-width: none; min-height: 0; padding: 0; display: block; }
    .main-content { padding: 0; }
    h1 { font-size: 20pt; margin: 0; color: #111; }
    .eyebrow, .data-panel h3, .k-total strong, .k-cost, .member-readonly-heading .eyebrow { color: #8a3a28 !important; }
    .muted, .data-panel p, .stat-strip span { color: #444 !important; }
    .page-heading { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid #8a3a28; }
    .content-section { margin: 8px 0; }
    .section-heading { min-height: 0; margin-bottom: 5px; padding-bottom: 3px; border-bottom: 1px solid #999; color: #111; font-size: 10pt; }
    .section-count { color: #111; }
    .data-columns { gap: 6px; margin-bottom: 6px; }
    .data-panel, .member-readonly { min-height: 0; padding: 6px 8px; border: 1px solid #999; background: #fff !important; box-shadow: none; }
    .print-emphasis { font-weight: 700; }
    .member-readonly { margin-bottom: 6px; break-inside: avoid; }
    .member-readonly-heading { margin-bottom: 4px; }
    .member-readonly-heading h2 { font-size: 12pt; color: #111; display: inline; margin-right: 8px; }
    .member-readonly-heading > div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
    .member-readonly-heading p { margin: 0; }
    .stat-strip { gap: 3px; margin-bottom: 5px; }
    .stat-strip div { padding: 3px 2px; border: 1px solid #999; border-top: 2px solid #8a3a28; background: #fff !important; }
    .stat-strip strong { color: #111; font-size: 10pt; }
    .data-table { font-size: 8.5pt; }
    .data-table th, .data-table td { padding: 2px 5px; color: #111 !important; background: #fff !important; border: 1px solid #999; }
    .table-title { margin: 4px 0 2px; font-size: 9pt; color: #111; }
    .backstory-toggle > summary { list-style: none; }
    .k-total { margin: 0 0 5px; color: #111; }
    a { color: inherit; }
}

.print-only { display: none; }

.docs-editor { display: grid; gap: .5rem; justify-items: start; }
.docs-editor > div { justify-self: stretch; }
.doc-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: .5rem; margin-bottom: .5rem; }
.docs-list { margin: .75rem 0; }
.docs-list ul { margin: .25rem 0 0; padding-left: 1.1rem; }
@media (max-width: 640px) { .doc-row { grid-template-columns: 1fr auto; } .doc-row input[data-doc-field="url"] { grid-column: 1 / 2; } }
.checkbox-nowrap { flex-wrap: nowrap; white-space: nowrap; }

.avatar { display: inline-flex; align-items: center; justify-content: center; width: var(--avatar-size, 28px); height: var(--avatar-size, 28px); border-radius: 50%; overflow: hidden; flex: none; vertical-align: middle; background: var(--panel-2, #2a2a2a); border: 1px solid var(--rule); margin-right: 8px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-initial { font-size: calc(var(--avatar-size, 28px) * .45); font-weight: 800; color: var(--light); }
.redacted-name { display: inline-block; line-height: 1; background: #000; color: #000; box-shadow: 0 0 0 1px #777; }
.account-name { display: inline-flex; align-items: center; }
.campaign-card-main { flex: 1; min-width: 0; }
.roster-note { margin: 8px 0; padding: 6px 9px; border-left: 2px solid var(--gold); background: rgba(225,189,139,.08); color: var(--muted); font-size: 11px; }
.add-row { margin: 12px 0 22px; }
.avatar-square { border-radius: 3px; }
.avatar-stage.square { border-radius: 0; }
.avatar-stage.hex { border-radius: 0; outline: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.member-hex { display: inline-flex; align-items: center; justify-content: center; width: var(--hex-size, 72px); height: var(--hex-size, 72px); flex: none; overflow: hidden; background: var(--panel-2, #2a2a2a); color: var(--muted, #888); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.member-hex img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-hex svg { width: 50%; height: 50%; opacity: .6; }
.member-image-field { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.member-readonly-heading { justify-content: flex-start; gap: 16px; }
@media print { .member-hex { clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.campaign-card > .avatar { align-self: center; margin-right: 0; }
.avatar-editor-block { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.avatar-editor-block .avatar { margin-right: 0; }
.avatar-dialog { padding: 16px; display: grid; gap: 14px; }
.avatar-dialog h2 { font-size: 18px; }
.avatar-dialog p { margin: 0; font-size: 12px; }
.avatar-stage-frame { width: min(256px, 100%); aspect-ratio: 1; margin: auto; }
.avatar-stage-frame:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.avatar-stage { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; touch-action: none; cursor: grab; border-radius: 50%; }
.avatar-stage canvas { display: block; width: 100%; height: 100%; }
.avatar-dialog input[type=range] { width: 100%; }
.avatar-pan { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.campaign-title { display: flex; align-items: center; gap: 10px; }
.share-icon-button { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 6px; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.share-icon-button:hover, .share-icon-button:focus-visible { border-color: var(--gold); color: var(--gold); }
.campaign-heading-side { display: flex; align-self: flex-start; align-items: center; gap: 10px; flex-shrink: 0; }
.options-menu { position: relative; }
.options-menu > summary { display: grid; place-items: center; width: 36px; height: 34px; border: 1px solid var(--rule); border-radius: 2px; color: var(--muted); font-size: 20px; font-weight: 700; line-height: 1; list-style: none; cursor: pointer; }
.options-menu > summary::-webkit-details-marker { display: none; }
.options-menu > summary > span { transform: translateY(-4px); }
.options-menu > summary:hover, .options-menu > summary:focus-visible, .options-menu[open] > summary { border-color: var(--gold); color: var(--gold); }
.options-menu-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: grid; min-width: 190px; padding: 4px 0; border: 1px solid var(--rule); border-left: 3px solid var(--rust); background: var(--panel-raised); box-shadow: 0 6px 16px rgba(0,0,0,.45); }
.options-menu-panel form { margin: 0; }
.options-menu-item { display: block; width: 100%; padding: 9px 14px; border: 0; background: transparent; color: var(--light); font: inherit; font-size: 12px; font-weight: 700; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.options-menu-item:hover, .options-menu-item:focus-visible { background: rgba(225,189,139,.1); color: var(--gold); }
.options-menu-danger { color: #e6a28c; }
.share-icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-dialog { width: min(520px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 0; border: 1px solid var(--rule); background: var(--panel, #1b1b1b); color: var(--light); }
.app-dialog::backdrop { background: rgba(0,0,0,.75); }
.app-dialog.avatar-modal { width: min(360px, calc(100% - 32px)); }
.app-dialog-panel { display: grid; gap: 16px; padding: 20px; }
.app-dialog-panel .section-heading { margin: 0; }
.privacy-content { display: grid; gap: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.privacy-content p { margin: 0; }
.privacy-content a { color: var(--gold); }
.message-dialog { border-top: 3px solid var(--rust); }
.message-dialog p { margin: 0; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dialog-actions .button { max-width: 100%; }
.dialog-actions [hidden] { display: none; }
@media print { .app-dialog { display: none; } }
.share-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.share-options .button { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; text-decoration: none; }
.share-options svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.share-options .share-brand-mark { fill: currentColor; stroke: none; }
.share-copy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-copy-row .button { flex: none; }
@media (max-width: 480px) { .share-copy-row { align-items: flex-start; flex-direction: column; } }
@media print { .avatar { display: none; } }

.faction-icon { color: var(--gold); vertical-align: -4px; margin-right: 6px; flex: none; }
.stat-faction .faction-icon { display: block; margin: 0 auto 4px; }
.faction-picker { display: flex; align-items: center; gap: 10px; }
.faction-picker .faction-icon { margin: 0; width: 34px; height: 34px; padding: 6px; border: 1px solid var(--rule); background: #222923; box-sizing: border-box; }
.faction-picker .faction-icon:empty { display: none; }
.faction-picker select { flex: 1; }
.stack-form .checkbox-label { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.stack-form .checkbox-label input { width: auto; }
.stack-form .delete-account-confirm { flex-wrap: nowrap; align-items: flex-start; }
.stack-form .delete-account-confirm input { flex: none; margin: 1px 0 0; }

.game-icon { color: var(--gold); vertical-align: -3px; margin-right: 5px; flex: none; }
.stat-strip .game-icon { display: block; margin: 0 auto 3px; }
.data-panel h3 .game-icon, .field-label .game-icon, .section-heading .game-icon { margin-right: 6px; }
@media print { .game-icon, .faction-icon { color: #000; } }
.field-label:has(> .game-icon), .data-panel h3:has(> .game-icon) { display: flex; align-items: center; }
.site-footer a { color: var(--gold); }
.landing { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; padding: 20px 0; }
.landing-intro h1 { font-size: 34px; margin: 4px 0 12px; }
.landing-lead { color: var(--light); font-size: 14px; line-height: 1.6; max-width: 640px; }
.landing-try, .landing-benefits { margin-top: 22px; padding: 20px; border: 1px solid var(--rule); border-left: 3px solid var(--gold); background: var(--panel); max-width: 640px; }
.landing-try h2, .landing-benefits h2 { margin: 0 0 8px; font-size: 16px; color: var(--gold); }
.landing-try p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.landing-benefits ul { margin: 0; padding-left: 18px; color: var(--light); font-size: 13px; line-height: 1.7; }
.landing-login { position: sticky; top: 20px; width: 100%; }
.landing-login h2 { margin: 0 0 16px; font-size: 24px; }
.landing-about { margin: 20px 0 34px; padding: 20px; border: 1px solid var(--rule); border-left: 3px solid var(--gold); background: var(--panel); }
.landing-about h2 { margin: 0 0 8px; font-size: 16px; color: var(--gold); }
.landing-about p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.landing-about a { color: var(--gold); }
.campaign-edit-actions { margin-bottom: 30px; }
@media (max-width: 860px) { .landing { grid-template-columns: 1fr; } .landing-login { position: static; } .landing-intro h1 { font-size: 26px; } }
.roster-card-head { min-height: 30px; }
.stamp { display: inline-block; transform: rotate(-6deg); padding: 2px 9px; border: 2px solid currentColor; border-radius: 3px; outline: 1px solid currentColor; outline-offset: 2px; font: 800 11px "DejaVu Sans Mono", monospace; letter-spacing: .16em; text-transform: uppercase; opacity: .88; white-space: nowrap; text-shadow: 0 0 1px currentColor; }
.stamp-approved { color: #8fbf72; }
.stamp-pending { color: var(--gold); }
.stamp-rejected { color: #eca088; }
.my-roster-card { border-left-color: var(--gold); }
.my-roster-heading { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; }
.my-roster-heading > .stamp { margin-left: auto; margin-bottom: 8px; }
.my-roster-heading h3 { margin: 2px 0 5px; font-size: 19px; }
.my-roster-card .stat-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 12px 0 0; }
.my-roster-footer { display: flex; justify-content: flex-end; margin-top: 16px; }
@media (max-width: 860px) { .my-roster-card .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .my-roster-card .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print { .stamp { border-color: #8a3a28; color: #8a3a28; outline-color: #8a3a28; } }
.roster-card-head .stamp { font-size: 10px; letter-spacing: .1em; padding: 1px 7px; }
.my-roster-card .member-lines { margin-top: 18px; }

.slot-counter { margin: 0; align-self: end; }
.slot-counter.is-over, .slot-counter.is-over strong { color: #e0a030; }
.slot-counter.is-over::after { content: attr(data-over-label); margin-left: 8px; font-size: .85em; }
.data-panel h3 .slot-counter { font-weight: 400; margin-left: 8px; }

[data-lazy-sentinel] { height: 1px; }
[data-lazy-more] { margin-top: 10px; }

@media print { .ambient-bg { display: none; } }

/* Tiradados */
.dice-station { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 24px; align-items: stretch; }
.dice-controls { display: grid; align-content: start; gap: 16px; }
.dice-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dice-add { position: relative; display: grid; justify-items: center; gap: 10px; padding: 16px 10px 12px; border: 1px solid var(--rule); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.15)); color: var(--light); cursor: pointer; transition: border-color .15s ease, transform .15s ease, background .15s ease; }
.dice-add:hover, .dice-add:focus-visible { border-color: var(--gold); background: rgba(225,189,139,.07); transform: translateY(-2px); }
.dice-add:hover .die, .dice-add:focus-visible .die { animation: die-wiggle .5s ease; }
.dice-add:active { transform: translateY(1px) scale(.97); }
.dice-add[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.dice-add-label { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.dice-counter { margin: -4px 0 0; font-size: 11px; letter-spacing: .5px; text-align: center; }
.dice-counter.is-full { color: #e6a28c; animation: counter-bump .35s ease; }
.dice-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.dice-actions .button[disabled] { opacity: .5; cursor: not-allowed; }

.dice-tray { position: relative; display: grid; place-items: center; min-height: 290px; padding: 30px 24px 56px; overflow: hidden; border: 10px solid #2b2620; border-radius: 6px; outline: 1px solid var(--rule); background: radial-gradient(ellipse at 50% 35%, #3c4d34 0%, #27331f 55%, #182016 100%); box-shadow: inset 0 0 50px rgba(0,0,0,.75), inset 0 0 0 1px rgba(225,189,139,.12), 0 12px 26px rgba(0,0,0,.5); }
.dice-tray::before { content: ""; position: absolute; inset: 8px; border: 1px dashed rgba(225,189,139,.16); border-radius: 3px; pointer-events: none; }
.dice-tray::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 5px); pointer-events: none; }
.dice-tray.is-shaking { animation: tray-shake .45s ease; }
.dice-tray-dice { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 22px; max-width: 560px; }
.dice-tray-empty, .dice-tray-hint { position: absolute; left: 0; right: 0; margin: 0; color: rgba(214,208,186,.5); text-align: center; text-transform: uppercase; letter-spacing: 1.5px; }
.dice-tray-empty { top: 50%; font-size: 12px; font-weight: 700; transform: translateY(-50%); }
.dice-tray-hint { bottom: 18px; font-size: 9px; }
.dice-tray-total { position: absolute; right: 18px; bottom: 14px; z-index: 2; display: grid; justify-items: end; color: var(--gold); animation: total-pop .45s cubic-bezier(.2,.9,.3,1.4) both; }
.dice-tray-total small { font-size: 9px; font-weight: 700; letter-spacing: 1.7px; text-transform: uppercase; }
.dice-tray-total strong { font: bold 40px/1 "DejaVu Serif", Georgia, serif; text-shadow: 0 0 18px rgba(225,189,139,.45), 0 2px 0 rgba(0,0,0,.6); }
.dice-tray-total[hidden], .dice-tray-hint[hidden], .dice-tray-empty[hidden] { display: none; }
.dice-canvas { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; touch-action: manipulation; }
.dice-tray.is-3d .dice-tray-dice { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dice-tray.is-3d .dice-tray-empty, .dice-tray.is-3d .dice-tray-hint, .dice-tray.is-3d .dice-tray-total { z-index: 2; pointer-events: none; }
.dice-tray.is-3d .dice-tray-total { padding: 6px 12px 8px; border-left: 3px solid var(--rust); background: rgba(20, 25, 17, .72); box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.die-slot { padding: 0; border: 0; background: none; cursor: pointer; }
.die-slot:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.die-slot:hover .die:not(.is-rolling) { transform: rotate(var(--tilt, 0deg)) scale(1.08); }

.die { --size: 58px; position: relative; display: inline-grid; place-items: center; width: var(--size); height: var(--size); flex: none; color: var(--light); font: bold calc(var(--size) * .36)/1 "DejaVu Serif", Georgia, serif; transform: rotate(var(--tilt, 0deg)); transition: transform .15s ease; }
.die-d6 { width: calc(var(--size) * .82); height: calc(var(--size) * .82); margin: calc(var(--size) * .09); border-radius: 18%; background: linear-gradient(135deg, #f3ecd6 0%, #e4dbc0 50%, #d3c8a8 100%); box-shadow: inset 0 calc(var(--size) * -.07) 0 rgba(90,70,40,.22), inset calc(var(--size) * -.05) 0 0 rgba(90,70,40,.12), inset 0 2px 0 rgba(255,255,255,.65), 0 6px 10px rgba(0,0,0,.5); color: #2a221a; }
.die-pips { display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); width: 81%; height: 81%; }
.die-pips i { width: 64%; aspect-ratio: 1; place-self: center; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #4a3b2d, #16100b); box-shadow: inset 0 1px 1px rgba(0,0,0,.5); opacity: 0; }
.die-d6:not([data-value])::after { content: "D6"; position: absolute; font-size: calc(var(--size) * .3); letter-spacing: .5px; }
.die-d6[data-value="1"] .die-pips i:nth-child(5),
.die-d6[data-value="2"] .die-pips i:is(:nth-child(3), :nth-child(7)),
.die-d6[data-value="3"] .die-pips i:is(:nth-child(3), :nth-child(5), :nth-child(7)),
.die-d6[data-value="4"] .die-pips i:is(:nth-child(1), :nth-child(3), :nth-child(7), :nth-child(9)),
.die-d6[data-value="5"] .die-pips i:is(:nth-child(1), :nth-child(3), :nth-child(5), :nth-child(7), :nth-child(9)),
.die-d6[data-value="6"] .die-pips i:is(:nth-child(1), :nth-child(3), :nth-child(4), :nth-child(6), :nth-child(7), :nth-child(9)) { opacity: 1; }
.die-d6[data-value="1"] .die-pips i:nth-child(5) { width: 86%; background: radial-gradient(circle at 35% 35%, #c8654b, #7a3324); }
.die-d10 { filter: drop-shadow(0 6px 6px rgba(0,0,0,.55)); }
.die-body { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.die-d10::after, .d10-side { position: absolute; color: #f4f0e4; font-weight: bold; line-height: 1; white-space: nowrap; text-shadow: 0 1px 0 rgba(40,14,8,.55); transform-origin: 0 0; }
.die-d10::after { content: attr(data-value); left: 50%; top: 50%; font-size: calc(var(--size) * .24); transform: matrix(1.55, 0, 0, 1.37, 0, 0) translate(-50%, -50%); }
.die-d10[data-value="10"]::after { font-size: calc(var(--size) * .17); letter-spacing: -.06em; }
.die-d10:is([data-value="6"], [data-value="9"])::after { text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .1em; }
.die-d10:not([data-value])::after { content: "D10"; font-size: calc(var(--size) * .15); }
.d10-side { top: 43.5%; font-size: calc(var(--size) * .17); opacity: .9; }
.d10-side::before { display: block; transform: translate(-50%, -50%); }
.d10-left { left: 17.3%; transform: matrix(.48, .4, -1.02, 1.17, 0, 0); }
.d10-right { left: 82.7%; transform: matrix(.48, -.4, 1.02, 1.17, 0, 0); }
.die-d10[data-value="1"] .d10-left::before { content: "3"; } .die-d10[data-value="1"] .d10-right::before { content: "9"; }
.die-d10[data-value="3"] .d10-left::before { content: "5"; } .die-d10[data-value="3"] .d10-right::before { content: "1"; }
.die-d10[data-value="5"] .d10-left::before { content: "7"; } .die-d10[data-value="5"] .d10-right::before { content: "3"; }
.die-d10[data-value="7"] .d10-left::before { content: "9"; } .die-d10[data-value="7"] .d10-right::before { content: "5"; }
.die-d10[data-value="9"] .d10-left::before { content: "1"; } .die-d10[data-value="9"] .d10-right::before { content: "7"; }
.die-d10[data-value="4"] .d10-left::before { content: "2"; } .die-d10[data-value="4"] .d10-right::before { content: "6"; }
.die-d10[data-value="2"] .d10-left::before { content: "10"; } .die-d10[data-value="2"] .d10-right::before { content: "4"; }
.die-d10[data-value="10"] .d10-left::before { content: "8"; } .die-d10[data-value="10"] .d10-right::before { content: "2"; }
.die-d10[data-value="8"] .d10-left::before { content: "6"; } .die-d10[data-value="8"] .d10-right::before { content: "10"; }
.die-d10[data-value="6"] .d10-left::before { content: "4"; } .die-d10[data-value="6"] .d10-right::before { content: "8"; }
.die.is-min { opacity: .82; }
.die-mini { --size: 36px; font-size: 13px; }
.die-mini.die-d6 { box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), 0 2px 4px rgba(0,0,0,.4); }
.die-mini.die-d10 { filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.die-mini.die-d10::after { font-size: 10px; text-shadow: 0 1px 0 rgba(0,0,0,.7); }
.die-mini.die-d10[data-value="10"]::after { font-size: 7.5px; letter-spacing: -.05em; }
.die-mini .d10-side { display: none; }

.die.is-entering { animation: die-drop .55s cubic-bezier(.2,.8,.3,1.15) both; }
.die.is-leaving { animation: die-leave .25s ease-in both; }
.die.is-rolling { animation: die-tumble var(--roll-duration, 1.1s) cubic-bezier(.25,.6,.35,1) var(--roll-delay, 0s) both; }
.die.is-landed { animation: die-land .3s ease-out both; }

@keyframes die-drop {
    0% { opacity: 0; transform: translateY(-160px) rotate(-220deg) scale(.4); }
    55% { opacity: 1; transform: translateY(10px) rotate(12deg) scale(1.06, .94); }
    75% { transform: translateY(-8px) rotate(-5deg) scale(.98, 1.02); }
    100% { transform: rotate(var(--tilt, 0deg)); }
}
@keyframes die-leave { to { opacity: 0; transform: scale(0) rotate(120deg); } }
@keyframes die-tumble {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    12% { transform: translate(calc(var(--x1) * .5), -70px) rotate(calc(var(--spin) * .15)) scale(1.25); }
    32% { transform: translate(var(--x1), var(--y1)) rotate(calc(var(--spin) * .45)) scale(.92, 1.08); }
    55% { transform: translate(var(--x2), var(--y2)) rotate(calc(var(--spin) * .75)) scale(1.06, .94); }
    78% { transform: translate(var(--x3), var(--y3)) rotate(calc(var(--spin) * .93)) scale(1); }
    100% { transform: translate(0, 0) rotate(calc(var(--spin) + var(--tilt, 0deg))); }
}
@keyframes die-land {
    0% { transform: rotate(var(--tilt, 0deg)) scale(1.18, .82); }
    55% { transform: rotate(var(--tilt, 0deg)) scale(.95, 1.05); }
    100% { transform: rotate(var(--tilt, 0deg)) scale(1); }
}
@keyframes die-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 60% { transform: rotate(10deg); } }
@keyframes tray-shake { 0%, 100% { transform: translate(0); } 20% { transform: translate(-4px, 2px) rotate(-.4deg); } 45% { transform: translate(4px, -2px) rotate(.4deg); } 70% { transform: translate(-2px, 1px); } }
@keyframes total-pop { 0% { opacity: 0; transform: scale(.4) translateY(10px); } 100% { opacity: 1; transform: none; } }
@keyframes counter-bump { 50% { transform: scale(1.12); } }
@keyframes roll-row-in { 0% { opacity: 0; transform: translateY(-8px); background: rgba(225,189,139,.16); } 100% { opacity: 1; transform: none; background: transparent; } }

.roll-search { position: relative; margin-bottom: 14px; }
.roll-search .game-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.roll-search input { padding-left: 34px; }
.roll-search input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6); cursor: pointer; }
.campaign-log-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.campaign-log-filters label { min-width: 0; }
.campaign-log-search { grid-column: 1 / -1; }
.campaign-log-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.log-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; }
.log-pagination [aria-disabled="true"] { opacity: .5; }
.minutes-player, .minutes-character { border: 1px solid var(--rule); padding: 14px; margin: 12px 0; }
.minutes-player > summary, .minutes-character > summary { cursor: pointer; color: var(--light); font-weight: 700; }
.minutes-player > :not(summary), .minutes-character > :not(summary) { margin-top: 12px; }
.minutes-counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.minutes-add-player { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.minutes-add-player[hidden] { display: none; }
.minutes-add-player label { flex: 1 1 200px; }
.minutes-objective { border: 0; padding: 0; margin: 0; min-width: 0; }
.minutes-objective-options { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.minutes-choices [data-minutes-items] { display: grid; gap: 8px; }
.minutes-choices button { margin-top: 8px; }
.minutes-actions { justify-content: flex-end; margin-top: 16px; }
.minutes-actions + .empty-state { margin-top: 16px; }
@media (max-width: 420px) { .minutes-counters { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
    .campaign-log-filters { grid-template-columns: 1fr; }
}
.roll-log[aria-busy="true"] .roll-row { opacity: .55; transition: opacity .15s; }
.roll-log { display: grid; }
.roll-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 13px 5px; border-bottom: 1px solid var(--rule); }
.roll-row.is-new { animation: roll-row-in 1.4s ease-out both; }
.roll-row-main { display: grid; gap: 3px; min-width: 0; }
.roll-row-main strong { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.roll-row-description { margin: 0; color: var(--paper); font-size: 13px; overflow-wrap: anywhere; }
.roll-row-main small { color: var(--muted); font-size: 10px; }
.roll-row-dice { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; max-width: 380px; }
.roll-row-total { display: grid; justify-items: center; min-width: 54px; padding: 4px 8px; border: 1px solid var(--rule); border-left: 3px solid var(--rust); }
.roll-row-total small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.roll-row-total strong { color: var(--gold); font: bold 20px/1.1 "DejaVu Serif", Georgia, serif; }

@media (max-width: 760px) {
    .dice-station { grid-template-columns: 1fr; }
    .dice-tray { order: -1; min-height: 230px; }
    .roll-row { grid-template-columns: minmax(0, 1fr) auto; }
    .roll-row-dice { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; max-width: none; }
    .roll-row-total { grid-row: 1; grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
    .die, .dice-tray, .dice-tray-total, .roll-row, .dice-add, .dice-counter { animation: none !important; transition: none !important; }
}
.field-error { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-left: 3px solid var(--rust); background: rgba(168,75,53,.14); color: #e7b6a3; font-size: 11px; font-weight: 700; }
.field-error::before { content: "!"; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--rust); color: var(--light); font-size: 10px; }
.field-error[hidden] { display: none; }
input.is-invalid, :is(input, select, textarea, [contenteditable])[aria-invalid="true"] { border-color: #eca088; box-shadow: 0 0 0 1px rgba(168,75,53,.25); }
input.is-invalid { animation: field-shake .35s ease; }
@keyframes field-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { input.is-invalid { animation: none; } }
