/* 整幅上庭场景 + 与对象轮廓对应的透明热区。 */
.court-scene{display:block;padding:0;gap:0;isolation:isolate}
.court-scenery{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.court-scenery>svg{display:block;width:100%;height:100%}
.court-scenery [data-scenery]{transition:opacity .25s}
.court-scene:not([data-bell-ready=true]) [data-scenery=bell]{opacity:.48}
.court-scene:not([data-rong-ready=true]) [data-scenery=rong]{opacity:.62}
.court-scene:not([data-platform-ready=true]) [data-scenery=platform]{opacity:.48}
.court-scene [data-scenery=tree]{opacity:1}
.court-scene .court-hotspots{position:absolute;inset:0;display:block;flex:none;width:100%;height:100%;min-width:0;min-height:0;overflow:visible;z-index:1}
.court-scene .court-object,.court-scene .court-object:not(:disabled):hover{
  appearance:none;-webkit-appearance:none;position:absolute;display:block;
  margin:0;padding:0;min-width:40px;min-height:40px;max-height:none;
  border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible;
  text-align:center;opacity:1;transform:none;filter:none;
}
.court-scene .court-object:focus-visible{outline:1px dashed #8d9e7d;outline-offset:1px}
.court-scene .court-tree{left:14%;top:0;width:44%;height:96%;clip-path:polygon(10% 5%,90% 5%,100% 55%,75% 100%,35% 100%,0% 50%)}
.court-scene .court-rong{left:66%;top:24%;width:11%;height:65%}
.court-scene .court-platform{left:80%;top:12%;width:17%;height:54%}
.court-scene .court-bell{left:6%;top:68%;width:11%;height:30%}
.court-scene .court-object-label{position:absolute;bottom:0;left:50%;transform:translateX(-50%);display:block;white-space:nowrap;
  width:max-content;max-width:none;color:#506b54;text-shadow:0 1px 5px #fffbef,0 0 9px #fff7dd}
.court-scene .court-object-label strong{font:12px/18px var(--serif);font-weight:400;letter-spacing:.08em}
.court-scene .court-object-label small{display:none}
.court-scene .court-object-label:before{content:'';display:inline-block;width:3px;height:3px;border-radius:50%;background:#b7a866;margin:0 5px 3px 0;box-shadow:0 0 7px #efdfa2}
.court-scene .court-object:disabled .court-object-label{opacity:.48}
.court-scene .court-object:disabled .court-object-label:before{box-shadow:none;opacity:.3}
.court-scene .court-leaf-hotspot{position:absolute;left:39%;top:28%;min-height:40px;min-width:52px;
  border:0;background:#c5d3a4bb;box-shadow:0 0 12px #f4e8ac88;border-radius:65% 0 65% 0;
  padding:8px 4px;font-size:11px;z-index:2}
/* 功能栏为独立的页面行，不能挤占正文的第三行。 */
#text{white-space:normal;word-break:normal;overflow-wrap:break-word;text-overflow:clip;-webkit-line-clamp:unset;line-clamp:unset}
.game-screen>.game-toolbar{position:absolute;bottom:0;left:max(5%,env(safe-area-inset-left));right:max(5%,env(safe-area-inset-right));height:40px;background:#f3efdfed;z-index:4;padding:0 12px}
.dialogue-wrap{bottom:max(40px,calc(env(safe-area-inset-bottom) + 40px))}
@media(orientation:landscape) and (max-height:500px){
  .game-screen{grid-template-rows:52px minmax(0,1fr) auto 40px}
  .court-scene{position:absolute;inset:0;width:100%;height:100%;max-height:none;min-height:0;overflow:hidden}
  .dialogue-wrap{--dialogue-line-height:26px;position:static;display:grid;grid-template-rows:18px auto;
    min-height:0;height:auto;max-height:34dvh;padding:0 12px;overflow:visible;gap:0;align-content:start}
  .dialogue-top{display:flex;height:18px;min-height:18px;line-height:18px;flex:none;overflow:visible}
  .speaker{font-size:14px;line-height:18px}#scene-subtitle{line-height:18px}
  .dialogue{display:grid;grid-template-rows:auto 12px;gap:0;flex:none;min-height:0;max-height:none;height:auto;
    margin:0;padding:1px 0;overflow:visible;font:18px/var(--dialogue-line-height) var(--serif)}
  #text{display:block;flex:none;min-height:52px;max-height:78px;height:auto;margin:0;padding:0;
    line-height:26px;font-size:18px;white-space:normal;overflow-y:auto;overflow-x:hidden;
    overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;-webkit-line-clamp:unset;line-clamp:unset}
  .advance-hint{position:static;display:block;flex:none;min-height:12px;height:12px;line-height:12px;
    font-size:10px;padding:0;margin:0;text-align:right}
  .game-screen>.game-toolbar{position:static;grid-row:4;display:flex;flex:none;height:40px;min-height:40px;margin:0;padding:0 12px;
    background:#f3efdfed;border:1px solid #c1b495;border-top:0}
  .game-toolbar button{min-height:40px;height:40px}
}
