/* The hero picker: the table's list of choices (chooser.js) laid out as cards, one for each hero of the campaign (the portrait, the name, the class and
 * level, a line about them); a hero that cannot be played is dimmed and says why. */

.tt-chooser-heroes {
    --tt-dialog-width: 760px;
}

/* over the begin screen and the defeat screen too: the hero is chosen there, and so are the rules */
.tt-chooser-heroes-backdrop,
.tt-chooser-rules-backdrop {
    z-index: 90;
}

.tt-chooser-intro {
    margin: -4px 0 12px;
    color: var(--tt-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.tt-chooser-heroes .tt-choices {
    display: grid;
    /* a card is 280px at least, or the whole width of a dialog narrower than that (a 320px phone): it never overflows sideways */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 10px;
}

.tt-choice.has-face {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: start;
    column-gap: 12px;
    padding: 10px 12px;
    min-height: 88px;
}

.tt-choice-face {
    display: flex;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tt-line);
}

.tt-choice-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tt-choice-face .tt-face-glyph {
    width: 100%;
    height: 100%;
}

.tt-choice-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tt-choice-text strong {
    font-family: var(--tt-serif);
    color: var(--tt-gold-hi);
    font-size: 1.02rem;
}

.tt-choice-meta {
    color: var(--tt-text);
    font-size: 0.8rem;
}

.tt-choice-hint {
    color: var(--tt-muted);
    font-size: 0.8rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tt-choice.is-disabled {
    opacity: 1;
    border-style: dashed;
    cursor: not-allowed;
}

.tt-choice.is-disabled .tt-choice-face {
    filter: grayscale(1);
    opacity: 0.5;
}

.tt-choice.is-disabled strong,
.tt-choice.is-disabled .tt-choice-meta {
    opacity: 0.55;
}

.tt-choice.is-disabled .tt-choice-hint {
    color: var(--tt-orange);
}

/* The "+" of the list (hero_picker.js): the card the character generator section shows for a new character, a big plus over its title in the
 * generator's gold, here with the same size as a hero's card. */
.tt-choice.tt-choice-create {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    min-height: 88px;
    border-style: dashed;
    border-color: var(--tt-gold-hi);
    color: var(--tt-gold-hi);
    text-align: center;
}

.tt-choice-create .tt-choice-plus {
    font-size: 1.8rem;
    line-height: 1;
}

.tt-choice-create .tt-choice-text {
    align-items: center;
    overflow-wrap: anywhere;
}

.tt-choice-create .tt-choice-text strong {
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

@media (max-width: 700px) {
    .tt-chooser-heroes .tt-choices {
        grid-template-columns: 1fr;
    }
}

/* A hero of the party that the table plays: a small mark on its portrait in the party column. */
.tt-member-companion {
    position: absolute;
    top: -3px;
    right: -3px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--tt-line);
    background: var(--tt-surface-deep, #101920);
    color: var(--tt-gold-hi);
    font-size: 0.6rem;
    pointer-events: none;
}

/* ==========================================================================
   Character Selection Showcase (hero_picker.js)
   ========================================================================== */

.tt-hero-showcase {
    --tt-dialog-width: 1040px;
    width: min(1040px, 95vw);
    max-height: min(88dvh, 840px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(180deg, rgba(23, 35, 44, 0.98), rgba(16, 25, 32, 0.99));
    border: 1px solid rgba(231, 191, 143, 0.32);
    box-shadow: 0 28px 80px rgba(4, 10, 14, 0.78);
}

.tt-picker-head {
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--tt-line);
    align-items: flex-start;
    flex-wrap: nowrap;
}

.tt-picker-head > div {
    flex: 1;
    min-width: 0;
}

.tt-picker-intro {
    margin: 4px 0 0;
    font-size: 0.84rem;
}

.tt-hero-showcase-body {
    display: grid;
    grid-template-columns: 330px 1fr;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.tt-hero-roster-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--tt-line);
    background: rgba(13, 21, 27, 0.68);
}

.tt-picker-search-host {
    padding: 10px 12px 0;
}

.tt-picker-search-host:empty {
    display: none;
}

.tt-picker-search {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--tt-line);
    background: #101920;
    color: var(--tt-text);
    font-size: 0.86rem;
}

.tt-picker-search:focus {
    outline: none;
    border-color: var(--tt-focus, #00c99a);
    box-shadow: 0 0 0 2px rgba(0, 201, 154, 0.22);
}

.tt-picker-roster-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tt-picker-group-head {
    margin: 6px 2px 2px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tt-gold);
}

.tt-picker-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 10px;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(216, 237, 240, 0.14);
    background: rgba(255, 255, 255, 0.025);
    color: var(--tt-text);
    cursor: pointer;
    transition: border-color 140ms ease, background-color 140ms ease, transform 120ms ease;
}

.tt-picker-card:hover {
    border-color: rgba(240, 192, 120, 0.55);
    background: rgba(240, 192, 120, 0.08);
}

.tt-picker-card.is-selected {
    border-color: var(--tt-gold-hi);
    background: linear-gradient(135deg, rgba(240, 192, 120, 0.16), rgba(240, 192, 120, 0.05));
    box-shadow: inset 0 0 0 1px rgba(247, 225, 181, 0.24);
}

.tt-picker-card .tt-choice-face {
    width: 54px;
    height: 54px;
    border-radius: 9px;
}

.tt-picker-card-about {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.76rem;
}

.tt-picker-card.is-disabled {
    opacity: 0.65;
    border-style: dashed;
}

.tt-picker-card.is-disabled .tt-choice-face {
    filter: grayscale(1);
}

.tt-picker-create-bar {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--tt-line);
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: rgba(14, 22, 29, 0.9);
}

.tt-picker-create-btn,
.tt-picker-ai-btn {
    width: 100%;
    justify-content: center;
}

.tt-hero-detail-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 22px;
    gap: 14px;
}

.tt-hero-spotlight {
    display: grid;
    grid-template-columns: 184px 1fr;
    gap: 18px;
    align-items: start;
}

.tt-hero-portrait-box {
    width: 184px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(240, 192, 120, 0.48);
    background: radial-gradient(circle at 50% 35%, #233845, #101920);
    box-shadow: 0 12px 30px rgba(4, 10, 14, 0.58), inset 0 0 0 1px rgba(248, 255, 255, 0.12);
}

.tt-hero-portrait-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tt-hero-portrait-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.tt-hero-portrait-fallback .tt-face-glyph {
    width: 100%;
    height: 100%;
    font-size: 3.2rem;
}

.tt-hero-spotlight-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.tt-picker-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 11px;
    flex: 1;
}

.tt-hero-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tt-hero-name {
    margin: 0;
    font-family: var(--tt-display);
    font-size: 1.48rem;
    font-weight: 700;
    color: #f8ffff;
    line-height: 1.15;
}

.tt-hero-sub {
    margin: 3px 0 0;
    font-size: 0.88rem;
    color: var(--tt-muted);
}

.tt-hero-hp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(224, 90, 82, 0.16);
    border: 1px solid rgba(224, 90, 82, 0.42);
    color: #ffd0cc;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.tt-hero-unavailable {
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid rgba(240, 149, 66, 0.45);
    background: rgba(240, 149, 66, 0.12);
    color: var(--tt-orange);
    font-size: 0.84rem;
}

.tt-hero-intro-card {
    margin: 0;
    padding: 12px 15px;
    border-left: 3px solid var(--tt-gold);
    border-radius: 0 10px 10px 0;
    background: rgba(216, 237, 240, 0.045);
    font-family: var(--tt-body);
    font-size: 0.95rem;
    line-height: 1.58;
    color: #e6f2f5;
}

.tt-hero-appearance {
    padding: 10px 13px;
    border-radius: 10px;
    border: 1px solid rgba(216, 237, 240, 0.14);
    background: rgba(16, 25, 32, 0.6);
}

.tt-hero-appearance-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--tt-gold);
    font-weight: 700;
}

.tt-hero-appearance p {
    margin: 5px 0 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--tt-text);
}

.tt-hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
}

.tt-hero-stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7px 4px;
    border-radius: 8px;
    border: 1px solid rgba(216, 237, 240, 0.14);
    background: rgba(16, 25, 32, 0.65);
}

.tt-hero-stat-k {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--tt-muted);
}

.tt-hero-stat-v {
    font-family: var(--tt-display);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--tt-gold-hi);
}

.tt-hero-stat-m {
    font-size: 0.73rem;
    color: var(--tt-text);
}

.tt-hero-chips-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tt-hero-row-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--tt-muted);
}

.tt-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tt-hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.77rem;
    font-weight: 600;
    border: 1px solid rgba(240, 192, 120, 0.28);
    background: rgba(240, 192, 120, 0.1);
    color: #f7e6c4;
}

.tt-hero-chip.is-gear {
    border-color: rgba(100, 178, 232, 0.28);
    background: rgba(100, 178, 232, 0.1);
    color: #d6ecf9;
}

.tt-picker-cta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--tt-line);
    margin-top: auto;
}

.tt-hero-play-btn {
    padding: 10px 22px;
    font-size: 0.96rem;
}

.tt-picker-empty {
    color: var(--tt-muted);
    font-size: 0.88rem;
    padding: 12px 4px;
}

/* ==========================================================================
   Custom Character Creator Modal (character_creator.js)
   ========================================================================== */

.tt-creator-backdrop {
    z-index: 110;
}

.tt-creator-dialog {
    width: min(1100px, 96vw);
    max-height: min(92dvh, calc(100dvh - 24px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(23, 35, 44, 0.99), rgba(16, 25, 32, 0.99));
    border: 1px solid rgba(231, 191, 143, 0.36);
    box-shadow: 0 30px 90px rgba(4, 10, 14, 0.82);
    user-select: text;
}

.tt-creator-dialog > .tt-journal-head {
    flex-wrap: nowrap;
}

.tt-creator-dialog > .tt-journal-head > .tt-journal-title {
    flex: 1;
    min-width: 0;
    font-size: clamp(0.95rem, 4.2vw, 1.15rem);
}

.tt-creator-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.tt-creator-left {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 12px;
    padding: 14px;
    border-right: 1px solid var(--tt-line);
    background: rgba(13, 21, 27, 0.72);
    overflow: hidden;
}

.tt-creator-portrait-stage {
    flex-shrink: 0;
}

.tt-portrait-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(240, 192, 120, 0.5);
    background: radial-gradient(circle at 50% 35%, #233845, #101920);
    box-shadow: 0 12px 32px rgba(4, 10, 14, 0.6), inset 0 0 0 1px rgba(248, 255, 255, 0.12);
}

.tt-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tt-portrait-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 3.4rem;
    color: var(--tt-gold);
}

.tt-portrait-plate {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 12px 10px;
    background: linear-gradient(180deg, rgba(16, 25, 32, 0) 0%, rgba(16, 25, 32, 0.84) 55%, rgba(16, 25, 32, 0.96) 100%);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tt-portrait-name {
    font-family: var(--tt-display);
    font-size: 1.08rem;
    font-weight: 700;
    color: #f8ffff;
    line-height: 1.2;
}

.tt-portrait-meta {
    font-size: 0.76rem;
    color: var(--tt-muted);
}

.tt-creator-portrait-lib {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    gap: 8px;
}

.tt-portrait-lib-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}

.tt-portrait-lib-title {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tt-gold);
    font-weight: 700;
}

.tt-portrait-tabs {
    display: flex;
    gap: 4px;
}

.tt-portrait-tab {
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(216, 237, 240, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--tt-muted);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}

.tt-portrait-tab:hover {
    border-color: rgba(240, 192, 120, 0.5);
    color: var(--tt-text);
}

.tt-portrait-tab.is-active {
    border-color: var(--tt-gold-hi);
    background: rgba(240, 192, 120, 0.2);
    color: var(--tt-gold-hi);
}

.tt-portrait-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    overflow-y: auto;
    padding: 2px 2px 4px;
    align-content: start;
}

.tt-portrait-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(216, 237, 240, 0.14);
    background: #101920;
    cursor: pointer;
    transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.tt-portrait-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tt-portrait-thumb:hover {
    border-color: rgba(240, 192, 120, 0.65);
    transform: translateY(-1px);
}

.tt-portrait-thumb.is-selected {
    border-color: var(--tt-gold-hi);
    box-shadow: 0 0 0 2px rgba(247, 225, 181, 0.35);
}

.tt-creator-form {
    overflow-y: auto;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tt-creator-error {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(232, 92, 92, 0.55);
    background: rgba(232, 92, 92, 0.14);
    color: #ffcccc;
    font-size: 0.86rem;
}

.tt-creator-section {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tt-creator-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.tt-creator-row {
    display: grid;
    gap: 11px;
}

.tt-creator-row-id {
    grid-template-columns: 2fr 1fr;
}

.tt-creator-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tt-creator-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--tt-muted);
}

.tt-creator-field input,
.tt-creator-field select,
.tt-creator-field textarea {
    width: 100%;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid rgba(216, 237, 240, 0.2);
    background: #101920;
    color: var(--tt-text);
    font-family: var(--tt-body);
    font-size: 0.88rem;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.tt-creator-field input:focus,
.tt-creator-field select:focus,
.tt-creator-field textarea:focus {
    outline: none;
    border-color: var(--tt-focus, #00c99a);
    box-shadow: 0 0 0 2px rgba(0, 201, 154, 0.22);
}

.tt-creator-field textarea {
    resize: vertical;
    min-height: 54px;
}

/* Structured heritage summary cards (Species / Class / Starting HP) */
.tt-heritage-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 118px;
    gap: 9px;
}

.tt-heritage-card,
.tt-heritage-hp {
    padding: 9px 11px;
    border-radius: 9px;
    border: 1px solid rgba(216, 237, 240, 0.14);
    background: rgba(16, 25, 32, 0.65);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tt-heritage-k {
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--tt-gold);
    font-weight: 700;
}

.tt-heritage-v {
    margin: 0;
    font-size: 0.79rem;
    line-height: 1.44;
    color: #d6e7ee;
}

.tt-heritage-hp {
    align-items: center;
    justify-content: center;
    text-align: center;
    border-color: rgba(240, 192, 120, 0.32);
    background: linear-gradient(180deg, rgba(240, 192, 120, 0.12), rgba(240, 192, 120, 0.03));
}

.tt-heritage-hp-val {
    font-family: var(--tt-display);
    font-size: 1.48rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--tt-gold-hi);
}

.tt-heritage-hp-sub {
    font-size: 0.72rem;
    color: var(--tt-muted);
}

.tt-creator-mode-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Ability score 3x2 card grid */
.tt-creator-abilities {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tt-creator-ab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 11px 10px 10px;
    border-radius: 10px;
    border: 1px solid rgba(216, 237, 240, 0.14);
    background: linear-gradient(180deg, rgba(24, 38, 47, 0.72), rgba(16, 25, 32, 0.85));
    transition: border-color 140ms ease, background-color 140ms ease;
}

.tt-creator-ab.is-primary {
    border-color: rgba(240, 192, 120, 0.45);
    background: linear-gradient(180deg, rgba(240, 192, 120, 0.12), rgba(19, 30, 38, 0.88));
}

.tt-creator-ab-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tt-creator-ab-lbl {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    color: var(--tt-gold);
}

.tt-ab-star {
    color: var(--tt-gold-hi);
}

.tt-ab-reroll {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid rgba(240, 192, 120, 0.28);
    background: rgba(255, 255, 255, 0.04);
    color: var(--tt-muted);
    font-size: 0.78rem;
    cursor: pointer;
    transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}

.tt-ab-reroll:hover:not(:disabled) {
    border-color: var(--tt-gold-hi);
    background: rgba(240, 192, 120, 0.18);
    color: var(--tt-gold-hi);
}

.tt-ab-reroll:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tt-creator-ab-ctrl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tt-ab-step {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 7px;
    border: 1px solid rgba(240, 192, 120, 0.36);
    background: rgba(240, 192, 120, 0.08);
    color: var(--tt-gold-hi);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, transform 90ms ease;
}

.tt-ab-step:hover:not(:disabled) {
    background: rgba(240, 192, 120, 0.24);
    border-color: var(--tt-gold-hi);
}

.tt-ab-step:active:not(:disabled) {
    transform: scale(0.94);
}

.tt-ab-step:disabled {
    opacity: 0.32;
    cursor: not-allowed;
}

.tt-creator-ab-val {
    min-width: 30px;
    text-align: center;
    font-family: var(--tt-display);
    font-size: 1.42rem;
    font-weight: 700;
    line-height: 1;
    color: #f8ffff;
}

.tt-ab-swap {
    width: 100%;
    margin-top: 2px;
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid rgba(240, 192, 120, 0.28);
    background: rgba(16, 25, 32, 0.85);
    color: var(--tt-text);
    font-family: var(--tt-body);
    font-size: 0.72rem;
    cursor: pointer;
}

.tt-ab-swap:hover:not(:disabled),
.tt-ab-swap:focus-visible {
    border-color: var(--tt-gold);
    outline: none;
}

.tt-creator-ab-mod {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid rgba(240, 192, 120, 0.26);
    background: #101920;
    color: var(--tt-gold-hi);
    font-size: 0.78rem;
    font-weight: 700;
}

.tt-creator-ab-dice {
    font-size: 0.7rem;
    color: var(--tt-muted);
    letter-spacing: 0.02em;
}

/* Skill proficiency pill buttons */
.tt-creator-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tt-skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(216, 237, 240, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--tt-text);
    font-size: 0.81rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.tt-skill-chip:hover:not(:disabled) {
    border-color: rgba(240, 192, 120, 0.58);
    background: rgba(240, 192, 120, 0.12);
}

.tt-skill-chip:disabled:not(.is-bg) {
    opacity: 0.42;
    cursor: not-allowed;
}

.tt-skill-chip .tt-skill-ico {
    font-size: 0.7rem;
    opacity: 0.7;
}

.tt-skill-chip.is-checked {
    border-color: var(--tt-gold-hi);
    background: rgba(240, 192, 120, 0.2);
    color: var(--tt-gold-hi);
    font-weight: 700;
}

.tt-skill-chip.is-checked .tt-skill-ico {
    opacity: 1;
}

.tt-skill-chip.is-bg {
    border-color: rgba(46, 196, 134, 0.48);
    background: rgba(46, 196, 134, 0.14);
    color: #baf2da;
    cursor: default;
}

/* Starting equipment loadout cards */
.tt-creator-loadouts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 9px;
}

.tt-loadout-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid rgba(216, 237, 240, 0.15);
    background: rgba(16, 25, 32, 0.6);
    text-align: left;
    color: var(--tt-text);
    cursor: pointer;
    transition: border-color 130ms ease, background-color 130ms ease;
}

.tt-loadout-card:hover {
    border-color: rgba(240, 192, 120, 0.55);
    background: rgba(240, 192, 120, 0.08);
}

.tt-loadout-card.is-selected {
    border-color: var(--tt-gold-hi);
    background: linear-gradient(135deg, rgba(240, 192, 120, 0.16), rgba(240, 192, 120, 0.05));
    box-shadow: inset 0 0 0 1px rgba(247, 225, 181, 0.24);
}

.tt-loadout-dot {
    flex-shrink: 0;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(240, 192, 120, 0.55);
    display: grid;
    place-items: center;
    font-size: 0.62rem;
    color: #131d25;
}

.tt-loadout-card.is-selected .tt-loadout-dot {
    background: var(--tt-gold-hi);
    border-color: var(--tt-gold-hi);
}

.tt-loadout-text {
    min-width: 0;
}

.tt-loadout-card strong {
    display: block;
    color: var(--tt-gold-hi);
    font-size: 0.87rem;
}

.tt-loadout-card p {
    margin: 3px 0 0;
    color: var(--tt-muted);
    font-size: 0.77rem;
    line-height: 1.38;
}

.tt-creator-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-top: 1px solid var(--tt-line);
    background: rgba(14, 22, 29, 0.96);
}

.tt-root.is-touch .tt-ab-step,
.tt-root.is-touch .tt-ab-reroll {
    min-width: 44px;
    min-height: 44px;
}

.tt-root.is-touch .tt-skill-chip,
.tt-root.is-touch .tt-portrait-tab,
.tt-root.is-touch .tt-ab-swap {
    min-height: 44px;
}

.tt-root.is-touch .tt-picker-search,
.tt-root.is-touch .tt-creator-field input,
.tt-root.is-touch .tt-creator-field select,
.tt-root.is-touch .tt-creator-field textarea {
    font-size: 16px;
    user-select: text;
}

@media (pointer: coarse) {
    .tt-ab-step,
    .tt-ab-reroll {
        min-width: 44px;
        min-height: 44px;
    }

    .tt-skill-chip,
    .tt-portrait-tab,
    .tt-ab-swap {
        min-height: 44px;
    }
}

@media (max-width: 820px) {
    .tt-hero-showcase-body,
    .tt-creator-body {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .tt-hero-spotlight {
        grid-template-columns: 1fr;
    }

    .tt-hero-portrait-box {
        width: 160px;
        margin: 0 auto;
    }

    .tt-hero-roster-pane,
    .tt-creator-left {
        flex: 0 0 auto;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--tt-line);
        overflow: visible;
    }

    .tt-hero-detail-pane,
    .tt-creator-form {
        flex: 0 0 auto;
        min-height: auto;
        overflow: visible;
    }

    .tt-portrait-frame {
        max-width: 220px;
        margin: 0 auto;
    }

    .tt-portrait-grid {
        max-height: 220px;
    }

    .tt-creator-row-id,
    .tt-creator-row-3,
    .tt-heritage-cards {
        grid-template-columns: 1fr;
    }

    .tt-hero-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tt-creator-abilities {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
