:root {
  --bg: #11131a;
  --panel: #1b1f2a;
  --text: #e8eaf0;
  --muted: #8b92a5;
  --accent: #06c755;
  --win: #3ddc84;
  --lose: #ff6b6b;
  --draw: #8b92a5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  -webkit-text-size-adjust: 100%;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
}

/* ヘッダ */
.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback { font-size: 22px; }

.user-name { font-size: 16px; font-weight: 600; }

/* ステータス行 */
.status {
  margin: 0;
  padding: 10px 12px;
  background: var(--panel);
  border-left: 3px solid var(--muted);
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* 対戦表示 */
.board {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--panel);
  border-radius: 12px;
  padding: 20px 12px;
}

.side { text-align: center; }

.side-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.hand { font-size: 56px; line-height: 1.1; }

.vs {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

/* 結果 */
.result {
  margin: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  min-height: 1.3em;
}

.result[data-outcome="1"] { color: var(--win); }
.result[data-outcome="2"] { color: var(--lose); }
.result[data-outcome="0"] { color: var(--draw); }

/* 手のボタン */
.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hand-button {
  font-size: 40px;
  padding: 16px 0;
  background: var(--panel);
  color: var(--text);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  min-height: 72px;
  -webkit-tap-highlight-color: transparent;
}

.hand-button:active { border-color: var(--accent); }

/* 戦績 */
.score {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* シェア */
.share-button {
  margin-top: auto;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.share-button:disabled { opacity: 0.4; cursor: default; }
