/* Alpha 13: hand / legal target / card inspector polish. Purely visual; Piovium remains rules authority. */
:root{color-scheme:dark}
.toplinks #fullscreenToggle{border-color:#d2ac7550}
.hand-area{width:min(71cqw,900px)}
.hand-card{width:clamp(75px,8.15cqw,151px);border-radius:9px;box-shadow:0 10px 18px #080913d6}
.hand-card:hover,.hand-card:focus-visible{transform:translateX(calc(-50% + var(--offset,0px))) translateY(-9.0cqw) scale(1.72) rotate(0deg);z-index:150!important;box-shadow:0 21px 36px #000e,0 0 0 2px #ffe0aacc}
.hand-card.selected:hover{transform:translateX(calc(-50% + var(--offset,0px))) translateY(-9.0cqw) scale(1.72) rotate(0deg);z-index:150!important}
.hand-card span{display:none!important}
.hand-card.drag-source{visibility:hidden}
.battlefield .legal-drop-target{border-color:#ecdf98!important;box-shadow:0 0 0 2px #fcecb1a8,0 0 21px #e7ba5e80!important;animation:legalTargetGlow 1.1s ease-in-out infinite alternate;z-index:12}
.battlefield .invalid-drop-target{border-color:#a35a5c!important;box-shadow:0 0 0 2px #d46e689a!important}
@keyframes legalTargetGlow{from{filter:brightness(1)}to{filter:brightness(1.22)}}
.zone button.entity{padding:0;color:inherit;text-align:left;cursor:pointer}
.zone button.entity:focus-visible{outline:2px solid #ffe1a6;outline-offset:2px}
.card-preview{position:fixed;z-index:200;width:min(292px,40vw);max-height:min(70vh,500px);padding:9px;border:1px solid #e9c989;border-radius:13px;background:linear-gradient(145deg,#24293bf8,#181b29fc);box-shadow:0 20px 50px #03040ae5,0 0 0 3px #1b1b2bd0;pointer-events:none;display:flex;gap:9px;align-items:center;color:#f8ecdb;overflow:hidden}
.card-preview .preview-art{flex:0 0 53%;min-width:0;display:flex;align-items:center;justify-content:center}
.card-preview .preview-art img{width:100%;height:auto;max-height:min(42vh,260px);aspect-ratio:420/720;object-fit:contain;display:block;filter:drop-shadow(0 3px 7px #000a)}
.card-preview .preview-info{min-width:0;display:flex;flex-direction:column;gap:9px;align-self:stretch;justify-content:center}
.card-preview .preview-info strong{display:block;font-size:12px;line-height:1.3;overflow-wrap:anywhere}
.card-preview .preview-info span{font-size:10px;color:#f0cf8f;line-height:1.25}
.card-preview .preview-info p{margin:0;font-size:10px;line-height:1.4;color:#cfdbde;overflow:hidden;display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical}
.card-preview[hidden]{display:none!important}
.battlefield .drag-ghost{width:clamp(110px,11cqw,178px)}
.play-drop-hint{border-color:#e8cd7eaa;inset:17% 24% 28%;background:#dfc57f19;font-size:14px}
@media(max-height:800px){.hand-card:hover,.hand-card:focus-visible,.hand-card.selected:hover{transform:translateX(calc(-50% + var(--offset,0px))) translateY(-7.3cqw) scale(1.60) rotate(0deg)}.card-preview{max-height:65vh}}
@media(max-width:720px){.toplinks #fullscreenToggle{display:none}.hand-area{width:82%}.hand-card{width:62px}.hand-card:hover,.hand-card:focus-visible,.hand-card.selected:hover{transform:translateX(calc(-50% + var(--offset,0px))) translateY(-85px) scale(1.48) rotate(0deg)}.card-preview{display:none!important}}
@media(prefers-reduced-motion:reduce){.battlefield .legal-drop-target{animation:none}}

/* Alpha 14: layout revision toward in-game Genius Invokation ergonomics. */
.battlefield{background-size:92.8% 92.8%!important;background-position:center center!important}
.table-inner{inset:4.25% 6.5% 12.15%}
.zone-label{display:none!important}
#enemySupports,#friendSupports{grid-column:1;justify-self:start;align-self:center}
#enemySummons,#friendSummons{grid-column:3;justify-self:end;align-self:center}
#enemyCharacters,#friendCharacters{grid-column:2}
.zone{max-width:184px;min-height:96px;padding:0;background:none;border:0;display:flex;justify-content:center}
#enemySupports .zone-items,#friendSupports .zone-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;justify-items:center;align-content:start;justify-content:start;min-width:112px}
#enemySummons .zone-items,#friendSummons .zone-items{display:flex;flex-direction:column;gap:6px;align-items:center;min-width:60px}
#enemySummons .entity,#friendSummons .entity{width:clamp(37px,4.3cqw,68px);height:clamp(48px,5.8cqw,94px)}
#enemySupports .entity,#friendSupports .entity{width:clamp(38px,4.35cqw,68px);height:clamp(49px,6cqw,96px)}
.zone-items>.muted{display:none}
.turn-controls{display:none!important}
.round-pass{position:absolute;left:1.45%;top:50%;transform:translateY(-50%);z-index:25;min-width:168px;min-height:46px;padding:10px 18px;border-radius:24px;background:linear-gradient(160deg,#5b4a55ee,#3e3443ee);border:1px solid #d8bf8f;color:#f8e8b9;font-size:14px;font-weight:800;box-shadow:0 8px 18px #0008;backdrop-filter:blur(4px)}
.round-pass:hover:not(:disabled){transform:translateY(-50%) translateX(3px)}
.round-pass:disabled{opacity:.42}
.skill-dock{position:absolute;right:1.55%;bottom:20%;z-index:24;display:flex;flex-direction:column;align-items:flex-end;gap:8px;pointer-events:auto}
.skill-chip{width:56px;height:56px;border-radius:16px;border:1px solid #dbc793;background:linear-gradient(155deg,#24364bee,#1c2436f5);box-shadow:0 8px 18px #0008;display:grid;place-items:center;font-size:24px;position:relative;overflow:hidden}
.skill-chip small{position:absolute;inset:auto 3px 4px 3px;font-size:8px;line-height:1.1;color:#f2e0b6;text-shadow:0 1px 2px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.skill-chip[data-kind="burst"]{background:linear-gradient(155deg,#54422af2,#302639f5)}
.skill-chip[data-kind="skill"]{background:linear-gradient(155deg,#27454ff2,#1f2d3cf5)}
.skill-chip[data-kind="tuning"]{background:linear-gradient(155deg,#344052f2,#1d2234f5)}
.skill-chip.selected{box-shadow:0 0 0 2px #ffe3a5aa,0 10px 22px #0009}
.skill-chip.disabled{opacity:.38;cursor:not-allowed}
.character-inspector{position:absolute;left:1.35%;top:7.5%;width:min(295px,22%);z-index:26;border:1px solid #d8bf8f;border-radius:14px;background:linear-gradient(155deg,#1e2436f6,#182131f8);box-shadow:0 16px 40px #0009;overflow:hidden}
.inspector-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px 8px;border-bottom:1px solid #7e6a4d}.inspector-head strong{font-size:14px;color:#ffebbb}.inspector-head button{min-width:30px;padding:4px 8px;border-radius:50%;background:#2f3448;border-color:#8b7758}
.inspector-body{padding:10px 12px 12px;display:flex;flex-direction:column;gap:10px}.inspector-main{display:flex;flex-wrap:wrap;gap:6px}.inspector-main span,.inspector-list span{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border-radius:999px;background:#283247;color:#f4ead4;font-size:11px;border:1px solid #647286}.inspector-section{display:flex;flex-direction:column;gap:6px}.inspector-section b{font-size:11px;color:#e8cd8e;letter-spacing:.06em;text-transform:uppercase}.inspector-list{display:flex;flex-wrap:wrap;gap:6px}
.entity-ribbon{position:absolute;left:4px;right:4px;top:4px;display:flex;justify-content:flex-start;gap:4px;pointer-events:none;z-index:7}
.effect-chip{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#1f2536f2;border:1px solid #d8c08f;color:#fff0ca;font-size:9px;font-weight:800;box-shadow:0 3px 9px #0008}
.effect-chip[data-type="weapon"]{background:#5a3826f1}
.effect-chip[data-type="artifact"]{background:#4f3a60f1}
.effect-chip[data-type="talent"]{background:#21475af1}
.effect-chip[data-type="technique"]{background:#3b4f23f1}
.effect-chip[data-type="status"]{background:#2f3644f1}
.effect-chip .icon{font-size:10px;line-height:1}
.effect-chip .count{margin-left:3px;font-size:9px;color:#ffd88b}
.status-chips{display:none!important}
.card-info{padding-top:14px}
.hand-area{width:min(77cqw,980px);height:18.5cqw;bottom:-0.4cqw}
.hand-area>.tray-title{top:-24px;padding:4px 11px;font-size:10px;opacity:.9}
.hand-card{width:clamp(82px,8.6cqw,157px);bottom:-2.2cqw}
.hand-card:hover,.hand-card:focus-visible,.hand-card.selected:hover{transform:translateX(calc(-50% + var(--offset,0px))) translateY(-8.1cqw) scale(1.64) rotate(0deg)}
#pileCount{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:999px;background:#2d3040d6;border:1px solid #ad9168;color:#ead8ad}
#pileCount::before{content:"🂠";font-size:10px}
.dice-area{right:1.65%;bottom:1.5cqw;width:clamp(120px,17cqw,250px)}
.dice-strip{justify-content:flex-end;gap:3px}
.modal-die{touch-action:none;user-select:none}
@media(max-width:720px){
  .battlefield{background-size:cover!important}
  .character-inspector{left:2%;top:11%;width:54%}
  .round-pass{min-width:130px;min-height:38px;font-size:12px;left:1%}
  .skill-dock{right:1%;bottom:23%}
  .skill-chip{width:46px;height:46px;border-radius:12px;font-size:19px}
  .skill-chip small{font-size:7px}
}
