/* Novus Orbis realms on Pl3xMap, dressed as a grand strategy game of the Middle Ages: dark cloth panels in bevelled
   brass frames with garnet studs, small-capital headings between flourishes, turned-metal buttons. */

:root {
    --ck-f-head: "Cormorant SC", "Cinzel", Georgia, serif;
    --ck-f-body: "EB Garamond", Georgia, "Times New Roman", serif;
    --ck-ink-hi: #f2e5c2;
    --ck-ink: #dccca6;
    --ck-ink-dim: #a6987b;
    --ck-ink-faint: #786c53;
    --ck-gold: #c9a55a;
    --ck-gold-hi: #ecd38f;
    --ck-gold-lo: #7a5a24;
    --ck-garnet: #8c1d27;
    --ck-good: #9ccf7c;
    --ck-bad: #e88a73;
    --ck-panel: #1c1914;
    /* a garnet-set stud for the corners of every frame */
    --ck-stud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fff2c4'/%3E%3Cstop offset='.45' stop-color='%23cfa957'/%3E%3Cstop offset='1' stop-color='%235a3d12'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M9 1 17 9 9 17 1 9z' fill='url(%23g)' stroke='%23110b04' stroke-width='1.1'/%3E%3Ccircle cx='9' cy='9' r='2.7' fill='%238c1d27' stroke='%23110b04' stroke-width='.8'/%3E%3Ccircle cx='8.1' cy='8.1' r='.9' fill='%23ffb0a8' opacity='.85'/%3E%3C/svg%3E");
    /* the lozenge between two dots at the middle of a rule */
    --ck-lozenge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 12'%3E%3Cpath d='M22 1.5 26.5 6 22 10.5 17.5 6z' fill='%23d6b46a' stroke='%23110b04' stroke-width='.8'/%3E%3Ccircle cx='11' cy='6' r='1.4' fill='%23c9a55a'/%3E%3Ccircle cx='33' cy='6' r='1.4' fill='%23c9a55a'/%3E%3C/svg%3E");
    /* fine grain for cloth and paper */
    --ck-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%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 .9 0 0 0 0 .74 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ======================================================================================== the kit */
.ck-frame {
    position: relative;
    color: var(--ck-ink);
    font: 15px/1.35 var(--ck-f-body);
    font-variant-numeric: oldstyle-nums;
    background:
        radial-gradient(130% 70% at 50% 0%, rgba(255, 228, 170, .07), transparent 62%),
        var(--ck-grain),
        linear-gradient(180deg, #24201a, #171410);
    border: 1px solid #0c0905;
    box-shadow:
        inset 0 0 0 1px rgba(255, 236, 190, .07), inset 0 0 26px rgba(0, 0, 0, .5),
        0 0 0 1px #5e4519, 0 0 0 2px #e0c27a, 0 0 0 3px #9b7634, 0 0 0 4px #0c0905,
        0 14px 34px rgba(0, 0, 0, .62);
}
.ck-frame::before {
    content: ""; position: absolute; inset: -10px; pointer-events: none; z-index: 3;
    background: var(--ck-stud) left top / 17px no-repeat, var(--ck-stud) right top / 17px no-repeat,
                var(--ck-stud) left bottom / 17px no-repeat, var(--ck-stud) right bottom / 17px no-repeat;
}
.ck-frame.ck-plain::before { display: none; }

.ck-title {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 32px; padding: 0 14px;
    background: linear-gradient(180deg, #2d271e, #18140f);
    border-bottom: 1px solid #0c0905; box-shadow: 0 1px 0 rgba(212, 176, 98, .42), inset 0 1px 0 rgba(255, 236, 190, .07);
    font: 600 16px/1 var(--ck-f-head); letter-spacing: .09em; color: var(--ck-gold-hi);
    text-shadow: 0 1px 0 #000, 0 0 10px rgba(0, 0, 0, .7);
}
.ck-title::before, .ck-title::after {
    content: ""; flex: 1; max-width: 84px; height: 9px;
    background: linear-gradient(90deg, transparent, var(--ck-gold)) left center / calc(100% - 10px) 1px no-repeat,
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpath d='M4.5 .5 8.5 4.5 4.5 8.5 .5 4.5z' fill='%23d6b46a' stroke='%23110b04' stroke-width='.7'/%3E%3C/svg%3E") right center / 9px no-repeat;
}
.ck-title::after { transform: scaleX(-1); }

.ck-rule {
    height: 12px; margin: 8px 14px;
    background: var(--ck-lozenge) center / 44px 12px no-repeat,
                linear-gradient(90deg, transparent, rgba(201, 165, 90, .7) 22%, rgba(201, 165, 90, .7) 78%, transparent) center / 100% 1px no-repeat;
}

.ck-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.14em; flex: none; }

.ck-btn { /* a dark disc in a turned brass ring */
    position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    border: 4px solid transparent; padding: 0; cursor: pointer; color: #dccca2; font-size: 20px;
    --ck-disc: radial-gradient(circle at 50% 36%, #3c3428 0%, #221d16 55%, #14110d 100%);
    background: var(--ck-disc) padding-box,
                conic-gradient(from 210deg, #5e4519, #e8cf8c, #9b7634, #f5e1a6, #6e5122, #c9a55a, #5e4519) border-box;
    box-shadow: 0 0 0 1px #0c0905, inset 0 2px 2px rgba(255, 236, 190, .12), inset 0 -3px 6px rgba(0, 0, 0, .65), 0 3px 6px rgba(0, 0, 0, .55);
    transition: color .15s, transform .1s, box-shadow .2s;
}
.ck-btn:hover { color: #fff3cf; }
.ck-btn:active { transform: translateY(1px); }
.ck-btn.on { color: #23170a; --ck-disc: radial-gradient(circle at 45% 35%, #fff2c0 0%, #e2bd63 45%, #9b7634 100%);
    box-shadow: 0 0 0 1px #0c0905, inset 0 -3px 6px rgba(90, 60, 10, .45), 0 0 12px rgba(240, 205, 120, .5); }
.ck-btn.sm { width: 32px; height: 32px; border-width: 3px; font-size: 15px; }

.ck-chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 2px 6px; border-radius: 3px; font-size: 13px;
    background: linear-gradient(180deg, rgba(255, 240, 200, .07), rgba(0, 0, 0, .2)); border: 1px solid rgba(201, 165, 90, .35);
    box-shadow: inset 3px 0 0 var(--chip, var(--ck-gold));
}

/* ======================================================================================== the map underneath */
.cka-on .map { background: #22394f !important; }
.cka-on .map.cka-paper { background: var(--ck-grain), #8fa7a3 !important; } /* the chart's open sea, past its edge */
.leaflet-tile-pane { transition: opacity .45s, filter .6s; }
.cka-paper .leaflet-tile-pane { opacity: 0; } /* far out the map is drawn on paper instead */
.cka-on .map::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 450;
    background: radial-gradient(ellipse at center, transparent 58%, rgba(14, 9, 4, .5) 100%);
}
.cka-near.map::after { opacity: .55; }

/* Pl3xMap's own controls, in the same dress (its zoom buttons and block info give way to the frame) */
.cka-on .leaflet-control-zoom, .cka-on .leaflet-control-blockinfo { display: none !important; }
.cka-on .leaflet-control-coordinates, .cka-on .leaflet-control-link, .cka-on #sidebar__content {
    background: linear-gradient(180deg, #24201a, #171410) !important; color: var(--ck-ink) !important;
    border: 1px solid #0c0905 !important; font-family: var(--ck-f-body) !important; border-radius: 0 !important;
    box-shadow: 0 0 0 1px #5e4519, 0 0 0 2px #c9a55a, 0 0 0 3px #0c0905, 0 6px 16px rgba(0, 0, 0, .55) !important;
}
.cka-on .leaflet-control-coordinates { padding: 3px 14px !important; font-variant-numeric: lining-nums tabular-nums; }
.cka-on .leaflet-control-link, .cka-on #sidebar__buttons button {
    border-radius: 50% !important; color: #dccca2 !important; border: 0 !important;
    background: radial-gradient(circle at 50% 36%, #3c3428 0%, #221d16 55%, #14110d 100%) !important;
    box-shadow: 0 0 0 1px #0c0905, 0 0 0 3px #b8954f, 0 0 0 4px #0c0905, inset 0 -3px 6px rgba(0, 0, 0, .6), 0 3px 8px rgba(0, 0, 0, .55) !important;
}
.cka-on #sidebar__buttons { gap: 12px !important; }
.cka-on .leaflet-control-attribution { background: transparent !important; color: rgba(220, 204, 166, .45) !important; font-size: 10px; }
.cka-on .leaflet-control-attribution a { color: inherit !important; }
.cka-on .leaflet-top.leaflet-right { margin-top: 72px; } /* under the date */

/* ======================================================================================== loading */
.ck-veil {
    position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; color: var(--ck-ink);
    background: radial-gradient(ellipse at 50% 42%, #2b2419 0%, #120f0b 72%), #120f0b; transition: opacity .9s;
    font-family: var(--ck-f-body);
}
.ck-veil.gone { opacity: 0; pointer-events: none; }
.ck-veil-inner { display: grid; justify-items: center; gap: 14px; width: min(440px, 86vw); }
.ck-veil-emblem { width: 132px; height: 132px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .7)); animation: ck-breathe 3.4s ease-in-out infinite; }
.ck-veil h1 { margin: 4px 0 0; font: 600 40px/1 var(--ck-f-head); letter-spacing: .16em; color: var(--ck-gold-hi); text-shadow: 0 2px 0 #000; }
.ck-veil p { margin: 0; font-style: italic; color: var(--ck-ink-dim); font-size: 17px; min-height: 1.4em; text-align: center; }
.ck-progress { width: 100%; height: 12px; padding: 2px; background: #0c0905; box-shadow: 0 0 0 1px #6e5122, 0 0 0 2px #c9a55a, 0 0 0 3px #0c0905; }
.ck-progress i { display: block; height: 100%; width: 0; transition: width .5s; background: linear-gradient(180deg, #f1d68c, #b38734 60%, #7a5a24); box-shadow: 0 0 8px rgba(240, 205, 120, .45); }
@keyframes ck-breathe { 50% { transform: scale(1.025); } }

/* ======================================================================================== the frame around the map */
.ck-hud { position: fixed; inset: 0; pointer-events: none; z-index: 1200; }
.ck-hud > * { pointer-events: auto; position: absolute; }

/* the realm's banner, top left */
.ck-banner { left: 14px; top: 14px; display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 10px; }
.ck-banner img { width: 58px; height: 58px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); }
.ck-banner b { display: block; font: 600 25px/1 var(--ck-f-head); letter-spacing: .08em; color: var(--ck-gold-hi); text-shadow: 0 1px 0 #000; }
.ck-banner small { display: block; margin-top: 3px; color: var(--ck-ink-dim); font-style: italic; font-size: 14px; }
.ck-banner .ck-stats { display: flex; gap: 12px; margin-top: 5px; font-size: 13px; color: var(--ck-ink); }
.ck-banner .ck-stats span { display: inline-flex; align-items: center; gap: 4px; }
.ck-banner .ck-stats .ck-ico { color: var(--ck-gold); }

/* the date, top right (beside Pl3xMap's buttons) */
.ck-date { right: 14px; top: 14px; display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; }
.ck-date .ck-ico { font-size: 24px; color: var(--ck-gold); }
.ck-date b { display: block; font: 600 19px/1.05 var(--ck-f-head); letter-spacing: .06em; color: var(--ck-ink-hi); }
.ck-date small { display: block; font-size: 13px; color: var(--ck-ink-dim); font-style: italic; }

/* the outliner, left */
.ck-outliner { left: 14px; top: 116px; width: 318px; max-height: calc(100vh - 136px); display: flex; flex-direction: column; }
.ck-tabs { display: flex; align-items: stretch; background: linear-gradient(180deg, #2d271e, #18140f); border-bottom: 1px solid #0c0905; box-shadow: 0 1px 0 rgba(212, 176, 98, .42); }
.ck-tabs button { flex: 1; padding: 8px 4px 7px; border: 0; background: none; cursor: pointer; color: var(--ck-ink-dim); font: 600 15px/1 var(--ck-f-head); letter-spacing: .08em; border-bottom: 2px solid transparent; }
.ck-tabs button:hover { color: var(--ck-ink-hi); }
.ck-tabs button.on { color: var(--ck-gold-hi); border-bottom-color: var(--ck-gold); background: linear-gradient(0deg, rgba(212, 176, 98, .16), transparent); }
.ck-tabs .ck-fold { flex: 0 0 36px; font-size: 16px; }
.ck-outliner.folded .ck-body { display: none; }
.ck-body { display: flex; flex-direction: column; min-height: 0; }
.ck-search { display: flex; align-items: center; gap: 8px; margin: 10px 12px 6px; padding: 5px 10px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(201, 165, 90, .35); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); }
.ck-search .ck-ico { color: var(--ck-gold); font-size: 16px; }
.ck-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ck-ink-hi); font: 15px var(--ck-f-body); }
.ck-search input::placeholder { color: var(--ck-ink-faint); font-style: italic; }
.ck-list { overflow: auto; padding: 2px 0 8px; scrollbar-width: thin; scrollbar-color: #6e5122 transparent; }
.ck-row { display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 9px; padding: 5px 12px; cursor: pointer; border-top: 1px solid rgba(201, 165, 90, .08); }
.ck-row:hover { background: linear-gradient(90deg, rgba(212, 176, 98, .16), transparent); }
.ck-row img.arms { width: 26px; height: 28px; }
.ck-row .nm { min-width: 0; }
.ck-row .nm b { display: block; font-weight: 600; color: var(--ck-ink-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-row .nm small { display: block; font-size: 13px; color: var(--ck-ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-row .nm em { color: var(--ck-gold-hi); font-style: normal; }
.ck-row canvas.face { width: 24px; height: 24px; image-rendering: pixelated; box-shadow: 0 0 0 1px #0c0905, 0 0 0 2px #9b7634; }
.ck-row .ct { display: inline-flex; align-items: center; gap: 3px; min-width: 38px; justify-content: flex-end; color: var(--ck-ink); font-size: 14px; }
.ck-row .ct .ck-ico { color: var(--ck-gold); font-size: 12px; }
.ck-row .rk { position: absolute; }
.ck-empty { padding: 10px 14px; color: var(--ck-ink-faint); font-style: italic; }
.ck-warbar { height: 5px; margin-top: 4px; background: rgba(0, 0, 0, .5); box-shadow: 0 0 0 1px #0c0905; }
.ck-warbar i { display: block; height: 100%; background: linear-gradient(90deg, #7d2418, #d0583a); }

/* the map modes, bottom right */
.ck-modes { right: 14px; bottom: 82px; padding: 10px 12px 12px; display: grid; gap: 8px; justify-items: center; }
.ck-modes .ck-mode-name { font: 600 15px/1 var(--ck-f-head); letter-spacing: .1em; color: var(--ck-gold-hi); text-shadow: 0 1px 0 #000; }
.ck-modes .ck-row-btns { display: flex; gap: 10px; align-items: center; }
.ck-modes .ck-btn { width: 40px; height: 40px; font-size: 19px; }
@media (max-width: 1180px) and (min-width: 761px) { .ck-outliner { max-height: calc(100vh - 330px); } } /* clear of the map modes */
.ck-modes .ck-zoom { display: flex; gap: 9px; margin-left: 4px; padding-left: 12px; border-left: 1px solid rgba(201, 165, 90, .3); }
.ck-legend { right: 14px; bottom: 182px; padding: 8px 12px; max-width: 300px; font-size: 14px; }
.ck-legend div { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.ck-legend i { width: 14px; height: 14px; flex: none; box-shadow: 0 0 0 1px #0c0905, inset 0 0 0 1px rgba(255, 255, 255, .25); }
.ck-legend .ck-ico { color: var(--ck-ink-hi); }

/* the tooltip */
.ck-tip { position: fixed; left: 0; top: 0; z-index: 1300; pointer-events: none; min-width: 190px; max-width: 280px; padding: 0 0 8px; font-size: 14px; }
.ck-tip header { padding: 6px 12px 5px; font: 600 16px/1.1 var(--ck-f-head); letter-spacing: .05em; color: var(--ck-gold-hi); background: linear-gradient(180deg, #2d271e, #1b1712); border-bottom: 1px solid rgba(201, 165, 90, .35); }
.ck-tip header small { display: block; font: italic 12.5px var(--ck-f-body); letter-spacing: 0; color: var(--ck-ink-dim); margin-top: 2px; }
.ck-tip p { margin: 6px 12px 0; display: flex; align-items: center; gap: 7px; }
.ck-tip p i { width: 11px; height: 11px; flex: none; box-shadow: 0 0 0 1px #0c0905; }
.ck-tip em { color: var(--ck-gold-hi); font-style: normal; }
.ck-tip .oc { color: var(--ck-bad); }
.ck-tip .ck-ico { color: var(--ck-gold); }

.ck-hud [hidden], .ck-tip[hidden], .ck-window [hidden] { display: none !important; } /* over Pl3xMap's ul { display } */

/* ======================================================================================== the title window */
.ck-window {
    position: fixed; left: 14px; top: 14px; bottom: 14px; width: min(430px, calc(100vw - 28px)); z-index: 1250;
    display: flex; flex-direction: column; transform: translateX(calc(-100% - 40px)); transition: transform .38s cubic-bezier(.2, .85, .25, 1);
}
.ck-window.open { transform: none; }
.ck-scroll { overflow: auto; flex: 1; min-height: 0; padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: #6e5122 transparent; }
.ck-x { position: absolute; right: 10px; top: 10px; z-index: 4; }
.ck-whead { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: end; padding: 18px 54px 14px 16px;
    background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c) 42%, transparent), transparent 70%), linear-gradient(180deg, #2d271e, #18140f);
    border-bottom: 1px solid #0c0905; box-shadow: 0 1px 0 rgba(212, 176, 98, .42); }
.ck-arms { position: relative; width: 84px; padding-top: 22px; }
.ck-arms .crown { position: absolute; left: 50%; top: 0; width: 60px; transform: translateX(-50%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
.ck-arms .shield { width: 84px; display: block; filter: drop-shadow(0 5px 7px rgba(0, 0, 0, .65)); }
.ck-tier { font: 600 13px/1 var(--ck-f-head); letter-spacing: .2em; color: var(--ck-gold); }
.ck-whead h2 { margin: 3px 0 6px; font: 600 27px/1.05 var(--ck-f-head); letter-spacing: .02em; color: var(--ck-ink-hi); text-shadow: 0 2px 0 #000; }
.ck-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; font-size: 13.5px; color: var(--ck-ink-dim); }
.ck-chain .ck-ico { font-size: 9px; color: var(--ck-gold-lo); }
.ck-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: #e2cd95; text-decoration: underline dotted rgba(226, 205, 149, .55); text-underline-offset: 3px; }
.ck-link:hover { color: #fff0c4; }

.ck-holder { display: grid; grid-template-columns: 148px 1fr; gap: 14px; padding: 16px 16px 4px; }
.ck-portrait { position: relative; width: 148px; height: 194px; border-radius: 74px 74px 6px 6px / 54px 54px 6px 6px; overflow: hidden;
    background: radial-gradient(90% 70% at 50% 28%, color-mix(in srgb, var(--c) 70%, #fff 12%), color-mix(in srgb, var(--c) 52%, #000 48%) 78%), var(--ck-grain);
    box-shadow: inset 0 0 0 1px rgba(255, 236, 190, .18), inset 0 -26px 30px rgba(0, 0, 0, .5), 0 0 0 1px #0c0905, 0 0 0 3px #c9a55a, 0 0 0 4px #6e5122, 0 0 0 5px #0c0905, 0 8px 18px rgba(0, 0, 0, .6); }
.ck-portrait canvas { position: absolute; left: 0; right: 0; bottom: 6px; margin: auto; width: 144px; height: 176px; image-rendering: pixelated; }
.ck-portrait::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 3px; height: 14px; border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 0, 0, .55), transparent 70%); }
.ck-who .ck-role { font: 600 12px/1 var(--ck-f-head); letter-spacing: .2em; color: var(--ck-gold); }
.ck-who h3 { margin: 4px 0 2px; font: 600 21px/1.1 var(--ck-f-head); color: var(--ck-ink-hi); }
.ck-who p { margin: 2px 0; font-size: 14px; color: var(--ck-ink-dim); }
.ck-player { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 2px; padding: 2px 10px 3px 8px; font-weight: 600; color: #2a1a07;
    background: linear-gradient(180deg, #f4dc94, #c9a24b); box-shadow: 0 0 0 1px #0c0905, inset 0 1px 0 rgba(255, 255, 255, .5); }
.ck-player .dot { width: 8px; height: 8px; border-radius: 50%; background: #2f8f3a; box-shadow: 0 0 0 1px #0c0905; }
.ck-player em { font-style: normal; font-size: 11px; color: #5c4210; }
.ck-traits { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 2px; }
.ck-traits .good { --chip: var(--ck-good); } .ck-traits .bad { --chip: var(--ck-bad); } .ck-traits .neutral { --chip: var(--ck-gold); } .ck-traits .edu { --chip: #8fb3e8; }
.ck-skills { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 16px 0; }
.ck-skill { display: grid; justify-items: center; gap: 2px; padding: 6px 0 4px; background: linear-gradient(180deg, rgba(255, 240, 200, .06), rgba(0, 0, 0, .25)); box-shadow: 0 0 0 1px rgba(201, 165, 90, .28), inset 0 1px 0 rgba(255, 236, 190, .06); }
.ck-skill .ck-ico { font-size: 19px; color: var(--ck-gold-hi); }
.ck-skill b { font: 600 17px/1 var(--ck-f-body); color: var(--ck-ink-hi); }
.ck-pp { display: flex; justify-content: center; gap: 20px; margin: 10px 16px 0; font-size: 15px; }
.ck-pp span { display: inline-flex; align-items: center; gap: 5px; }
.ck-pp .ck-ico { color: var(--ck-gold); }
.ck-war { margin: 0 16px; padding: 9px 12px; background: linear-gradient(90deg, rgba(125, 36, 24, .35), rgba(0, 0, 0, .15)); box-shadow: 0 0 0 1px rgba(208, 88, 58, .5); }
.ck-war b { display: flex; align-items: center; gap: 7px; font: 600 16px/1.1 var(--ck-f-head); color: #f0b39f; }
.ck-war span, .ck-war small { display: block; color: var(--ck-ink-dim); font-size: 13.5px; }
.ck-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px; }
.ck-fact { padding: 6px 9px 7px; background: rgba(0, 0, 0, .22); box-shadow: 0 0 0 1px rgba(201, 165, 90, .2); min-width: 0; }
.ck-fact.wide { grid-column: span 3; }
.ck-fact small { display: flex; align-items: center; gap: 5px; font: 600 11.5px/1 var(--ck-f-head); letter-spacing: .16em; color: var(--ck-gold); }
.ck-fact b { display: block; margin-top: 3px; font-weight: 600; color: var(--ck-ink-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-fact span { display: block; font-size: 12.5px; color: var(--ck-ink-dim); }
.ck-bar { height: 8px; margin-top: 5px; padding: 1px; background: #0c0905; box-shadow: 0 0 0 1px #5e4519; }
.ck-bar i { display: block; height: 100%; background: linear-gradient(180deg, #b9da85, #5f8a3a); }
.ck-bar.ctrl i { background: linear-gradient(180deg, #f1d68c, #9b7634); }
.ck-sect { padding: 0 16px; }
.ck-sect > h4 { margin: 0 0 6px; font: 600 14px/1 var(--ck-f-head); letter-spacing: .16em; color: var(--ck-gold); }
.ck-holdings { list-style: none; margin: 0; padding: 0; }
.ck-holdings li { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 8px; padding: 4px 6px; border-top: 1px solid rgba(201, 165, 90, .08); }
.ck-holdings li .ck-ico { font-size: 18px; color: var(--ck-ink); }
.ck-holdings li.on { background: linear-gradient(90deg, rgba(212, 176, 98, .2), transparent); }
.ck-holdings li.on .ck-ico { color: var(--ck-gold-hi); }
.ck-holdings em { font-style: italic; font-size: 13px; color: var(--ck-ink-dim); }
.ck-holdings .occ { color: var(--ck-bad); }
.ck-titles { display: flex; flex-wrap: wrap; gap: 6px; }
.ck-titles .ck-chip img { width: 18px; height: 20px; }
.ck-foot { margin: 12px 16px 0; font-size: 12.5px; color: var(--ck-ink-faint); font-style: italic; }

/* ======================================================================================== rulers on the map */
.cka-icon { background: none !important; border: 0 !important; }
.ckm { position: relative; width: 100%; height: 100%; cursor: pointer; filter: drop-shadow(0 6px 9px rgba(0, 0, 0, .6)); transition: transform .18s; }
.ckm:hover { transform: scale(1.1); }
.ckm-disc { position: absolute; inset: 10%; border-radius: 50%; overflow: hidden;
    background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--c) 72%, #fff 22%), var(--c) 52%, color-mix(in srgb, var(--c) 50%, #000 50%)), var(--ck-grain);
    box-shadow: inset 0 -8px 14px rgba(0, 0, 0, .45); }
.ckm-fig { position: absolute; left: 50%; bottom: -4%; width: 92%; transform: translateX(-50%); image-rendering: pixelated; }
.ckm-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ckm-crown { position: absolute; left: 50%; top: -21%; width: 56%; transform: translateX(-50%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55)); }
.ckm-coa { position: absolute; right: -12%; bottom: -10%; width: 40%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
/* the name on a ribbon with swallow-tailed ends */
.ckm-name { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 3px; padding: 2px 14px 3px; white-space: nowrap; text-align: center; line-height: 1.1;
    color: #2a1b0c; background: linear-gradient(180deg, #f3e7c6, #d6c293); box-shadow: inset 0 1px 0 #fff8e2, inset 0 -1px 0 #9c8456, 0 2px 4px rgba(0, 0, 0, .55); }
.ckm-name::before, .ckm-name::after { content: ""; position: absolute; top: 5px; width: 13px; height: calc(100% - 2px); background: linear-gradient(180deg, #c8b07c, #9c8456); z-index: -1; }
.ckm-name::before { left: -9px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 45% 50%); }
.ckm-name::after { right: -9px; clip-path: polygon(0 0, 100% 0, 55% 50%, 100% 100%, 0 100%); }
.ckm-name b { display: block; font: 700 14px/1.05 var(--ck-f-head); letter-spacing: .03em; }
.ckm-name span { display: block; font: italic 11.5px/1.15 var(--ck-f-body); color: #5a4321; }
.ckm-name i { display: block; font: 600 11.5px/1.15 var(--ck-f-body); font-style: normal; color: #7a1620; }
.ckm.is-player .ckm-name { background: linear-gradient(180deg, #f8e3a2, #d3a94e); box-shadow: inset 0 1px 0 #fff4cf, inset 0 -1px 0 #8a6424, 0 2px 4px rgba(0, 0, 0, .55); }
.ckm.is-player .ckm-name::before, .ckm.is-player .ckm-name::after { background: linear-gradient(180deg, #c99a3e, #8a6424); }
/* plates: in full on the large medallions; on the rest only a player's name shows until hovered */
.ckm-M .ckm-name b, .ckm-M .ckm-name span, .ckm-quiet .ckm-name b, .ckm-quiet .ckm-name span { display: none; }
.ckm-M:hover .ckm-name b, .ckm-M:hover .ckm-name span, .ckm-quiet:hover .ckm-name b, .ckm-quiet:hover .ckm-name span { display: block; }
.ckm-M:not(.is-player) .ckm-name, .ckm-quiet:not(.is-player) .ckm-name { opacity: 0; transition: opacity .15s; pointer-events: none; }
.ckm-M:hover .ckm-name, .ckm-quiet:hover .ckm-name { opacity: 1; }
/* a player's medallion sits in a still glow: nothing on the map animates while it is left alone */
.ckm.is-player::before { content: ""; position: absolute; inset: -14%; border-radius: 50%; z-index: -1; background: radial-gradient(circle, rgba(255, 214, 120, .42), transparent 66%); }

/* ======================================================================================== phones */
@media (max-width: 760px) {
    .ck-banner { left: 8px; top: 8px; padding: 6px 12px 6px 8px; }
    .ck-banner img { width: 40px; height: 40px; }
    .ck-banner b { font-size: 19px; }
    .ck-banner small, .ck-banner .ck-stats { display: none; }
    .ck-date { right: 8px; top: 8px; padding: 5px 10px; }
    .ck-date b { font-size: 15px; }
    .ck-date small { display: none; }
    .ck-outliner { left: 8px; right: 8px; top: 66px; width: auto; max-height: 46vh; }
    .ck-outliner.folded { right: auto; width: 250px; }
    .ck-modes { left: 50%; right: auto; transform: translateX(-50%); bottom: 64px; padding: 8px 10px 10px; width: max-content; max-width: calc(100vw - 16px); }
    .ck-modes .ck-row-btns { gap: 6px; flex-wrap: wrap; justify-content: center; }
    .ck-modes .ck-btn { width: 33px; height: 33px; border-width: 3px; font-size: 16px; }
    .ck-modes .ck-zoom { display: none; }
    .ck-legend { right: 8px; bottom: 196px; max-width: 60vw; font-size: 13px; }
    .ck-window { left: 8px; top: 8px; bottom: 8px; width: calc(100vw - 16px); }
    .cka-on .leaflet-top.leaflet-right { margin-top: 56px; }
}
