﻿/* 全体 */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
}

.app {
  width: 360px;
  max-width: 100%;
  border: 3px solid #184a6a;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* タイトル＋メニュー */
.app-header {
  background: #c8ffd0;
  padding: 12px 16px;
  border-bottom: 2px solid #184a6a;
}
.app-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.app-menu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.app-menu button {
  flex: 1 1 auto;
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid #187fa3;
  background: #ffffff;
  cursor: pointer;
}

/* デッキ情報行 */
.status-bar {
  background: #c9f5ff;
  padding: 8px 12px;
  border-bottom: 2px solid #184a6a;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.deck-name {
  font-weight: 600;
}
.stats {
  font-variant-numeric: tabular-nums;
}

/* ステージ */
.stage {
  position: relative;        /* ← 絶対配置の基準 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}


/* カード */
.card {
  width: 100%;
  max-width: 280px;
  min-height: 260px;
  border-radius: 8px;
  border: 2px solid #184a6a;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background: #fff;

  /* ★ 追加：縦方向センタリング */
  display: flex;
  flex-direction: column;
  align-items: center;        /* 横中央 */
  justify-content: center;    /* 縦中央 */
  text-align: center;
}


.card-tags {
  font-size: 11px;
  color: #7a8694;
}
.tag {
  background: #eef3ff;
  padding: 2px 6px;
  border-radius: 999px;
}

.card-question {
  font-size: 24px;    /* ← 大型化！ */
  font-weight: 600;
  margin: 10px 0 12px;
}

.card-answer {
  font-size: 13px;
  margin-bottom: 12px;
  padding: 8px;
  border-radius: 4px;
  background: #f4fbff;
}

.card-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.card-controls button {
  font-size: 11px;
}

/* 4方向ボタン */
.arrow {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;       /* ← 中身の横中央 */
  justify-content: center;   /* ← 中身の縦中央 */

  width: 70px;               /* ← はみ出さない安全サイズ */
  height: 40px;
  border-radius: 20px;

  font-size: 13px;
  font-weight: bold;
  padding: 4px;

  user-select: none;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: transform 0.1s ease;
}

.arrow-emoji {
  font-size: 22px;           /* ← 絵文字はしっかり見える */
  line-height: 20px;
}

.arrow-label {
  font-size: 11px;           /* ← ラベルは控えめでOK */
  line-height: 14px;
}


.arrow:hover {
  transform: scale(1.03);
}

.arrow:active {
  transform: scale(0.97);
}

/* 個別色（既存のパステル色を活かす） */
.arrow-up {
  top: 0;
  left: 50%;
  transform: translate(-50%, -30%);  /* ← はみ出し防止のY下げ */
  background: #a4dbff;
}

.arrow-down {
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 30%);   /* ← はみ出し防止のY上げ */
  background: #ffd3ef;
}

.arrow-left {
  left: 0;
  top: 50%;
  transform: translate(-30%, -50%);  /* ← X方向控えめに */
  background: #fff6a6;
}

.arrow-right {
  right: 0;
  top: 50%;
  transform: translate(30%, -50%);  /* ← X方向控えめに */
  background: #cbffcd;
}


/* 絵文字を大きく */
.arrow-emoji {
  font-size: 26px;     /* ★ 絵文字をしっかり大きく */
  margin-bottom: 2px;
}

.arrow-label {
  font-size: 14px;     /* 小さめの説明文字 */
}

/* 上・下：中央寄せ */
.arrow-up,
.arrow-down {
  align-items: center;
  text-align: center;
}

/* 左：右寄せ */
.arrow-left {
  align-items: flex-end;
  text-align: right;
}

/* 右：左寄せ */
.arrow-right {
  align-items: flex-start;
  text-align: left;
}





.card-image {
  margin-top: 12px;
  min-height: 80px;
  border-radius: 6px;
  border: 1px dashed #c3ccd8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #7a8694;
}
.hint {
  font-size: 9px;
  color: #7a8694;
}
.card-answer {
  font-size: 13px;
  margin-top: 8px;
  padding: 6px;
  border-radius: 4px;
  background: #f4fbff;
  white-space: pre-line;  /* ← これ重要：\nを改行として表示 */
}
.copyright {
  text-align: center;
  font-size: 10px;
  color: #7a8694;
  padding: 10px 0;
  margin-top: 12px;
  border-top: 1px solid #dde3ea;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;

  /* ページ自体はスクロールしない */
  overflow: hidden;

  /* 端まで行っても「ビヨーン」させない（プルリロード対策） */
  overscroll-behavior-y: none;
}
