:root {
  --sea-ink: #183b41;
  --sea-deep: #0d5368;
  --sea-lagoon: #1c8d97;
  --sea-foam: #e2f3ea;
  --sea-sand: #efe2c5;
  --sea-paper: #f8f1df;
  --sea-coral: #e97862;
  --sea-gold: #e6ad4e;
  --sea-leaf: #4f8c64;
}

.stones-sea-root {
  --sea-current-duration: 10s;
  width: 100%;
  min-width: 990px;
  min-height: 760px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--sea-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
}

.sea-topbar {
  display: grid;
  grid-template-columns: minmax(470px, 1.4fr) minmax(420px, 1fr);
  gap: 12px;
}

.sea-translation-notice {
  margin: .5rem 0 .75rem;
  border-left: 4px solid #f3b963;
  background: #fff4d6;
  color: #563f1d;
  padding: .55rem .8rem;
  font-size: .78rem;
}

.sea-season,
.sea-balance,
.sea-map-card,
.sea-panel {
  border: 1px solid rgba(17, 63, 69, 0.13);
  box-shadow: 0 10px 30px rgba(3, 40, 51, 0.13);
}

.sea-season {
  min-height: 112px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 102px 1fr;
  overflow: hidden;
  background: var(--sea-paper);
}

.sea-season-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #e57b65, #c9564a);
  color: #fff8e9;
  letter-spacing: 0.12em;
}

.sea-season-count span,
.sea-season-count small {
  font-size: 9px;
  font-weight: 800;
}

.sea-season-count strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  line-height: 0.95;
  font-weight: 500;
}

.sea-season-story {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background-image:
    radial-gradient(circle at 92% 15%, rgba(231, 172, 72, 0.15) 0 18px, transparent 19px),
    linear-gradient(120deg, transparent, rgba(32, 125, 122, 0.06));
}

.sea-eyebrow {
  color: #b75044;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.sea-sign-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  color: #49696a;
  font-size: 11px;
  line-height: 1.35;
}

.sea-balance {
  border-radius: 18px;
  background: linear-gradient(145deg, #143f48, #0d303a);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr) 90px;
  gap: 12px;
  align-items: center;
  color: #e8f4ec;
}

.sea-track {
  min-width: 0;
}

.sea-track-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
}

.sea-track-label strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 500;
}

.sea-track-rail {
  height: 7px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.sea-track-rail i {
  height: 100%;
  display: block;
  border-radius: inherit;
  transition: width 450ms ease;
}

.sea-track.is-danger .sea-track-label strong {
  color: #ff8879;
  animation: seaDangerPulse 1.4s ease-in-out infinite;
}

.sea-crises {
  height: 68px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
}

.sea-crises span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a9c3c3;
}

.sea-crises strong {
  color: #f2c778;
  font-size: 18px;
}

.sea-table {
  flex: 1;
  min-height: 615px;
  display: grid;
  grid-template-columns: minmax(650px, 1fr) 298px;
  gap: 12px;
}

.sea-map-card {
  min-width: 0;
  border-radius: 22px;
  padding: 16px;
  background: #f7edd8;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sea-map-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 4px 12px;
}

.sea-map-heading h2 {
  margin: 3px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1;
  font-weight: 500;
  color: #1c5056;
}

.sea-map-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #68807c;
}

.sea-map-legend span {
  width: 30px;
  border-top: 2px dashed #e9b250;
  box-shadow: 0 0 6px #e9b250;
}

.sea-map-frame {
  flex: 1;
  min-height: 440px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #0c5369;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), inset 0 -30px 80px rgba(4, 38, 58, 0.28);
  transition: background-color 2.4s ease, box-shadow 2.4s ease;
}

.sea-map-frame::before,
.sea-map-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 2.4s ease, background 2.4s ease;
}

.sea-map-frame::before {
  opacity: .18;
  background: radial-gradient(circle at 72% 18%, rgba(255, 211, 125, .36), transparent 48%);
  mix-blend-mode: soft-light;
}

.sea-map-frame::after {
  inset: -35% -20%;
  opacity: .13;
  background: repeating-linear-gradient(112deg, transparent 0 68px, rgba(205, 255, 244, .34) 78px, transparent 90px 164px);
  animation: seaSurfaceFlow 28s linear infinite;
  mix-blend-mode: screen;
}

.stones-sea-root[data-sea-mood="cool"] .sea-map-frame::before {
  opacity: .3;
  background: linear-gradient(145deg, rgba(99, 185, 214, .55), transparent 58%);
}
.stones-sea-root[data-sea-mood="warm"] .sea-map-frame::before {
  opacity: .34;
  background: radial-gradient(circle at 76% 20%, rgba(255, 183, 92, .68), transparent 55%);
}
.stones-sea-root[data-sea-mood="braided"] .sea-map-frame::before {
  opacity: .28;
  background: linear-gradient(115deg, rgba(87, 183, 216, .48), transparent 44%, rgba(255, 183, 98, .46));
}
.stones-sea-root[data-sea-mood="rain"] .sea-map-frame::before {
  opacity: .34;
  background: linear-gradient(165deg, rgba(138, 170, 178, .5), transparent 48%, rgba(42, 116, 139, .42));
}
.stones-sea-root[data-sea-mood="rain"] .sea-map-frame::after {
  opacity: .2;
  transform: rotate(4deg);
}
.stones-sea-root[data-sea-mood="still"] .sea-map-frame::after { opacity: .06; }
.stones-sea-root[data-sea-mood="still"] .sea-map-frame::before {
  opacity: .26;
  background: radial-gradient(circle at 50% 12%, rgba(232, 221, 175, .46), transparent 60%);
}
.stones-sea-root[data-sea-mood="squall"] .sea-map-frame::before {
  opacity: .42;
  background: linear-gradient(120deg, rgba(29, 56, 75, .62), transparent 47%, rgba(119, 173, 180, .32));
}
.stones-sea-root[data-sea-mood="squall"] .sea-map-frame::after { opacity: .22; }
.stones-sea-root[data-sea-mood="clear"] .sea-map-frame::before { opacity: .14; }

.stones-sea-root.is-season-shifting .sea-map-frame {
  animation: seaSeasonCrossfade 2.5s ease both;
}

.sea-map {
  width: 100%;
  height: 100%;
  display: block;
}

.sea-stars circle {
  fill: #ffeab4;
}

.sea-stars path {
  fill: none;
  stroke: #ffeab4;
  stroke-width: 0.7;
  stroke-dasharray: 2 4;
}

.sea-current {
  fill: none;
  stroke: #b9f2e7;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.17;
}

.sea-current path:first-child {
  stroke-dasharray: 7 11;
  animation: seaCurrentDrift var(--sea-current-duration) linear infinite;
}

.current-b path:first-child { animation-direction: reverse; animation-duration: calc(var(--sea-current-duration) + 2s); }
.current-c path:first-child { animation-duration: calc(var(--sea-current-duration) - 2s); }

.sea-western-raft {
  pointer-events: none;
  animation: seaRaftDrift 88s linear infinite;
  filter: drop-shadow(0 5px 4px rgba(2, 37, 51, .45));
}

.sea-western-raft-bob { animation: seaRaftBob 5.5s ease-in-out infinite; }
.sea-raft-shadow { fill: rgba(2, 42, 57, .42); }
.sea-raft-logs { fill: #9b6a3d; stroke: #e1bd75; stroke-width: 2; stroke-linecap: round; }
.sea-raft-logs path:not(:first-child) { fill: none; stroke: #654527; stroke-width: 1.5; }
.sea-raft-paddle { fill: #bf8950; stroke: #f0cf8a; stroke-width: 2.5; stroke-linecap: round; }
.sea-rider-face { fill: #c88e62; stroke: #f0c096; stroke-width: 1.5; }
.sea-rider-coat { fill: #685448; stroke: #c49668; stroke-width: 1.5; }
.rider-two .sea-rider-coat { fill: #435c62; }
.rider-three .sea-rider-coat { fill: #7b4939; }
.sea-rider-hat { fill: #9a7048; stroke: #f0c17e; stroke-width: 1.5; stroke-linejoin: round; }
.rider-two .sea-rider-hat { fill: #57473e; }
.sea-rider-beard { fill: #e3d1ae; stroke: #765944; stroke-width: 1; }
.rider-three .sea-rider-beard { fill: #8e5c3c; }
.sea-rider-moustache { fill: #4d382f; }
.sea-raft-wake { fill: none; stroke: rgba(213, 255, 244, .65); stroke-width: 2; stroke-dasharray: 5 7; }

.sea-route use {
  fill: none;
  stroke: #b8ddd7;
  stroke-width: 2;
  stroke-dasharray: 5 9;
  opacity: 0.52;
  transition: stroke 300ms, opacity 300ms, stroke-width 300ms;
}

.sea-route text {
  fill: #d1e7e2;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.sea-route.is-favored use {
  stroke: #f7c364;
  stroke-width: 3.5;
  opacity: 1;
  filter: url(#route-glow);
  animation: seaRouteDash 5s linear infinite;
}

.sea-route.is-favored text {
  fill: #ffe9aa;
  opacity: 1;
}

.sea-route.is-risky use {
  opacity: 0.25;
}

.sea-route.is-success use {
  stroke: #76f0b7;
  stroke-width: 6;
  opacity: 1;
  filter: url(#route-glow);
}

.sea-route.is-failed use {
  stroke: #ff806d;
  stroke-width: 5;
  opacity: 1;
}

.sea-destination {
  cursor: pointer;
  transition: transform 250ms ease;
}

.sea-destination:hover {
  filter: brightness(1.13);
}

.sea-destination text,
.sea-quarry text {
  text-anchor: middle;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  fill: #edf8ec;
  paint-order: stroke;
  stroke: #0a485a;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.sea-destination .sea-destination-sub,
.sea-quarry .sea-destination-sub {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  fill: #c4e6df;
}

.sea-destination-ring {
  fill: none;
  stroke: #54c9c0;
  stroke-width: 1;
  stroke-dasharray: 3 6;
}

.sea-deep-node {
  fill: #0b435f;
  stroke: #62c4bf;
  stroke-width: 2;
}

.sea-fish {
  fill: #f0c372;
  stroke: #fce5a9;
  stroke-width: 2;
}

.sea-reef-shelf,
.sea-home-reef {
  fill: none;
  stroke: #78d4bd;
  stroke-width: 12;
  stroke-dasharray: 2 6;
  opacity: 0.78;
}

.sea-lagoon,
.sea-home-lagoon {
  fill: url(#lagoon-water);
  stroke: #b3ecdc;
  stroke-width: 1;
}

.sea-island,
.sea-home-island {
  fill: url(#island-green);
  stroke: #c4cf84;
  stroke-width: 3;
}

.sea-palm {
  fill: none;
  stroke: #1f664b;
  stroke-width: 4;
  stroke-linecap: round;
}

.sea-house,
.sea-home-house {
  fill: none;
  stroke: #f0e2b3;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sea-quarry-island {
  fill: #8b7d68;
  stroke: #c8bd95;
  stroke-width: 3;
}

.sea-stone-stack circle {
  fill: #b6aa8c;
  stroke: #d8cda9;
  stroke-width: 3;
}

.sea-home-reef {
  stroke-width: 18;
}

.sea-home-label {
  text-anchor: middle;
  fill: #f4ebca;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.sea-coral {
  fill: #ef816e;
  stroke: #f0a484;
  stroke-width: 3;
  stroke-linecap: round;
}

.sea-map-token circle {
  stroke: #fff3d3;
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 2px rgba(6, 50, 54, 0.45));
}

.sea-map-token text {
  text-anchor: middle;
  fill: white;
  font-size: 13px;
  font-weight: 900;
}

.sea-map-token.is-active {
  animation: seaTokenFloat 1.6s ease-in-out infinite;
}

.sea-map-token.is-active circle {
  stroke: #ffd979;
  stroke-width: 4;
}

.sea-map-canoes path {
  stroke: #fff1c0;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hull and mast are spars; only the sail is a filled surface. */
.sea-map-canoes .sea-canoe-hull,
.sea-map-canoes .sea-canoe-mast {
  fill: none;
}

.sea-map-canoes .sea-canoe-sail {
  fill: #e0a95a;
}

.sea-life-signs {
  fill: none;
  stroke: #d5efe3;
  stroke-width: 2;
  opacity: 0.55;
}

.sea-life-signs text {
  fill: #d5efe3;
  stroke: none;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.sea-voyage-odds {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
  z-index: 3;
}

.sea-voyage-odds button {
  pointer-events: auto;
  border: 1px solid rgba(226, 248, 238, 0.28);
  background: rgba(5, 49, 61, 0.84);
  color: #dff3eb;
  padding: 6px 9px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.sea-voyage-odds button:hover {
  background: #105d6d;
  border-color: #f1bd63;
}

.sea-voyage-odds button:disabled {
  pointer-events: none;
}

.sea-voyage-odds strong {
  color: #f2c46e;
  font-size: 11px;
}

.sea-waiting-note {
  border-radius: 20px;
  padding: 7px 12px;
  color: #cee2de;
  background: rgba(5, 49, 61, 0.78);
  font-size: 10px;
}

.sea-player-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 7px;
  padding-top: 10px;
}

.sea-player-chip {
  min-width: 0;
  min-height: 69px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: 31px auto;
  align-items: center;
  gap: 2px 7px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(22, 75, 77, 0.12);
  border-bottom: 3px solid var(--player-color);
  background: rgba(255, 252, 240, 0.78);
}

.sea-player-chip.is-active {
  background: #fffaf0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--player-color) 55%, white);
}

.sea-player-symbol {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--player-color);
  color: #fff;
  font-size: 15px;
}

.sea-player-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sea-player-name strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}

.sea-player-name span,
.sea-player-stats small {
  font-size: 7px;
  color: #70837e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.sea-player-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding-top: 3px;
  border-top: 1px solid rgba(26, 74, 72, 0.1);
}

.sea-player-stats span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sea-player-stats b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 500;
}

.sea-commons-column {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr) auto;
  gap: 10px;
}

.sea-panel {
  border-radius: 18px;
  padding: 14px;
  background: var(--sea-paper);
  min-height: 0;
  overflow: hidden;
}

.sea-panel-title {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sea-panel-title > span {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e7d6b4;
  color: #705f43;
  font-size: 21px;
}

.sea-panel-title div {
  display: flex;
  flex-direction: column;
}

.sea-panel-title small {
  color: #b25b4e;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.sea-panel-title strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

.sea-panel-copy {
  margin: 9px 0 11px;
  font-size: 10px;
  line-height: 1.4;
  color: #65746e;
}

.sea-expedition {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sea-expedition-slot {
  min-height: 48px;
  border: 1px dashed #bfaf8d;
  border-radius: 10px;
  padding: 6px 7px;
  display: grid;
  grid-template-columns: 24px 1fr 6px;
  align-items: center;
  gap: 5px;
  background: rgba(238, 224, 193, 0.38);
}

.sea-expedition-slot.is-filled {
  border-style: solid;
  background: #fffaf0;
}

.sea-slot-icon {
  font-size: 17px;
  color: #896e43;
}

.sea-expedition-slot div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sea-expedition-slot strong {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sea-expedition-slot small {
  color: #77817a;
  font-size: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sea-expedition-slot i {
  width: 6px;
  height: 28px;
  border-radius: 4px;
}

.sea-sponsor,
.sea-expedition-chance {
  padding: 7px 8px;
  border-radius: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #dfcfad;
  font-size: 9px;
}

.sea-sponsor {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.sea-sponsor span,
.sea-expedition-chance span {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #76684e;
}

.sea-expedition-chance {
  grid-column: 1 / -1;
  background: #183f47;
  color: #dcefe8;
}

.sea-expedition-chance.is-ready {
  background: #226a62;
  box-shadow: 0 0 0 2px rgba(69, 171, 141, 0.25);
}

.sea-expedition-chance span {
  color: #bcd7cf;
}

.sea-expedition-chance strong {
  color: #f3c773;
  font-size: 16px;
}

.sea-ledger-panel {
  display: flex;
  flex-direction: column;
}

.sea-ledger {
  flex: 1;
  min-height: 0;
  margin-top: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sea-empty-ledger {
  height: 100%;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px dashed #cab995;
  border-radius: 12px;
  color: #8b7f66;
}

.sea-empty-ledger span {
  font-size: 36px;
}

.sea-empty-ledger p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.45;
}

.sea-ledger-entry {
  display: grid;
  grid-template-columns: 47px 1fr;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border-radius: 12px;
  background: rgba(232, 216, 182, 0.5);
  cursor: help;
}

.sea-ledger-entry.is-lost {
  background: rgba(166, 205, 205, 0.38);
}

/* Generated per stone in the renderer — see raiStone(). Each outline is
   unique to the stone's name, so the ledger reads as a record of individual
   worked objects rather than a row of identical counters. */
.sea-stone {
  width: 46px;
  height: 46px;
  flex: none;
  filter: drop-shadow(0 3px 6px rgba(61, 50, 31, 0.32));
}

/* Sheltered or handled: warm cream to honey-buff. */
.sea-stone.is-fresh .sea-stone-body {
  fill: #b9a87c;
}
.sea-stone.is-fresh .sea-stone-boss {
  fill: #d3c39a;
}

/* Long exposed: grey and tan mottling. Never white. */
.sea-stone.is-weathered .sea-stone-body {
  fill: #8f938c;
}
.sea-stone.is-weathered .sea-stone-boss {
  fill: #a8aca3;
}

.sea-ledger-entry.is-lost .sea-stone {
  opacity: 0.58;
  filter: saturate(0.4);
}

.sea-ledger-entry > div:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sea-ledger-entry strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 500;
}

.sea-ledger-entry span,
.sea-ledger-entry small {
  color: #786f5c;
  font-size: 8px;
}

.sea-ledger-entry small {
  color: #a65148;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sea-buildings {
  margin-top: 11px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sea-buildings > div {
  border-radius: 9px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  background: #eadcbf;
}

.sea-buildings span {
  color: #846d46;
  font-size: 16px;
}

.sea-buildings small {
  font-size: 8px;
  color: #6f746c;
}

.sea-buildings strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

/* Renderer-owned action panel */
.sea-time-shells {
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #174e58, #103943);
}

.sea-time-shells span {
  color: rgba(255, 255, 255, 0.18);
  font-size: 17px;
  transition: color 250ms, transform 250ms;
}

.sea-time-shells span.is-full {
  color: #f0c46f;
  text-shadow: 0 0 8px rgba(240, 196, 111, 0.5);
  transform: scale(1.08);
}

.sea-action-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--bg);
}

.sea-action-tab {
  border: 0;
  border-radius: 7px;
  padding: 6px 4px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.sea-action-tab:hover,
.sea-action-tab.is-active {
  color: #fff;
  background: #176370;
}

.sea-action-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sea-action-card {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  background: linear-gradient(150deg, var(--surface2), var(--surface));
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms, border-color 160ms, background 160ms;
}

.sea-action-card:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #2e9aa3;
  background: linear-gradient(150deg, #174d59, #123d47);
}

.sea-action-card:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.sea-action-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #215d67;
  color: #f1c978;
  font-size: 16px;
}

.sea-action-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sea-action-copy strong {
  font-size: 11px;
}

.sea-action-copy small {
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.3;
}

.sea-action-card > b {
  color: #f0bd63;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

.sea-action-card > i {
  color: var(--text-muted);
  font-style: normal;
  font-size: 18px;
}

.sea-action-wait {
  min-height: 120px;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.sea-action-wait span {
  font-size: 31px;
  color: #3ca0a5;
}

.sea-toast {
  position: absolute;
  z-index: 20;
  top: 126px;
  left: 50%;
  max-width: 470px;
  padding: 10px 16px;
  border-radius: 30px;
  background: #143f48;
  color: #f1f7ee;
  box-shadow: 0 9px 32px rgba(3, 35, 42, 0.35);
  font-size: 12px;
  transform: translate(-50%, -20px);
  opacity: 0;
  pointer-events: none;
}

.sea-toast[data-tone="success"] { background: #236a59; }
.sea-toast[data-tone="warning"] { background: #8b6333; }
.sea-toast[data-tone="danger"] { background: #993f3a; }
.sea-toast.is-showing { animation: seaToast 3s ease both; }

.sea-celebration {
  position: absolute;
  z-index: 19;
  top: 50%;
  left: 50%;
  pointer-events: none;
}

.sea-celebration i {
  --angle: calc(var(--i) * 20deg);
  position: absolute;
  width: 8px;
  height: 16px;
  border-radius: 6px;
  background: var(--burst-color);
  transform: rotate(var(--angle)) translateY(0);
  animation: seaBurst 1.3s cubic-bezier(.2, .7, .2, 1) forwards;
}

@keyframes seaCurrentDrift { to { stroke-dashoffset: -72; } }
@keyframes seaRouteDash { to { stroke-dashoffset: -28; } }
@keyframes seaSurfaceFlow { to { transform: translate3d(11%, 5%, 0); } }
@keyframes seaRaftDrift {
  0%, 16% { transform: translate(1030px, 225px) rotate(-2deg); opacity: 0; }
  19% { transform: translate(990px, 228px) rotate(-1deg); opacity: .95; }
  43% { transform: translate(610px, 252px) rotate(2deg); opacity: .95; }
  64% { transform: translate(270px, 220px) rotate(-2deg); opacity: .95; }
  80% { transform: translate(-105px, 245px) rotate(1deg); opacity: .95; }
  83%, 100% { transform: translate(-180px, 247px) rotate(1deg); opacity: 0; }
}
@keyframes seaRaftBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}
@keyframes seaSeasonCrossfade {
  0% { filter: saturate(.75) brightness(.88); }
  45% { filter: saturate(1.12) brightness(1.08); }
  100% { filter: none; }
}
@keyframes seaTokenFloat { 50% { transform: translateY(-4px); } }
@keyframes seaDangerPulse { 50% { opacity: 0.45; } }
@keyframes seaToast {
  0% { opacity: 0; transform: translate(-50%, -18px); }
  12%, 82% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -8px); }
}
@keyframes seaBurst {
  0% { opacity: 1; transform: rotate(var(--angle)) translateY(0) scale(.5); }
  100% { opacity: 0; transform: rotate(var(--angle)) translateY(-170px) scale(1.2); }
}

@media (max-width: 1180px) {
  .stones-sea-root { min-width: 850px; }
  .sea-topbar { grid-template-columns: 1fr; }
  .sea-balance { min-height: 86px; }
  .sea-table { grid-template-columns: minmax(570px, 1fr) 270px; }
  .sea-player-chip { grid-template-columns: 28px minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .stones-sea-root { min-width: 740px; min-height: 720px; }
  .sea-table { grid-template-columns: minmax(515px, 1fr) 215px; }
  .sea-map-card { padding: 10px; }
  .sea-commons-column { grid-template-rows: auto minmax(130px, 1fr); }
  .sea-buildings-panel { display: none; }
  .sea-expedition { grid-template-columns: 1fr; }
  .sea-sponsor, .sea-expedition-chance { grid-column: auto; }
  .sea-sign-row { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .sea-current path,
  .sea-route use,
  .sea-map-token,
  .sea-track.is-danger .sea-track-label strong {
    animation: none !important;
  }
  .sea-map-frame::after,
  .stones-sea-root.is-season-shifting .sea-map-frame,
  .sea-western-raft-bob {
    animation: none !important;
  }
  .sea-western-raft { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRELIMINARY MARK SET
   Placeholder SVG board art replacing the typographic glyphs the board used
   to draw. Symbols are inlined once in index.html; the editable master lives
   at client/img/stones-of-the-sea/marks.svg. Every mark inherits the colour
   of its container, so the containers below keep their existing palette.
   ═══════════════════════════════════════════════════════════════════════════ */

.sea-mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  flex: none;
}

/* Sized against the containers that already set the colour and the circle. */
.sea-player-symbol .sea-mark {
  width: 17px;
  height: 17px;
  vertical-align: 0;
}

.sea-action-icon .sea-mark {
  width: 18px;
  height: 18px;
  vertical-align: 0;
}

.sea-slot-icon .sea-mark {
  width: 19px;
  height: 19px;
}

.sea-track-label .sea-mark {
  width: 14px;
  height: 14px;
}

#sea-buildings .sea-mark {
  width: 16px;
  height: 16px;
}

.sea-panel-title .sea-mark {
  width: 18px;
  height: 18px;
}

.sea-sign-row .sea-mark {
  width: 13px;
  height: 13px;
}

.sea-time-shells .sea-mark {
  width: 15px;
  height: 15px;
}

.sea-empty-ledger .sea-mark {
  width: 30px;
  height: 30px;
}
