/* NOMI Battleship · compact ocean interface (2026-10-20).
   Scoped to the game: other social network screens remain untouched. */
#nomiBattle.nomi-battle-refresh{
  --battle-ink:#f1faff;--battle-cyan:#77e9ff;--battle-purple:#ac78ff;
  color:var(--battle-ink)!important;
  max-width:950px;margin:0 auto 24px;
  padding:9px!important;
  border:1px solid #468bb2!important;border-radius:19px!important;
  background:radial-gradient(ellipse at 50% -8%,#244c86 0%,#101c42 43%,#150d2b 94%)!important;
  box-shadow:0 14px 32px #050714b8,0 0 24px #155d9e2d!important;
}
#nomiBattle .nomi-battle-hero{
  position:relative;isolation:isolate;overflow:hidden;
  border:1px solid #4ea7d3!important;border-radius:15px!important;
  padding:13px 10px 11px!important;margin:0 0 8px!important;
  background-size:cover!important;background-position:center 53%!important;
  box-shadow:inset 0 0 45px #07112d,0 3px 18px #05091d!important;
}
#nomiBattle .nomi-battle-hero::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,#071735bf 0%,#0a174bd5 48%,#08152dab 100%),
   radial-gradient(ellipse at 50% 100%,#1b94d954,transparent 70%);
}
#nomiBattle .nomi-battle-kicker{
  font-size:9px!important;line-height:1.2;letter-spacing:2.4px;
  color:#bdeeff!important;text-shadow:0 1px 5px #051538;
}
#nomiBattle .nomi-battle-hero h2{
  margin:5px 0 3px!important;
  font-family:Georgia,"Trebuchet MS",system-ui,sans-serif!important;
  font-size:clamp(21px,3.8vw,32px)!important;line-height:1.08!important;
  color:#fdf9ef!important;font-weight:900!important;letter-spacing:.3px;
  text-shadow:0 3px 1px #041f40,0 0 18px #79b9ff96,0 6px 15px #020519!important;
}
#nomiBattle .nomi-battle-hero p{
  font-size:11px!important;font-weight:600!important;line-height:1.35!important;
  color:#e0f6ff!important;margin:2px 0 7px!important;
  text-shadow:0 2px 6px #03091d!important;
}
#nomiBattle .nomi-battle-hero .nomi-battle-mode-switch{
  gap:6px!important;margin:7px auto!important;max-width:580px;
}
#nomiBattle .nomi-battle-mode-switch button{
  flex:1 1 0!important;
  border:1px solid #5d91d0!important;border-radius:11px!important;
  padding:8px 7px!important;min-width:0!important;
  font-size:12px!important;font-weight:800!important;line-height:1.2!important;
  color:#f4f8ff!important;background:linear-gradient(135deg,#10244fdc,#24234fdc)!important;
  box-shadow:0 3px 8px #020c29b5;
}
#nomiBattle .nomi-battle-mode-switch button.primary-button{
  background:linear-gradient(110deg,#7439e6,#b233bf)!important;
  border-color:#e9bbff!important;box-shadow:0 0 12px #bc6bff87,inset 0 1px 3px #fff7!important;
}
#nomiBattle .nomi-battle-links{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:stretch;gap:5px!important;max-width:620px;margin:auto;
}
#nomiBattle .nomi-battle-links .nomi-battle-mini{
  min-width:0;white-space:normal;display:flex;align-items:center;justify-content:center;
  padding:7px 4px!important;font-size:11px!important;line-height:1.1!important;
  font-weight:800!important;color:#f0f9ff!important;
  border:1px solid #4eaee0!important;border-radius:9px!important;
  background:linear-gradient(140deg,#112b52d9,#192452e6)!important;
  text-shadow:0 1px 3px #061025!important;box-shadow:inset 0 0 7px #4f91cf36;
}
#nomiBattle .nomi-battle-links .nomi-battle-sound{
  border-color:#44d7d0!important;color:#a6ffe5!important;
}
#nomiBattle .nomi-battle-links .nomi-battle-sound.is-muted{
  color:#d0d9e9!important;border-color:#7384a0!important;
}
#nomiBattle .nomi-battle-extras{
  padding:10px 12px!important;margin:5px 0!important;
  color:#effaff!important;background:#15284b!important;line-height:1.45;
}
#nomiBattle .nomi-battle-toolbar{
  display:flex!important;gap:6px!important;padding:5px!important;
  margin:5px 0!important;border:1px solid #3b719d!important;
  background:#102749!important;border-radius:10px!important;
}
#nomiBattle .nomi-battle-toolbar #nomiBattleReset{font-size:11px;padding:7px!important}
#nomiBattle #nomiBattleStatus{font-size:11px!important;line-height:1.25!important}
#nomiBattle #nomiBattleOnlineArea{
  display:flex;flex-direction:column;gap:7px;
  width:100%;margin-top:0!important;min-width:0;
}
#nomiBattle #nomiBattleOnlineArea[hidden]{display:none!important}
#nomiBattle #nomiBattleInviteTitle{display:none!important}
#nomiBattle #nomiBattleInvites{
  order:3;margin:0!important;gap:5px!important;display:flex;flex-wrap:nowrap;overflow-x:auto;
}
#nomiBattle #nomiBattleInvites:empty{display:none!important}
#nomiBattle #nomiBattleOnlineArea #nomiBattleLobby{
  order:4;align-self:flex-start;width:max-content;max-width:100%;min-width:0;
  box-sizing:border-box;margin:0!important;padding:5px!important;
  border:1px solid #347bb4!important;border-radius:9px!important;
  background:linear-gradient(125deg,#0b2c54,#181c4e 60%,#2d1956)!important;
}
#nomiBattle #nomiBattleLobby[hidden]{display:none!important}
#nomiBattle #nomiBattleLobby #nomiBattleSelectTitle{
  margin:0 0 4px!important;font-size:12px!important;
  line-height:1.2;color:#9bf0ff!important;font-weight:800!important;
  display:flex;gap:4px;align-items:center;
}
#nomiBattle #nomiBattleSelectTitle::before{
  content:"";width:6px;height:6px;flex:none;border-radius:50%;background:#4eff8e;
}
#nomiBattle #nomiBattleLobby #nomiBattleCandidates{
  display:flex;flex-wrap:nowrap;align-items:stretch;gap:4px!important;
  overflow-x:auto;overscroll-behavior-inline:contain;touch-action:pan-x pan-y;
  scroll-snap-type:x proximity;scrollbar-width:thin;min-width:0;
  padding:0!important;
}
#nomiBattle #nomiBattleCandidates:focus-visible{outline:2px solid currentColor;outline-offset:2px}
#nomiBattle #nomiBattleCandidates>p{
  margin:0!important;padding:5px 7px!important;
  border-radius:6px;background:#15315a;color:#f0f8ff!important;
  font-size:11px!important;line-height:1.3;
}
#nomiBattle #nomiBattleCandidates .nomi-battle-candidate{
  flex:0 0 74px!important;max-width:74px!important;min-width:0;
  box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;
  gap:2px!important;text-align:center;padding:3px!important;
  border:1px solid #4b88c4!important;border-radius:8px!important;
  color:#fff!important;background:linear-gradient(150deg,#163e72,#202152)!important;
  scroll-snap-align:start;
}
#nomiBattle #nomiBattleCandidates .nomi-battle-player-open{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:1px;min-height:36px;width:100%;margin:0;padding:0;
  color:#f3faff!important;font-size:11px!important;line-height:1.2;
}
#nomiBattle .nomi-battle-player-open strong{
  width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
#nomiBattle #nomiBattleCandidates :is(.nomi-battle-candidate img,.nomi-battle-avatar-empty){
  display:grid;place-items:center;width:21px!important;height:21px!important;
  box-sizing:border-box;border-radius:50%!important;border:1px solid #8aeeff!important;
  object-fit:cover;
}
#nomiBattle #nomiBattleCandidates .nomi-battle-single-invite{
  display:block;width:100%;margin:0!important;
  padding:3px 1px!important;min-height:29px;
  font-size:10px!important;font-weight:800;line-height:1.15;
  border-radius:6px!important;white-space:normal;
}
html[data-nomi-theme="light"] #nomiBattle #nomiBattleOnlineArea #nomiBattleLobby{
  background:#fff!important;border-color:#d2c1e8!important;
}
html[data-nomi-theme="light"] #nomiBattle #nomiBattleLobby #nomiBattleSelectTitle,
html[data-nomi-theme="light"] #nomiBattle #nomiBattleCandidates .nomi-battle-player-open{
  color:#38264e!important;
}
html[data-nomi-theme="light"] #nomiBattle #nomiBattleCandidates .nomi-battle-candidate,
html[data-nomi-theme="light"] #nomiBattle #nomiBattleCandidates>p{
  background:#f1eafb!important;color:#38264e!important;border-color:#c5b2df!important;
}
html[data-nomi-theme="light"] #nomiBattle #nomiBattleSelectTitle::before{background:#267749}
#nomiBattle #nomiBattleLiveStatus{
  order:3;margin:0!important;padding:2px 5px!important;
  min-height:0!important;font-size:11px!important;font-weight:650!important;
  line-height:1.3!important;color:#eef9ff!important;
}
#nomiBattle #nomiBattleActive{
  order:2;min-width:0;width:100%;max-width:760px;margin:0 auto!important;
  padding:6px!important;border:1px solid #407db0;
  border-radius:14px;background:linear-gradient(150deg,#081f42,#151d47 75%,#21143d);
  box-shadow:inset 0 0 18px #27639838;
}
/* Keep the waiting board above the invitation carousel. */
#nomiBattle #nomiBattleActive[hidden]{display:none!important}
#nomiBattle.nomi-battle-playing #nomiBattleInvites{display:none!important}
#nomiBattle #nomiBattleLiveScore{
  order:5;max-width:760px;width:100%;margin:0 auto!important;
  padding:9px 5px!important;border:1px solid #396aa0;border-radius:10px;
  background:linear-gradient(100deg,#10254c,#251746)!important;
  color:#ebf6ff!important;text-align:center!important;
  font-size:11px!important;line-height:1.5!important;font-weight:800!important;
}
#nomiBattle .nomi-duel-head{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(108px,1.25fr) minmax(0,1fr)!important;
  gap:5px!important;align-items:center!important;
  margin:0 0 6px!important;padding:7px 5px!important;
  border:1px solid #456da7!important;border-radius:11px!important;
  background:linear-gradient(120deg,#183d71 0%,#111a45 51%,#3e235d 100%)!important;
}
#nomiBattle .nomi-duel-person{display:grid;justify-items:center;gap:3px!important;min-width:0!important}
#nomiBattle .nomi-duel-person strong{
  max-width:100%;color:#fff!important;font-size:11px!important;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 4px #030c27;
}
#nomiBattle .nomi-duel-person small{
  color:#b5eeff!important;font-size:11px!important;white-space:nowrap;
  font-weight:900!important;font-variant-numeric:tabular-nums;
}
#nomiBattle .nomi-duel-avatar{
  width:47px!important;height:47px!important;
  border:2px solid #7bd7ff!important;border-radius:50%;
  box-shadow:0 0 11px #5ca9ed8a;
  background:linear-gradient(140deg,#105086,#24295e);
}
#nomiBattle .nomi-duel-person:last-child .nomi-duel-avatar{
  border-color:#d9a0ff!important;box-shadow:0 0 11px #bf77ff77;
}
#nomiBattle .nomi-duel-clock{
  min-width:0;display:grid;justify-items:center;gap:3px!important;
  padding:5px 2px;border:1px solid #417ac1;border-radius:10px;
  background:#091b3e99;
}
#nomiBattle #nomiDuelTurnLabel{color:#effaff!important;font-size:11px!important;font-weight:800}
#nomiBattle #nomiDuelSeconds{
  font-size:clamp(23px,4.6vw,33px)!important;line-height:1!important;
  font-weight:1000!important;color:#73ff8e!important;
  text-shadow:0 0 10px #41e66b91!important;font-variant-numeric:tabular-nums;
}
#nomiBattle #nomiDuelSeconds.is-low{color:#ff9a91!important;text-shadow:0 0 10px #fc525a!important}
#nomiBattle .nomi-turn-progress{
  width:min(100%,110px);height:6px;overflow:hidden;
  border-radius:99px;border:1px solid #28567e;background:#071934;
}
#nomiBattle .nomi-turn-progress>span{
  display:block;width:100%;height:100%;border-radius:99px;
  background:linear-gradient(90deg,#33e6a0,#acff81);
  transition:width .4s linear;
}
#nomiBattle .nomi-turn-progress.is-low>span{background:linear-gradient(90deg,#ff3e70,#ffb75f)}
#nomiBattle .nomi-turn-note{
  color:#bfd7f0;font-size:9px!important;line-height:1.25;
  text-align:center;max-width:135px;
}
#nomiBattle .nomi-ship-meter{
  display:grid;grid-template-columns:repeat(10,minmax(0,1fr));
  gap:2px;width:min(100%,95px);height:5px;margin-top:1px;
}
#nomiBattle .nomi-ship-meter span{border-radius:2px;background:#4d6386aa}
#nomiBattle .nomi-ship-meter-own span.is-sunk{background:#51d8ff;box-shadow:0 0 5px #00afff}
#nomiBattle .nomi-ship-meter-rival span.is-sunk{background:#ff83bd;box-shadow:0 0 5px #f44ba3}
#nomiBattle #nomiBattleActiveTitle{display:none!important}
#nomiBattle .nomi-battle-boards{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  gap:7px!important;margin:0 0 6px!important;justify-items:stretch!important;
}
#nomiBattle .nomi-battle-boards.nomi-fleet-open{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
#nomiBattle .nomi-battle-boards section{
  position:relative;isolation:isolate;overflow:hidden;
  display:block;padding:7px!important;
  background:radial-gradient(circle at 50% 35%,#1f498062,transparent 62%),
    linear-gradient(125deg,#0b294c,#14234e 59%,#28234f)!important;
  border:1px solid #438cc5!important;border-radius:12px!important;
  box-shadow:inset 0 1px 14px #1a7ebc40!important;
}
#nomiBattle .nomi-battle-boards section::before{
  content:"";position:absolute;inset:0;z-index:-1;opacity:.17;
  background:repeating-radial-gradient(circle at 50% 56%,transparent 0 46px,#72b9f6 47px 48px,transparent 49px 78px);
  pointer-events:none;
}
#nomiBattle .nomi-battle-boards h3,#nomiBattle .nomi-battle-boards h4{
  margin:0 0 5px!important;color:#e6f7ff!important;
  font-size:13px!important;text-shadow:0 1px 6px #07132c;font-weight:900!important;
}
#nomiBattle .nomi-battle-grid{
  width:min(100%,340px)!important;max-width:340px!important;
  gap:2px!important;margin:0 auto!important;
  aspect-ratio:1!important;
}
#nomiBattle .nomi-battle-cell{
  border:1px solid #5cb5e6!important;border-radius:3px!important;
  background:linear-gradient(145deg,#124e7f,#0b3161)!important;
  box-shadow:inset 0 0 6px #80d4ff4f!important;
  touch-action:manipulation;
}
#nomiBattle .nomi-battle-cell:not(:disabled):active{
  background:#2b9bd4!important;box-shadow:0 0 9px #4dddff!important;
}
#nomiBattle .nomi-battle-cell.is-hit{background:radial-gradient(circle,#ffb0a2,#d53267 65%,#793064)!important;border-color:#ffa5a4!important}
#nomiBattle .nomi-battle-cell.is-miss{background:#11345e!important;border-color:#4d83ad!important}
#nomiBattle .nomi-battle-cell.is-ship{background:linear-gradient(125deg,#48afd4,#375586)!important;border-color:#b1f7ff!important}
#nomiBattle .nomi-battle-cell:focus-visible{outline:3px solid #ffe89c!important;outline-offset:1px}
#nomiBattle .nomi-battle-toggle{
  width:max-content;max-width:100%;margin:6px auto!important;
  padding:6px 12px!important;border:1px solid #6abded!important;
  border-radius:9px!important;background:linear-gradient(125deg,#103a6f,#354a8a)!important;
  font-size:11px!important;color:#ecf9ff!important;font-weight:800!important;
}
#nomiBattle .nomi-battle-contacts{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px!important;margin:7px 0 3px!important;
}
#nomiBattle .nomi-battle-contacts[hidden]{display:none!important}
#nomiBattle .nomi-battle-contacts button{
  min-width:0!important;padding:8px 3px!important;
  font-size:11px!important;font-weight:800!important;
  border-radius:9px!important;color:#f2faff!important;
  background:linear-gradient(125deg,#15457c,#2a3275)!important;
}
#nomiBattle .nomi-battle-result{
  border-radius:12px!important;color:#fff4d1!important;
  text-shadow:0 0 15px #ffc976!important;font-size:clamp(24px,6.5vw,52px)!important;
}
@media(max-width:620px){
 #nomiBattle.nomi-battle-refresh{padding:5px!important;border-radius:12px!important}
 #nomiBattle .nomi-battle-hero{padding:9px 6px!important;border-radius:11px!important}
 #nomiBattle .nomi-battle-hero h2{font-size:clamp(20px,5.6vw,27px)!important}
 #nomiBattle .nomi-battle-links .nomi-battle-mini{font-size:10px!important;padding:7px 2px!important}
 #nomiBattle .nomi-battle-links{gap:4px!important}
 #nomiBattle .nomi-battle-social{padding:6px!important}
 #nomiBattle .nomi-duel-head{grid-template-columns:minmax(0,1fr) minmax(100px,1.15fr) minmax(0,1fr)!important}
 #nomiBattle .nomi-duel-avatar{width:41px!important;height:41px!important}
 #nomiBattle .nomi-battle-grid{width:min(100%,316px)!important;max-width:316px!important;gap:2px!important}
 #nomiBattle .nomi-battle-boards.nomi-fleet-open{grid-template-columns:1fr!important}
 #nomiBattle .nomi-turn-note{font-size:9px!important;max-width:110px}
 #nomiBattle .nomi-battle-contacts button{font-size:10px!important}
}
@media(max-width:380px){
 #nomiBattle .nomi-battle-links .nomi-battle-mini{font-size:9px!important}
 #nomiBattle .nomi-duel-head{grid-template-columns:minmax(0,1fr) 96px minmax(0,1fr)!important}
 #nomiBattle #nomiDuelSeconds{font-size:24px!important}
}
@media(prefers-reduced-motion:reduce){
 #nomiBattle .nomi-turn-progress>span{transition:none}
}

/* Letter/number guides are outside the playable cells. */
#nomiBattle .nomi-board-shell{
  display:grid;grid-template-columns:18px minmax(0,1fr);
  grid-template-rows:17px auto;align-items:stretch;
  width:min(100%,358px);max-width:358px;margin:0 auto;
}
#nomiBattle .nomi-board-cols{
  grid-column:2;grid-row:1;
  display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:2px;
  align-items:center;text-align:center;color:#bde9ff;
  font-size:10px;line-height:1;font-weight:800;
}
#nomiBattle .nomi-board-rows{
  grid-column:1;grid-row:2;
  display:grid;grid-template-rows:repeat(10,minmax(0,1fr));gap:2px;
  align-items:center;text-align:center;color:#bde9ff;
  font-size:10px;line-height:1;font-weight:800;
}
#nomiBattle .nomi-board-shell>.nomi-battle-grid{
  grid-column:2;grid-row:2;width:100%!important;
}
@media(max-width:620px){
  #nomiBattle .nomi-board-shell{width:min(100%,334px);max-width:334px}
  #nomiBattle .nomi-board-cols,#nomiBattle .nomi-board-rows{font-size:9px}
}


/* NOMI Battleship: approved navy, muted lilac and gold fleet palette.
   Ships are only revealed when the game renderer exposes their state. */
#nomiBattle.nomi-battle-refresh .nomi-battle-cell{
  position:relative!important;isolation:isolate;overflow:hidden;
  background:linear-gradient(145deg,#1c2d5d 0%,#141d44 72%,#101533 100%)!important;
  border:1px solid #605cb4!important;border-radius:4px!important;
  box-shadow:inset 0 1px 3px #7281cb30,0 1px 3px #070a2999!important;
  color:transparent!important;
}
#nomiBattle.nomi-battle-refresh .nomi-battle-cell:not(:disabled):hover{
  filter:brightness(1.14);
}
#nomiBattle.nomi-battle-refresh .nomi-battle-cell:not(:disabled):active{
  background:linear-gradient(145deg,#384b89,#293169)!important;
  box-shadow:0 0 7px #9991ff99!important;
}
/* Missed and automatically closed water: lavender, not white. No dots/slashes. */
#nomiBattle.nomi-battle-refresh .nomi-battle-cell.is-miss,
#nomiBattle.nomi-battle-refresh .nomi-battle-cell.is-sealed{
  background:linear-gradient(140deg,#9784d4 0%,#8069be 48%,#6b57a7 100%)!important;
  border-color:#ad99ec!important;
  box-shadow:inset 0 0 4px #cbb8f276,0 0 2px #9b82e860!important;
  opacity:1!important;
}
/* Own ships; opponent ships remain hidden until actually hit. */
#nomiBattle.nomi-battle-refresh .nomi-battle-cell.is-ship:not(.is-hit):not(.is-miss):not(.is-sealed){
  background:linear-gradient(160deg,#fff1a4 0%,#ffcb45 17%,#f6a10e 59%,#bf6408 100%)!important;
  border-color:#ffe184!important;
  box-shadow:inset 0 0 0 1px #fff4bc8a,inset 0 -4px 7px #9f450077,0 0 6px #f5a529a0!important;
}
/* Gold on damaged and sunk ship cells, with clear symbols. */
#nomiBattle.nomi-battle-refresh .nomi-battle-cell.is-hit{
  background:linear-gradient(155deg,#ffdc70 0%,#ffae27 41%,#ec770e 100%)!important;
  border-color:#ffdf7b!important;
  box-shadow:inset 0 0 5px #fff0b0a8,0 0 8px #ff9b3b99!important;
}
#nomiBattle.nomi-battle-refresh .nomi-battle-cell.is-hit.is-sunk{
  background:linear-gradient(140deg,#ffd670 0%,#e78c13 55%,#a94e0b 100%)!important;
  border-color:#ffe78d!important;
  box-shadow:inset 0 0 5px #ffe8a099,0 0 8px #ff982b99!important;
}
/* Reset outdated symbols then restore only ship silhouette, hit and sunk markers. */
#nomiBattle.nomi-battle-refresh .nomi-battle-cell::before,
#nomiBattle.nomi-battle-refresh .nomi-battle-cell::after{
  content:none!important;display:none!important;
}
#nomiBattle.nomi-battle-refresh .nomi-battle-cell.is-ship:not(.is-hit)::before{
  content:""!important;display:block!important;
  position:absolute;inset:26% 11% 27%;
  background:linear-gradient(180deg,#fff6bf 0%,#f7c04c 42%,#be650e 100%);
  clip-path:polygon(7% 4%,93% 4%,100% 28%,82% 94%,18% 94%,0 28%);
  filter:drop-shadow(0 1px 2px #713707);
  pointer-events:none;
}
#nomiBattle.nomi-battle-refresh .nomi-battle-cell.is-hit::after{
  content:"✹"!important;display:grid!important;place-items:center;
  position:absolute;inset:0;border:0;background:none;
  font-size:clamp(14px,3vw,23px);line-height:1;
  color:#fff6d1!important;text-shadow:0 0 2px #e3290b,0 0 5px #cc2f0f,0 0 8px #f76615;
  font-weight:900;pointer-events:none;
}
#nomiBattle.nomi-battle-refresh .nomi-battle-cell.is-hit.is-sunk::after{
  content:"⚓"!important;font-size:clamp(14px,3vw,22px);
  color:#fff6d2!important;text-shadow:0 1px 2px #84410f,0 0 6px #ffdb85;
  filter:none;
}
@media(max-width:620px){
  #nomiBattle.nomi-battle-refresh .nomi-battle-cell.is-hit::after{font-size:clamp(13px,4vw,20px)}
}
#nomiBattle .nomi-battle-single-invite:disabled{
  background:linear-gradient(145deg,#49415f,#392e55)!important;
  border-color:#8d7caa!important;color:#e4d8f4!important;
  cursor:default;opacity:.82;
}
#nomiBattle #nomiBattleActive>.nomi-battle-contacts{
  width:100%;margin:9px 0 3px!important;
  padding-top:7px;border-top:1px solid #6b538c;
}

/* Global Battleship: solo score and brief result over the opponent's board. */
#nomiBattle #nomiBattleSoloScore{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;
 width:min(100%,520px);margin:5px auto 0;
}
#nomiBattle .nomi-solo-stat{
 display:flex;align-items:center;justify-content:space-between;gap:5px;
 min-width:0;padding:6px 8px;border-radius:8px;
 background:linear-gradient(120deg,#1d1240,#38235e);
 border:1px solid #926bd3;color:#f5ebff;
 font-size:clamp(10px,2.8vw,13px);font-weight:700;
}
#nomiBattle .nomi-solo-stat strong{font-size:clamp(12px,3.4vw,17px);white-space:nowrap;color:#fff3af}
#nomiBattle .nomi-solo-stat-player{border-color:#69c7f3}
#nomiBattle .nomi-solo-stat-computer{border-color:#b489e5}
/* The live region still announces the result. Visually it appears only on the board. */
#nomiBattle #nomiBattleStatus.is-finished{
 position:absolute;width:1px;height:1px;overflow:hidden;
 clip-path:inset(50%);white-space:nowrap;margin:0!important;padding:0!important;
}
#nomiBattle #nomiBattleSoloResult{
 position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);
 z-index:2;width:max-content;max-width:calc(100% - 20px);box-sizing:border-box;
 padding:8px 14px;border:1px solid #e2a6d1;border-radius:10px;
 background:#2d1c44;color:#ffe1ea;box-shadow:0 4px 14px #160e2f80;
 font-size:clamp(15px,4.4vw,22px);font-weight:900;line-height:1.2;
 text-align:center;overflow-wrap:anywhere;pointer-events:none;
}
#nomiBattle #nomiBattleSoloResult[hidden]{display:none!important}
#nomiBattle #nomiBattleSoloResult[data-outcome="win"]{border-color:#d7b46e;color:#fff0b6}

@media(max-width:650px){
 #nomiBattle .nomi-battle-hero{padding:5px 6px!important;margin-bottom:5px!important}
 #nomiBattle .nomi-battle-hero .nomi-battle-kicker{display:none}
 #nomiBattle .nomi-battle-hero #nomiBattleTitle{font-size:18px!important;margin:0 0 2px!important}
 #nomiBattle .nomi-battle-hero #nomiBattleDescription{margin:0 0 3px!important}
 #nomiBattle .nomi-battle-hero .nomi-battle-mode-switch{margin:3px 0 4px!important;gap:5px!important}
 #nomiBattle .nomi-battle-mode-switch button,
 #nomiBattle .nomi-battle-intro #nomiBattleReset{
  min-height:36px;padding:3px 6px!important;font-size:12px!important;
 }
 #nomiBattle .nomi-battle-intro.nomi-battle-toolbar{
  display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:3px 6px!important;
  padding:4px 6px!important;margin:0 0 5px!important;
 }
 #nomiBattle .nomi-battle-toolbar #nomiBattleSoloScore{grid-column:1/-1}
 #nomiBattle .nomi-solo-stat{padding:4px 5px}
}

html[data-nomi-theme="light"] #nomiBattle .nomi-battle-hero{
 background:#f3edf9!important;border-color:#c8b7e0!important;box-shadow:none!important;
}
html[data-nomi-theme="light"] #nomiBattle .nomi-battle-hero::before{display:none}
html[data-nomi-theme="light"] #nomiBattle .nomi-battle-hero :is(#nomiBattleTitle,#nomiBattleDescription,.nomi-battle-kicker){
 color:#38264e!important;text-shadow:none!important;
}
html[data-nomi-theme="light"] #nomiBattle .nomi-battle-hero .nomi-battle-mini{
 background:#fff!important;color:#38264e!important;border-color:#b7a2d2!important;
 text-shadow:none!important;box-shadow:none!important;
}
html[data-nomi-theme="light"] #nomiBattle.nomi-battle-refresh{
 color:#302342!important;background:#f7f3fd!important;
 border-color:#c8b7e0!important;box-shadow:0 4px 16px #41216d1a!important;
}
html[data-nomi-theme="light"] #nomiBattle .nomi-battle-mode-switch button{
 background:#f0e9f9!important;color:#372450!important;
 border-color:#b7a2d2!important;box-shadow:none!important;
}
html[data-nomi-theme="light"] #nomiBattle .nomi-battle-mode-switch button.primary-button,
html[data-nomi-theme="light"] #nomiBattle .nomi-battle-intro #nomiBattleReset{
 background:#64369d!important;color:#fff!important;border-color:#64369d!important;
}
html[data-nomi-theme="light"] #nomiBattle .nomi-battle-intro{
 background:#fff!important;border-color:#d2c1e8!important;
}
html[data-nomi-theme="light"] #nomiBattle .nomi-battle-intro #nomiBattleTitle,
html[data-nomi-theme="light"] #nomiBattle .nomi-battle-intro #nomiBattleDescription,
html[data-nomi-theme="light"] #nomiBattle .nomi-battle-intro #nomiBattleStatus{
 color:#38264e!important;text-shadow:none!important;
}
html[data-nomi-theme="light"] #nomiBattle .nomi-solo-stat{
 background:#f1eafb;color:#3e2a56;border-color:#c5b2df;
}
html[data-nomi-theme="light"] #nomiBattle .nomi-solo-stat strong{color:#4d2a75}
html[data-nomi-theme="light"] #nomiBattle #nomiBattleSoloResult{
 background:#fff4f7;color:#772346;border-color:#c47998;box-shadow:0 4px 14px #673f6329;
}
html[data-nomi-theme="light"] #nomiBattle #nomiBattleSoloResult[data-outcome="win"]{
 background:#fff7df;color:#65430c;border-color:#b68a47;
}


/* Player and invitation ribbons remain BELOW the battlefield on every device. */
#nomiBattle #nomiBattleInvites>.nomi-invite-card{flex:0 0 min(300px,85%);scroll-snap-align:start}


#nomiBattle #nomiBattleLiveStatus:empty{display:none}
#nomiBattle #nomiBattleCandidates .nomi-battle-single-invite.is-invited{
  background:#51535d!important;border-color:#80838b!important;color:#fff!important;
}
#nomiBattle #nomiDuelOtherAvatar{padding:0;overflow:hidden}
#nomiBattle #nomiDuelOtherAvatar:not(:disabled){cursor:pointer}
#nomiBattle #nomiDuelContacts{
  display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:3px;
}
#nomiBattle #nomiDuelContacts[hidden],
#nomiBattle #nomiBattleActive.is-finished :is(#nomiDuelOtherSunk,.nomi-ship-meter-rival){display:none!important}
#nomiBattle #nomiDuelContacts button{
  flex:0 0 auto;margin:0!important;padding:2px 5px!important;
  min-width:26px;min-height:29px;white-space:nowrap;
  border:1px solid #689de3;border-radius:6px;
  color:#fff;background:#263c70;font-size:10px;line-height:1.15;
}
