:root {
  --field-left: 0px;
  --field-top: 0px;
  --field-width: 100vw;
  --field-height: 100vh;
  --visible-top: 0px;
  --visible-height: 100vh;
}

html,
body {
  position: fixed;
  inset: 0;
  width: 100%;
  margin: 0;
  height: 100%;
  height: 100dvh;
  background: #fff4e2;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: #1c3348;
}

canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#hud {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 74px);
  left: calc(env(safe-area-inset-left, 0px) + 14px);
  width: calc(100% - 28px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  pointer-events: none;
}

#hud[hidden],
#banner[hidden],
#overlay-summary[hidden],
#end-card[hidden],
#revive-card[hidden],
#revive-error[hidden],
#action-btn[hidden],
#tutorial-btn[hidden],
#help[hidden],
#help-btn[hidden],
#settings[hidden],
#settings-btn[hidden],
#bonus-stat[hidden],
#dev-auth[hidden],
#dev-auth-note[hidden],
#dev-controls[hidden],
#dev-round-form[hidden],
#account-screen[hidden],
#profile-screen[hidden],
#board-screen[hidden],
#player-screen[hidden],
#podium-btn[hidden],
#portrait-btn[hidden],
#daily-btn[hidden],
#daily-screen[hidden],
#friends-btn[hidden],
#friends-screen[hidden],
#market-btn[hidden],
#market-screen[hidden],
#status-coin[hidden],
#tetris-chart[hidden] {
  display: none;
}

.stat {
  min-width: 78px;
  padding: 8px 12px 9px;
  background: rgba(255, 250, 243, 0.86);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(28, 70, 110, 0.14);
}

#bonus-stat strong {
  color: #b86a08;
}

.stat .label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
}

.stat strong {
  display: inline-block;
  margin-top: 1px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat strong.pop {
  animation: score-pop 0.22s ease;
}

.lives {
  margin-left: auto;
}

.pips {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2fbe5a;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.pip.lost {
  background: #d9dde3;
  box-shadow: inset 0 0 0 2px #c4cbd4;
}

#banner {
  position: fixed;
  top: calc(var(--visible-top) + var(--visible-height) * 0.36);
  left: calc(var(--field-left) + var(--field-width) / 2);
  z-index: 4;
  margin: 0;
  transform: translate(-50%, -50%);
  color: #fffaf3;
  font-size: clamp(42px, 8vw, 88px);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow:
    0 3px 0 rgba(28, 70, 110, 0.18),
    0 12px 28px rgba(28, 70, 110, 0.28);
  pointer-events: none;
}

#banner.countdown {
  top: calc(var(--visible-top) + var(--visible-height) * 0.42);
  font-size: clamp(108px, 24vw, 200px);
  text-shadow:
    0 4px 0 rgba(28, 70, 110, 0.16),
    0 16px 36px rgba(28, 70, 110, 0.28);
}

#banner.countdown.count-pop {
  animation: count-in 0.74s ease;
}

#overlay {
  position: fixed;
  top: var(--visible-top);
  left: var(--field-left);
  width: var(--field-width);
  height: var(--visible-height);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 24, 48, 0.12);
  box-sizing: border-box;
}

#overlay.menu {
  background: transparent;
}

#overlay.menu.help-open {
  align-items: flex-start;
  padding-top: 14%;
}

.menu-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

#overlay.menu #action-btn {
  min-width: 168px;
  padding: 18px 54px;
  font-size: 36px;
  letter-spacing: -0.03em;
  box-shadow: 0 14px 34px rgba(160, 60, 0, 0.28);
}

#birthday-note {
  max-width: 280px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 250, 243, 0.94);
  color: #1c3348;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  line-height: 1.35;
}

#birthday-note[hidden] {
  display: none;
}

#tutorial-btn {
  min-width: 168px;
  padding: 12px 28px;
  background: rgba(255, 250, 243, 0.94);
  color: #1c3348;
  font-size: 20px;
  box-shadow: 0 10px 24px rgba(28, 70, 110, 0.16);
}

#tutorial-btn:hover {
  background: #fffaf3;
  color: #1c3348;
}

#coach[hidden] {
  display: none;
}

#coach {
  position: fixed;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.coach-block,
#coach-pass,
#coach-card {
  position: fixed;
  pointer-events: auto;
}

.coach-block {
  background: rgba(8, 16, 28, 0.72);
  z-index: 7;
}

#coach-pass {
  z-index: 7;
  background: transparent;
}

#coach-ring {
  position: fixed;
  z-index: 7;
  pointer-events: none;
  border-radius: 18px;
  box-shadow: 0 0 0 3px rgba(255, 250, 243, 0.95);
}

#coach-card {
  z-index: 8;
  width: min(320px, calc(100vw - 28px));
  max-height: min(280px, 46dvh);
  overflow: auto;
  padding: 14px 16px;
  background: #fffaf3;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(20, 50, 80, 0.28);
}

#coach-text {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

body.bomb-end {
  background: #000;
}

#overlay.bomb-end {
  background: transparent;
}

#overlay[hidden] {
  display: none;
}

.card {
  width: min(460px, 100%);
  max-height: calc(100% - 16px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px 26px 24px;
  background: #fffaf3;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(20, 50, 80, 0.22);
  touch-action: pan-y;
}

.eyebrow {
  margin: 0 0 6px;
  color: #3d7ef0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 6vw, 46px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

#overlay-summary {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

#overlay-best {
  margin: 0 0 16px;
  color: #3d7ef0;
  font-size: 16px;
  font-weight: 800;
}

#overlay-best.is-new {
  color: #c45a00;
}

.end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#revive-timer {
  margin: 0 0 8px;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

#revive-summary,
#revive-note {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

#revive-note {
  color: #6c2cb0;
}

#revive-error {
  margin: 0 0 10px;
  color: #a32020;
  font-size: 14px;
  font-weight: 700;
}

#revive-skip-btn,
#menu-btn {
  background: transparent;
  color: #1c3348;
  box-shadow: inset 0 0 0 2px #1c3348;
}

#revive-skip-btn:hover,
#menu-btn:hover {
  background: rgba(28, 51, 72, 0.08);
  color: #1c3348;
}

#help-btn,
#settings-btn {
  position: fixed;
  z-index: 5;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.95);
  color: #1c3348;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(28, 70, 110, 0.2);
}

#help-btn {
  right: calc(env(safe-area-inset-right, 0px) + 12px);
}

#settings-btn {
  left: calc(env(safe-area-inset-left, 0px) + 12px);
  display: grid;
  place-items: center;
}

#settings {
  position: fixed;
  z-index: 6;
  left: calc(env(safe-area-inset-left, 0px) + 12px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
  width: min(340px, calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: calc(100dvh - 160px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  overscroll-behavior: contain;
}

.settings-card h2 {
  margin-bottom: 12px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  font-weight: 800;
}

.settings-card button {
  min-width: 92px;
  padding: 8px 14px;
  font-size: 16px;
}

.settings-card button.is-off {
  background: transparent;
  color: #1c3348;
  box-shadow: inset 0 0 0 2px #1c3348;
}

.settings-card button.is-off:hover {
  background: rgba(28, 51, 72, 0.08);
  color: #1c3348;
}

#difficulty-note,
#tetris-note {
  margin: 0 0 14px;
  color: #3e5870;
  font-size: 14px;
  line-height: 1.35;
}

#tetris-chart {
  position: fixed;
  z-index: 2;
  left: calc(env(safe-area-inset-left, 0px) + 8px);
  top: 168px;
  width: 148px;
  max-height: calc(100dvh - 250px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.tetris-heading {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1c3348;
  opacity: 0.7;
}

.tetris-next {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 2px;
  padding: 4px 8px;
  background: rgba(255, 250, 243, 0.92);
  border-radius: 10px;
  color: #1c3348;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(28, 70, 110, 0.14);
}

.tetris-row {
  display: block;
  padding: 6px;
  background: rgba(255, 250, 243, 0.9);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(28, 70, 110, 0.14);
}

.tetris-row.is-next {
  box-shadow: 0 0 0 2px #1c3348, 0 6px 16px rgba(28, 70, 110, 0.14);
}

.tetris-icon,
.tetris-mark {
  box-sizing: border-box;
  border-radius: 50%;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.tetris-icon {
  width: 14px;
  height: 14px;
}

.tetris-track {
  position: relative;
  display: block;
  height: 16px;
  border-radius: 999px;
  background: rgba(28, 51, 72, 0.1);
}

.tetris-pipe {
  position: absolute;
  top: 0;
  height: 100%;
  opacity: 0.55;
}

.tetris-mark {
  position: absolute;
  z-index: 1;
  top: 2px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  box-shadow: 0 0 0 2px #fffaf3, inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.tetris-icon.is-bomb,
.tetris-mark.is-bomb {
  background: #1c3348;
  box-shadow: 0 0 0 2px #fffaf3, inset 0 0 0 3px #f27a32;
}

.tetris-icon.is-bomb {
  box-shadow: inset 0 0 0 3px #f27a32;
}

.tetris-icon.is-chest,
.tetris-mark.is-chest {
  border-radius: 3px;
  background: #c4894a;
}

.tetris-icon.is-aura,
.tetris-mark.is-aura {
  box-shadow: 0 0 0 2px #f0c43a, inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.tetris-next .tetris-time {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1c3348;
}

.high-score-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
}

#high-scores {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  color: #3e5870;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#high-scores .is-current {
  color: #1c3348;
  font-weight: 800;
}

#dev-enable-btn {
  width: 100%;
  margin-top: 8px;
}

#dev-enable-btn:disabled {
  background: #1c3348;
  cursor: default;
}

#dev-auth {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}

#dev-question {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

#dev-answer,
#dev-round-input {
  box-sizing: border-box;
  width: 100%;
  border: 2px solid #1c3348;
  border-radius: 12px;
  padding: 8px 12px;
  background: #fffaf3;
  color: #1c3348;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}

#dev-auth-note {
  margin: 0;
  color: #a32020;
  font-size: 14px;
  font-weight: 700;
}

#dev-controls {
  position: fixed;
  z-index: 8;
  right: calc(env(safe-area-inset-right, 0px) + 14px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(168px, 46vw);
}

#dev-controls button {
  padding: 10px 12px;
  font-size: 15px;
}

#dev-round-form {
  display: flex;
  gap: 6px;
}

#dev-round-input {
  width: 72px;
  padding: 8px;
}

#help-btn:hover,
#help-btn[aria-expanded='true'],
#settings-btn:hover,
#settings-btn[aria-expanded='true'] {
  background: #fffaf3;
  color: #1c3348;
}

#help {
  position: fixed;
  z-index: 5;
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
  width: min(340px, calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: calc(100dvh - 160px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  overscroll-behavior: contain;
}

#gate {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #5eb6f5;
  box-sizing: border-box;
}

#gate[hidden] {
  display: none;
}

#gate .card {
  text-align: center;
}

#gate p {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.help-card {
  padding: 18px 18px 16px;
  background: #fffaf3;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(20, 50, 80, 0.22);
}

.help-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.help-card ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

.help-card li {
  margin: 0 0 8px;
  line-height: 1.35;
}

.help-card p {
  margin: 0;
  color: #3e5870;
  font-size: 14px;
  line-height: 1.35;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: #f27a32;
  color: #fffaf3;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #e06820;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

button:focus-visible {
  outline: 3px solid #1c3348;
  outline-offset: 3px;
}

@keyframes score-pop {
  from {
    transform: scale(1.2);
  }
  to {
    transform: scale(1);
  }
}

@keyframes count-in {
  0% {
    transform: translate(-50%, -50%) scale(0.45);
    opacity: 0;
  }
  28% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .lives {
    margin-left: 0;
  }

  .stat strong {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat strong.pop,
  #banner.countdown.count-pop {
    animation: none;
  }
}

#server-note {
  position: fixed;
  z-index: 7;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 50%;
  width: min(460px, calc(100% - 560px));
  margin: 0;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(28, 51, 72, 0.92);
  color: #fffaf3;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
}

#server-note[hidden] {
  display: none;
}

.server-copy {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #1c3348;
  color: #fffaf3;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

#podium-btn,
#portrait-btn,
#daily-btn,
#friends-btn,
#market-btn,
#status-coin {
  width: 58px;
  height: 58px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 250, 243, 0.94);
  box-shadow: 0 8px 22px rgba(28, 70, 110, 0.2);
  box-sizing: border-box;
}

#podium-btn,
#friends-btn {
  position: fixed;
  z-index: 6;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
}

#podium-btn {
  left: calc(env(safe-area-inset-left, 0px) + 12px);
}

#friends-btn {
  left: calc(env(safe-area-inset-left, 0px) + 82px);
}

#corner-right {
  position: fixed;
  z-index: 6;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  right: calc(env(safe-area-inset-right, 0px) + 10px);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: calc(100vw - 168px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
}

#corner-right > button,
#status-coin {
  flex: 1 1 58px;
  width: auto;
  min-width: 40px;
  max-width: 58px;
}

#corner-right > #portrait-btn {
  flex: 1 1 64px;
  height: 64px;
  max-width: 64px;
  padding: 3px;
}

#status-coin {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 5px 2px 4px;
  pointer-events: none;
}

#status-coin svg {
  display: block;
  width: 28px;
  height: 28px;
}

#status-count {
  color: #1c3348;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

#portrait-btn svg,
#podium-btn svg,
#daily-btn svg,
#friends-btn svg,
#market-btn svg,
.profile-portrait svg,
.frame-card svg,
.board-row svg {
  display: block;
  width: 100%;
  height: 100%;
}

.gem-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #6c2cb0;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}


#account-screen,
#profile-screen,
#board-screen,
#player-screen,
#daily-screen,
#friends-screen,
#market-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 16px calc(env(safe-area-inset-bottom, 0px) + 18px);
  background: #e7f5ff;
  box-sizing: border-box;
}

.account-card {
  width: min(420px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-card h1,
.account-card h2 {
  margin: 0;
}

.account-card h2 {
  margin-top: 8px;
  font-size: 18px;
}

.account-form,
.account-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.password-row {
  position: relative;
}

.password-row input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: #1d4eae;
}

.password-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
}

.password-toggle:hover {
  background: transparent;
  color: #163a86;
}

.birthday-row {
  display: flex;
  gap: 8px;
}

.birthday-hint {
  margin: 0;
  color: #1d4eae;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.account-form input,
.account-form select,
.account-card input[type="text"],
.account-card input[type="email"],
.account-card input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  border: 2px solid #1c3348;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffaf3;
  color: #1c3348;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}

.account-guest,
.account-text,
.sheet-close,
.frame-card,
.board-tabs button,
.board-row {
  font: inherit;
}

.agreement {
  margin: 4px 0 0;
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: #fffaf3;
  box-shadow: inset 0 0 0 2px #1c3348;
}

.agreement h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.agreement ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

.agreement li {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.agreement-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
}

.agreement-check input {
  width: 22px;
  height: 22px;
  margin: 0;
}

.account-note {
  margin: 0;
  color: #a32020;
  font-size: 14px;
  font-weight: 700;
}

.account-note a {
  color: #1d4eae;
}

.challenge-done {
  color: #1f6b45;
}

.daily-clock {
  margin: 0;
  color: #1d4eae;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
}

.daily-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.daily-card {
  margin: 0;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: #fffaf3;
  box-shadow: inset 0 0 0 2px #d7e4ef;
}

.daily-card h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.3;
}

.daily-card p {
  margin: 0;
  font-weight: 700;
}

.daily-card.is-done {
  color: #1f6b45;
  box-shadow: inset 0 0 0 2px #1f6b45;
}

.account-hint,
.stat-line,
.gem-count {
  margin: 0;
  font-weight: 700;
}

.gem-count {
  color: #6c2cb0;
}

.account-text {
  background: transparent;
  color: #1d4eae;
  padding: 6px 0;
}

.profile-portrait {
  width: 108px;
  height: 108px;
}

.ball-colors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ball-colors > span {
  flex: 1 0 100%;
  font-weight: 800;
}

.ball-colors button,
.ball-colors input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 3px solid #fffaf3;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #1c3348;
}

.ball-colors button:hover {
  filter: brightness(1.05);
}

.ball-colors button.is-on,
.ball-colors input[type="color"].is-on {
  box-shadow: inset 0 0 0 2px #1c3348, 0 0 0 3px #1d4eae;
}

.ball-colors input[type="color"] {
  background: transparent;
}

.ball-colors .account-note {
  flex: 1 0 100%;
}

.visible-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.frame-shop,
.board-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.frame-card,
.board-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  background: #fffaf3;
  color: #1c3348;
}

.frame-card span,
.board-row span {
  font-size: 13px;
  font-weight: 700;
}

.market-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  text-align: left;
  background: #fffaf3;
  color: #1c3348;
  box-shadow: inset 0 0 0 2px #d7e4ef;
}

.market-card:hover,
.market-card:disabled {
  background: #fffaf3;
  color: #1c3348;
}

.market-look {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.market-look svg {
  display: block;
  width: 52px;
  height: 52px;
}

.market-words {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.market-words strong {
  font-size: 16px;
}

.market-words small {
  font-size: 13px;
  font-weight: 700;
  color: #3e5870;
}

.market-price {
  font-size: 14px;
  font-weight: 800;
  color: #6c2cb0;
  text-align: right;
  white-space: nowrap;
}

.market-card.is-short .market-look {
  filter: grayscale(1);
  opacity: 0.55;
}

.market-price.is-short {
  color: #a32020;
  font-weight: 800;
}

.board-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.board-who strong {
  font-size: 16px;
}

.real-rank {
  color: #1d4eae;
  font-size: 12px;
  font-weight: 800;
}

.board-row.is-you {
  box-shadow: inset 0 0 0 2px #1d4eae;
}

.board-row.is-rank-1,
.board-row.is-rank-1:hover {
  background: #f0c43a;
}

.board-row.is-rank-2,
.board-row.is-rank-2:hover {
  background: #c5ccd6;
}

.board-row.is-rank-3,
.board-row.is-rank-3:hover {
  background: #cd7f32;
}

.board-row > button,
.friend-actions button {
  padding: 8px 12px;
  font-size: 14px;
}

.friend-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-chip {
  color: #1d4eae;
  font-size: 12px;
  font-weight: 800;
}

.board-section {
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
}

.board-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior: contain;
}

.board-tabs button {
  flex: 0 0 auto;
  background: #fffaf3;
  color: #1c3348;
  padding: 8px 12px;
  font-size: 14px;
}

.board-tabs button.is-on {
  background: #1c3348;
  color: #fffaf3;
}

.wear-tabs {
  display: flex;
  gap: 6px;
}

.wear-tabs button {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 6px;
  background: #fffaf3;
  color: #1c3348;
  font-size: 14px;
  box-shadow: inset 0 0 0 2px #d7e4ef;
}

.wear-tabs button.is-on,
.wear-tabs button.is-on:hover {
  background: #1c3348;
  color: #fffaf3;
  box-shadow: none;
}

.equip-ask {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  color: #1c3348;
}

.equip-ask span {
  flex: 1 0 100%;
  text-align: center;
}

.equip-ask button {
  padding: 8px 16px;
  font-size: 16px;
}

.market-card.is-quiet {
  cursor: default;
}
