/* 오늘의 보스 레이드: a dark arcade fight. Coral is the game's colour, mustard marks critical hits,
   skewed bars and heavy italic numbers do the shouting. */
.raid-page {
    --bg: #130F0D;
    --panel: #1E1714;
    --edge: #3A2E29;
    --text: #FFF3EE;
    --soft-text: #D9C6BE;
    --dim: #B8A49B;
    --rule: 2px solid var(--text);
    background: var(--bg);
    color: var(--text);
}

/* The shared slim bar and footer, in the arena's colours. */
.raid-page .site-header { background: var(--bg); border-bottom: 1.5px solid var(--edge); }
.raid-page .site-bar .site-header-inner { max-width: 1072px; }
.raid-page .site-mark { border-color: var(--text); }
.raid-page .site-nav a, .raid-page a.site-nav { color: var(--text); }
.raid-page .site-footer { background: var(--bg); border-top: 1.5px solid var(--edge); }
.raid-page .site-footer.is-slim .site-footer-inner { max-width: 1072px; color: var(--dim); }
.raid-page .site-footer b, .raid-page .site-footer a { color: var(--text); }
.raid-page :focus-visible { outline-color: var(--mustard); }

.raid-page .site-main {
    background-color: var(--bg);
    background-image: repeating-linear-gradient(135deg, rgba(255, 142, 122, 0.07) 0 16px, transparent 16px 40px);
}

.arena { max-width: 1072px; margin: 0 auto; padding: 22px 16px 56px; }
.tabular { font-variant-numeric: tabular-nums; }
.tiny { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--soft-text); }

/* Shared health */
.hp-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.nameplate {
    display: inline-block;
    padding: 4px 14px;
    background: var(--coral);
    color: var(--bg);
    font-size: 14px;
    font-weight: 900;
    transform: skewX(-12deg);
}
.hp-issue { font-size: 12.5px; font-weight: 800; color: var(--soft-text); }
.hp-bar {
    position: relative;
    display: flex;
    margin-top: 8px;
    height: 26px;
    border: var(--rule);
    background: #2A201C;
    transform: skewX(-12deg);
    overflow: hidden;
}
.hp-left { width: 100%; background: var(--coral); border-right: 2px solid var(--text); transition: width 0.6s ease; }
.hp-chip { width: 0; background: var(--mustard); transition: width 0.6s ease; }
.hp-meta { margin: 8px 0 0; display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--soft-text); }

.columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 22px; }

/* Boss */
.boss-card { position: relative; padding: 22px 20px 20px; background: var(--coral); color: var(--bg); border: var(--rule); }
.boss-mark { position: absolute; right: 14px; top: 14px; width: 74px; height: 74px; color: var(--bg); }
.boss-mark svg, .foe-card svg { display: block; width: 100%; height: 100%; }
.boss-epithet { margin: 0; padding-right: 86px; font-size: 13px; font-weight: 800; }
.boss-name { margin: 4px 0 0; padding-right: 86px; font-size: 40px; font-weight: 900; font-style: italic; letter-spacing: -0.04em; line-height: 1.12; }
.boss-taunt { margin: 14px 0 0; padding: 10px 12px; background: var(--bg); color: var(--text); font-size: 15px; font-weight: 800; }
.boss-taunt:empty { display: none; }
.boss-intro { margin: 12px 0 0; font-size: 15px; line-height: 1.65; font-weight: 600; }
.placeholder { display: inline-block; min-width: 6em; background: rgba(19, 15, 13, 0.15); }
/* With a picture: the boss on the left, its titles and taunt beside it, the intro across the bottom.
   The picture's coral background is the card's, so it needs no frame. */
.boss-art { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.has-art .boss-card {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    grid-template-areas: "art epithet" "art name" "art taunt" "intro intro";
    grid-template-rows: auto auto 1fr auto;
    column-gap: 14px;
    padding: 14px 16px 16px;
}
.has-art .boss-art { grid-area: art; align-self: center; margin-left: -6px; }
.has-art .boss-epithet { grid-area: epithet; padding-right: 0; align-self: end; }
.has-art .boss-name { grid-area: name; padding-right: 0; font-size: 28px; }
.has-art .boss-taunt { grid-area: taunt; align-self: start; margin-top: 8px; padding: 7px 9px; font-size: 13px; line-height: 1.45; }
.has-art .boss-intro { grid-area: intro; margin-top: 12px; font-size: 14px; line-height: 1.6; }
.has-art .boss-mark, .has-art .foe-card svg { display: none; }
/* The small picture follows the player box's height rather than setting it. */
.foe-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.has-art .versus { align-items: stretch; }
.has-art .vs { align-self: center; }
.has-art .foe-card { position: relative; min-height: 0; padding: 0; overflow: hidden; }

.kill { margin-top: 14px; padding: 16px 18px; border: 2px solid var(--mustard); background: #2A2210; }
.kill-title { margin: 0; font-size: 26px; font-weight: 900; font-style: italic; color: var(--mustard); }
.kill-line { margin: 4px 0 0; font-size: 14.5px; }
.kill-by { margin: 6px 0 0; font-size: 13px; font-weight: 800; color: var(--soft-text); }

/* Round */
.round { text-align: center; }
.round-label { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.2em; color: var(--coral); }
.round-no { margin: 2px 0 0; font-size: 40px; font-weight: 900; font-style: italic; letter-spacing: -0.04em; line-height: 1; }
.pips { margin: 10px 0 0; display: flex; justify-content: center; gap: 8px; }
.pips span { width: 26px; height: 8px; border: 1.5px solid var(--text); transform: skewX(-20deg); }
.pips span.used { background: var(--coral); border-color: var(--coral); }

/* Player vs boss */
.versus { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 0.8fr); align-items: center; }
.me-card { padding: 12px 14px; border: var(--rule); min-height: 118px; }
.me-name { margin: 3px 0 0; font-size: 18px; font-weight: 900; }
.me-class { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--coral); }
.me-total { margin: 0; font-size: 22px; font-weight: 900; font-style: italic; }
.vs { margin: 0; text-align: center; font-size: 26px; font-weight: 900; font-style: italic; color: var(--coral); }
.foe-card { display: grid; place-items: center; min-height: 118px; padding: 18px; background: var(--coral); border: var(--rule); color: var(--bg); }
.foe-card svg { width: 64px; height: 64px; }

/* Jobs */
.classes { margin: 20px 0 0; padding: 0; border: 0; }
.classes legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 800; }
.classes legend span { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--dim); }
.class-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.class-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 2px solid var(--edge);
    background: var(--panel);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.class-card b { font-size: 16px; font-weight: 900; }
.class-card span { font-size: 12.5px; line-height: 1.5; color: var(--soft-text); }
.class-card em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--coral); }
.class-card[aria-checked="true"] { border-color: var(--coral); background: #3A1F18; box-shadow: inset 0 0 0 1px var(--coral); }

/* Last hit */
.hit { margin-top: 20px; padding: 14px 16px; border: 2px dashed #5A4740; }
.hit-damage { margin: 0; font-size: 36px; font-weight: 900; font-style: italic; color: var(--coral); line-height: 1.1; }
.hit-crit { font-size: 15px; font-style: normal; color: var(--mustard); }
.hit-tags { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hit-tags span { padding: 2px 9px; border: 1.5px solid var(--edge); font-size: 12px; font-weight: 800; color: var(--soft-text); }
.hit-tags .weak { border-color: var(--mustard); color: var(--mustard); }
.hit-tags .resist { color: var(--dim); }
.hit-line { margin: 8px 0 0; font-size: 15px; line-height: 1.65; }

/* Attack */
.attack { margin-top: 22px; }
.attack label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 800; }
.attack input {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border: var(--rule);
    border-radius: 0;
    background: var(--panel);
    color: var(--text);
    font: inherit;
    font-size: 16px;
}
.attack input::placeholder { color: #8C7A72; }
.turnstile:empty { display: none; }
.turnstile { margin-top: 10px; }
.strike {
    margin-top: 12px;
    width: 100%;
    height: 58px;
    border: var(--rule);
    border-radius: 10px;
    background: var(--coral);
    color: var(--bg);
    font: inherit;
    font-size: 21px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 6px 0 #7A2A1E;
}
.strike:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 3px 0 #7A2A1E; }
.strike:disabled { opacity: 0.5; cursor: default; }
.strike-line { background: var(--bg); color: var(--text); box-shadow: 0 6px 0 var(--edge); font-size: 18px; }
.attack-note { margin: 12px 0 0; font-size: 12.5px; color: var(--dim); }

.status { margin: 12px 0 0; font-size: 14px; font-weight: 700; color: var(--mustard); }
.status:empty { display: none; }

/* Day done */
.done { margin-top: 22px; padding: 18px 16px; border: var(--rule); background: var(--panel); }
.done-title { margin: 0; font-size: 24px; font-weight: 900; font-style: italic; }
.done-stats { margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--edge); }
.done-stats div { padding: 10px 12px; }
.done-stats div + div { border-left: 1.5px solid var(--edge); }
.done-stats dt { font-size: 12px; font-weight: 700; color: var(--soft-text); }
.done-stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 900; font-style: italic; }
.toast { margin: 10px 0 0; font-size: 13px; font-weight: 800; text-align: center; color: var(--mustard); }
.next { margin: 14px 0 0; font-size: 13px; color: var(--soft-text); text-align: center; }

/* My log */
.log { margin-top: 22px; }
.log h2, .board h2 { margin: 0 0 8px; font-size: 14px; font-weight: 900; letter-spacing: 0.04em; color: var(--coral); }
.log ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.log li { padding: 10px 12px; background: var(--panel); border: 1.5px solid var(--edge); }
.log-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 800; }
.log-head b { font-style: italic; color: var(--coral); white-space: nowrap; }
.log-line { margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--soft-text); }

/* Boards */
.boards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.board { padding: 16px; background: var(--panel); border: 1.5px solid var(--edge); }
.top { margin: 0; padding: 0; list-style: none; counter-reset: top; }
.top li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--edge); font-size: 14px; }
.top li:first-child { border-top: 0; }
.top li::before { counter-increment: top; content: counter(top); font-weight: 900; font-style: italic; color: var(--coral); }
.top li.empty { display: block; color: var(--dim); }
.top li.empty::before { content: none; }
.top li.me { color: var(--mustard); }
.top small { margin-left: 6px; font-size: 12px; color: var(--dim); }
.top b { font-style: italic; }
.past-name { margin: 0; font-size: 18px; font-weight: 900; }
.past-result { margin: 4px 0 0; font-size: 14px; font-weight: 800; }
.past-result.win { color: var(--mustard); }
.past-meta { margin: 4px 0 0; font-size: 13px; color: var(--soft-text); }

@media (min-width: 900px) {
    .arena { padding: 30px 32px 72px; }
    /* Boss and the boards on the left, the fight on the right. */
    .columns {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: "stage fight" "boards fight";
        grid-template-rows: auto 1fr;
        gap: 22px 32px;
        align-items: start;
    }
    .stage { grid-area: stage; }
    .fight { grid-area: fight; }
    .boards { grid-area: boards; }
    .boss-card { padding: 28px 26px 24px; }
    .has-art .boss-card { grid-template-columns: 176px minmax(0, 1fr); column-gap: 18px; padding: 18px 22px 20px; }
    .has-art .boss-name { font-size: 36px; }
    .has-art .boss-taunt { font-size: 14px; }
    .has-art .boss-intro { font-size: 14.5px; }
    .boss-mark { width: 96px; height: 96px; right: 20px; top: 20px; }
    .boss-name, .boss-epithet { padding-right: 110px; }
    .boss-name { font-size: 52px; }
    .round { text-align: left; }
    .pips { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .hp-left, .hp-chip { transition: none; }
}
