/* The playtest layer over the game. Colours from the game's battle screen; the mark is the same diamond as on the board. */
#pt-root {
  --pt-ground: #11151d; --pt-panel: #1a202b; --pt-panel-2: #232a37; --pt-line: #39414f;
  --pt-ink: #ece7dc; --pt-dim: #a9adb5; --pt-gold: #e5c27c; --pt-warn: #efb48a;
  font: 15px/1.55 "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; color: var(--pt-ink);
}
#pt-root * { box-sizing: border-box; }
#pt-root [hidden] { display: none !important; }
#pt-root button { font: inherit; color: inherit; cursor: pointer; }
#pt-root button:focus-visible, #pt-root textarea:focus-visible, #pt-root input:focus-visible { outline: 2px solid var(--pt-gold); outline-offset: 2px; }

/* Left edge, under the place name and above the floating stick's zone: no screen of the game has a control here. */
#pt-button { position: fixed; z-index: 8; left: max(10px, env(safe-area-inset-left)); top: 15%; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid #e5c27c80; background: #0b0f1dbf; color: var(--pt-gold); opacity: .62; display: grid; place-items: center; transition: opacity .15s, transform .15s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#pt-button:hover, #pt-button:focus-visible { opacity: 1; transform: scale(1.06); }
#pt-root.pt-open #pt-button { visibility: hidden; }
.pt-icon { display: block; line-height: 0; }
.pt-badge { position: absolute; right: -5px; top: -5px; min-width: 18px; height: 18px; padding: 0 4px; background: var(--pt-warn); color: #1b1710; border-radius: 3px; font: 700 12px/18px "Noto Sans TC", sans-serif; text-align: center; }
html:not(.six-shown) #pt-button { display: none; }
@media (orientation: portrait) { html[data-mobile="true"] #pt-button { display: none; } }
@media (pointer: coarse) { #pt-button { width: 44px; height: 44px; } }

.pt-veil { position: fixed; inset: 0; z-index: 20; background: #05070bb3; display: grid; place-items: center; padding: 12px; animation: pt-fade .14s ease-out; }
.pt-menu { width: min(340px, 94vw); max-height: 94dvh; overflow-y: auto; background: var(--pt-panel); border: 1px solid var(--pt-line); border-radius: 4px; display: flex; flex-direction: column; }
.pt-menu-item { display: flex; flex-direction: column; gap: 1px; padding: 11px 16px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--pt-line); }
.pt-menu-item:hover { background: var(--pt-panel-2); }
.pt-menu-item b { font: 700 17px "Noto Serif TC", "Songti TC", serif; color: var(--pt-gold); }
.pt-menu-item small { color: var(--pt-dim); font-size: 13px; }
.pt-menu-close { border-bottom: 0; color: var(--pt-dim); }
.pt-menu-note { margin: 0; padding: 11px 16px; color: var(--pt-warn); border-bottom: 1px solid var(--pt-line); font-size: 14px; }

.pt-report { position: fixed; inset: 0; z-index: 20; background: #0b0f1d; display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; animation: pt-fade .14s ease-out; }
.pt-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left)); background: var(--pt-ground); border-bottom: 1px solid var(--pt-line); }
.pt-hint { flex: 1; min-width: 0; color: var(--pt-dim); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-hint.pt-error { color: var(--pt-warn); white-space: normal; line-height: 1.3; font-size: 13px; }
.pt-plain { flex: none; background: var(--pt-panel-2); border: 1px solid var(--pt-line); border-radius: 3px; padding: 4px 12px; white-space: nowrap; }
.pt-send { flex: none; background: var(--pt-gold); color: #1b1710 !important; border: 0; border-radius: 3px; padding: 5px 16px; font-weight: 500; white-space: nowrap; }
.pt-send:disabled { opacity: .45; cursor: default; }
.pt-stage-area { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.pt-stage { position: relative; cursor: crosshair; touch-action: manipulation; }
.pt-stage img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.pt-marks { position: absolute; inset: 0; pointer-events: none; }
.pt-pin { position: absolute; width: 32px; height: 32px; margin: -16px 0 0 -16px; padding: 0; border: 0; background: none; display: grid; place-items: center; pointer-events: auto; animation: pt-land .24s ease-out; }
.pt-pin::before { content: ""; position: absolute; inset: 4px; background: #11151de6; border: 2px solid var(--pt-gold); transform: rotate(45deg); box-shadow: 0 2px 6px #0009; }
.pt-pin span { position: relative; font: 700 13px/1 "Noto Sans TC", sans-serif; color: var(--pt-gold); }
.pt-pin.pt-on::before { background: var(--pt-gold); box-shadow: 0 0 0 4px #e5c27c55; }
.pt-pin.pt-on span { color: #1b1710; }
.pt-whole { flex: none; display: flex; gap: 6px; padding: 0 10px; overflow-x: auto; background: var(--pt-ground); }
.pt-whole:empty { display: none; }
.pt-whole-item { flex: none; max-width: 300px; margin: 6px 0; padding: 2px 10px; background: var(--pt-panel-2); border: 1px solid var(--pt-line); border-radius: 3px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-whole-item.pt-on { border-color: var(--pt-gold); color: var(--pt-gold); }

.pt-sheet { position: fixed; z-index: 21; left: 50%; top: 56px; width: 340px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; background: var(--pt-panel); border: 1px solid var(--pt-gold); border-radius: 4px; box-shadow: 0 8px 26px #000a; animation: pt-fade .12s ease-out; }
.pt-sheet.pt-docked { left: max(6px, env(safe-area-inset-left)) !important; right: max(6px, env(safe-area-inset-right)); top: calc(4px + var(--pt-keyboard-top, 0px)) !important; width: auto; padding: 6px 10px; gap: 4px; }
.pt-sheet-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.pt-sheet-head b { font: 700 15px "Noto Serif TC", "Songti TC", serif; color: var(--pt-gold); white-space: nowrap; }
.pt-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.pt-chip { background: var(--pt-panel-2); border: 1px solid var(--pt-line); border-radius: 3px; padding: 0 8px; font-size: 13px !important; line-height: 22px; color: var(--pt-dim) !important; }
.pt-chip[aria-pressed="true"] { background: var(--pt-gold); border-color: var(--pt-gold); color: #1b1710 !important; font-weight: 500; }
#pt-root textarea, #pt-root input { width: 100%; background: var(--pt-ground); color: var(--pt-ink); border: 1px solid var(--pt-line); border-radius: 3px; padding: 6px 8px; font: 16px/1.45 "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; user-select: text; -webkit-user-select: text; resize: none; }
.pt-sheet-foot { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.pt-veil-inner { z-index: 22; }
.pt-veil-top { place-items: start center; padding-top: 8px; }
.pt-ask { width: min(420px, 94vw); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--pt-panel); border: 1px solid var(--pt-line); border-radius: 4px; }
.pt-ask p { margin: 0; }
.pt-thanks { font: 700 18px "Noto Serif TC", "Songti TC", serif; color: var(--pt-gold); text-align: center; padding: 6px 0; }

.pt-board { position: fixed; inset: 0; z-index: 20; background: #11151d; animation: pt-fade .14s ease-out; }
.pt-frame { display: block; width: 100%; height: 100%; border: 0; }
.pt-close { position: absolute; right: max(8px, env(safe-area-inset-right)); top: 6px; width: 40px; height: 40px; padding: 0; background: var(--pt-panel-2); border: 1px solid var(--pt-gold); border-radius: 3px; color: var(--pt-gold) !important; font-size: 24px !important; line-height: 1; }

@keyframes pt-fade { from { opacity: 0; } }
@keyframes pt-land { from { transform: translateY(-14px) scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #pt-root * { animation: none !important; transition: none !important; } }
@media (max-height: 500px) { .pt-bar { padding-top: 3px; padding-bottom: 3px; } .pt-hint { font-size: 13px; } #pt-root textarea { min-height: 44px; } }
@media (max-width: 720px) { .pt-hint { display: none; } .pt-hint.pt-error { display: block; } .pt-bar { justify-content: space-between; } }
