/* Kriegsspiel — the card game overlay. Dark steel, stencilled plates, paper; the map table of a staff college.
   All card measures are in em of (card width / 13), so one recipe renders every size. */
.kc-root {
    --gold: #d4b064; --gold2: #f0cf7e; --paper: #ece4cb; --paper2: #d9cca8; --ink: #2a2418; --dim: #a79f86; --faint: #6f6953;
    --steel: #34322a; --steel2: #45422f; --red: #b8352c; --red2: #e0584c; --green: #8fae5a; --blue: #7fa6bf;
    --cr: #7fe3f0; --sc: #d79a5a;
    --f: 'Barlow Semi Condensed', 'Barlow', 'Segoe UI', sans-serif; --stencil: 'Saira Stencil One', 'Barlow Semi Condensed', sans-serif;
    --mono: 'VT323', 'Courier New', monospace; --type: 'Special Elite', 'Courier New', monospace;
    --svg-nut: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23eef1f3'/%3E%3Cstop offset='.5' stop-color='%238f989e'/%3E%3Cstop offset='1' stop-color='%233a4145'/%3E%3C/linearGradient%3E%3CradialGradient id='b' cx='.4' cy='.35' r='.75'%3E%3Cstop offset='0' stop-color='%2398d0f6'/%3E%3Cstop offset='.55' stop-color='%232f73b3'/%3E%3Cstop offset='1' stop-color='%23102f52'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpolygon points='50,3 93,27 93,73 50,97 7,73 7,27' fill='url(%23a)' stroke='%23111' stroke-width='5' stroke-linejoin='round'/%3E%3Cpolygon points='50,13 84,32 84,68 50,87 16,68 16,32' fill='none' stroke='%23fff' stroke-opacity='.3' stroke-width='3'/%3E%3Ccircle cx='50' cy='50' r='30' fill='url(%23b)' stroke='%23111' stroke-width='4'/%3E%3C/svg%3E");
    --svg-shell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 100'%3E%3Cdefs%3E%3ClinearGradient id='c' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23845410'/%3E%3Cstop offset='.35' stop-color='%23f8d680'/%3E%3Cstop offset='.62' stop-color='%23d9a441'/%3E%3Cstop offset='1' stop-color='%23673f06'/%3E%3C/linearGradient%3E%3ClinearGradient id='d' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23642a12'/%3E%3Cstop offset='.4' stop-color='%23e0936a'/%3E%3Cstop offset='1' stop-color='%23541f0a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M14 38C14 18 23 5 30 2C37 5 46 18 46 38Z' fill='url(%23d)' stroke='%23111' stroke-width='3.5' stroke-linejoin='round'/%3E%3Crect x='8' y='36' width='44' height='54' rx='3' fill='url(%23c)' stroke='%23111' stroke-width='3.5'/%3E%3Crect x='4' y='87' width='52' height='10' rx='2' fill='url(%23c)' stroke='%23111' stroke-width='3.5'/%3E%3C/svg%3E");
    --svg-helmet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'%3E%3Cdefs%3E%3CradialGradient id='h' cx='.38' cy='.3' r='.85'%3E%3Cstop offset='0' stop-color='%23ffa08c'/%3E%3Cstop offset='.5' stop-color='%23c0392b'/%3E%3Cstop offset='1' stop-color='%23561209'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M11 68C11 29 29 5 50 5S89 29 89 68L97 77C98 84 92 87 86 85L50 82L14 85C8 87 2 84 3 77Z' fill='url(%23h)' stroke='%23111' stroke-width='5' stroke-linejoin='round'/%3E%3Cpath d='M23 32C29 19 39 12 50 11' fill='none' stroke='%23fff' stroke-opacity='.45' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
    --svg-steel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23eef2f4'/%3E%3Cstop offset='.5' stop-color='%238c979e'/%3E%3Cstop offset='1' stop-color='%23353c40'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M50 4L92 16L88 50C84 70 68 82 50 88C32 82 16 70 12 50L8 16Z' fill='url(%23s)' stroke='%23111' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E");
    position: fixed; inset: 0; z-index: 48; overflow: hidden; color: var(--paper); font-family: var(--f); font-size: 16px; line-height: 1.3;
    background: #10110d; display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); animation: kc-in .25s ease;
    -webkit-user-select: none; user-select: none;
}
.kc-root *, .kc-root *::before, .kc-root *::after { box-sizing: border-box; }
:where(.kc-root) button { font-family: inherit; color: inherit; }
.kc-root input, .kc-root textarea, .kc-root select { -webkit-user-select: text; user-select: text; }
.kc-px, .kc-root img { image-rendering: pixelated; }
@keyframes kc-in { from { opacity: 0; transform: scale(1.02); } }

/* ---------- background: the map table ---------- */
.kc-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.kc-bg-map { position: absolute; inset: -20%; background:
    repeating-radial-gradient(ellipse at 30% 40%, transparent 0 22px, rgba(212, 176, 100, .05) 23px 24px, transparent 25px 46px),
    repeating-radial-gradient(ellipse at 75% 70%, transparent 0 30px, rgba(143, 174, 90, .05) 31px 32px, transparent 33px 60px),
    radial-gradient(ellipse at 50% 45%, #2a3122 0%, #1a1f16 55%, #0e100b 100%);
    animation: kc-pan 90s linear infinite alternate; }
.kc-bg-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(236, 228, 203, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(236, 228, 203, .04) 1px, transparent 1px); background-size: 64px 64px; }
.kc-bg-sweep { position: absolute; left: 50%; top: 50%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; background: conic-gradient(from 0deg, transparent 0 330deg, rgba(212, 176, 100, .07) 355deg, rgba(212, 176, 100, .12) 360deg); animation: kc-spin 14s linear infinite; mix-blend-mode: screen; }
.kc-bg-vig { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0, 0, 0, .65) 100%); }
.kc-bg-drift { position: absolute; inset: 0; }
.kc-drift { position: absolute; left: -10%; width: calc(64px * var(--s, 1)); height: auto; opacity: .16; filter: sepia(.6) brightness(.9); animation: kc-drift linear forwards; }
.kc-drift.rtl { transform: scaleX(-1); animation-name: kc-drift-r; }
@keyframes kc-drift { from { left: -10%; } to { left: 110%; } }
@keyframes kc-drift-r { from { left: 110%; } to { left: -10%; } }
@keyframes kc-pan { from { transform: translate(-3%, -2%) rotate(-1deg); } to { transform: translate(3%, 2%) rotate(1deg); } }
@keyframes kc-spin { to { transform: rotate(360deg); } }
.kc-in-battle .kc-bg { display: none; }

/* ---------- top bar ---------- */
.kc-top { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: linear-gradient(#2c2a21, #1b1a15); border-bottom: 3px solid #0a0907; box-shadow: inset 0 -1px 0 #4d4935, 0 4px 16px rgba(0, 0, 0, .5); min-height: 54px; }
.kc-in-battle .kc-top { display: none; }
.kc-top-spade { width: 38px; display: grid; place-items: center; }
.kc-top-title { display: flex; align-items: baseline; gap: 12px; flex: 1; min-width: 0; overflow: hidden; }
.kc-top-title b { font-family: var(--stencil); font-weight: 400; font-size: 26px; letter-spacing: .06em; color: var(--gold); text-shadow: 0 2px 0 #000; }
.kc-top-title span { font-family: var(--type); font-size: 15px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-cur { display: flex; gap: 6px; }
.kc-cur-i { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 20px; background: #0f0e0b; box-shadow: inset 0 0 0 1px #45422f; font-family: var(--mono); font-size: 22px; line-height: 1; border: 0; cursor: default; }
.kc-cur-i i { font-size: 16px; }
.kc-cur-cr i { color: var(--cr); } .kc-cur-sc i { color: var(--sc); } .kc-cur-pk i { color: var(--gold); }
button.kc-cur-i { cursor: pointer; }
.kc-bump { animation: kc-bump .6s ease; display: inline-block; }
@keyframes kc-bump { 30% { transform: scale(1.45); color: #fff; } }
.kc-iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 4px; cursor: pointer; font-size: 18px; background: linear-gradient(#3b392f, #26251e); box-shadow: inset 0 1px 0 #57533e, 0 2px 0 #0a0907; }
.kc-iconbtn:hover { background: linear-gradient(#48453a, #2c2a21); }
.kc-close { color: var(--gold2); }

/* ---------- common widgets ---------- */
.kc-screen { grid-row: 2; position: relative; z-index: 1; overflow: hidden; min-height: 0; }
.kc-top { grid-row: 1; }
.kc-page { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.kc-scroll { overflow-y: auto; overscroll-behavior: contain; --kw-sb-track: transparent; } /* the game's themed bar (kriegswerk.css), over the felt */
.kc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 4px 14px; border: 0; border-radius: 3px; cursor: pointer; font-weight: 600; font-size: 15px; letter-spacing: .02em;
    background: linear-gradient(#46433a, #2b2a22); box-shadow: inset 0 1px 0 #625e4a, 0 2px 0 #0a0907; transition: filter .1s, transform .05s; }
.kc-btn:hover:not(:disabled) { filter: brightness(1.18); }
.kc-btn:active:not(:disabled) { transform: translateY(1px); }
.kc-btn:disabled { opacity: .42; cursor: default; }
.kc-btn-gold { color: var(--ink) !important; background: linear-gradient(var(--gold2), #b8913f); box-shadow: inset 0 1px 0 #fff8, 0 2px 0 #0a0907; }
.kc-btn-red { color: #fff; background: linear-gradient(#c43a2f, #8e241c); box-shadow: inset 0 1px 0 #ea6a5d, 0 2px 0 #0a0907; }
.kc-btn-dia { color: #0d2630 !important; background: linear-gradient(110deg, #bff4ff, #e9d4ff 40%, #c4ffe0 70%, #9fe0ff); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #0a0907; }
.kc-btn-ghost { background: transparent; box-shadow: inset 0 0 0 1px #5a5640; }
.kc-btn-sm { min-height: 28px; padding: 2px 10px; font-size: 14px; }
.kc-btn-lg { min-height: 46px; padding: 6px 26px; font-size: 19px; font-family: var(--stencil); font-weight: 400; letter-spacing: .06em; }
.kc-price { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 19px; font-weight: 400; line-height: 1; }
.kc-price .bi-gem { color: #1d7c8a; } .kc-btn:not(.kc-btn-gold) .kc-price .bi-gem { color: var(--cr); }
.kc-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.kc-end { justify-content: flex-end; } .kc-center { justify-content: center; text-align: center; }
.kc-grow { flex: 1; }
.kc-input { font: inherit; font-size: 15px; color: var(--paper); background: #0f0e0b; border: 1px solid #45422f; border-radius: 3px; padding: 6px 9px; min-height: 34px; }
.kc-input:focus { outline: 1px solid var(--gold); }
.kc-panel { background: linear-gradient(rgba(34, 33, 25, .94), rgba(27, 26, 21, .94)); border: 1px solid #45422f; border-radius: 4px; padding: 14px 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.kc-panel h2, .kc-panel h3 { margin: 0 0 10px; font-family: var(--stencil); font-weight: 400; color: var(--gold); letter-spacing: .04em; }
.kc-panel h2 { font-size: 26px; } .kc-panel h3 { font-size: 19px; margin-top: 14px; } .kc-panel h3:first-child { margin-top: 0; }
.kc-note { color: var(--dim); font-size: 14px; } .kc-warn { color: #ff9d8f; font-size: 14px; }
.kc-lead { font-size: 17px; color: #ddd3b8; }
.kc-list { margin: 6px 0 10px; padding-left: 20px; color: #d5ccb1; } .kc-list li { margin: 4px 0; }
.kc-sub { margin: 14px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.kc-empty { padding: 40px 16px; text-align: center; color: var(--dim); font-family: var(--type); } .kc-empty.sm { padding: 18px 8px; font-size: 14px; }
.kc-check { display: flex; gap: 8px; align-items: center; cursor: pointer; margin: 6px 0; }
.kc-badge { position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 2px 0 #000; }
.kc-bar { position: relative; height: 16px; background: #0f0e0b; border-radius: 8px; box-shadow: inset 0 0 0 1px #45422f; overflow: hidden; margin-top: 6px; }
.kc-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #8a6d2c, var(--gold2)); }
.kc-bar span { position: relative; display: block; text-align: center; font-family: var(--mono); font-size: 16px; line-height: 16px; color: #fff; text-shadow: 0 1px 0 #000; }
.kc-tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.kc-tbl th, .kc-tbl td { padding: 4px 6px; border-bottom: 1px solid #2f2d24; text-align: left; }
.kc-tbl th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.kc-rar-free { color: #cfc6ab; } .kc-rar-common { color: #fff; } .kc-rar-rare { color: #6fb0f5; } .kc-rar-epic { color: #c78af5; } .kc-rar-legendary { color: #f7b24e; }
.kc-narrow { position: absolute; inset: 0; padding: 18px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; max-width: 860px; margin: 0 auto; }

/* toasts, modal, hover preview */
.kc-toasts { position: fixed; right: 14px; top: 64px; z-index: 80; display: grid; gap: 6px; width: min(340px, calc(100vw - 28px)); pointer-events: none; }
.kc-toast { display: flex; gap: 10px; align-items: center; padding: 9px 12px; background: #16150f; border: 1px solid #5a5640; border-left: 4px solid var(--gold); border-radius: 3px; box-shadow: 0 8px 20px rgba(0, 0, 0, .6); animation: kc-toast .3s ease; transition: opacity .4s, transform .4s; }
.kc-toast > i { font-size: 22px; color: var(--gold); }
.kc-toast strong { display: block; font-size: 15px; } .kc-toast span { font-size: 14px; color: var(--dim); }
.kc-toast.good { border-left-color: var(--green); } .kc-toast.bad { border-left-color: var(--red2); } .kc-toast.gold { border-left-color: var(--gold2); background: #1f1a0e; }
.kc-toast.out { opacity: 0; transform: translateX(20px); }
@keyframes kc-toast { from { opacity: 0; transform: translateX(30px); } }
.kc-layer { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.kc-layer > * { pointer-events: auto; }
.kc-modal-back { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(5, 5, 3, .74); backdrop-filter: blur(2px); animation: kc-in .15s ease; }
.kc-modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: linear-gradient(#2a2820, #1d1c16); border: 1px solid #5a5640; border-top: 3px solid var(--gold); border-radius: 4px; padding: 16px 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .7); }
.kc-modal.wide { width: min(980px, 100%); }
.kc-modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kc-modal-head h3 { margin: 0; flex: 1; font-family: var(--stencil); font-weight: 400; font-size: 24px; color: var(--paper); }
.kc-x { width: 34px; height: 34px; border: 0; border-radius: 3px; background: #0f0e0b; box-shadow: inset 0 0 0 1px #45422f; cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.kc-welcome .kc-modal { width: min(640px, 100%); }
.kc-hoverprev { position: fixed; z-index: 70; pointer-events: none; opacity: 0; transition: opacity .12s; display: flex; gap: 8px; align-items: flex-start; }
.kc-hoverprev.on { opacity: 1; }
.kc-prev-side { width: 200px; display: grid; gap: 5px; align-content: start; }
.kc-prev-side .kc-prev-kws { width: auto; }
.kc-prev-sub { font-family: var(--stencil); font-size: 12px; letter-spacing: .12em; color: var(--gold); text-transform: uppercase; text-shadow: 0 1px 0 #000; }
.kc-prev-hero { width: 230px; padding: 9px 10px 10px; background: linear-gradient(175deg, #f6efd9, #e8dcb8); box-shadow: 0 0 0 1px rgba(60, 45, 20, .55), 3px 4px 0 rgba(0, 0, 0, .3), 0 10px 22px rgba(0, 0, 0, .5); border-radius: 1px; }
.kc-prev-hero .kc-prev-sub { color: #7a1d16; text-shadow: none; }
.kc-prev-h b { display: block; font-family: var(--stencil); font-weight: 400; font-size: 18px; color: #2a2418; line-height: 1.05; }
.kc-prev-h small { font-family: var(--type); font-size: 12.5px; color: #5a4a2a; }
/* status slips: what is on a unit or commander right now (printed, granted, states, buffs) */
.kc-status { display: grid; gap: 4px; }
.kc-st { display: grid; grid-template-columns: 20px 1fr; gap: 6px; align-items: start; padding: 5px 7px 5px 6px; font-size: 13px; line-height: 1.22; color: #2a2418;
    background: linear-gradient(175deg, #f4ecd4, #e4d7b1); border-left: 4px solid #8a7a52; border-radius: 1px; box-shadow: 0 0 0 1px rgba(40, 30, 10, .45), 1px 2px 0 rgba(0, 0, 0, .3); }
.kc-st > i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-style: normal; color: #f4ecd4; background: #5a5032; }
.kc-st b { font-family: var(--f); font-weight: 700; font-size: 13.5px; color: #1d160a; }
.kc-st em { font-style: normal; font-family: var(--type); font-size: 12px; color: #6d4a1a; }
.kc-st span { display: block; font-family: var(--type); font-size: 12px; color: #4a3c22; }
.kc-st-granted { border-left-color: #2f6fa8; } .kc-st-granted > i { background: #2f6fa8; }
.kc-st-aura { border-left-color: #c9962c; } .kc-st-aura > i { background: #b8862a; }
.kc-st-buff { border-left-color: #3f8a2c; } .kc-st-buff > i { background: #3f8a2c; }
.kc-st-temp { border-left-color: #5f9a3c; } .kc-st-temp > i { background: #5f9a3c; }
.kc-st-debuff, .kc-st-dmg, .kc-st-lost { border-left-color: #b8352c; } .kc-st-debuff > i, .kc-st-dmg > i, .kc-st-lost > i { background: #b8352c; }
.kc-st-state { border-left-color: #6d2c99; } .kc-st-state > i { background: #6d2c99; }
.kc-st-none { border-left-color: #8a7a52; }
.kc-status-big .kc-st { font-size: 14px; } .kc-status-big .kc-st span { font-size: 13px; }
/* badges along the top of a board unit, each with its own tooltip */
.kc-u-states { position: absolute; left: -9%; top: 6%; z-index: 7; display: flex; flex-direction: column; gap: 2px; }
.kc-ub { display: grid; place-items: center; width: calc(var(--u) * .22); height: calc(var(--u) * .22); border-radius: 50%; font-size: calc(var(--u) * .12); font-style: normal; color: #f4ecd4; cursor: default;
    background: #5a5032; box-shadow: 0 0 0 1.5px #0b0a07, 0 2px 3px rgba(0, 0, 0, .5); }
.kc-ub.kc-st-granted { background: #2f6fa8; } .kc-ub.kc-st-aura { background: #b8862a; } .kc-ub.kc-st-buff, .kc-ub.kc-st-temp { background: #3f8a2c; }
.kc-ub.kc-st-debuff, .kc-ub.kc-st-dmg { background: #b8352c; } .kc-ub.kc-st-state { background: #6d2c99; }
.kc-ub.kc-ub-camouflage { background: #4d5a2a; } .kc-ub.kc-ub-armoured { background: #a07a2a; } .kc-ub.kc-ub-pinned { background: #3a7fb0; }
.kc-ub:hover { filter: brightness(1.25); }
.kc-prev-kws { width: 170px; display: grid; gap: 4px; }
.kc-prev-kws div { background: rgba(15, 14, 11, .95); border: 1px solid #5a5640; border-radius: 3px; padding: 5px 7px; font-size: 13px; color: #d5ccb1; }
.kc-prev-kws b { color: var(--gold2); }
/* the glossary beside a hovered card face (hand, collection, packs): every keyword it has, at once */
.kc-prev-gloss { width: 210px; }
.kc-prev-gloss .kc-prev-kws div { border-left: 2px solid var(--gold); box-shadow: 2px 3px 0 rgba(0, 0, 0, .3); }
.kc-shake { animation: kc-shake .45s ease; }
@keyframes kc-shake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }

/* =================== the card =================== */
/* Rendered at its real size: every measure is in em of (card width / 13), so a card is never scaled with transform.
   Art is a canvas painted at whole-number pixel scale (KW.CardArt). Badges are inline SVG backgrounds: crisp at any size. */
.kc-card { --w: 180px; --cc: #8a8470; --metal: color-mix(in srgb, var(--cc) 30%, #8e8b7d); position: relative; width: var(--w); height: calc(var(--w) * 1.4); font-size: calc(var(--w) / 13); flex: none; line-height: 1.1; color: var(--ink); }
.kc-c3d { position: absolute; inset: 0; border-radius: .8em; }
.kc-cplate { position: absolute; inset: 0; border-radius: .8em; overflow: hidden;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E"),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 .06em, transparent .06em .2em),
        radial-gradient(ellipse at 12% 6%, rgba(255, 255, 255, .28), transparent 30%),
        radial-gradient(ellipse at 92% 96%, rgba(0, 0, 0, .35), transparent 40%),
        linear-gradient(155deg, color-mix(in srgb, var(--metal) 70%, #fff) 0%, var(--metal) 35%, color-mix(in srgb, var(--metal) 60%, #000) 100%);
    box-shadow: inset 0 0 0 .12em #0b0a07, inset .14em .14em 0 .12em rgba(255, 255, 255, .22), inset -.14em -.14em 0 .12em rgba(0, 0, 0, .35), 0 .3em .7em rgba(0, 0, 0, .55); }
/* rivets on the metal frames */
.kc-t-unit .kc-cplate::after, .kc-t-equipment .kc-cplate::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at .72em .72em, #efe8d0 0 .1em, #9a9280 .11em .2em, #2a261c .21em .27em, transparent .28em),
        radial-gradient(circle at calc(100% - .72em) .72em, #efe8d0 0 .1em, #9a9280 .11em .2em, #2a261c .21em .27em, transparent .28em),
        radial-gradient(circle at .72em calc(100% - .72em), #efe8d0 0 .1em, #9a9280 .11em .2em, #2a261c .21em .27em, transparent .28em),
        radial-gradient(circle at calc(100% - .72em) calc(100% - .72em), #efe8d0 0 .1em, #9a9280 .11em .2em, #2a261c .21em .27em, transparent .28em),
        radial-gradient(circle at .5em 50%, #efe8d0 0 .08em, #9a9280 .09em .16em, #2a261c .17em .22em, transparent .23em),
        radial-gradient(circle at calc(100% - .5em) 50%, #efe8d0 0 .08em, #9a9280 .09em .16em, #2a261c .17em .22em, transparent .23em); }
/* art window: arched for units, a pasted photograph for orders, a porthole for equipment */
.kc-cwin { position: absolute; left: 8%; right: 8%; top: 6.5%; height: 42%;
    border-radius: 48% 48% .45em .45em / 36% 36% .45em .45em; }
.kc-cwin::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: inset 0 0 0 .14em #0b0a07, inset 0 0 0 .34em color-mix(in srgb, var(--metal) 60%, #d8d0b4), inset 0 0 0 .44em #0b0a07, inset 0 .5em .8em .3em rgba(0, 0, 0, .35); }
/* The painting clips itself to the window's shape (border-radius on the canvas) instead of being clipped by an
   overflow:hidden window with a dark backing: with the clip and the picture on separate layers, GPU compositors
   (Firefox WebRender, Chrome on scaled screens) let them drift apart during a tilt and showed the backing as a band. */
.kc-artc { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.kc-cwin .kc-artc { border-radius: inherit; }
/* once painted, the picture is the window's background (cards-art.js paintCardArt) and the canvas only measures */
.kc-cwin-bg { background-size: 100% 100%; background-position: center; background-repeat: no-repeat; image-rendering: pixelated; }
.kc-cwin-bg .kc-artc { visibility: hidden; }
/* class insignia: an enamel roundel with the branch's map symbol */
.kc-cins { position: absolute; left: 50%; top: 1.6%; width: 2.5em; height: 2.5em; margin-left: -1.25em; z-index: 3; border-radius: 50%; display: grid; place-items: center; color: #f4eed8;
    background: radial-gradient(circle at 40% 32%, color-mix(in srgb, var(--cc) 70%, #fff), var(--cc) 55%, color-mix(in srgb, var(--cc) 55%, #000));
    box-shadow: 0 0 0 .12em #0b0a07, 0 0 0 .3em #b99a55, 0 0 0 .4em #0b0a07, 0 .2em .3em .3em rgba(0, 0, 0, .35); }
.kc-insig { width: 1.6em; height: 1.4em; display: block; }
/* legendary: a gilt oak-leaf wreath behind the roundel (cards-ui.js wreathHtml), centred on it */
.kc-wreath { position: absolute; left: 50%; top: calc(1.6% + 1.25em - 1.98em); width: 4.4em; height: 4.18em; margin-left: -2.2em; z-index: 2; pointer-events: none;
    filter: drop-shadow(0 .08em .06em rgba(0, 0, 0, .45)); }
/* orders and equipment carry their roundel elsewhere (the stamp top right, the badge beside the porthole): the wreath follows it */
.kc-t-order .kc-wreath { left: auto; right: calc(5% + 1.05em - 1.85em); top: calc(1.2% + 1.05em - 1.66em); width: 3.7em; height: 3.51em; margin: 0; transform: rotate(8deg); }
.kc-t-equipment .kc-wreath { left: calc(13% + 1em - 1.75em); top: auto; bottom: calc(53% + 1em - 1.75em); width: 3.5em; height: 3.33em; margin: 0; }
/* the name on a brass plate with two screws */
.kc-cname { position: absolute; left: 4.5%; right: 4.5%; top: 47.5%; height: 9.4%; display: grid; place-items: center; z-index: 3; border-radius: .25em;
    background: radial-gradient(circle at .55em 50%, #f7ecc8 0 .09em, #7a5e2a .1em .2em, transparent .21em), radial-gradient(circle at calc(100% - .55em) 50%, #f7ecc8 0 .09em, #7a5e2a .1em .2em, transparent .21em),
        linear-gradient(#f1d88f, #c9a24e 45%, #9a7632 55%, #caa451);
    box-shadow: 0 0 0 .1em #0b0a07, inset 0 .08em 0 rgba(255, 255, 255, .5), inset 0 -.08em 0 rgba(0, 0, 0, .25), 0 .15em .3em rgba(0, 0, 0, .5); }
.kc-cname span { font-family: var(--stencil); font-size: 1.08em; color: #2b1f0c; white-space: nowrap; letter-spacing: .02em; text-shadow: 0 .07em 0 rgba(255, 244, 205, .75); padding: 0 1.1em; }
.kc-nm-m .kc-cname span { font-size: .92em; } .kc-nm-s .kc-cname span { font-size: .78em; letter-spacing: 0; padding: 0 .9em; } .kc-nm-xs .kc-cname span { font-size: .66em; letter-spacing: 0; padding: 0 .7em; } .kc-nm-xxs .kc-cname span { font-size: .54em; letter-spacing: 0; padding: 0 .6em; }
/* rarity: an enamel shield in a metal rim */
.kc-cgem { position: absolute; left: 50%; top: 56.2%; width: 1.35em; height: 1.55em; margin-left: -.675em; z-index: 4;
    clip-path: polygon(50% 0, 100% 14%, 94% 58%, 50% 100%, 6% 58%, 0 14%); background: linear-gradient(#f4e6b8, #8a6a2a); }
.kc-cgem::after { content: ''; position: absolute; inset: 14% 16% 18%; clip-path: polygon(50% 0, 100% 14%, 94% 58%, 50% 100%, 6% 58%, 0 14%);
    background: radial-gradient(circle at 38% 28%, #fff, var(--rc, #ece8dc) 45%, color-mix(in srgb, var(--rc, #ece8dc) 55%, #000)); }
.kc-r-common { --rc: #ece8dc; } .kc-r-rare { --rc: #3d8ee8; } .kc-r-epic { --rc: #a24ee8; } .kc-r-legendary { --rc: #f59a28; } .kc-r-free { --rc: #b9b29a; } .kc-r-token { --rc: #8a8470; }
/* rules on a typed form */
.kc-ctext { position: absolute; left: 8%; right: 8%; top: 59.8%; bottom: 12.2%; z-index: 2; display: flex; align-items: center; justify-content: center; padding: .55em .5em .35em; border-radius: .15em;
    background: linear-gradient(90deg, transparent 1.05em, rgba(184, 53, 44, .28) 1.05em 1.1em, transparent 1.1em), repeating-linear-gradient(0deg, transparent 0 .95em, rgba(70, 100, 140, .14) .95em 1em), linear-gradient(#f4eed9, #e4d8b6);
    box-shadow: 0 0 0 .08em #0b0a07, inset 0 0 .5em rgba(110, 90, 40, .25); }
.kc-ctext::before { content: attr(data-form); position: absolute; left: .45em; top: .18em; font-family: var(--type); font-size: .42em; letter-spacing: .06em; color: rgba(60, 50, 30, .55); white-space: nowrap; }
.kc-ctext p { margin: 0; text-align: center; font-family: var(--type); font-size: .92em; line-height: 1.1; color: #1a1209; -webkit-text-stroke: .012em #1a1209; } /* the typewriter face is thin: a hair of stroke keeps it legible small */
.kc-ctext b { font-family: var(--f); font-weight: 800; font-size: 1.04em; letter-spacing: .01em; color: #120c04; }
/* keyword words carry their reminder as a themed tip: a faint dotted rule says so */
.kc-ctext b.kc-kwt { text-decoration: underline dotted rgba(18, 12, 4, .55); text-decoration-thickness: .08em; text-underline-offset: .14em; }
/* live numbers in a match's rules text (cards-ui liveNum): ink-dark green for a raised amount, red for a lowered one —
   readable on the paper, like a correction in the margin rather than a neon glow */
.kc-ctext .kc-num { font-family: var(--f); font-weight: 800; font-size: 1.06em; -webkit-text-stroke: 0; }
.kc-ctext .kc-num-up { color: #1c6b12; text-shadow: 0 0 .25em rgba(120, 220, 90, .35); }
.kc-ctext .kc-num-down { color: #a3231a; }
/* key phrases in bold (cards-ui emphText: "Deploy:", "3 damage", "Summon", "+2/+1" ...) in the keyword face; a keyword
   tip or a live number inside one keeps the size it sits in rather than growing twice */
.kc-ctext b.kc-em { -webkit-text-stroke: 0; }
.kc-ctext b b, .kc-ctext b .kc-num { font-size: 1em; }
.kc-tx-m .kc-ctext p { font-size: .83em; } .kc-tx-s .kc-ctext p { font-size: .74em; } .kc-tx-xs .kc-ctext p { font-size: .66em; }
.kc-ctext p.kc-cflav { font-size: .76em; -webkit-text-stroke: 0; color: #5a4c30; font-style: italic; }
/* type line stamped into the frame, set symbol beside it */
.kc-ctype { position: absolute; left: 50%; bottom: 5.4%; transform: translateX(-50%); padding: .05em .7em .1em; font-size: .6em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; z-index: 3;
    color: #e9e0c4; background: #1a1914; border-radius: .25em; box-shadow: 0 0 0 .1em #0b0a07, inset 0 .1em 0 rgba(255, 255, 255, .12); }
.kc-cset { position: absolute; left: 3.5%; top: 40%; width: 1.35em; height: 1.35em; display: grid; place-items: center; font-size: .82em; z-index: 3; color: var(--gold2); border-radius: 50%;
    background: radial-gradient(circle at 40% 30%, #4a473b, #15140f); box-shadow: 0 0 0 .1em #0b0a07; }
.kc-s-cold .kc-cset { color: #9fd0f0; } .kc-s-basic .kc-cset { color: #cfc6ab; } .kc-s-campaign .kc-cset { color: #b9d47a; }
/* cost in a hex nut, attack a shell casing, health a steel helmet */
.kc-ccost { position: absolute; left: -4%; top: -3%; width: 3em; height: 3em; z-index: 5; display: grid; place-items: center;
    background: var(--svg-nut) center / 100% 100% no-repeat; }
.kc-catk { position: absolute; left: -3%; bottom: -3.5%; width: 2.3em; height: 3.5em; z-index: 5; display: grid; place-items: end center; padding-bottom: .55em;
    background: var(--svg-shell) center / 100% 100% no-repeat; }
.kc-chp { position: absolute; right: -4%; bottom: -3%; width: 3.1em; height: 2.8em; z-index: 5; display: grid; place-items: center; padding-top: .3em;
    background: var(--svg-helmet) center / 100% 100% no-repeat; }
.kc-t-equipment .kc-chp { background: var(--svg-steel) center / 100% 100% no-repeat; padding-top: 0; }
.kc-ccost span, .kc-catk span, .kc-chp span { position: relative; font-family: var(--stencil); color: #fff; line-height: 1; text-shadow: 0 0 .12em #000, 0 .07em 0 #000, .07em 0 0 #000, -.07em 0 0 #000, 0 -.07em 0 #000; }
.kc-ccost span { font-size: 1.7em; } .kc-catk span { font-size: 1.45em; } .kc-chp span { font-size: 1.6em; }
.kc-less span, .kc-up span { color: #8cff7a; } .kc-more span, .kc-down span { color: #ff8a7a; }

/* orders: a typed order sheet with punched holes, a pasted photograph and a rubber stamp */
.kc-t-order .kc-cplate { border-radius: .25em;
    background: linear-gradient(90deg, var(--cc) 0 .45em, rgba(0, 0, 0, .25) .45em .5em, transparent .5em),
        radial-gradient(circle at 30% 2.1%, #1b1a15 0 .28em, transparent .3em), radial-gradient(circle at 70% 2.1%, #1b1a15 0 .28em, transparent .3em),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .22 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"),
        linear-gradient(175deg, #f3ecd6, #e2d6b2 60%, #d4c69d);
    box-shadow: inset 0 0 0 .1em rgba(60, 45, 20, .5), 0 .3em .7em rgba(0, 0, 0, .55);
    clip-path: polygon(0 0, 100% 0, 100% 97%, 94% 99%, 88% 97.2%, 81% 99.2%, 74% 97.4%, 66% 99%, 58% 97.3%, 50% 99.2%, 42% 97.2%, 34% 99%, 26% 97.3%, 18% 99.2%, 10% 97.4%, 4% 99%, 0 97.5%); }
.kc-t-order .kc-cform { position: absolute; left: 12%; right: 6%; top: 3.6%; z-index: 2; font-family: var(--type); font-size: .46em; letter-spacing: .08em; color: #4a3c22; white-space: nowrap; overflow: hidden; }
.kc-t-order .kc-cwin { left: 12%; right: 8%; top: 7%; height: 39%; border-radius: .1em; box-shadow: 0 0 0 .3em #f7f3e6, 0 0 0 .38em rgba(0, 0, 0, .35), .15em .25em .35em .3em rgba(0, 0, 0, .3); }
.kc-t-order .kc-cwin::after { box-shadow: inset 0 0 .6em rgba(0, 0, 0, .35); background: linear-gradient(135deg, #ece2c3 0 .44em, rgba(60, 45, 20, .35) .44em .5em, transparent .5em) top left, linear-gradient(-135deg, #ece2c3 0 .44em, rgba(60, 45, 20, .35) .44em .5em, transparent .5em) top right, linear-gradient(45deg, #ece2c3 0 .44em, rgba(60, 45, 20, .35) .44em .5em, transparent .5em) bottom left, linear-gradient(-45deg, #ece2c3 0 .44em, rgba(60, 45, 20, .35) .44em .5em, transparent .5em) bottom right; /* paper photo mounts */ background-size: 1.1em 1.1em; background-repeat: no-repeat; }
.kc-cstamp { position: absolute; right: 7%; top: 36%; z-index: 4; padding: .08em .45em; font-family: var(--stencil); font-size: .95em; letter-spacing: .1em; color: rgba(176, 36, 28, .82);
    border: .14em solid rgba(176, 36, 28, .75); border-radius: .2em; box-shadow: inset 0 0 0 .08em rgba(176, 36, 28, .5); transform: rotate(-9deg); mix-blend-mode: multiply; }
.kc-t-order .kc-cins { left: auto; right: 5%; top: 1.2%; width: 2.1em; height: 2.1em; margin: 0; color: rgba(40, 60, 110, .85); background: none; box-shadow: 0 0 0 .1em rgba(40, 60, 110, .6); transform: rotate(8deg); }
.kc-t-order .kc-cins .kc-insig { width: 1.4em; }
.kc-t-order .kc-cname { left: 12%; right: 6%; top: 49%; height: 8.2%; background: none; box-shadow: none; border-bottom: .1em solid rgba(40, 30, 10, .6); border-radius: 0; place-items: center start; }
.kc-t-order .kc-cname span { color: #1d160a; text-shadow: none; padding: 0 .2em; font-size: 1.12em; }
.kc-t-order.kc-nm-m .kc-cname span { font-size: .95em; } .kc-t-order.kc-nm-s .kc-cname span { font-size: .8em; }
.kc-t-order .kc-cgem { left: auto; right: 8%; top: 50%; margin: 0; }
.kc-t-order .kc-ctext { left: 12%; right: 6%; top: 59.5%; bottom: 13%; background: repeating-linear-gradient(0deg, transparent 0 .95em, rgba(70, 100, 140, .16) .95em 1em); box-shadow: none; }
.kc-t-order .kc-ctext::before { display: none; }
.kc-t-order .kc-ctype { color: #3a2e18; background: none; box-shadow: 0 0 0 .1em rgba(58, 46, 24, .6); bottom: 5.6%; }
.kc-t-order .kc-cset { left: 6%; top: 41%; }
/* equipment: a stamped steel tag with a punched hole, the art in a riveted porthole, the rules on a pasted label */
.kc-t-equipment .kc-cplate { border-radius: 2.2em 2.2em 1em 1em;
    background: radial-gradient(circle at 50% 2.4%, #14130f 0 .42em, #6f7478 .43em .6em, transparent .62em),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 .05em, rgba(0, 0, 0, .04) .05em .12em),
        linear-gradient(160deg, #d8dde0, color-mix(in srgb, var(--cc) 18%, #9aa2a7) 40%, #5e666b); }
.kc-t-equipment .kc-cwin { left: 20%; right: 20%; top: 8%; height: 43%; border-radius: 50%; }
.kc-t-equipment .kc-cwin::after { box-shadow: inset 0 0 0 .14em #0b0a07, inset 0 0 0 .5em #a8b0b4, inset 0 0 0 .6em #0b0a07; background: radial-gradient(circle at 50% .3em, #e8ecee 0 .1em, #4a5256 .12em .18em, transparent .2em), radial-gradient(circle at 50% calc(100% - .3em), #e8ecee 0 .1em, #4a5256 .12em .18em, transparent .2em), radial-gradient(circle at .3em 50%, #e8ecee 0 .1em, #4a5256 .12em .18em, transparent .2em), radial-gradient(circle at calc(100% - .3em) 50%, #e8ecee 0 .1em, #4a5256 .12em .18em, transparent .2em); }
.kc-t-equipment .kc-cins { top: auto; bottom: 53%; left: 13%; margin: 0; width: 2em; height: 2em; }
.kc-t-equipment .kc-cins .kc-insig { width: 1.3em; }
.kc-t-equipment .kc-cname { background: linear-gradient(#bfc6ca, #8d969b 50%, #a9b1b5); }
.kc-t-equipment .kc-cname span { color: #1c2124; text-shadow: 0 .07em 0 rgba(255, 255, 255, .6); }
.kc-t-equipment .kc-ctext { transform: none; box-shadow: 0 0 0 .08em #0b0a07, .1em .15em .25em rgba(0, 0, 0, .35); }
.kc-t-equipment .kc-ctext::after { content: ''; position: absolute; left: 50%; top: -.35em; width: 2.2em; height: .7em; margin-left: -1.1em; background: rgba(230, 220, 180, .7); box-shadow: 0 0 0 .05em rgba(0, 0, 0, .15); }

/* Golden: gold-plated metal and brass everywhere, a foil sweep that never stops */
.kc-f-golden { --metal: #c79a3e; }
.kc-f-golden .kc-cplate { background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 .06em, transparent .06em .2em),
        radial-gradient(ellipse at 12% 6%, rgba(255, 250, 220, .6), transparent 32%),
        linear-gradient(155deg, #fff0b8 0%, #e6bd55 30%, #b88a2e 62%, #6d4a10 100%);
    box-shadow: inset 0 0 0 .12em #3d2a06, inset .14em .14em 0 .12em rgba(255, 255, 255, .35), inset -.14em -.14em 0 .12em rgba(60, 30, 0, .45), 0 .3em .7em rgba(0, 0, 0, .55), 0 0 .8em rgba(240, 200, 100, .35); }
.kc-f-golden .kc-cname { background: linear-gradient(#fff4c8, #e8c261 45%, #b5862c 55%, #e3bd62); }
.kc-f-golden .kc-cins { box-shadow: 0 0 0 .12em #3d2a06, 0 0 0 .3em #f0cf7e, 0 0 0 .4em #3d2a06; }
.kc-f-golden.kc-t-order .kc-cplate { background: linear-gradient(90deg, #d4a53a 0 .45em, transparent .5em), radial-gradient(circle at 30% 2.1%, #1b1a15 0 .28em, transparent .3em), radial-gradient(circle at 70% 2.1%, #1b1a15 0 .28em, transparent .3em), linear-gradient(175deg, #fff6d8, #f0dc9e 60%, #e0c070); }
.kc-cfoil, .kc-cglare { position: absolute; inset: 0; border-radius: .8em; pointer-events: none; }
/* the sheen and the foil follow each card's own outline: the order sheet's torn edge, the equipment plate's rounded top */
.kc-t-order .kc-cfoil, .kc-t-order .kc-cglare { border-radius: .25em;
    clip-path: polygon(0 0, 100% 0, 100% 97%, 94% 99%, 88% 97.2%, 81% 99.2%, 74% 97.4%, 66% 99%, 58% 97.3%, 50% 99.2%, 42% 97.2%, 34% 99%, 26% 97.3%, 18% 99.2%, 10% 97.4%, 4% 99%, 0 97.5%); }
.kc-t-equipment .kc-cfoil, .kc-t-equipment .kc-cglare { border-radius: 2.2em 2.2em 1em 1em; }
.kc-cfoil { z-index: 1; }
.kc-f-golden .kc-cfoil { background: linear-gradient(115deg, transparent 22%, rgba(255, 236, 170, .0) 34%, rgba(255, 240, 180, .8) 45%, rgba(255, 255, 255, .95) 50%, rgba(255, 214, 110, .7) 55%, transparent 68%);
    background-size: 260% 260%; mix-blend-mode: soft-light; opacity: .95; animation: kc-foil 3.4s ease-in-out infinite; }
.kc-f-golden .kc-cfoil::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: inherit; background-size: inherit; animation: inherit; mix-blend-mode: color-dodge; opacity: .35; }
@keyframes kc-foil { 0% { background-position: 110% 110%; } 55%, 100% { background-position: -30% -30%; } }
/* Diamond: chrome and a holographic sheen with sparkles */
.kc-f-diamond { --metal: #b9d7e2; }
.kc-f-diamond .kc-cplate { background:
        linear-gradient(115deg, rgba(255, 122, 217, .28), rgba(255, 211, 110, .22) 25%, rgba(140, 255, 158, .22) 50%, rgba(110, 228, 255, .28) 75%, rgba(154, 140, 255, .28)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 .06em, transparent .06em .2em),
        linear-gradient(155deg, #ffffff 0%, #cfe6ee 30%, #8fb0bd 62%, #3f5a66 100%);
    box-shadow: inset 0 0 0 .12em #0c2733, inset .14em .14em 0 .12em rgba(255, 255, 255, .5), inset -.14em -.14em 0 .12em rgba(0, 30, 50, .4), 0 .3em .7em rgba(0, 0, 0, .55), 0 0 1em rgba(160, 240, 255, .45); }
.kc-f-diamond .kc-cname { background: linear-gradient(100deg, #bff0ff, #efdcff 35%, #c9ffe4 65%, #b2e4ff); }
.kc-f-diamond .kc-cname span { color: #07222c; }
.kc-f-diamond .kc-cfoil { background:
        radial-gradient(circle at 18% 22%, #fff 0 .07em, transparent .12em), radial-gradient(circle at 72% 14%, #fff 0 .06em, transparent .1em), radial-gradient(circle at 84% 64%, #fff 0 .08em, transparent .12em), radial-gradient(circle at 30% 78%, #fff 0 .06em, transparent .1em), radial-gradient(circle at 56% 44%, #fff 0 .05em, transparent .09em),
        conic-gradient(from 0deg at 50% 50%, #ff7ad9, #ffd36e, #8cff9e, #6ee4ff, #9a8cff, #ff7ad9);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 220% 220%; mix-blend-mode: overlay; opacity: .75; animation: kc-holo 5s linear infinite; }
@keyframes kc-holo { 0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0% 0%; filter: hue-rotate(0deg); } 50% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 100% 100%; } 100% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0% 0%; filter: hue-rotate(360deg); } }
.kc-f-diamond .kc-c3d::after { content: ''; position: absolute; inset: 0; border-radius: .8em; pointer-events: none; z-index: 6; box-shadow: 0 0 1em rgba(140, 230, 255, .55); animation: kc-twinkle 2.4s ease-in-out infinite; }
@keyframes kc-twinkle { 50% { box-shadow: 0 0 1.8em rgba(220, 180, 255, .75); } }
.kc-cglare { z-index: 6; opacity: 0; transition: opacity .25s; background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .42), rgba(255, 255, 255, .08) 30%, transparent 55%); mix-blend-mode: soft-light; }
.kc-lit .kc-cglare { opacity: 1; }
.kc-lit.kc-f-golden .kc-cfoil { animation: none; background-position: calc(50% - var(--tx, 0) * 60%) calc(50% - var(--ty, 0) * 60%); }
.kc-lit.kc-f-diamond .kc-cfoil { animation-play-state: paused; background-position: 0 0, 0 0, 0 0, 0 0, 0 0, calc(50% + var(--tx, 0) * 50%) calc(50% + var(--ty, 0) * 50%); filter: hue-rotate(calc(var(--tx, 0) * 140deg)); }
.kc-ccount { position: absolute; left: 50%; bottom: -1.5em; transform: translateX(-50%); font-family: var(--mono); font-size: 1.35em; line-height: 1; padding: .05em .45em; border-radius: .5em; background: #0f0e0b; color: var(--paper); box-shadow: 0 0 0 .08em #5a5640; white-space: nowrap; }
.kc-cnew { position: absolute; right: -3%; top: 18%; z-index: 7; padding: .1em .45em; font-family: var(--stencil); font-size: .85em; color: #fff; background: var(--red); box-shadow: 0 .1em 0 #000; }
.kc-finbadge { position: absolute; top: 34%; left: -6%; z-index: 7; width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: 50%; font-family: var(--stencil); font-size: .8em; color: #2a1f05; box-shadow: 0 0 0 .1em #000; }
.kc-finbadge.g { background: linear-gradient(135deg, #fff1b8, #d4a53a); } .kc-finbadge.d { top: 50%; background: linear-gradient(135deg, #d9fbff, #d7c2ff, #baffdc); color: #0d2630; }
.kc-lockband { position: absolute; left: 6%; right: 6%; top: 40%; z-index: 8; padding: .35em .3em; text-align: center; font-size: .72em; font-weight: 700; line-height: 1.15; color: #f4eed8; background: rgba(15, 14, 11, .88); border: .1em solid #5a5640; border-radius: .3em; }
.kc-lockband i { color: var(--gold); margin-right: .3em; }
/* card back */
.kc-cback { position: absolute; inset: 0; border-radius: .8em; overflow: hidden; display: grid; place-items: center;
    background: repeating-linear-gradient(45deg, rgba(0, 0, 0, .18) 0 .35em, transparent .35em .7em), radial-gradient(ellipse at 50% 40%, #50573d, #2a2e1f 60%, #15170f);
    box-shadow: inset 0 0 0 .14em #0b0a07, inset 0 0 0 .5em #8d7a45, inset 0 0 0 .6em #0b0a07, 0 .3em .8em rgba(0, 0, 0, .55); }
.kc-cback i { position: absolute; width: 58%; aspect-ratio: 1; border-radius: 50%; border: .35em double #c9a55a; box-shadow: 0 0 0 .3em rgba(0, 0, 0, .35), inset 0 0 1em rgba(0, 0, 0, .5);
    background: repeating-conic-gradient(from 0deg, rgba(212, 176, 100, .25) 0 6deg, transparent 6deg 30deg); }
.kc-cback b { position: relative; font-family: var(--stencil); font-weight: 400; font-size: 3.3em; color: #d9b868; letter-spacing: .02em; text-shadow: 0 .06em 0 #000; }
.kc-unowned .kc-c3d { filter: grayscale(1) brightness(.6); }
.kc-unowned .kc-c3d, .kc-used .kc-c3d { opacity: .75; }
.kc-used .kc-c3d { filter: grayscale(.6) brightness(.62); }

/* =================== inspect =================== */
/* The inspected card is rendered at its full size (no scale). The tilt is a small perspective rotation that
   returns to flat — and pixel-sharp — whenever the pointer rests or leaves. */
.kc-insp { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; animation: kc-in .18s ease; }
.kc-insp-back { position: absolute; inset: 0; background: rgba(4, 4, 3, .84); }
.kc-insp-wrap { position: relative; display: flex; gap: 34px; align-items: center; max-width: 1080px; width: calc(100% - 32px); max-height: calc(100% - 24px); }
.kc-insp-stage { flex: none; display: flex; flex-direction: column; align-items: center; gap: 16px; perspective: 1400px; touch-action: none; padding: 24px; }
.kc-tilt { transition: transform .12s ease-out; }
.kc-tilt.kc-rest { transition: transform .35s ease; transform: none; }
.kc-forge .kc-c3d { animation: kc-forge 1s ease; }
@keyframes kc-forge { 0% { filter: brightness(3) saturate(0); } 40% { filter: brightness(1.8); } 100% { filter: none; } }
.kc-fin-tabs { display: flex; gap: 4px; }
.kc-fin { border: 0; cursor: pointer; padding: 4px 10px; border-radius: 3px; background: #1b1a15; box-shadow: inset 0 0 0 1px #45422f; font-size: 14px; color: var(--paper); }
.kc-fin[aria-pressed='true'] { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold2); }
.kc-fin small { color: var(--faint); } .kc-fin-golden b { color: #f0cf7e; } .kc-fin-diamond b { color: #9fe8ff; }
.kc-insp-info { flex: 1; min-width: 0; max-height: calc(100vh - 80px); overflow-y: auto; padding: 16px 18px; background: linear-gradient(rgba(34, 33, 25, .97), rgba(24, 23, 18, .97)); border: 1px solid #45422f; border-radius: 4px; -webkit-user-select: text; user-select: text; }
.kc-insp-info h2 { margin: 0; font-family: var(--stencil); font-weight: 400; font-size: 30px; color: var(--paper); line-height: 1.05; }
.kc-de { font-family: var(--type); color: var(--dim); margin-top: 2px; }
.kc-meta-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.kc-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 13px; background: #0f0e0b; box-shadow: inset 0 0 0 1px var(--pc, #45422f); }
.kc-pill .kc-insig { width: 16px; height: 14px; color: var(--pc, var(--gold)); }
.kc-kws { display: grid; gap: 6px; }
.kc-kw { padding: 7px 10px; background: #15140f; border-left: 3px solid var(--gold); border-radius: 2px; font-size: 14px; }
.kc-kw b { display: block; color: var(--gold2); font-size: 15px; } .kc-kw span { color: #cfc6ab; }
.kc-flavor { margin: 12px 0 0; padding: 8px 12px; font-family: var(--type); font-size: 15px; color: #cbbf9c; border-left: 2px solid #5a5640; }
.kc-rel { display: flex; gap: 12px; flex-wrap: wrap; }
.kc-rel-b { border: 0; background: none; padding: 0; cursor: pointer; }
.kc-insp-x { position: absolute; top: 12px; right: 12px; z-index: 2; }
.kc-craft { display: grid; gap: 8px; padding: 10px; background: #15140f; border: 1px solid #36342a; border-radius: 3px; }
.kc-own { font-size: 14px; color: #d5ccb1; } .kc-own small { color: var(--faint); }
.kc-craft-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kc-gain { font-family: var(--mono); font-size: 18px; color: var(--sc); margin-right: 8px; }
.kc-forge-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 3px; background: linear-gradient(90deg, rgba(212, 176, 100, .12), transparent); }
.kc-forge-diamond { background: linear-gradient(90deg, rgba(159, 232, 255, .12), transparent); }
.kc-forge-row > div { flex: 1; display: grid; } .kc-forge-row small { color: var(--dim); font-size: 13px; }
.kc-temper { color: #ffb070 !important; }

/* =================== hub =================== */
.kc-hub { position: absolute; inset: 0; overflow-y: auto; padding: clamp(14px, 3vh, 34px) clamp(14px, 4vw, 48px); display: flex; flex-direction: column; gap: 18px; }
.kc-hub-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 24px; }
.kc-hub-head h1 { margin: 0; font-family: var(--stencil); font-weight: 400; font-size: clamp(40px, 6vw, 78px); line-height: .95; letter-spacing: .05em; color: var(--gold); text-shadow: 0 3px 0 #000, 0 0 30px rgba(212, 176, 100, .25); }
.kc-hub-head p { margin: 0 0 8px; font-family: var(--type); color: #cfc6ab; flex: 1 1 260px; }
/* the commander strip: still portraits, the whole frame and badge in view (the portrait is clipped, not the frame); a
   small lift on hover and a press on click only */
.kc-hub-heroes { display: flex; flex-wrap: wrap; gap: 10px 8px; padding: 6px 4px 6px; }
.kc-hub-heroes > span { width: 46px; height: 54px; border-radius: 40% 40% 10% 10%; overflow: visible; background: color-mix(in srgb, var(--cc) 60%, #111); box-shadow: 0 0 0 2px #0b0a07, 0 0 0 4px color-mix(in srgb, var(--cc) 60%, #999); display: grid; place-items: center; flex: none;
    transition: transform .18s ease-out, box-shadow .18s ease-out; }
.kc-hub-heroes > span:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px #0b0a07, 0 0 0 4px color-mix(in srgb, var(--cc) 40%, #e8d9a0), 0 6px 10px rgba(0, 0, 0, .45); }
.kc-hub-heroes > span:active { transform: translateY(-1px) scale(.96); transition-duration: .06s; }
@media (prefers-reduced-motion: reduce) { .kc-hub-heroes > span, .kc-hub-heroes > span:hover, .kc-hub-heroes > span:active { transition: none; transform: none; } }
.kc-hub-heroes img { width: 44px; height: 44px; }
@keyframes kc-bob { 50% { transform: translateY(-5px); } }
.kc-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.kc-tile { position: relative; display: flex; align-items: center; gap: 14px; min-height: 86px; padding: 14px 16px; text-align: left; cursor: pointer; border: 1px solid #45422f; border-radius: 4px;
    background: linear-gradient(rgba(43, 42, 33, .92), rgba(27, 26, 21, .92)); box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); transition: transform .12s, border-color .12s; }
.kc-tile:hover { transform: translateY(-2px); border-color: var(--gold); }
.kc-tile-ico { width: 52px; height: 52px; flex: none; display: grid; place-items: center; font-size: 28px; color: var(--gold); border-radius: 50%; background: radial-gradient(circle at 40% 30%, #3b392f, #15140f); box-shadow: inset 0 0 0 2px #5a5640; }
.kc-tile-t b { display: block; font-family: var(--stencil); font-weight: 400; font-size: 22px; color: var(--paper); letter-spacing: .03em; }
.kc-tile-t small { color: var(--dim); font-size: 14px; }
.kc-tile-big { grid-row: span 2; flex-direction: column; justify-content: flex-end; align-items: flex-start; min-height: 190px; overflow: hidden; }
.kc-tile-big .kc-tile-ico { width: 72px; height: 72px; font-size: 38px; }
.kc-tile-big::before { content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.kc-tile-play::before { background: radial-gradient(circle at 80% 20%, rgba(184, 53, 44, .35), transparent 60%); }
.kc-tile-camp::before { background: radial-gradient(circle at 80% 20%, rgba(143, 174, 90, .35), transparent 60%), repeating-radial-gradient(circle at 80% 20%, transparent 0 14px, rgba(143, 174, 90, .12) 15px 16px); }
.kc-tile-arena::before { background: radial-gradient(circle at 80% 20%, rgba(212, 176, 100, .4), transparent 60%); }
.kc-tile-big > * { position: relative; }
.kc-showcase { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 18px; align-items: end; }
.kc-showcase-sets { padding: 12px 14px; background: rgba(15, 14, 11, .6); border: 1px solid #36342a; border-radius: 4px; display: grid; gap: 8px; align-self: stretch; align-content: start; }
.kc-setbar { display: grid; gap: 2px; } .kc-setbar > span { font-size: 14px; color: #d5ccb1; display: flex; gap: 6px; align-items: center; } .kc-setbar .bi { color: var(--gold); }
.kc-fan { position: relative; height: 230px; margin-bottom: 30px; display: flex; justify-content: center; align-items: flex-end; }
.kc-fan-c { position: absolute; bottom: 0; left: 50%; margin-left: -75px; transform-origin: 50% 140%; transform: translateX(calc(var(--k) * 96px)) rotate(calc(var(--k) * 6deg)); transition: transform .2s; cursor: pointer; }
.kc-fan-c:hover { transform: translateX(calc(var(--k) * 96px)) translateY(-18px) rotate(calc(var(--k) * 6deg)) scale(1.06); z-index: 5; }
.kc-fan-empty { align-items: center; font-family: var(--type); color: var(--faint); border: 1px dashed #45422f; border-radius: 4px; height: 140px; }
.kc-hub-foot { font-family: var(--type); font-size: 14px; color: var(--faint); max-width: 900px; }

/* =================== collection & deck builder =================== */
.kc-colwrap { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr minmax(260px, 310px); min-height: 0; }
.kc-colmain { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.kc-colbar { padding: 12px 14px 10px; background: rgba(15, 14, 11, .72); border-bottom: 1px solid #36342a; display: grid; gap: 10px; }
.kc-clstabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.kc-clstab { position: relative; display: inline-flex; align-items: center; gap: 7px; flex: none; height: 36px; padding: 0 12px 0 9px; border: 0; border-radius: 3px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--paper);
    background: linear-gradient(#302e25, #1d1c16); box-shadow: inset 0 0 0 1px #45422f, inset 0 -3px 0 transparent; }
.kc-clstab[aria-pressed='true'] { background: linear-gradient(color-mix(in srgb, var(--cc) 38%, #302e25), #1d1c16); box-shadow: inset 0 0 0 1px var(--cc), inset 0 -3px 0 var(--cc); }
.kc-clstab .kc-insig { width: 20px; height: 18px; color: color-mix(in srgb, var(--cc) 55%, #fff); }
.kc-clstab.kc-locked { color: var(--dim); } .kc-clstab.kc-locked > .bi-lock-fill { font-size: 11px; color: var(--gold); margin-left: -2px; }
.kc-filters { display: grid; grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(120px, 1fr)) auto auto; gap: 8px; align-items: center; }
.kc-filters .kc-input { height: 36px; min-height: 36px; padding: 0 10px; font-size: 14px; line-height: 34px; width: 100%; }
.kc-select { cursor: pointer; }
.kc-costs { display: flex; gap: 4px; align-items: center; height: 36px; }
.kc-costbtn { flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; font-family: var(--stencil); font-size: 14px; line-height: 30px; color: #fff; background: radial-gradient(circle at 40% 30%, #6fa0cf, #24476e); box-shadow: 0 0 0 1px #0b0a07; opacity: .6; }
.kc-costbtn[aria-pressed='true'] { opacity: 1; box-shadow: 0 0 0 1px #0b0a07, 0 0 0 3px var(--gold); }
.kc-costbtn:first-child { width: auto; padding: 0 11px; border-radius: 15px; background: #26251e; box-shadow: inset 0 0 0 1px #45422f; }
.kc-costbtn:first-child[aria-pressed='true'] { box-shadow: inset 0 0 0 1px #45422f, 0 0 0 2px var(--gold); }
.kc-count { justify-self: end; font-family: var(--mono); font-size: 19px; line-height: 36px; color: var(--dim); white-space: nowrap; }
@media (max-width: 1360px) { .kc-filters { grid-template-columns: minmax(160px, 1.4fr) repeat(3, minmax(110px, 1fr)); } .kc-costs { grid-column: 1 / 4; } .kc-count { grid-column: 4; } }
.kc-grid { flex: 1; min-height: 0; padding: 14px 14px 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--gw), 1fr)); gap: 30px 12px; align-content: start; justify-items: center; --gw: clamp(118px, 11.5vw, 172px); }
.kc-gcell { position: relative; }
.kc-gcell .kc-card { --w: var(--gw); cursor: pointer; transition: transform .12s; }
.kc-gcell .kc-card:hover { transform: translateY(-4px) scale(1.03); z-index: 2; }
.kc-unowned .kc-c3d { filter: grayscale(1) brightness(.55); opacity: .7; }
.kc-used .kc-c3d { filter: grayscale(.6) brightness(.6); }
.kc-mag { position: absolute; top: -8px; right: -8px; z-index: 7; width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer; background: #0f0e0b; box-shadow: 0 0 0 1px #5a5640; opacity: 0; transition: opacity .12s; }
.kc-gcell:hover .kc-mag, .kc-draft-c:hover .kc-mag { opacity: 1; }
@media (hover: none) { .kc-mag { opacity: 1; } }
.kc-deckside { display: flex; flex-direction: column; min-height: 0; background: rgba(15, 14, 11, .82); border-left: 1px solid #36342a; padding: 10px; gap: 8px; }
.kc-side-h { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--stencil); font-size: 20px; color: var(--gold); }
.kc-side-h small { font-family: var(--mono); color: var(--dim); font-size: 18px; }
.kc-decklist { flex: 1; min-height: 0; display: grid; gap: 6px; align-content: start; }
.kc-decktile { display: flex; align-items: center; gap: 10px; padding: 6px 8px; text-align: left; cursor: pointer; border: 0; border-radius: 3px; width: 100%;
    background: linear-gradient(90deg, color-mix(in srgb, var(--cc, #555) 35%, #1d1c16), #1d1c16 70%); box-shadow: inset 0 0 0 1px #45422f; }
.kc-decktile:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--gold); }
.kc-decktile.sel { box-shadow: inset 0 0 0 2px var(--gold2), 0 0 12px rgba(212, 176, 100, .3); }
.kc-decktile.bad small i { color: #ffb070; }
.kc-decktile:disabled { opacity: .45; cursor: default; }
.kc-decktile-p { width: 44px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 40% 40% 8% 8%; background: #0f0e0b; box-shadow: 0 0 0 2px color-mix(in srgb, var(--cc, #888) 70%, #ccc); overflow: hidden; font-size: 22px; color: var(--gold); }
.kc-decktile-p img { width: 44px; height: 44px; }
.kc-decktile-t b { display: block; font-size: 16px; } .kc-decktile-t small { color: var(--dim); font-size: 13px; }
.kc-newdeck { background: transparent; box-shadow: inset 0 0 0 1px dashed #5a5640; border: 1px dashed #5a5640; }
.kc-side-foot { display: flex; justify-content: center; }
.kc-deckhead { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--cc) 40%, #1d1c16), #1d1c16); }
.kc-deckhead > div { flex: 1; min-width: 0; display: grid; gap: 2px; } .kc-deckhead small { color: var(--dim); font-size: 13px; }
.kc-deckhero { width: 64px; flex: none; display: grid; justify-items: center; gap: 2px; padding: 3px; border: 0; border-radius: 3px; background: #0f0e0b; box-shadow: 0 0 0 2px color-mix(in srgb, var(--cc) 70%, #ccc); cursor: pointer; }
.kc-deckhero img { width: 56px; height: 56px; } .kc-deckhero small { font-size: 10px; color: var(--dim); }
.kc-deckname { width: 100%; font-family: var(--stencil); font-size: 17px; }
.kc-curve { display: flex; gap: 3px; height: 62px; align-items: flex-end; padding: 0 4px; }
.kc-curve-c { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.kc-curve-c i { width: 100%; background: linear-gradient(#6fa0cf, #24476e); border-radius: 2px 2px 0 0; min-height: 2px; transition: height .2s; }
.kc-curve-c b { position: absolute; bottom: 16px; font-family: var(--mono); font-size: 15px; font-weight: 400; color: #fff; text-shadow: 0 1px 0 #000; }
.kc-curve-c span { font-family: var(--stencil); font-size: 12px; color: var(--dim); height: 14px; }
.kc-deckcount { text-align: center; font-family: var(--mono); font-size: 22px; color: var(--dim); }
.kc-deckcount b { font-size: 28px; color: #ffb070; font-weight: 400; } .kc-deckcount.full b { color: var(--green); }
.kc-drows { flex: 1; min-height: 60px; display: grid; gap: 3px; align-content: start; }
.kc-drow { position: relative; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 0; border: 0; border-radius: 3px; cursor: pointer; overflow: hidden; text-align: left; width: 100%;
    background: #1a1914; box-shadow: inset 0 0 0 1px #36342a; border-left: 4px solid var(--rc, #888); }
.kc-drow:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.kc-drow-cost { width: 28px; height: 100%; display: grid; place-items: center; font-family: var(--stencil); font-size: 16px; background: linear-gradient(#3f7fb8, #173556); flex: none; z-index: 1; }
.kc-drow-name { flex: 1; z-index: 1; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.kc-drow-art { position: absolute; right: 0; top: 0; bottom: 0; width: 60%; background-size: 64px; background-position: right -6px center; background-repeat: no-repeat; image-rendering: pixelated; opacity: .6;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }
.kc-drow-n { z-index: 1; font-family: var(--mono); font-size: 18px; color: var(--gold2); min-width: 18px; text-align: right; }
.kc-drow.kc-f-golden { background: linear-gradient(90deg, #3a2e10, #1a1914); } .kc-drow.kc-f-diamond { background: linear-gradient(90deg, #12313a, #1a1914); }
.kc-flash { animation: kc-flashrow .6s ease; }
@keyframes kc-flashrow { from { background: #6d5a28; } }
.kc-deckerr { font-size: 13px; color: #ffb070; padding: 4px 6px; background: rgba(184, 53, 44, .12); border-radius: 3px; }
.kc-deckbtns { display: flex; gap: 5px; flex-wrap: wrap; } .kc-deckbtns .kc-btn-gold { margin-left: auto; }
.kc-heropick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.kc-herotile { display: grid; justify-items: center; gap: 4px; padding: 12px 10px; text-align: center; cursor: pointer; border: 0; border-radius: 4px;
    background: linear-gradient(color-mix(in srgb, var(--cc) 35%, #26251e), #16150f); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 60%, #45422f); transition: transform .12s; }
.kc-herotile:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--gold); }
.kc-herotile-p { width: 96px; height: 108px; display: grid; place-items: center; border-radius: 40% 40% 10% 10%; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--cc) 50%, #ddd), #15140f); box-shadow: 0 0 0 3px #0b0a07, 0 0 0 5px color-mix(in srgb, var(--cc) 60%, #aaa); overflow: hidden; }
.kc-herotile-p img { width: 92px; height: 92px; }
.kc-herotile b { font-family: var(--stencil); font-weight: 400; font-size: 20px; } .kc-herotile small { color: var(--dim); }
.kc-herotile em { font-style: normal; font-size: 13px; color: #d5ccb1; }
.kc-hp-cost { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 4px; font-family: var(--stencil); font-size: 12px; clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); background: #3f7fb8; color: #fff; vertical-align: middle; }

/* =================== packs =================== */
.kc-packs { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(250px, 340px) 1fr; min-height: 0; }
.kc-packshelf { padding: 14px; display: grid; gap: 14px; align-content: start; background: rgba(15, 14, 11, .7); border-right: 1px solid #36342a; }
.kc-packslot { display: flex; gap: 12px; align-items: center; }
.kc-packslot.empty .kc-pack { filter: grayscale(.8) brightness(.5); }
.kc-packslot-i { display: grid; gap: 3px; } .kc-packslot-i b { font-family: var(--stencil); font-weight: 400; font-size: 17px; }
.kc-packn { font-family: var(--mono); font-size: 22px; color: var(--gold2); } .kc-packslot-i small { color: var(--faint); font-size: 12px; }
.kc-pack { --pw: 112px; position: relative; width: var(--pw); height: calc(var(--pw) * 1.42); flex: none; font-size: calc(var(--pw) / 10); cursor: pointer; transition: transform .15s; }
.kc-packslot .kc-pack:hover { transform: rotate(-3deg) translateY(-4px); }
.kc-pack-body, .kc-pack-flap { position: absolute; left: 0; right: 0; }
.kc-pack-flap { top: 0; height: 12%; background: linear-gradient(#7c6a3a, #4d4122); z-index: 2; border-radius: .3em .3em 0 0;
    -webkit-mask: linear-gradient(#000, #000) top/100% 85% no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/.8em 15% repeat-x;
    mask: linear-gradient(#000, #000) top/100% 85% no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/.8em 15% repeat-x; }
.kc-pack-body { top: 10%; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: .7em .4em .8em; border-radius: 0 0 .3em .3em;
    background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .06) 0 .15em, transparent .15em .5em), linear-gradient(160deg, #8a7a4a, #5d4f28 60%, #3a3118); box-shadow: 0 .6em 1.2em rgba(0, 0, 0, .6), inset 0 0 0 .15em rgba(0, 0, 0, .4);
    -webkit-mask: linear-gradient(#000, #000) top/100% 94% no-repeat, conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) bottom/.8em 7% repeat-x;
    mask: linear-gradient(#000, #000) top/100% 94% no-repeat, conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) bottom/.8em 7% repeat-x; }
.kc-pack-cold .kc-pack-body { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .06) 0 .15em, transparent .15em .5em), linear-gradient(160deg, #5f7a8c, #3a4f5d 60%, #1f2c35); }
.kc-pack-cold .kc-pack-flap { background: linear-gradient(#5a7384, #33444f); }
.kc-pack-logo { font-family: var(--stencil); font-weight: 400; font-size: .92em; letter-spacing: .03em; white-space: nowrap; color: var(--gold2); text-shadow: 0 .08em 0 #000; }
.kc-pack-cold .kc-pack-logo { color: #dff1ff; }
.kc-pack-art { width: 62%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #efe3bd, #9c8d5c 60%, #4a3f22); box-shadow: 0 0 0 .2em #1a1914, 0 0 0 .35em var(--gold); }
.kc-pack-cold .kc-pack-art { background: radial-gradient(circle at 50% 40%, #e6f0f5, #8aa0ad 60%, #2c3a44); box-shadow: 0 0 0 .2em #1a1914, 0 0 0 .35em #9fc8e0; }
.kc-pack-art img { width: 86%; height: auto; }
.kc-pack-name { font-family: var(--stencil); font-size: .9em; color: var(--paper); text-align: center; line-height: 1; }
.kc-pack small { font-size: .62em; color: rgba(236, 228, 203, .7); letter-spacing: .05em; }
.kc-table { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden;
    background: radial-gradient(ellipse at 50% 50%, rgba(212, 176, 100, .08), transparent 60%); }
.kc-table-hint { font-family: var(--type); color: var(--dim); font-size: 18px; }
.kc-opening { display: grid; place-items: center; }
.kc-opening .kc-pack { --pw: min(220px, 30vh); }
.kc-pack-go { animation: kc-packgo .7s ease forwards; }
@keyframes kc-packgo { 0% { transform: translateY(40px) scale(.8); opacity: 0; } 40% { transform: none; opacity: 1; } 55% { transform: rotate(-3deg); } 70% { transform: rotate(3deg) scale(1.02); } 85% { transform: rotate(-2deg) scale(1.04); } 100% { transform: scale(1.05); } }
.kc-pack-tear .kc-pack-flap { animation: kc-flap .45s ease-in forwards; }
.kc-pack-tear .kc-pack-body { animation: kc-packbody .45s ease-in forwards; }
.kc-pack-tear::after { content: ''; position: absolute; inset: -40%; background: radial-gradient(circle, rgba(255, 245, 210, .95), transparent 60%); animation: kc-flash .45s ease-out forwards; }
@keyframes kc-flap { to { transform: translate(40%, -160%) rotate(35deg); opacity: 0; } }
@keyframes kc-packbody { 40% { transform: scale(1.08); } to { transform: translateY(40%) scale(.9); opacity: 0; } }
@keyframes kc-flash { from { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } to { opacity: 0; transform: scale(1.3); } }
.kc-flipwrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 22px; max-width: calc(var(--w) * 3 + 70px); }
.kc-flip { position: relative; width: var(--w); height: calc(var(--w) * 1.4); perspective: 1200px; cursor: pointer; animation: kc-flyin .55s cubic-bezier(.2, .9, .3, 1.2) backwards; animation-delay: var(--d); }
@keyframes kc-flyin { from { transform: translateY(40%) scale(.2) rotate(-12deg); opacity: 0; } }
.kc-flip-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, 1.3, .5, 1); }
/* once turned, the card leaves 3D space so it renders flat and sharp */
.kc-flip.flipped .kc-flip-in { transform: rotateY(180deg); }
.kc-flip.flipped.kc-flat .kc-flip-in, .kc-flip.flipped.kc-flat:hover .kc-flip-in { transform: none; transition: none; transform-style: flat; }
.kc-flip.flipped.kc-flat .kc-flip-back { display: none; } .kc-flip.flipped.kc-flat .kc-flip-front { transform: none; backface-visibility: visible; -webkit-backface-visibility: visible; }
.kc-flip-back, .kc-flip-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.kc-flip-front { transform: rotateY(180deg); }
.kc-flip:not(.flipped):hover .kc-flip-in { transform: translateY(-6px) rotateY(-8deg); }
.kc-flip-back .kc-card { transition: filter .2s; border-radius: .9em; }
.kc-flip.kc-glow-rare:not(.flipped):hover .kc-flip-back .kc-card { filter: drop-shadow(0 0 14px #4a98ec) drop-shadow(0 0 4px #4a98ec); }
.kc-flip.kc-glow-epic:not(.flipped):hover .kc-flip-back .kc-card { filter: drop-shadow(0 0 16px #b05cf0) drop-shadow(0 0 5px #b05cf0); }
.kc-flip.kc-glow-legendary:not(.flipped) .kc-flip-back .kc-card { animation: kc-legglow 1.2s ease-in-out infinite; }
@keyframes kc-legglow { 50% { filter: drop-shadow(0 0 22px #f5a032) drop-shadow(0 0 6px #ffd27a); } }
.kc-flip.flipped.kc-glow-rare .kc-flip-front .kc-card { filter: drop-shadow(0 0 10px rgba(74, 152, 236, .7)); }
.kc-flip.flipped.kc-glow-epic .kc-flip-front .kc-card { filter: drop-shadow(0 0 14px rgba(176, 92, 240, .8)); }
.kc-flip.flipped.kc-glow-legendary .kc-flip-front .kc-card { filter: drop-shadow(0 0 20px rgba(245, 160, 50, .9)); }
.kc-flip-tag { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); white-space: nowrap; font-family: var(--stencil); font-size: 13px; color: var(--red2); opacity: 0; transition: opacity .3s .5s; }
.kc-flip.flipped .kc-flip-tag { opacity: 1; }
.kc-burst { position: absolute; left: 50%; top: 50%; width: 360%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; z-index: -1;
    background: repeating-conic-gradient(from 0deg, rgba(255, 196, 90, .55) 0 7deg, transparent 7deg 22deg); -webkit-mask: radial-gradient(circle, #000 10%, transparent 62%); mask: radial-gradient(circle, #000 10%, transparent 62%);
    animation: kc-burst 1.6s ease-out forwards; }
@keyframes kc-burst { from { transform: translate(-50%, -50%) scale(.2) rotate(0); opacity: 1; } to { transform: translate(-50%, -50%) scale(1.3) rotate(60deg); opacity: 0; } }
.kc-packbtns { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; gap: 10px; justify-content: center; }

/* =================== shop, quests, settings =================== */
.kc-shop { position: absolute; inset: 0; padding: 18px; display: grid; gap: 16px; align-content: start; max-width: 1100px; margin: 0 auto; }
.kc-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 12px; }
.kc-shop, .kc-practice, .kc-levels-page { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 601px) { .kc-shopitem .kc-row { flex-wrap: nowrap; } } .kc-shopitem .kc-btn { white-space: nowrap; } .kc-shopitem > div { min-width: 0; }
.kc-shopitem { display: flex; gap: 14px; align-items: center; padding: 14px; background: linear-gradient(rgba(43, 42, 33, .94), rgba(27, 26, 21, .94)); border: 1px solid #45422f; border-radius: 4px; }
.kc-shopitem > div { display: grid; gap: 4px; } .kc-shopitem b { font-family: var(--stencil); font-weight: 400; font-size: 20px; } .kc-shopitem small { color: var(--dim); }
.kc-shop-ico { width: 90px; height: 90px; flex: none; display: grid; place-items: center; font-size: 46px; color: var(--gold); border-radius: 50%; background: radial-gradient(circle at 40% 30%, #3b392f, #15140f); box-shadow: inset 0 0 0 2px #5a5640; }
.kc-econ { overflow-x: auto; }
.kc-econ .kc-tbl td:not(:first-child) { font-family: var(--mono); font-size: 18px; }
.kc-quests { display: grid; gap: 10px; }
.kc-quest { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 3px; color: var(--ink);
    background: repeating-linear-gradient(0deg, transparent 0 22px, rgba(80, 110, 150, .12) 22px 23px), linear-gradient(#efe6c8, #d8caa3); box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
.kc-quest-stamp { flex: none; width: 74px; height: 74px; display: grid; place-items: center; font-family: var(--stencil); font-size: 15px; color: rgba(184, 53, 44, .8); border: 3px double rgba(184, 53, 44, .75); border-radius: 50%; transform: rotate(-12deg); }
.kc-quest.done .kc-quest-stamp { color: rgba(60, 110, 40, .9); border-color: rgba(60, 110, 40, .8); }
.kc-quest-t { flex: 1; } .kc-quest-t b { font-family: var(--type); font-weight: 400; font-size: 19px; }
.kc-quest-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; } .kc-quest-r .kc-price { font-size: 26px; } .kc-quest-r .kc-price .bi-gem { color: #1d7c8a; }
.kc-quest .kc-btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(42, 36, 24, .4); }
.kc-record { display: flex; gap: 10px; flex-wrap: wrap; }
.kc-record span { flex: 1 1 110px; display: grid; padding: 8px; text-align: center; background: #15140f; border-radius: 3px; color: var(--dim); font-size: 13px; }
.kc-record b { font-family: var(--mono); font-size: 30px; font-weight: 400; color: var(--gold2); }
.kc-exportbox { width: 100%; min-height: 70px; font-family: var(--mono); font-size: 14px; }

/* =================== practice =================== */
.kc-practice { position: absolute; inset: 0; padding: 18px; display: grid; gap: 14px; align-content: start; max-width: 1150px; margin: 0 auto; }
.kc-decklist-row { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.kc-opps { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.kc-opp { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 8px 6px; border: 0; border-radius: 3px; cursor: pointer; background: #1b1a15; box-shadow: inset 0 0 0 1px #45422f; text-align: center; }
.kc-opp[aria-pressed='true'] { box-shadow: inset 0 0 0 2px var(--gold2); background: linear-gradient(color-mix(in srgb, var(--cc, #555) 35%, #1b1a15), #1b1a15); }
.kc-opp-p { width: 60px; height: 66px; display: grid; place-items: center; border-radius: 40% 40% 10% 10%; background: #0f0e0b; box-shadow: 0 0 0 2px color-mix(in srgb, var(--cc, #888) 70%, #ccc); overflow: hidden; font-size: 28px; color: var(--gold); }
.kc-opp-p img { width: 58px; height: 58px; } .kc-opp b { font-size: 15px; } .kc-opp small { font-size: 11px; color: var(--dim); }
.kc-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 8px; }
.kc-level { align-content: start; }
.kc-level { display: grid; gap: 3px; padding: 10px 12px; text-align: left; border: 0; border-radius: 3px; cursor: pointer; background: #1b1a15; box-shadow: inset 0 0 0 1px #45422f; }
.kc-level[aria-pressed='true'] { box-shadow: inset 0 0 0 2px var(--gold2); }
.kc-level b { font-family: var(--stencil); font-weight: 400; font-size: 19px; } .kc-level small { color: var(--dim); }

/* =================== arena & chests =================== */
.kc-arena { position: absolute; inset: 0; padding: 18px; display: grid; gap: 14px; align-content: start; }
.kc-arena-intro { max-width: 900px; margin: 0 auto; }
.kc-arena-draft { grid-template-columns: 1fr minmax(240px, 290px); align-content: stretch; padding: 0; min-height: 0; }
.kc-arena-side { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 0; background: rgba(15, 14, 11, .82); border-left: 1px solid #36342a; }
.kc-draft { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; min-height: 0; overflow-y: auto; }
.kc-draft h2 { margin: 0; font-family: var(--stencil); font-weight: 400; font-size: 32px; color: var(--gold); }
.kc-draft-cards { display: flex; gap: clamp(10px, 3vw, 34px); justify-content: center; flex-wrap: wrap; }
.kc-draft-c { position: relative; animation: kc-flyin .45s ease both; animation-delay: var(--d); }
.kc-pickable { cursor: pointer; transition: transform .15s, filter .15s; }
.kc-pickable:hover { transform: translateY(-10px) scale(1.04); filter: drop-shadow(0 0 16px rgba(212, 176, 100, .6)); }
.kc-taken { animation: kc-taken .25s ease forwards !important; }
@keyframes kc-taken { to { transform: translate(40vw, 0) scale(.3); opacity: 0; } }
.kc-run h2 { font-size: 30px; }
.kc-pips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.kc-pip { width: 30px; height: 30px; border-radius: 50%; background: #15140f; box-shadow: inset 0 0 0 2px #45422f; }
.kc-pip.on { background: radial-gradient(circle at 40% 30%, #fff1b8, #d4a53a 50%, #7a5510); box-shadow: 0 0 10px rgba(240, 207, 126, .5); }
.kc-xs { display: flex; gap: 8px; } .kc-xs .kc-x { width: 34px; height: 34px; display: grid; place-items: center; font-style: normal; font-size: 18px; color: #3a372b; box-shadow: inset 0 0 0 2px #45422f; border-radius: 3px; }
.kc-xs .kc-x.on { color: #fff; background: var(--red); box-shadow: none; }
.kc-run-rec { font-family: var(--mono); font-size: 26px; color: var(--dim); } .kc-run-rec b { color: var(--gold2); font-weight: 400; }
.kc-runchest { display: grid; justify-items: center; gap: 4px; color: var(--dim); }
.kc-chesttable { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 16px 0; }
.kc-ct { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; background: #15140f; border-radius: 3px; text-align: center; }
.kc-ct b { font-family: var(--stencil); font-weight: 400; } .kc-ct small { color: var(--dim); font-size: 12px; }
.kc-chest { --ch: #8a5a2b; position: relative; width: 120px; height: 96px; cursor: pointer; }
.kc-chest.sm { width: 64px; height: 52px; cursor: default; }
.kc-chest.big { width: 220px; height: 176px; }
.kc-chest-lid, .kc-chest-body { position: absolute; left: 0; right: 0; border: 3px solid #0b0a07;
    background: repeating-linear-gradient(90deg, transparent 0 18%, rgba(0, 0, 0, .35) 18% 22%, transparent 22% 78%, rgba(0, 0, 0, .35) 78% 82%, transparent 82%), linear-gradient(color-mix(in srgb, var(--ch) 80%, #fff), var(--ch) 40%, color-mix(in srgb, var(--ch) 50%, #000)); }
.kc-chest-lid { top: 0; height: 40%; border-radius: 40% 40% 4px 4px / 70% 70% 4px 4px; z-index: 2; transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.kc-chest-body { top: 38%; bottom: 0; border-radius: 4px 4px 6px 6px; }
.kc-chest-lock { position: absolute; left: 50%; top: -14%; width: 18%; height: 38%; transform: translateX(-50%); z-index: 3; border-radius: 3px; background: linear-gradient(#f2d98a, #9a7424); border: 2px solid #0b0a07; }
.kc-chest-glow { position: absolute; left: 50%; top: 40%; width: 0; height: 0; z-index: 1; pointer-events: none; }
.kc-chest-glow::before { pointer-events: none; }
.kc-chest-glow::before { content: ''; position: absolute; left: -150px; top: -150px; width: 300px; height: 300px; opacity: 0; border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--ch) 60%, #fff) 0 8deg, transparent 8deg 24deg); -webkit-mask: radial-gradient(circle, #000 10%, transparent 65%); mask: radial-gradient(circle, #000 10%, transparent 65%); }
.kc-chest-diamond .kc-chest-lid, .kc-chest-diamond .kc-chest-body { background: repeating-linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, .35) 18% 22%, transparent 22% 78%, rgba(255, 255, 255, .35) 78% 82%, transparent 82%), linear-gradient(120deg, #d9fbff, #9fe8ff 30%, #e2c9ff 60%, #b8ffd9); }
.kc-chest-l { text-align: center; margin-top: 4px; } .kc-chest-l b { display: block; font-family: var(--stencil); font-weight: 400; } .kc-chest-l small { color: var(--dim); font-size: 12px; }
.kc-chestrow { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin: 20px 0; }
.kc-chestslot { display: grid; justify-items: center; }
.kc-chestslot .kc-chest:hover { animation: kc-wobble .5s ease; }
@keyframes kc-wobble { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.kc-chest-shake { animation: kc-chestshake .75s ease; }
@keyframes kc-chestshake { 10%, 50%, 90% { transform: translate(-4px, 0) rotate(-3deg); } 30%, 70% { transform: translate(4px, -2px) rotate(3deg); } 100% { transform: scale(1.08); } }
.kc-chest-open .kc-chest-lid { transform: translateY(-40%) rotateX(-70deg) rotate(-12deg); }
.kc-chest-open .kc-chest-glow::before { opacity: 1; animation: kc-spin 6s linear infinite; }
.kc-chestmodal .kc-modal { background: radial-gradient(ellipse at 50% 30%, #2f2b1e, #15140f); text-align: center; }
.kc-chest-stage { display: grid; place-items: center; padding: 40px 0 10px; }
.kc-loot { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; min-height: 40px; }
.kc-lootitem { display: grid; justify-items: center; gap: 4px; padding: 10px; animation: kc-loot .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes kc-loot { from { transform: translateY(-60px) scale(.3); opacity: 0; } }
.kc-lootitem > i { font-size: 40px; } .kc-lootitem > b { font-family: var(--mono); font-size: 34px; font-weight: 400; line-height: 1; } .kc-lootitem small { color: var(--dim); }
.kc-cr { color: var(--cr); } .kc-sc { color: var(--sc); }
.kc-lootpack .kc-pack { --pw: 76px; }

/* =================== campaigns =================== */
.kc-camps { position: absolute; inset: 0; padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; align-content: start; }
.kc-campfolder { position: relative; display: grid; gap: 6px; padding: 36px 20px 20px; text-align: left; cursor: pointer; border: 0; border-radius: 3px 3px 4px 4px; color: var(--ink);
    background: linear-gradient(#d9c28c, #b89c5c); box-shadow: 0 10px 24px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .25); transition: transform .15s; }
.kc-campfolder.kc-era-cold { background: linear-gradient(#b8c7cf, #8ea0ab); }
.kc-campfolder:hover { transform: translateY(-4px) rotate(-.5deg); }
.kc-folder-tab { position: absolute; top: -14px; left: 16px; padding: 4px 14px; border-radius: 4px 4px 0 0; background: inherit; font-family: var(--stencil); font-size: 13px; letter-spacing: .1em; }
.kc-campfolder b { font-family: var(--type); font-weight: 400; font-size: 24px; } .kc-campfolder small { font-size: 14px; }
.kc-folder-stamp { position: absolute; right: 14px; top: 12px; font-family: var(--stencil); font-size: 14px; color: rgba(184, 53, 44, .75); border: 2px solid rgba(184, 53, 44, .6); padding: 1px 8px; transform: rotate(6deg); }
.kc-campaign { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr minmax(290px, 380px); min-height: 0; }
.kc-campmain { display: flex; flex-direction: column; min-height: 0; padding: 10px; gap: 8px; }
.kc-chaptabs { display: flex; gap: 4px; flex-wrap: wrap; }
.kc-chaptab { border: 0; cursor: pointer; padding: 6px 12px; border-radius: 3px 3px 0 0; font-family: var(--type); font-size: 15px; background: #26251e; color: var(--dim); box-shadow: inset 0 0 0 1px #45422f; }
.kc-chaptab[aria-pressed='true'] { background: #d9c9a0; color: var(--ink); }
.kc-chaptab.locked { opacity: .55; } .kc-chaptab.done i { color: var(--green); }
.kc-map { position: relative; flex: 1; min-height: 280px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 6px #3a2c18, inset 0 0 0 8px #0b0a07, 0 10px 30px rgba(0, 0, 0, .6);
    background: radial-gradient(ellipse at 50% 50%, #d9cfa7, #c4b684 60%, #9d8f5c); }
.kc-map.kc-era-cold { background: radial-gradient(ellipse at 50% 50%, #d3d8cf, #b7bfb2 60%, #8c9687); }
.kc-map::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(60, 40, 10, .45)); }
.kc-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.kc-map-svg .kc-sea { fill: #8fb3bf; opacity: .75; } .kc-map-svg .kc-wood { fill: #7f955a; opacity: .45; }
.kc-map-svg .kc-contour { fill: none; stroke: #8a6d3c; stroke-width: .15; opacity: .55; }
.kc-map-svg .kc-river { fill: none; stroke: #6f9fb2; stroke-width: .8; opacity: .9; }
.kc-map-svg .kc-road { fill: none; stroke: #7a2b1f; stroke-width: .45; stroke-dasharray: 1.2 .9; opacity: .8; }
.kc-map-svg .kc-gridl { stroke: #6b5a36; stroke-width: .08; opacity: .5; }
.kc-map-title { position: absolute; left: 18px; top: 14px; font-family: var(--type); font-size: 22px; color: #3b2f18; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
.kc-compass { position: absolute; right: 16px; bottom: 12px; font-size: 38px; color: rgba(59, 47, 24, .6); }
.kc-pin { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; border: 0; background: none; cursor: pointer; padding: 0; color: var(--ink); z-index: 2; }
.kc-pin > i { width: 38px; height: 38px; display: grid; place-items: center; font-size: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #b8352c; color: #fff; box-shadow: 0 3px 0 #0b0a07, 0 0 0 2px #0b0a07; }
.kc-pin > i::before { transform: rotate(45deg); }
.kc-pin span { margin-top: 6px; padding: 1px 7px; font-family: var(--type); font-size: 13px; white-space: nowrap; background: rgba(239, 230, 200, .92); border-radius: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.kc-pin span small { color: #7a2b1f; }
.kc-pin-l span { align-self: flex-start; margin-left: 12px; } .kc-pin-r span { align-self: flex-end; margin-right: 12px; }
.kc-pin-open > i { animation: kc-pinpulse 1.6s ease-in-out infinite; }
@keyframes kc-pinpulse { 50% { box-shadow: 0 3px 0 #0b0a07, 0 0 0 2px #0b0a07, 0 0 0 10px rgba(184, 53, 44, .25); } }
.kc-pin-done > i { background: #d4a53a; color: #2a1f05; } .kc-pin-locked > i { background: #6f6953; color: #cfc6ab; } .kc-pin-locked span { opacity: .7; }
.kc-pin.sel > i { outline: 3px solid #fff3c0; outline-offset: 2px; }
.kc-brief { padding: 10px; min-height: 0; background: rgba(15, 14, 11, .82); border-left: 1px solid #36342a; }
.kc-brief-paper { position: relative; padding: 16px 16px 14px; color: var(--ink); border-radius: 2px;
    background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(80, 110, 150, .12) 23px 24px), linear-gradient(#f1e9cf, #dccfa8); box-shadow: 0 8px 20px rgba(0, 0, 0, .55); }
.kc-brief-paper h2 { margin: 2px 0 8px; font-family: var(--stencil); font-weight: 400; font-size: 26px; line-height: 1.05; }
.kc-brief-k { font-family: var(--type); color: #6b5a36; }
.kc-brief-t { font-family: var(--type); font-size: 15px; line-height: 1.4; }
.kc-brief-stamp { position: absolute; right: 12px; top: 12px; font-family: var(--stencil); font-size: 13px; color: rgba(184, 53, 44, .8); border: 2px solid rgba(184, 53, 44, .6); padding: 1px 8px; transform: rotate(8deg); }
.kc-brief-enemy { display: flex; gap: 10px; align-items: center; padding: 8px; background: rgba(42, 36, 24, .08); border-radius: 3px; }
.kc-brief-enemy > div { display: grid; } .kc-brief-enemy small { color: #6b5a36; font-size: 12px; } .kc-brief-enemy b { font-size: 16px; }
.kc-brief-ep { width: 54px; height: 60px; display: grid; place-items: center; border-radius: 40% 40% 10% 10%; background: #2a2418; overflow: hidden; }
.kc-brief-ep img { width: 52px; height: 52px; }
.kc-brief-paper .kc-sub { color: #7a6a44; }
.kc-rules { margin: 0; padding-left: 18px; font-size: 14px; } .kc-rules li { margin: 3px 0; }
.kc-battle .kc-rules, .kc-modal .kc-rules { color: #d5ccb1; }
.kc-reward { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.kc-reward-c { cursor: pointer; }
.kc-reward-cr { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 28px; } .kc-reward-cr i { color: #1d7c8a; }
.kc-brief-paper .kc-input { color: var(--ink); background: #f7f1de; border-color: #a8986c; width: 100%; }

/* =================== battle =================== */
.kc-battle { --u: min(11.2vw, 11.2vh, 116px); --hw: min(18vw, 16vh, 152px); --hs: calc(var(--u) * 1.16);
    --tw: min(calc(100% - 16px), calc(var(--u) * 10.4));
    position: absolute; inset: 0; display: grid; grid-template-rows: calc(var(--u) * .42) auto 1fr auto calc(var(--hw) * .78); overflow: hidden; touch-action: none; }
.kc-ehand, .kc-herorow, .kc-board { position: relative; z-index: 1; min-width: 0; }
/* the containers let clicks through to the desk; their contents stay interactive */
.kc-ehand, .kc-herorow, .kc-board, .kc-brow, .kc-hand { pointer-events: none; }
.kc-herorow > *, .kc-brow > *, .kc-hand > * { pointer-events: auto; }
.kc-ehand { display: flex; justify-content: center; align-items: flex-start; overflow: visible; }
.kc-eback { width: calc(var(--u) * .62); height: calc(var(--u) * .87); margin: calc(var(--u) * -.45) calc(var(--u) * -.1) 0; border-radius: 5px; transform: rotate(calc(var(--i) * -3deg)) translateY(calc(var(--i) * var(--i) * -1px));
    background: repeating-linear-gradient(45deg, rgba(0, 0, 0, .2) 0 3px, transparent 3px 6px), radial-gradient(ellipse at 50% 40%, #50573d, #2a2e1f); box-shadow: inset 0 0 0 2px #0b0a07, inset 0 0 0 4px #8d7a45, 0 3px 6px rgba(0, 0, 0, .5); }
.kc-eback.kc-drawn { animation: kc-edraw .45s ease; }
@keyframes kc-edraw { from { transform: translate(40vw, 10vh) scale(1.5); opacity: 0; } }
.kc-herorow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; width: var(--tw); margin: 0 auto; padding: calc(var(--u) * .06) calc(var(--u) * .2); }
.kc-hr-c { display: flex; align-items: center; gap: calc(var(--u) * .22); }
.kc-hr-l { justify-self: end; margin-right: calc(var(--u) * .42); }
.kc-hr-r { justify-self: start; margin-left: calc(var(--u) * .42); }
.kc-herorow-e .kc-hr-c { align-items: flex-start; }
/* the deck: a squared pile of card backs, as high as the cards left; the count on a paper tag */
.kc-deckpile { position: relative; width: calc(var(--u) * .56); height: calc(var(--u) * .78); cursor: default; --n: 6; }
.kc-deck-stack { position: absolute; inset: 0; border-radius: 4px; transform: translate(calc(var(--n) * -1px), calc(var(--n) * -1px));
    background: repeating-linear-gradient(45deg, rgba(0, 0, 0, .2) 0 3px, transparent 3px 6px), radial-gradient(ellipse at 50% 40%, #50573d, #2a2e1f);
    box-shadow: inset 0 0 0 2px #0b0a07, inset 0 0 0 4px #8d7a45, 1px 1px 0 #0b0a07, 2px 2px 0 #cfc3a0, 3px 3px 0 #0b0a07, 4px 4px 0 #cfc3a0, 5px 5px 0 #0b0a07, 6px 6px 0 #cfc3a0, 7px 7px 0 #0b0a07, 0 9px 12px rgba(0, 0, 0, .5); }
.kc-deck-low .kc-deck-stack { box-shadow: inset 0 0 0 2px #0b0a07, inset 0 0 0 4px #8d7a45, 1px 1px 0 #0b0a07, 2px 2px 0 #cfc3a0, 3px 3px 0 #0b0a07, 0 5px 8px rgba(0, 0, 0, .5); }
.kc-deck-empty .kc-deck-stack { background: none; box-shadow: inset 0 0 0 2px rgba(60, 40, 15, .55); border: 0; transform: none; }
.kc-deckpile b { position: absolute; right: -22%; bottom: -12%; min-width: 58%; padding: 1px 5px 0; text-align: center; font-family: var(--stencil); font-weight: 400; font-size: calc(var(--u) * .22); line-height: 1.15; color: #2a2418;
    background: linear-gradient(175deg, #f6efd9, #e2d5ae); box-shadow: 0 0 0 1px rgba(40, 30, 10, .6), 1px 2px 0 rgba(0, 0, 0, .35); }
.kc-deck-low b { color: #a8231a; }
.kc-wslot { width: calc(var(--u) * .82); height: calc(var(--u) * .82); display: grid; place-items: center; }
.kc-weapon { position: relative; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 3px #0b0a07, 0 0 0 6px #9aa2a7, 0 0 0 8px #0b0a07, 0 6px 12px rgba(0, 0, 0, .5); }
.kc-weapon-art { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: #3a3f42; }
.kc-weapon-atk, .kc-weapon-dur { position: absolute; bottom: -10%; display: grid; place-items: end center; font-family: var(--stencil); font-size: calc(var(--u) * .21); color: #fff; text-shadow: 0 0 2px #000, 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000; }
.kc-weapon-atk { left: -16%; width: 34%; height: 58%; padding-bottom: 6%; }
.kc-weapon-dur { right: -16%; width: 44%; height: 40%; place-items: center; }
.kc-weapon-dur.kc-down { color: #ff9a8a; }
.kc-weapon-atk.kc-up { color: #8cff7a; } .kc-weapon-atk.kc-down { color: #ff9a8a; }
/* the commander's medallion */
.kc-hero { position: relative; width: var(--hs); height: calc(var(--hs) * 1.14); cursor: default; }
.kc-hero-p { position: absolute; inset: 7%; border-radius: 50% 50% 14% 14% / 42% 42% 14% 14%; overflow: hidden; background: #2a2a24; }
.kc-hero-frame { position: absolute; inset: 0; border-radius: 50% 50% 16% 16% / 42% 42% 16% 16%; pointer-events: none;
    background: radial-gradient(circle at 50% 3%, #f2e6bf 0 2px, #6a5020 3px 4px, transparent 5px);
    box-shadow: inset 0 0 0 3px #0b0a07, inset 0 0 0 calc(var(--hs) * .05) #c9a452, inset 0 0 0 calc(var(--hs) * .07) color-mix(in srgb, var(--cc) 70%, #222), inset 0 0 0 calc(var(--hs) * .08) #0b0a07, 0 8px 18px rgba(0, 0, 0, .6); }
.kc-hero-name { position: absolute; left: 50%; bottom: -7%; transform: translateX(-50%); padding: 1px 8px; white-space: nowrap; max-width: 160%; overflow: hidden; text-overflow: ellipsis; font-size: calc(var(--u) * .135); font-weight: 700; color: #2b1f0c;
    background: linear-gradient(#f1d88f, #c9a24e 50%, #a9843a); border-radius: 3px; box-shadow: 0 0 0 1px #0b0a07; z-index: 2; }
.kc-herorow-e .kc-hero-name { bottom: auto; top: -7%; }
.kc-hero-hp, .kc-hero-ar, .kc-hero-atk { position: absolute; display: grid; place-items: center; z-index: 3; }
.kc-hero-hp { right: -14%; bottom: -5%; width: 44%; height: 40%; padding-top: 4%; }
.kc-hero-ar { right: -12%; bottom: 33%; width: 36%; height: 34%; }
.kc-hero-atk { left: -12%; bottom: -6%; width: 26%; height: 46%; place-items: end center; padding-bottom: 6%; }
.kc-hero-hp span, .kc-hero-ar span, .kc-hero-atk span, .kc-u-atk span, .kc-u-hp span { font-family: var(--stencil); color: #fff; line-height: 1; text-shadow: 0 0 2px #000, 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000, 0 -1px 0 #000; }
.kc-hero-hp span { font-size: calc(var(--u) * .3); } .kc-hero-ar span, .kc-hero-atk span { font-size: calc(var(--u) * .22); }
.kc-hero-hp.kc-down span { color: #ffb0a0; }
.kc-hide { display: none !important; }
.kc-hero.kc-active .kc-hero-frame { box-shadow: inset 0 0 0 3px #0b0a07, inset 0 0 0 calc(var(--hs) * .05) #f0cf7e, inset 0 0 0 calc(var(--hs) * .07) color-mix(in srgb, var(--cc) 70%, #222), inset 0 0 0 calc(var(--hs) * .08) #0b0a07, 0 0 18px rgba(240, 207, 126, .45); }
.kc-hero.kc-ready { cursor: pointer; } .kc-hero.kc-ready .kc-hero-frame { box-shadow: inset 0 0 0 3px #0b0a07, inset 0 0 0 calc(var(--hs) * .05) #7dff6a, inset 0 0 0 calc(var(--hs) * .08) #0b0a07, 0 0 18px #6aff4f; }
.kc-secrets { position: absolute; left: 50%; top: 2%; transform: translateX(-50%); display: flex; gap: 2px; z-index: 3; }
.kc-secret { width: calc(var(--u) * .24); height: calc(var(--u) * .24); display: grid; place-items: center; font-size: calc(var(--u) * .16); color: #fff; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #d58cff, #6d2c99); box-shadow: 0 0 0 2px #0b0a07; animation: kc-bob 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.4s); }
.kc-power { position: relative; width: calc(var(--u) * .78); height: calc(var(--u) * .78); border: 0; padding: 0; border-radius: 50%; cursor: pointer; color: #f4eed8;
    background: radial-gradient(circle at 40% 32%, color-mix(in srgb, var(--cc) 70%, #fff), var(--cc) 55%, color-mix(in srgb, var(--cc) 50%, #000)); box-shadow: 0 0 0 3px #0b0a07, 0 0 0 6px #c9a452, 0 0 0 8px #0b0a07, 0 6px 12px rgba(0, 0, 0, .5); transition: transform .4s, filter .3s; }
.kc-power-art { position: absolute; inset: 18%; display: grid; place-items: center; } .kc-power-art .kc-insig { width: 100%; height: auto; }
.kc-power-cost { position: absolute; top: -22%; left: 50%; transform: translateX(-50%); width: 46%; height: 46%; display: grid; place-items: center; font-family: var(--stencil); font-size: calc(var(--u) * .19); color: #fff; text-shadow: 0 1px 0 #000, 0 0 2px #000; background: var(--svg-nut) center / 100% 100% no-repeat; }
.kc-power.kc-used { filter: grayscale(1) brightness(.5); transform: rotateY(180deg); }
.kc-power.kc-used .kc-power-cost { opacity: 0; }
.kc-power.kc-ready { box-shadow: 0 0 0 3px #0b0a07, 0 0 0 6px #7dff6a, 0 0 0 8px #0b0a07, 0 0 16px #6aff4f; }
.kc-power.kc-nopower { visibility: hidden; }
.kc-herorow-e .kc-power { cursor: default; }
.kc-fire { animation: kc-fire .7s ease; }
@keyframes kc-fire { 30% { filter: brightness(1.8); } }
.kc-supply { --su: var(--u); display: flex; align-items: center; gap: calc(var(--su) * .07); cursor: default; }
.kc-herorow-e .kc-supply { --su: calc(var(--u) * .8); }
.kc-sup-tag { display: flex; align-items: baseline; justify-content: center; min-width: calc(var(--su) * .62); padding: calc(var(--su) * .03) calc(var(--su) * .07) calc(var(--su) * .02); line-height: 1; color: #2a2418;
    background: linear-gradient(175deg, #f6efd9, #e2d5ae); box-shadow: 0 0 0 1px rgba(40, 30, 10, .6), 1px 2px 0 rgba(0, 0, 0, .35); }
.kc-sup-tag b { font-family: var(--stencil); font-weight: 400; font-size: calc(var(--su) * .34); color: #1d3a5c; }
.kc-sup-tag small { font-family: var(--stencil); font-size: calc(var(--su) * .2); color: #5a4a2a; }
.kc-sup-rack { display: grid; grid-template-columns: repeat(5, calc(var(--su) * .15)); gap: calc(var(--su) * .03) calc(var(--su) * .035); padding: calc(var(--su) * .05) calc(var(--su) * .07); border-radius: 3px;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 5px), linear-gradient(#7a5530, #573a1e);
    box-shadow: inset 0 0 0 2px #2a1a0c, inset 0 3px 0 2px rgba(255, 220, 170, .12), 0 4px 8px rgba(0, 0, 0, .5); }
.kc-sup-rack.kc-sup-wide { grid-template-columns: repeat(6, calc(var(--su) * .15)); }
.kc-battle[data-board="cold"] .kc-sup-rack { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 4px), linear-gradient(#5d6a3a, #3d4826); box-shadow: inset 0 0 0 2px #1a2010, inset 0 3px 0 2px rgba(220, 240, 180, .12), 0 4px 8px rgba(0, 0, 0, .5); }
.kc-sh { position: relative; width: calc(var(--su) * .15); height: calc(var(--su) * .27); border-radius: 2px 2px 1px 1px; background: radial-gradient(ellipse at 50% 88%, #0e0905 0 40%, #2a1a0c 75%); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .7); }
.kc-sh-on::after, .kc-sh-temp::after { content: ''; position: absolute; left: 4%; right: 4%; top: -6%; bottom: 0; background: var(--svg-shell) center / 100% 100% no-repeat; }
.kc-sh-spent::after { content: ''; position: absolute; left: 16%; right: 16%; top: 48%; bottom: 3%; border-radius: 1px; background: linear-gradient(90deg, #4a300c, #8a6830 40%, #5a3c10); box-shadow: inset 0 2px 0 #1a1008; opacity: .75; }
.kc-sh-temp::before { content: ''; position: absolute; left: 10%; right: 10%; top: 58%; height: 12%; z-index: 1; background: #c0392b; box-shadow: 0 0 0 1px #3a0c06; }
.kc-sh-temp { filter: drop-shadow(0 0 3px rgba(255, 200, 90, .85)); }
.kc-sh-empty { opacity: .45; }
.kc-sh-locked { background: repeating-linear-gradient(45deg, #2a1a0c 0 2px, #6b4a26 2px 4px); opacity: .7; }
.kc-sh-new::after { animation: kc-shin .45s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes kc-shin { from { transform: translateY(-70%); opacity: 0; } }
.kc-board { display: grid; grid-template-rows: 1fr auto 1fr; min-height: 0; }
.kc-brow { display: flex; justify-content: center; align-items: center; gap: calc(var(--u) * .1); min-height: calc(var(--u) * 1.38); padding: 0 calc(var(--u) * .9); }
.kc-row-e { align-items: flex-end; padding-bottom: calc(var(--u) * .12); } .kc-row-m { align-items: flex-start; padding-top: calc(var(--u) * .12); }
.kc-midline { position: relative; height: 2px; margin: 0 calc(50% - var(--tw) / 2 + var(--u) * .4); background: linear-gradient(90deg, transparent, rgba(40, 30, 10, .35), transparent); }
.kc-midline span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 0 10px; font-family: var(--type); font-size: 12px; color: rgba(40, 30, 10, .7); background: rgba(236, 228, 203, .5); border-radius: 3px; }
.kc-desk-cold .kc-midline { background: linear-gradient(90deg, transparent, rgba(40, 90, 130, .45), transparent); }
.kc-gap { width: calc(var(--u) * .9); height: calc(var(--u) * 1.2); flex: none; border-radius: 45%; border: 2px dashed rgba(90, 60, 20, .7); background: rgba(255, 245, 210, .12); }
/* units: an oval bezel round the painted art */
.kc-unit { position: relative; width: var(--u); height: calc(var(--u) * 1.24); flex: none; transition: transform .15s; }
.kc-u-in { position: absolute; inset: 0; }
.kc-u-art { position: absolute; inset: 0; border-radius: 50% / 46%; overflow: hidden; background: #2a2a24; }
.kc-u-frame { position: absolute; inset: 0; border-radius: 50% / 46%; pointer-events: none;
    box-shadow: inset 0 0 0 3px #0b0a07, inset 0 0 0 7px color-mix(in srgb, var(--cc, #8a8470) 35%, #a49c80), inset 0 0 0 9px #0b0a07, inset 0 10px 14px rgba(0, 0, 0, .25), 0 6px 12px rgba(0, 0, 0, .55); }
.kc-unit.kc-r-legendary .kc-u-frame { box-shadow: inset 0 0 0 3px #0b0a07, inset 0 0 0 7px #d8a847, inset 0 0 0 9px #0b0a07, 0 6px 12px rgba(0, 0, 0, .55); }
.kc-unit.kc-legend::before { content: ''; position: absolute; left: 22%; right: 22%; top: -9%; height: 14%; z-index: 3; clip-path: polygon(0 60%, 12% 0, 30% 40%, 50% 0, 70% 40%, 88% 0, 100% 60%, 92% 100%, 8% 100%); background: linear-gradient(#fff3c0, #e0b24a 45%, #8a5f14); }
.kc-unit.kc-f-golden .kc-u-frame { box-shadow: inset 0 0 0 3px #3d2a06, inset 0 0 0 7px #e6bd55, inset 0 0 0 9px #3d2a06, 0 6px 12px rgba(0, 0, 0, .55), 0 0 12px rgba(240, 207, 126, .55); }
.kc-unit.kc-f-diamond .kc-u-frame { box-shadow: inset 0 0 0 3px #0c2733, inset 0 0 0 7px #c9f3ff, inset 0 0 0 9px #0c2733, 0 6px 12px rgba(0, 0, 0, .55), 0 0 14px rgba(160, 240, 255, .7); }
.kc-u-atk, .kc-u-hp { position: absolute; z-index: 4; display: grid; place-items: center; }
.kc-u-atk { left: -7%; bottom: -8%; width: 30%; height: 50%; place-items: end center; padding-bottom: 8%; background: var(--svg-shell) center / 100% 100% no-repeat; }
.kc-u-hp { right: -9%; bottom: -5%; width: 42%; height: 36%; padding-top: 5%; background: var(--svg-helmet) center / 100% 100% no-repeat; }
.kc-u-atk span, .kc-u-hp span { font-size: calc(var(--u) * .26); }
.kc-u-atk.kc-up span, .kc-u-hp.kc-up span { color: #8cff7a; } .kc-u-hp.kc-down span, .kc-u-atk.kc-down span { color: #ffb0a0; }
.kc-hero-hp { background: var(--svg-helmet) center / 100% 100% no-repeat; }
.kc-hero-ar { background: var(--svg-steel) center / 100% 100% no-repeat; }
.kc-hero-atk, .kc-weapon-atk { background: var(--svg-shell) center / 100% 100% no-repeat; }
.kc-weapon-dur { background: var(--svg-steel) center / 100% 100% no-repeat; }
.kc-u-icons { position: absolute; left: 50%; bottom: -2%; transform: translateX(-50%); display: flex; gap: 1px; z-index: 5; }
.kc-u-icons > * { display: grid; place-items: center; min-width: calc(var(--u) * .2); height: calc(var(--u) * .2); padding: 0 2px; font-size: calc(var(--u) * .12); font-style: normal; color: #f0e6c8; background: #1a1914; border-radius: 50%; box-shadow: 0 0 0 1px #0b0a07; }
.kc-u-icons b { font-family: var(--stencil); font-weight: 400; border-radius: 3px; color: #ffcf7e; }
.kc-u-aura { position: absolute; inset: -6%; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 2px rgba(240, 207, 126, .35), 0 0 16px rgba(240, 207, 126, .35); animation: kc-aura 2.4s ease-in-out infinite; }
@keyframes kc-aura { 50% { opacity: .45; } }
.kc-u-ice, .kc-u-bubble, .kc-u-net, .kc-u-zz { display: none; }
.kc-unit.kc-taunt::after { content: ''; position: absolute; left: -12%; right: -12%; top: -8%; bottom: -10%; z-index: -1;
    clip-path: polygon(50% 0, 100% 10%, 100% 58%, 50% 100%, 0 58%, 0 10%);
    background: radial-gradient(circle at 12% 18%, #d7d0b8 0 3%, transparent 4%), radial-gradient(circle at 88% 18%, #d7d0b8 0 3%, transparent 4%), linear-gradient(#8e8a7a, #4d4a3f 60%, #2b2a24); }
.kc-unit.kc-shield .kc-u-bubble { display: block; position: absolute; inset: -7%; border-radius: 50%; z-index: 6; pointer-events: none;
    background: radial-gradient(ellipse at 35% 25%, rgba(255, 255, 255, .5), transparent 30%), radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(255, 220, 120, .45) 72%, rgba(255, 200, 90, .7) 80%, transparent 82%);
    box-shadow: 0 0 14px rgba(255, 210, 110, .6); animation: kc-bubble 2.2s ease-in-out infinite; }
@keyframes kc-bubble { 50% { filter: hue-rotate(-15deg) brightness(1.15); } }
.kc-pop .kc-u-bubble { display: block !important; animation: kc-pop .5s ease-out forwards !important; }
@keyframes kc-pop { to { transform: scale(1.5); opacity: 0; } }
.kc-unit.kc-stealth .kc-u-net { display: block; position: absolute; inset: 0; border-radius: 50% / 46%; z-index: 5; pointer-events: none; opacity: .75;
    background: repeating-linear-gradient(45deg, rgba(60, 80, 30, .55) 0 3px, transparent 3px 8px), repeating-linear-gradient(-45deg, rgba(90, 70, 30, .45) 0 3px, transparent 3px 8px); animation: kc-net 3s ease-in-out infinite; }
.kc-unit.kc-stealth .kc-u-art canvas { filter: brightness(.7) saturate(.5); }
@keyframes kc-net { 50% { opacity: .45; } }
.kc-pinned .kc-u-ice { display: block; position: absolute; inset: -3%; border-radius: 50% / 46%; z-index: 6; pointer-events: none;
    background: linear-gradient(125deg, transparent 30%, rgba(255, 255, 255, .5) 31%, transparent 33%), linear-gradient(40deg, transparent 55%, rgba(255, 255, 255, .45) 56%, transparent 58%), radial-gradient(ellipse at 50% 40%, rgba(200, 235, 255, .45), rgba(120, 190, 240, .65));
    box-shadow: inset 0 0 0 3px rgba(220, 245, 255, .8), 0 0 10px rgba(160, 220, 255, .7); }
.kc-hero.kc-pinned .kc-u-ice { border-radius: 50% 50% 16% 16% / 42% 42% 16% 16%; }
.kc-jammed .kc-u-art canvas { filter: grayscale(1) contrast(.8); }
.kc-jammed .kc-u-art::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .12) 0 1px, transparent 1px 3px); animation: kc-static .3s steps(2) infinite; }
.kc-jammed .kc-u-icons { opacity: .3; }
@keyframes kc-static { 50% { background-position: 0 1px; } }
.kc-sick .kc-u-zz { display: block; position: absolute; right: 2%; top: 4%; z-index: 6; cursor: default; font-family: var(--stencil); font-size: calc(var(--u) * .2); color: rgba(236, 228, 203, .9); text-shadow: 0 1px 0 #000; animation: kc-zz 2s ease-in-out infinite; }
@keyframes kc-zz { 50% { transform: translate(3px, -5px); opacity: .5; } }
.kc-unit.kc-ready { cursor: pointer; } .kc-unit.kc-ready .kc-u-frame { box-shadow: inset 0 0 0 3px #0b0a07, inset 0 0 0 7px #7dff6a, inset 0 0 0 9px #0b0a07, 0 0 16px #6aff4f; }
.kc-unit.kc-ready:hover { transform: translateY(-3px); }
/* spent (engine spentOf / canPlay): the picture dims and greys a little, as a played card in Hearthstone; the frame, stats,
   badges and keyword tips stay at full strength. Back to full brightness the moment it can act again. */
.kc-u-art, .kc-hero-p, .kc-weapon-art, .kc-hand > .kc-card .kc-cwin { transition: filter .35s ease; }
.kc-unit.kc-spent .kc-u-art, .kc-hero.kc-spent .kc-hero-p, .kc-weapon.kc-spent .kc-weapon-art { filter: brightness(.6) saturate(.45); }
.kc-hand > .kc-card.kc-unplayable .kc-cwin { filter: brightness(.6) saturate(.45); }
.kc-drop { animation: kc-drop .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes kc-drop { from { transform: translateY(-40%); opacity: 0; } 60% { opacity: 1; } }
.kc-hit { animation: kc-hit .45s ease; }
@keyframes kc-hit { 15% { transform: translate(-5px, 2px); filter: brightness(1.6) sepia(1) hue-rotate(-40deg) saturate(4); } 35% { transform: translate(5px, -2px); } 55% { transform: translate(-3px, 1px); } }
.kc-glow { animation: kc-glowp .6s ease; }
@keyframes kc-glowp { 35% { filter: brightness(1.6) drop-shadow(0 0 12px #ffd27a); } }
.kc-no { animation: kc-no .4s ease; }
@keyframes kc-no { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.kc-tgt .kc-u-frame, .kc-hero.kc-tgt .kc-hero-frame { box-shadow: inset 0 0 0 3px #0b0a07, inset 0 0 0 7px #ff9a3c, inset 0 0 0 9px #0b0a07, 0 0 14px #ff7a2a !important; }
.kc-tgt { animation: kc-tgt 1s ease-in-out infinite; }
@keyframes kc-tgt { 50% { filter: brightness(1.15); } }
.kc-tgt-on .kc-u-frame, .kc-hero.kc-tgt-on .kc-hero-frame { box-shadow: inset 0 0 0 3px #0b0a07, inset 0 0 0 7px #ff4a2a, inset 0 0 0 9px #0b0a07, 0 0 22px #ff3a1a !important; }
.kc-tgt-on { transform: translateY(-4px); }
.kc-sel { transform: translateY(-6px); z-index: 3; }
.kc-placeholder { opacity: .75; filter: saturate(.7); }
.kc-aiming .kc-unit:not(.kc-tgt):not(.kc-sel):not(.kc-placeholder), .kc-aiming .kc-hero:not(.kc-tgt) { filter: brightness(.7); }
/* hand: cards fan out; the hovered card is re-rendered larger (no scale) and lifted on whole pixels */
.kc-hand { position: relative; z-index: 4; pointer-events: none; }
.kc-hand > .kc-card { --w: var(--hw); position: absolute; left: 50%; top: 0; margin-left: calc(var(--hw) / -2); transform-origin: 50% 120%;
    transform: translate(var(--hx, 0), var(--hy, 0)) rotate(var(--hr, 0)); transition: transform .16s ease, filter .15s; cursor: pointer; }
.kc-hand > .kc-card:hover { --w: calc(var(--hw) * 1.4); margin-left: calc(var(--hw) * -.7); transform: translate(var(--hx, 0), calc(var(--hw) * -1.26)); z-index: 60 !important; transition: none; }
/* playable: a glow that follows the card's own outline (a drop-shadow, not a box-shadow: the torn order sheets are clipped,
   so a box-shadow on their plate never showed and only units and equipment ever lit up) */
.kc-hand > .kc-card.kc-playable > .kc-c3d { filter: drop-shadow(0 0 1px #6aff4f) drop-shadow(0 0 1.5px #6aff4f) drop-shadow(0 0 7px rgba(106, 255, 79, .85)); }
.kc-hand > .kc-card.kc-lifted { opacity: .2; pointer-events: none; }
.kc-drawn { animation: kc-draw .6s cubic-bezier(.2, .9, .3, 1); }
@keyframes kc-draw { from { transform: translate(45vw, -20vh) rotate(20deg); opacity: 0; } }
.kc-ghost { position: fixed !important; left: 0 !important; top: 0 !important; margin: 0 !important; z-index: 90; pointer-events: none; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .6)); }
.kc-carrying [data-hand] > .kc-card:not(.kc-lifted):hover { --w: var(--hw); margin-left: calc(var(--hw) / -2); transform: translate(var(--hx, 0), var(--hy, 0)) rotate(var(--hr, 0)); }
/* the war diary: a clipboard beside the table, one typed line per card played (hover a line for the card) */
.kc-histboard { --hbw: clamp(118px, calc((100% - var(--tw)) / 2 - 40px), 220px); position: absolute; z-index: 5; top: 50%; transform: translateY(-50%);
    left: calc(50% - var(--tw) / 2 - 22px - var(--hbw)); width: var(--hbw); padding: 16px 6px 8px; border-radius: 5px;
    background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .06), transparent 60%), linear-gradient(160deg, #6b4a2a, #4a311a); box-shadow: inset 0 0 0 1px #2a1a0c, inset 1px 1px 0 1px rgba(255, 220, 170, .15), 0 10px 18px rgba(0, 0, 0, .55); }
.kc-hb-clip { position: absolute; left: 50%; top: -7px; width: 48%; height: 22px; transform: translateX(-50%); z-index: 2; border-radius: 4px 4px 7px 7px;
    background: linear-gradient(#e8ecee, #9aa2a7 45%, #5e666b); box-shadow: inset 0 0 0 1px #2a2e30, 0 3px 4px rgba(0, 0, 0, .5); }
.kc-hb-clip::after { content: ''; position: absolute; left: 50%; top: 4px; width: 12px; height: 6px; margin-left: -6px; border-radius: 3px; background: #2a2e30; }
.kc-hb-paper { padding: 6px 6px 7px; min-height: 90px; color: #2a2418; background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(70, 100, 140, .16) 23px 24px), linear-gradient(175deg, #f6efd9, #e6d9b4);
    box-shadow: 0 0 0 1px rgba(40, 30, 10, .4), 1px 2px 0 rgba(0, 0, 0, .25); }
.kc-hb-head { display: grid; justify-items: center; padding-bottom: 4px; margin-bottom: 3px; border-bottom: 2px solid rgba(122, 29, 22, .65); line-height: 1.05; }
.kc-hb-head b { font-family: var(--stencil); font-weight: 400; font-size: clamp(10px, calc(var(--hbw) * .075), 14px); white-space: nowrap; letter-spacing: .08em; color: #7a1d16; }
.kc-hb-head small { font-family: var(--type); font-size: 10px; letter-spacing: .12em; color: #6a5a3a; }
.kc-hist { display: grid; }
.kc-hist-i { display: grid; grid-template-columns: auto 22px minmax(0, 1fr); align-items: center; gap: 5px; height: 24px; padding: 0 2px; font-family: var(--type); font-size: 12px; color: #2a2418; cursor: default; border-radius: 2px; }
.kc-hist-i:hover { background: rgba(255, 228, 150, .7); }
.kc-hist-who { font-style: normal; font-family: var(--stencil); font-size: 9px; letter-spacing: .04em; padding: 0 2px; line-height: 12px; border: 1px solid; border-radius: 2px; }
.kc-hist-i.mine .kc-hist-who { color: #1d4f8a; } .kc-hist-i.theirs .kc-hist-who { color: #a8231a; }
.kc-hist-art { position: relative; width: 22px; height: 20px; overflow: hidden; background: #e8dcb4; box-shadow: 0 0 0 1px rgba(40, 30, 10, .6); }
.kc-hist-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.kc-hist-q { display: grid; place-items: center; background: #d9b8f0; color: #4a1f66; font-size: 13px; }
.kc-hist-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-hist-i.order .kc-hist-n { font-style: italic; }
.kc-hist-new { animation: kc-histin .9s ease; }
@keyframes kc-histin { from { background: rgba(255, 210, 110, .9); } }
.kc-hb-none { display: none; font-family: var(--type); font-size: 12px; color: #8a7a52; padding: 4px 2px; }
.kc-hist-empty .kc-hb-none { display: block; } .kc-hist-empty .kc-hist { display: none; }
.kc-side-s .kc-histboard { display: none; }
/* the menu: a brass tab clipped to the table's top frame */
.kc-bmenu { position: absolute; z-index: 9; top: calc(var(--u) * .28 - 15px); right: calc(50% - var(--tw) / 2 + 12px); display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px 0 7px; border: 0; border-radius: 3px; cursor: pointer;
    font-family: var(--stencil); font-size: 13px; letter-spacing: .08em; color: #3a2a0c; background: linear-gradient(#f2dc98, #c9a24e 55%, #9a7632);
    box-shadow: inset 0 0 0 1.5px #3d2a06, inset 1px 1px 0 1.5px rgba(255, 250, 220, .45), 0 3px 6px rgba(0, 0, 0, .5); transition: filter .15s, translate .15s; }
.kc-bmenu i { font-size: 17px; line-height: 1; }
.kc-bmenu:hover, .kc-bmenu:focus-visible { filter: brightness(1.1); translate: 0 -1px; }

/* ---------- the end turn: a brass push-button mounted on the table's frame where the two halves meet ----------
   bezel with an engraved ring, a Bakelite knob with the state on it, a jewel lamp on the mounting bracket */
.kc-endturn { --s: calc(var(--u) * 1.2); --k1: #f3e2a8; --k2: #c9963a; --k3: #6d4810; --kt: #2a1a06; --lamp: #ffb43a;
    position: absolute; z-index: 8; left: calc(50% + var(--tw) / 2 + 3px); top: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
    padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.kc-endturn:disabled { cursor: default; }
.kc-et-bracket { position: absolute; left: 40%; right: -46%; top: 33%; bottom: 33%; border-radius: 4px; background: linear-gradient(#e6c87e, #b08a3a 50%, #7a5a22);
    box-shadow: inset 0 0 0 1.5px #3d2a06, inset 1px 1px 0 1.5px rgba(255, 250, 220, .35), 0 5px 8px rgba(0, 0, 0, .5); }
.kc-et-bracket i { position: absolute; right: 7%; top: 50%; width: calc(var(--s) * .08); height: calc(var(--s) * .08); margin-top: calc(var(--s) * -.04); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff4d0, #8a6a2a 70%); box-shadow: 0 0 0 1px #3d2a06; }
.kc-et-bracket i::after { content: ''; position: absolute; left: 12%; right: 12%; top: 44%; height: 14%; background: #3d2a06; transform: rotate(35deg); }
.kc-et-bracket i + i { display: none; }
.kc-et-bezel { position: absolute; inset: 0; border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, #7a5a22 0deg 4deg, #ecca76 4deg 8deg);
    box-shadow: 0 0 0 1.5px #2a1d08, 0 calc(var(--s) * .05) calc(var(--s) * .08) rgba(0, 0, 0, .55); }
.kc-et-bezel::before { content: ''; position: absolute; inset: 5%; border-radius: 50%; background: radial-gradient(circle at 40% 28%, #f8e6aa, #d0a852 45%, #9a7430 80%, #7a5a22);
    box-shadow: inset 0 0 0 1px #3d2a06, inset 0 calc(var(--s) * .02) 0 rgba(255, 250, 220, .5), inset 0 calc(var(--s) * -.02) calc(var(--s) * .03) rgba(60, 30, 0, .45); }
.kc-et-ring { position: absolute; inset: 5%; width: 90%; height: 90%; overflow: visible; pointer-events: none; }
.kc-et-ring text { font-family: 'Saira Stencil One', sans-serif; font-size: 8.4px; letter-spacing: .6px; fill: #4a3208; }
.kc-et-knob { position: absolute; inset: 22%; display: grid; place-items: center; border-radius: 50%; color: var(--kt);
    background: radial-gradient(circle at 36% 28%, #fffaf0 0 5%, var(--k1) 22%, var(--k2) 62%, var(--k3));
    box-shadow: 0 0 0 2px #2a1d08, 0 calc(var(--s) * .04) 0 2px #2a1d08, 0 calc(var(--s) * .07) calc(var(--s) * .05) rgba(0, 0, 0, .55), inset 0 calc(var(--s) * -.03) calc(var(--s) * .04) rgba(0, 0, 0, .3);
    transition: transform .12s ease, box-shadow .12s ease, filter .2s; }
.kc-et-label { display: grid; justify-items: center; line-height: .92; text-align: center; text-shadow: 0 1px 0 rgba(255, 250, 230, .45); }
.kc-et-label b { font-family: var(--stencil); font-weight: 400; font-size: calc(var(--s) * .12); letter-spacing: .03em; }
.kc-et-label small { margin-top: calc(var(--s) * .015); font-size: calc(var(--s) * .056); font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.kc-et-lamp { position: absolute; left: 112%; top: 50%; width: calc(var(--s) * .14); height: calc(var(--s) * .14); margin: calc(var(--s) * -.07) 0 0; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff6dc, var(--lamp) 45%, color-mix(in srgb, var(--lamp) 40%, #000)); box-shadow: 0 0 0 2px #2a1d08, 0 0 10px 2px color-mix(in srgb, var(--lamp) 70%, transparent); }
.kc-endturn:not(:disabled):hover .kc-et-knob, .kc-endturn:focus-visible .kc-et-knob { filter: brightness(1.08); transform: translateY(-1px); }
.kc-endturn:not(:disabled):active .kc-et-knob, .kc-endturn.kc-pulled .kc-et-knob { transform: translateY(calc(var(--s) * .035)); box-shadow: 0 0 0 2px #2a1d08, 0 calc(var(--s) * .01) 0 2px #2a1d08, inset 0 calc(var(--s) * .03) calc(var(--s) * .05) rgba(0, 0, 0, .45); }
.kc-endturn:focus-visible { outline: 2px dashed rgba(240, 207, 126, .8); outline-offset: 4px; }
/* nothing left to do: the knob lights green and breathes */
.kc-endturn.kc-done { --k1: #d8ffc8; --k2: #4fae32; --k3: #1d5a12; --kt: #0d2a06; --lamp: #6aff4f; }
.kc-endturn.kc-done .kc-et-knob { animation: kc-etglow 1.4s ease-in-out infinite; }
@keyframes kc-etglow { 50% { box-shadow: 0 0 0 2px #2a1d08, 0 calc(var(--s) * .04) 0 2px #2a1d08, 0 0 calc(var(--s) * .22) calc(var(--s) * .04) rgba(106, 255, 79, .55); } }
.kc-endturn.kc-done .kc-et-lamp { animation: kc-lampg 1.4s ease-in-out infinite; }
@keyframes kc-lampg { 50% { box-shadow: 0 0 0 2px #2a1d08, 0 0 3px 1px rgba(106, 255, 79, .4); } }
/* the enemy's turn: pressed in, oxblood, the red lamp blinks */
.kc-endturn.kc-enemy { --k1: #d07a6a; --k2: #7a1a14; --k3: #3a0a06; --kt: #f8dcd2; --lamp: #ff4a2a; }
.kc-endturn.kc-enemy .kc-et-knob { transform: translateY(calc(var(--s) * .035)); box-shadow: 0 0 0 2px #2a1d08, 0 calc(var(--s) * .01) 0 2px #2a1d08, inset 0 calc(var(--s) * .03) calc(var(--s) * .05) rgba(0, 0, 0, .45); }
.kc-endturn.kc-enemy .kc-et-label { text-shadow: 0 1px 0 rgba(0, 0, 0, .5); }
.kc-endturn.kc-enemy .kc-et-lamp { animation: kc-lampr .9s steps(2) infinite; }
@keyframes kc-lampr { 50% { filter: brightness(.55); box-shadow: 0 0 0 2px #2a1d08; } }
.kc-endturn:disabled:not(.kc-enemy) .kc-et-knob { filter: saturate(.55) brightness(.82); }
.kc-endturn.kc-pulled .kc-et-bezel { animation: kc-clunk .3s ease; }
@keyframes kc-clunk { 40% { transform: translateY(2px); } 70% { transform: translateY(-1px); } }
.kc-battle[data-board="cold"] .kc-et-bracket { background: linear-gradient(#b4bcc2, #7d868c 50%, #50585e); box-shadow: inset 0 0 0 1.5px #1a1d20, inset 1px 1px 0 1.5px rgba(255, 255, 255, .3), 0 5px 8px rgba(0, 0, 0, .5); }

/* ---------- the desks and tables ---------- */
.kc-desk { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.kc-desk-ww2 { background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0, 0, 0, .55) 100%),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 9px, rgba(255, 220, 170, .03) 9px 11px, transparent 11px 23px),
        repeating-linear-gradient(0deg, transparent 0 140px, rgba(0, 0, 0, .35) 140px 142px),
        linear-gradient(180deg, #4a3220, #3c2818 50%, #33220f); }
.kc-desk-cold { background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0, 0, 0, .6) 100%),
        linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(180deg, #30353a, #25292d 60%, #1d2023); }
.kc-tablewrap { position: absolute; left: calc(50% - var(--tw) / 2); width: var(--tw); top: calc(var(--u) * .28); bottom: calc(var(--hw) * .5); border-radius: 8px; }
.kc-tablec { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 6px; image-rendering: pixelated; }
.kc-desk-ww2 .kc-tablewrap { box-shadow: 0 0 0 3px #1c1208, 0 0 0 14px #6b4726, 0 0 0 15px #8a6038, 0 0 0 18px #2a1a0c, 0 16px 40px 18px rgba(0, 0, 0, .55), inset 0 0 30px rgba(60, 40, 10, .45);
    background: linear-gradient(#6b4726, #6b4726); }
.kc-desk-ww2 .kc-tablewrap::after { content: ''; position: absolute; inset: 0; border-radius: 6px; pointer-events: none; box-shadow: inset 0 0 26px rgba(50, 30, 5, .5); }
.kc-desk-cold .kc-tablewrap { box-shadow: 0 0 0 2px #0e1012, 0 0 0 12px #5d656b, 0 0 0 13px #8b949a, 0 0 0 15px #1a1d20, 0 0 60px 10px rgba(150, 215, 255, .18), 0 16px 40px 18px rgba(0, 0, 0, .5); }
.kc-desk-cold .kc-tableglow { position: absolute; inset: 0; border-radius: 6px; pointer-events: none; box-shadow: inset 0 0 40px rgba(255, 255, 255, .35); background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, .15), transparent 70%); }
/* the desk lamp throws a warm pool on the table corner; it flickers when your commander is in trouble */
.kc-desk-ww2 .kc-tableglow { position: absolute; right: 0; top: 0; width: 60%; height: 75%; pointer-events: none; border-radius: 0 6px 0 0;
    background: radial-gradient(ellipse 90% 90% at 100% 0%, rgba(255, 228, 160, .3), rgba(255, 220, 140, .1) 50%, transparent 85%); mix-blend-mode: screen; transition: opacity .2s; }
.kc-lamp-off .kc-tableglow { opacity: 0; }
.kc-lowhp .kc-desk-ww2:not(.kc-lamp-off) .kc-tableglow { animation: kc-flicker 2.6s steps(1) infinite; }
@keyframes kc-flicker { 0%, 12%, 30%, 100% { opacity: 1; } 10%, 28%, 55% { opacity: .25; } 57% { opacity: .8; } 60% { opacity: .1; } 62% { opacity: 1; } }
.kc-lowhp .kc-desk-cold .kc-tableglow { background: radial-gradient(ellipse at 50% 50%, rgba(255, 60, 40, .14), transparent 70%); animation: kc-alarm 1.6s ease-in-out infinite; }
@keyframes kc-alarm { 50% { opacity: .35; } }
.kc-quake .kc-desk, .kc-quake .kc-herorow, .kc-quake .kc-board { animation: kc-quake .45s ease; }
.kc-quake2 .kc-desk, .kc-quake2 .kc-herorow, .kc-quake2 .kc-board { animation: kc-quake2 .5s ease; }
@keyframes kc-quake { 20% { transform: translate(-3px, 2px); } 40% { transform: translate(3px, -2px); } 60% { transform: translate(-2px, 1px); } 80% { transform: translate(1px, 0); } }
@keyframes kc-quake2 { 15% { transform: translate(-6px, 3px); } 30% { transform: translate(6px, -4px); } 45% { transform: translate(-5px, 2px); } 60% { transform: translate(4px, -1px); } 80% { transform: translate(-2px, 1px); } }
.kc-thud { animation: kc-thud .3s ease; }
@keyframes kc-thud { 40% { transform: translateY(2px); } }
/* props: pixel art on canvases around the desk. The ones you can play with lift and glow a little on hover (and
   show a themed tooltip); plain decor (.kc-decor) takes no pointer at all. */
.kc-prop { position: absolute; z-index: 2; cursor: pointer; --ps: clamp(60px, 7.4vw, 136px); transition: translate .18s ease, filter .18s ease; outline: none; }
.kc-prop canvas { display: block; image-rendering: pixelated; }
.kc-prop:hover, .kc-prop:focus-visible { translate: 0 -3px; filter: drop-shadow(0 0 6px rgba(255, 226, 150, .4)) drop-shadow(0 5px 3px rgba(0, 0, 0, .35)); }
.kc-prop:focus-visible { outline: 2px dashed rgba(240, 207, 126, .65); outline-offset: 3px; }
.kc-decor { position: absolute; z-index: 2; pointer-events: none; --ps: clamp(60px, 7.4vw, 136px); }
.kc-decor canvas { display: block; image-rendering: pixelated; }
/* paper and stains lie under the table's edge */
.kc-tablewrap { z-index: 1; }
.kc-d-telegram, .kc-d-folder, .kc-d-printout, .kc-d-stain { z-index: 0; }
.kc-p-phone { left: 2.5%; top: 6%; } .kc-p-phone canvas { width: calc(var(--ps) * 1.3); height: calc(var(--ps) * 1); }
.kc-p-lamp { right: 2%; top: 3%; } .kc-p-lamp canvas { width: calc(var(--ps) * 1.25); height: calc(var(--ps) * 1.5); }
.kc-p-clock { right: 3%; top: calc(5% + var(--ps) * 1.55); } .kc-p-clock canvas { width: calc(var(--ps) * .75); height: calc(var(--ps) * .8); }
.kc-p-ink { left: 2.5%; bottom: 13%; } .kc-p-ink canvas { width: calc(var(--ps) * .66); height: calc(var(--ps) * .54); }
.kc-p-pencil { left: calc(2% + var(--ps) * .72); transition: transform .9s cubic-bezier(.2, .8, .3, 1); } .kc-p-pencil canvas { width: calc(var(--ps) * 1); height: calc(var(--ps) * .18); }
.kc-p-pencil.kc-pa { bottom: 15%; } .kc-p-pencil.kc-pb { bottom: 10%; }
.kc-p-pencil.kc-rolled { transform: translate(calc(var(--ps) * .3), 14px); }
.kc-p-mug { left: calc(3% + var(--ps) * .95); bottom: calc(15% + var(--ps) * .2); } .kc-p-mug canvas { width: calc(var(--ps) * .66); height: calc(var(--ps) * .66); }
.kc-steam { position: absolute; left: 40%; top: 0; width: 6px; height: 6px; background: rgba(240, 240, 235, .5); animation: kc-steam 2.6s linear infinite; pointer-events: none; }
.kc-steam.s2 { left: 28%; animation-delay: -.9s; } .kc-steam.s3 { left: 50%; animation-delay: -1.7s; }
@keyframes kc-steam { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .7; } 50% { transform: translate(-4px, -18px); } 100% { transform: translate(4px, -38px); opacity: 0; } }
.kc-p-dice { right: 3%; bottom: 7%; width: calc(var(--ps) * 1.4); height: calc(var(--ps) * .9); }
.kc-p-dice .kc-cup { position: absolute; right: 0; bottom: 0; width: calc(var(--ps) * .66); height: calc(var(--ps) * .78); }
.kc-p-dice .kc-die { position: absolute; bottom: 4%; width: calc(var(--ps) * .3); height: calc(var(--ps) * .3); transition: transform .5s cubic-bezier(.2, 1.4, .4, 1); }
.kc-p-dice .kc-d1 { left: 4%; } .kc-p-dice .kc-d2 { left: 30%; bottom: 14%; }
.kc-rattle .kc-cup { animation: kc-rattle .7s linear; }
.kc-rattle .kc-die { transform: translate(8px, -14px); }
@keyframes kc-rattle { 10%, 30%, 50%, 70% { transform: rotate(-12deg) translateX(-3px); } 20%, 40%, 60%, 80% { transform: rotate(10deg) translateX(3px); } }
.kc-p-pin { left: calc(50% - var(--tw) / 2 + 18px); top: calc(var(--u) * .28 + 10px); cursor: pointer; } .kc-p-pin canvas { width: calc(var(--ps) * .28); height: calc(var(--ps) * .5); }
.kc-p-pin.kc-lifted { cursor: pointer; filter: drop-shadow(4px 8px 3px rgba(0, 0, 0, .45)); transform: translateY(-6px); }
.kc-ringtag { position: absolute; left: 50%; top: -8px; transform: translateX(-50%); padding: 1px 6px; font-family: var(--stencil); font-size: 12px; color: #fff; background: #b8352c; border-radius: 3px; opacity: 0; pointer-events: none; white-space: nowrap; }
.kc-ringing { animation: kc-ring 1.3s linear; }
.kc-ringing .kc-ringtag { animation: kc-ringtag 1.3s ease; }
@keyframes kc-ring { 5%, 15%, 25%, 35%, 55%, 65%, 75% { transform: rotate(-4deg) translateY(-2px); } 10%, 20%, 30%, 60%, 70%, 80% { transform: rotate(4deg) translateY(-2px); } 40%, 50%, 85%, 100% { transform: none; } }
@keyframes kc-ringtag { 10%, 80% { opacity: 1; transform: translate(-50%, -8px); } }
.kc-wobble { animation: kc-wobble .5s ease; }
@keyframes kc-wobble { 25% { transform: rotate(-6deg); } 50% { transform: rotate(4deg); } 75% { transform: rotate(-2deg); } }
/* decor around the war-years table: field glasses, a compass, an ashtray with a smouldering cigarette, a telegram and a
   file under the table's edge, coffee rings */
.kc-d-binoculars { right: 3%; top: 55%; } .kc-d-binoculars canvas { width: calc(var(--ps) * 1.1); height: calc(var(--ps) * .7); }
.kc-d-compass { right: calc(5% + var(--ps) * .95); top: calc(55% + var(--ps) * .5); } .kc-d-compass canvas { width: calc(var(--ps) * .72); height: calc(var(--ps) * .66); }
.kc-d-ashtray { right: calc(4% + var(--ps) * .2); bottom: calc(9% + var(--ps) * .95); } .kc-d-ashtray canvas { width: calc(var(--ps) * .9); height: calc(var(--ps) * .42); }
.kc-smoke { position: absolute; right: 2%; top: 4%; width: 4px; height: 4px; background: rgba(220, 220, 215, .45); animation: kc-smoke 3.4s linear infinite; }
.kc-smoke.s2 { animation-delay: -1.1s; } .kc-smoke.s3 { animation-delay: -2.3s; }
@keyframes kc-smoke { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: .7; } 45% { transform: translate(-5px, -20px); } 100% { transform: translate(3px, -46px) scale(2); opacity: 0; } }
.kc-d-telegram { left: calc(50% - var(--tw) / 2 - 92px); top: calc(var(--u) * .28 + 22%); width: 150px; height: 96px; transform: rotate(-7deg); padding: 8px 10px; background: linear-gradient(175deg, #efe6c9, #ddd0a8); box-shadow: 0 3px 6px rgba(0, 0, 0, .45); }
.kc-d-telegram b { display: block; font-family: var(--stencil); font-weight: 400; font-size: 13px; letter-spacing: .14em; color: #7a1d16; border-bottom: 2px solid #7a1d16; }
.kc-d-telegram i { display: block; margin-top: 7px; height: 48px; background: repeating-linear-gradient(0deg, transparent 0 8px, rgba(40, 30, 10, .55) 8px 10px); -webkit-mask: linear-gradient(90deg, #000 70%, transparent 70% 74%, #000 74%); mask: linear-gradient(90deg, #000 70%, transparent 70% 74%, #000 74%); opacity: .7; }
.kc-d-folder { left: calc(50% + var(--tw) / 2 - 70px); bottom: 2%; width: 190px; height: 120px; transform: rotate(5deg); padding: 12px 16px; border-radius: 3px 10px 3px 3px; background: linear-gradient(170deg, #d9b979, #b8955a); box-shadow: inset 0 0 0 1px rgba(80, 55, 20, .5), 0 4px 8px rgba(0, 0, 0, .5); }
.kc-d-folder b { display: inline-block; padding: 1px 8px; font-family: var(--stencil); font-weight: 400; font-size: 16px; letter-spacing: .12em; color: rgba(168, 35, 26, .85); border: 2px solid rgba(168, 35, 26, .75); transform: rotate(-6deg); }
.kc-d-folder small { display: block; margin-top: 8px; font-family: var(--type); font-size: 11px; color: #4a3814; }
.kc-d-stain { left: 3%; top: 44%; width: 74px; height: 70px; border-radius: 50%; box-shadow: inset 0 0 0 4px rgba(60, 30, 10, .28), inset 0 0 0 9px rgba(60, 30, 10, .07); }
.kc-d-stain.s2 { left: auto; right: 6%; top: auto; bottom: 30%; width: 58px; height: 55px; opacity: .7; }
.kc-tstain { position: absolute; right: 6%; bottom: 9%; width: 9%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; box-shadow: inset 0 0 0 3px rgba(90, 55, 20, .2), inset 0 0 0 7px rgba(90, 55, 20, .05); }
/* Cold War decor: a headset, grease pencils on the frame, an ashtray, a fanfold printout and a classified folder */
.kc-desk-cold .kc-d-headset { right: 3%; top: 60%; } .kc-d-headset canvas { width: calc(var(--ps) * 1.05); height: calc(var(--ps) * .72); }
.kc-desk-cold .kc-d-ashtray { right: auto; left: calc(3% + var(--ps) * 1.25); bottom: calc(10% + var(--ps) * .25); }
.kc-d-greasepen { left: calc(50% - var(--tw) / 2 + 26px); top: calc(var(--u) * .28 - 9px); z-index: 3; } .kc-d-greasepen canvas { width: calc(var(--ps) * .8); height: calc(var(--ps) * .14); }
.kc-d-greasepen.g2 { left: calc(50% - var(--tw) / 2 + 26px + var(--ps) * .7); top: calc(var(--u) * .28 - 4px); }
.kc-d-printout { left: calc(50% + var(--tw) / 2 - 60px); top: 30%; width: 120px; height: 46%; transform: rotate(4deg);
    background: repeating-linear-gradient(0deg, rgba(120, 180, 130, .35) 0 14px, transparent 14px 28px), linear-gradient(90deg, #e9ecef 0 10px, transparent 10px calc(100% - 10px), #e9ecef calc(100% - 10px)), #f4f6f7;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .5); }
.kc-d-printout i { position: absolute; left: 2px; right: 2px; top: 0; bottom: 0; background: radial-gradient(circle, #c9ced2 0 2px, transparent 2.5px) 0 0 / 100% 14px, radial-gradient(circle, #c9ced2 0 2px, transparent 2.5px) 100% 0 / 100% 14px;
    background-repeat: repeat-y; -webkit-mask: linear-gradient(90deg, #000 8px, transparent 8px calc(100% - 8px), #000 calc(100% - 8px)); mask: linear-gradient(90deg, #000 8px, transparent 8px calc(100% - 8px), #000 calc(100% - 8px)); }
.kc-desk-cold .kc-d-folder { left: calc(50% - var(--tw) / 2 - 96px); right: auto; top: 18%; bottom: auto; transform: rotate(-6deg); background: linear-gradient(170deg, #e8d27a, #c9b04e); }
.kc-desk-cold .kc-d-stain { left: auto; right: 5%; top: 70%; box-shadow: inset 0 0 0 4px rgba(200, 180, 140, .12), inset 0 0 0 9px rgba(200, 180, 140, .04); }
.kc-desk-cold .kc-d-stain.s2 { right: auto; left: 4%; top: 72%; bottom: auto; }
.kc-desk-cold .kc-tstain { box-shadow: inset 0 0 0 3px rgba(60, 50, 30, .16), inset 0 0 0 7px rgba(60, 50, 30, .04); }
/* Cold War props: a CRT with scrolling text, a radar repeater, the red telephone, a chattering teleprinter */
.kc-p-crt { left: 1.5%; top: 5%; }
.kc-crt { position: relative; width: calc(var(--ps) * 1.5); height: calc(var(--ps) * 1.2); padding: 9% 9% 18%; border-radius: 10px; background: linear-gradient(160deg, #8a8e86, #5d615b 60%, #45483f); box-shadow: inset 0 0 0 2px #1a1c18, inset 2px 2px 0 2px rgba(255, 255, 255, .15), 0 10px 18px rgba(0, 0, 0, .5); }
.kc-crt-scr { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 12px / 16px; background: radial-gradient(ellipse at 50% 40%, #12301c, #06130a 75%); box-shadow: inset 0 0 0 3px #111, inset 0 0 16px rgba(0, 0, 0, .8); }
.kc-crt-scr::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .25) 0 1px, transparent 1px 3px); pointer-events: none; }
.kc-crt-txt { position: absolute; left: 7%; right: 5%; bottom: 8%; font-family: var(--mono); font-size: calc(var(--ps) * .105); line-height: 1.05; color: #5cff8a; text-shadow: 0 0 4px rgba(92, 255, 138, .7); white-space: nowrap; overflow: hidden; }
.kc-crt-txt div:last-child::after { content: '_'; animation: kc-blink 1s steps(1) infinite; }
@keyframes kc-blink { 50% { opacity: 0; } }
.kc-crt-led { position: absolute; right: 10%; bottom: 6%; width: 6px; height: 6px; border-radius: 50%; background: #6aff4f; box-shadow: 0 0 6px #6aff4f; animation: kc-blink 1.6s steps(1) infinite; }
.kc-crt-brand { position: absolute; left: 10%; bottom: 5%; font-size: 8px; font-weight: 800; letter-spacing: .2em; color: #2a2c28; }
.kc-lowhp .kc-crt-scr { animation: kc-crtflick 1.8s steps(1) infinite; }
@keyframes kc-crtflick { 0%, 100% { filter: none; } 40% { filter: brightness(1.6) hue-rotate(-90deg); } 44% { filter: none; } 70% { filter: brightness(.6); } 72% { filter: none; } }
.kc-p-radar { right: 2%; top: 4%; }
.kc-radar { width: calc(var(--ps) * 1.15); height: calc(var(--ps) * 1.15); padding: 8%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #7b8278, #3d4139 70%); box-shadow: inset 0 0 0 2px #111, 0 10px 18px rgba(0, 0, 0, .5); }
.kc-radarc { width: 100%; height: 100%; display: block; border-radius: 50%; image-rendering: pixelated; }
.kc-p-redphone { left: 2%; bottom: 10%; } .kc-p-redphone canvas { width: calc(var(--ps) * 1.2); height: calc(var(--ps) * .92); }
.kc-p-tty { right: 2%; bottom: 7%; } .kc-p-tty canvas { width: calc(var(--ps) * 1.4); height: calc(var(--ps) * .98); }
.kc-tty-paper { position: absolute; left: 30%; right: 30%; bottom: 96%; min-height: 12px; max-height: calc(var(--ps) * .9); overflow: hidden; padding: 3px 4px; background: #ece6d2; box-shadow: 0 2px 4px rgba(0, 0, 0, .4); font-family: var(--mono); font-size: calc(var(--ps) * .085); line-height: 1.05; color: #2a2418; display: flex; flex-direction: column; justify-content: flex-end; }
.kc-tty-paper div { overflow-wrap: anywhere; }
.kc-chatter canvas { animation: kc-chatter .12s steps(2) infinite; }
@keyframes kc-chatter { 50% { transform: translateY(1px); } }
/* fx */
.kc-fx { position: fixed !important; inset: 0; pointer-events: none; z-index: 30 !important; }
.kc-float { position: fixed; transform: translate(-50%, -50%); z-index: 3; font-family: var(--stencil); font-size: calc(var(--u) * .38); color: #fff; animation: kc-float 1.3s ease-out forwards; white-space: nowrap; }
.kc-float span { display: block; padding: 0 8px; text-shadow: 0 2px 0 #000, 0 0 6px #000; }
.kc-float.dmg { color: #ff5a44; } .kc-float.heal { color: #8cff7a; } .kc-float.armor { color: #cfe3ee; font-size: calc(var(--u) * .24); } .kc-float.buff { color: #ffd27a; font-size: calc(var(--u) * .26); }
.kc-float.ice { color: #a8e4ff; font-size: calc(var(--u) * .24); } .kc-float.jam { color: #d9a8ff; font-size: calc(var(--u) * .22); }
.kc-float.dmg span { background: radial-gradient(ellipse, rgba(120, 10, 0, .75), transparent 70%); }
@keyframes kc-float { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } 15% { transform: translate(-50%, -60%) scale(1.2); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -160%) scale(1); opacity: 0; } }
.kc-shell { position: fixed; width: 22px; height: 9px; border-radius: 50%; background: radial-gradient(ellipse at 70% 50%, #fff6c8, #ffb040 50%, #c84010); box-shadow: 0 0 12px #ffb040, -14px 0 10px -2px rgba(255, 160, 60, .6), -28px 0 14px -4px rgba(255, 120, 40, .35); }
.kc-shell.heavy { width: 32px; height: 13px; }
.kc-boom { position: fixed; width: 10px; height: 10px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #fff6c8 0%, #ffb040 30%, rgba(200, 60, 20, .8) 55%, transparent 70%); animation: kc-boom .55s ease-out forwards; }
.kc-boom.big { animation-duration: .7s; --u: 150px; }
@keyframes kc-boom { from { width: 10px; height: 10px; opacity: 1; } to { width: calc(var(--u, 90px) * 1.3); height: calc(var(--u, 90px) * 1.3); opacity: 0; } }
.kc-shard { position: fixed; width: 8px; height: 8px; background: #a09478; box-shadow: 0 0 0 1px #0b0a07; animation: kc-shard .75s ease-out forwards; }
@keyframes kc-shard { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
.kc-dying { animation: kc-dying .6s ease-in forwards !important; z-index: 2; }
@keyframes kc-dying { 30% { filter: brightness(2.2) sepia(1) hue-rotate(-30deg); } 100% { filter: brightness(.4) blur(4px); transform: translateY(12px) rotate(8deg); opacity: 0; } }
.kc-banner { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 20; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.kc-banner.on { animation: kc-banner 1.1s ease forwards; }
.kc-banner span { padding: 8px 60px; font-family: var(--stencil); font-size: calc(var(--u) * .55); letter-spacing: .08em; color: var(--gold2); text-shadow: 0 3px 0 #000;
    background: linear-gradient(90deg, transparent, rgba(15, 14, 11, .88) 20%, rgba(15, 14, 11, .88) 80%, transparent); }
.kc-banner.theirs span { color: #ff8a7a; font-size: calc(var(--u) * .38); }
@keyframes kc-banner { 0% { opacity: 0; } 18% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
.kc-played { position: fixed; left: 13%; top: 45%; transform: translateY(-50%); z-index: 4; animation: kc-played .35s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .3s; }
.kc-played.out { opacity: 0; }
.kc-played-l { position: absolute; z-index: 20; left: 50%; bottom: -14px; transform: translateX(-50%) rotate(-6deg); padding: 3px 14px; font-family: var(--stencil); font-size: 22px; color: #fff; background: #6d2c99; box-shadow: 0 3px 0 #000; white-space: nowrap; }
/* a card burned from a full hand: held still to be read, then it chars and crumbles (cards-ui.js burnShow); a click skips */
.kc-burnshow { pointer-events: auto; --kc-mc: click; }
.kc-burnshow > .kc-played-l { bottom: auto; top: calc(100% + 6px); }   /* under the card, so its stats stay readable */
.kc-burnshow > .kc-card { border-radius: .8em; box-shadow: 0 0 0 2px #6d2c99, 0 0 22px rgba(160, 80, 220, .55); }
.kc-burnshow.kc-burning > .kc-card { animation: kc-burn var(--bt, 900ms) ease-in forwards; }
.kc-burnshow.kc-burning > .kc-card::after { content: ''; position: absolute; inset: 0; z-index: 30; pointer-events: none; border-radius: inherit;
    background: linear-gradient(0deg, rgba(255, 120, 20, .85), rgba(255, 60, 0, .5) 35%, transparent 70%); background-size: 100% 300%; background-position: 0 0; animation: kc-burn-fire var(--bt, 900ms) ease-in forwards; }
.kc-burnshow.kc-burning > .kc-played-l { animation: kc-burn-lab var(--bt, 900ms) ease-in forwards; }
@keyframes kc-burn { 0% { filter: none; } 50% { filter: sepia(1) saturate(2.6) brightness(1.25); opacity: 1; transform: none; } 100% { filter: sepia(1) brightness(.15); opacity: 0; transform: translateY(-14px) scale(.94) rotate(-2deg); } }
@keyframes kc-burn-fire { from { background-position: 0 -100%; opacity: .2; } 60% { opacity: 1; } to { background-position: 0 100%; opacity: 0; } }
@keyframes kc-burn-lab { 70% { opacity: 1; } to { opacity: 0; } }
@keyframes kc-played { from { transform: translate(-40px, -50%); opacity: 0; } }
.kc-arrow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 95 !important; opacity: 0; }
.kc-arrow.on { opacity: 1; }
.kc-arrow-p { fill: none; stroke: #f0cf7e; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 2 16; animation: kc-dash .5s linear infinite; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .6)); }
.kc-arrow marker path { fill: #f0cf7e; }
.kc-arrow-r { fill: none; stroke: #f0cf7e; stroke-width: 3; opacity: .7; }
.kc-arrow.lock .kc-arrow-p { stroke: #ff5a3a; } .kc-arrow.lock marker path { fill: #ff5a3a; } .kc-arrow.lock .kc-arrow-r { stroke: #ff5a3a; opacity: 1; }
@keyframes kc-dash { to { stroke-dashoffset: -18; } }
/* overlays inside the battle */
.kc-bover { position: absolute; inset: 0; z-index: 40; display: none; }
.kc-bover.on { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 16px; background: rgba(5, 5, 3, .8); animation: kc-in .2s ease; }
.kc-bover.peek { background: transparent; } .kc-bover.peek > *:not([data-bt]) { opacity: 0; pointer-events: none; }
.kc-mull-h { text-align: center; }
.kc-mull-h h2 { margin: 0; font-family: var(--stencil); font-weight: 400; font-size: 38px; color: var(--gold); }
.kc-mull-h p { margin: 6px 0 0; color: #d5ccb1; }
.kc-mull-cards { display: flex; gap: clamp(8px, 2vw, 24px); justify-content: center; flex-wrap: wrap; }
.kc-mull-c, .kc-disc-c { position: relative; cursor: pointer; animation: kc-flyin .5s ease backwards; animation-delay: var(--d); transition: transform .15s; }
.kc-mull-c:hover, .kc-disc-c:hover { transform: translateY(-8px); }
.kc-mull-x { position: absolute; inset: 0; display: none; place-items: center; font-size: 90px; color: #ff4a3a; text-shadow: 0 4px 0 #000; }
.kc-mull-c.out .kc-mull-x { display: grid; } .kc-mull-c.out .kc-c3d { filter: grayscale(.7) brightness(.55); }
.kc-result-h { text-align: center; }
.kc-result-h h1 { margin: 0; font-family: var(--stencil); font-weight: 400; font-size: clamp(56px, 11vw, 120px); letter-spacing: .08em; line-height: 1; animation: kc-played .5s cubic-bezier(.2, 1.4, .4, 1); }
.kc-result.win h1 { color: var(--gold2); text-shadow: 0 5px 0 #000, 0 0 40px rgba(240, 207, 126, .6); }
.kc-result.loss h1 { color: #e0584c; text-shadow: 0 5px 0 #000; } .kc-result.draw h1 { color: #cfc6ab; text-shadow: 0 5px 0 #000; }
.kc-result-h p { font-family: var(--type); color: #d5ccb1; font-size: 18px; margin: 8px 0 0; }
.kc-result.win::before { content: ''; position: absolute; left: 50%; top: 30%; width: 120vmax; height: 120vmax; transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
    background: repeating-conic-gradient(from 0deg, rgba(240, 207, 126, .1) 0 6deg, transparent 6deg 20deg); -webkit-mask: radial-gradient(circle, #000 5%, transparent 50%); mask: radial-gradient(circle, #000 5%, transparent 50%); animation: kc-spin 30s linear infinite; }
.kc-rewards { display: grid; gap: 8px; width: min(520px, 100%); padding: 14px 16px; background: rgba(27, 26, 21, .94); border: 1px solid #45422f; border-radius: 4px; }
.kc-rw { display: flex; gap: 8px; align-items: center; font-size: 16px; animation: kc-loot .4s ease backwards; }
.kc-rw > i { width: 22px; text-align: center; font-size: 20px; color: var(--gold); } .kc-rw b { font-family: var(--mono); font-size: 22px; font-weight: 400; color: var(--gold2); }
.kc-rw-cards { display: flex; gap: 10px; justify-content: center; padding-top: 6px; flex-wrap: wrap; }
.kc-rw-xp { display: grid; gap: 4px; }
.kc-rw-xp .kc-bar { margin: 0; }
.kc-recruit { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 4px; background: linear-gradient(90deg, rgba(212, 176, 100, .2), transparent); }
.kc-recruit-p { width: 72px; height: 84px; flex: none; border-radius: 45% 45% 10% 10%; overflow: hidden; box-shadow: 0 0 0 3px #0b0a07, 0 0 0 5px #c9a452; }
.kc-recruit b { display: block; font-family: var(--stencil); font-weight: 400; font-size: 20px; color: var(--gold2); }
.kc-menu-list { display: grid; gap: 10px; }

/* =================== responsive =================== */
@media (max-width: 900px) {
    .kc-colwrap, .kc-campaign, .kc-arena-draft { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
    .kc-deckside, .kc-brief, .kc-arena-side { border-left: 0; border-top: 1px solid #36342a; max-height: 42vh; }
    .kc-packs { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .kc-packshelf { grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); overflow-x: auto; border-right: 0; border-bottom: 1px solid #36342a; }
    .kc-insp-wrap { flex-direction: column; gap: 10px; overflow-y: auto; }
    .kc-insp-info { max-height: none; width: 100%; }
    .kc-top-title span { display: none; }
}
@media (max-width: 600px) {
    .kw-top-actions { flex-wrap: wrap; row-gap: 6px; justify-content: flex-end; }   /* room for the card game's header button */
    .kc-deckside, .kc-brief, .kc-arena-side { max-height: 36vh; }
    .kc-flipwrap { gap: 34px 10px; }
    .kc-showcase { grid-template-columns: 1fr; }
    .kc-fan { height: 170px; } .kc-fan-c { margin-left: -55px; transform: translateX(calc(var(--k) * 52px)) rotate(calc(var(--k) * 6deg)); } .kc-fan-c .kc-card { --w: 110px !important; }
    .kc-pin span { font-size: 11px; }
    .kc-top { gap: 6px; padding: 6px 8px; }
    .kc-top-title b { font-size: 19px; }
    .kc-cur-i { padding: 2px 7px 2px 6px; font-size: 18px; }
    .kc-cur-pk { display: none; }
    .kc-iconbtn { width: 34px; height: 34px; }
    .kc-hub-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .kc-tile { min-height: 70px; padding: 10px; gap: 8px; flex-direction: column; align-items: flex-start; }
    .kc-tile-big { grid-row: auto; min-height: 110px; }
    .kc-tile-ico, .kc-tile-big .kc-tile-ico { width: 40px; height: 40px; font-size: 22px; }
    .kc-tile-t b { font-size: 18px; }
    .kc-hub-heroes > span { width: 36px; height: 42px; } .kc-hub-heroes img { width: 34px; height: 34px; }
    .kc-grid { --gw: 104px; gap: 26px 8px; padding: 10px 8px 30px; }
    .kc-clstab span { display: none; } .kc-clstab { padding: 0 9px; }
    .kc-filters { grid-template-columns: 1fr 1fr; } .kc-search { grid-column: 1 / -1; } .kc-costs { grid-column: 1 / -1; flex-wrap: wrap; height: auto; } .kc-count { grid-column: 1 / -1; justify-self: start; line-height: 1; }
    .kc-histboard { display: none; }
    .kc-battle { --u: min(12.4vw, 10vh, 104px); --hw: min(19vw, 15vh, 148px); }
    .kc-herorow { padding: calc(var(--u) * .04) 2px; }
    .kc-hr-l { margin-right: calc(var(--u) * .16); } .kc-hr-r { margin-left: calc(var(--u) * .16); }
    .kc-bmenu { top: 3px; right: 12px; height: 26px; padding: 0 7px; } .kc-bmenu span { display: none; }
    .kc-brow { padding: 0 4px; gap: 3px; }
    /* on a phone the table fills the width: the button sits inside its right edge, low in your half where no unit stands */
    .kc-endturn { --s: calc(var(--u) * 1.2); left: calc(50% + var(--tw) / 2 - var(--s) * .5 - 6px); top: auto; bottom: calc(var(--s) * .5 + 2px); }
    .kc-et-bracket, .kc-et-lamp { display: none; }
    .kc-played { left: 50%; top: 40%; transform: translate(-50%, -50%); }
    .kc-camps { grid-template-columns: 1fr; }
    .kc-shop-grid { grid-template-columns: 1fr; }
    .kc-quest { flex-wrap: wrap; } .kc-quest-stamp { width: 54px; height: 54px; font-size: 12px; }
}
@media (max-width: 440px) { .kc-top-title b { font-size: 16px; letter-spacing: .03em; } .kc-top-spade { display: none; } .kc-cur-i { font-size: 16px; padding: 2px 6px 2px 5px; } }
/* the side props and decor fit by how much desk shows beside the table (sideRoom() in cards-ui.js) */
.kc-side-m .kc-d-compass, .kc-side-m .kc-d-telegram, .kc-side-m .kc-d-stain, .kc-side-m .kc-p-ink, .kc-side-m .kc-p-pencil, .kc-side-m .kc-d-ashtray { display: none; }
.kc-side-s .kc-decor, .kc-side-s .kc-p-clock, .kc-side-s .kc-p-mug, .kc-side-s .kc-p-pencil, .kc-side-s .kc-p-ink { display: none; }
.kc-side-s .kc-d-greasepen { display: block; }
@media (max-width: 820px) { .kc-prop, .kc-decor { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .kc-bg-map, .kc-bg-sweep, .kc-drift, .kc-f-golden .kc-cfoil, .kc-f-diamond .kc-cfoil, .kc-tilt.kc-idle { animation: none !important; }
}

/* =================== portraits (pixel-art commanders on canvases) =================== */
.kc-portrait { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.kc-portrait.kc-ptr-down { filter: grayscale(.8) brightness(.72); transition: filter .5s; }   /* a beaten commander (cards-portraits.js mood down) */
.kc-deckhero .kc-portrait { width: 56px; height: 64px; }

/* =================== service rank, commanders, onboarding =================== */
.kc-hub-heroes > span { position: relative; }
.kc-hub-heroes .kc-portrait { width: 100%; height: 100%; border-radius: inherit; }
.kc-hub-heroes span.kc-locked .kc-portrait { filter: grayscale(1) brightness(.45); }
.kc-hub-heroes span > .bi-lock-fill { position: absolute; left: 3px; bottom: 2px; font-size: 12px; color: var(--gold); text-shadow: 0 1px 0 #000; }
.kc-rank { display: grid; grid-template-columns: auto 190px; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 0; border-radius: 4px; cursor: pointer; color: var(--paper); text-align: left;
    background: linear-gradient(rgba(43, 42, 33, .92), rgba(27, 26, 21, .92)); box-shadow: inset 0 0 0 1px #45422f; }
.kc-rank:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.kc-rank-n { width: 56px; height: 56px; display: grid; place-content: center; text-align: center; border-radius: 50%; line-height: 1; color: #2b1f0c;
    background: radial-gradient(circle at 40% 32%, #fff0b8, #d4a53a 60%, #7a5510); box-shadow: 0 0 0 2px #0b0a07, 0 0 0 4px #8d7a45; }
.kc-rank-n small { font-size: 8px; font-weight: 800; letter-spacing: .14em; } .kc-rank-n b { font-family: var(--stencil); font-weight: 400; font-size: 26px; }
.kc-rank-t { display: grid; gap: 3px; font-size: 13px; } .kc-rank-t > span:first-child { font-family: var(--mono); font-size: 17px; color: var(--gold2); line-height: 1; }
.kc-rank-t .kc-bar { height: 8px; margin: 0; } .kc-rank-t small { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-levels-page { position: absolute; inset: 0; padding: 18px; display: grid; gap: 14px; align-content: start; max-width: 1180px; margin: 0 auto; }
.kc-rank-head { display: flex; gap: 20px; align-items: center; }
.kc-rank-big { width: 110px; height: 110px; flex: none; display: grid; place-content: center; text-align: center; line-height: 1; border-radius: 50%; color: #2b1f0c;
    background: radial-gradient(circle at 40% 32%, #fff0b8, #d4a53a 60%, #7a5510); box-shadow: 0 0 0 3px #0b0a07, 0 0 0 7px #8d7a45, 0 0 0 9px #0b0a07; }
.kc-rank-big small { font-size: 11px; font-weight: 800; letter-spacing: .16em; } .kc-rank-big b { font-family: var(--stencil); font-weight: 400; font-size: 52px; } .kc-rank-big span { font-size: 12px; font-weight: 700; }
.kc-rank-body { flex: 1; min-width: 0; } .kc-rank-body .kc-bar { height: 20px; } .kc-rank-body .kc-bar span { line-height: 20px; font-size: 17px; }
.kc-lvlgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.kc-lvl { position: relative; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 6px; min-height: 206px; padding: 8px 6px 10px; border-radius: 4px; background: #15140f; box-shadow: inset 0 0 0 1px #36342a; text-align: center; }
.kc-lvl small { font-size: 12px; line-height: 1.2; color: #cfc6ab; }
.kc-lvl-n { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-family: var(--stencil); font-size: 15px; background: #26251e; box-shadow: 0 0 0 1px #5a5640; }
.kc-lvl-art { display: grid; place-items: center; min-height: 146px; }
.kc-lvl.got { background: linear-gradient(#1d2415, #15140f); } .kc-lvl.got .kc-lvl-n { color: #2b1f0c; background: radial-gradient(circle at 40% 32%, #fff0b8, #d4a53a 60%, #7a5510); }
.kc-lvl.next { box-shadow: inset 0 0 0 2px var(--gold); }
.kc-lvl-ok { position: absolute; right: 7px; top: 7px; color: var(--green); font-size: 18px; }
.kc-lvl-cr { display: grid; justify-items: center; } .kc-lvl-cr i { font-size: 44px; color: var(--cr); } .kc-lvl-cr b { font-family: var(--mono); font-size: 28px; font-weight: 400; }
.kc-pack.kc-pack-sm { --pw: 92px; }
.kc-herotile { position: relative; color: var(--paper); }
.kc-herotile > b { display: inline-flex; align-items: center; gap: 6px; } .kc-herotile > b .kc-insig { width: 20px; height: 18px; color: color-mix(in srgb, var(--cc) 50%, #fff); }
.kc-herotile .kc-portrait { width: 92px; height: 104px; }
.kc-herotile.kc-locked .kc-portrait { filter: grayscale(1) brightness(.5); }
.kc-herotile-p { position: relative; } .kc-herotile-p > .bi-lock-fill { position: absolute; right: 8px; bottom: 6px; font-size: 18px; color: var(--gold); text-shadow: 0 1px 0 #000; }
.kc-locknote { color: var(--gold2) !important; }
.kc-opp { position: relative; color: var(--paper); }
.kc-opp-tag { position: absolute; top: 6px; right: 6px; padding: 1px 6px; font-style: normal; font-family: var(--stencil); font-size: 11px; color: #2b1f0c; background: var(--gold2); border-radius: 3px; }
.kc-challenge .kc-portrait { filter: grayscale(.7) brightness(.75); }
.kc-challenge[aria-pressed="true"] .kc-portrait { filter: none; }
.kc-challenge-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 3px; background: rgba(212, 176, 100, .1); border-left: 3px solid var(--gold); color: #ddd3b8; }
.kc-challenge-note i { color: var(--gold); }
.kc-setrow { display: flex; align-items: center; gap: 10px; margin: 8px 0; } .kc-setrow .kc-input { flex: 1; max-width: 360px; }
.kc-onboard { position: absolute; inset: 0; padding: clamp(16px, 4vh, 40px) clamp(14px, 4vw, 48px); display: grid; gap: 20px; align-content: start; justify-items: center; }
.kc-onb-head { max-width: 860px; text-align: center; }
.kc-onb-head h1 { margin: 0 0 8px; font-family: var(--stencil); font-weight: 400; font-size: clamp(32px, 4.6vw, 58px); color: var(--gold); text-shadow: 0 3px 0 #000; }
.kc-onb-head p { margin: 0; font-size: 17px; color: #ddd3b8; }
.kc-onb-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 300px)); gap: 18px; width: 100%; justify-content: center; }
.kc-onb { display: grid; justify-items: center; gap: 6px; padding: 18px 14px 14px; border: 0; border-radius: 6px; cursor: pointer; color: var(--paper); text-align: center;
    background: linear-gradient(color-mix(in srgb, var(--cc) 30%, #26251e), #15140f 70%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 60%, #45422f), 0 10px 24px rgba(0, 0, 0, .5); transition: transform .15s, box-shadow .15s; }
.kc-onb:hover { transform: translateY(-4px); }
.kc-onb.sel { box-shadow: inset 0 0 0 3px var(--gold2), 0 0 26px rgba(240, 207, 126, .35), 0 10px 24px rgba(0, 0, 0, .5); }
.kc-onb-med { width: 132px; height: 150px; padding: 8px; border-radius: 50% 50% 14% 14% / 42% 42% 14% 14%; background: linear-gradient(#f1d88f, #9a7632); box-shadow: 0 0 0 3px #0b0a07, 0 8px 16px rgba(0, 0, 0, .5); }
.kc-onb-p { display: block; width: 100%; height: 100%; border-radius: 50% 50% 12% 12% / 42% 42% 12% 12%; overflow: hidden; box-shadow: 0 0 0 2px #0b0a07; }
.kc-onb-cls { display: inline-flex; align-items: center; gap: 7px; font-family: var(--stencil); font-weight: 400; font-size: 26px; } .kc-onb-cls .kc-insig { width: 26px; height: 22px; }
.kc-onb-name { color: var(--dim); }
.kc-onb em { font-style: normal; font-size: 14px; color: #d5ccb1; } .kc-onb em b { color: var(--gold2); }
.kc-onb-fan { position: relative; height: 158px; width: 100%; margin-top: 8px; }
.kc-onb-fan > span { position: absolute; left: 50%; bottom: 0; margin-left: -52px; transform: translateX(calc(var(--k) * 64px)) rotate(calc(var(--k) * 7deg)); transform-origin: 50% 130%; }
@media (max-width: 900px) { .kc-onb-choices { grid-template-columns: 1fr; max-width: 420px; } .kc-onb-fan { display: none; } .kc-rank { grid-template-columns: auto 150px; } }

/* =================== audio settings and the top-bar radio =================== */
/* The radio reuses the works' set (.kw-radio in kriegswerk.css, styled per data-era), made compact for the top bar. */
.kc-top .kw-radio.kc-radio { grid-template-columns: minmax(96px, 168px) auto; gap: 7px; height: 40px; padding: 3px 8px 3px 7px; border-radius: 9px 9px 6px 6px; flex: 0 1 250px; min-width: 0; }
.kc-top .kc-radio .kw-radio-face { gap: 1px; }
.kc-top .kc-radio .kw-radio-dial { height: 12px; }
.kc-top .kc-radio .kw-radio-scale { font-size: 8px; }
.kc-top .kc-radio .kw-radio-scale::after { height: 2px; bottom: 1px; }
.kc-top .kc-radio .kw-radio-title { height: 16px; font-size: 12px; line-height: 16px; }
.kc-top .kc-radio .kw-radio-knobs { gap: 4px; }
.kc-top .kc-radio .kw-knob { width: 19px; height: 19px; }
.kc-top .kc-radio .kw-knob i::before { top: 2px; height: 5px; }
@media (max-width: 700px) { .kc-top .kc-radio { display: none; } }
.kc-sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 8px 18px; margin: 8px 0; }
.kc-slider { display: grid; grid-template-columns: 1fr 44px; grid-template-rows: auto auto; align-items: center; gap: 2px 8px; font-size: 14px; color: #d5ccb1; }
.kc-slider span { grid-column: 1 / -1; }
.kc-slider input { width: 100%; accent-color: var(--gold); cursor: pointer; }
.kc-slider b { font-family: var(--mono); font-size: 18px; font-weight: 400; color: var(--gold2); text-align: right; }
.kc-music-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.kc-music-row .kc-check { margin: 0; }
.kc-nowplaying { flex: 1; min-width: 0; font-family: var(--type); font-size: 14px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the sealed pack glyph (cards-ui.js packGlyph) */
.kc-packglyph { width: .86em; height: 1.04em; display: inline-block; vertical-align: -.15em; flex: none; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)); }
.kc-toast .kc-packglyph { width: 22px; height: 26px; }
/* settings: its own close and Done */
.kc-settings { position: relative; }
.kc-panel-x { position: absolute; right: 10px; top: 10px; }
.kc-settings-done { margin-top: 14px; }
/* the pack log: what each pack held, fading after a while (hover keeps it) */
.kc-packlogs { position: absolute; left: 16px; bottom: 16px; z-index: 30; display: flex; flex-direction: column; gap: 8px; width: min(300px, calc(100% - 32px)); pointer-events: none; }
.kc-packlog { pointer-events: auto; cursor: pointer; padding: 9px 12px 8px; background: linear-gradient(#f2ead2, #e2d5b0); color: #22190c; border-radius: 2px; box-shadow: 0 0 0 1px #6b5a36, 0 8px 18px rgba(0, 0, 0, .55); transform: rotate(-.6deg); animation: kc-pl-in .3s ease; transition: opacity .45s, transform .45s; }
.kc-packlog.kc-out { opacity: 0; transform: translateY(10px) rotate(-.6deg); }
@keyframes kc-pl-in { from { opacity: 0; transform: translateY(14px) rotate(-.6deg); } }
.kc-packlog-h { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid rgba(60, 45, 20, .35); padding-bottom: 6px; margin-bottom: 4px; }
.kc-packlog-h .kc-packglyph { width: 22px; height: 27px; }
.kc-packlog-h b { display: block; font-family: var(--stencil); font-weight: 400; font-size: 16px; }
.kc-packlog-h small { display: block; font-family: var(--type); font-size: 12px; color: #5a4c30; line-height: 1.15; }
.kc-packlog ul { list-style: none; margin: 0; padding: 0; font-family: var(--type); font-size: 14px; }
.kc-packlog li { display: flex; align-items: center; gap: 7px; padding: 2px 0; }
.kc-packlog li i { width: 9px; height: 9px; flex: none; transform: rotate(45deg); background: var(--rc, #b9b29a); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); }
.kc-packlog li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-pl-common { --rc: #ece8dc; } .kc-pl-rare { --rc: #3d8ee8; } .kc-pl-epic { --rc: #a24ee8; } .kc-pl-legendary { --rc: #f59a28; }
.kc-pl-legendary span, .kc-pl-epic span { font-weight: 700; }
.kc-packlog em { font-style: normal; font-family: var(--f, sans-serif); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; padding: 0 5px; border-radius: 2px; background: rgba(60, 45, 20, .14); color: #5a4c30; }
.kc-packlog em.kc-pl-new { background: #a8322a; color: #fff3df; } .kc-packlog em.kc-pl-gold { background: #d4b064; color: #2a1d06; }
.kc-nudge { animation: kc-nudge .5s ease; }
@keyframes kc-nudge { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* =================== hub: the tiles beside the Daily Orders board =================== */
.kc-hub-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; align-items: start; }
.kc-hub-main .kc-hub-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.kc-tile-ranked::before { background: radial-gradient(circle at 80% 20%, rgba(90, 140, 220, .4), transparent 60%), repeating-linear-gradient(135deg, transparent 0 18px, rgba(240, 207, 126, .05) 18px 20px); }
.kc-tile-rk { display: grid; place-items: center; width: 100%; height: 100%; }
.kc-tile-rk .kc-rkins { width: 26px; height: 50px; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .6)); }
.kc-tile-big .kc-tile-rk .kc-rkins { width: 30px; height: 58px; }
.kc-tile-ranked .kc-tile-ico { background: radial-gradient(circle at 40% 30%, #34445a, #10151d); box-shadow: inset 0 0 0 2px #6a7f9c; }
.kc-tile-rkname { color: var(--gold2); font-weight: 700; }
.kc-tile-t .kc-stars-sm { margin-left: 6px; vertical-align: -2px; }
.kc-hub-main .kc-tile:not(.kc-tile-big) { gap: 10px; padding: 12px; } .kc-hub-main .kc-tile:not(.kc-tile-big) .kc-tile-ico { width: 44px; height: 44px; font-size: 23px; }
.kc-hub-main .kc-tile:not(.kc-tile-big) .kc-tile-t { min-width: 0; } .kc-hub-main .kc-tile:not(.kc-tile-big) .kc-tile-t b { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-tile-rksub { display: block; margin-top: 2px; font-size: 13px; color: var(--faint); }
/* the board: a cork-and-wood pin board with three typed slips */
.kc-orders { position: relative; display: grid; gap: 10px; padding: 18px 14px 12px; border-radius: 5px; align-self: stretch; align-content: start;
    background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .07), transparent 40%), repeating-radial-gradient(circle at 30% 40%, rgba(0, 0, 0, .06) 0 1px, transparent 1px 3px), linear-gradient(160deg, #a77a48, #85592f);
    box-shadow: inset 0 0 0 4px #5a3a1a, inset 0 0 0 5px #c69a62, inset 0 0 22px rgba(40, 20, 0, .45), 0 10px 24px rgba(0, 0, 0, .5); }
.kc-orders-pin { position: absolute; left: 50%; top: -7px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9a8a, #c0392b 55%, #5a120a); box-shadow: 0 3px 3px rgba(0, 0, 0, .5); z-index: 2; }
.kc-orders-h { display: grid; justify-items: center; padding: 4px 8px 6px; color: #2a1d0c; background: linear-gradient(175deg, #f6efd9, #e2d5ae); box-shadow: 0 2px 4px rgba(0, 0, 0, .35); transform: rotate(-1deg); }
.kc-orders-h b { font-family: var(--stencil); font-weight: 400; font-size: 22px; letter-spacing: .14em; color: #7a1d16; line-height: 1.1; }
.kc-orders-h small { font-family: var(--type); font-size: 12px; letter-spacing: .08em; color: #5a4a2a; }
.kc-orders-list { display: grid; gap: 9px; }
.kc-slip { position: relative; display: grid; gap: 6px; padding: 9px 11px 8px; color: var(--ink); transform: rotate(calc((var(--k) - 1) * .7deg));
    background: repeating-linear-gradient(0deg, transparent 0 21px, rgba(70, 100, 140, .14) 21px 22px), linear-gradient(175deg, #fbf5e2, #ecdfba);
    box-shadow: 0 0 0 1px rgba(60, 40, 15, .35), 2px 3px 0 rgba(0, 0, 0, .25), 0 6px 10px rgba(0, 0, 0, .25); animation: kc-slipin .4s ease backwards; animation-delay: calc(var(--k) * 90ms); }
@keyframes kc-slipin { from { opacity: 0; transform: translateY(-10px) rotate(-4deg); } }
.kc-slip::before { content: ''; position: absolute; left: 50%; top: -4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c0, #c9a24e 60%, #6a4a10); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.kc-slip-t { display: flex; gap: 8px; align-items: baseline; }
.kc-slip-no { flex: none; font-family: var(--stencil); font-size: 12px; color: #a8231a; letter-spacing: .06em; }
.kc-slip-t b { font-family: var(--type); font-weight: 400; font-size: 16px; line-height: 1.2; }
.kc-slip-row { display: flex; gap: 8px; align-items: center; }
.kc-slip-row .kc-bar { flex: 1; margin: 0; height: 16px; background: rgba(60, 40, 15, .18); box-shadow: inset 0 0 0 1px rgba(60, 40, 15, .4); }
.kc-slip-row .kc-bar i { background: linear-gradient(#7fbf4a, #4f8a2a); }
.kc-slip-row .kc-bar span { line-height: 16px; font-size: 14px; color: #1d1608; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.kc-slip-rw { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 22px; color: #1d4f6a; } .kc-slip-rw i { font-size: 15px; color: #1d7c8a; }
.kc-slip-re { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #3a2a10; background: rgba(60, 40, 15, .12); box-shadow: inset 0 0 0 1px rgba(60, 40, 15, .45); transition: transform .3s; }
.kc-slip-re:hover { background: #f0cf7e; transform: rotate(-60deg); }
.kc-slip.done { background: repeating-linear-gradient(0deg, transparent 0 21px, rgba(70, 100, 140, .1) 21px 22px), linear-gradient(175deg, #eef1dc, #d9dfba); }
.kc-slip.done .kc-slip-t b { text-decoration: line-through rgba(60, 110, 40, .6) 2px; }
.kc-slip-stamp { position: absolute; right: 10px; top: 4px; padding: 0 6px; font-family: var(--stencil); font-size: 17px; letter-spacing: .1em; color: rgba(50, 110, 40, .85); border: 2px solid rgba(50, 110, 40, .75); border-radius: 3px; transform: rotate(-9deg); pointer-events: none; }
.kc-orders-f { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; padding: 6px 8px; font-size: 13px; color: #fff3d8; background: rgba(40, 22, 6, .55); border-radius: 3px; }
.kc-orders-f b { color: var(--gold2); font-weight: 700; } .kc-orders-f i { color: var(--gold); } .kc-orders-f .got i { color: #9fdc6a; }

/* =================== ranked: insignia, stars, the ladder page =================== */
.kc-rkins { display: block; width: 40px; height: 78px; overflow: visible; }
.kc-rkins-xs { width: 24px; height: 47px; } .kc-rkins-sm { width: 30px; height: 58px; } .kc-rkins-lg { width: 52px; height: 100px; } .kc-rkins-xl { width: 70px; height: 136px; }
.kc-stars { display: inline-flex; gap: 3px; align-items: center; }
.kc-star { width: 14px; height: 14px; display: inline-block; position: relative; filter: drop-shadow(0 0 1px #000) drop-shadow(0 1px 0 #000);
    clip-path: polygon(50% 0, 62% 35%, 99% 36%, 69% 58%, 80% 95%, 50% 73%, 20% 95%, 31% 58%, 1% 36%, 38% 35%); background: #6a6450; }
.kc-star::after { content: ''; position: absolute; inset: 14%; clip-path: polygon(50% 0, 62% 35%, 99% 36%, 69% 58%, 80% 95%, 50% 73%, 20% 95%, 31% 58%, 1% 36%, 38% 35%); background: #23211a; }
.kc-star.on { background: linear-gradient(160deg, #fff6c8, #f4c34a 50%, #b87914); }
.kc-star.on::after { display: none; }
.kc-stars-sm .kc-star { width: 12px; height: 12px; } .kc-stars-lg { gap: 6px; } .kc-stars-lg .kc-star { width: 30px; height: 30px; }
.kc-star-pop { animation: kc-starpop .55s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes kc-starpop { 0% { transform: scale(2.4) rotate(-40deg); filter: brightness(2.5); } 100% { transform: none; } }
.kc-star-lose { animation: kc-starlose .7s ease forwards; }
@keyframes kc-starlose { 0% { transform: none; } 25% { transform: scale(1.25); filter: brightness(2); } 100% { transform: translateY(14px) rotate(35deg) scale(.6); opacity: 0; } }
.kc-ladder { position: absolute; inset: 0; padding: 18px; display: grid; gap: 14px; align-content: start; grid-auto-rows: max-content; max-width: 1180px; margin: 0 auto; grid-template-columns: minmax(0, 1fr); }
.kc-ldr-head { --bc: #c9a452; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(220px, 280px); gap: 22px; align-items: center; overflow: hidden; position: relative;
    background: radial-gradient(circle at 8% 50%, color-mix(in srgb, var(--bc) 30%, transparent), transparent 45%), linear-gradient(rgba(43, 42, 33, .94), rgba(27, 26, 21, .94)); }
.kc-ldr-badge { display: grid; place-items: center; width: 120px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 230, 160, .22), transparent 65%); }
.kc-ldr-badge .kc-rkins { filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .6)); animation: kc-bob 3.6s ease-in-out infinite; }
.kc-ldr-band { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--bc); }
.kc-ldr-now h2 { margin: 2px 0 0; font-family: var(--stencil); font-weight: 400; font-size: clamp(28px, 3.4vw, 44px); line-height: 1; color: var(--paper); }
.kc-ldr-de { font-family: var(--type); color: var(--dim); margin-bottom: 8px; }
.kc-ldr-now .kc-note { margin: 8px 0 0; }
.kc-ldr-floor { color: #9fdc6a; }
.kc-ldr-streak { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; padding: 3px 10px; border-radius: 3px; font-weight: 700; color: #2a1206; background: linear-gradient(#ffd27a, #f08a2a); box-shadow: 0 0 12px rgba(255, 140, 40, .5); }
.kc-ldr-legend { display: flex; gap: 8px; align-items: center; font-size: 18px; } .kc-ldr-legend i { color: var(--gold2); font-size: 26px; } .kc-ldr-legend b { font-family: var(--mono); font-size: 34px; font-weight: 400; color: var(--gold2); }
.kc-ldr-season { display: grid; gap: 8px; padding: 12px; border-radius: 4px; background: rgba(10, 10, 8, .55); box-shadow: inset 0 0 0 1px #45422f; }
.kc-ldr-season > b { font-family: var(--stencil); font-weight: 400; font-size: 20px; color: var(--gold2); } .kc-ldr-season > small { color: var(--dim); margin-top: -6px; }
.kc-ldr-best { display: flex; gap: 10px; align-items: center; } .kc-ldr-best small { display: block; color: var(--dim); font-size: 12px; }
.kc-ldr-rec { display: flex; gap: 6px; } .kc-ldr-rec span { flex: 1; min-width: 0; display: grid; text-align: center; font-size: 11px; color: var(--dim); background: #15140f; border-radius: 3px; padding: 4px 2px; }
.kc-ldr-rec b { font-family: var(--mono); font-size: 22px; font-weight: 400; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-ldr-notice { display: flex; gap: 12px; align-items: center; border-left: 4px solid var(--gold); } .kc-ldr-notice > i { font-size: 30px; color: var(--gold); } .kc-ldr-notice > div { flex: 1; display: grid; } .kc-ldr-notice small { color: #d5ccb1; }
.kc-ldr-queue .kc-row { align-items: center; } .kc-ldr-queue .kc-note { flex: 1; min-width: 200px; }
.kc-ldr-bands { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kc-ldr-bandc { --bc: #c9a452; position: relative; display: grid; justify-items: center; gap: 3px; padding: 10px 8px; text-align: center; border-radius: 4px; background: #15140f; box-shadow: inset 0 0 0 1px #36342a; }
.kc-ldr-bandc b { font-family: var(--stencil); font-weight: 400; font-size: 17px; color: var(--bc); } .kc-ldr-bandc small { font-size: 11px; color: var(--faint); }
.kc-ldr-bandc em { font-style: normal; font-size: 13px; color: #d5ccb1; } .kc-ldr-chest { font-size: 11px; color: var(--dim); }
.kc-ldr-bandc.got { background: linear-gradient(#1d2415, #15140f); } .kc-ldr-bandc.cur { box-shadow: inset 0 0 0 2px var(--bc), 0 0 16px color-mix(in srgb, var(--bc) 35%, transparent); }
.kc-ldr-ladder { display: flex; gap: 4px; align-items: flex-end; overflow-x: auto; padding: 10px 2px 6px; }
.kc-ldr-rung { flex: none; display: grid; justify-items: center; gap: 4px; width: 42px; padding: 6px 2px 4px; border-radius: 3px; cursor: default; opacity: .55; }
.kc-ldr-rung small { font-size: 10px; line-height: 1.05; text-align: center; color: var(--dim); writing-mode: vertical-rl; transform: rotate(180deg); height: 96px; }
.kc-ldr-rung.past { opacity: .9; } .kc-ldr-rung.cur { opacity: 1; background: rgba(240, 207, 126, .16); box-shadow: inset 0 0 0 2px var(--gold2); }
.kc-ldr-rung.cur small { color: var(--gold2); font-weight: 700; }
.kc-ldr-rung.floor { border-left: 3px solid #9fdc6a; }
/* the ranked block on the result screen */
.kc-rkres { position: relative; display: flex; gap: 16px; align-items: center; padding: 10px 14px; border-radius: 4px; background: linear-gradient(90deg, rgba(90, 140, 220, .2), transparent 80%); box-shadow: inset 0 0 0 1px rgba(120, 160, 220, .35); }
.kc-rkres-ins { flex: none; display: grid; place-items: center; width: 64px; height: 104px; perspective: 400px; }
.kc-rkres-ins .kc-rkins { filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .6)); }
.kc-rkres-t { display: grid; gap: 4px; min-width: 0; }
.kc-rkres-t > small { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: #9fc0ea; }
.kc-rkres-name { font-family: var(--stencil); font-weight: 400; font-size: 28px; line-height: 1; color: var(--paper); }
.kc-rkres-leg b { font-family: var(--mono); font-size: 28px; color: var(--gold2); }
.kc-rkres-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-rkres-tag { display: inline-flex; gap: 5px; align-items: center; padding: 1px 8px; font-size: 13px; border-radius: 3px; background: rgba(159, 220, 106, .16); color: #c8f0a0; }
.kc-rkres-tag.hot { background: linear-gradient(#ffd27a, #f08a2a); color: #2a1206; font-weight: 700; }
.kc-rkres-stamp { display: none; justify-self: start; margin-top: 2px; padding: 0 10px; font-family: var(--stencil); font-size: 22px; letter-spacing: .12em; border: 3px solid; border-radius: 4px; opacity: 0; pointer-events: none; transform: rotate(-5deg) scale(2.2); }
.kc-rkres-stamp.on { display: inline-block; animation: kc-stamp .45s cubic-bezier(.3, 1.4, .5, 1) forwards; }
@keyframes kc-stamp { to { opacity: .92; transform: rotate(-5deg) scale(1); } }
.kc-rk-up .kc-rkres-stamp { color: #ffd27a; border-color: #ffd27a; text-shadow: 0 0 10px rgba(255, 210, 122, .6); }
.kc-rk-down .kc-rkres-stamp { color: #ff6a5a; border-color: #ff6a5a; }
.kc-rk-up { animation: kc-rkup 1s ease; } @keyframes kc-rkup { 20% { box-shadow: inset 0 0 0 2px #ffd27a, 0 0 40px rgba(255, 210, 122, .65); } }
.kc-rk-down { animation: kc-rkdown .8s ease; } @keyframes kc-rkdown { 20% { box-shadow: inset 0 0 0 2px #ff6a5a, 0 0 30px rgba(255, 80, 60, .5); transform: translateX(-6px); } 40% { transform: translateX(6px); } }
.kc-rk-flip { animation: kc-rkflip .6s cubic-bezier(.3, 1.3, .5, 1); } @keyframes kc-rkflip { from { transform: rotateY(90deg) scale(1.3); filter: brightness(2); } }
.kc-rk-hold .kc-stars { animation: kc-glowp .8s ease; }
@media (max-width: 900px) {
    .kc-hub-main { grid-template-columns: 1fr; }
    .kc-ldr-head { grid-template-columns: auto minmax(0, 1fr); } .kc-ldr-season { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .kc-hub-main .kc-hub-grid { grid-template-columns: 1fr 1fr; }
    .kc-ldr-head { gap: 12px; } .kc-ldr-badge { width: 80px; height: 120px; } .kc-ldr-badge .kc-rkins-xl { width: 50px; height: 98px; }
    .kc-stars-lg .kc-star { width: 24px; height: 24px; }
    .kc-rkres { gap: 10px; padding: 8px; } .kc-rkres-name { font-size: 22px; } .kc-rkres-stamp { font-size: 17px; }
}

/* =================== battle juice: splats, sparks, trails, deaths, a livelier table =================== */
/* damage and heal splats: a jagged starburst with a bold number, popped on the target and held a moment */
.kc-splat { position: fixed; z-index: 6; width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2); display: grid; place-items: center; pointer-events: none;
    animation: kc-splat var(--t, 1.15s) cubic-bezier(.2, 1.4, .4, 1) forwards; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .55)); }
.kc-splat svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(var(--rot)); }
.kc-splat b { position: relative; font-family: var(--stencil); font-weight: 400; font-size: calc(var(--sz) * .42); line-height: 1; letter-spacing: -.02em; color: #fff; white-space: nowrap;
    text-shadow: 0 0 2px #2a0800, 2px 2px 0 #2a0800, -2px 2px 0 #2a0800, 2px -2px 0 #2a0800, -2px -2px 0 #2a0800, 0 3px 0 #2a0800, 0 -2px 0 #2a0800, 3px 0 0 #2a0800, -3px 0 0 #2a0800; }
.kc-splat-dmg b { color: #fff; } .kc-splat-heal b { color: #f4ffe8; text-shadow: 0 0 2px #0f3a0a, 2px 2px 0 #0f3a0a, -2px 2px 0 #0f3a0a, 2px -2px 0 #0f3a0a, -2px -2px 0 #0f3a0a, 0 3px 0 #0f3a0a; }
.kc-splat-armor b { color: #fff; text-shadow: 0 0 2px #1a2830, 2px 2px 0 #1a2830, -2px 2px 0 #1a2830, 2px -2px 0 #1a2830, -2px -2px 0 #1a2830, 0 3px 0 #1a2830; }
.kc-splat.big b { font-size: calc(var(--sz) * .46); }
@keyframes kc-splat { 0% { transform: scale(.2) rotate(-25deg); opacity: 0; } 12% { transform: scale(1.22) rotate(4deg); opacity: 1; } 22% { transform: scale(.94); } 30% { transform: scale(1.02); } 78% { transform: scale(1); opacity: 1; } 100% { transform: scale(.85) translateY(-14%); opacity: 0; } }
/* particles: each flies along --dx/--dy, spinning, shrinking out */
.kc-pt { position: fixed; z-index: 5; width: 8px; height: 8px; margin: -4px 0 0 -4px; pointer-events: none; transform: scale(var(--s, 1)); animation: kc-pt var(--t, .7s) cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes kc-pt { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(calc(var(--s, 1) * .2)); opacity: 0; } }
.kc-pt-spark { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--pc, #fff3b0); box-shadow: 0 0 6px 2px var(--pc, #ffb040); }
.kc-pt-ember { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: radial-gradient(circle, #fff6c8, var(--pc, #ff9a2a) 55%, transparent 70%); animation-timing-function: linear; }
.kc-pt-shard { width: 9px; height: 6px; background: var(--pc, #b8ad90); clip-path: polygon(0 0, 100% 30%, 60% 100%); box-shadow: none; }
.kc-pt-debris { width: 7px; height: 7px; background: var(--pc, #3a3a32); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .4); animation-timing-function: cubic-bezier(.3, .2, .6, 1); }
.kc-pt-smoke { width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(150, 146, 136, .9), rgba(70, 66, 60, .75) 60%, transparent 72%); animation-name: kc-smokept; }
@keyframes kc-smokept { 0% { opacity: .9; } to { transform: translate(var(--dx), var(--dy)) scale(calc(var(--s, 1) * 2.2)); opacity: 0; } }
.kc-pt-dust { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: radial-gradient(circle, rgba(214, 190, 140, .85), rgba(180, 150, 100, .4) 60%, transparent 72%); animation-name: kc-smokept; }
.kc-pt-bubble { width: 8px; height: 8px; border-radius: 50%; border: 2px solid rgba(220, 245, 255, .9); background: rgba(160, 220, 255, .25); animation-name: kc-smokept; }
.kc-pt-star { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--pc, #ffe27a); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 3px #ffd27a); }
.kc-pt-leaf { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #9cff6a; clip-path: polygon(40% 0, 60% 0, 60% 40%, 100% 40%, 100% 60%, 60% 60%, 60% 100%, 40% 100%, 40% 60%, 0 60%, 0 40%, 40% 40%); filter: drop-shadow(0 0 4px #4aff3a); }
/* an impact flash, a dust ring, a splash, a shockwave across the board */
.kc-flash { position: fixed; z-index: 4; width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2); border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
    background: radial-gradient(circle, rgba(255, 255, 240, .95) 0, rgba(255, 220, 120, .75) 22%, rgba(255, 140, 40, .35) 45%, transparent 68%); animation: kc-flash var(--t, .42s) ease-out forwards; }
.kc-flash.heal { background: radial-gradient(circle, rgba(230, 255, 210, .9) 0, rgba(120, 255, 100, .5) 30%, transparent 66%); }
.kc-flash.shield { background: radial-gradient(circle, transparent 30%, rgba(255, 240, 180, .9) 42%, rgba(255, 210, 110, .5) 50%, transparent 62%); }
.kc-flash.secret { background: radial-gradient(circle, rgba(220, 160, 255, .5) 0, rgba(140, 60, 200, .25) 40%, transparent 70%); }
@keyframes kc-flash { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.15); opacity: 0; } }
.kc-trail { position: fixed; z-index: 3; height: 18px; margin-top: -9px; transform-origin: 0 50%; pointer-events: none; border-radius: 0 9px 9px 0; mix-blend-mode: screen;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tc) 35%, transparent) 40%, var(--tc) 85%, #fff); clip-path: polygon(0 50%, 100% 0, 100% 100%); animation: kc-trail var(--t, .48s) ease-out forwards; }
@keyframes kc-trail { 0% { opacity: 0; scale: .2 1; } 25% { opacity: 1; scale: 1 1; } 100% { opacity: 0; scale: 1 .2; } }
.kc-dust { position: fixed; z-index: 2; width: var(--sz); height: calc(var(--sz) * .3); margin: calc(var(--sz) * -.15) 0 0 calc(var(--sz) / -2); border-radius: 50%; pointer-events: none;
    border: 4px solid rgba(225, 200, 150, .8); box-shadow: 0 0 10px rgba(225, 200, 150, .6), inset 0 0 8px rgba(225, 200, 150, .5); animation: kc-dustring var(--t, .6s) ease-out forwards; }
.kc-splash { border-color: rgba(190, 235, 255, .9); box-shadow: 0 0 10px rgba(160, 220, 255, .7), inset 0 0 8px rgba(160, 220, 255, .5); }
@keyframes kc-dustring { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.1); opacity: 0; } }
.kc-wave { position: fixed; z-index: 3; width: var(--sz); height: calc(var(--sz) * .62); margin: calc(var(--sz) * -.31) 0 0 calc(var(--sz) / -2); border-radius: 50%; pointer-events: none;
    border: 10px solid color-mix(in srgb, var(--wc) 70%, #fff); box-shadow: 0 0 30px var(--wc), inset 0 0 30px var(--wc); animation: kc-wave var(--t, .7s) ease-out forwards; mix-blend-mode: screen; }
@keyframes kc-wave { from { transform: scale(.05); opacity: 1; } to { transform: scale(1); opacity: 0; } }
/* buff and debuff popups */
.kc-bpop { position: fixed; z-index: 6; transform: translate(-50%, -50%); pointer-events: none; animation: kc-bpop var(--t, 1.1s) ease-out forwards; }
.kc-bpop span { display: block; padding: 2px 12px 1px; font-family: var(--stencil); font-size: calc(var(--u, 100px) * .3); white-space: nowrap; color: #3a2400; border-radius: 4px;
    background: linear-gradient(#fff6c0, #f4c34a 55%, #c98a1a); box-shadow: 0 0 0 2px #3a2400, 0 0 16px rgba(255, 210, 110, .8), 0 4px 0 #3a2400; }
.kc-bpop.neg span { color: #f8ecff; background: linear-gradient(#c78af0, #7a2ab8 60%, #4a1278); box-shadow: 0 0 0 2px #24063a, 0 0 14px rgba(170, 90, 230, .7), 0 4px 0 #24063a; }
@keyframes kc-bpop { 0% { transform: translate(-50%, -20%) scale(.3); opacity: 0; } 15% { transform: translate(-50%, -60%) scale(1.18); opacity: 1; } 28% { transform: translate(-50%, -60%) scale(1); } 75% { opacity: 1; } 100% { transform: translate(-50%, -150%) scale(.9); opacity: 0; } }
/* projectiles carry the colour of the card's branch */
.kc-shell { background: radial-gradient(ellipse at 70% 50%, #fff6c8, var(--pc, #ffb040) 50%, color-mix(in srgb, var(--pc, #c84010) 60%, #000)); box-shadow: 0 0 14px var(--pc, #ffb040), -14px 0 10px -2px color-mix(in srgb, var(--pc, #ffa03c) 60%, transparent), -28px 0 14px -4px color-mix(in srgb, var(--pc, #ff7828) 35%, transparent); }
.kc-boom.mid { --u: 120px; }
/* deaths by kind */
.kc-die-brew { animation: kc-die-brew var(--t, .76s) ease-in forwards !important; }
@keyframes kc-die-brew { 0% { filter: brightness(3) saturate(0); } 20% { transform: scale(1.12) rotate(-3deg); filter: brightness(1.6) sepia(1) hue-rotate(-30deg) saturate(3); } 100% { transform: scale(.7) translateY(14px) rotate(6deg); filter: brightness(.15) blur(2px); opacity: 0; } }
.kc-die-air { animation: kc-die-air var(--t, .76s) cubic-bezier(.5, 0, .9, .6) forwards !important; }
@keyframes kc-die-air { 0% { filter: brightness(2); } 100% { transform: translate(40px, 120px) rotate(320deg) scale(.4); filter: brightness(.3); opacity: 0; } }
.kc-die-sea { animation: kc-die-sea var(--t, .76s) ease-in forwards !important; }
@keyframes kc-die-sea { 0% { clip-path: inset(0 0 0 0); } 30% { transform: rotate(-10deg); } 100% { transform: translateY(45%) rotate(-24deg); clip-path: inset(0 0 60% 0); filter: brightness(.5) hue-rotate(160deg) saturate(.6); opacity: .1; } }
.kc-die-fall { animation: kc-die-fall var(--t, .76s) ease-in forwards !important; transform-origin: 50% 100%; }
@keyframes kc-die-fall { 0% { filter: brightness(1.8); } 25% { transform: scale(1.06, .92); } 100% { transform: scale(1.25, .1) translateY(20px); filter: brightness(.3) sepia(1); opacity: 0; } }
/* deploy: dropped in from above, a squash on landing */
.kc-drop { animation: kc-drop .55s cubic-bezier(.3, 1.2, .5, 1) !important; }
@keyframes kc-drop { 0% { transform: translateY(-70%) scale(1.3); opacity: 0; filter: drop-shadow(0 30px 12px rgba(0, 0, 0, .5)); } 45% { transform: translateY(0) scale(1.06, .9); opacity: 1; } 65% { transform: translateY(-6%) scale(.97, 1.04); } 100% { transform: none; } }
/* asleep: three z's float up off a unit that cannot attack yet */
.kc-sick .kc-u-zz { display: block; position: absolute; right: -6%; top: -10%; width: 50%; height: 60%; z-index: 7; cursor: default; animation: none; }
.kc-u-zz i { position: absolute; left: 10%; bottom: 0; font-style: normal; font-family: var(--stencil); font-size: calc(var(--u) * .22); line-height: 1; color: #fff; text-shadow: 0 0 2px #10203a, 2px 2px 0 #10203a, -1px 1px 0 #10203a, 1px -1px 0 #10203a, -1px -1px 0 #10203a, 0 0 8px #7ab8ff; opacity: 0; animation: kc-zzz 2.4s ease-out infinite; }
.kc-u-zz i:nth-child(2) { animation-delay: .8s; font-size: calc(var(--u) * .27); } .kc-u-zz i:nth-child(3) { animation-delay: 1.6s; font-size: calc(var(--u) * .33); }
@keyframes kc-zzz { 0% { transform: translate(0, 0) rotate(-10deg) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(calc(var(--u) * .3), calc(var(--u) * -.5)) rotate(12deg) scale(1.1); opacity: 0; } }
/* ready to attack: the green frame breathes, a soft glow rises */
.kc-unit.kc-ready .kc-u-frame { animation: kc-readyp 1.4s ease-in-out infinite; }
@keyframes kc-readyp { 50% { box-shadow: inset 0 0 0 3px #0b0a07, inset 0 0 0 7px #b4ff8a, inset 0 0 0 9px #0b0a07, 0 0 26px 4px #6aff4f; } }
.kc-hero.kc-ready .kc-hero-frame { animation: kc-glowh 1.4s ease-in-out infinite; }
@keyframes kc-glowh { 50% { filter: brightness(1.15) drop-shadow(0 0 10px #6aff4f); } }
/* a drawn card flies in from the deck pile */
.kc-hand > .kc-card.kc-drawn { animation: kc-draw2 var(--dt, .62s) cubic-bezier(.25, .9, .35, 1); }
@keyframes kc-draw2 { 0% { transform: translate(calc(var(--hx, 0px) + var(--fx, 40vw)), calc(var(--hy, 0px) + var(--fy, -20vh))) rotate(-30deg) scale(.42); opacity: .4; } 55% { transform: translate(var(--hx, 0), calc(var(--hy, 0px) - 40px)) rotate(0) scale(1.08); opacity: 1; filter: brightness(1.3); } }
/* the turn banner: a ribbon that sweeps across, the words punched in */
.kc-banner.on { animation: kc-banner2 var(--bt, 1.1s) ease forwards; }
.kc-banner span { position: relative; display: grid; justify-items: center; padding: 10px 90px 8px; overflow: hidden;
    background: linear-gradient(90deg, transparent, rgba(16, 24, 34, .92) 18%, rgba(30, 48, 70, .95) 50%, rgba(16, 24, 34, .92) 82%, transparent); box-shadow: 0 2px 0 rgba(240, 207, 126, .6), 0 -2px 0 rgba(240, 207, 126, .6); }
.kc-banner span::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30%; left: -40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); animation: kc-bshine var(--bt, 1.1s) ease .1s; }
.kc-banner b { font-family: var(--stencil); font-weight: 400; font-size: calc(var(--u) * .62); line-height: 1; letter-spacing: .08em; color: var(--gold2); text-shadow: 0 3px 0 #000, 0 0 24px rgba(255, 210, 120, .55); animation: kc-bpunch var(--bt, 1.1s) cubic-bezier(.2, 1.5, .4, 1); }
.kc-banner small { font-family: var(--type); font-size: calc(var(--u) * .16); letter-spacing: .3em; color: #cfe2f4; }
.kc-banner.theirs span { background: linear-gradient(90deg, transparent, rgba(40, 10, 8, .92) 18%, rgba(90, 20, 14, .95) 50%, rgba(40, 10, 8, .92) 82%, transparent); box-shadow: 0 2px 0 rgba(255, 120, 100, .55), 0 -2px 0 rgba(255, 120, 100, .55); }
.kc-banner.theirs b { color: #ffb0a0; font-size: calc(var(--u) * .46); text-shadow: 0 3px 0 #000, 0 0 20px rgba(255, 80, 60, .5); } .kc-banner.theirs small { color: #ffd0c8; }
@keyframes kc-banner2 { 0% { opacity: 0; transform: translate(-30%, -50%) scaleY(.4); } 14% { opacity: 1; transform: translate(0, -50%) scaleY(1); } 80% { opacity: 1; transform: translate(0, -50%); } 100% { opacity: 0; transform: translate(25%, -50%) scaleY(.6); } }
@keyframes kc-bpunch { 0% { transform: scale(2.2); opacity: 0; } 18% { transform: scale(.94); opacity: 1; } 26% { transform: scale(1.03); } 34% { transform: none; } }
@keyframes kc-bshine { to { left: 120%; } }

/* ---------- the table comes alive ---------- */
.kc-amb { position: absolute; inset: 0; overflow: hidden; border-radius: 6px; pointer-events: none; }
.kc-cloud { position: absolute; width: 46%; height: 34%; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(40, 50, 60, .22), rgba(40, 50, 60, .12) 45%, transparent 70%); filter: blur(6px); animation: kc-cloud 80s linear infinite; }
.kc-cloud.c1 { top: 8%; animation-delay: -12s; } .kc-cloud.c2 { top: 48%; width: 36%; animation-duration: 105s; animation-delay: -60s; } .kc-cloud.c3 { top: 70%; width: 30%; height: 26%; animation-duration: 92s; animation-delay: -38s; }
@keyframes kc-cloud { from { left: -50%; } to { left: 110%; } }
.kc-ship { position: absolute; top: .4%; width: clamp(40px, 4.6%, 64px); aspect-ratio: 64 / 20; animation: kc-ship 70s linear infinite; }
.kc-ship svg { display: block; width: 100%; height: 100%; animation: kc-bobship 2.8s ease-in-out infinite; }
.kc-ship::after { content: ''; position: absolute; left: 90%; top: 62%; width: 70%; height: 22%; background: linear-gradient(90deg, rgba(255, 255, 255, .8), transparent); border-radius: 50%; }
@keyframes kc-ship { from { left: 104%; } to { left: -12%; } }
@keyframes kc-bobship { 50% { transform: translateY(1px) rotate(-1.5deg); } }
.kc-amb-cold .kc-ship { top: 3%; animation-duration: 90s; animation-delay: -30s; }
.kc-train { position: absolute; bottom: calc(.6% + 1px); width: clamp(70px, 8%, 104px); aspect-ratio: 104 / 18; animation: kc-train 46s linear infinite; animation-delay: -8s; }
.kc-train svg { display: block; width: 100%; height: 100%; }
@keyframes kc-train { from { left: -14%; } to { left: 106%; } }
.kc-puff { position: absolute; left: 74%; top: -30%; width: 9px; height: 9px; border-radius: 50%; background: rgba(240, 240, 235, .85); animation: kc-puff 1.4s linear infinite; }
.kc-puff.p2 { animation-delay: -.45s; } .kc-puff.p3 { animation-delay: -.9s; }
@keyframes kc-puff { 0% { transform: translate(0, 0) scale(.5); opacity: .9; } 100% { transform: translate(-26px, -22px) scale(2.2); opacity: 0; } }
.kc-flag { position: absolute; width: clamp(18px, 2.2%, 28px); aspect-ratio: 24 / 34; filter: drop-shadow(2px 3px 1px rgba(0, 0, 0, .35)); }
.kc-flag svg { display: block; width: 100%; height: 100%; overflow: visible; }
.kc-flag-f { transform-origin: 4px 9px; animation: kc-wave-f 1.6s ease-in-out infinite; }
.kc-flag.f1 { left: 4%; top: 30%; } .kc-flag.f2 { right: 5%; top: 58%; } .kc-flag.f3 { left: 9%; bottom: 20%; } .kc-flag.f4 { right: 10%; top: 18%; }
.kc-flag.f2 .kc-flag-f { animation-delay: -.5s; } .kc-flag.f3 .kc-flag-f { animation-delay: -1s; } .kc-flag.f4 .kc-flag-f { animation-delay: -.25s; }
@keyframes kc-wave-f { 0%, 100% { transform: skewY(0) scaleX(1); } 25% { transform: skewY(-8deg) scaleX(.9); } 50% { transform: skewY(4deg) scaleX(1.05); } 75% { transform: skewY(-3deg) scaleX(.95); } }
.kc-sweep { position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; margin: -80% 0 0 -80%; border-radius: 50%; mix-blend-mode: multiply;
    background: conic-gradient(from 0deg, transparent 0 290deg, rgba(40, 170, 140, .04) 320deg, rgba(40, 170, 140, .15) 358deg, rgba(20, 120, 100, .3) 360deg); animation: kc-spin 9s linear infinite; }
.kc-plot { position: absolute; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #c0392b; box-shadow: 0 0 0 2px rgba(255, 255, 255, .8), 0 0 8px #ff5a3a; }
.kc-plot::after { content: ''; position: absolute; right: 3px; top: 2px; width: 60px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(192, 57, 43, .7)); transform-origin: 100% 50%; }
.kc-plot.p1 { animation: kc-plot1 34s linear infinite; } .kc-plot.p2 { background: #2f5f9f; box-shadow: 0 0 0 2px rgba(255, 255, 255, .8), 0 0 8px #4a8ee0; animation: kc-plot2 42s linear infinite; animation-delay: -14s; }
.kc-plot.p2::after { left: 3px; right: auto; background: linear-gradient(270deg, transparent, rgba(47, 95, 159, .7)); transform-origin: 0 50%; }
@keyframes kc-plot1 { from { left: 104%; top: 22%; } to { left: -6%; top: 34%; } }
@keyframes kc-plot2 { from { left: -6%; top: 84%; } to { left: 106%; top: 70%; } }
.kc-blink { position: absolute; width: 14px; height: 14px; margin: -7px; border-radius: 50%; border: 2px solid #e04a3a; animation: kc-blinkr 2.2s ease-out infinite; }
.kc-blink.b1 { left: 82%; top: 30%; } .kc-blink.b2 { left: 14%; top: 66%; border-color: #2f6fbf; animation-delay: -.7s; } .kc-blink.b3 { left: 70%; top: 80%; animation-delay: -1.4s; }
@keyframes kc-blinkr { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }
/* warmer, livelier light: the lamp's pool breathes, the desk glows where it falls */
.kc-desk-ww2 .kc-tableglow { width: 80%; height: 90%; background: radial-gradient(ellipse 90% 90% at 100% 0%, rgba(255, 232, 170, .42), rgba(255, 214, 130, .14) 50%, transparent 85%); animation: kc-lampb 6s ease-in-out infinite; }
@keyframes kc-lampb { 0%, 100% { opacity: 1; } 47% { opacity: .9; } 50% { opacity: .97; } 53% { opacity: .88; } }
.kc-desk-ww2 { background: radial-gradient(ellipse 60% 55% at 92% 0%, rgba(255, 210, 130, .28), transparent 70%), radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0, 0, 0, .45) 100%),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 9px, rgba(255, 220, 170, .04) 9px 11px, transparent 11px 23px),
        repeating-linear-gradient(0deg, transparent 0 140px, rgba(0, 0, 0, .35) 140px 142px),
        linear-gradient(180deg, #5c3d24, #4a301c 50%, #3e2814); }
.kc-desk-cold { background: radial-gradient(ellipse at 50% 50%, rgba(150, 215, 255, .12), transparent 60%), radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0, 0, 0, .55) 100%),
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(180deg, #343c44, #2a3036 60%, #22272b); }
.kc-desk-cold .kc-tableglow { box-shadow: inset 0 0 40px rgba(255, 255, 255, .45); background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, .2), transparent 70%); }
.kc-midline span { background: rgba(255, 248, 225, .75); color: rgba(40, 30, 10, .85); }
@media (max-width: 600px) { .kc-flag, .kc-cloud.c3 { display: none; } .kc-banner span { padding: 8px 40px 6px; } }
@media (prefers-reduced-motion: reduce) {
    .kc-cloud, .kc-ship, .kc-ship svg, .kc-train, .kc-puff, .kc-flag-f, .kc-sweep, .kc-plot, .kc-blink, .kc-u-zz i, .kc-unit.kc-ready .kc-u-frame, .kc-hero.kc-ready .kc-hero-frame, .kc-desk-ww2 .kc-tableglow { animation: none !important; }
    .kc-u-zz i { opacity: 1; } .kc-u-zz i:nth-child(2) { transform: translate(30%, -60%); } .kc-u-zz i:nth-child(3) { transform: translate(60%, -120%); }
    .kc-trail, .kc-pt, .kc-sweep { display: none; }
    .kc-splat, .kc-bpop, .kc-banner.on { animation-name: kc-fadeio !important; }
    .kc-banner b, .kc-drop, .kc-hand > .kc-card.kc-drawn { animation-name: kc-fadein !important; }
    .kc-quake .kc-desk, .kc-quake .kc-herorow, .kc-quake .kc-board, .kc-quake2 .kc-desk, .kc-quake2 .kc-herorow, .kc-quake2 .kc-board { animation: none !important; }
}
@keyframes kc-fadeio { 0% { opacity: 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes kc-fadein { from { opacity: 0; } }

/* ---------------- nations: a monogram badge in the nation's trim colour, a tinted frame and a trim line for the other armies
   (plain letters on enamel — no flags, stars, roundels or other emblems) */
.kc-cnat { position: absolute; right: 3.5%; top: 40%; min-width: 1.35em; height: 1.35em; padding: 0 .22em; display: grid; place-items: center; z-index: 3; border-radius: .3em;
    font-family: var(--stencil); font-size: .8em; letter-spacing: .04em; line-height: 1; color: var(--nc);
    background: radial-gradient(circle at 40% 28%, color-mix(in srgb, var(--nb) 70%, #fff), var(--nb) 60%, color-mix(in srgb, var(--nb) 55%, #000));
    box-shadow: 0 0 0 .1em #0b0a07, 0 0 0 .2em color-mix(in srgb, var(--nc) 70%, #0b0a07), 0 0 0 .28em #0b0a07; text-shadow: 0 .06em 0 rgba(0, 0, 0, .7); }
.kc-t-order .kc-cnat { right: 6%; top: 41%; }
.kc-card:not(.kc-n-de):not(.kc-n-int) { --metal: color-mix(in srgb, var(--cc) 24%, color-mix(in srgb, var(--nb) 42%, #8e8b7d)); }
.kc-card:not(.kc-n-de):not(.kc-n-int) .kc-cplate { box-shadow: inset 0 0 0 .12em #0b0a07, inset 0 0 0 .24em color-mix(in srgb, var(--nc) 80%, #0b0a07), inset 0 0 0 .3em #0b0a07,
    inset .3em .3em 0 .2em rgba(255, 255, 255, .16), inset -.3em -.3em 0 .2em rgba(0, 0, 0, .3), 0 .3em .7em rgba(0, 0, 0, .55); }
.kc-t-order:not(.kc-n-de):not(.kc-n-int) .kc-cplate { box-shadow: inset 0 0 0 .1em rgba(60, 45, 20, .5), inset 0 -.32em 0 color-mix(in srgb, var(--nb) 85%, #000), 0 .3em .7em rgba(0, 0, 0, .55); }
.kc-card:not(.kc-n-de):not(.kc-n-int) .kc-cname:not(.kc-t-order *) { box-shadow: 0 0 0 .1em #0b0a07, 0 0 0 .2em color-mix(in srgb, var(--nc) 85%, #0b0a07), 0 0 0 .27em #0b0a07, inset 0 .08em 0 rgba(255, 255, 255, .5), inset 0 -.08em 0 rgba(0, 0, 0, .25), 0 .15em .3em rgba(0, 0, 0, .5); }
.kc-t-order:not(.kc-n-de):not(.kc-n-int) .kc-cname { border-bottom-color: color-mix(in srgb, var(--nb) 80%, #000); }
/* the badge on its own (lists, tiles, the hero frame) */
.kc-nat { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 4px; border-radius: 4px; font-family: var(--stencil); font-size: 12px; line-height: 1; letter-spacing: .04em; color: var(--nc, #e0d8c0);
    background: linear-gradient(color-mix(in srgb, var(--nb, #555) 80%, #fff), var(--nb, #555) 55%, color-mix(in srgb, var(--nb, #555) 60%, #000)); box-shadow: 0 0 0 1px #0b0a07, inset 0 0 0 1px color-mix(in srgb, var(--nc, #ccc) 55%, transparent);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .7); vertical-align: middle; flex: none; }
.kc-nat-corner { position: absolute; right: 4px; top: 4px; z-index: 2; }
.kc-hub-heroes > span, .kc-decktile-p, .kc-onb-med { position: relative; }
.kc-hub-heroes span .kc-nat-corner { right: -5px; top: auto; bottom: -5px; min-width: 16px; height: 13px; font-size: 9px; padding: 0 2px; }
.kc-decktile-p .kc-nat-corner { right: -3px; top: auto; bottom: -2px; min-width: 16px; height: 13px; font-size: 9px; padding: 0 2px; }
.kc-onb-med .kc-nat-corner { right: -8px; top: 6px; min-width: 30px; height: 24px; font-size: 15px; }
.kc-nat-hero { position: absolute; left: -6%; top: 4%; z-index: 4; font-size: calc(var(--u, 100px) * .11); min-width: 1.9em; height: 1.5em; }
.kc-deckhead small .kc-nat, .kc-recruit b .kc-nat { margin-right: 5px; height: 15px; min-width: 18px; font-size: 10px; }
.kc-pill-nat .kc-nat { height: 16px; min-width: 18px; font-size: 10px; }
.kc-onb-nat { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--nc, var(--gold2)); }
/* the army filter above the branch tabs */
.kc-nattabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.kc-nattab { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 6px; border: 0; border-radius: 3px; cursor: pointer; font: inherit; font-size: 13px; color: var(--paper);
    background: #1b1a15; box-shadow: inset 0 0 0 1px #45422f; }
.kc-nattab .bi { font-size: 15px; color: var(--gold2); margin-left: 4px; }
.kc-nattab[aria-pressed='true'] { background: linear-gradient(color-mix(in srgb, var(--nc, #b99a55) 30%, #302e25), #1d1c16); box-shadow: inset 0 0 0 1px var(--nc, #b99a55), inset 0 -3px 0 var(--nc, #b99a55); }
.kc-nattab-fixed { cursor: default; }
@media (max-width: 700px) { .kc-nattab span { display: none; } .kc-nattab { padding: 0 6px; } }
/* commanders grouped by army */
.kc-natgroup + .kc-natgroup { margin-top: 14px; }
.kc-natgroup-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid #45422f; }
.kc-natgroup-h b { font-family: var(--stencil); font-weight: 400; font-size: 18px; color: var(--paper); }
.kc-natgroup-h small { color: var(--dim); font-size: 12px; }
.kc-natgroup-h .kc-nat { align-self: center; }

/* =================== each army's table and desk (cards-ui.js ARMY_DESK, cards-art.js table()) ===================
   The props sit in the staff college's places round the table; these rules give each army its desk, the frame of its
   table, the sizes of its own things and the life on its map. Colours and objects only — no insignia. */
/* US, war years: an olive-drab field desk, the map table framed in painted steel */
.kc-desk-ww2.kc-army-us { background: radial-gradient(ellipse 60% 55% at 92% 0%, rgba(255, 230, 160, .16), transparent 70%), radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0, 0, 0, .5) 100%),
        repeating-linear-gradient(45deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 5px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 5px),
        linear-gradient(180deg, #57593a, #4b4d31 55%, #3d3f27); }
.kc-army-us .kc-tablewrap { box-shadow: 0 0 0 3px #1a1c10, 0 0 0 13px #60643a, 0 0 0 14px #868b54, 0 0 0 17px #22241a, 0 16px 40px 18px rgba(0, 0, 0, .55), inset 0 0 30px rgba(40, 40, 10, .35); background: #60643a; }
/* UK, war years: a mahogany operations-room table with a brass edge */
.kc-desk-ww2.kc-army-uk { background: radial-gradient(ellipse 60% 55% at 92% 0%, rgba(255, 210, 130, .24), transparent 70%), radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0, 0, 0, .5) 100%),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 7px, rgba(255, 200, 160, .03) 7px 9px, transparent 9px 17px),
        linear-gradient(180deg, #55301f, #47271a 50%, #381d13); }
.kc-army-uk .kc-tablewrap { box-shadow: 0 0 0 3px #1c0e08, 0 0 0 12px #5e321f, 0 0 0 13px #c9a24a, 0 0 0 14px #7a5a22, 0 0 0 17px #2a140c, 0 16px 40px 18px rgba(0, 0, 0, .55), inset 0 0 30px rgba(20, 40, 50, .35); background: #5e321f; }
/* USSR, war years: a walnut desk, the map table bordered in green baize */
.kc-desk-ww2.kc-army-su { background: radial-gradient(ellipse 60% 55% at 92% 0%, rgba(255, 220, 150, .22), transparent 70%), radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0, 0, 0, .5) 100%),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .1) 0 2px, transparent 2px 11px, rgba(255, 220, 170, .03) 11px 13px, transparent 13px 26px),
        linear-gradient(180deg, #45311f, #3a2a1a 50%, #2e2014); }
.kc-army-su .kc-tablewrap { box-shadow: 0 0 0 3px #10180f, 0 0 0 14px #2f4a32, 0 0 0 15px #4f6e50, 0 0 0 18px #23180e, 0 16px 40px 18px rgba(0, 0, 0, .55), inset 0 0 30px rgba(60, 50, 20, .35); background: #2f4a32; }
/* Japan, war years: tatami mats round a dark lacquered chart table */
.kc-desk-ww2.kc-army-jp { background: radial-gradient(ellipse 60% 55% at 92% 0%, rgba(255, 236, 180, .2), transparent 70%), radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0, 0, 0, .45) 100%),
        repeating-linear-gradient(0deg, transparent 0 226px, #2e3424 226px 238px, transparent 238px 240px),
        linear-gradient(90deg, transparent calc(50% - 6px), #2e3424 calc(50% - 6px) calc(50% + 6px), transparent calc(50% + 6px)),
        repeating-linear-gradient(90deg, rgba(90, 70, 20, .2) 0 1px, transparent 1px 4px),
        linear-gradient(180deg, #bfae70, #b2a064 55%, #a39258); }
.kc-army-jp .kc-tablewrap { box-shadow: 0 0 0 3px #0c0806, 0 0 0 13px #2c1a12, 0 0 0 14px #5e3826, 0 0 0 17px #120a06, 0 16px 40px 18px rgba(0, 0, 0, .5), inset 0 0 30px rgba(10, 30, 50, .4); background: #2c1a12; }
.kc-army-jp .kc-d-stain { box-shadow: inset 0 0 0 4px rgba(60, 40, 10, .16), inset 0 0 0 9px rgba(60, 40, 10, .05); }
/* the Cold War rooms: NATO in blue-grey (the UK's a little greener), the Pact in olive, the Self-Defense Forces in light grey */
.kc-desk-cold.kc-army-us { background: radial-gradient(ellipse at 50% 50%, rgba(170, 225, 210, .12), transparent 60%), radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0, 0, 0, .55) 100%),
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(180deg, #303c46, #27323b 60%, #1f282f); }
.kc-desk-cold.kc-army-uk { background: radial-gradient(ellipse at 50% 50%, rgba(140, 200, 240, .14), transparent 60%), radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0, 0, 0, .55) 100%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0 2px, transparent 2px 6px),
        linear-gradient(180deg, #2a3a42, #22313a 60%, #1a262d); }
.kc-desk-cold.kc-army-su { background: radial-gradient(ellipse at 50% 50%, rgba(255, 230, 180, .12), transparent 60%), radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0, 0, 0, .55) 100%),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 2px, transparent 2px 12px),
        linear-gradient(180deg, #3a4230, #303728 60%, #262c20); }
.kc-army-su.kc-desk-cold .kc-tablewrap { box-shadow: 0 0 0 2px #0e1008, 0 0 0 12px #5a3e26, 0 0 0 13px #7a5a3a, 0 0 0 15px #1a1208, 0 0 60px 10px rgba(255, 230, 180, .14), 0 16px 40px 18px rgba(0, 0, 0, .5); }
.kc-army-su.kc-desk-cold .kc-tableglow { box-shadow: inset 0 0 40px rgba(255, 245, 220, .45); background: radial-gradient(ellipse at 50% 50%, rgba(255, 245, 225, .2), transparent 70%); }
.kc-desk-cold.kc-army-jp { background: radial-gradient(ellipse at 50% 50%, rgba(170, 220, 240, .12), transparent 60%), radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0, 0, 0, .5) 100%),
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(180deg, #4a5058, #3f454c 60%, #34393f); }
.kc-army-jp.kc-desk-cold .kc-tablewrap { box-shadow: 0 0 0 2px #14171a, 0 0 0 12px #8b949a, 0 0 0 13px #b4bcc2, 0 0 0 15px #24282c, 0 0 60px 10px rgba(150, 215, 255, .18), 0 16px 40px 18px rgba(0, 0, 0, .45); }
.kc-battle[data-army="su"][data-board="cold"] .kc-et-bracket { background: linear-gradient(#9a8a6a, #6a5a3e 50%, #45391f); }
/* their things: sizes for the sprites that take a staff college place */
.kc-d-rake { left: calc(50% - var(--tw) / 2 + 40px); top: calc(var(--u) * .28 - 13px); z-index: 3; } .kc-d-rake canvas { width: calc(var(--ps) * 2.4); height: calc(var(--ps) * .33); }
.kc-x-ration canvas { width: calc(var(--ps) * .66); height: calc(var(--ps) * .55); }
.kc-x-torch canvas { width: calc(var(--ps) * .95); height: calc(var(--ps) * 1.1); }
.kc-x-zippo canvas { width: calc(var(--ps) * .44); height: calc(var(--ps) * .66); }
.kc-x-sector canvas { width: calc(var(--ps) * .82); height: calc(var(--ps) * .82); }
.kc-x-schoty canvas { width: calc(var(--ps) * .72); height: calc(var(--ps) * .5); }
.kc-x-glass canvas { width: calc(var(--ps) * .5); height: calc(var(--ps) * .66); }
.kc-x-teaset canvas { width: calc(var(--ps) * 1.1); height: calc(var(--ps) * .66); }
.kc-p-mug.kc-x-teaset .kc-steam { left: 30%; }
.kc-desk-cold .kc-x-teaset canvas { width: calc(var(--ps) * .9); height: calc(var(--ps) * .54); }
.kc-x-dividers canvas { width: calc(var(--ps) * .95); height: calc(var(--ps) * .34); }
.kc-x-papirosy canvas { width: calc(var(--ps) * .88); height: calc(var(--ps) * .47); }
.kc-x-cup canvas { width: calc(var(--ps) * .55); height: calc(var(--ps) * .55); }
.kc-d-ashtray.kc-x-glass canvas { width: calc(var(--ps) * .45); height: calc(var(--ps) * .6); }
.kc-p-dice.kc-x-counters canvas { position: absolute; right: 0; bottom: 0; width: calc(var(--ps) * 1.1); height: calc(var(--ps) * .58); }
.kc-p-dice.kc-x-bcompass canvas { position: absolute; right: 6%; bottom: 0; width: calc(var(--ps) * .8); height: calc(var(--ps) * .74); }
.kc-p-dice.kc-x-samovar { height: calc(var(--ps) * 1.3); }
.kc-p-dice.kc-x-samovar canvas { position: absolute; right: 8%; bottom: 0; width: calc(var(--ps) * .9); height: calc(var(--ps) * 1.26); }
.kc-steam.sv { left: auto; right: 37%; top: 6%; }
.kc-puffing canvas { animation: kc-chatter .14s steps(2) 8; }
.kc-puffing .kc-steam { animation-duration: .9s; }
/* life on their maps: two-way shipping, a lorry column, counters pushed across the plot, painted ship blocks */
.kc-ship.s2 { top: 2.4%; scale: -1 1; animation-name: kc-ship2; animation-duration: 96s; animation-delay: -40s; }
@keyframes kc-ship2 { from { left: -12%; } to { left: 104%; } }
.kc-amb-us .kc-ship.s1 { top: 1.2%; }
.kc-amb-cold.kc-amb-uk .kc-ship.s2, .kc-amb-cold.kc-amb-jp .kc-ship.s2 { top: 46%; animation-duration: 120s; }
.kc-trucks { animation-duration: 64s; animation-delay: -20s; }
.kc-ctr { position: absolute; width: clamp(10px, 1.3%, 16px); aspect-ratio: 5 / 3; background: #c8402e; box-shadow: 0 0 0 1px #1d1b16, 1px 2px 2px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .45); animation: kc-ctr1 58s linear infinite; }
.kc-ctr.c2 { background: #e0b02a; animation-name: kc-ctr2; animation-duration: 74s; animation-delay: -26s; }
.kc-ctr.c3 { background: #2f62a8; animation-name: kc-ctr3; animation-duration: 66s; animation-delay: -12s; }
.kc-amb-su .kc-ctr { background: #c0392b; } .kc-amb-su .kc-ctr.c2 { background: #2f5f9f; }
@keyframes kc-ctr1 { from { left: -3%; top: 18%; } to { left: 103%; top: 34%; } }
@keyframes kc-ctr2 { from { left: 103%; top: 78%; } to { left: -3%; top: 60%; } }
@keyframes kc-ctr3 { from { left: 30%; top: -4%; } to { left: 64%; top: 104%; } }
.kc-block { width: clamp(30px, 3.4%, 46px); aspect-ratio: 64 / 20; }
.kc-block::after { left: 0; width: 40%; }
.kc-block.s1 { top: 12%; animation-duration: 130s; }
.kc-block.s2 { top: 72%; scale: -1 1; animation-name: kc-ship2; animation-duration: 150s; animation-delay: -70s; }
.kc-block.s3 { top: 40%; animation-duration: 170s; animation-delay: -110s; }
.kc-amb-jp .kc-blink { border-color: #e8f4fa; } .kc-amb-uk .kc-blink { border-color: #2f62a8; } .kc-amb-uk .kc-blink.b1 { border-color: #c8402e; }
.kc-amb-cold.kc-amb-su .kc-sweep { background: conic-gradient(from 0deg, transparent 0 290deg, rgba(170, 120, 40, .04) 320deg, rgba(170, 120, 40, .14) 358deg, rgba(130, 80, 20, .28) 360deg); }
.kc-amb-cold.kc-amb-jp .kc-sweep { animation-duration: 7s; }
@media (prefers-reduced-motion: reduce) { .kc-ctr, .kc-ship.s2, .kc-block, .kc-puffing canvas { animation: none !important; } }
/* the campaign list, grouped by army: each army's folders in its own colours, locked until one of its commanders serves */
.kc-campswrap { position: absolute; inset: 0; padding: 20px 20px 28px; overflow-y: auto; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 30px 24px; }
.kc-campgroup { flex: 1 1 340px; min-width: 0; }
.kc-campgroup-de { flex: 2 1 700px; }
.kc-campswrap .kc-camps { position: static; inset: auto; padding: 14px 0 0; }
.kc-campgroup .kc-natgroup-h small .bi { margin-right: 3px; }
.kc-folder-txt { font-size: 13px; line-height: 1.3; color: rgba(40, 32, 16, .82); }
.kc-campfolder-us { background: linear-gradient(#cdc79a, #a9a46c); }
.kc-campfolder-uk { background: linear-gradient(#d6c7a6, #b49e74); }
.kc-campfolder-su { background: linear-gradient(#d9cfae, #b9ab7e); }
.kc-campfolder-jp { background: linear-gradient(#e2dcc4, #c4b994); }
.kc-campfolder-su .kc-folder-stamp { color: rgba(170, 40, 30, .8); }
.kc-camp-locked { filter: saturate(.35) brightness(.8); }
.kc-camp-locked:hover { transform: none; filter: saturate(.5) brightness(.88); }
.kc-camp-locked b .bi { font-size: .8em; opacity: .75; }
.kc-brief-k .kc-nat { height: 15px; min-width: 18px; font-size: 10px; vertical-align: 1px; }
@media (max-width: 600px) { .kc-campswrap { padding: 12px 12px 22px; } .kc-campswrap .kc-camps { gap: 22px; padding-top: 18px; } }
.kc-campgroup .kc-natgroup-h { min-height: 50px; align-content: flex-start; row-gap: 2px; }
.kc-campgroup .kc-natgroup-h small { flex-basis: 100%; }

/* ---------------- Neutral (all armies) vs an army's general cards: the shared pool wears a plain grey "ALL" tag with a
   dashed ring; an army's general cards keep their army's monogram */
.kc-cnat.kc-cnat-all { --nb: #5e5d57; --nc: #e6e0cc; font-size: .62em; letter-spacing: .08em; padding: 0 .3em; border-radius: .7em;
    box-shadow: 0 0 0 .1em #0b0a07, 0 0 0 .2em #bdb8a8, 0 0 0 .28em #0b0a07; outline: .07em dashed rgba(230, 224, 204, .55); outline-offset: -.32em; }
.kc-nat.kc-nat-all { --nb: #5e5d57; --nc: #e6e0cc; font-size: 10px; letter-spacing: .08em; border-radius: 9px; padding: 0 5px; }
.kc-clstab .kc-nat-all { height: 16px; }
.kc-grid-h { grid-column: 1 / -1; justify-self: stretch; display: flex; align-items: center; gap: 8px; margin: 4px 0 -14px; padding: 6px 10px; border-radius: 3px;
    background: linear-gradient(90deg, rgba(43, 42, 33, .85), rgba(27, 26, 21, .2)); box-shadow: inset 3px 0 0 var(--gold, #d4b064); font-size: 14px; color: var(--paper, #e8dfc4); }
.kc-grid-h b { font-weight: 600; } .kc-grid-h small { margin-left: auto; color: var(--dim, #9a937c); }
.kc-grid-h-all { box-shadow: inset 3px 0 0 #bdb8a8; }
.kc-onb-tip { max-width: 30ch; font-size: 13px; line-height: 1.3; color: #bfb69a; }
/* ===== the cursor (cards-cursor.js): a drawn pointer inside the card game only =====
   --kc-mc says what a thing is to the cursor (click | info | off | text), inheriting like `cursor`; the rules share one
   specificity (.kc-root + :where), so the later group wins: info, then click, then the info badges on clickable things,
   then off, then text. The system cursor is hidden only while html.kc-mc-live (a mouse inside .kc-root, setting on). */
.kc-root :where([data-tip], [title], .kc-ub, .kc-deckpile, .kc-supply, .kc-hist-i, .kc-ldr-rung, .kc-cur-i, [data-eid], .kc-secret, .kc-weapon, .kc-gcell .kc-card) { --kc-mc: info; }
.kc-root :where(button, a[href], select, label, summary, input[type=checkbox], input[type=radio], input[type=range], [data-a], [data-bt], [data-mi], [data-ks],
    .kc-pickable, .kc-hand > .kc-card, .kc-unit.kc-ready, .kc-hero.kc-ready, .kc-power, .kc-fan-c, .kc-tile, .kc-pack, .kc-flip, .kc-chest, .kc-pin, .kc-prop,
    .kc-p-pin, .kc-reward-c, .kc-mull-c, .kc-disc-c, .kc-packlog, .kc-onb, .kc-rank, .kc-opp, .kc-level, .kc-drow, .kc-herotile, .kc-deckhero, .kc-decktile,
    .kc-campfolder, .kc-chaptab, .kc-nattab, .kc-clstab, .kc-select, .kc-slip-re, .kc-bmenu, .ks-mbtn) { --kc-mc: click; }
.kc-root :where(.kc-ub, .kc-sick .kc-u-zz, .kc-herorow-e .kc-power, .kc-chest.sm, .kc-nattab-fixed, span.kc-cur-i) { --kc-mc: info; }
.kc-root :where(button:disabled, button:disabled *, [aria-disabled=true], [aria-disabled=true] *) { --kc-mc: off; }
.kc-root :where(input:not([type]), input[type=text], input[type=search], input[type=number], textarea, [contenteditable=""], [contenteditable=true]) { --kc-mc: text; }
html.kc-mc-live .kc-root, html.kc-mc-live .kc-root * { cursor: none !important; }
html.kc-mc-live .kc-root :is(input:not([type]), input[type=text], input[type=search], input[type=number], textarea, [contenteditable=""], [contenteditable=true]) { cursor: text !important; }
html.kc-mc-live .kc-arrow:not(.lock) .kc-arrow-r { opacity: 0; } /* the reticle stands where the ring would */

.kc-mc { position: fixed; left: 0; top: 0; z-index: 2147483647; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .12s; will-change: transform; }
.kc-mc.on { opacity: 1; }
.kc-mc * { pointer-events: none; }
.kc-mc-arrow { position: absolute; left: -2px; top: -2px; width: 26px; height: 32px; --s: 1; --sx: 1; --sy: 1;
    transform-origin: 2px 2px; transform: scale(calc(var(--s) * var(--sx)), calc(var(--s) * var(--sy))); transition: transform .13s cubic-bezier(.3, 1.6, .5, 1), filter .15s, opacity .1s; }
.kc-mc-ptr { display: block; overflow: visible; }
.kc-mc-shadow { fill: rgba(0, 0, 0, .45); }
.kc-mc-body { fill: url(#kcMcInk); }
.kc-mc-tip { fill: url(#kcMcBrass); }
.kc-mc-edge { fill: none; stroke: url(#kcMcBrass); stroke-width: 1.6; stroke-linejoin: round; }
.kc-mc-shine { fill: rgba(255, 244, 205, .55); transform: skewX(-24deg); animation: kc-mc-shine 3.6s ease-in-out infinite; }
@keyframes kc-mc-shine { 0%, 55% { transform: translateX(0) skewX(-24deg); } 85%, 100% { transform: translateX(46px) skewX(-24deg); } }
.kc-mc-glint { position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; fill: #fff3c6; opacity: 0; filter: drop-shadow(0 0 3px rgba(240, 207, 126, .9)); }
.kc-mc-tag, .kc-mc-no { position: absolute; display: grid; place-items: center; opacity: 0; transform: scale(.4); transition: opacity .12s, transform .16s cubic-bezier(.3, 1.6, .5, 1); }
.kc-mc-tag { left: 17px; top: 21px; width: 19px; height: 19px; border-radius: 2px 2px 2px 7px; background: #ece4cb; box-shadow: 0 0 0 1px #2a2418, 0 2px 3px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(212, 176, 100, .55); transform-origin: 0 0; }
.kc-mc-tag::before { content: ''; position: absolute; left: 2px; top: 2px; width: 3px; height: 3px; border-radius: 50%; background: #2a2418; }
.kc-mc-tag svg { fill: none; stroke: #2a2418; stroke-width: 2; stroke-linecap: round; }
.kc-mc-no { left: 15px; top: 19px; width: 15px; height: 15px; border-radius: 50%; background: #1b1a15; }
.kc-mc-no svg { fill: none; stroke: #b8352c; stroke-width: 2.4; stroke-linecap: round; }
.kc-mc-ret { position: absolute; left: -24px; top: -24px; overflow: visible; opacity: 0; transform: scale(.5); transition: opacity .12s, transform .16s cubic-bezier(.3, 1.6, .5, 1); fill: none; stroke-linecap: round; }
.kc-mc-ret * { transform-box: view-box; transform-origin: 24px 24px; transition: transform .16s, stroke .15s, fill .15s, opacity .15s; }
.kc-mc-ring { stroke: #f0cf7e; stroke-width: 2.4; stroke-dasharray: 6 3.2; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8)); }
.kc-mc-ticks { stroke: #f0cf7e; stroke-width: 2.6; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .8)); }
.kc-mc-brk { stroke: #f0cf7e; stroke-width: 2.6; opacity: 0; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .8)); }
.kc-mc-dot { fill: #f0cf7e; stroke: #1b1a15; stroke-width: 1; }
/* the states */
.kc-mc.is-click .kc-mc-arrow { --s: 1.14; }
.kc-mc.is-click .kc-mc-glint { animation: kc-mc-glint .5s ease-out; }
@keyframes kc-mc-glint { 0% { opacity: 0; transform: scale(.2) rotate(0); } 35% { opacity: 1; transform: scale(1) rotate(45deg); } 100% { opacity: 0; transform: scale(.5) rotate(90deg); } }
.kc-mc.is-info .kc-mc-tag { opacity: 1; transform: scale(1); animation: kc-mc-swing 1.7s ease-in-out .16s infinite; }
@keyframes kc-mc-swing { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(9deg); } }
.kc-mc.is-off .kc-mc-arrow { filter: grayscale(1) brightness(.75); opacity: .75; }
.kc-mc.is-off .kc-mc-no { opacity: 1; transform: scale(1); }
.kc-mc.is-aim .kc-mc-arrow, .kc-mc.is-carry .kc-mc-arrow { opacity: 0; --s: .6; }
.kc-mc.is-aim .kc-mc-ret, .kc-mc.is-carry .kc-mc-ret { opacity: 1; transform: scale(1); }
.kc-mc.is-aim .kc-mc-ring { animation: kc-mc-spin 6s linear infinite; }
.kc-mc.is-aim .kc-mc-ticks { animation: kc-mc-pulse 1.1s ease-in-out infinite; }
@keyframes kc-mc-spin { to { transform: rotate(360deg); } }
@keyframes kc-mc-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.kc-mc.is-aim.is-lock .kc-mc-ring { stroke: #ff5a3a; stroke-dasharray: none; transform: scale(.82); animation: none; }
.kc-mc.is-aim.is-lock .kc-mc-ticks { stroke: #ff5a3a; transform: scale(.72); animation: kc-mc-lock .5s ease-in-out infinite alternate; }
.kc-mc.is-aim.is-lock .kc-mc-dot { fill: #ff5a3a; }
@keyframes kc-mc-lock { from { transform: scale(.72); } to { transform: scale(.8); } }
.kc-mc.is-carry .kc-mc-ring, .kc-mc.is-carry .kc-mc-ticks { opacity: 0; }
.kc-mc.is-carry .kc-mc-brk { opacity: 1; animation: kc-mc-breathe 1.3s ease-in-out infinite; }
@keyframes kc-mc-breathe { 0%, 100% { transform: scale(.9); } 50% { transform: scale(1.06); } }
.kc-mc.is-down .kc-mc-arrow { --sx: 1.08; --sy: .8; transition-duration: .06s; }
.kc-mc.is-down .kc-mc-ret { transform: scale(.84); transition-duration: .06s; }
.kc-mc-ripple { position: fixed; left: 0; top: 0; z-index: 2147483646; width: 0; height: 0; pointer-events: none; }
.kc-mc-ripple i, .kc-mc-ripple b { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; }
.kc-mc-ripple i { border: 2px solid rgba(240, 207, 126, .9); box-shadow: 0 0 0 1px rgba(27, 26, 21, .6); animation: kc-mc-ring .48s ease-out forwards; }
.kc-mc-ripple b { background: radial-gradient(circle, rgba(42, 36, 24, .55) 0 30%, rgba(42, 36, 24, 0) 62%); animation: kc-mc-ink .55s ease-out forwards; }
@keyframes kc-mc-ring { from { transform: scale(.25); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes kc-mc-ink { from { transform: scale(.2); opacity: .9; } to { transform: scale(1.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .kc-mc, .kc-mc *, .kc-mc-ripple * { animation: none !important; transition: none !important; }
}

/* =================== battle effects layer (cards-vfx.js) =================== */
/* one low-resolution canvas over the board, scaled up with hard pixels; under the damage numbers (.kc-fx is 30), never takes a click */
.kc-vfx-layer { position: fixed !important; left: 0; top: 0; pointer-events: none; z-index: 29 !important; image-rendering: pixelated; }
/* when the canvas draws the shell, the DOM shell only keeps the time */
.kc-shell.kc-vfx-hide { opacity: 0 !important; box-shadow: none !important; }
/* a card blown apart on the canvas: its DOM ghost flashes and is gone at once */
.kc-dying.kc-vfx-blown { animation: kc-vfx-blown calc(var(--t, .76s) * .28) steps(3, end) forwards !important; }
@keyframes kc-vfx-blown { 0% { filter: brightness(3) saturate(0); transform: scale(1.04); opacity: 1; } 100% { filter: brightness(3) saturate(0); transform: scale(1.1); opacity: 0; } }
/* a big blow (5 or more): the number jolts and glows hot */
.kc-splat.kc-vfx-crit svg { filter: drop-shadow(0 0 6px #ffb040) drop-shadow(0 0 2px #fff6c8); }
.kc-splat.kc-vfx-crit b { animation: kc-vfx-crit .3s steps(2, end) 2; }
@keyframes kc-vfx-crit { 0% { transform: translate(-2px, 1px); } 50% { transform: translate(2px, -1px); } 100% { transform: translate(0, 0); } }
@media (prefers-reduced-motion: reduce) { .kc-splat.kc-vfx-crit b { animation: none; } }
