/* ===== Hint Bridge (連想ブリッジ) - Styles ===== */
:root {
  --game-accent: #B5DDC9;
}

body { overflow-x: hidden; }

.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem 1rem; background: var(--surface);
  border-bottom: 3px solid var(--color-coral);
  box-shadow: var(--shadow-sm);
}
.top-bar .title { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.top-bar .title a { color: var(--text-muted); transition: color .2s; }
.top-bar .title a:hover { color: var(--game-accent); }
.top-bar .title span { color: var(--text); font-weight: 900; }
.top-bar-actions { display: flex; gap: .4rem; align-items: center; }
.icon-btn {
  background: var(--surface2); border: 2px solid var(--surface2);
  color: var(--text-muted); width: 30px; height: 30px; border-radius: 50%;
  font-size: .8rem; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-family: inherit; font-weight: 700;
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--game-accent); color: var(--game-accent); }

.game-page {
  max-width: 600px; margin: 0 auto; padding: .5rem .75rem;
  display: flex; flex-direction: column; gap: .6rem;
  min-height: calc(100vh - 48px);
}

/* --- Setup --- */
.setup-section {
  background: var(--surface); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow);
}
.setup-section h4 { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; font-weight: 700; }
.player-bar { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.player-bar input { padding: .35rem .6rem; font-size: .85rem; border-radius: 10px; width: 100px; min-width: 0; }
.player-bar .btn { padding: .35rem .6rem; font-size: .8rem; border-radius: 10px; }
.player-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.player-tags .player-tag { font-size: .75rem; padding: .15rem .5rem; }

.options-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .6rem; }
.option-group { display: flex; flex-direction: column; gap: .25rem; }
.option-group label { font-size: .7rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.option-pills { display: flex; gap: .25rem; flex-wrap: wrap; }
.option-pill {
  padding: .25rem .6rem; font-size: .75rem; border-radius: 999px;
  border: 2px solid var(--surface2); background: var(--surface);
  color: var(--text-muted); cursor: pointer; font-family: inherit;
  font-weight: 600; transition: all .15s;
}
.option-pill:hover { border-color: var(--game-accent); }
.option-pill.selected { background: var(--color-coral); color: #5A3A3A; border-color: transparent; }

.start-btn {
  margin-top: .8rem; width: 100%; padding: .7rem; font-size: 1.1rem;
  border-radius: 999px; background: var(--color-coral);
  color: #5A3A3A; box-shadow: 0 4px 14px rgba(181, 221, 201, .3);
  border: none; font-family: inherit; font-weight: 700; cursor: pointer;
}
.start-btn:hover { box-shadow: 0 6px 20px rgba(181, 221, 201, .4); }
.start-btn:active { transform: scale(.97); }

/* --- Phase Section --- */
.phase-section {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.2rem 1rem; box-shadow: var(--shadow); text-align: center;
}
.round-counter { font-size: .7rem; color: var(--text-muted); font-weight: 600; margin-bottom: .3rem; }

/* --- Presenter Select --- */
.presenter-select-grid {
  display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: .5rem 0;
}
.presenter-btn {
  padding: .4rem .8rem; font-size: .85rem; border-radius: 999px;
  border: 2px solid var(--surface2); background: var(--surface);
  color: var(--text); cursor: pointer; font-family: inherit;
  font-weight: 700; transition: all .15s;
}
.presenter-btn:hover { border-color: var(--game-accent); }
.presenter-btn.selected { background: var(--color-coral); color: #5A3A3A; border-color: transparent; }

/* --- Topic Card --- */
.topic-card {
  background: var(--surface2); border-radius: var(--radius);
  padding: 1.5rem 1rem; margin: .5rem 0; min-height: 120px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: .4rem; cursor: pointer;
  transition: background .3s, color .3s;
}
.topic-card.revealed {
  background: linear-gradient(135deg, #2a5c49, #3a7060);
  color: #fff; cursor: default;
}
.topic-card .tap-icon { font-size: 2.5rem; }
.topic-card .tap-text { font-size: .9rem; color: var(--text-muted); }
.topic-category { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.topic-word { font-size: 1.8rem; font-weight: 900; margin-top: .2rem; }
.confirm-btn { margin-top: .6rem; padding: .5rem 2rem; font-size: .95rem; border-radius: 999px; }

/* --- Hint Phase --- */
.presenter-info { font-size: .9rem; font-weight: 700; margin-bottom: .4rem; }
.presenter-info .name { color: var(--game-accent); font-size: 1.1rem; }

.point-bar { display: flex; gap: .2rem; justify-content: center; margin: .4rem 0; }
.point-star { font-size: 1.4rem; transition: opacity .3s, transform .3s; }
.point-star.used { opacity: .15; transform: scale(.7); }
.point-label { font-size: .75rem; color: var(--text-muted); font-weight: 700; }

.hint-list {
  display: flex; flex-direction: column; gap: .3rem;
  margin: .5rem 0; text-align: left;
}
.hint-card {
  background: var(--surface2); border-radius: 12px;
  padding: .4rem .7rem; font-size: .9rem; font-weight: 600;
  display: flex; align-items: center; gap: .5rem;
  animation: slideIn .3s ease-out;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hint-card .hint-number {
  background: linear-gradient(135deg, var(--game-accent), rgba(181,221,201,.7));
  color: #5A3A3A; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 900; flex-shrink: 0;
}
.hint-card .hint-text { color: var(--text); }

.hint-input-row {
  display: flex; gap: .4rem; align-items: center; margin-top: .4rem;
}
.hint-input-row input {
  flex: 1; min-width: 0; max-width: 200px; padding: .35rem .5rem;
  font-size: .8rem; border-radius: 10px;
}
.hint-input-row .btn { padding: .35rem .6rem; font-size: .8rem; border-radius: 10px; flex-shrink: 0; }

.action-row {
  display: flex; gap: .4rem; justify-content: center; margin-top: .5rem; flex-wrap: wrap;
}
.action-row .btn { padding: .5rem 1rem; font-size: .9rem; border-radius: 14px; }
.btn-correct { background: var(--accent-green); color: #5A3A3A; box-shadow: 0 3px 10px rgba(52,211,153,.3); }
.btn-wrong { background: var(--primary); color: #5A3A3A; box-shadow: 0 3px 10px rgba(255,107,157,.3); }
.btn-giveup { background: var(--surface2); color: var(--text-muted); }

/* --- Answerer Select --- */
.answerer-grid { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: .5rem 0; }
.answerer-btn {
  padding: .5rem 1rem; font-size: .9rem; border-radius: 999px;
  border: 2px solid var(--surface2); background: var(--surface);
  color: var(--text); cursor: pointer; font-family: inherit;
  font-weight: 700; transition: all .15s;
}
.answerer-btn:hover { border-color: var(--accent-green); background: rgba(52,211,153,.08); }

/* --- Result --- */
.result-section { text-align: center; }
.result-icon { font-size: 3rem; margin-bottom: .3rem; }
.result-title { font-size: 1.3rem; font-weight: 900; margin-bottom: .3rem; }
.result-answer { font-size: 1.5rem; font-weight: 900; color: var(--game-accent); margin: .3rem 0; }
.result-details { font-size: .85rem; color: var(--text-muted); line-height: 1.8; }
.result-details strong { color: var(--text); }
.result-hints { font-size: .8rem; color: var(--text-muted); margin-top: .4rem; }
.next-btn { margin-top: .6rem; padding: .6rem 2rem; font-size: 1rem; border-radius: 999px; }

/* --- Score --- */
.score-section { background: var(--surface); border-radius: var(--radius); padding: .5rem .8rem; box-shadow: var(--shadow); }
.score-section h4 { font-size: .7rem; color: var(--text-muted); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.score-list { display: flex; flex-wrap: wrap; gap: .3rem .8rem; }
.score-item { font-size: .8rem; display: flex; gap: .3rem; align-items: center; }
.score-item .name { font-weight: 700; }
.score-item .pts { color: var(--game-accent); font-weight: 700; }

/* --- Log --- */
.log-section { background: var(--surface); border-radius: var(--radius); padding: .5rem .8rem; box-shadow: var(--shadow); }
.log-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.log-header h4 { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.clear-log-btn { background: var(--surface2); border: 2px solid var(--surface2); color: var(--text-muted); border-radius: 8px; padding: .15rem .5rem; font-size: .65rem; cursor: pointer; font-family: inherit; font-weight: 600; }
.log-entry { display: flex; justify-content: space-between; align-items: center; padding: .25rem 0; border-bottom: 1px solid var(--surface2); font-size: .75rem; }
.log-entry:last-child { border-bottom: none; }
.log-entry .solved { color: var(--accent-green); }
.log-entry .unsolved { color: var(--primary); }

/* --- Modal --- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(90,58,58,.3); backdrop-filter: blur(4px); z-index: 100; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.show { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; max-width: 400px; width: 100%; max-height: 80vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-lg); }
.modal-box h3 { margin-bottom: .8rem; font-weight: 900; }
.modal-box ul { margin: 0 0 0 1.2rem; line-height: 1.8; font-size: .85rem; color: var(--text-muted); }
.modal-close { position: absolute; top: .5rem; right: .8rem; background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; }

@media (max-width: 480px) {
  .game-page { padding: .4rem .5rem; }
  .topic-word { font-size: 1.5rem; }
  .point-star { font-size: 1.2rem; }
}
