/* The felt inlay keeps its ornamental corners at different table sizes. */
.portrait-game .portrait-shell {
  --brass-table: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2296%22%20height%3D%2296%22%20viewBox%3D%220%200%2096%2096%22%20fill%3D%22none%22%20shape-rendering%3D%22crispEdges%22%3E%3Cpath%20d%3D%22M32%204h32M92%2032v32M64%2092H32M4%2064V32%22%20stroke%3D%22%23544b33%22%20stroke-width%3D%223%22%2F%3E%3Cpath%20d%3D%22M32%204h32M92%2032v32M64%2092H32M4%2064V32%22%20stroke%3D%22%23c1a165%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22M32%208h32M88%2032v32M64%2088H32M8%2064V32%22%20stroke%3D%22%238a7954%22%20stroke-width%3D%221%22%2F%3E%3Cg%3E%3Cpath%20d%3D%22M3%2034V12h3V8h4V5h5V3h19%22%20stroke%3D%22%233c3829%22%20stroke-width%3D%223%22%2F%3E%3Cpath%20d%3D%22M4%2034V12h3V9h4V6h5V4h18%22%20stroke%3D%22%23ba9958%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M8%2035v-9h4v-5h4v-4h-1v-3h5v-3h5V8h10%22%20stroke%3D%22%23776946%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M9%2034v-7h4v-5h5v-3h4v-4h5v-5h7%22%20stroke%3D%22%23b1955d%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22M8%2026v-6h-2v-5h2v-3h3V9h6v2h-4v3h-3v4h2v2h2%22%20stroke%3D%22%23d5b274%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22M22%209h-4V7h-4%22%20stroke%3D%22%23e3c58a%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20fill%3D%22%23ceb175%22%20d%3D%22M17%2011h2v2h2v2h2v3h-1v1h-3v-1h-1v3h2v1h-6v-1h2v-3h-1v1h-3v-1h-1v-3h2v-2h2v-2h2z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22rotate(90%2048%2048)%22%3E%3Cpath%20d%3D%22M3%2034V12h3V8h4V5h5V3h19%22%20stroke%3D%22%233c3829%22%20stroke-width%3D%223%22%2F%3E%3Cpath%20d%3D%22M4%2034V12h3V9h4V6h5V4h18%22%20stroke%3D%22%23ba9958%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M8%2035v-9h4v-5h4v-4h-1v-3h5v-3h5V8h10%22%20stroke%3D%22%23776946%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M9%2034v-7h4v-5h5v-3h4v-4h5v-5h7%22%20stroke%3D%22%23b1955d%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22M8%2026v-6h-2v-5h2v-3h3V9h6v2h-4v3h-3v4h2v2h2%22%20stroke%3D%22%23d5b274%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22M22%209h-4V7h-4%22%20stroke%3D%22%23e3c58a%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20fill%3D%22%23ceb175%22%20d%3D%22M17%2011h2v2h2v2h2v3h-1v1h-3v-1h-1v3h2v1h-6v-1h2v-3h-1v1h-3v-1h-1v-3h2v-2h2v-2h2z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22rotate(180%2048%2048)%22%3E%3Cpath%20d%3D%22M35%204H9v2H6v3H4v26%22%20stroke%3D%22%23ae955f%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M35%208H12v2h-2v2H8v23%22%20stroke%3D%22%237c7051%22%20stroke-width%3D%221%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22rotate(270%2048%2048)%22%3E%3Cpath%20d%3D%22M35%204H9v2H6v3H4v26%22%20stroke%3D%22%23ae955f%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M35%208H12v2h-2v2H8v23%22%20stroke%3D%22%237c7051%22%20stroke-width%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
.portrait-game .portrait-shell::after,
.portrait-game .arena::after {
  content: "";
  display: block;
  position: absolute;
  box-sizing: border-box;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: solid transparent;
  border-radius: 0;
  pointer-events: none;
  background: transparent;
  opacity: 1;
  transform: none;
}
.portrait-game .portrait-shell::after {
  z-index: 12;
  inset: -1px;
  border: 1px solid #0c1b24;
  box-shadow: inset 0 0 0 1px #6d7d82,
    inset 0 0 0 2px #465762, inset 0 0 0 4px #344750,
    inset 0 0 0 5px #293944, inset 0 0 0 6px #111f28;
  background: linear-gradient(90deg,#78908c,#435661 26%,#364750 88%,#1a2a34) top / 100% 2px no-repeat;
}
.portrait-game .arena::after {
  z-index: 4;
  inset: 6px clamp(7px,1.85cqi,10px) clamp(7px,1.85cqi,10px);
  border-width: clamp(18px,5.6cqi,27px);
  border-image-source: var(--brass-table);
  border-image-slice: 35;
  border-image-repeat: stretch;
}
.portrait-game .portrait-shell > header {
  border-bottom-color: #987c4d;
  box-shadow: inset 0 1px #73818a, inset 0 3px #374953,
    inset 0 -2px #0d1a24, inset 0 -3px #596563, 0 2px #071a20;
}
.portrait-game .actions #play {
  --key-label: #f8edd0;
  --key-shadow: #204538;
  --key-top: #a3e2b8;
  --key-face: #65c197;
  --key-base: #55ad87;
  --key-lip: #28664f;
  --key-shine: #cadea4;
}
.portrait-game .actions #swap {
  --key-label: #ffedc9;
  --key-shadow: #693832;
  --key-top: #f5ac8d;
  --key-face: #df7b68;
  --key-base: #c56554;
  --key-lip: #813f37;
  --key-shine: #f0bc92;
}
.portrait-game .actions #stand {
  --key-label: #fff0c9;
  --key-shadow: #684e2a;
  --key-top: #f3cf8c;
  --key-face: #d6a962;
  --key-base: #bd8d4e;
  --key-lip: #846337;
  --key-shine: #f2d296;
}
.portrait-game .actions :is(#play,#swap,#stand) {
  isolation: isolate;
  border: 0;
  border-radius: 0;
  clip-path: polygon(0 4px,2px 4px,2px 2px,4px 2px,4px 0,calc(100% - 4px) 0,calc(100% - 4px) 2px,calc(100% - 2px) 2px,calc(100% - 2px) 4px,100% 4px,100% calc(100% - 4px),calc(100% - 2px) calc(100% - 4px),calc(100% - 2px) calc(100% - 2px),calc(100% - 4px) calc(100% - 2px),calc(100% - 4px) 100%,4px 100%,4px calc(100% - 2px),2px calc(100% - 2px),2px calc(100% - 4px),0 calc(100% - 4px));
  background: #142b2b;
  color: var(--key-label);
  box-shadow: none;
  text-shadow: 0 2px var(--key-shadow), 1px 1px var(--key-shadow), -1px 1px var(--key-shadow),
    1px 0 var(--key-shadow), -1px 0 var(--key-shadow), 0 -1px var(--key-shadow);
}
.portrait-game .actions :is(#play,#swap,#stand)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2px;
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 2px;
  opacity: 1;
  animation: none;
  transform: none;
  pointer-events: none;
  background:
    linear-gradient(var(--key-shine),var(--key-shine)) top 2px left 3px / calc(100% - 6px) 1px no-repeat,
    linear-gradient(90deg,var(--key-top) 0 2px,transparent 2px calc(100% - 2px),var(--key-lip) calc(100% - 2px)) top / 100% calc(100% - 5px) no-repeat,
    linear-gradient(180deg,var(--key-top) 0 3px,var(--key-face) 4px,var(--key-base) calc(100% - 6px),var(--key-lip) calc(100% - 5px));
}
.portrait-game .actions :is(#play,#swap,#stand) small {
  color: var(--key-shadow);
  text-shadow: 0 1px #ffe7bc6b;
  opacity: 1;
}
.portrait-game .portrait-shell .hand-area .actions button:is(#play,#swap,#stand) {
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  animation: none;
}
.portrait-game .portrait-shell .hand-area .actions button:is(#play,#swap,#stand):focus:not(:focus-visible) {
  outline: none;
}
.portrait-game .portrait-shell .hand-area .actions button:is(#play,#swap,#stand):focus-visible {
  outline: 2px solid #ffe6a1;
  outline-offset: -5px;
}
.portrait-game .portrait-shell .hand-area .actions :is(#play,#stand) small { display: none; }
.portrait-game .portrait-shell .hand-area .actions #swap small {
  font-size: clamp(6px,1.55cqi,8px);
  line-height: 1.3;
  letter-spacing: .03em;
  opacity: .84;
}
.portrait-game .actions :is(#play,#swap,#stand):not(:disabled):active {
  transform: translateY(2px);
  box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
  .portrait-game .actions :is(#play,#swap,#stand):not(:disabled):hover {
    filter: brightness(1.06);
  }
}
@media (max-height: 680px) {
  .portrait-game .arena::after { border-width: clamp(15px,4.9cqi,22px); }
}
