:root {
  --bg: #e6f3ff;
  --card: rgba(255, 255, 255, .88);
  --card-solid: #ffffff;
  --field-bg: #f1f8ff;
  --line: rgba(31, 139, 255, .2);
  --text: #0d2a4d;
  --muted: #56779c;
  --me: #1f8bff;
  --op: #f0437a;
  --ok: #1f8bff;
  --ok-2: #00b4ff;
  --warn: #f59e0b;
  --ready: #22c55e;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  overscroll-behavior: none;
}

/* 밝은 파란 하늘 */
body {
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(255, 255, 255, .9), transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 10%, rgba(255, 255, 255, .6), transparent 70%),
    linear-gradient(180deg, #f4faff 0%, #dcefff 45%, #b9ddff 100%);
  background-color: var(--bg);
  background-attachment: fixed;
}

button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
.hidden { display: none !important; }

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 18px 50px rgba(31, 110, 200, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin: auto;
}
.card.center { text-align: center; }

.title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h1 { margin: 0 0 4px; font-size: 28px; }
.title-text {
  background: linear-gradient(90deg, #1f8bff, #00b4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { margin: 0 0 8px; font-size: 32px; }
.logo { display: inline-block; animation: spin 6s linear infinite; }
.sub { color: var(--muted); margin: 6px 0 14px; font-size: 14px; word-break: keep-all; overflow-wrap: break-word; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--text);
  font-size: 16px; /* iOS 확대 방지 */
  outline: none;
}
.field input::placeholder { color: #93acc8; }
.field input:focus { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(31, 139, 255, .18); background: #fff; }

.row { display: flex; gap: 8px; align-items: center; }
.row.gap { justify-content: center; margin-bottom: 8px; }

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}
.tab {
  border: 0;
  background: transparent;
  padding: 10px 4px;
  min-height: 44px;
  white-space: nowrap;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 700;
}
.tab.active { background: #fff; color: var(--ok); box-shadow: 0 2px 8px rgba(31, 110, 200, .15); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  flex: 1 0 auto;
  min-width: 56px;
  min-height: 44px;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--field-bg);
  font-weight: 600;
}
.chips button.active { border-color: var(--ok); background: #fff; color: var(--ok); box-shadow: 0 0 0 2px rgba(31, 139, 255, .15); }

.primary {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ok-2), var(--ok));
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  margin-top: 4px;
  box-shadow: 0 8px 22px rgba(31, 139, 255, .32);
}
.primary:active { transform: scale(.98); }
.primary:disabled { opacity: .5; }

.ghost {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ok);
  font-weight: 700;
  margin-top: 8px;
}

.icon-btn {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 20px;
}
.icon-btn.small { width: 36px; height: 36px; font-size: 14px; }

.help-link {
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ok);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  min-height: 44px; /* 손가락으로 누르기 쉽게 (2026-11-01) */
}

.rules { margin-top: 18px; font-size: 14px; color: var(--muted); }
.rules summary { cursor: pointer; color: var(--text); font-weight: 700; }
.rules ol { padding-left: 20px; line-height: 1.6; }
.rules b { color: var(--text); }

.conn { margin-top: 14px; font-size: 12px; color: var(--muted); text-align: center; }
.conn.ok::before { content: "● "; color: var(--ready); }
.conn.bad::before { content: "● "; color: var(--op); }

.big-code {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 6px;
  margin: 4px 0 10px;
  word-break: break-all;
  color: var(--ok);
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 18px auto 8px;
  border: 4px solid rgba(31, 139, 255, .15);
  border-top-color: var(--ok);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 조작법 ---- */
.help-card { max-width: 480px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.help-card h2 { font-size: 24px; text-align: center; }
.help-figure {
  display: block;
  width: 100%;
  height: auto;
  margin: 4px 0 8px;
  border-radius: 14px;
  background: radial-gradient(ellipse 90% 120% at 30% -30%, rgba(255, 255, 255, .35), transparent 70%), linear-gradient(180deg, #4a9448, #3f7d3c);
}
.help-steps { list-style: none; padding: 0; margin: 0 0 12px; }
.help-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.5;
}
.help-steps li:last-child { border-bottom: 0; }
.help-steps .ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(31, 139, 255, .1);
  font-size: 17px;
}
.help-steps b { color: var(--text); }
.help-steps .me { color: var(--me); font-weight: 700; }
.help-steps .op { color: var(--op); font-weight: 700; }
.help-steps .warn { color: var(--warn); font-weight: 700; }
.sci-title { margin: 6px 0 2px; font-size: 16px; color: var(--ok); }
.sci-steps .ico { background: rgba(0, 180, 255, .14); }
.device { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 6px; background: rgba(31, 139, 255, .1); color: var(--ok); font-weight: 700; margin-right: 4px; }

/* ---- 게임 화면 ---- */
#game {
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow: hidden;
}

#hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0));
}
.side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side.op { justify-content: flex-end; }
.pname { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.me .pname, .me .score { color: var(--me); }
.op .pname, .op .score { color: var(--op); }
.score { font-size: 32px; font-weight: 900; line-height: 1; }
.mid { text-align: center; min-width: 0; }
#timer { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text); }
#timer.urgent { color: var(--op); animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }
.wind { font-size: 11px; color: var(--muted); }
.sci { font-size: 11px; color: var(--ok); font-weight: 700; white-space: nowrap; }

#stage { flex: 1; min-height: 0; position: relative; }
#canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  display: block;
}

#cdbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 10px;
  background: linear-gradient(0deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, 0));
}
.cd { flex: 1; min-width: 0; }
.cd.op { flex: .6; opacity: .9; }
.cd-label { font-size: 12px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 10px; border-radius: 6px; background: #d6e8fa; overflow: hidden; border: 1px solid var(--line); }
.fill { height: 100%; width: 100%; background: var(--ready); transition: background .2s; }
.cd.op .fill { background: var(--op); }
.fill.cooling { background: var(--me); }
.fill.penalty { background: var(--warn); }

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(190, 220, 250, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto; /* 낮은 가로 화면에서 카드가 넘치면 밀어서 볼 수 있게 */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
}
.overlay.fixed { position: fixed; }
.result-score { font-size: 48px; font-weight: 900; margin: 4px 0; }
.result-score #rMe { color: var(--me); }
.result-score #rOp { color: var(--op); }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(80px, calc(env(safe-area-inset-bottom) + 70px));
  transform: translateX(-50%);
  background: var(--card-solid);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  z-index: 100;
  max-width: calc(100% - 32px);
  text-align: center;
  box-shadow: 0 10px 30px rgba(31, 110, 200, .2);
}
.toast.warn { background: #fff7e6; border-color: var(--warn); color: #8a5300; }

/* 가로로 짧은 화면(가로 모드 휴대폰) */
@media (max-height: 480px) {
  #hud { padding: 4px 12px; }
  .score { font-size: 24px; }
  #timer { font-size: 20px; }
  .sci { display: none; }
  #cdbar { padding: 4px 12px 6px; }
  /* 가로 휴대폰: 경기 결과 카드가 화면 안에 다 들어오게 (로비로 버튼이 아래로 잘리던 것) */
  #result .card { padding: 12px 18px; }
  #result h2 { margin: 0; }
  .result-score { font-size: 34px; margin: 0; }
  #result .sub, #result .gold-line { margin: 4px 0; }
}
@media (max-width: 420px) {
  .sci { font-size: 10px; white-space: normal; }
}
.help-q { color: var(--ok); font-weight: 900; font-size: 17px; }

/* ---- 대기실 팀 명단 ---- */
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; text-align: left; }
.team { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--field-bg); }
.team h4 { margin: 0 0 6px; font-size: 13px; }
.team.mine h4 { color: var(--me); }
.team.other h4 { color: var(--op); }
.team ul { list-style: none; margin: 0; padding: 0; }
.team li { font-size: 14px; font-weight: 700; padding: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team li.empty { color: #9fb6d0; font-weight: 500; }
.pname small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side.op .pname { text-align: right; }

/* 계정 칩 (아이디 · 골드 · 상점) */
.acct-slot { display: flex; justify-content: flex-end; margin: -6px -4px 10px; min-height: 40px; }
.acct-slot:empty { display: none; }
.kit-root h2 { font-size: 22px; }
.gold-line { margin: 4px 0 10px; font-weight: 800; color: #b87400; min-height: 1em; }
.gold-line:empty { display: none; }
.small-note { font-size: 13px; margin-top: 10px; text-align: center; }

/* 버튼 크기 설정 (프로필 → 버튼 크기): --kit-btn-scale 0.8 / 1 / 1.25 / 1.5 */
#cdbar .icon-btn.small { width: calc(36px * var(--kit-btn-scale, 1)); height: calc(36px * var(--kit-btn-scale, 1)); font-size: calc(14px * var(--kit-btn-scale, 1)); border-radius: calc(12px * var(--kit-btn-scale, 1)); }
#cdbar .help-q { font-size: calc(17px * var(--kit-btn-scale, 1)); }
#cdbar .snd { font-size: calc(17px * var(--kit-btn-scale, 1)); }
#cdbar .snd.off { opacity: .55; }
@media (pointer: coarse) { #cdbar .icon-btn.small { min-width: 44px; min-height: 44px; } }
#cdbar .cd-label { font-size: max(12px, calc(12px * var(--kit-btn-scale, 1))); }
#cdbar .bar { height: calc(10px * var(--kit-btn-scale, 1)); }

/* ---- 선수 카드 (2026-10-28) ---- */
.sq-chips { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.sq-chip { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 11px; line-height: 1; border: 2px solid #a9b4c2; background: #fff; }
.sq-chip.g1 { border-color: #4aa3ff; background: #eaf4ff; }
.sq-chip.g2 { border-color: #a66bff; background: #f3ecff; }
.sq-chip.g3 { border-color: #ffc531; background: #fff7dc; }
.assist-line { margin: 0 0 8px; font-weight: 700; color: #6b35c9; }
.assist-line:empty { display: none; }
#waitCards { margin: 4px 0 8px; }

/* 로비: 선수 뽑기 · 도감 */
.card-row { display: flex; gap: 8px; margin: -4px 0 14px; }
.card-btn { flex: 1; min-height: 44px; border-radius: 14px; border: 2px solid #c9b8ff; background: linear-gradient(180deg, #fbf8ff, #efe8ff); color: #5b2fc0; font-weight: 800; font-size: 15px; padding: 8px 10px; }
.card-btn.draw.ready { border-color: #ffc531; background: linear-gradient(180deg, #fffaf0, #ffefc2); color: #9a5b00; box-shadow: 0 0 0 3px rgba(255, 197, 49, .25); }
.card-btn #tkCount { font-size: 13px; opacity: .85; margin-left: 2px; }
.card-btn:active { transform: scale(.98); }

/* 카드 그림 */
.cart { display: block; width: 100%; height: auto; }
.cg, .bk { text-align: center; }
.cg-title { font-size: 22px; margin: 0 0 6px; }
.cg-tk { margin: 0 0 10px; font-weight: 700; color: #4d5c78; }
.cg-tk b { color: #9a5b00; font-size: 18px; }
.cg-tk span { font-weight: 500; font-size: 13px; }
.cg-stage { display: grid; place-items: center; min-height: 230px; margin: 0 auto 12px; perspective: 900px; }
.cg-stage > .cart { width: 150px; }
.cg-stage.one .flip { width: 170px; }
.cg-stage.many { grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 520px; }
.cg-stage.shake > .cart { animation: cgShake .35s ease-in-out infinite; }
@keyframes cgShake { 25% { transform: rotate(-4deg) scale(1.03); } 75% { transform: rotate(4deg) scale(1.03); } }
.flip { position: relative; width: 100%; cursor: pointer; }
.flip-in { position: relative; transition: transform .55s cubic-bezier(.3, 1.4, .5, 1); transform-style: preserve-3d; }
.flip .face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .face.front { position: absolute; inset: 0; transform: rotateY(180deg); }
.flip.on .flip-in { transform: rotateY(180deg); }
.flip.shine .front { filter: drop-shadow(0 0 10px rgba(166, 107, 255, .8)); }
.flip.g3.shine .front { filter: drop-shadow(0 0 14px rgba(255, 197, 49, .95)); animation: glow 1.2s ease-in-out infinite alternate; }
@keyframes glow { to { filter: drop-shadow(0 0 22px rgba(255, 197, 49, 1)); } }
.flip .tag { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.flip .tag.new { background: #ff4f8b; color: #fff; }
.flip .tag.dup { background: #fff3c4; color: #8a5a00; border: 1px solid #f0c040; }
.cg-stage.many .tag { font-size: 9px; padding: 1px 5px; }
.cg-btns { display: flex; gap: 8px; justify-content: center; margin: 14px 0 8px; flex-wrap: wrap; }
.cg-btns .kit-btn { flex: 1; min-width: 120px; }
.cg-btns small { opacity: .8; font-size: 12px; }
.cg-pity { font-size: 13px; color: #6b35c9; margin: 4px 0; }
.cg-more { text-align: left; font-size: 13px; margin: 8px 0; }
.cg-more summary { cursor: pointer; font-weight: 800; text-align: center; }
.cg-odds { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
.cg-odds th, .cg-odds td { padding: 5px 4px; border-bottom: 1px solid #e4e9f2; text-align: left; vertical-align: top; }
.cg-odds td:first-child { white-space: nowrap; font-weight: 700; }
.cg-fine { font-size: 12px; color: #6d7a92; margin: 6px 0; line-height: 1.5; }
/* 도감 */
.bk-hint { font-size: 12.5px; color: #6d7a92; margin: 0 0 8px; }
.bk-squad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.bk-slot { border: 2px solid transparent; border-radius: 12px; background: #f3f6fb; padding: 4px; font-size: 11px; font-weight: 800; color: #4d5c78; }
.bk-slot.on { border-color: #1f8bff; }
.bk-slot span { display: block; margin-top: 2px; }
.bk-detail { display: flex; gap: 12px; text-align: left; background: #f7f9fd; border-radius: 14px; padding: 10px; margin-bottom: 10px; align-items: flex-start; }
.bk-big { width: 130px; flex: none; }
.bk-info { flex: 1; min-width: 0; }
.bk-name { font-weight: 900; font-size: 16px; margin: 0 0 4px; }
.bk-name small { display: block; font-size: 12px; color: #6d7a92; font-weight: 700; }
.bk-desc, .bk-job { font-size: 13px; margin: 4px 0; }
.bk-job { color: #1f6fd1; font-weight: 700; }
.bk-on { color: #2a9d55; font-weight: 800; font-size: 13px; }
.bk-fine { font-size: 11.5px; color: #6d7a92; }
.bk-stats { margin: 6px 0 8px; }
.bk-stat { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 3px 0; }
.bk-stat span { width: 74px; flex: none; }
.bk-stat i { flex: 1; height: 8px; background: #e2e8f2; border-radius: 99px; overflow: hidden; }
.bk-stat b { display: block; height: 100%; background: linear-gradient(90deg, #4aa3ff, #a66bff); border-radius: 99px; }
.bk-filter { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-bottom: 8px; }
.chipb { border: 1.5px solid #d3dceb; background: #fff; border-radius: 99px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; }
.chipb.on { border-color: #1f8bff; color: #1f8bff; }
.bk-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bk-card { border: 2px solid transparent; border-radius: 12px; padding: 0; background: none; }
.bk-card.on { border-color: #1f8bff; }
@media (max-width: 420px) {
  .bk-grid { grid-template-columns: repeat(4, 1fr); }
  .bk-detail { flex-direction: column; align-items: center; text-align: center; }
  .bk-big { width: 120px; }
  .bk-info { width: 100%; }
  .bk-stat span { text-align: left; }
  .cg-stage.many { grid-template-columns: repeat(3, 1fr); max-width: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  .flip-in { transition: none; }
  .flip .face.front { transform: none; opacity: 0; transition: opacity .2s; }
  .flip .face.back { transition: opacity .2s; }
  .flip.on .flip-in { transform: none; }
  .flip.on .face.front { opacity: 1; }
  .flip.on .face.back { opacity: 0; }
  .cg-stage.shake > .cart, .flip.g3.shine .front { animation: none; }
}
.bk .bk-slot span { font-size: 12px; line-height: 1.2; }
@media (max-height: 520px) {
  .cg-stage { min-height: 130px; }
  .cg-stage > .cart { width: 88px; }
  .cg-stage.one .flip { width: 104px; }
  .cg-stage.many { max-width: 420px; }
  .cg-title { font-size: 18px; margin-bottom: 2px; }
  .cg-btns { margin: 8px 0 4px; }
  .bk-squad { grid-template-columns: repeat(4, 72px); justify-content: center; }
  .bk-big { width: 100px; }
  .bk-grid { grid-template-columns: repeat(8, 1fr); }
}
.cg-pity.legend { color: #a36a00; margin-top: 0; }
/* 경기장을 크게 (2026-10-28): 낮은 화면(가로 휴대폰)에서는 위·아래 막대를 얇게 */
@media (max-height: 500px) {
  #hud { padding: 2px 10px; gap: 6px; }
  .score { font-size: 24px; }
  #timer { font-size: 20px; }
  .pname { font-size: 13px; }
  .wind, .sci { font-size: 10px; }
  #cdbar { padding: 2px 10px 4px; gap: 8px; }
  .cd-label { font-size: 11px; margin-bottom: 2px; }
  .bar { height: 7px; }
}

/* ⚡ 빠른 대전 (2026-11-03) */
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; margin: 4px 0 12px; background: linear-gradient(135deg, #ffb03b, #ff6b8b); box-shadow: 0 8px 22px rgba(255, 107, 139, .3); }
.quick-btn small { font-size: 12.5px; font-weight: 700; opacity: .95; }
#waiting.quick .qm-hide, #waiting.quick #startNow { display: none !important; }
/* 낮은 가로 휴대폰: 키트 채팅 창이 낮아서 빠른 말 줄이 잘리지 않게 안내 줄은 빼고 글 목록을 줄임 */
@media (max-height: 500px) { .qm-panel .qm-safe { display: none; } .qm-panel .qm-list { min-height: 44px; } }

/* ---------- 🎬 첫 화면 배경 (kit/title.css 위에 빨대 축구 잔디·경기장 줄·떠다니는 공과 빨대, 2026-11-10) ---------- */
#title { --lt-a: #22b35a; --lt-b: #1f8bff; --lt-ink: #123a26; --lt-muted: #4f6e5c; --lt-brand: #1f9a52; --lt-sh: #177a8a; --lt-glow: rgba(31, 139, 255, .35); --lt-bgc: #56c97e;
  --lt-fade: radial-gradient(ellipse at 50% 46%, rgba(255, 255, 255, .96) 0, rgba(255, 255, 255, .78) 34%, rgba(255, 255, 255, 0) 70%);
  background-image: repeating-linear-gradient(180deg, #5fd08a 0 60px, #52c47c 60px 120px); }
#title .lt-o { filter: drop-shadow(0 6px 10px rgba(10, 60, 30, .3)); }
#title .ss-pitch { position: absolute; inset: 18px; border: 4px solid rgba(255, 255, 255, .75); border-radius: 6px; }
#title .ss-pitch::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; background: linear-gradient(90deg, rgba(255, 255, 255, .75) 0 8%, transparent 14% 86%, rgba(255, 255, 255, .75) 92%); }
#title .ss-pitch::after { content: ""; position: absolute; left: 50%; top: 50%; width: 200px; height: 200px; margin: -100px 0 0 -100px; border: 4px solid rgba(255, 255, 255, .75); border-radius: 50%; }
#title .ss-goal { position: absolute; left: 50%; width: 160px; height: 44px; margin-left: -80px; border: 4px solid rgba(255, 255, 255, .75); }
#title .ss-goal.t { top: 18px; border-top: 0; }
#title .ss-goal.b { bottom: 18px; border-bottom: 0; }
#title .ss-e { font-size: 44px; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
/* 첫 화면 동안 계정 칩 칸(.acct-slot 은 flex)을 보통 칸으로 → 좁은 휴대폰에서도 아이디·골드가 안 잘림 */
#title .lt-acc #accountSlot { display: block; margin: 0; min-height: 0; }
#title .o1 { top: 10%; left: 9%; font-size: 46px; }
#title .o2 { top: 16%; right: 4%; --r: 30deg; }
#title .o3 { top: 30%; left: 6%; font-size: 38px; }
#title .o4 { top: 31%; right: 10%; --r: 20deg; font-size: 38px; }
#title .o5 { bottom: 17%; left: 3%; --r: -25deg; }
#title .o6 { bottom: 17%; right: 8%; --r: 180deg; font-size: 36px; }
#title .o7 { bottom: 9%; right: 14%; font-size: 50px; }
#title .o8 { top: 5%; left: 30%; font-size: 40px; }
@media (min-width: 600px) { #title .o8 { left: 42%; } }
#title .o9 { bottom: 9%; left: 12%; --r: -8deg; font-size: 40px; }
@media (orientation: landscape) and (max-height: 500px) {
  #title .ss-pitch { inset: 10px; }
  #title .ss-pitch::after { width: 150px; height: 150px; margin: -75px 0 0 -75px; }
  #title .ss-goal { width: 120px; height: 30px; margin-left: -60px; }
  #title .ss-goal.t { top: 10px; } #title .ss-goal.b { bottom: 10px; }
  #title .ss-e { font-size: 30px; }
  #title .ss-straw svg { width: 70px; height: 16px; }
  #title .o7 { font-size: 36px; }
  #title .o8 { top: 6%; left: 24%; font-size: 30px; }
  #title .o2 { top: 20%; right: 18%; }
}
/* 낮은 세로 휴대폰(360×640 등): 아래 그림이 작은 단추 줄 뒤에 숨지 않게 더 아래로 */
@media (orientation: portrait) and (max-height: 700px) {
  #title .o5 { bottom: 9%; left: 2%; }
  #title .o6 { display: none; }
  #title .o7 { bottom: 4%; right: 8%; font-size: 40px; }
  #title .o9 { bottom: 3%; left: 22%; font-size: 34px; }
}
