/* ===================================
   ギケツ確認サイト — 和風ダークテーマ
   「株屋の立ち話 ー奥の間ー」
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;600;700;900&display=swap');

/* --- Design Tokens --- */
:root {
  --color-bg: #0d0b08;
  --color-bg-card: #1a1510;
  --color-bg-card-hover: #231e17;
  --color-border: #3a3228;
  --color-border-gold: #c9a96e;
  --color-gold: #d4af37;
  --color-gold-light: #f0d060;
  --color-vermillion: #e05550;
  --color-text: #e8e0d4;
  --color-text-muted: #8a7e6e;
  --color-text-soft: #bfb5a4;
  --font-serif: 'Noto Serif JP', 'Hiragino Mincho ProN', serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-serif);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.7;
}

/* --- Container --- */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* --- Header --- */
.header {
  text-align: center;
  padding: 2rem 0 1rem;
}

.header__title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-gold);
  letter-spacing: 0.05em;
}

.header__subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
}

.header__updated {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* --- Section Title --- */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* ===================================
   HERO: ギケツ照会セクション
   =================================== */
.hero-lookup {
  background: linear-gradient(135deg, #1a1510 0%, #231e17 100%);
  border: 2px solid var(--color-border-gold);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1.5rem 0 2.5rem;
  text-align: center;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.08);
}

.hero-lookup .section-title {
  font-size: 1.3rem;
  border-bottom: none;
  margin-bottom: 0.5rem;
}

.hero-lookup__desc {
  color: var(--color-text-soft);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

/* --- Lookup Form --- */
.lookup-form {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
}

.lookup-form__input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  font-family: var(--font-serif);
  background: #0d0b08;
  color: var(--color-text);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.lookup-form__input::placeholder {
  color: var(--color-text-muted);
}

.lookup-form__input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.lookup-form__btn {
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
  font-family: var(--font-serif);
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-gold) 0%, #b8952e 100%);
  color: #1a1510;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.lookup-form__btn:hover {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.lookup-form__btn:active {
  transform: translateY(0);
}

/* --- Lookup Result --- */
.lookup-result {
  margin-top: 1.5rem;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lookup-result--error,
.lookup-result--not-found {
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

.lookup-result--not-found small {
  color: var(--color-text-muted);
}

/* --- Result Card --- */
.result-card {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  animation: resultPop 0.5s ease;
}

@keyframes resultPop {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.result-card__greeting {
  font-size: 1rem;
  color: var(--color-text-soft);
  margin-bottom: 1rem;
}

.result-card__balance-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.result-card__balance {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-gold);
  line-height: 1.2;
}

.result-card__unit {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.result-card__details {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.result-card__detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.result-card__detail-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Level Badge --- */
.level-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.level-badge--chief {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.level-badge--major {
  background: rgba(224, 85, 80, 0.15);
  color: #e05550;
  border: 1px solid rgba(224, 85, 80, 0.3);
}

.level-badge--normal {
  background: rgba(168, 168, 168, 0.15);
  color: #a8a8a8;
  border: 1px solid rgba(168, 168, 168, 0.3);
}

/* --- Multiple Candidates --- */
.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.candidate-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.candidate-btn:hover {
  border-color: var(--color-gold);
  background: var(--color-bg-card-hover);
}

.candidate-btn small {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

/* ===================================
   TOP HOLDERS: 大株主一覧
   =================================== */
.top-holders {
  margin-bottom: 2rem;
}

.top-holders__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.top-holders__table thead th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
}

.top-holders__table thead th:nth-child(2),
.top-holders__table thead th:nth-child(3) {
  text-align: right;
}



.top-holders__table tbody tr {
  border-bottom: 1px solid rgba(58, 50, 40, 0.5);
  transition: var(--transition);
}

.top-holders__table tbody tr:hover {
  background: var(--color-bg-card-hover);
}

.top-holders__table tbody td {
  padding: 0.7rem 0.8rem;
  color: var(--color-text);
}



.top-holders__table tbody td:nth-child(2),
.top-holders__table tbody td:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.top-holders__table tbody td:nth-child(2) {
  font-weight: 600;
}

.top-holders__table tbody td:nth-child(3) {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}



/* ===================================
   CHART: 株主構成
   =================================== */
.chart-section {
  margin-bottom: 2rem;
}

.chart-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.chart-canvas-wrapper {
  flex: 0 0 220px;
  max-width: 220px;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chart-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.chart-legend__color {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.chart-legend__label {
  color: var(--color-text-soft);
}

.chart-legend__value {
  margin-left: auto;
  font-weight: 700;
  color: var(--color-text);
}

/* --- Notes Section --- */
.notes-section {
  margin-bottom: 2rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
}

.notes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notes-list li {
  font-size: 0.85rem;
  color: var(--color-text-soft);
  line-height: 1.8;
  padding-left: 1.2rem;
  position: relative;
}

.notes-list li::before {
  content: '•';
  color: var(--color-text-muted);
  position: absolute;
  left: 0;
}

.notes-list li strong {
  color: var(--color-text);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  .header__title {
    font-size: 1.5rem;
  }

  .hero-lookup {
    padding: 1.5rem 1rem;
  }

  .lookup-form {
    flex-direction: column;
  }

  .lookup-form__btn {
    width: 100%;
  }

  .result-card__balance {
    font-size: 2rem;
  }

  .result-card__details {
    flex-direction: column;
    gap: 0.8rem;
  }

  .chart-wrapper {
    flex-direction: column;
  }

  .chart-canvas-wrapper {
    max-width: 200px;
  }
}

/* ===================================
   MEETING SECTION: 株主総会セクション
   =================================== */
.meeting-section {
  margin: 1rem 0 2rem;
}

.meeting-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.meeting-list__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.03) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition);
  cursor: pointer;
}

.meeting-list__item:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.06) 100%);
  border-color: var(--color-border-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.12);
}

.meeting-list__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.meeting-list__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.meeting-list__text strong {
  font-size: 0.95rem;
  color: var(--color-text);
}

.meeting-list__text small {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.meeting-list__arrow {
  font-size: 1.2rem;
  color: var(--color-gold);
  flex-shrink: 0;
}

/* ===================================
   MEETING PAGE: 株主総会
   =================================== */

/* 戻るリンク */
.back-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--color-gold);
}

/* === Discordログイン === */
.login-section {
  margin: 1.5rem 0;
}

.login-card {
  background: linear-gradient(135deg, #1a1510 0%, #231e17 100%);
  border: 2px solid var(--color-border-gold);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.login-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-bottom: 1.5rem;
}

.discord-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-family: var(--font-serif);
  font-weight: 700;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.discord-login-btn:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.35);
}

.discord-login-btn__icon {
  flex-shrink: 0;
}

.login-card__note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
  font-style: italic;
}

/* === ユーザーカード === */
.user-section {
  margin: 1.5rem 0;
}

.user-card {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  animation: resultPop 0.5s ease;
}

.user-card__greeting {
  font-size: 1.05rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.user-card__greeting strong {
  color: var(--color-gold);
}

/* === 投票送信ボタンセクション === */
.vote-submit-section {
  text-align: center;
  margin: 2rem 0;
}

/* === エラーカード（ロールなし・紐付け未完了） === */
.error-section {
  margin: 1.5rem 0;
}

.error-card {
  background: rgba(224, 85, 80, 0.05);
  border: 1px solid rgba(224, 85, 80, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.error-card--warning {
  background: rgba(243, 156, 18, 0.05);
  border-color: rgba(243, 156, 18, 0.3);
}

.error-card__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.error-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.8rem;
}

.error-card__desc {
  font-size: 0.85rem;
  color: var(--color-text-soft);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* 総会日付 */
.meeting-date {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-top: 0.5rem;
}

/* 総会情報 */
.meeting-info {
  text-align: center;
  padding: 1rem 0 1.5rem;
}

.meeting-info__status {
  font-size: 0.95rem;
  color: var(--color-text-soft);
}

/* ステータスバッジ */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 0.5rem;
}

.status-badge--open {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-badge--closed {
  background: rgba(224, 85, 80, 0.15);
  color: #e05550;
  border: 1px solid rgba(224, 85, 80, 0.3);
}

/* === 議案カード === */
.agenda-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.agenda-card:hover {
  border-color: rgba(201, 169, 110, 0.4);
}

.agenda-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

.agenda-card__desc {
  font-size: 0.85rem;
  color: var(--color-text-soft);
  margin-bottom: 1rem;
}

.agenda-card__options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* === ラジオボタン === */
.agenda-option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.agenda-option:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(201, 169, 110, 0.4);
}

.agenda-option__radio {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.agenda-option__radio:checked {
  border-color: var(--color-gold);
}

.agenda-option__radio:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
}

.agenda-option__label {
  font-size: 0.9rem;
  color: var(--color-text);
}

/* === 投票フォーム === */
.vote-form-section {
  margin: 2rem 0;
}

.vote-form {
  background: linear-gradient(135deg, #1a1510 0%, #231e17 100%);
  border: 2px solid var(--color-border-gold);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.vote-form__label {
  display: block;
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-bottom: 0.8rem;
}

.vote-form__select {
  width: 100%;
  max-width: 400px;
  padding: 0.9rem 1.2rem;
  font-size: 0.95rem;
  font-family: var(--font-serif);
  background: #0d0b08;
  color: var(--color-text);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
  cursor: pointer;
}

.vote-form__select:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.vote-form__giketsu {
  margin-top: 1rem;
}

.voter-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.voter-info__label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.voter-info__value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-gold);
}

.voter-info__value small {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.vote-form__btn {
  margin-top: 1.5rem;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-family: var(--font-serif);
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-gold) 0%, #b8952e 100%);
  color: #1a1510;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.vote-form__btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.vote-form__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === 投票結果 === */
.vote-result {
  margin-top: 1.5rem;
}

.vote-result__card {
  background: rgba(46, 204, 113, 0.05);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: left;
  animation: resultPop 0.5s ease;
}

.vote-result__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2ecc71;
  margin-bottom: 0.8rem;
}

.vote-result__voter {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-bottom: 0.5rem;
}

.vote-result__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.vote-result__list li {
  font-size: 0.85rem;
  color: var(--color-text);
  padding: 0.5rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

.vote-result__note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* === 投票状況バー === */
.vote-progress-section {
  margin: 2rem 0;
}

.progress-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
}

.progress-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 0.3rem;
}

.progress-card__voters {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.progress-item {
  margin-bottom: 0.8rem;
}

.progress-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.progress-item__label {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

.progress-item__count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  border-radius: 4px;
  transition: width 0.8s ease;
}

/* === レスポンシブ: 株主総会 === */
@media (max-width: 600px) {
  .vote-form {
    padding: 1.5rem 1rem;
  }

  .vote-form__btn {
    width: 100%;
    padding: 1rem;
  }

  .voter-info__value {
    font-size: 1.4rem;
  }

  .meeting-banner {
    padding: 0.8rem 1rem;
  }
}