@charset "UTF-8";
/* Printed card faces: charcoal basics, ochre stratagems, green equipment. */
.playing-card {
  --card-ink: #363c2d;
  --card-accent: #5b6248;
  --card-line: #aca07b;
  width: 108px;
  height: 164px;
  flex: 0 0 108px;
  overflow: hidden;
  border: 1px solid #ab9664;
  border-radius: 5px;
  background:
    radial-gradient(ellipse at 20% 14%, #fff6de99, transparent 60%),
    repeating-linear-gradient(97deg, #80664006 0 1px, transparent 1px 4px),
    linear-gradient(135deg, #e9dfbd, #d7c79f 95%);
  color: var(--card-ink);
  box-shadow: 0 3px 0 #95815a, 0 5px 9px #0008, inset 0 0 12px #826b3926;
  transform: none;
  transition: transform .16s ease-out, box-shadow .16s, border-color .16s;
  isolation: isolate;
}
.theme-stratagem { --card-accent: #8d6938; --card-ink: #53412c; --card-line: #b59866; }
.theme-equipment { --card-accent: #3e6355; --card-ink: #304d41; --card-line: #8c9c77; }
.card-frame {
  position: absolute;
  inset: 4px;
  border: 1px solid var(--card-line);
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px #efe2bf, inset 0 0 0 3px #a4906540;
  pointer-events: none;
}
.card-frame::before, .card-frame::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid var(--card-accent);
  opacity: .6;
}
.card-frame::before { left: 2px; top: 2px; border-right: 0; border-bottom: 0; }
.card-frame::after { right: 2px; bottom: 2px; border-left: 0; border-top: 0; }
.playing-card .card-corner {
  top: 11px;
  left: 11px;
  gap: 1px;
  font: 700 22px/.95 Georgia, 'Times New Roman', serif;
  color: #30382d;
}
.playing-card .card-suit { font-size: 17px; line-height: 1.1; }
.playing-card.red-card .card-corner, .playing-card.red-card .card-corner-bottom { color: #a0392c; }
.playing-card .card-name {
  top: 14px;
  right: 11px;
  font: 700 33px/1 var(--display);
  letter-spacing: 3px;
  color: var(--card-ink);
  text-shadow: 0 1px 0 #fff7;
}
.playing-card .card-name.long-name { top: 17px; font: 700 20px/1.05 var(--display); letter-spacing: 2px; }
.playing-card .card-name.extra-long-name { font-size: 18px; letter-spacing: 1px; }
.playing-card.red-card.theme-basic .card-name { color: #9b3629; }
.playing-card .card-art {
  left: 5px;
  top: 37px;
  bottom: 32px;
  width: calc(100% - 26px);
  height: auto;
  opacity: .87;
  transform: none;
  color: var(--card-ink);
  z-index: -1;
  mask-image: linear-gradient(transparent, black 8%, black 90%, transparent);
}
.playing-card .card-art svg { width: 100%; height: 100%; stroke-width: 1.2; }
.playing-card .card-edition {
  position: absolute;
  left: 11px;
  bottom: 43px;
  border: 1px solid #a04b3866;
  padding: 2px 1px;
  writing-mode: vertical-rl;
  font: 9px/1 var(--display);
  letter-spacing: 1px;
  color: #a04b38;
  opacity: .65;
}
.card-bottomline {
  position: absolute;
  bottom: 23px;
  left: 9px;
  right: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 16px;
  border-bottom: 1px solid var(--card-line);
  color: var(--card-accent);
}
.playing-card .card-type {
  position: static;
  font: 600 10px var(--serif);
  letter-spacing: 1px;
  color: inherit;
  text-align: left;
}
.playing-card .card-corner-bottom { position: static; font: 600 10px Georgia, serif; transform: none; color: #30382d; opacity: .8; }
.card-brief { position: absolute; bottom: 10px; left: 8px; right: 8px; font: 9px/1.2 var(--sans); color: #625a40; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hand-row .card-edition { display: none; }
.card-availability { position: absolute; bottom: 42px; left: 9px; padding: 3px 4px; font: 9px/1 var(--sans); background: #e6d8b7e6; border: 1px solid #9b8c655e; color: #766b50; }
.card-availability.available { color: #3b5339; border-color: #6b7b4e66; background: #e3dfb9f0; }
.playing-card.unplayable { filter: none; background-color: #cdbd99; }
.playing-card.unplayable .card-art { opacity: .52; }
.playing-card.unplayable .card-frame { opacity: .65; }
.playing-card.unplayable:hover { filter: none; }
.playing-card:hover { transform: translateY(-4px); border-color: #d6bd7d; box-shadow: 0 3px 0 #9e8452, 0 8px 12px #0008; }
.playing-card.selected {
  transform: translateY(-12px);
  border-color: #ffe09a;
  box-shadow: 0 0 0 2px #ddba63, 0 3px 0 #8e702c, 0 8px 16px #0009;
}
.playing-card.selected .card-frame { border-color: #a9772b; opacity: 1; }
.playing-card.selected .card-availability { background: #8d382c; color: #fff0c9; border-color: #bd7150; }
.playing-card:focus-visible { outline: 2px solid #f7e5a7; outline-offset: 4px; }
.hand-row { gap: 9px; padding: 18px 9px 9px 5px; min-height: 0; scroll-padding: 9px; }
.card-details-button { white-space: nowrap; border-bottom: 1px dotted #b6a67880; }
.card-details-button:disabled { border-color: transparent; }

/* The rule panel is also available by button, without relying on hover. */
.card-tooltip {
  position: fixed;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 374px;
  padding: 15px;
  border: 1px solid #b7a06c;
  background: #e8ddbd;
  color: #3d402e;
  box-shadow: 0 0 0 3px #263829, 0 12px 30px #0008;
  pointer-events: none;
}
.card-tooltip .card-enlarged { width: 104px; height: 158px; flex: 0 0 104px; box-shadow: 0 2px 0 #9e895c, 0 4px 7px #44351f33; }
.card-tooltip .card-enlarged .card-name { font-size: 30px; }
.card-tooltip .card-enlarged .card-name.long-name { font-size: 19px; }
.card-tooltip .card-enlarged .card-name.extra-long-name { font-size: 17px; }
.card-rule-copy { min-width: 0; flex: 1; }
.rule-category { font: 11px var(--serif); letter-spacing: 1px; color: #867148; }
.card-rule-copy h3 { margin: 8px 0 12px; font: 700 24px var(--display); color: #434b34; }
.card-rule-text { font-size: 12px; line-height: 1.9; color: #55563f; overflow-wrap: anywhere; }
.card-rule-status { margin-top: 14px; padding-top: 10px; border-top: 1px solid #b2a07988; color: #85513b; font-size: 11px; line-height: 1.7; }
.card-dialog { width: 590px; }
.card-detail-content { display: flex; align-items: center; gap: 30px; padding: 28px 5px 10px; }
.card-detail-content .card-enlarged { width: 176px; height: 258px; flex: 0 0 176px; cursor: default; box-shadow: 0 3px 0 #9e895c, 0 6px 14px #44351f33; }
.card-enlarged:hover { transform: none; }
.card-detail-content .card-enlarged .card-name { font-size: 50px; top: 22px; right: 18px; }
.card-detail-content .card-enlarged .card-name.long-name { font-size: 31px; letter-spacing: 3px; }
.card-detail-content .card-enlarged .card-name.extra-long-name { font-size: 27px; }
.card-detail-content .card-enlarged .card-corner { font-size: 31px; left: 17px; top: 19px; }
.card-detail-content .card-suit { font-size: 24px; }
.card-detail-content .card-enlarged .card-art { top: 54px; bottom: 48px; width: calc(100% - 34px); left: 6px; }
.card-detail-content .card-edition { bottom: 62px; left: 17px; font-size: 13px; }
.card-detail-content .card-bottomline { bottom: 33px; height: 23px; left: 14px; right: 14px; }
.card-detail-content .card-type { font-size: 13px; }
.card-detail-content .card-corner-bottom { font-size: 13px; }
.card-detail-content .card-enlarged .card-brief { font-size: 12px; bottom: 15px; }
.card-detail-content .card-rule-copy h3 { font-size: 30px; }
.card-detail-content .card-rule-text { font-size: 14px; }

/* Painted functional cards share the same face in hand, tooltip and dialog. */
.playing-card:has(.card-art-painted) {
  background: linear-gradient(135deg, #f1e8d3, #e5d7b8);
}
.playing-card .card-art.card-art-painted {
  inset: 4% 34% 21% 6%;
  width: auto;
  height: auto;
  opacity: 1;
  mask-image: none;
}
.card-art-painted img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.playing-card:has(.card-art-painted) .card-name,
.playing-card:has(.card-art-painted) .card-corner {
  background: #f0e6d3e8;
  box-shadow: 0 0 5px 3px #f0e6d3b3;
  padding: 2px;
  margin: -2px;
}
.playing-card:has(.card-art-painted) .card-name:not(.long-name) { font-size: 26px; }
.card-detail-content .card-enlarged:has(.card-art-painted) .card-name:not(.long-name) { font-size: 36px; }
.playing-card:has(.card-art-painted) .card-edition { display: none; }
.playing-card.unplayable .card-art.card-art-painted { opacity: .82; }

@media (min-width: 641px) {
  .game-shell { min-height: 760px; }
  .game-table { grid-template-rows: 216px minmax(136px, 1fr) 306px; }
  .human-controls { min-height: 0; }
  .player.self { height: 281px; }
}
@media (min-width: 1500px) {
  .game-table { grid-template-rows: 236px minmax(136px, 1fr) 324px; }
  .playing-card { width: 118px; height: 178px; flex-basis: 118px; }
  .player.self { height: 300px; }
  .playing-card .card-name { font-size: 36px; }
  .playing-card .card-name.long-name { font-size: 22px; }
  .playing-card .card-name.extra-long-name { font-size: 19px; }
  .playing-card .card-brief { font-size: 10px; }
  .playing-card .card-art { top: 38px; }
}
@media (max-height: 780px) and (min-width: 941px) {
  .game-table { grid-template-rows: 198px minmax(136px, 1fr) 288px; }
  .playing-card { width: 101px; height: 150px; flex-basis: 101px; }
  .playing-card .card-name { font-size: 30px; }
  .playing-card .card-name.long-name { font-size: 18px; }
  .playing-card .card-name.extra-long-name { font-size: 16px; }
  .player.self { height: 263px; }
}
@media (max-width: 640px) {
  .game-shell { min-height: 760px; }
  .game-table { grid-template-rows: 206px minmax(136px, 1fr) 285px; }
  .human-controls { grid-template-rows: 82px 1fr 33px; }
  .human-zone { grid-template-rows: 82px 1fr; }
  .hand-row { max-height: none; gap: 8px; padding: 17px 7px 6px 5px; }
  .playing-card { width: 100px; height: 150px; flex-basis: 100px; }
  .playing-card .card-name { font-size: 30px; }
  .playing-card .card-name.long-name { font-size: 19px; }
  .playing-card .card-name.extra-long-name { font-size: 17px; }
  .playing-card .card-corner { font-size: 21px; top: 11px; left: 11px; }
  .playing-card .card-art { top: 33px; }
  .playing-card .card-brief { font-size: 9px; }
  .hand-meta { gap: 9px; min-height: 33px; }
  .hand-meta .text-button { min-height: 30px; font-size: 10px; }
  .hand-meta #clear-selection { font-size: 0; }
  .hand-meta #clear-selection::after { content: '取消'; font-size: 10px; }
  .command-actions .primary-button, .command-actions .secondary-button { min-height: 33px; }
  .choice-panel { max-height: 165px; }
  .card-tooltip { display: none; }
  .card-detail-content { gap: 18px; padding: 22px 0 6px; flex-direction: column; }
  .card-detail-content .card-rule-copy { width: 100%; }
  .card-detail-content .card-rule-copy h3 { display: none; }
  .card-detail-content .rule-category { display: block; margin-bottom: 10px; }
  .card-detail-content .card-rule-text { font-size: 13px; }
  .card-detail-content .card-enlarged { width: 150px; height: 223px; flex-basis: 223px; }
  .card-detail-content .card-enlarged .card-name { font-size: 44px; }
  .card-detail-content .card-enlarged .card-name.long-name { font-size: 27px; }
  .card-detail-content .card-enlarged .card-name.extra-long-name { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .playing-card { transition: none; } }
