.island-page .game-shell {
  --sea-ink:#0b2636;
  --sea-brass:#c99c5f;
  --sea-text:#fff0c9;
  --sea-muted:#a9cbd0;
}
.island-page .sea-icon {
  display:block;
  width:28px;
  height:28px;
  object-fit:contain;
  image-rendering:pixelated;
  flex:none;
}
.island-page .game-hud {
  background:linear-gradient(#163d4e,#102c3d);
  border-bottom:2px solid #816b52;
}
.island-page .game-hud > strong {color:#ffdfa0}
.island-page .hud-survival {gap:9px}
.sea-health,.sea-counter {display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.sea-counter .sea-icon {width:19px;height:19px}
.sea-health .sea-icon {width:25px;height:25px}
.sea-health-track {
  position:relative;
  display:grid;
  place-items:center;
  width:104px;
  height:27px;
  isolation:isolate;
  background:var(--sea-gauge) center / 100% 100% no-repeat;
}
.sea-health-track #health {
  position:absolute;
  inset:7px 10px;
  width:calc(100% - 20px);
  height:calc(100% - 14px);
  appearance:none;
  border:0;
  border-radius:0;
  background:#132531;
  overflow:hidden;
}
.sea-health-track #health::-webkit-progress-bar {background:#152630}
.sea-health-track #health::-webkit-progress-value {background:linear-gradient(#f77778 0 22%,#bc3e59 23% 72%,#862c47 73%)}
.sea-health-track #health::-moz-progress-bar {background:linear-gradient(#f77778 0 22%,#bc3e59 23% 72%,#862c47 73%)}
.sea-health-track #health[data-critical=true]::-webkit-progress-value {background:linear-gradient(#ffbe78 0 22%,#d65048 23% 72%,#902b47 73%)}
#healthCount {
  z-index:1;
  color:#fff5d8;
  font:bold 10px/1 monospace;
  text-shadow:1px 1px #42192e,-1px -1px #42192e;
  pointer-events:none;
}
.island-page .hud-tools button,.island-page .title-tools button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  white-space:nowrap;
}
.island-page .hud-tools button .sea-icon {width:18px;height:18px}
.island-page .ability-bar .ability-tile .sea-icon {width:30px;height:30px}
.island-page .ability-bar .ability-tile[data-status=locked] .sea-icon {opacity:.55}
.island-page .game-shell .hud-tools button,
.island-page .game-shell .ability-tile,
.island-page .title-tools button,
.island-page .map-dialog button:not(.sea-map-pin),
.island-page .game-overlay button {
  background:#204659 var(--sea-plaque) center / 100% 100% no-repeat;
  color:var(--sea-text);
  border:1px solid #7e7663;
  border-radius:4px;
  box-shadow:0 2px 0 #061b29;
}
.island-page .game-shell button:focus-visible {outline:2px solid #ffde93;outline-offset:3px}
.island-page .game-shell .hud-tools button:hover:not(:disabled),
.island-page .map-dialog button:not(.sea-map-pin):hover:not(:disabled),
.island-page .title-tools button:hover {
  color:#fff5d9;
  filter:brightness(1.24);
}
.island-page .map-dialog button:disabled {opacity:.53}
.island-page .island-title-screen .title-actions button {
  background:#183c4d var(--sea-plaque) center / 100% 100% no-repeat;
  border-color:#846c52;
  box-shadow:0 4px 0 #051e2c;
  color:#fff0cb;
}
.island-page .island-title-screen .title-actions .menu-primary,
.island-page .game-overlay .coral-button {
  background:#d6a568 var(--sea-plaque-active) center / 100% 100% no-repeat;
  color:#212b35;
  text-shadow:0 1px #ffdf9d;
}
.island-page .island-title-screen .title-actions .menu-primary:hover:not(:disabled) {color:#212b35}
.title-tools {display:flex;gap:8px;justify-content:center;margin:12px 18px 0}
.island-page .title-tools button {padding:6px 11px;min-height:44px;font-weight:650;font-size:12px}
.title-tools .sea-icon {width:23px;height:23px}
.island-page .game-shell .title-status {margin-top:12px}

.island-page .map-dialog,
.island-page .game-overlay .overlay-card {
  box-sizing:border-box;
  color:var(--sea-text);
  background:#102c3e;
  border:12px solid transparent;
  border-image:var(--sea-panel) 24 fill / 15px stretch;
  border-radius:3px;
  box-shadow:0 14px 54px #061622a6;
}
.island-page .map-dialog {
  width:min(94vw,820px);
  max-height:calc(100dvh - 22px);
  padding:12px 17px 16px;
  overflow:auto;
  overscroll-behavior:contain;
}
.island-page .map-dialog::backdrop {background:#071a27bc}
.island-page .map-heading {gap:10px;align-items:flex-start}
.island-page .map-heading h2 {color:#ffe1a2}
.island-page .map-heading p,.island-page .map-dialog > p {color:var(--sea-muted)}
.island-page .map-heading h2:has(.sea-icon) {display:flex;align-items:center;gap:10px}
.island-page .map-heading > button {flex:none;min-height:44px;min-width:44px}
.island-page .map-dialog #shopStats {
  padding:8px 11px;
  border:1px solid #7a7359;
  border-radius:3px;
  color:#eed4a0;
  background:#0c2938;
}
.island-page .shop-dialog .shop-items {grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.island-page .shop-dialog .shop-items article {
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  align-items:center;
  gap:4px 8px;
  border:1px solid #7c725b;
  background:#173a4c;
  padding:9px;
}
.island-page .shop-dialog .shop-item-icon {display:block;width:44px;height:44px;object-fit:contain;image-rendering:pixelated;margin:0}
.island-page .shop-dialog .shop-items article h3 {margin:0;line-height:1.4}
.island-page .shop-dialog .shop-items article p {grid-column:1/-1;min-height:38px;margin:0}
.island-page .shop-dialog .shop-items article button {grid-column:1/-1;margin-top:4px}

.island-page .boss-bar {
  top:8px;
  width:min(55%,470px);
  padding:0;
  border:0;
  background:none;
}
.island-page .boss-bar #bossName {
  margin:0 0 -2px;
  font:700 12px/1.5 Arial,'Microsoft YaHei',sans-serif;
  color:#fff0c9;
  text-shadow:0 2px 2px #092034,1px 0 #092034,-1px 0 #092034;
}
.boss-gauge {
  position:relative;
  width:100%;
  aspect-ratio:828/188;
  background:var(--sea-boss-gauge) center / 100% 100% no-repeat;
  image-rendering:pixelated;
}
.island-page .boss-gauge #bossHealth {
  position:absolute;
  left:20.8%;
  top:38.8%;
  width:69.6%;
  height:24.4%;
  border:0;
  border-radius:0;
  appearance:none;
  background:#0b1329;
}
.boss-gauge #bossHealth::-webkit-progress-bar {background:#0b1329}
.boss-gauge #bossHealth::-webkit-progress-value {background:linear-gradient(#ff8d9e 0 20%,#d34872 21% 72%,#9b2b5b 73%)}
.boss-gauge #bossHealth::-moz-progress-bar {background:linear-gradient(#ff8d9e 0 20%,#d34872 21% 72%,#9b2b5b 73%)}
.island-page .boss-gauge #bossHealthCount {
  position:absolute;
  left:21%;
  top:38%;
  width:69%;
  height:26%;
  display:grid;
  place-items:center;
  margin:0;
  font:bold 11px/1 monospace;
  color:#fff7db;
  text-shadow:1px 1px #40162d;
}
.bike-status {display:inline-flex;align-items:center;gap:5px;font-size:11px;color:#ffdfa0}
.bike-status progress {appearance:none;width:58px;height:9px;border:1px solid #c99c5f;background:#092b3e}
.bike-status progress::-webkit-progress-bar {background:#092b3e}
.bike-status progress::-webkit-progress-value {background:#6fe1b0}
.bike-status progress::-moz-progress-bar {background:#6fe1b0}
.inventory-items {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}
.inventory-items article {display:flex;align-items:center;gap:12px;min-width:0;padding:12px;border:1px solid #7c725b;background:#173a4c}
.inventory-items article > div {flex:1;min-width:0}
.inventory-items .sea-icon {width:44px;height:44px}
.inventory-items h3 {margin:0 0 5px;font-size:15px;color:#ffe1a2}
.inventory-items strong {font:700 19px/1.4 monospace;color:#e2f9ee}
.inventory-items p {margin:3px 0 0;font-size:12px;line-height:1.6;color:#a9cbd0}
.inventory-items button {min-height:44px;padding:8px 12px;flex:none}
.island-page .inventory-dialog #inventoryMessage {min-height:2em;font-size:13px}
@media(max-width:600px) {
  .inventory-items {grid-template-columns:1fr}
  .island-page .boss-bar {width:65%;top:4px}
  .island-page .boss-bar #bossName {font-size:10px}
  .island-page .boss-gauge #bossHealthCount {font-size:9px}
}

.island-page .sea-chart {
  position:relative;
  margin:11px auto 0;
  aspect-ratio:16/9;
  isolation:isolate;
  border:2px solid #ad8355;
  background:#13445d;
  overflow:hidden;
}
.island-page .sea-chart-art {width:100%;height:100%;display:block;object-fit:fill;image-rendering:pixelated}
.island-page #worldPins {position:absolute;inset:0}
.island-page .sea-map-pin {
  position:absolute;
  left:var(--map-x);
  top:var(--map-y);
  transform:translate(-50%,-50%);
  display:grid;
  place-items:center;
  justify-items:center;
  gap:2px;
  min-width:56px;
  min-height:44px;
  padding:0 3px;
  border:0;
  background:none;
  color:#fff4d2;
}
.sea-map-pin b {
  display:grid;
  place-items:center;
  width:29px;
  height:29px;
  border:2px solid #f5c683;
  border-radius:50%;
  background:#153e51;
  box-shadow:0 2px 0 #081e2a;
  color:#fff1c5;
  font:700 12px monospace;
}
.sea-map-pin span {padding:2px 6px;background:#102b3cf2;font-size:11px;white-space:nowrap;border-radius:2px}
.sea-map-pin[data-locked=true] b {background:#2b4556;border-color:#b0b9b1;color:#f4e7ce}
.sea-map-pin[aria-pressed=true] b {background:#ffdb8f;color:#233040;border-color:#fff4bd;box-shadow:0 0 0 3px #263f49}
.island-page .map-dialog .sea-map-pin:hover,
.island-page .map-dialog .sea-map-pin:focus {background:transparent}
.island-page .map-dialog .sea-map-pin:focus-visible {outline:2px dashed #fff4bd;outline-offset:3px}
.island-page .sea-world {margin-top:10px;padding:12px 0 0;border-top:1px solid #b18d5e}
.island-page .sea-world h3 {color:#ffdf9d}
.island-page .sea-world > div {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.island-page .sea-world button {min-height:44px;line-height:1.4;padding:6px}
.island-page .sea-world button.cleared {color:#ffde8f}

.island-page .settings-dialog {width:min(94vw,590px)}
.settings-kicker {color:#bd9868!important;font-size:11px;letter-spacing:.11em;margin:0 0 4px}
.helm-panel {
  margin:9px 0 12px;
  padding:10px 13px;
  border:1px solid #887151;
  border-radius:3px;
  background:#133343;
  min-width:0;
}
.helm-panel h3,.helm-panel legend {
  display:flex;
  align-items:center;
  gap:7px;
  margin:0 0 7px;
  color:#ffdfa3;
  font-size:15px;
}
.helm-panel .sea-icon {width:23px;height:23px}
.helm-track {color:var(--sea-muted);font-size:12px;margin:0 0 9px}
.helm-track strong {color:#fff1bc;margin-left:6px}
.helm-row {display:grid;grid-template-columns:95px minmax(0,1fr);align-items:center;gap:10px;margin:7px 0}
.helm-row button {min-height:44px;padding:4px 6px;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap}
.helm-row button .sea-icon {width:19px;height:19px}
.helm-row button[aria-pressed=false] {opacity:.7}
.helm-row label {display:grid;grid-template-columns:auto minmax(0,1fr) 3.2em;align-items:center;gap:8px;font-size:12px;white-space:nowrap}
.helm-row input {min-width:0;width:100%;min-height:34px;accent-color:#f0c578;cursor:pointer}
.helm-row output {color:#f6d49d;text-align:right}
.quality-settings > div {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.quality-settings label {position:relative;display:block;cursor:pointer}
.quality-settings input {position:absolute;opacity:0}
.quality-settings span {
  display:grid;
  place-items:center;
  min-height:44px;
  color:#fff0d1;
  background:#173d4d var(--sea-plaque) center/100% 100% no-repeat;
  font-size:13px;
}
.quality-settings input:checked + span {color:#202e35;background:#d8a76a var(--sea-plaque-active) center/100% 100% no-repeat}
.quality-settings input:focus-visible + span {outline:2px solid #ffdfa0;outline-offset:2px}

@media(max-width:760px){
  .sea-health-track {width:89px}
  .island-page .hud-survival {justify-content:flex-start;flex-wrap:wrap}
  .island-page .ability-bar .ability-tile .sea-icon {width:21px;height:21px}
  .island-page .title-tools {margin:10px 0 0}
  .island-page .map-dialog {padding:10px 11px}
  .island-page .shop-dialog .shop-items {grid-template-columns:repeat(2,minmax(0,1fr))}
  .island-page .sea-world > div {grid-template-columns:repeat(2,minmax(0,1fr))}
  .sea-map-pin span {font-size:10px;padding:1px 4px}
}
@media(max-width:430px) {
  .island-page .sea-map-pin {min-width:44px}
  .sea-map-pin b {width:23px;height:23px;font-size:10px}
  .helm-row {grid-template-columns:76px minmax(0,1fr);gap:7px}
  .helm-row button {gap:3px;padding-inline:4px;font-size:11px}
  .helm-row button .sea-icon {width:15px;height:15px}
  .helm-row label {grid-template-columns:minmax(0,1fr) 3em;gap:3px;white-space:normal}
  .helm-row label input {grid-column:1;grid-row:2}
  .helm-row output {grid-column:2;grid-row:2}
}
@media(orientation:landscape) and (max-height:530px) {
  .island-page .sea-chart {width:min(100%,calc(45dvh * 16 / 9))}
  .island-page .sea-world > div {grid-template-columns:repeat(4,minmax(0,1fr))}
  .island-page .game-shell.is-immersive .hud-tools button .sea-icon {width:15px;height:15px}
  .island-page .game-shell.is-immersive .hud-survival {gap:5px}
  .island-page .game-shell.is-immersive .sea-health-track {width:78px;height:24px}
  .island-page .game-shell.is-immersive .sea-health-track #health {inset:6px 8px;width:calc(100% - 16px);height:calc(100% - 12px)}
  .island-page .game-shell.is-immersive .sea-health .sea-icon {width:19px;height:19px}
  .island-page .game-shell.is-immersive .sea-counter .sea-icon {width:14px;height:14px}
}
@media(orientation:landscape) and (min-width:600px) and (max-height:530px) {
  .island-page .settings-dialog[open] {
    display:grid;
    grid-template-columns:minmax(0,1.9fr) minmax(128px,1fr);
    align-items:start;
    column-gap:10px;
    width:min(94vw,665px);
  }
  .settings-dialog .map-heading {grid-column:1/-1}
  .settings-dialog .quality-settings > div {grid-template-columns:1fr}
  .settings-dialog .helm-panel {margin-bottom:2px}
}
