/* ===== 부꽁이: 부산 바다 60초 ===== */
/* 모바일(세로) 우선: 논리 해상도 540x960 (9:16) */
:root{--sea-w:min(100%, 500px, calc((100svh - 190px) * 0.5625))}
.sea{display:flex;flex-direction:column;align-items:center;gap:10px;-webkit-user-select:none;user-select:none}

.sea-hud{width:var(--sea-w);display:flex;align-items:center;gap:8px}
.sea-hud .stat{flex:1;min-width:0}
.sea-hud .stat.time.warn{background:var(--bandana-btn);color:#fff}
.sea-hud .stat.time.warn span{color:#fff}
.sea-hud .stat.time.warn b{animation:seaPulse .5s infinite alternate}
.sea-hud .stat.bump{animation:seaBump .3s ease}
.sea-hud .stat.drop{animation:seaDrop .4s ease}

#seaStage{position:relative;width:var(--sea-w);aspect-ratio:9/16;overflow:hidden;background:var(--sea)}
#seaCanvas{display:block;width:100%;height:100%;touch-action:none;cursor:pointer;-webkit-touch-callout:none}

/* 시작 카드 */
.sea-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.sea-head .panel__title{font-size:28px}
.sea-hero{width:78px;height:auto;flex-shrink:0;margin:-8px -4px -4px 0}
.sea-howto{margin:6px 0 10px;padding:8px 12px;font-size:15px;font-weight:600;line-height:1.5;background:var(--foam);border:2px solid var(--ink);border-radius:var(--r-s)}
.sea-howto b{color:var(--bandana-btn);font-weight:800}
.sea-howto small{display:block;margin-top:2px;font-size:12px;font-weight:600;color:var(--muted)}
.sea-legend{list-style:none;padding:0;margin:0 0 6px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:2px solid var(--ink);border-radius:var(--r-s);overflow:hidden}
.sea-legend li{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:6px 8px;font-size:13px;font-weight:700;background:var(--paper);
  border-right:1.5px dashed var(--rule);border-bottom:1.5px dashed var(--rule)}
.sea-legend li:nth-child(3n){border-right:0}
.sea-legend li:nth-last-child(-n+3){border-bottom:0}
.sea-legend li b{font-family:var(--font-display);font-weight:400;font-size:15px;color:var(--good)}
.sea-legend li b.bad{color:var(--bandana-btn)}
.sea-legend li small{flex-basis:100%;color:var(--muted);font-size:11px;font-weight:600;margin:-3px 0 0 24px}
.sea-legend i{width:18px;height:18px;flex-shrink:0;border-radius:4px;display:inline-block}
.lg-net{background:repeating-linear-gradient(45deg,transparent 0 3px,#f3efe2 3px 4.5px),repeating-linear-gradient(-45deg,#e8572e 0 3px,#f3efe2 3px 4.5px);outline:2px solid var(--bandana);outline-offset:-2px}
.lg-trash{background:linear-gradient(#7c8a94,#46525b);border:2px solid var(--bandana)}
.lg-coin{border-radius:50% !important;border:2px solid var(--ink)}
.lg-coin.gold{background:radial-gradient(circle at 35% 35%,#fff6c2,var(--gold) 45%,#b07d00)}
.lg-coin.silver{background:radial-gradient(circle at 35% 35%,#ffffff,#d5dde6 45%,#8796a6)}
.lg-coin.bronze{background:radial-gradient(circle at 35% 35%,#ffd9b0,#cd7f3a 45%,#7d4416)}
.lg-floor{background:linear-gradient(#c8a86e,#7a5f36);border:2px solid var(--ink)}
.sea-sub{margin:4px 0 0;font-size:12px;color:var(--muted)}

/* 결과 */
.sea-summary .c-gold b{color:#9a6b00}.sea-summary .c-silver b{color:#5d6b7a}.sea-summary .c-bronze b{color:#8a4a17}
#bestBoard li small{color:var(--muted);margin-left:8px;font-size:12px;font-weight:600}
.game-sea60 .game-intro{width:var(--sea-w)}

@media (max-width:700px){
  :root{--sea-w:min(100%, calc((100svh - 170px) * 0.5625))}
  .sea-hud .stat b{font-size:19px}
  .sea-legend{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sea-legend li:nth-child(3n){border-right:1.5px dashed var(--rule)}
  .sea-legend li:nth-child(2n){border-right:0}
  .sea-legend li:nth-last-child(-n+3){border-bottom:1.5px dashed var(--rule)}
  .sea-legend li:nth-last-child(-n+2){border-bottom:0}
  .sea-head .panel__title{font-size:24px}
}
/* 가로로 눕힌 휴대폰 */
@media (orientation:landscape) and (max-height:520px){
  :root{--sea-w:min(100%, calc((100svh - 64px) * 0.5625))}
  .sea{gap:4px}
  .sea-hud .stat span{display:none}.sea-hud .stat b{font-size:17px}
}

@keyframes seaPulse{to{opacity:.45}}
@keyframes seaBump{50%{transform:translateY(-3px);background:var(--gold)}}
@keyframes seaDrop{25%{transform:translateX(-4px);background:#fde6e2}75%{transform:translateX(4px)}}
@media (max-width:430px){
  .sea-head .panel__title{font-size:22px}
  .sea-hero{width:60px}
  .sea-legend{grid-template-columns:repeat(3,minmax(0,1fr))}
  .sea-legend li{font-size:12px;padding:5px 6px;gap:4px}
  .sea-legend li small{display:none}
  .sea-legend li:nth-child(2n){border-right:1.5px dashed var(--rule)}
  .sea-legend li:nth-child(3n){border-right:0}
  .sea-legend li:nth-last-child(-n+2){border-bottom:1.5px dashed var(--rule)}
  .sea-legend li:nth-last-child(-n+3){border-bottom:0}
  .sea-sub{display:none}
}
