@charset "UTF-8";
/* =========================================
   共通スタイル (どちらのページでも適用)
   ========================================= */
body {
  font-family: "Noto Serif JP", serif;
  max-width: 800px;
  margin: 0 auto;
  color: #1e293b;
  background: #f5f5f4;
}
h1 {
  color: #1e293b;
  border-bottom: 2px solid #c4a747;
  padding: .6em 0;
  margin-bottom: .6em;
  font-size: min(5vw, 1.8em);
  text-align: center;
}
/* インデント調整用 */
p.indent {
  padding: 0 0 0 1em;
  text-indent: -1em;
  font-size: 90%;
  margin: .3em 0;
}
/* =========================================
   #page_index (index.php: 問題作成画面)
   ========================================= */
#page_index {
  padding: 0 1em 1em;
}
/* 作成者名入力エリア */
#page_index .creator-box {
  background: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #c4a747;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* お酒入力行のカード */
#page_index .row {
  background: #fff;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}
/* A, B, C のラベル */
#page_index .bottle-label {
  background: orange;
  color: #000;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.2em;
  flex-shrink: 0;
}
#page_index .input-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* 入力フォーム共通 */
#page_index input[type="text"], #page_index select {
  padding: 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}
/* 正解選択エリア（グレーの背景部分） */
#page_index .answer-area {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f5f9;
  padding: 8px;
  border-radius: 4px;
}
#page_index .answer-label {
  font-size: 0.85em;
  color: #64748b;
  white-space: nowrap;
}
/* 「お酒を追加する」ボタン */
#page_index button.add-btn {
  background: #fff;
  border: 2px dashed orange;
  color: #64748b;
  width: 100%;
  padding: 10px;
  cursor: pointer;
  font-size: 100%;
  font-weight: bold;
  border-radius: 5px;
}
/* 「お酒を減らす」ボタン */
#page_index button.remove-btn {
  background: #fff;
  border: 2px dashed #fca5a5;
  color: #64748b;
  width: 100%;
  padding: 10px;
  cursor: pointer;
  font-size: 100%;
  font-weight: bold;
  border-radius: 5px;
}
/* 「登録完了」ボタン */
#page_index button.submit-btn {
  background: #1e293b;
  color: #c4a747;
  width: 100%;
  padding: 15px;
  font-size: 1.2em;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 1.5em;
  font-weight: bold;
}
#page_index button.submit-btn:hover {
  background: #334155;
}
/* 戻るボタン */
#page_index .btn_back {
  text-align: right;
  margin: 3em 0 0;
}
#page_index .btn_back a {
  width: 300px;
  display: inline-block;
  padding: 1em 0;
  color: #000;
  font-size: 112.5%;
}
/* QRコード */
#page_index #qrcode img {
  margin: 0 auto;
}
/* =========================================
   #page_play (play.php: 回答・結果画面)
   ========================================= */
#page_play {
  padding: 0 0 2em;
}
/* =========================================
   入力フォームレイアウト調整 (4:6分割 & 2行メモ)
   ========================================= */
#page_play .bottle-card {
  background: #fff;
  padding: .5em;
  margin-bottom: .5em;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* 1行に並べるためのFlexコンテナ */
#page_play .input-line {
  display: flex;
  align-items: center; /* ★高さの中心揃え */
  gap: 10px;
  font-weight: bold;
}
/* 左側：順位エリア (4割) */
#page_play .rank-part {
  flex: 4; /* 比率 4 */
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 左寄せ（または center で中央寄せ） */
  gap: 5px;
  white-space: nowrap; /* 折り返し防止 */
}
/* 右側：メモエリア (6割) */
#page_play .memo-part {
  flex: 6; /* 比率 6 */
}
/* 記号 (A, イ 等) */
#page_play .symbol {
  font-size: 1.5em;
  color: #c4a747;
  width: 25px;
  text-align: center;
  flex-shrink: 0;
}
/* 順位入力欄 */
#page_play input[type="number"] {
  width: 100%; /* 親要素に合わせて伸縮 */
  max-width: 50px; /* 広がりすぎ防止 */
  text-align: center;
  font-size: 1.2em;
  padding:4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
/* メモ入力欄 (textarea) */
#page_play .memo-box {
  width: 100%;
  box-sizing: border-box; /* 枠線を含めたサイズ計算 */
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #f8fafc;
  color: #475569;
  font-size: 16px;
  line-height: 1.3;
  resize: none; /* ユーザーによるサイズ変更を禁止(崩れ防止) */
  vertical-align: middle;
}
#page_play .memo-box::placeholder {
  color: #cbd5e1;
}
/* 結果画面のメモ表示微調整 */
#page_play .result-memo {
  margin-top: 5px;
  padding: 5px 10px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  font-size: 0.85em;
  color: #475569;
}
/* -----------------------------
   セクション・ボタン類
   ----------------------------- */
#page_play .section {
  margin-bottom: 30px;
}
#page_play .section h2 {
  font-size: 1.2em;
  color: #64748b;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 5px;
  margin-bottom: 10px;
}
/* 主催者名の表示 */
#page_play .creator-disp {
  text-align: center;
  background: #fff;
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9em;
  margin: -10px auto 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #e2e8f0;
}
/* 汎用ボタン（採点する / リトライなど） */
#page_play .btn {
  background: #1e293b;
  color: #c4a747;
  width: 100%;
  padding: 15px;
  font-size: 1.2em;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  font-weight: bold;
  display: block;
  text-decoration: none;
  box-sizing: border-box;
  text-align: center;
}
#page_play .btn:hover {
  background: #334155;
}
/* -----------------------------
   結果発表画面
   ----------------------------- */
#page_play .result-box {
  background: #fff;
  padding: 2em 1em;
  border-radius: 10px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  text-align: center;
}
#page_play .score-label {
  color: #64748b;
  font-weight: bold;
  margin: 0;
}
#page_play .score-big {
  font-size: 4em;
  margin: 0 0 10px;
  color: #1e293b;
  line-height: 1;
  padding: .3em 0;
}
#page_play .score-detail {
  text-align: left;
}
/* 結果画面でのメモ表示 */
#page_play .result-memo {
  margin-top: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  font-size: 0.85em;
  color: #475569;
  text-align: left;
  border: 1px dashed #cbd5e1;
}
/* 称号バッジ */
#page_play .rank-badge {
  border: 3px solid;
  padding: 15px;
  border-radius: 8px;
  display: inline-block;
  min-width: 200px;
  margin-top: 10px;
  background: #fff;
}
#page_play .rank-desc {
  font-size: 0.9em;
  font-weight: bold;
  opacity: 0.8;
}
#page_play .rank-title {
  font-size: 1.8em;
  font-weight: 900;
  margin-top: 5px;
}
#page_play .inputWrap {
  margin: 1em;
}
/* リトライボタン（白ベース） */
#page_play .btn-retry {
  background: #fff;
  color: #64748b;
  border: 2px solid #cbd5e1;
}
/* -----------------------------
   楽天商品リスト用スタイル
   ----------------------------- */
.btn-toggle {
  cursor: pointer;
  font-weight: bold;
  color: #475569;
  margin-bottom: 10px;
  outline: none;
  font-size: 1.1em;
  text-align: center;
  list-style: none;
}
.btn-toggle::-webkit-details-marker {
  display: none;
}
.btn-toggle::after {
  content: " ▼";
  font-size: 0.8em;
}
details[open] .btn-toggle::after {
  content: " ▲";
}
.rakuten-box {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.answer-row {
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 15px;
  margin-bottom: 15px;
}
.answer-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.ans-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: bold;
}
.ans-bottle {
  background: #1e293b;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
}
.ans-arrow {
  color: #94a3b8;
  font-size: 0.8em;
}
.ans-glass {
  background: #d97706;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
}
.ans-name {
  font-size: 1.1em;
  margin-left: 5px;
}
/* 楽天商品カード */
.rakuten-card a {
  display: flex;
  text-decoration: none;
  color: #333;
  background: #fcfcfc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  transition: background 0.2s;
}
.rakuten-card a:hover {
  background: #f1f5f9;
}
.r-img {
  width: 100px;
  min-width: 100px;
  height: 100px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #e5e7eb;
}
.r-img img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.r-info {
  padding: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.r-title {
  font-size: 0.85em;
  line-height: 1.4;
  height: 2.8em;
  overflow: hidden;
  margin-bottom: 5px;
}
.r-price {
  color: #bf0000;
  font-weight: bold;
  font-size: 1.1em;
}
.r-btn {
  background: #bf0000;
  color: #fff;
  font-size: 0.75em;
  text-align: center;
  padding: 4px;
  border-radius: 4px;
  margin-top: 5px;
  align-self: flex-start;
}
/* -----------------------------
   さけのわデータ表示用
   ----------------------------- */
/* カード全体 */
.sakenowa-card {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
}
/* タグのエリア */
.sake-tags-area {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
/* 個別のタグバッジ */
.sake-tag {
  background: #fff;
  color: #3b82f6;
  border: 1px solid #3b82f6;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
}
/* チャートのコンテナ */
.chart-container {
  position: relative;
  width: 100%;
  max-width: 300px; /* 大きくなりすぎないように制限 */
  margin: 0 auto;
}
/* --- タグ選択エリアのスタイル --- */
.tag-selector {
  margin-top: 10px;
  width: 100%;
}
.tag-summary {
  cursor: pointer;
  font-size: 0.8em;
  color: #3b82f6; /* リンクっぽい青 */
  font-weight: bold;
  padding: 0 5px 5px;
  user-select: none;
  outline: none;
  text-align: right;
}
.tag-container {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  margin-top: 5px;
}
.tag-section {
  margin-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 8px;
}
.tag-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.tag-head {
  margin: 0 0 6px;
  font-size: 0.8em;
  color: #64748b;
  font-weight: bold;
}
.tag-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* チェックボックスのデザイン */
.tag-wrap label {
  font-size: 0.7em;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 3px 6px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
/* チェックされた時の見た目 */
.tag-wrap label:has(input:checked) {
  background: #d4af37; /* 金色 */
  color: #fff;
  border-color: #b45309;
  font-weight: bold;
}
/* 古いブラウザ対応 (念のため) */
.tag-wrap input:checked + span {
  background: #d4af37;
  color: #fff;
}
.tag-wrap input {
  display: none; /* デフォルトの四角い箱は消す */
}