.ope { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .ope { grid-template-columns: 1fr; } }
.o-main { display: flex; flex-direction: column; gap: 10px; }
.o-boardwrap { position: relative; border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #1d5f7a, #0b2a3a); box-shadow: 0 10px 34px rgba(0,0,0,.45); }
#oBoard { display: block; width: min(100%, calc(100vh - 150px)); height: auto; margin: 0 auto; }
@media (max-width: 700px) { #oBoard { width: 100%; } }
#oRot { transition: transform .6s ease; }
.o-ocean { fill: url(#oSea); stroke: #e8d8a8; stroke-width: 10; stroke-linejoin: round; }
.o-sq { fill: #f3e7c4; stroke: #b99c63; stroke-width: 1.2; }
.o-safe { fill: rgba(255,255,255,.75); stroke-width: 2.4; }
.o-safe-link { stroke-width: 3; stroke-dasharray: 3 3; opacity: .8; }

/* slides: seaweed */
.o-current { stroke-width: 13; stroke-linecap: round; opacity: .28; }
.o-stalk { fill: none; stroke: #2f6b3a; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.o-leaf path:first-child { stroke: rgba(20, 40, 25, .55); stroke-width: .8; }
.o-vein { fill: none; stroke: rgba(255,255,255,.55); stroke-width: .7; stroke-linecap: round; }
.o-leaf { animation: oleaf 2.6s ease-in-out infinite alternate; }
@keyframes oleaf { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
.o-tri { stroke: #fff; stroke-width: 1.5; }
.o-end { stroke: #fff; stroke-width: 1.8; }
.o-shine { fill: rgba(255,255,255,.7); pointer-events: none; }

/* Home: anemone */
.o-anem-shadow { fill: rgba(11, 42, 58, .16); }
.o-tent path { fill: none; stroke-linecap: round; }
.o-tent { animation: otent 2.2s ease-in-out infinite alternate; }
@keyframes otent { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }

/* Start: fish bowl */
.o-bowl-shadow { fill: rgba(11, 42, 58, .2); }
.o-glass { fill: rgba(225, 245, 252, .55); }
.o-water { opacity: .28; }
.o-water2 { fill: rgba(140, 210, 235, .45); }
.o-waterline { fill: rgba(255,255,255,.45); }
.o-glass-edge { fill: none; stroke-width: 2.6; opacity: .9; }
.o-rim { fill: rgba(255,255,255,.35); stroke-width: 2.2; }
.o-glint { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 2.2; stroke-linecap: round; }

/* pawns: your sea-creature piece on a disc of your colour */
.o-pawn { cursor: default; }
.o-pdisc { stroke: #fff; stroke-width: 2.4; filter: url(#oShadow); }
.o-pin { fill: rgba(255,255,255,.88); }
.o-pnum { font: 800 8px system-ui, sans-serif; fill: #0b2a3a; paint-order: stroke; stroke: #fff; stroke-width: 2.2px; text-anchor: middle; }
.o-pawn.can { cursor: pointer; }
.o-pawn.can .o-pdisc { stroke: #fff36a; stroke-width: 4; animation: oglow 1.1s ease-in-out infinite; }
.o-pawn.tgt .o-pdisc { stroke: #ff4d4d; stroke-width: 4; animation: oglow 1.1s ease-in-out infinite; }
.o-pawn.tgt { cursor: pointer; }
.o-pawn.sel .o-pdisc { stroke: #fff; stroke-width: 5; }
@keyframes oglow { 50% { stroke-opacity: .35; } }
.o-size { transition: transform .4s ease; }
.o-pawn.inbowl .o-size { transform: scale(.78); }
.o-face.left { transform: scaleX(-1); }

/* floating in the bowl, swaying in the anemone */
.o-pawn.inbowl .o-bob { animation: ofloat 2.6s ease-in-out infinite alternate; }
@keyframes ofloat { from { transform: translateY(-2.5px) rotate(-4deg); } to { transform: translateY(2.5px) rotate(4deg); } }
.o-pawn.inbowl .g-swim .lb { animation: otail 1.1s ease-in-out infinite alternate; }
.o-pawn.inbowl .g-walk .lb { animation: olegs 1.2s ease-in-out infinite alternate; }
.o-pawn.home .o-bob { animation: ofloat 3.4s ease-in-out infinite alternate; }

/* walking, swimming or bouncing along: one hop per square */
.o-pawn.moving { z-index: 2; }
.o-pawn.moving .o-bob { animation: ohop var(--step, 180ms) ease-in-out infinite; }
@keyframes ohop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.o-pawn.moving .g-swim .lb { animation: otail calc(var(--step, 180ms) * .6) ease-in-out infinite alternate; }
.o-pawn.moving .g-swim .rig { animation: oswim calc(var(--step, 180ms) * 1.2) ease-in-out infinite alternate; }
.o-pawn.moving .g-walk .lb { animation: olegs calc(var(--step, 180ms) * .5) ease-in-out infinite alternate; }
.o-pawn.moving .g-walk .rig { animation: owaddle var(--step, 180ms) ease-in-out infinite alternate; }
.o-pawn.moving .g-bounce .rig { animation: osquash calc(var(--step, 180ms) * .5) ease-in-out infinite alternate; }
.o-pawn.moving .g-hop .rig { animation: osquash calc(var(--step, 180ms) * .5) ease-in-out infinite alternate; }
.g-swim .lb { transform-origin: 15px 20px; }
.g-swim .rig { transform-origin: 20px 20px; }
.g-walk .lb { transform-origin: 20px 24px; }
.g-walk .rig { transform-origin: 20px 36px; }
.g-bounce .rig, .g-hop .rig { transform-origin: 20px 37px; }
@keyframes otail { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes oswim { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes olegs { from { transform: skewX(-20deg); } to { transform: skewX(20deg); } }
@keyframes owaddle { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes osquash { from { transform: scale(1.12, .86); } to { transform: scale(.92, 1.1); } }
.o-pawn.flying .o-bob { animation: ospin .75s ease-in-out; }
@keyframes ospin { 0% { transform: scale(1) rotate(0); } 50% { transform: scale(1.35) rotate(200deg); } 100% { transform: scale(1) rotate(360deg); } }

.o-target { fill: rgba(255, 243, 106, .45); stroke: #fff36a; stroke-width: 2.5; cursor: pointer; animation: oglow 1s ease-in-out infinite; }
.o-target.back { fill: rgba(255, 140, 90, .45); stroke: #ff8c5a; }
.o-target.sorry, .o-target.swap { fill: rgba(255, 77, 77, .35); stroke: #ff4d4d; }

/* the deck in the middle: the clownfish card */
.o-deck { cursor: default; }
.o-deck.live { cursor: pointer; }
.o-dbounce { transform-origin: 40px 112px; }
.o-deck.live .o-dbounce { animation: obounce 1.2s ease-in-out infinite; }
@keyframes obounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.o-deck.live > .o-dbounce > rect:first-child { stroke: #f2c14e; stroke-width: 3.2; }
.o-dword { font: 900 30px Georgia, 'Times New Roman', serif; fill: #c0392b; text-anchor: middle; paint-order: stroke; stroke: #4a3220; stroke-width: 1.4px; }
.o-badge circle { fill: #fff; stroke: #4a3220; stroke-width: 1.2; }
.o-count { font: 800 8.5px system-ui, sans-serif; fill: #0b2a3a; text-anchor: middle; }
.o-bub { fill: rgba(255,255,255,.7); stroke: #6aa9c2; stroke-width: .5; animation: obub 2.6s ease-out forwards; pointer-events: none; }
@keyframes obub { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(var(--dx, 4px), -72px); opacity: 0; } }

/* fish parts; every transform origin is in the fish's own units (its middle is 0,0) */
.f-tail { transform-origin: -19px 0px; animation: ofin 1.1s ease-in-out infinite alternate; }
.f-pec { transform-origin: 4px 3.5px; animation: opec .7s ease-in-out infinite alternate; }
.f-fintop { transform-origin: 4px -13px; animation: ofin2 1.4s ease-in-out infinite alternate; }
.f-finbot { transform-origin: 6px 14px; animation: ofin2 1.4s ease-in-out infinite alternate-reverse; }
.f-swim { animation: ofloat2 1.8s ease-in-out infinite alternate; }
.o-deck.live .f-tail { animation-duration: .4s; }
.o-deck.live .f-pec { animation-duration: .3s; }
@keyframes ofin { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
@keyframes opec { from { transform: rotate(-22deg); } to { transform: rotate(18deg); } }
@keyframes ofin2 { from { transform: skewX(-8deg); } to { transform: skewX(8deg); } }
@keyframes ofloat2 { from { transform: translateY(-1.2px); } to { transform: translateY(1.2px); } }
.f-pupil { transition: transform .35s ease; }
.f-eye { transform-origin: 20px -3.5px; transition: transform .08s; }
.o-deck.blink .f-eye { transform: scaleY(.12); }
.f-happyeye, .f-m1, .f-m2 { display: none; }
.o-deck.happy .f-happyeye, .o-deck.happy .f-m1 { display: inline; }
.o-deck.happy .f-eye, .o-deck.happy .f-m0 { display: none; }
.o-deck.happy .o-fish { animation: ohappy .5s ease-in-out 3; }
@keyframes ohappy { 0%, 100% { transform: translate(40px, 77px) scale(.76); } 50% { transform: translate(40px, 72px) scale(.76) rotate(-6deg); } }
.o-deck.shock .f-m0 { display: none; }
.o-deck.shock .f-m2 { display: inline; }
.o-deck.shock .f-eye { transform: scale(1.3); }
.o-deck.shock .f-pupil { r: 1.05; }
.o-deck.shock .o-fish { animation: oshake .09s linear 8; }
@keyframes oshake { 0%, 100% { transform: translate(40px, 77px) scale(.76); } 50% { transform: translate(41.6px, 76px) scale(.76); } }
.o-deck.off .o-fish *, .ope.still .o-leaf, .ope.still .o-tent, .ope.still .o-bob { animation: none !important; }
.ope.still .o-deck .f-tail, .ope.still .o-deck .f-pec { animation: none; }

/* the face-up card */
.o-fc-bg { fill: #fffaf0; stroke: #0b6e8a; stroke-width: 2.2; }
.o-fc-bg.ope { fill: #fff1e4; stroke: #e63946; }
.o-fc-in { fill: none; stroke: rgba(11,110,138,.3); stroke-width: .6; }
.o-fc-in.ope { stroke: rgba(230,57,70,.35); }
.o-fc-n { font: 900 32px Georgia, 'Times New Roman', serif; fill: #0b6e8a; text-anchor: middle; }
.o-fc-n.ope { font-size: 20px; fill: #e63946; }
.o-fc-t { font-family: system-ui, sans-serif; fill: #0b2a3a; text-anchor: middle; }
.o-fc-tap { font: 600 5px system-ui, sans-serif; fill: #6b8794; text-anchor: middle; letter-spacing: .3px; }
.o-face-card { cursor: zoom-in; }
.o-face-card.used { opacity: .6; }
/* turn the card over around its own middle (fill-box), so no part of it swings outside the board and gets cut off */
.o-face-card.flip { transform-box: fill-box; transform-origin: 50% 50%; animation: oflip .5s ease-out; }
@keyframes oflip { 0% { transform: scaleX(0); } 55% { transform: scaleX(1.04); } 100% { transform: scaleX(1); } }
.o-slot { fill: rgba(255,255,255,.12); stroke: rgba(255,255,255,.55); stroke-width: 1.4; stroke-dasharray: 4 3; }
.o-slot-t { font: 700 9px system-ui, sans-serif; fill: rgba(255,255,255,.7); text-anchor: middle; }

/* tap-to-read card */
.o-zoom { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; background: rgba(4, 20, 30, .55); color: #fff; z-index: 5; }
.o-zoom.hidden { display: none; }
.o-card { width: 92px; min-height: 124px; border-radius: 10px; background: linear-gradient(160deg, #fffaf0, #f3e7c4); border: 3px solid #0b6e8a; color: #0b2a3a; padding: 6px 7px;
  display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.o-card .n { font: 900 2.1rem/1 Georgia, serif; color: #0b6e8a; }
.o-card p { font-size: .66rem; margin: 4px 0 0; line-height: 1.2; }
.o-card i { font-size: .6rem; margin-top: 4px; color: #a33; }
.o-card.ope { border-color: #e63946; background: linear-gradient(160deg, #fff4e6, #ffd6c2); }
.o-card.ope .n { color: #e63946; font-size: 1.7rem; }
.o-card.big { width: 190px; min-height: 260px; padding: 14px 12px; border-radius: 16px; }
.o-card.big .n { font-size: 4.2rem; }
.o-card.big.ope .n { font-size: 3rem; }
.o-card.big p { font-size: 1.05rem; margin-top: 12px; }
.o-card.big i { font-size: .9rem; margin-top: 10px; }

.o-panel { display: flex; flex-direction: column; gap: 8px; }
.o-status { font-weight: 800; font-size: 1.05rem; }
.o-status.me { color: var(--accent); }
.o-timer { font-weight: 700; color: var(--muted); margin-left: 6px; }
.o-moves { display: flex; flex-wrap: wrap; gap: 6px; }
.o-moves .btn.ope { border-color: #e63946; }

.o-flash { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.3); font: 900 4.5rem Georgia, serif; color: #fff3d6; text-shadow: 0 4px 0 #e63946, 0 8px 18px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; }
.o-flash.show { animation: oflash 1.4s ease-out; }
@keyframes oflash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-10deg); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(-6deg); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1) rotate(-6deg); } }

/* side panel */
.o-side { display: flex; flex-direction: column; gap: 12px; }
.o-side .card { padding: 12px; }
.o-pl { display: grid; grid-template-columns: 32px 1fr; gap: 8px; align-items: center; padding: 6px; border-radius: 10px; border: 1px solid transparent; }
.o-pl.cur { border-color: var(--accent); background: rgba(242,193,78,.08); }
.o-pl .sw { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.9); border: 3px solid var(--pc); display: grid; place-items: center; line-height: 0; }
.o-pl .nm { font-weight: 600; }
.o-pl .meta { font-size: .75rem; color: var(--muted); }
.pip { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 2px; background: var(--pc); opacity: .35; vertical-align: middle; }
.pip.track, .pip.safe { opacity: .75; }
.pip.home { opacity: 1; box-shadow: 0 0 0 2px #fff3; }
.o-endbox { text-align: center; }
@media (max-width: 600px) { .o-card.big { width: 160px; min-height: 220px; } }
