/* V131 — current word, last letter, scores, recent plays and input share one scene. */
@media (max-width:760px), (orientation:landscape) and (pointer:coarse), (orientation:landscape) and (max-height:600px) {
  body.sh-v111-playing .sh-game-card,
  body.sh-v111-playing #eventFeed {
    overflow-anchor:none!important;
  }

  body.wos-keyboard-open.sh-v111-playing .sh-game-card {
    position:fixed!important;
    top:var(--wos-viewport-top,0)!important;
    right:0!important;
    left:0!important;
    z-index:2147481000!important;
    display:flex!important;
    flex-direction:column!important;
    width:100vw!important;
    height:var(--wos-visible-height,520px)!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:4px 6px max(4px,env(safe-area-inset-bottom))!important;
    overflow:hidden!important;
    border:0!important;
    border-radius:0!important;
    background:#eef4f8!important;
    box-shadow:none!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-card-head {
    position:relative!important;
    top:auto!important;
    display:flex!important;
    flex:0 0 36px!important;
    min-height:36px!important;
    margin:0 0 3px!important;
    padding:2px 5px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-kicker {
    font-size:10px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .turn {
    min-width:0!important;
    gap:5px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .turn .pill {
    min-width:0!important;
    max-width:145px!important;
    padding:5px 7px!important;
    overflow:hidden!important;
    font-size:9px!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  body.wos-keyboard-open.sh-v111-playing .timer {
    font-size:21px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-word-row {
    position:relative!important;
    top:auto!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 16px 68px!important;
    flex:0 0 68px!important;
    min-height:68px!important;
    gap:4px!important;
    margin:0 0 3px!important;
    padding:0!important;
  }
  body.wos-keyboard-open.sh-v111-playing .wordbox {
    min-height:66px!important;
    min-width:0!important;
    height:66px!important;
    padding:5px 7px!important;
    overflow:hidden!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-prefix-box {
    min-height:66px!important;
    height:66px!important;
    overflow:hidden!important;
  }
  body.wos-keyboard-open.sh-v111-playing .wordbox small,
  body.wos-keyboard-open.sh-v111-playing .sh-prefix-box small {
    margin-bottom:2px!important;
    font-size:8px!important;
  }
  body.wos-keyboard-open.sh-v111-playing #currentWord {
    max-width:100%!important;
    font-size:clamp(18px,5.4vw,23px)!important;
    letter-spacing:.06em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-flow {
    font-size:20px!important;
  }
  body.wos-keyboard-open.sh-v111-playing #prefix {
    width:58px!important;
    min-width:58px!important;
    height:58px!important;
    min-height:58px!important;
    font-size:27px!important;
    border-radius:12px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .scoreline {
    display:flex!important;
    flex:0 0 43px!important;
    min-height:43px!important;
    gap:4px!important;
    margin:0 0 3px!important;
    padding:1px 0 3px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior:contain!important;
    touch-action:pan-x!important;
  }
  body.wos-keyboard-open.sh-v111-playing .scorebox {
    flex:0 0 auto!important;
    min-width:104px!important;
    height:39px!important;
    padding:4px 6px!important;
    overflow:hidden!important;
  }
  body.wos-keyboard-open.sh-v111-playing .scorebox .name,
  body.wos-keyboard-open.sh-v111-playing .scorebox b,
  body.wos-keyboard-open.sh-v111-playing .scorebox .meta {
    font-size:8px!important;
    line-height:1.05!important;
    white-space:nowrap!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-input-label {
    display:block!important;
    flex:0 0 13px!important;
    min-height:13px!important;
    margin:0 0 2px!important;
    padding-left:2px!important;
    font-size:8px!important;
    line-height:13px!important;
  }
  body.wos-keyboard-open.sh-v111-playing #wordForm {
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    z-index:3!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 88px!important;
    flex:0 0 48px!important;
    width:100%!important;
    min-height:48px!important;
    margin:0 0 3px!important;
    gap:5px!important;
    transform:none!important;
  }
  body.wos-keyboard-open.sh-v111-playing #wordInput,
  body.wos-keyboard-open.sh-v111-playing #sendWord {
    width:100%!important;
    min-height:48px!important;
    height:48px!important;
  }
  body.wos-keyboard-open.sh-v111-playing #feedback {
    display:block!important;
    flex:0 0 auto!important;
    min-height:27px!important;
    max-height:36px!important;
    margin:0 0 3px!important;
    padding:4px 7px!important;
    overflow:auto!important;
    font-size:8.5px!important;
    line-height:1.16!important;
  }
  body.wos-keyboard-open.sh-v111-playing #wordAppealButton:not(.hidden) {
    display:block!important;
    flex:0 0 32px!important;
    min-height:32px!important;
    height:32px!important;
    margin:0 0 3px!important;
    padding:4px 7px!important;
    font-size:9px!important;
  }
  body.wos-keyboard-open.sh-v111-playing #eventFeed {
    display:block!important;
    flex:1 1 auto!important;
    min-height:42px!important;
    max-height:none!important;
    margin:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    touch-action:pan-y!important;
    font-size:9px!important;
  }
  body.wos-keyboard-open.sh-v111-playing #eventFeed .event {
    min-height:34px!important;
    margin-bottom:3px!important;
    padding:4px 6px!important;
    line-height:1.12!important;
  }
  body.wos-keyboard-open.sh-v111-playing #eventFeed .event strong,
  body.wos-keyboard-open.sh-v111-playing #eventFeed .event span,
  body.wos-keyboard-open.sh-v111-playing #eventFeed .event b {
    font-size:8.5px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .rules,
  body.wos-keyboard-open.sh-v111-playing #finalBoard {
    display:none!important;
  }
}

@media (max-height:540px) and (max-width:960px) {
  body.wos-keyboard-open.sh-v111-playing .sh-card-head {
    flex-basis:31px!important;
    min-height:31px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-word-row {
    flex-basis:58px!important;
    min-height:58px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .wordbox {
    min-height:56px!important;
    height:56px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-prefix-box {
    min-height:56px!important;
    height:56px!important;
  }
  body.wos-keyboard-open.sh-v111-playing #prefix {
    width:50px!important;
    min-width:50px!important;
    height:50px!important;
    min-height:50px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .scoreline {
    flex-basis:37px!important;
    min-height:37px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .scorebox {
    height:34px!important;
  }
}

/* Header tools: only Bilgi and Ayarlar remain, with readable labels. */
.sh-nav-actions {
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
}
.sh-nav-actions .sh-nav-tool {
  display:inline-flex!important;
  width:auto!important;
  min-width:82px!important;
  height:38px!important;
  padding:0 12px!important;
  border-radius:12px!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
}
.sh-nav-actions .sh-nav-tool > span {
  display:grid!important;
  place-items:center!important;
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
  border:1px solid currentColor!important;
  border-radius:50%!important;
  font-size:11px!important;
  font-weight:950!important;
  line-height:1!important;
}
.sh-nav-actions .sh-nav-tool > b {
  display:block!important;
  font-size:11px!important;
  line-height:1!important;
}

.sh-utility-overlay {
  position:fixed;
  inset:0;
  z-index:2147483300;
  display:grid;
  place-items:center;
  padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  background:rgba(3,17,31,.66);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
}
.sh-utility-overlay[hidden] { display:none!important; }
.sh-utility-dialog {
  width:min(600px,100%);
  max-height:min(720px,calc(100dvh - 24px));
  overflow:auto;
  border:1px solid rgba(218,182,93,.68);
  border-radius:22px;
  background:linear-gradient(145deg,#fbfdfd,#e9f1ef);
  color:#102c46;
  box-shadow:0 26px 70px rgba(0,0,0,.36);
}
.sh-utility-head {
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid #d2ddd9;
  background:rgba(247,251,250,.97);
}
.sh-utility-head h2 { margin:0;font-size:19px; }
.sh-utility-close {
  width:38px;
  height:38px;
  border:1px solid #cbd8d4;
  border-radius:11px;
  background:#fff;
  color:#173653;
  font-size:24px;
  line-height:1;
}
.sh-utility-body { padding:16px; }
.sh-info-lead {
  margin:0 0 13px;
  color:#4c6375;
  font-size:13px;
  line-height:1.55;
}
.sh-info-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.sh-info-grid article {
  padding:12px;
  border:1px solid #d7e1de;
  border-radius:14px;
  background:#fff;
}
.sh-info-grid strong { display:block;margin-bottom:5px;font-size:13px; }
.sh-info-grid p { margin:0;color:#607485;font-size:11px;line-height:1.45; }
.sh-modal-settings {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.sh-modal-settings label {
  display:grid;
  gap:6px;
  color:#536b7d;
  font-size:11px;
  font-weight:850;
}
.sh-modal-settings select {
  width:100%;
  min-height:46px;
  padding:0 11px;
  border:1px solid #cbd8d4;
  border-radius:12px;
  background:#fff;
  color:#173653;
  font-size:16px;
}
.sh-settings-note {
  grid-column:1 / -1;
  margin:0;
  padding:10px 11px;
  border-radius:11px;
  background:#edf5f2;
  color:#526c60;
  font-size:11px;
  line-height:1.4;
}
.sh-modal-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:14px;
}
.sh-modal-actions button {
  min-height:44px;
  padding:0 15px;
  border-radius:12px;
  font-weight:900;
}
.sh-modal-cancel { border:1px solid #cad7d3;background:#fff;color:#314d61; }
.sh-modal-apply { border:1px solid #d2aa51;background:linear-gradient(180deg,#0d5272,#082f4d);color:#fff; }

@media (max-width:760px) {
  .sh-nav {
    grid-template-columns:auto minmax(0,1fr)!important;
    grid-template-areas:"back brand" "actions actions"!important;
    row-gap:6px!important;
  }
  .sh-back { grid-area:back!important; }
  .sh-brand { grid-area:brand!important; }
  .sh-nav-actions {
    grid-area:actions!important;
    width:100%!important;
    justify-content:center!important;
  }
  body.sh-v111-playing .sh-nav-actions {
    display:flex!important;
  }
  .sh-nav-actions .sh-nav-tool {
    flex:1 1 0!important;
    max-width:150px!important;
  }
  .sh-info-grid,
  .sh-modal-settings { grid-template-columns:1fr; }
}

@media (orientation:landscape) and (pointer:coarse), (orientation:landscape) and (max-height:600px) {
  .sh-nav {
    width:calc(100% - 12px)!important;
    min-height:48px!important;
    height:auto!important;
    grid-template-columns:1fr auto 1fr!important;
    grid-template-areas:"back brand actions"!important;
    padding:5px 7px!important;
  }
  .sh-nav-actions {
    grid-area:actions!important;
    gap:4px!important;
  }
  .sh-nav-actions .sh-nav-tool {
    min-width:65px!important;
    height:34px!important;
    padding:0 7px!important;
    gap:4px!important;
  }
  .sh-nav-actions .sh-nav-tool > b { font-size:9px!important; }
  .sh-utility-overlay { padding:6px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left)); }
  .sh-utility-dialog {
    width:min(760px,100%);
    max-height:calc(100dvh - 12px);
    border-radius:16px;
  }
  .sh-utility-head { padding:8px 12px; }
  .sh-utility-body { padding:10px 12px; }
  .sh-info-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .sh-modal-settings { grid-template-columns:repeat(4,minmax(0,1fr)); }

  body.wos-keyboard-open.sh-v111-playing .sh-game-card {
    display:grid!important;
    grid-template-columns:minmax(0,.88fr) minmax(330px,1.12fr)!important;
    grid-template-rows:34px 66px 41px minmax(0,1fr)!important;
    gap:3px 7px!important;
    padding:3px 6px!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-card-head {
    grid-column:1 / -1!important;
    grid-row:1!important;
    min-height:34px!important;
    height:34px!important;
    margin:0!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-word-row {
    grid-column:1!important;
    grid-row:2!important;
    min-height:66px!important;
    height:66px!important;
    margin:0!important;
  }
  body.wos-keyboard-open.sh-v111-playing .scoreline {
    grid-column:1!important;
    grid-row:3 / 5!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-content:start!important;
    width:100%!important;
    min-height:0!important;
    height:100%!important;
    margin:0!important;
    padding:2px!important;
    overflow:auto!important;
  }
  body.wos-keyboard-open.sh-v111-playing .scorebox {
    min-width:0!important;
    width:100%!important;
  }
  body.wos-keyboard-open.sh-v111-playing .sh-input-label { display:none!important; }
  body.wos-keyboard-open.sh-v111-playing #wordForm {
    grid-column:2!important;
    grid-row:2!important;
    min-height:50px!important;
    height:50px!important;
    align-self:center!important;
    margin:0!important;
  }
  body.wos-keyboard-open.sh-v111-playing #feedback {
    grid-column:2!important;
    grid-row:3!important;
    min-height:38px!important;
    max-height:41px!important;
    margin:0!important;
    font-size:9px!important;
  }
  body.wos-keyboard-open.sh-v111-playing #wordAppealButton:not(.hidden) {
    position:absolute!important;
    right:8px!important;
    bottom:8px!important;
    width:min(240px,42vw)!important;
  }
  body.wos-keyboard-open.sh-v111-playing #eventFeed {
    grid-column:2!important;
    grid-row:4!important;
    min-height:0!important;
    height:100%!important;
    margin:0!important;
  }
}
