/* ===== ITOU オンライン スタイル ===== */

body { background-color: #ffffff; }

#itou-wrap {
  padding: 10px 12px;
}

/* セクション共通 */
.itou-section {
  border: 2px solid #006600;
  background: #ffffff;
  margin-bottom: 12px;
}
.itou-section-ttl {
  background: #006600;
  color: #ffff00;
  font-size: 15px;
  font-weight: bold;
  padding: 5px 10px;
  border-bottom: 2px solid #ffff00;
  letter-spacing: 1px;
}
.itou-section-body {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.9;
}

/* ===== ルーム選択グリッド ===== */
.room-select-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.room-card-clear {
  background: #ffeeee;
  border: 2px outset #cc0000;
  color: #cc0000;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  align-self: center;
}
.room-card-clear:active { border-style: inset; }
.room-card {
  border: 4px outset;
  padding: 20px 10px;
  text-align: center;
  cursor: pointer;
  font-family: 'ＭＳ Ｐゴシック', 'MS PGothic', Osaka, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.room-card:active { border-style: inset; }
.room-card:disabled { cursor: default; opacity: 0.6; }
.room-card.empty   { background: #ccffcc; border-color: #006600; }
.room-card.waiting { background: #ffffcc; border-color: #886600; }
.room-card.playing { background: #ffcccc; border-color: #cc0000; }
.room-card-name {
  font-size: 22px;
  font-weight: bold;
  color: #000000;
}
.room-card-info {
  font-size: 16px;
  font-weight: bold;
}
.room-card.empty   .room-card-info { color: #006600; }
.room-card.waiting .room-card-info { color: #886600; }
.room-card.playing .room-card-info { color: #cc0000; }

/* ===== ロビー ===== */
.itou-rules p {
  margin: 4px 0;
  font-size: 15px;
}
.rule-example {
  border: 2px dashed #006600;
  background: #f0fff0;
  padding: 8px 12px;
  margin-top: 8px;
}
.rule-ex-ttl {
  font-weight: bold;
  color: #006600;
  margin-bottom: 6px;
  font-size: 14px;
}
.rule-ex-body {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}
.rule-card {
  display: inline-block;
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  border: 3px solid #333;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}
.rule-card.low  { background: #ccffcc; color: #006600; border-color: #006600; }
.rule-card.mid  { background: #ffffcc; color: #886600; border-color: #886600; }
.rule-card.high { background: #ffcccc; color: #cc0000; border-color: #cc0000; }

/* 入力フィールド */
.itou-input-lg {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 2px inset #999999;
  color: #000000;
  font-family: 'ＭＳ Ｐゴシック', 'MS PGothic', Osaka, sans-serif;
  font-size: 15px;
  padding: 5px 8px;
  margin-bottom: 8px;
}

/* ボタン */
.itou-btn-big {
  display: inline-block;
  font-family: 'ＭＳ Ｐゴシック', 'MS PGothic', Osaka, sans-serif;
  font-size: 16px;
  font-weight: bold;
  padding: 8px 24px;
  cursor: pointer;
  border: 3px outset;
}
.itou-btn-big:active { border-style: inset; }
.itou-btn-big.green { background: #006600; border-color: #669966; color: #ffff00; }
.itou-btn-big.blue  { background: #000099; border-color: #6666cc; color: #ffffff; }
.itou-btn-big.red   { background: #cc0000; border-color: #ff6666; color: #ffffff; }
.itou-btn-big:disabled { background: #999999; border-color: #aaaaaa; color: #cccccc; cursor: default; }

.itou-btn-sm {
  background: #cccccc;
  border: 2px outset #aaaaaa;
  color: #000000;
  font-family: 'ＭＳ Ｐゴシック', 'MS PGothic', Osaka, sans-serif;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 10px;
}
.itou-btn-sm:active { border-style: inset; }
.itou-btn-sm.red { background: #cc0000; border-color: #ff6666; color: #ffffff; }

/* ===== 待機室 ===== */
.room-id-label { font-size: 14px; font-weight: bold; }
.room-id-val {
  font-size: 22px;
  font-weight: bold;
  color: #cc0000;
  font-family: 'ＭＳ Ｐゴシック', 'MS PGothic', Osaka, sans-serif;
  letter-spacing: 2px;
}

.player-list { list-style: none; padding: 0; margin: 0; }
.player-list li {
  border-bottom: 1px dotted #006600;
  padding: 6px 8px;
  font-size: 16px;
}
.player-list li:last-child { border-bottom: none; }

/* ===== ゲーム画面 ===== */
.game-theme-banner {
  background: #006600;
  border: 3px solid #ffff00;
  text-align: center;
  padding: 12px;
  margin-bottom: 12px;
}
.game-theme-label {
  display: block;
  font-size: 13px;
  color: #ccffcc;
  margin-bottom: 4px;
}
.game-theme-val {
  display: block;
  font-size: 32px;
  font-weight: bold;
  color: #ffff00;
  letter-spacing: 4px;
  text-shadow: 2px 2px 0 #003300;
}

.my-card-area {
  text-align: center;
  background: #fff8e0;
  border: 4px solid #cc8800;
  padding: 16px;
  margin-bottom: 12px;
}
.my-card-label { font-size: 14px; color: #886600; font-weight: bold; margin-bottom: 6px; }
.my-card-num {
  font-size: 80px;
  font-weight: bold;
  color: #cc0000;
  font-family: 'Courier New', monospace;
  line-height: 1;
  text-shadow: 3px 3px 0 #880000;
  margin: 8px 0;
}
.my-card-hint { font-size: 13px; color: #555; margin-top: 6px; }

.declare-input-area {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.declare-input-area .itou-input-lg { flex: 1; min-width: 180px; margin-bottom: 0; }

.declare-list { list-style: none; padding: 0; margin: 0; }
.declare-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dotted #006600;
  padding: 7px 8px;
  font-size: 15px;
}
.declare-list li:last-child { border-bottom: none; }
.declare-list li.not-declared { background: #fff8f8; }
.dl-name { font-weight: bold; color: #006600; min-width: 80px; }
.dl-decl { color: #000099; font-size: 16px; font-weight: bold; }
.declare-list li.not-declared .dl-decl { color: #999999; font-style: italic; font-weight: normal; }

/* ===== 結果画面 ===== */
.result-msg {
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  padding: 14px;
  margin-bottom: 12px;
  border: 3px solid;
}
.result-msg.result-success { background: #ccffcc; color: #006600; border-color: #006600; }
.result-msg.result-fail    { background: #ffcccc; color: #cc0000; border-color: #cc0000; }

.result-list { list-style: none; padding: 0; margin: 0; }
.result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dotted #006600;
  padding: 8px 10px;
  font-size: 15px;
}
.result-item:last-child { border-bottom: none; }
.res-rank { font-size: 18px; font-weight: bold; color: #cc0000; min-width: 36px; font-family: 'Courier New', monospace; }
.res-name { font-weight: bold; color: #006600; min-width: 80px; }
.res-decl { color: #000099; font-size: 15px; flex: 1; }
.res-card {
  font-size: 22px;
  font-weight: bold;
  color: #cc0000;
  font-family: 'Courier New', monospace;
  background: #fff0f0;
  border: 2px solid #cc0000;
  padding: 2px 8px;
  min-width: 50px;
  text-align: center;
}

/* ===== 並び替え画面 ===== */
.order-list { list-style: none; padding: 0; margin: 0; }
.order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #006600;
  background: #f0fff0;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 15px;
}
.order-item .ol-name { font-weight: bold; color: #006600; min-width: 80px; }
.order-item .ol-decl { color: #000099; font-size: 16px; font-weight: bold; flex: 1; }
.order-move {
  background: #006600;
  border: 2px outset #669966;
  color: #ffff00;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 8px;
  font-family: inherit;
}
.order-move:active { border-style: inset; }
.order-move:disabled { background: #999; border-color: #aaa; color: #ccc; cursor: default; }
