/* Board readability on phones (jasa.hk layer on top of v12.0.2; loads last). */
@media (max-width:700px){
  /* Overview: full place names in up to three short lines instead of "…". */
  html:not([lang=en]) .board-shell:not([data-zoom=in]) .tile:not(.corner){padding:4px 1px 1px}
  html:not([lang=en]) .board-shell:not([data-zoom=in]) .tile:not(.corner):has(.symbol){padding:2px 1px}
  html:not([lang=en]) .board-shell:not([data-zoom=in]) .tile:not(.corner) .tile-name{font-size:10px!important;line-height:1!important;margin:0!important;-webkit-line-clamp:3!important;word-break:break-all;letter-spacing:0}
  html:not([lang=en]) .board-shell:not([data-zoom=in]) .tile:not(.corner) .symbol{font-size:11px!important;line-height:1!important;height:auto!important;margin:0 0 1px!important}
  html:not([lang=en]) .board-shell:not([data-zoom=in]) .tile:not(.corner) .symbol~.tile-name{-webkit-line-clamp:2!important;overflow:visible}

  /* Zoom: a clear button and a short hint next to it. */
  .board-toolbar{align-items:center}
  .board-toolbar>.board-tools{width:auto!important;flex:0 0 auto!important}
  .board-toolbar>span{display:block!important;flex:1 1 auto;font-size:11px!important;line-height:1.35;opacity:.75;min-width:0}
  #boardZoom{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 14px!important;border-radius:999px!important;font-size:13px!important;font-weight:650;white-space:nowrap;background:var(--ink,#173f36)!important;color:var(--paper,#f5f5ed)!important;border-color:transparent!important}
  #boardZoom::before{content:"";width:14px;height:14px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5M7 5v4M5 7h4'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5M7 5v4M5 7h4'/%3E%3C/svg%3E") center/contain no-repeat}
  #boardZoom[aria-pressed=true]{background:transparent!important;color:inherit!important;border:1px solid currentColor!important}
  #boardZoom[aria-pressed=true]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5M5 7h4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5M5 7h4'/%3E%3C/svg%3E")}
}

/* 2026-11-11 · phones: the menu scrolls inside instead of running under the bottom bar,
   "New game" no longer looks like the main action, and the turn line is readable. */
@media (max-width:700px){
  #extraTools{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  #extraTools #newGame{background:transparent!important;color:inherit!important;border:1px solid currentColor!important;box-shadow:none!important;opacity:.85}
  .mobile-dock .dock-status{display:flex;align-items:center;gap:7px;font-size:12.5px!important;line-height:1.3}
  .mobile-dock .dock-status::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:currentColor;opacity:.45}
  .mobile-dock[data-turn=you] .dock-status{color:var(--ink,#173f36)!important;font-weight:650}
  .mobile-dock[data-turn=you] .dock-status::before{background:#2f9d62;opacity:1;box-shadow:0 0 0 4px rgba(47,157,98,.18)}
  .mobile-dock[data-turn=other] .dock-status::before{background:#d08a2e;opacity:1}
}

/* Tile card: what this tile means for you right now. */
.tile-next{margin:14px 0 4px;padding:12px 14px;border-radius:12px;border:1px solid rgba(127,127,127,.28);background:rgba(127,127,127,.08)}
.tile-next strong{display:block;font-size:12px;letter-spacing:.04em;opacity:.7;margin-bottom:4px}
.tile-next p{margin:4px 0 0;line-height:1.55}

/* 2026-11-11 · phones, English: a word longer than the tile (e.g. "International") breaks inside the tile instead of being cut off */
@media (max-width:600px){html[lang=en] .board-shell:not([data-zoom=in]) .tile:not(.corner) .tile-name{overflow-wrap:anywhere;word-break:break-word;hyphens:auto}}
