/* きりかえ(仮) 見た目。mockup.html の配色に合わせる。外部フォントは読まない。 */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #0f1720;
  color: #f2f5f7;
  font-family: system-ui, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  -webkit-text-size-adjust: 100%;
}
body { min-height: 100vh; overflow-x: hidden; }

#app {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
  padding-block-start: calc(20px + env(safe-area-inset-top));
}

.screen { display: flex; flex-direction: column; min-height: calc(100vh - 44px); }
.screen[hidden] { display: none; }

.ttl { font-size: 20px; font-weight: 800; text-align: center; line-height: 1.45; margin-top: 6px; overflow-wrap: anywhere; }
.sub { color: #9fb0be; font-size: 13px; text-align: center; line-height: 1.6; overflow-wrap: anywhere; }
.label { color: #9fb0be; font-size: 12px; margin: 16px 0 6px; }
.foot { text-align: center; color: #8ea0af; font-size: 11px; margin-top: 8px; line-height: 1.6; }

.chara {
  margin: 16px auto 6px;
  width: 160px; height: 160px; max-width: 60vw; max-height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #2c3e50, #16222d);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: none;
}
.chara.small { width: 108px; height: 108px; margin: 10px auto; }
.chara img { width: 92%; height: 92%; object-fit: contain; display: block; }

/* 呼吸: 4秒でふくらんでしぼむ */
@keyframes breathe {
  0%   { transform: scale(0.92); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(0.92); }
}
.chara.breathing { animation: breathe 4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .chara.breathing { animation-duration: 8s; }
}

/* 相棒のことばは、上の相棒(.chara)から出ている吹き出しに見せる(しっぽ付き)。2026-09-23 本人要望 */
.bubble {
  position: relative;
  background: #26384a; border-radius: 18px; padding: 12px 16px;
  font-size: 15px; text-align: center; color: #f2f5f7; margin: 14px auto 8px;
  max-width: 300px; line-height: 1.6; overflow-wrap: anywhere;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  animation: bubble-pop 0.35s ease-out both;
}
.bubble::before {
  content: ''; position: absolute; left: 50%; top: -9px;
  width: 0; height: 0; transform: translateX(-50%);
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-bottom: 10px solid #26384a;
}
.bubble:empty { display: none; }
.bubble.big { font-size: 18px; font-weight: 700; }
@keyframes bubble-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } }

.count { font-size: 58px; font-weight: 800; color: #ffd166; text-align: center; line-height: 1; margin: 10px 0 6px; }

.btns { margin-top: auto; display: flex; flex-direction: column; gap: 9px; padding-top: 14px; }
.btns.tight { margin-top: 0; padding-top: 0; }

.b {
  width: 100%; min-height: 52px; padding: 14px 12px; border: 0;
  border-radius: 14px; font-weight: 800; font-size: 15px; text-align: center;
  background: #1f2d3a; color: #f2f5f7; font-family: inherit;
  cursor: pointer; line-height: 1.45; overflow-wrap: anywhere;
}
.b.y { background: #ffd166; color: #1a1a1a; }
.b.g { background: #34c98f; color: #0d2a1e; }
.b[disabled] { opacity: .45; }
.b.small { min-height: 42px; padding: 10px 12px; font-size: 13px; font-weight: 700; color: #9fb0be; background: transparent; }

.tabs { display: flex; gap: 6px; margin-top: 12px; }
.tab {
  flex: 1; min-width: 0; text-align: center; font-size: 13px; padding: 10px 4px;
  border: 0; border-radius: 10px; background: #1f2d3a; color: #9fb0be;
  font-family: inherit; cursor: pointer;
}
.tab.on { background: #ffd166; color: #1a1a1a; font-weight: 800; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.cell {
  aspect-ratio: 1; min-width: 0; border: 0; padding: 0;
  border-radius: 12px; background: #1f2d3a;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer;
}
.cell img { width: 92%; height: 92%; object-fit: contain; display: block; }
.cell.sel { outline: 3px solid #ffd166; outline-offset: -3px; }

.input {
  width: 100%; background: #1f2d3a; border: 0; border-radius: 12px;
  padding: 14px 12px; font-size: 16px; color: #dbe4ec; margin-top: 10px;
  font-family: inherit;
}
.input::placeholder { color: #6d8091; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  border: 0; border-radius: 999px; background: #1f2d3a; color: #cfdae4;
  font-size: 12px; padding: 8px 12px; font-family: inherit; cursor: pointer;
  max-width: 100%; overflow-wrap: anywhere; text-align: left;
}

.card {
  background: #1f2d3a; border-radius: 12px; padding: 13px 12px;
  font-size: 15px; font-weight: 700; margin-bottom: 10px; overflow-wrap: anywhere;
}

.feet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.foot-cell {
  background: #1f2d3a; border-radius: 12px; padding: 12px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0;
}
.foot-cell .n { font-size: 22px; font-weight: 800; color: #ffd166; }
.foot-cell .t { font-size: 11px; color: #9fb0be; }

.mins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.min-b {
  border: 0; border-radius: 12px; background: #1f2d3a; color: #cfdae4;
  font-size: 14px; font-weight: 700; padding: 13px 4px; font-family: inherit;
  cursor: pointer; min-width: 0;
}
.min-b.on { background: #ffd166; color: #1a1a1a; }
