.tuna-page { color:#f8efcf; background:radial-gradient(ellipse at 44% 7%,#265f60,#102c34 57%,#0b1920); }
.tuna-page .puzzle-main { width:min(calc(100% - 26px),900px); padding:10px 0 26px; }
.tuna-page .puzzle-heading { margin:2px 0 13px; }
.tuna-page h1 { font-size:clamp(2rem,6.5vw,4rem); }
.tuna-page .puzzle-button { background:#244a4b; border-color:#7b9b85; }
.tuna-game { display:grid; grid-template-columns:minmax(0,1fr) minmax(210px,.39fr); gap:14px; align-items:start; }
.tuna-board {
  position:relative;
  isolation:isolate;
  aspect-ratio:1;
  overflow:hidden;
  border:clamp(4px,1vw,8px) solid #cbb584;
  border-radius:15px;
  background:linear-gradient(#092e3c32,#09263340),url("platform-assets/tuna-and-currents.webp") center / cover,#1a555e;
  box-shadow:0 6px 0 #817354,0 17px 32px #07161b9c;
}
.tuna-squares,.tuna-board canvas,#tuna-pieces { position:absolute; inset:0; width:100%; height:100%; }
.tuna-squares { display:grid; grid-template:repeat(8,minmax(0,1fr)) / repeat(8,minmax(0,1fr)); }
.tuna-square {
  position:relative;
  min-width:0;
  border:1px solid #d3ebc350;
  background:#17445370;
  color:#fff9db;
  font-variant-numeric:tabular-nums;
}
.tuna-square.is-alt { background:#428d8980; }
.tuna-square.is-finish { background:#a4773970; }
.tuna-square b { position:absolute; z-index:2; top:4%; left:6%; font-size:clamp(.59rem,1.7vw,1rem); text-shadow:0 1px 3px #0b2324,0 0 3px #052625; }
.tuna-square em { position:absolute; z-index:2; right:7%; bottom:5%; font-style:normal; font-size:clamp(.65rem,1.9vw,1.25rem); font-weight:900; color:#a4ffe4; text-shadow:0 1px 4px #072629; }
.tuna-square.is-eddy em { color:#ffd084; }
.tuna-board canvas { z-index:1; pointer-events:none; }
#tuna-pieces { z-index:3; pointer-events:none; }
.tuna-token {
  position:absolute;
  top:var(--y); left:var(--x);
  display:grid;
  place-items:center;
  width:5.4%; aspect-ratio:1;
  transform:translate(-50%,-50%);
  border:2px solid #fff5c7;
  border-radius:50%;
  background:radial-gradient(circle at 36% 24%,#fff5c3,#eab36d 68%,#b07041);
  box-shadow:0 2px 5px #082125b8;
  color:#2b231a;
  font-size:clamp(.54rem,1.6vw,.9rem);
  font-weight:900;
}
.tuna-token:nth-child(2) { background:radial-gradient(circle at 36% 24%,#d7fff1,#78deca 70%,#359a9c); }
.tuna-token.is-off { visibility:hidden; }
.tuna-panel { border:1px solid #69968b; border-radius:14px; background:#142f32; padding:12px; box-shadow:0 10px 25px #081a206b; }
.tuna-legend { display:flex; justify-content:space-between; gap:8px; font-size:.83rem; color:#fff4d6; }
.tuna-legend span { display:flex; align-items:center; gap:5px; }
.tuna-legend i { width:9px; height:9px; border-radius:50%; background:#7ff4d3; }
.tuna-legend .tuna-down { background:#ffc979; }
.tuna-players { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:10px; }
.tuna-player { padding:7px; border:1px solid #5f8380; border-radius:8px; color:#f3ebd6; font-size:.82rem; }
.tuna-player strong { display:block; font-size:1.03rem; }
.tuna-player.is-active { border-color:#f7ce81; background:#24474a; }
.tuna-status { min-height:2.6em; margin:10px 0; color:#fff0cd; font-size:.93rem; }
.tuna-controls { display:grid; grid-template-columns:1fr 1fr; gap:7px; align-items:center; }
.tuna-controls label { font-size:.84rem; }
.tuna-controls select { width:100%; min-width:0; }
.tuna-controls .tuna-roll { color:#1c372d; background:#f1ce87; border-color:#ffedb2; }
#tuna-die { font-size:1.28em; line-height:1; vertical-align:baseline; }
@media (max-width:700px), (pointer:coarse) and (orientation:portrait) {
  .tuna-page .puzzle-main { width:min(calc(100% - 16px),680px); }
  .tuna-game { grid-template-columns:minmax(0,1fr); gap:12px; }
  .tuna-panel { padding:8px; }
  .tuna-status { min-height:1.3em; margin:6px 0; }
  .tuna-players { margin-top:6px; }
  .tuna-player strong { display:inline; margin-right:4px; }
}
.tuna-square.is-card em { color:#e6adff; }
.tuna-square.is-eddy em {
  font-size:clamp(.85rem,2.4vw,1.55rem);
  animation:tuna-spin 3.5s linear infinite;
}
.tuna-square.is-event-active { box-shadow:inset 0 0 0 3px #fff0ad; background:#ffd87f58; }
.tuna-square.is-event-active.is-eddy em { animation-duration:.55s; }
@keyframes tuna-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .tuna-square.is-eddy em { animation:none; } }
.tuna-legend { flex-wrap:wrap; }
.tuna-controls .tuna-roll { white-space:nowrap; padding-inline:5px; font-size:.86rem; }
.tuna-controls label,.tuna-controls select { grid-column:1/-1; }
.tuna-card {
  width:min(calc(100% - 26px),410px);
  padding:20px;
  border:1px solid #b1bf8d;
  border-radius:17px;
  background:radial-gradient(ellipse at top right,#377078,#183b42 72%);
  color:#fff3d0;
  box-shadow:0 15px 55px #071419b8;
}
.tuna-card::backdrop { background:#071a22c4; }
.tuna-card h2 { font:600 2rem Georgia,serif; margin:5px 0; }
.tuna-card-type { color:#f9cc89; font-weight:800; margin:0; }
.tuna-card-actions { display:grid; gap:7px; }
.tuna-card .puzzle-button[value="risk"] { background:#f3cd86; color:#21322b; }
.tuna-card-odds { color:#d6e3d2; font-size:.85rem; margin:9px 0 0; }
