:root {
    --paper: #e9e4d7;
    --paper-deep: #d7d0bf;
    --paper-quiet: #c9c0ae;
    --ink: #191914;
    --ink-soft: #5f5b50;
    --ink-faint: #5f594f;
    --night: #171713;
    --night-raised: #22221c;
    --night-line: #3d3c32;
    --line: #b9af9d;
    --line-strong: #887f6e;
    --green: #1d7950;
    --green-dark: #0f5a38;
    --green-pale: #d5e7d9;
    --red: #ab4333;
    --red-dark: #833126;
    --red-pale: #f0d6cf;
    --ochre: #9b6f21;
    --focus: #e29c22;
    --serif: Georgia, "Times New Roman", serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --unit: 4px;
    --shadow: 0 18px 48px rgb(31 27 19 / 16%);
    --shadow-strong: 0 28px 72px rgb(18 17 13 / 30%);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--paper-deep);
}

body {
    min-width: 320px;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgb(80 70 49 / 4%) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(rgb(80 70 49 / 3%) 1px, transparent 1px) 0 0 / 24px 24px,
        var(--paper-deep);
    font-family: var(--mono);
    font-size: 14px;
}

body.drawer-open {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: wait;
    opacity: .5;
}

button,
input {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible {
    position: relative;
    z-index: 3;
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-grain {
    position: fixed;
    z-index: 20;
    inset: 0;
    pointer-events: none;
    opacity: .17;
    background-image: radial-gradient(rgb(47 41 29 / 45%) .55px, transparent .65px);
    background-size: 5px 5px;
    mix-blend-mode: multiply;
}

.site-frame {
    width: min(100%, 1580px);
    min-height: 100dvh;
    margin: 0 auto;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.2;
}

.eyebrow-mark {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--red);
}

.login-screen {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    min-height: 100dvh;
}

.login-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 620px;
    padding: clamp(36px, 7vw, 128px);
    overflow: hidden;
    background:
        linear-gradient(145deg, transparent 0 69%, rgb(23 23 19 / 7%) 69% 71%, transparent 71%),
        var(--paper);
}

.login-intro::before {
    position: absolute;
    top: 0;
    right: 8%;
    width: 1px;
    height: 100%;
    content: "";
    background: var(--line);
    opacity: .6;
}

.login-intro h1 {
    max-width: 700px;
    margin: 28px 0 25px;
    font-family: var(--serif);
    font-size: clamp(54px, 7.3vw, 116px);
    font-weight: 400;
    letter-spacing: -.055em;
    line-height: .86;
}

.login-intro h1 em {
    color: var(--green-dark);
    font-style: italic;
}

.login-copy {
    max-width: 440px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.75;
}

.login-rule {
    display: flex;
    gap: 5px;
    width: 210px;
    margin-top: 48px;
}

.login-rule span {
    display: block;
    flex: 1;
    height: 8px;
    background: var(--ink);
}

.login-rule span:nth-child(2),
.login-rule span:nth-child(6) {
    background: var(--red);
}

.login-rule span:nth-child(4) {
    background: var(--green);
}

.login-footnote {
    margin: 22px 0 0;
    color: var(--ink-faint);
    font-size: 10px;
    letter-spacing: .08em;
    line-height: 1.5;
}

.login-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 620px;
    padding: clamp(36px, 7vw, 118px);
    color: var(--paper);
    background:
        linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px) 0 0 / 32px 32px,
        var(--night);
}

.login-panel::after {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40%;
    height: 20%;
    content: "";
    border-top: 1px solid var(--night-line);
    border-left: 1px solid var(--night-line);
}

.login-panel .eyebrow {
    color: #b8b3a3;
}

.panel-ticket {
    display: flex;
    justify-content: space-between;
    width: 112px;
    margin-bottom: 54px;
    padding: 8px 10px;
    color: var(--night);
    background: var(--paper);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}

.login-panel h2 {
    max-width: 330px;
    margin: 12px 0 0;
    color: #f4efe3;
    font-family: var(--serif);
    font-size: clamp(32px, 3vw, 48px);
    font-weight: 400;
    letter-spacing: -.04em;
    line-height: .95;
}

.panel-copy {
    max-width: 340px;
    margin: 20px 0 30px;
    color: #bbb5a6;
    font-size: 12px;
    line-height: 1.7;
}

#loginForm {
    position: relative;
    z-index: 1;
    width: min(100%, 356px);
}

.field {
    margin-top: 18px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    color: #cbc4b3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 12px;
    color: #f9f5eb;
    border: 1px solid #555347;
    border-radius: 0;
    background: rgb(255 255 255 / 4%);
    font-size: 15px;
    line-height: 1.3;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.field input:hover {
    border-color: #9d9789;
}

.field input:focus {
    border-color: #dad2c1;
    background: rgb(255 255 255 / 8%);
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 54px;
    margin-top: 28px;
    padding: 12px 15px 12px 17px;
    color: #f6f1e5;
    border: 0;
    border-radius: 0;
    background: var(--green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: transform 100ms ease, background-color 150ms ease;
}

.login-submit:hover:not(:disabled) {
    background: #258a5d;
}

.login-submit:active:not(:disabled) {
    transform: scale(.985);
}

.button-arrow {
    font-size: 20px;
    line-height: 1;
}

.login-status {
    position: relative;
    z-index: 1;
    min-height: 18px;
    margin: 17px 0 0;
    color: #a7a192;
    font-size: 11px;
    letter-spacing: .01em;
    line-height: 1.5;
}

.login-status.is-error {
    color: #ef9d8e;
}

.review-screen {
    min-height: 100dvh;
    padding: clamp(14px, 2vw, 28px);
    background: var(--paper);
}

.console-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    min-height: 70px;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--line-strong);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-lockup strong,
.brand-lockup small {
    display: block;
}

.brand-lockup strong {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -.045em;
    line-height: .9;
}

.brand-lockup small {
    margin-top: 5px;
    color: var(--ink-soft);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .1em;
}

.brand-block {
    display: grid;
    grid-template-columns: repeat(3, 5px);
    gap: 2px;
    align-items: end;
    width: 19px;
    height: 30px;
}

.brand-block i {
    display: block;
    background: var(--ink);
}

.brand-block i:nth-child(1) {
    height: 14px;
}

.brand-block i:nth-child(2) {
    height: 29px;
    background: var(--red);
}

.brand-block i:nth-child(3) {
    height: 21px;
    background: var(--green);
}

.header-center {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    white-space: nowrap;
}

.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgb(29 121 80 / 15%);
}

.logout-button {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    min-height: 37px;
    padding: 7px 0 7px 12px;
    color: var(--ink-soft);
    border: 0;
    border-left: 1px solid var(--line);
    background: transparent;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: color 150ms ease, padding-right 150ms ease;
}

.logout-button:hover:not(:disabled) {
    padding-right: 5px;
    color: var(--red-dark);
}

.overview-strip {
    display: grid;
    grid-template-columns: minmax(260px, .92fr) minmax(0, 1.58fr);
    gap: 0;
    margin-top: 18px;
    border: 1px solid var(--line-strong);
    background: #e2dccd;
}

.overview-progress {
    padding: 19px 20px 16px;
    border-right: 1px solid var(--line-strong);
    background: #dcd5c5;
}

.overview-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.overview-label > span,
.counter dt {
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
}

.overview-label strong {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 400;
    letter-spacing: -.04em;
    line-height: 1;
    white-space: nowrap;
}

.out-of {
    color: var(--ink-faint);
    font-size: 14px;
    letter-spacing: -.02em;
}

.progress-rail {
    height: 7px;
    margin-top: 15px;
    overflow: hidden;
    background:
        repeating-linear-gradient(90deg, #b8af9d 0 1px, transparent 1px 6px),
        #c7bfae;
}

.progress-rail span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--green);
    transition: width 220ms ease-out;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.counter {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 82px;
    padding: 13px 16px;
    border-right: 1px solid var(--line);
}

.counter:last-child {
    border-right: 0;
}

.counter dt {
    margin: 0;
}

.counter dd {
    margin: 8px 0 0;
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(21px, 2vw, 29px);
    font-weight: 400;
    letter-spacing: -.05em;
    line-height: .9;
    white-space: nowrap;
}

.counter--approved dd {
    color: var(--green-dark);
}

.counter--rejected dd {
    color: var(--red-dark);
}

.counter--money dd {
    font-size: clamp(18px, 1.8vw, 25px);
}

.workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 332px);
    gap: clamp(20px, 3vw, 48px);
    margin-top: clamp(22px, 3vw, 42px);
}

.review-lane {
    min-width: 0;
}

.lane-label {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 9px;
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .11em;
}

.lane-label span:last-child {
    color: var(--green-dark);
}

.profile-card {
    position: relative;
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr) auto;
    grid-template-areas:
        "rank main stamps"
        "rank ledger ledger"
        "rank bottom bottom";
    min-height: 410px;
    overflow: hidden;
    border: 1px solid var(--ink);
    background:
        linear-gradient(90deg, transparent 0 calc(100% - 31px), rgb(25 25 20 / 7%) calc(100% - 31px) calc(100% - 30px), transparent calc(100% - 30px)),
        #eee9dd;
    box-shadow: var(--shadow);
}

.profile-card::before {
    position: absolute;
    top: 0;
    right: 0;
    width: 22px;
    height: 22px;
    content: "";
    border-bottom: 1px solid var(--ink);
    border-left: 1px solid var(--ink);
    background: var(--paper-deep);
}

.profile-card.is-empty {
    min-height: 342px;
}

.profile-rank {
    grid-area: rank;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    color: #e9e2d3;
    background:
        repeating-linear-gradient(0deg, transparent 0 27px, rgb(255 255 255 / 5%) 27px 28px),
        var(--night);
}

.profile-rank-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .11em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.profile-avatar-button {
    position: relative;
    display: block;
    flex: none;
    width: 80px;
    height: 80px;
    padding: 0;
    color: #e9e2d3;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.profile-avatar-button:disabled {
    cursor: default;
    opacity: 1;
}

.profile-avatar-frame {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    overflow: hidden;
    place-items: center;
    border: 1px solid #777164;
    background:
        linear-gradient(135deg, rgb(255 255 255 / 5%) 0 1px, transparent 1px 100%),
        var(--night-raised);
    transition: border-color 140ms ease, transform 120ms ease;
}

.profile-avatar-button:hover:not(:disabled) .profile-avatar-frame {
    border-color: #e1d9c8;
    transform: translateY(-2px);
}

.profile-avatar-button:active:not(:disabled) .profile-avatar-frame {
    transform: translateY(0);
}

.profile-avatar-frame::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background: repeating-linear-gradient(135deg, transparent 0 7px, rgb(233 226 211 / 8%) 7px 8px);
    opacity: 0;
    pointer-events: none;
}

.profile-avatar-frame[data-state="loading"]::before {
    opacity: 1;
}

.profile-avatar-frame[data-state="error"] {
    border-color: #a67a2c;
}

.profile-avatar-initials {
    position: relative;
    z-index: 0;
    color: #d8d0bf;
    font-family: var(--serif);
    font-size: 25px;
    font-weight: 400;
    letter-spacing: -.06em;
    line-height: 1;
    transition: opacity 120ms ease;
}

.profile-avatar-frame img {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 120ms ease;
}

.profile-avatar-frame[data-state="loaded"] img {
    opacity: 1;
}

.profile-avatar-frame[data-state="loaded"] .profile-avatar-initials {
    opacity: 0;
}

.profile-avatar-count,
.profile-avatar-issue {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 19px;
    padding: 3px 4px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1;
}

.profile-avatar-count {
    right: -5px;
    bottom: -5px;
    color: var(--ink);
    border: 1px solid #d7d0bf;
    background: #e9e2d3;
}

.profile-avatar-issue {
    top: 4px;
    right: 4px;
    min-width: 18px;
    min-height: 18px;
    color: #171713;
    background: var(--focus);
}

.profile-rank strong {
    color: #f3eee3;
    font-family: var(--serif);
    font-size: 44px;
    font-weight: 400;
    letter-spacing: -.08em;
    line-height: .8;
}

.profile-main {
    grid-area: main;
    align-self: start;
    min-width: 0;
    padding: 31px 0 19px 30px;
}

.identity-kicker,
.identity-id {
    margin: 0;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1.4;
}

.identity-name {
    max-width: 670px;
    margin: 12px 0 6px;
    overflow-wrap: anywhere;
    font-family: var(--serif);
    font-size: clamp(35px, 5.1vw, 67px);
    font-weight: 400;
    letter-spacing: -.055em;
    line-height: .88;
}

.identity-handle {
    margin: 0 0 19px;
    overflow-wrap: anywhere;
    color: var(--green-dark);
    font-size: 13px;
    line-height: 1.5;
}

.identity-id strong {
    color: var(--ink);
    font-size: 11px;
    letter-spacing: .04em;
}

.profile-stamps {
    grid-area: stamps;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding: 32px 30px 17px 15px;
}

.status-stamp {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    max-width: 190px;
    padding: 4px 7px;
    overflow: hidden;
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
    background: rgb(233 228 215 / 55%);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.2;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-stamp[data-tone="positive"] {
    color: var(--green-dark);
    border-color: rgb(29 121 80 / 55%);
    background: var(--green-pale);
}

.status-stamp[data-tone="negative"] {
    color: var(--red-dark);
    border-color: rgb(171 67 51 / 55%);
    background: var(--red-pale);
}

.profile-ledger {
    grid-area: ledger;
    margin-left: 30px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.profile-ledger dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.profile-ledger dl > div {
    min-width: 0;
    padding: 15px 14px 16px 0;
    border-right: 1px solid var(--line);
}

.profile-ledger dl > div + div {
    padding-left: 14px;
}

.profile-ledger dl > div:last-child {
    border-right: 0;
}

.profile-ledger dt {
    color: var(--ink-soft);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1.35;
}

.profile-ledger dd {
    margin: 8px 0 0;
    overflow-wrap: anywhere;
    font-family: var(--serif);
    font-size: clamp(18px, 1.8vw, 25px);
    font-weight: 400;
    letter-spacing: -.04em;
    line-height: .95;
}

.profile-bottom {
    grid-area: bottom;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    margin-left: 30px;
    padding: 13px 30px 13px 0;
}

.profile-bottom p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 10px;
    line-height: 1.55;
}

.details-button {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 11px;
    min-height: 36px;
    padding: 7px 8px 7px 12px;
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 0;
    background: transparent;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    transition: background-color 130ms ease, color 130ms ease, transform 100ms ease;
}

.details-button:hover:not(:disabled) {
    color: var(--paper);
    background: var(--ink);
}

.details-button:active:not(:disabled) {
    transform: scale(.98);
}

kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    min-height: 20px;
    padding: 3px 5px;
    color: inherit;
    border: 1px solid currentColor;
    border-radius: 0;
    background: rgb(255 255 255 / 8%);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
}

.decision-dock {
    position: sticky;
    top: 20px;
    align-self: start;
    padding: 21px;
    color: var(--paper);
    border-top: 3px solid var(--green);
    background:
        linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px) 0 0 / 29px 29px,
        var(--night);
    box-shadow: var(--shadow-strong);
}

.decision-topline {
    display: flex;
    justify-content: space-between;
    color: #c7c0af;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
}

.decision-number {
    color: #e8e1d1;
}

.decision-dock h2 {
    margin: 27px 0 12px;
    color: #f2ede2;
    font-family: var(--serif);
    font-size: clamp(34px, 3.2vw, 46px);
    font-weight: 400;
    letter-spacing: -.055em;
    line-height: .86;
}

.decision-dock > p {
    margin: 0;
    color: #aaa495;
    font-size: 11px;
    line-height: 1.65;
}

.decision-buttons {
    display: grid;
    gap: 10px;
    margin-top: 29px;
}

.decision-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 73px;
    padding: 11px 12px 11px 14px;
    color: #f7f1e5;
    border: 1px solid transparent;
    border-radius: 0;
    text-align: left;
    transition: transform 100ms ease, background-color 140ms ease, border-color 140ms ease;
}

.decision-button:active:not(:disabled) {
    transform: scale(.985);
}

.decision-button-label {
    display: grid;
    gap: 5px;
}

.decision-button b {
    font-size: 13px;
    letter-spacing: .035em;
}

.decision-button small {
    color: #fff4e6;
    font-size: 9px;
    letter-spacing: .035em;
}

.decision-button--approve {
    background: var(--green);
}

.decision-button--approve:hover:not(:disabled) {
    background: #278a5d;
}

.decision-button--reject {
    background: var(--red);
}

.decision-button--reject:hover:not(:disabled) {
    background: #bf4d3b;
}

.decision-button kbd {
    min-width: 47px;
    border-color: rgb(255 255 255 / 42%);
    background: rgb(0 0 0 / 10%);
}

.undo-block {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--night-line);
}

.undo-button {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 8px 0;
    color: #d0c9b8;
    border: 0;
    background: transparent;
    font-size: 10px;
    letter-spacing: .025em;
    text-align: left;
    transition: color 140ms ease;
}

.undo-button > span:first-child {
    color: #f0ebde;
    font-size: 20px;
    line-height: 1;
}

.undo-button:hover:not(:disabled) {
    color: #f7f0e2;
}

.undo-button kbd {
    color: #aaa495;
    border-color: #59564a;
    font-size: 8px;
}

.action-status {
    min-height: 18px;
    margin-top: 12px !important;
    color: #8d8779 !important;
    font-size: 9px !important;
    letter-spacing: .04em;
}

.console-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 29px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
    color: var(--ink-faint);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .075em;
}

.drawer-scrim {
    position: fixed;
    z-index: 30;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgb(20 19 15 / 47%);
    opacity: 0;
    transition: opacity 190ms ease;
}

.drawer-scrim.is-open {
    opacity: 1;
}

.details-drawer {
    position: fixed;
    z-index: 31;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(660px, calc(100vw - 24px));
    height: 100dvh;
    padding: clamp(22px, 3vw, 42px);
    overflow-y: auto;
    color: #ebe5d8;
    border-left: 1px solid #514e42;
    background:
        linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px) 0 0 / 26px 26px,
        var(--night-raised);
    box-shadow: -20px 0 60px rgb(0 0 0 / 24%);
    opacity: 0;
    transform: translateX(104%);
    transition: transform 240ms ease-out, opacity 180ms ease-out;
    visibility: hidden;
}

.details-drawer.is-open {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid #49473d;
}

.drawer-header .eyebrow {
    color: #aca596;
}

.drawer-header h2 {
    margin: 11px 0 7px;
    color: #f6f0e3;
    font-family: var(--serif);
    font-size: clamp(35px, 5vw, 51px);
    font-weight: 400;
    letter-spacing: -.055em;
    line-height: .86;
}

.drawer-header p:last-child {
    margin: 0;
    color: #b7b0a1;
    font-size: 11px;
    line-height: 1.5;
}

.drawer-close {
    display: inline-flex;
    flex: none;
    align-items: center;
    align-self: flex-start;
    gap: 7px;
    min-height: 35px;
    padding: 5px 0 5px 9px;
    color: #d4ccbc;
    border: 0;
    border-left: 1px solid #676356;
    background: transparent;
    transition: color 140ms ease;
}

.drawer-close:hover {
    color: #fff8eb;
}

.drawer-close > span {
    font-size: 25px;
    font-weight: 300;
    line-height: .8;
}

.drawer-close kbd {
    color: #aea899;
    border-color: #666154;
    font-size: 8px;
}

.drawer-photos {
    padding: 25px 0 3px;
    border-bottom: 1px solid #49473d;
}

.drawer-photos-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.drawer-photos-heading h3 {
    margin: 0;
    color: #dad2c1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
}

.drawer-photos-heading span {
    color: #9f9889;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
}

.drawer-photo-stage {
    position: relative;
    display: grid;
    width: min(100%, 52dvh);
    aspect-ratio: 1;
    margin: 14px auto 0;
    overflow: hidden;
    place-items: center;
    border: 1px solid #595548;
    background:
        linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px) 0 0 / 24px 24px,
        var(--night);
}

.drawer-photo-stage::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background: repeating-linear-gradient(135deg, transparent 0 10px, rgb(235 229 216 / 6%) 10px 11px);
    opacity: 0;
    pointer-events: none;
}

.drawer-photo-stage[data-state="loading"]::before {
    opacity: 1;
}

.drawer-photo-stage[data-state="error"] {
    border-color: #9f7130;
}

.drawer-photo-initials {
    color: #aaa393;
    font-family: var(--serif);
    font-size: clamp(56px, 12vw, 88px);
    font-weight: 400;
    letter-spacing: -.07em;
    line-height: 1;
    transition: opacity 140ms ease;
}

.drawer-photo-stage img {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 140ms ease;
}

.drawer-photo-stage[data-state="loaded"] img {
    opacity: 1;
}

.drawer-photo-stage[data-state="loaded"] .drawer-photo-initials {
    opacity: 0;
}

.drawer-photo-retry {
    position: absolute;
    z-index: 3;
    bottom: 18px;
    min-height: 36px;
    padding: 8px 11px;
    color: #f0eadc;
    border: 1px solid #8e6840;
    border-radius: 0;
    background: rgb(23 23 19 / 88%);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.drawer-photo-retry:hover {
    color: #171713;
    background: var(--focus);
}

.drawer-photo-status {
    min-height: 18px;
    margin: 11px 0 8px;
    color: #aaa394;
    font-size: 9px;
    line-height: 1.55;
}

.drawer-photo-status.is-warning {
    color: #d7ad67;
}

.drawer-photo-strip {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0 0 12px;
    overflow-x: auto;
    list-style: none;
    overscroll-behavior-inline: contain;
    scrollbar-color: #696456 var(--night);
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.drawer-photo-strip:empty {
    display: none;
}

.drawer-photo-strip li {
    flex: none;
    scroll-snap-align: start;
}

.drawer-photo-thumb {
    position: relative;
    display: grid;
    width: 64px;
    height: 64px;
    padding: 0;
    overflow: hidden;
    place-items: center;
    color: #8f897c;
    border: 1px solid #514e43;
    border-radius: 0;
    background: var(--night);
}

.drawer-photo-thumb:hover,
.drawer-photo-thumb[aria-current="true"] {
    color: #eee7d8;
    border-color: #d4ccba;
}

.drawer-photo-thumb[aria-current="true"] {
    box-shadow: inset 0 -3px var(--green);
}

.drawer-photo-thumb.is-error {
    color: #d7ad67;
    border-color: #8e6840;
}

.drawer-photo-thumb img {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-photo-thumb.is-error img {
    display: none;
}

.drawer-photo-thumb-index {
    position: relative;
    z-index: 0;
    font-family: var(--serif);
    font-size: 18px;
}

.detail-groups {
    display: grid;
    gap: 26px;
    padding: 25px 0 38px;
}

.detail-group {
    margin: 0;
}

.detail-group-title {
    margin: 0 0 10px;
    color: #dad2c1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid #49473d;
    border-left: 1px solid #49473d;
}

.detail-list > div {
    min-width: 0;
    padding: 12px;
    border-right: 1px solid #49473d;
    border-bottom: 1px solid #49473d;
}

.detail-list > div.is-wide {
    grid-column: 1 / -1;
}

.detail-list dt {
    color: #999284;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.4;
}

.detail-list dd {
    margin: 7px 0 0;
    overflow-wrap: anywhere;
    color: #f0eadc;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.detail-list dd.is-positive {
    color: #89c5a5;
}

.detail-list dd.is-negative {
    color: #e99f90;
}

.toast {
    position: fixed;
    z-index: 40;
    right: 22px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(390px, calc(100vw - 44px));
    min-height: 50px;
    padding: 12px 15px;
    color: #f4eee1;
    border: 1px solid #535044;
    background: var(--night);
    box-shadow: var(--shadow-strong);
    font-size: 11px;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-mark {
    display: block;
    flex: none;
    width: 9px;
    height: 9px;
    background: var(--red);
}

.toast.is-success .toast-mark {
    background: var(--green);
}

@media (max-width: 1100px) {
    .login-screen {
        grid-template-columns: minmax(0, 1fr) minmax(340px, .78fr);
    }

    .overview-strip {
        grid-template-columns: 1fr;
    }

    .overview-progress {
        border-right: 0;
        border-bottom: 1px solid var(--line-strong);
    }

    .profile-card {
        grid-template-columns: 94px minmax(0, 1fr) auto;
    }

    .profile-rank {
        padding: 15px;
    }

    .profile-avatar-button {
        width: 64px;
        height: 64px;
    }

    .profile-avatar-initials {
        font-size: 21px;
    }
}

@media (max-width: 820px) {
    .login-screen {
        grid-template-columns: 1fr;
    }

    .login-intro,
    .login-panel {
        min-height: auto;
    }

    .login-intro {
        padding: 58px 34px 49px;
    }

    .login-intro h1 {
        font-size: clamp(50px, 14vw, 88px);
    }

    .login-panel {
        padding: 46px 34px 54px;
    }

    .panel-ticket {
        margin-bottom: 34px;
    }

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

    .decision-dock {
        position: relative;
        top: auto;
    }
}

@media (max-width: 640px) {
    .review-screen {
        padding: 12px;
    }

    .console-header {
        grid-template-columns: 1fr auto;
        min-height: 62px;
    }

    .header-center {
        display: none;
    }

    .brand-lockup strong {
        font-size: 19px;
    }

    .overview-strip {
        margin-top: 12px;
    }

    .overview-progress {
        padding: 15px;
    }

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

    .counter {
        min-height: 69px;
        border-bottom: 1px solid var(--line);
    }

    .counter:nth-child(2n) {
        border-right: 0;
    }

    .counter:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .workbench {
        gap: 20px;
        margin-top: 21px;
    }

    .profile-card {
        grid-template-columns: 64px minmax(0, 1fr);
        grid-template-areas:
            "rank main"
            "rank stamps"
            "rank ledger"
            "rank bottom";
    }

    .profile-rank {
        padding: 12px 8px;
    }

    .profile-avatar-button {
        width: 48px;
        height: 48px;
    }

    .profile-avatar-initials {
        font-size: 18px;
    }

    .profile-rank strong {
        font-size: 34px;
    }

    .profile-main {
        padding: 24px 20px 12px;
    }

    .identity-name {
        font-size: clamp(36px, 11vw, 53px);
    }

    .profile-stamps {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 3px 20px 18px;
    }

    .status-stamp {
        max-width: 100%;
        text-align: left;
    }

    .profile-ledger {
        margin-left: 0;
    }

    .profile-ledger dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-ledger dl > div {
        padding: 13px 11px;
        border-bottom: 1px solid var(--line);
    }

    .profile-ledger dl > div + div {
        padding-left: 11px;
    }

    .profile-ledger dl > div:nth-child(2n) {
        border-right: 0;
    }

    .profile-ledger dl > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .profile-bottom {
        align-items: flex-start;
        flex-direction: column;
        margin-left: 0;
        padding: 15px 20px;
    }

    .details-button {
        width: 100%;
        justify-content: space-between;
    }

    .decision-dock {
        padding: 19px;
    }

    .console-footer {
        display: none;
    }

    .details-drawer {
        width: min(100%, 620px);
        padding: 23px 18px;
    }

    .drawer-photo-thumb {
        width: 56px;
        height: 56px;
    }

    .detail-list {
        grid-template-columns: 1fr;
    }

    .detail-list > div.is-wide {
        grid-column: auto;
    }
}

@media (max-width: 390px) {
    .login-intro,
    .login-panel {
        padding-right: 22px;
        padding-left: 22px;
    }

    .login-intro h1 {
        font-size: 49px;
    }

    .overview-label {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .counter {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
