/* Batch 1: opt-in desktop surface. Keep layout metrics and state effects intact. */
@import url('/css/worlds-motion.css');
#worlds-theme-toggle{
  padding:0 10px;border:0;border-left:2px solid #333;background:none;
  color:#d4c6a8;font:700 12px var(--b-font);cursor:pointer;white-space:nowrap;
}
#worlds-theme-toggle[hidden]{display:none}
@media(min-width:1000px) and (min-height:521px){
  #screen-game.worlds-desktop{background:#152738}
  #screen-game.worlds-desktop #game-stage{
    width:var(--worlds-stage-width,1920px);height:var(--worlds-stage-height,1080px);
    background:#94bfd9 url('/assets/worlds/backdrop.png') center top/100% 125% no-repeat;
  }
  #screen-game.worlds-desktop .half-field{background:transparent;animation:none}
  #screen-game.worlds-desktop .zone-row{position:relative;isolation:isolate}
  #screen-game.worlds-desktop .zone-row::before{
    content:'';position:absolute;inset:0 var(--worlds-stone-right,2%) 0 var(--worlds-stone-left,2%);z-index:-1;pointer-events:none;
    background:url('/assets/worlds/stone.png') center/112% 140% no-repeat;
    clip-path:polygon(1% 0,98% 0,100% 6%,99.5% 94%,98% 100%,1% 99%,0 93%,0 7%);
  }
  #screen-game.worlds-desktop .hf-opp .zone-row::before{
    filter:grayscale(.8) brightness(.28) sepia(.15) hue-rotate(165deg);
  }
  #screen-game.worlds-desktop .zone-tag{
    position:relative;left:calc(var(--worlds-stone-left,2%) + 12px);
    background:transparent;border-color:transparent;color:#393a33;
    font-family:'PMingLiU','Noto Serif TC',serif;text-shadow:0 1px #fff8e8;
  }
  #screen-game.worlds-desktop .hf-opp .zone-tag{color:#efe8d9;text-shadow:0 1px #14212d}
  /* Extra height on 4:3 screens is breathing room, not oversized card slots. */
  #screen-game.worlds-desktop .slot{max-height:230px;border-color:transparent;border-radius:5% / 3.5%}
  /* .slot-filled is set by renderSlots; replaces :has(.field-card) (same specificity). */
  #screen-game.worlds-desktop .slot:not(.slot-filled){
    border:3px solid transparent;
    background:linear-gradient(#b1ab971a,#b1ab971a) padding-box;
    box-shadow:inset 0 0 0 1px #938b7966;
  }
  #screen-game.worlds-desktop .field-card{border-color:#101114;border-radius:5% / 3.5%}
  #screen-game.worlds-desktop .field-card img{object-fit:contain}
  /* Keep badges legible without repeatedly filtering the animated backdrop.
     Retain their state colors, gradients, dimensions and number animations. */
  #screen-game.worlds-desktop .fc-badge{
    backdrop-filter:none;-webkit-backdrop-filter:none;
  }
  #screen-game.worlds-desktop .divider{background:#18384ac9;border-color:#aec5c777}
  /* Reserve the reader even when empty: opening a card never shifts the field. */
  #screen-game.worlds-desktop .field-main{
    width:calc(100% - 500px);max-width:calc(100% - 500px);margin-left:0;margin-right:auto;
  }
  #screen-game.worlds-desktop #card-preview-content{
    width:480px!important;top:132px!important;bottom:16px;right:8px;
    max-height:none!important;overflow:hidden!important;
    display:flex;flex-direction:column;gap:16px;
    padding:24px 18px 40px!important;border:0!important;box-shadow:none!important;
    background:#f3ead5 url('/assets/worlds/stone.png') center/108% 116% no-repeat!important;
    border-radius:5px;
  }
  #screen-game.worlds-desktop #card-preview-content::before{
    content:'卡片資訊';display:block;flex:none;padding:4px 14px 8px;
    font:700 19px/1.5 'PMingLiU','Noto Serif TC',serif;
    color:#302d27;text-shadow:0 1px #fff8e8;
  }
  #screen-game.worlds-desktop .cpv-layout{flex:1;min-height:0;overflow:hidden}
  #screen-game.worlds-desktop #cpv-img-col{
    height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;
  }
  #screen-game.worlds-desktop #cpv-img-col>img{
    max-width:100%;height:auto;object-fit:contain;flex-shrink:0;
  }
  #screen-game.worlds-desktop .cpv-text{
    height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;
    padding-right:5px;overflow-wrap:anywhere;
  }
  #screen-game.worlds-desktop .cpv-text>div{flex-shrink:0}
}
