body[data-player-role="setup"] #buildMenu,
body:is([data-player-role="adventurer"],[data-player-role="royal"],[data-player-role="visitor"]) :is(
  #sidebar, #action-mode-hud, #character-info-popup, #footer, .ck-town-bar, .ck-town-mode,
  .ck-kingdom-open, #ck-help, #ck-contract-open, [data-ck-view="castle"],
  #header-stats, #ck-status-toggle, #ck-status
),
body[data-player-role="visitor"] .ck-scene-exit { display: none !important; }

.ck-traveler-hud {
  position: absolute;
  z-index: 7;
  left: 12px;
  bottom: 12px;
  display: grid;
  gap: 5px;
  width: min(276px, calc(100% - 24px));
  font: 500 13px/1.3 "Segoe UI", sans-serif;
  color: #f2e5c9;
  pointer-events: none;
}
.ck-traveler-hud[hidden],
.ck-traveler-hud [hidden] { display: none !important; }
.ck-traveler-hud.ck-hud-encounter { display: none; }
.ck-traveler-vitals, .ck-traveler-track {
  background: #18231dee;
  border: 1px solid #806d48;
  border-radius: 8px;
  box-shadow: 0 3px 12px #0006;
}
.ck-traveler-vitals {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr);
  gap: 8px;
  align-items: center;
  padding: 6px 8px 6px 6px;
}
.ck-traveler-portrait {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  border: 1px solid #ac8d54;
  background: #352f23 url("art/arpg/sheet-adventurer-hood.webp") center 3% / 102% auto no-repeat;
  cursor: pointer;
  pointer-events: auto;
}
.ck-vitals-name, .ck-vitals-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}
.ck-vitals-name { margin-bottom: 2px; }
.ck-vitals-name strong { overflow-wrap: anywhere; font: 600 15px/1.1 Georgia, serif; }
[data-traveler-gold] { color: #ecc578; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ck-vitals-bar { min-height: 16px; font-size: 11px; font-variant-numeric: tabular-nums; }
.ck-vitals-bar span { min-width: 78px; text-align: right; white-space: nowrap; }
.ck-vitals-bar progress, .ck-sheet-xp progress {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 6px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #0c1410;
  color: var(--ck-meter, #c89b55);
}
.ck-vitals-bar progress::-webkit-progress-bar, .ck-sheet-xp progress::-webkit-progress-bar { background: #0c1410; }
.ck-vitals-bar progress::-webkit-progress-value, .ck-sheet-xp progress::-webkit-progress-value { background: currentColor; }
.ck-vitals-bar progress::-moz-progress-bar, .ck-sheet-xp progress::-moz-progress-bar { background: currentColor; }
.ck-vitals-bar[data-vital="health"] { --ck-meter: #d47770; }
.ck-vitals-bar[data-vital="stamina"] { --ck-meter: #a8c879; }
.ck-vitals-bar[data-vital="mana"] { --ck-meter: #83b9db; }
.ck-vitals-bar[data-vital="hunger"] { --ck-meter: #e2ad69; }
.ck-traveler-track { margin: 0; padding: 6px 8px; color: #f1d79c; overflow-wrap: anywhere; }
.ck-traveler-services { display: flex; flex-wrap: wrap; gap: 4px; }
.ck-traveler-services button { pointer-events: auto; }

.ck-character-sheet {
  --sheet-paper: #f2e6ce;
  --sheet-muted: #c5bea7;
  --sheet-line: #645238;
  position: fixed;
  inset: 0;
  width: min(1020px, calc(100% - 32px));
  max-width: none;
  max-height: 94dvh;
  margin: auto;
  padding: 0;
  color: var(--sheet-paper);
  background: #151c17;
  border: 1px solid #9e8050;
  border-radius: 13px;
  box-shadow: 0 24px 70px #000b;
  color-scheme: dark;
  overflow: auto;
  overscroll-behavior: contain;
  font: 500 14px/1.45 "Segoe UI", Arial, sans-serif;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, display .2s allow-discrete, overlay .2s allow-discrete;
}
.ck-character-sheet[open] { opacity: 1; transform: none; }
@starting-style { .ck-character-sheet[open] { opacity: 0; transform: translateY(8px); } }
.ck-character-sheet::backdrop { background: #090e0bd4; }
.ck-character-sheet *, .ck-traveler-hud * { box-sizing: border-box; }
.ck-character-sheet button, .ck-traveler-services button {
  min-height: 38px;
  padding: 5px 10px;
  color: #eee0c4;
  background: #2b362b;
  border: 1px solid #6e5b3d;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.ck-character-sheet button:disabled { opacity: .55; cursor: default; }
.ck-character-sheet button:not(:disabled):hover, .ck-traveler-services button:hover {
  border-color: #e6bf79;
  background-color: #3d472f;
}
.ck-character-sheet :focus-visible, .ck-traveler-hud :focus-visible {
  outline: 2px solid #f2c97b;
  outline-offset: -2px;
}
.ck-sheet-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px;
  background: #20291f;
  border-bottom: 1px solid var(--sheet-line);
}
.ck-character-sheet h2, .ck-character-sheet h3 {
  color: #f0d39a;
  font-family: Georgia, serif;
  font-weight: 600;
  margin: 0;
}
.ck-sheet-header h2 { font-size: clamp(24px,4vw,35px); line-height: 1.02; }
.ck-sheet-header p { margin: 3px 0 0; color: var(--sheet-muted); }
.ck-sheet-header-actions { display: flex; gap: 6px; }
.ck-sheet-header-actions kbd { font: 11px/1 monospace; opacity: .7; margin-left: 4px; }
.ck-sheet-layout { display: grid; grid-template-columns: minmax(280px,.88fr) minmax(0,1fr); }
.ck-sheet-doll {
  min-width: 0;
  padding: 12px 12px 8px;
  background:
    radial-gradient(ellipse at 50% 45%, #5d5133 0%, #333d2e 42%, #18221c 78%),
    #18221c;
  border-right: 1px solid var(--sheet-line);
}
.ck-sheet-xp {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 9px;
  width: min(100%, 320px);
  margin: 0 auto;
  color: #ead6a9;
  font-variant-numeric: tabular-nums;
}
.ck-sheet-xp strong { color: #f4d498; }
.ck-sheet-xp progress { grid-column: 1 / -1; }
.ck-sheet-figure {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(120px,3.1fr) 1fr;
  align-items: center;
  min-height: 310px;
  height: clamp(310px, 55dvh, 525px);
  isolation: isolate;
}
.ck-sheet-figure::before {
  content: "";
  position: absolute;
  inset: 10% 17%;
  border: 1px solid #cdae6f38;
  border-radius: 49% 49% 38% 38%;
  box-shadow: inset 0 0 0 7px #1b271740, 0 0 0 6px #92774120;
  z-index: -1;
}
.ck-paper-doll {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  height: 96%;
  margin: 0;
  justify-self: center;
  pointer-events: none;
  user-select: none;
  aspect-ratio: 2 / 3;
  width: auto;
  max-width: 152%;
  transform-origin: center 89%;
  will-change: transform;
  animation: ck-breath 4.5s ease-in-out infinite;
  filter: drop-shadow(2px 8px 6px #0008);
}
@keyframes ck-breath { 50% { transform: scale(1.012, .988); } }
.ck-doll-base, .ck-doll-layer {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}
.ck-doll-base { background: url("art/arpg/sheet-adventurer-hood.webp") center / contain no-repeat; }
.ck-paper-doll:has(.ck-doll-helm) .ck-doll-base {
  background-image: url("art/arpg/sheet-adventurer.webp");
}
.ck-doll-layer {
  background-image: url("art/arpg/sheet-equipment.webp");
  background-size: 500% 400%;
}
.ck-doll-layer:is([data-quality="magic"], [data-quality="rare"], [data-quality="set"], [data-quality="unique"],
  [data-gear^="kiln"], [data-gear="cinder-mail"], [data-gear="dragon-mantle"]) {
  filter: var(--gear-tint, brightness(1)) drop-shadow(0 0 2px var(--gear-glow, transparent));
}
.ck-doll-layer[data-gear^="kiln"], .ck-doll-layer[data-gear="cinder-mail"] {
  --gear-tint: sepia(.65) saturate(1.75) hue-rotate(-19deg);
}
.ck-doll-layer[data-gear="dragon-mantle"] { --gear-tint: sepia(.55) saturate(1.4) hue-rotate(70deg); }
.ck-doll-layer[data-quality="magic"] { --gear-glow: #85baffb0; }
.ck-doll-layer[data-quality="rare"] { --gear-glow: #fade78d9; }
.ck-doll-layer[data-quality="set"] { --gear-glow: #a8d388bc; }
.ck-doll-layer[data-quality="unique"] { --gear-glow: #f6a25dda; }
.ck-sheet-slots {
  display: grid;
  gap: 5px;
  grid-row: 1;
}
.ck-sheet-slots-0 { grid-column: 1; }
.ck-sheet-slots-1 { grid-column: 3; }
.ck-character-sheet button.ck-sheet-slot {
  display: grid;
  justify-items: center;
  align-content: center;
  justify-self: center;
  width: min(67px,100%);
  min-height: 44px;
  padding: 3px 2px;
  background: #1a241bee;
}
.ck-sheet-slot small { max-width: 100%; overflow-wrap: anywhere; font-size: 11px; color: #ded1af; }
.ck-sheet-slot .ck-arpg-icon, .ck-sheet-slot .ck-location-item-icon { width: 26px; height: 26px; }
.ck-sheet-slot[data-sheet-item], .ck-sheet-inventory button { touch-action: none; user-select: none; }
.ck-sheet-conditions { padding: 5px; color: #f2be91; text-align: center; overflow-wrap: anywhere; }
.ck-sheet-ledger { min-width: 0; padding: 12px; }
.ck-sheet-ledger nav { display: flex; gap: 4px; flex-wrap: wrap; }
.ck-sheet-ledger nav button { flex: 1 0 auto; white-space: nowrap; }
.ck-sheet-ledger nav [aria-current="true"], .ck-character-sheet [aria-pressed="true"] {
  background: #5c4a2d;
  border-color: #d8b477;
  color: #fff1d4;
}
.ck-sheet-content { min-width: 0; display: grid; gap: 8px; align-content: start; }
.ck-sheet-ledger p { margin: 0; color: var(--sheet-muted); overflow-wrap: anywhere; }
.ck-sheet-ledger .ck-sheet-note { margin: 5px 0; min-height: 1.45em; color: #e6b871; }
.ck-sheet-inventory { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; }
.ck-sheet-inventory :is(button, .ck-sheet-empty) {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 34px;
  min-width: 0;
  border-radius: 5px;
  border: 1px solid #514733;
  background: radial-gradient(ellipse at 50% 70%, #303d2d, #1d261f 73%);
  padding: 4px;
}
.ck-sheet-inventory :is(.ck-arpg-icon,.ck-location-item-icon) { width: min(92%,42px); height: auto; aspect-ratio: 1; }
.ck-character-sheet button[data-quality="magic"] { border-color: #80a5db; }
.ck-character-sheet button[data-quality="rare"] { border-color: #efd171; }
.ck-character-sheet button[data-quality="set"] { border-color: #84bc82; }
.ck-character-sheet button[data-quality="unique"] { border-color: #de9d6c; }
.ck-character-sheet button[data-quality][aria-pressed="true"] { outline: 2px solid #ffdda0; outline-offset: -3px; }
.ck-sheet-tooltip { display: grid; gap: 5px; padding: 8px; border: 1px solid var(--sheet-line); border-radius: 6px; background: #222b21; }
.ck-sheet-tooltip .ck-arpg-magic { color: #a2c2f8; }
.ck-sheet-tooltip .ck-arpg-rare { color: #f9d777; }
.ck-sheet-tooltip .ck-arpg-set { color: #a3d894; }
.ck-sheet-tooltip .ck-arpg-unique { color: #f0ab78; }
.ck-sheet-drop {
  border: 1px dashed #827052;
  border-radius: 5px;
  padding: 5px;
  text-align: center;
  color: var(--sheet-muted);
}
.ck-character-sheet .ck-sheet-target { outline: 2px solid #fbe0a1; outline-offset: -2px; background: #4c5738; }
.ck-sheet-drag {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  max-width: 14em;
  transform: translate(-50%,-115%);
  white-space: normal;
  background: #253323;
  border: 1px solid #e5bb74;
  padding: 5px 8px;
  border-radius: 4px;
}
.ck-sheet-stat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; margin: 0; }
.ck-sheet-stat-grid > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--sheet-line);
  border-radius: 6px;
  background: #253024;
}
.ck-sheet-stat-grid dd { margin: 0; color: #f2cc84; }
.ck-sheet-stat-grid button { min-height: 31px; }
.ck-sheet-equipped .ck-sheet-doll { animation: ck-equip .45s ease-out; }
@keyframes ck-equip { 40% { box-shadow: inset 0 0 20px #f3cb744e; } }
.ck-sheet-photo .ck-sheet-ledger, .ck-sheet-photo .ck-sheet-slots { display: none; }
.ck-sheet-photo { width: min(490px, calc(100% - 24px)); }
.ck-sheet-photo .ck-sheet-layout { grid-template-columns: minmax(0,1fr); }
.ck-sheet-photo .ck-sheet-doll { border: 0; }

@media (max-width: 690px) and (orientation: portrait) {
  .ck-character-sheet { width: calc(100% - 12px); max-height: 97dvh; }
  .ck-sheet-layout { grid-template-columns: minmax(0,1fr); }
  .ck-sheet-doll { border-right: 0; border-bottom: 1px solid var(--sheet-line); }
  .ck-sheet-figure { height: 313px; }
  .ck-sheet-ledger { padding: 9px; }
  .ck-sheet-ledger nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-height: 470px) and (orientation: landscape) {
  .ck-character-sheet { width: calc(100% - 12px); max-height: 97dvh; }
  .ck-sheet-layout { grid-template-columns: minmax(225px,.82fr) minmax(0,1fr); }
  .ck-sheet-header { position: static; padding: 6px 12px; }
  .ck-sheet-figure { height: 270px; min-height: 0; }
  .ck-sheet-ledger nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ck-traveler-hud { width: min(236px, calc(100% - 16px)); left: 8px; bottom: 8px; }
}
@media (pointer: coarse) {
  .ck-character-sheet button, .ck-traveler-services button { min-height: 44px; }
  .ck-sheet-header kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ck-character-sheet, .ck-character-sheet .ck-paper-doll, .ck-character-sheet .ck-sheet-doll {
    animation: none; transition: none;
  }
}
.ck-character-sheet, .ck-storefront {
  --carved-frame: url("art/arpg/sheet-frame.webp");
  --parchment: url("art/arpg/sheet-parchment.webp");
  border: 20px solid #34271b;
  border-image: var(--carved-frame) 107 stretch;
  border-radius: 0;
  box-shadow: 0 24px 72px #000d, 0 0 0 1px #312419;
  background: #201b17;
}
.ck-character-sheet {
  --sheet-paper: #f2dfba;
  --sheet-muted: #dfcba8;
  --sheet-line: #80654a;
  width: min(1050px, calc(100% - 32px));
}
.ck-character-sheet button, .ck-storefront button {
  color: #f5e7ca;
  background: linear-gradient(#49382a, #2d241c);
  border-color: #806749;
  border-radius: 3px;
}
.ck-character-sheet button:not(:disabled):hover, .ck-storefront button:not(:disabled):hover {
  background: #5b452e;
  border-color: #e4bf7f;
}
.ck-character-sheet { scroll-padding-top: 84px; }
.ck-sheet-header, .ck-storefront > header {
  background: linear-gradient(108deg, #282b23, #2f241b 75%);
  border-bottom: 1px solid #8a6b47;
}
.ck-sheet-header h2, .ck-storefront h2 { letter-spacing: .015em; color: #f4dca6; }
.ck-sheet-header p, .ck-storefront > header p { color: #d7bf96; }
.ck-sheet-doll {
  background: radial-gradient(ellipse at 50% 39%, #756342, #382f25 49%, #1a1815 87%);
  border-color: #98764b;
}
.ck-sheet-figure {
  grid-template-columns: minmax(47px,1fr) minmax(104px,3.3fr) minmax(47px,1fr);
  height: clamp(340px,57dvh,510px);
}
.ck-sheet-figure::before {
  inset: 9% 17%;
  border-color: #d3ac6f7a;
  background: radial-gradient(ellipse, #cab06b13, transparent 75%);
  box-shadow: inset 0 0 0 6px #221b1580, 0 0 0 4px #c59c552b;
}
.ck-sheet-xp {
  padding: 7px 10px;
  border: 1px solid #896c46;
  background: linear-gradient(#372c22,#211c17);
  box-shadow: inset 0 0 0 2px #211c17;
}
.ck-sheet-slots { gap: 4px; }
.ck-character-sheet button.ck-sheet-slot {
  min-height: 46px;
  width: min(75px,100%);
  border-radius: 2px;
  background: linear-gradient(145deg,#221d18,#32271f);
  box-shadow: inset 0 0 0 2px #1a1613, inset 0 0 8px #090806aa;
}
.ck-sheet-slot small { font-size: 10px; line-height: 1.1; margin-top: 2px; }
.ck-slot-silhouette {
  display: block;
  width: 27px;
  height: 27px;
  background-image: url("art/arpg/sheet-slots.webp");
  background-size: 400% 300%;
  opacity: .65;
}
.ck-sheet-ledger, .ck-storefront-counter {
  background: linear-gradient(#ead4a9b5,#c9ad7d9c), var(--parchment);
  color: #241c14;
}
.ck-sheet-ledger { padding: 12px 16px; }
.ck-sheet-ledger nav, .ck-storefront nav {
  padding: 5px;
  background: #30251c;
  border: 1px solid #9b754b;
  border-radius: 3px;
}
.ck-sheet-ledger nav button {
  min-width: 0;
  padding-inline: 5px;
  font-family: Georgia, serif;
}
.ck-sheet-ledger nav [aria-current="true"], .ck-storefront nav [aria-current="true"] {
  background: #77512e;
  border-color: #dfb97e;
  box-shadow: inset 0 -2px #e1bd7b;
}
.ck-sheet-ledger .ck-sheet-note, .ck-storefront-counter .ck-shop-note { color: #5a361e; margin: 4px 0; }
.ck-sheet-ledger p { color: #402f22; }
.ck-sheet-ledger h3, .ck-storefront-counter h3 {
  color: #382619;
  font-size: 20px;
}
.ck-pack-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.ck-pack-heading :is(span, output) {
  background: #36291f;
  color: #f4d695;
  border: 1px solid #a58a60;
  padding: 4px 8px;
  border-radius: 2px;
}
.ck-sheet-inventory {
  --cell: clamp(44px, 6vw, 56px);
  grid-template-columns: repeat(6, minmax(0,1fr));
  grid-template-rows: repeat(var(--grid-rows), var(--cell));
  gap: 2px;
  padding: 4px;
  background: #211a15;
  border: 1px solid #967652;
  box-shadow: 0 0 0 2px #392d22;
}
.ck-sheet-inventory :is(button, .ck-sheet-empty) {
  aspect-ratio: auto;
  min-height: 0;
  padding: 1px;
  border-radius: 1px;
  border-color: #69523b;
  background: radial-gradient(ellipse at 48% 62%, #382b21, #241d18 75%);
}
.ck-sheet-inventory button {
  z-index: 1;
  background: radial-gradient(ellipse,#54402a,#2a211a 72%);
  box-shadow: inset 0 0 0 2px #211b17, inset 0 0 0 3px #927855;
}
.ck-sheet-inventory button[data-quality] .ck-arpg-icon {
  width: min(76%,58px);
  filter: drop-shadow(1px 3px 3px #080705);
}
.ck-sheet-inventory .ck-sheet-target { z-index: 2; }
.ck-sheet-drop {
  border-color: #856342;
  color: #523a25;
  margin-top: 2px;
}
.ck-sheet-tooltip {
  padding: 10px;
  background: #28201a;
  color: #f5e1ba;
  border-color: #85623b;
}
.ck-sheet-tooltip p, .ck-sheet-tooltip h3 { color: #f5e1ba; }
.ck-sheet-stat-grid > div, .ck-derived-plates dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 37px;
  padding: 5px 8px;
  color: #f3e4c9;
  background: linear-gradient(115deg,#403124,#282019);
  border: 1px solid #8e7050;
  box-shadow: inset 0 0 0 1px #241a12;
  border-radius: 2px;
}
.ck-sheet-stat-grid dd, .ck-derived-plates dd { margin: 0; color: #f5d18d; }
.ck-attribute-plates dd { display: flex; align-items: center; gap: 8px; }
.ck-attribute-plates button { min-width: 36px; }
.ck-derived-plates { display: grid; grid-template-columns: 1.1fr 1fr; gap: 9px; margin-top: 4px; }
.ck-derived-plates dl { display: grid; gap: 4px; margin: 4px 0 0; }
.ck-derived-plates [data-effect="up"] dd { color: #a4e1c2; }
.ck-derived-plates [data-effect="down"] dd { color: #ffad99; }
.ck-character-sheet .ck-sheet-respec { justify-self: start; min-height: 31px; font-size: 12px; }
.ck-character-sheet .ck-skill-tree {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
}
.ck-skill-tree section { min-width: 0; }
.ck-skill-tree h3 { text-align: center; font-size: clamp(14px,2vw,17px); }
.ck-character-sheet .ck-arpg-skill {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  margin: 8px 0 10px;
  padding: 6px;
  color: #f4e5ca;
  background: #30271e;
  border: 1px solid #826347;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
.ck-arpg-skill.ck-skill-prerequisite::before {
  position: absolute;
  top: -11px;
  left: 50%;
  height: 10px;
  border-left: 2px solid #93703f;
  content: "";
}
.ck-arpg-skill.ck-skill-learned { border-color: #bca268; }
.ck-character-sheet .ck-arpg-skill p { color: #dfc9a1; font-size: 12px; }
.ck-arpg-skill .ck-arpg-icon { width: 28px; height: 28px; }
.ck-arpg-skill button { font-size: 12px; }
.ck-character-sheet.ck-sheet-photo { width: min(490px, calc(100% - 24px)); }
.ck-storefront { width: min(1030px,calc(100% - 28px)); max-width: none; max-height: 94dvh; padding: 0; }
.ck-storefront[open] { padding: 0; }
.ck-storefront::backdrop { background: #0a0907d9; }
.ck-storefront > header { padding: 9px 16px; }
.ck-storefront > header h2 { font: 600 clamp(22px,4vw,34px)/1.15 Georgia,serif; }
.ck-storefront > header p { margin: 2px 0 0; }
.ck-storefront-layout { display: grid; grid-template-columns: minmax(200px,.9fr) minmax(0,1fr); }
.ck-merchant-side { background: #261e17; border-right: 1px solid #98764b; }
.ck-merchant-painting {
  position: relative;
  aspect-ratio: 4 / 3;
  background: url("art/arpg/shop-merchant.webp") center / cover;
  box-shadow: inset 0 -10px 32px #000a;
}
.ck-merchant-painting::after {
  position: absolute;
  inset: auto 8px 8px auto;
  width: 72px;
  height: 72px;
  background: var(--shop-type-art, none) center / contain no-repeat;
  content: "";
  filter: drop-shadow(0 3px 3px #090705);
}
.ck-merchant-customer {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #f4dcaa;
  padding: 9px 14px;
  border-top: 1px solid #967247;
}
.ck-merchant-customer span {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 1px solid #9a764c;
  border-radius: 50%;
  background: url("art/arpg/sheet-adventurer-hood.webp") 51% 4% / 185% auto no-repeat, #3b2d22;
}
.ck-merchant-customer strong { font-family: Georgia,serif; }
.ck-merchant-customer p { margin: 2px 0 0; }
.ck-storefront-counter { min-width: 0; padding: 10px; }
.ck-storefront nav { padding: 5px; }
.ck-storefront .ck-shop-content { max-height: 50dvh; overflow: auto; scrollbar-color: #85623d #e4cfaa; }
.ck-storefront .ck-shop-content article {
  flex-wrap: wrap;
  color: #f5e4c4;
  background: #30251e;
  border: 1px solid #a58458;
  min-width: 0;
}
.ck-storefront .ck-shop-content article > div { flex: 1; min-width: 8ch; overflow-wrap: anywhere; }
.ck-storefront form, .ck-storefront-settings, .ck-merchant-total {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.ck-storefront form { max-width: 100%; }
.ck-storefront :is(input, select) { max-width: 100%; min-height: 36px; color: #f5e7ca; background: #382b21; }
.ck-storefront input { width: 85px; }
.ck-merchant-total {
  margin-top: 8px;
  padding: 6px;
  background: #382a20;
  color: #f2d79c;
  border: 1px solid #aa895b;
}
.ck-merchant-total output { flex: 1; }
@media (max-width: 690px) and (orientation: portrait) {
  .ck-character-sheet, .ck-storefront { width: calc(100% - 8px); border-width: 10px; max-height: 98dvh; }
  .ck-sheet-header { padding: 7px 8px; }
  .ck-sheet-header h2 { font-size: clamp(17px,5vw,25px); }
  .ck-sheet-ledger { padding: 7px; }
  .ck-sheet-figure { height: 330px; }
  .ck-sheet-inventory { --cell: clamp(44px,14vw,64px); }
  .ck-storefront-layout { grid-template-columns: minmax(0,1fr); }
  .ck-merchant-side { border-right: 0; }
  .ck-merchant-painting { aspect-ratio: 2 / 1; }
  .ck-storefront .ck-shop-content { max-height: none; }
}
@media (max-height: 470px) and (orientation: landscape) {
  .ck-character-sheet, .ck-storefront { border-width: 12px; }
  .ck-character-sheet { scroll-padding-top: 0; }
  .ck-sheet-figure { height: 294px; }
  .ck-sheet-inventory { --cell: 44px; }
  .ck-storefront .ck-shop-content { max-height: 43dvh; }
}
@media (pointer: coarse) {
  .ck-character-sheet .ck-sheet-respec, .ck-character-sheet .ck-attribute-plates button,
  .ck-storefront button, .ck-storefront :is(input, select) { min-height: 44px; }
  .ck-character-sheet .ck-attribute-plates button { min-width: 44px; }
}

.ck-sheet-header-actions { align-items: center; }
.ck-sheet-header-actions output { color: #eec687; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ck-character-sheet:is([data-tab="equipment"],[data-tab="stash"]) .ck-sheet-header-actions output { display: none; }
@media (max-width: 440px) {
  .ck-sheet-header-actions { justify-content: end; flex-wrap: wrap; gap: 3px; }
  .ck-sheet-header-actions button { padding-inline: 6px; }
  .ck-sheet-header-actions output { flex-basis: 100%; text-align: right; font-size: 12px; }
}
.ck-traveler-loot:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.ck-traveler-loot button {
  min-height: 44px;
  padding: 4px 9px;
  pointer-events: auto;
  background: #2b251a;
  color: #ffdf9f;
  border: 1px solid #987654;
  border-radius: 4px;
}
.ck-sheet-looting .ck-sheet-layout {
  grid-template-columns: minmax(220px, .8fr) minmax(300px, 1fr);
  align-items: start;
}
.ck-sheet-looting :is(.ck-sheet-doll, [data-sheet-title], [data-sheet-photo], [data-sheet-switch]),
.ck-sheet-looting [data-sheet-tab]:not([data-sheet-tab=equipment], [data-sheet-tab=stash]) {
  display: none;
}
.ck-sheet-looting .ck-sheet-header h2 {
  font-size: clamp(17px, 3vw, 27px);
}
.ck-sheet-looting .ck-sheet-ledger nav {
  display: flex;
}
.ck-sheet-looting .ck-sheet-content .ck-pack-heading {
  flex-wrap: wrap;
}
.ck-loot-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 12px;
  padding: 10px;
  max-height: 67dvh;
  background: #261e17;
  border: 1px solid #997851;
  box-shadow: inset 0 0 0 3px #382a20;
}
.ck-loot-panel[hidden] { display: none; }
.ck-loot-list {
  display: grid;
  gap: 4px;
  overflow-y: auto;
  min-height: 45px;
  overscroll-behavior: contain;
}
.ck-loot-list > button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  text-align: left;
  touch-action: pan-y;
  user-select: none;
  overflow-wrap: anywhere;
}
.ck-loot-list :is(.ck-arpg-icon, .ck-location-item-icon, .ck-loot-credit) {
  display: inline-block;
  width: 30px;
  height: 30px;
}
.ck-loot-credit {
  background: center / 75% no-repeat url("art/icons/icons/ffffff/transparent/1x1/lorc/rock.svg");
  opacity: .84;
}
.ck-loot-credit[data-kind=gold] {
  background-image: url("art/icons/icons/ffffff/transparent/1x1/delapouite/two-coins.svg");
  filter: sepia(1) saturate(4);
}
.ck-loot-credit:is([data-kind=satchel], [data-kind=keepsake]) {
  background-image: url("art/icons/icons/ffffff/transparent/1x1/seregacthtuf/pouch-with-beads.svg");
}
.ck-loot-quantity { color: #f2d292; }
.ck-loot-details:not(:empty) {
  position: absolute;
  inset-inline: 10px;
  bottom: 54px;
  z-index: 3;
  pointer-events: none;
}
.ck-loot-panel footer button {
  min-height: 44px;
  width: 100%;
}
.ck-loot-panel kbd {
  margin-inline-start: 7px;
  font-size: .8em;
}
@media (max-width: 620px) and (orientation: portrait) {
  .ck-sheet-looting .ck-sheet-layout { grid-template-columns: minmax(0, 1fr); }
  .ck-loot-panel { max-height: 35dvh; margin: 8px; }
  .ck-sheet-looting .ck-sheet-header-actions output { display: none; }
}
@media (max-height: 470px) and (orientation: landscape) {
  .ck-sheet-looting .ck-sheet-layout { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); }
  .ck-loot-panel { max-height: 63dvh; margin: 7px; }
}
@media (pointer: coarse) {
  .ck-loot-panel kbd { display: none; }
}
