﻿/* App-wide styles shared by pages. Layout styles live in Layout/MainLayout.razor.css.
   The app does not use Bootstrap; these styles set their own colors so nothing inherits light-theme defaults. */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    background: #16141a;
    color: #ece8f1;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

h2 {
    font-size: 1.05rem;
    margin: 1.75rem 0 .5rem;
    color: #d9a441;
}

a {
    color: #d9a441;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .page-head h1 {
        margin: 0;
    }

.back {
    margin: 0 0 .75rem;
}

.empty {
    padding: 2rem 1rem;
    text-align: center;
    border: 1px dashed #2e2a36;
    border-radius: .75rem;
    color: #a39cb0;
}

.hint {
    color: #a39cb0;
    font-size: .9rem;
}

.error {
    color: #f08a7e;
    font-size: .9rem;
}

.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .35rem 1rem;
    margin: 0;
}

    .facts dt {
        color: #a39cb0;
    }

    .facts dd {
        margin: 0;
    }

.attribution {
    white-space: pre-line;
    color: #a39cb0;
    font-size: .85rem;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 2.5rem;
    padding: 0 1rem;
    font: inherit;
    font-size: .95rem;
    color: #ece8f1;
    background: #2a2533;
    border: 1px solid #3a3446;
    border-radius: .5rem;
    cursor: pointer;
}

    .btn:hover {
        background: #332d3e;
    }

    .btn.primary {
        color: #16141a;
        background: #d9a441;
        border-color: #d9a441;
        font-weight: 600;
    }

        .btn.primary:hover {
            background: #e6b456;
        }

    .btn.danger {
        background: #7a2e2a;
        border-color: #93413b;
    }

    .btn.icon {
        min-width: 2.5rem;
        padding: 0;
        color: #a39cb0;
        background: transparent;
        border-color: transparent;
    }

    .btn:disabled,
    .btn.disabled {
        opacity: .5;
        cursor: default;
    }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/* Cards and forms */
.card {
    color: #ece8f1;
    background: #1f1c25;
    border: 1px solid #2e2a36;
    border-radius: .75rem;
}

.form {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    margin-bottom: 1rem;
    max-width: 28rem;
}

    .form label {
        display: grid;
        gap: .3rem;
    }

        .form label > span {
            color: #a39cb0;
            font-size: .85rem;
        }

input, select, textarea {
    font: inherit;
    color: #ece8f1;
    background: #16141a;
    border: 1px solid #3a3446;
    border-radius: .5rem;
    padding: .55rem .7rem;
    min-height: 2.5rem;
    box-sizing: border-box;
}

    input:focus, select:focus, textarea:focus {
        outline: 2px solid #d9a441;
        outline-offset: 1px;
    }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Character list */
.char-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .6rem;
}

.char {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .5rem .5rem 1rem;
}

.char-main {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: .15rem;
    padding: .35rem 0;
    color: #ece8f1;
    text-decoration: none;
}

    .char-main:hover .char-name {
        color: #d9a441;
    }

.char-name {
    color: #ece8f1;
    font-weight: 600;
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.char-sub {
    color: #a39cb0;
    font-size: .85rem;
}

.tag {
    font-size: .75rem;
    color: #a39cb0;
    border: 1px solid #3a3446;
    border-radius: 999px;
    padding: .1rem .5rem;
}

.confirm {
    display: flex;
    gap: .4rem;
}

h3 {
    font-size: .9rem;
    margin: 1.25rem 0 .35rem;
    color: #a39cb0;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.btn.small {
    min-height: 2rem;
    padding: 0 .7rem;
    font-size: .85rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

    .section-head h2 {
        margin-bottom: .5rem;
    }

/* ---------------------------------------------------------------- Character sheet */
.sheet-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1rem;
}

.sheet-title h1 {
    margin: 0;
}

.sheet-title .hint {
    margin: .15rem 0 0;
}

.strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
    margin-bottom: .5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .6rem .4rem;
    text-align: center;
}

    .stat.small {
        align-items: flex-start;
        text-align: left;
        padding: .5rem .75rem;
    }

.stat-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #a39cb0;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

    .stat-value small {
        font-size: .8rem;
        font-weight: 400;
        color: #a39cb0;
    }

.stat-note {
    font-size: .72rem;
    color: #a39cb0;
}

.hp {
    display: grid;
    gap: .75rem;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
}

.hp-numbers {
    display: flex;
    gap: 2rem;
}

.hp-block {
    display: grid;
}

.hp-current {
    font-size: 2rem;
    font-weight: 700;
}

    .hp-current.down {
        color: #f08a7e;
    }

.hp-max {
    font-size: 1.1rem;
    color: #a39cb0;
}

.hp-temp {
    font-size: 2rem;
    font-weight: 700;
    color: #7fb6e6;
}

.hp-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

    .hp-controls input {
        width: 6.5rem;
    }

.death, .hit-dice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
}

    .death .hint, .death .error, .hit-dice .hint {
        margin: 0;
        flex-basis: 100%;
    }

.die {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.pips-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}

.pip {
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #5a5368;
    background: transparent;
    cursor: pointer;
}

    .pip.on {
        background: #d9a441;
        border-color: #d9a441;
    }

    .pip.ok.on {
        background: #5fbf7f;
        border-color: #5fbf7f;
    }

    .pip.bad.on {
        background: #e0675c;
        border-color: #e0675c;
    }

    .pip.slot {
        border-radius: .3rem;
    }

/* Tabs: scroll sideways on phones */
.tabs {
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    border-bottom: 1px solid #2e2a36;
    margin: 0 -1rem;
    padding: 0 1rem;
    scrollbar-width: none;
}

.tab {
    flex: none;
    padding: .65rem .85rem;
    font: inherit;
    font-size: .9rem;
    color: #a39cb0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

    .tab.active {
        color: #d9a441;
        border-bottom-color: #d9a441;
    }

.tab-body {
    padding-top: .25rem;
}

/* Abilities */
.abilities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}

.ability {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .6rem .4rem;
    text-align: center;
}

.ability-name {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #a39cb0;
}

.ability-mod {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.ability-score {
    font-size: .85rem;
    color: #a39cb0;
    border: 1px solid #3a3446;
    border-radius: 999px;
    padding: 0 .6rem;
}

.mini {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: #a39cb0;
}

    .mini input {
        width: 4.5rem;
        min-height: 2rem;
        padding: .25rem .4rem;
    }

/* List rows used across tabs */
.rows {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #2e2a36;
}

.row {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 2.75rem;
    padding: .35rem 0;
    border-bottom: 1px solid #2e2a36;
}

    .row.top {
        align-items: flex-start;
    }

.row-name {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.row-abbr {
    width: 2.4rem;
    font-size: .72rem;
    color: #a39cb0;
}

.row-value {
    font-weight: 700;
    min-width: 2.5rem;
    text-align: right;
}

.row-damage {
    color: #ece8f1;
    white-space: nowrap;
}

.row-note {
    font-size: .8rem;
    color: #a39cb0;
}

.row.attack .row-value {
    order: 2;
}

.row.attack .row-damage {
    order: 3;
    min-width: 7rem;
    text-align: right;
}

/* Proficiency circle: empty, half, full, double ring */
.prof {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #5a5368;
    background: transparent;
    cursor: pointer;
}

    .prof.p1 {
        background: linear-gradient(90deg, #d9a441 50%, transparent 50%);
        border-color: #d9a441;
    }

    .prof.p2 {
        background: #d9a441;
        border-color: #d9a441;
    }

    .prof.p3 {
        background: #d9a441;
        border-color: #d9a441;
        box-shadow: 0 0 0 2px #16141a, 0 0 0 4px #d9a441;
    }

.row.top .prof {
    margin-top: .3rem;
}

/* Forms inside the sheet */
.field {
    display: grid;
    gap: .3rem;
    min-width: 0;
}

    .field > span {
        color: #a39cb0;
        font-size: .85rem;
    }

    .field input, .field select, .field textarea {
        width: 100%;
    }

.check {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
}

    .check input {
        min-height: auto;
        width: 1.1rem;
        height: 1.1rem;
        accent-color: #d9a441;
    }

.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: .75rem;
    align-items: end;
}

    .grid-form.wide {
        grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    }

.form {
    max-width: 40rem;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: .5rem;
}

    .inline-form input[type=number] {
        width: 6rem;
    }

.toggles {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    margin-top: .2rem;
}

.qty {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

    .qty > span {
        min-width: 1.5rem;
        text-align: center;
    }

.coins {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .5rem;
}

.cast-info {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .75rem 0;
}

details summary {
    cursor: pointer;
    list-style: none;
}

    details summary::-webkit-details-marker {
        display: none;
    }

    details summary .tag {
        margin-left: .35rem;
    }

.spell-text {
    margin: .35rem 0 0;
    font-size: .9rem;
    color: #d4cfdc;
}

.note {
    display: grid;
    gap: .5rem;
    padding: .75rem;
    margin-bottom: .6rem;
}

.note-head {
    display: flex;
    gap: .5rem;
}

    .note-head input {
        flex: 1;
        font-weight: 600;
    }

@media (max-width: 420px) {
    .strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .coins {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .abilities {
        grid-template-columns: repeat(6, 1fr);
    }

    .tabs {
        margin: 0;
        padding: 0;
    }
}

/* ---------------------------------------------------------------- Library and pickers */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}

.search {
    flex: 1 1 14rem;
    width: 100%;
}

.filters .search {
    width: auto;
}

.chips {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding-bottom: .25rem;
    margin-bottom: .5rem;
    scrollbar-width: none;
}

.chip {
    flex: none;
    font: inherit;
    font-size: .85rem;
    padding: .35rem .8rem;
    color: #a39cb0;
    background: #1f1c25;
    border: 1px solid #3a3446;
    border-radius: 999px;
    cursor: pointer;
}

    .chip.active {
        color: #16141a;
        background: #d9a441;
        border-color: #d9a441;
        font-weight: 600;
    }

.content-details {
    padding: .5rem 0 .25rem;
}

    .content-details .facts {
        font-size: .9rem;
    }

.overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(8, 6, 12, .7);
}

.panel {
    width: 100%;
    max-width: 44rem;
    max-height: 88dvh;
    overflow-y: auto;
    display: grid;
    gap: .6rem;
    align-content: start;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    background: #1f1c25;
    border: 1px solid #3a3446;
    border-radius: 1rem 1rem 0 0;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .panel-head h2 {
        margin: 0;
    }

.picker-list .row {
    gap: .5rem;
}

@media (min-width: 768px) {
    .overlay {
        align-items: center;
    }

    .panel {
        border-radius: 1rem;
    }
}

/* ---------------------------------------------------------------- Creation wizard */
a.btn {
    text-decoration: none;
}

.steps {
    list-style: none;
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    margin: 0 0 1rem;
    padding: 0;
    scrollbar-width: none;
    counter-reset: step;
}

    .steps li {
        flex: none;
        counter-increment: step;
    }

    .steps button {
        font: inherit;
        font-size: .85rem;
        padding: .4rem .7rem;
        color: #a39cb0;
        background: transparent;
        border: 1px solid #2e2a36;
        border-radius: 999px;
        cursor: pointer;
    }

        .steps button::before {
            content: counter(step) ". ";
        }

        .steps button:disabled {
            opacity: .45;
            cursor: default;
        }

    .steps li.done button {
        color: #ece8f1;
        border-color: #3a3446;
    }

    .steps li.current button {
        color: #16141a;
        background: #d9a441;
        border-color: #d9a441;
        font-weight: 600;
    }

.wizard-body {
    display: grid;
    gap: .75rem;
    align-content: start;
}

    .wizard-body h2 {
        margin: 0;
    }

.wizard-nav {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: .75rem 0;
    margin-top: 1rem;
    background: #16141a;
    border-top: 1px solid #2e2a36;
}

    .wizard-nav .btn.primary {
        margin-left: auto;
    }

.chooser .row.selected {
    background: #221e29;
    box-shadow: inset 3px 0 0 #d9a441;
    padding-left: .6rem;
}

.chooser-buttons {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.todo {
    margin: 0;
    padding-left: 1.2rem;
    color: #d4cfdc;
}

input[type=radio] {
    accent-color: #d9a441;
    min-height: auto;
    width: 1.1rem;
    height: 1.1rem;
}

/* On phones the tab bar sits at the bottom, so keep the wizard buttons above it. */
@media (max-width: 767px) {
    .wizard-nav {
        bottom: calc(3.6rem + env(safe-area-inset-bottom));
    }
}

.steps button.ok {
    color: #ece8f1;
    border-color: #3f6b4e;
}

    .steps button.ok::after {
        content: " ✓";
        color: #5fbf7f;
    }

/* ---------------------------------------------------------------- Level up */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: .5rem;
}

.choice {
    display: grid;
    gap: .15rem;
    padding: .75rem;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

    .choice.selected {
        border-color: #d9a441;
        box-shadow: inset 0 0 0 1px #d9a441;
    }

/* ---------------------------------------------------------------- Proficiency sources */
.prof.static {
    display: inline-block;
    cursor: default;
}

.prof-lists dd {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.source-chip {
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
    padding: .15rem .55rem;
    border: 1px solid #3a3446;
    border-radius: 999px;
    font-size: .88rem;
}

    .source-chip small {
        color: #a39cb0;
        font-size: .72rem;
    }

/* ---------------------------------------------------------------- Dice */
.roll-btn {
    font: inherit;
    color: inherit;
    background: #221e29;
    border: 1px solid #3a3446;
    border-radius: .45rem;
    padding: .1rem .5rem;
    cursor: pointer;
    line-height: 1.3;
}

    .roll-btn:hover {
        border-color: #d9a441;
        color: #d9a441;
    }

    .roll-btn.stat-value,
    .roll-btn.ability-mod {
        padding: 0 .6rem;
    }

.roll-popup {
    position: fixed;
    right: 1rem;
    bottom: calc(4.6rem + env(safe-area-inset-bottom));
    z-index: 40;
    width: min(20rem, calc(100vw - 2rem));
    display: grid;
    gap: .35rem;
    padding: .75rem .9rem;
    background: #241f2c;
    border: 1px solid #d9a441;
    border-radius: .8rem;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .5);
}

    .roll-popup.crit {
        border-color: #5fbf7f;
    }

    .roll-popup.fumble {
        border-color: #e0675c;
    }

.roll-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.roll-label {
    font-size: .85rem;
    color: #a39cb0;
}

.roll-total {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.roll-breakdown {
    font-size: .85rem;
    color: #d4cfdc;
}

.roll-flag {
    font-size: .85rem;
    font-weight: 600;
}

.crit .roll-flag {
    color: #5fbf7f;
}

.fumble .roll-flag {
    color: #e0675c;
}

.roll-history {
    list-style: none;
    margin: 0;
    padding: .35rem 0 0;
    border-top: 1px solid #3a3446;
    display: grid;
    gap: .2rem;
    font-size: .82rem;
    max-height: 10rem;
    overflow-y: auto;
}

    .roll-history small {
        color: #a39cb0;
    }

@media (min-width: 768px) {
    .roll-popup {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* ---------------------------------------------------------------- Actions tab */
.attack-row {
    flex-wrap: wrap;
}

.attack-range {
    min-width: 4.5rem;
    font-size: .85rem;
    color: #a39cb0;
    text-align: right;
}

.attack-hit {
    min-width: 3.5rem;
    text-align: center;
}

.save-dc {
    font-size: .85rem;
    white-space: nowrap;
}

.attack-damage {
    min-width: 6rem;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .1rem;
}

.standard-actions {
    margin: 0 0 .5rem;
    color: #d4cfdc;
    line-height: 1.7;
}

/* ---------------------------------------------------------------- Rest dialogs */
.hd-group {
    display: grid;
    gap: .4rem;
    padding: .5rem 0;
    border-bottom: 1px solid #2e2a36;
}

.hd-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.hd-box {
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: 2px solid #5a5368;
    border-radius: .3rem;
    background: transparent;
    cursor: pointer;
}

    .hd-box.on {
        background: #d9a441;
        border-color: #d9a441;
    }

    .hd-box.spent {
        display: inline-block;
        background: #3a3446;
        border-color: #3a3446;
        cursor: default;
    }

.hd-roll {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}

/* ---------------------------------------------------------------- Coins */
.coin-summary {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .9rem;
    width: 100%;
    padding: .65rem .9rem;
    font: inherit;
    color: #ece8f1;
    text-align: left;
    background: #1f1c25;
    border: 1px solid #2e2a36;
    border-radius: .75rem;
    cursor: pointer;
}

    .coin-summary:hover {
        border-color: #d9a441;
    }

.coin strong {
    font-size: 1.1rem;
}

.coin-row input {
    width: 6rem;
}

.coin-have {
    min-width: 3rem;
    text-align: right;
    font-weight: 700;
}

/* Coin conversion */
.coin-convert {
    border-top: 1px solid #3a3446;
    margin-top: .75rem;
    padding-top: .5rem;
}

.coin-convert-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

    .coin-convert-row .field {
        flex: 1 1 7rem;
    }

    .coin-convert-row input, .coin-convert-row select {
        width: 100%;
    }

/* Foundry dialog: lists of notes and changes */
.notes {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: .2rem;
}

    .notes.muted {
        color: #a59fb0;
    }

/* Campaign invite links */
.invite-link {
    flex: 1 1 14rem;
    min-width: 0;
    font-size: .85rem;
}

/* Trades */
.row.trade {
    align-items: flex-start;
    flex-wrap: wrap;
}

    .row.trade.pending {
        border-left: 3px solid #e0a83a;
        padding-left: .5rem;
    }

.trade-main {
    display: grid;
    gap: .15rem;
    flex: 1 1 16rem;
    min-width: 0;
}

input.qty {
    width: 4.5rem;
}

/* About 4 trades tall, then the list scrolls (pending trades are sorted to the top). */
.trade-list {
    max-height: 24rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .25rem;
}

/* Trade notifications: stay until closed */
.notices {
    position: fixed;
    top: 3.5rem;
    right: 1rem;
    z-index: 60;
    display: grid;
    gap: .5rem;
    width: min(24rem, calc(100vw - 2rem));
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
}

.notice {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .75rem .85rem;
    color: #ece8f1;
    background: #26212f;
    border: 1px solid #e0a83a;
    border-radius: .75rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
}

.notice-body {
    display: grid;
    gap: .2rem;
    flex: 1;
    min-width: 0;
    font-size: .9rem;
}

.notice-actions {
    display: flex;
    gap: .35rem;
    align-items: center;
}

/* Messages */
.msg-layout {
    display: grid;
    grid-template-columns: minmax(12rem, 18rem) 1fr;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 720px) {
    .msg-layout {
        grid-template-columns: 1fr;
    }
}

.msg-list {
    display: grid;
    gap: .35rem;
    max-height: 70vh;
    overflow-y: auto;
}

.msg-conv {
    display: grid;
    gap: .15rem;
    padding: .55rem .7rem;
    border-radius: .6rem;
    color: #ece8f1;
    text-decoration: none;
    background: #1f1c25;
    border: 1px solid #2e2a36;
}

    .msg-conv.active {
        border-color: #e0a83a;
    }

.tag.unread {
    justify-self: start;
    color: #1a1620;
    background: #e0a83a;
    border-color: #e0a83a;
}

.msg-thread {
    display: grid;
    gap: .5rem;
    min-width: 0;
}

.msg-bubbles {
    display: flex;
    flex-direction: column-reverse;
    gap: .4rem;
    height: 55vh;
    overflow-y: auto;
    padding: .5rem;
    background: #16141a;
    border: 1px solid #2e2a36;
    border-radius: .6rem;
}

.msg {
    align-self: flex-start;
    max-width: 80%;
    display: grid;
    gap: .1rem;
    padding: .45rem .65rem;
    border-radius: .7rem;
    background: #26212f;
}

    .msg.mine {
        align-self: flex-end;
        background: #3a2f1c;
    }

.msg-from {
    font-size: .75rem;
    color: #e0a83a;
}

.msg-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.msg-time {
    font-size: .7rem;
    color: #a59fb0;
    justify-self: end;
}

.msg-compose {
    display: flex;
    gap: .5rem;
    align-items: flex-end;
}

    .msg-compose textarea {
        flex: 1;
        resize: vertical;
    }

.notice.overheard {
    border-color: #6b5a8e;
}
