:root {
  /* 配色システム */
  --bond-bg: #f8fafc;
  --bond-text: #1f2937;
  --bond-muted: #475569;
  --bond-border: rgba(15, 23, 42, 0.08);
  --bond-radius: 1.5rem;
  --bond-teal: #0d9488;
  --bond-teal-dark: #0f766e;
  --bond-danger: #dc2626;
  
  /* 既存の色を保持（段階的に移行） */
  --bond-primary: #ff4b4b;
  --bond-primary-light: #ffe9e9;
  --bond-bg-white: #ffffff;
  --bond-bg-light: #fafafa;
  --bond-text-light: #666;
  --bond-text-lighter: #777;
  --bond-border-light: #ccc;
  --bond-shadow: rgba(0,0,0,0.1);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: sans-serif;
  margin: 0;
  background: var(--bond-bg);
  color: var(--bond-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ヘッダー */
.app-header { 
  background: var(--bond-teal); 
  color: white; 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-start; 
  padding: 12px 16px; 
  font-size: 18px; 
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  gap: 12px; 
}
.bg-brand-teal { background: var(--bond-teal); }
#app-title { margin: 0; font-size: 28px; cursor: pointer; outline: none; }
#app-title:focus-visible { outline: 2px solid rgba(255,255,255,0.9); outline-offset: 4px; border-radius: 4px; }
.header-left { display: flex; flex-direction: column; gap: 6px; }
.header-right { display: flex; gap: 8px; }
#menu-button { background: var(--bond-bg-white); border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 18px; cursor: pointer; }
#menu { display: none; position: absolute; top: 48px; right: 8px; background: var(--bond-bg-white); color: var(--bond-text); box-shadow: 0 2px 6px rgba(0,0,0,0.2); border-radius: 6px; overflow: hidden; z-index: 100; }
#menu button { display: block; width: 100%; border: none; background: none; padding: 10px 16px; text-align: left; cursor: pointer; }
#menu button:hover { background: var(--bond-bg); }
main {
  padding: 12px;
  flex-grow: 1;
  padding-bottom: 4em;
}

/* ページナビゲーション */
.page-nav {
  background: var(--bond-bg-white);
  border-bottom: 1px solid var(--bond-border);
  position: sticky;
  top: 56px;
  z-index: 40;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.page-nav__inner {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  min-width: min-content;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--bond-muted);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.tab-btn:hover {
  background: var(--bond-bg);
  color: var(--bond-text);
}
.tab-btn.active {
  background: var(--bond-teal);
  color: white;
  font-weight: 600;
}
.tab-btn__icon {
  font-size: 18px;
  line-height: 1;
}
.tab-btn__label--short {
  display: none;
}
.tab-btn__label--full {
  display: inline;
}

@media (max-width: 640px) {
  .tab-btn {
    padding: 8px 12px;
  }
  .tab-btn__label--short {
    display: inline;
  }
  .tab-btn__label--full {
    display: none;
  }
}

.home-hero { background: var(--bond-primary-light); border-radius: 8px; border-left: 4px solid var(--bond-teal); padding: 16px; margin-bottom: 32px; }
.home-hero-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.home-hero-header h3 { margin: 0; font-size: 1.2em; }
.toggle-btn { background: none; border: none; font-size: 1.2em; cursor: pointer; padding: 4px; border-radius: 4px; transition: background 0.2s; }
.toggle-btn:hover { background: rgba(0,0,0,0.1); }
.home-hero-content { transition: all 0.3s ease; }
.home-hero.collapsed .home-hero-content { display: none; }
.home-hero.collapsed .toggle-btn::before { content: '▶'; }
.home-hero .toggle-btn::before { content: '▼'; }
.home-hero p { margin: 0 0 8px; line-height: 1.6; }
.home-hero p:last-child { margin-bottom: 0; }
.view { display: none; }
.view.active { display: block; }
.home-section { margin-bottom: 32px; }
.home-section:last-of-type { margin-bottom: 0; }
.home-section-title { margin: 0 0 12px; font-size: 22px; }
.home-section-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.home-section-description { margin: 0 0 12px; color: var(--bond-muted); line-height: 1.6; }
.home-status-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.home-status-button { align-self: flex-start; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { 
  background: var(--bond-bg-white); 
  margin-bottom: 8px; 
  padding: 12px; 
  border-radius: 6px; 
  box-shadow: 0 1px 3px var(--bond-shadow); 
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.list li:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.list li:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px var(--bond-shadow);
}
.list li.list-link { text-decoration: underline; }
.list-title { font-weight: bold; margin-bottom: 4px; }
.list-sub { font-size: 14px; color: var(--bond-text-light); }
.listener-section .list li { cursor: pointer; }
.home-section .list-toolbar { margin-bottom: 0; }
.home-section .list-toolbar label { margin-bottom: 0; }
.home-section .list-toolbar select { min-width: 180px; }
.home-section #global-listener-empty { display: none; }
.home-section .add-subitem { margin-top: 12px; }
.list-toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 8px; }
.list-toolbar .toolbar-field { display: flex; flex-direction: column; gap: 4px; }
.list-toolbar label { font-size: 14px; color: var(--bond-muted); }
.add-subitem { display: block; width: 100%; padding: 12px; background: var(--bond-bg); border: none; border-radius: 6px; font-size: 16px; cursor: pointer; }
.back-btn { border: none; background: none; color: var(--bond-teal); font-size: 18px; cursor: pointer; margin-bottom: 8px; }
input[type="text"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="url"],
select { 
  width: 100%; 
  padding: 8px; 
  border-radius: 4px; 
  border: 1px solid var(--bond-border-light);
  font-size: 14px;
  transition: all 0.2s ease;
  min-height: 44px;
}
input[type="text"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="url"]:focus,
select:focus {
  outline: none;
  border-color: var(--bond-teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}
textarea { 
  width: 100%; 
  padding: 8px; 
  border-radius: 4px; 
  border: 1px solid var(--bond-border-light); 
  min-height: 120px; 
  resize: vertical;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}
textarea:focus {
  outline: none;
  border-color: var(--bond-teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}
.modal-field { 
  margin-bottom: 12px; 
}
.modal-label { 
  font-size: 14px; 
  margin-bottom: 4px; 
  color: var(--bond-muted);
  font-weight: 500;
  display: block;
}
.modal-static { 
  background: var(--bond-bg); 
  padding: 8px; 
  border-radius: 4px; 
  font-size: 14px; 
  color: var(--bond-muted);
  border: 1px solid var(--bond-border);
}
.modal-hint {
  font-size: 12px;
  color: var(--bond-muted);
  margin-top: 4px;
}
.modal-error {
  font-size: 12px;
  color: var(--bond-danger);
  margin-top: 4px;
}
.modal-checkbox-group { display: flex; flex-direction: column; gap: 6px; }
.modal-checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--bond-muted); }
.modal-checkbox-item input { margin: 0; }
.modal-field--checkbox { margin-bottom: 12px; }
.modal-checkbox-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--bond-muted); }
.modal-checkbox-inline input { margin: 0; }
.listener-header { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.listener-heading { display: flex; flex-direction: column; gap: 4px; }
.tag-container { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip { display: inline-block; padding: 4px 8px; background: var(--bond-primary-light); color: var(--bond-teal); border-radius: 999px; font-size: 12px; }
/* ステータスバッジ表示 */
.status-badge-container { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.status-badge-container--compact { gap: 4px; margin-top: 0; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 12px; line-height: 1.2; background: #e5e5e5; color: #333; }
.status-badge--compact { padding: 2px 6px; font-size: 11px; }
.status-badge--empty { background: #dedede; color: #666; }
.status-badge--unknown { background: #555; color: #fff; }
.status-badge-icon { font-weight: 600; }
.status-badge-label { line-height: 1.2; }
.list-title-block { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 1 1 auto; }
.listener-heading-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.listener-section { margin-bottom: 24px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.section-title h3 { margin: 0; }
.listener-info { margin: 0; }
.listener-info div { margin-bottom: 12px; }
.listener-info dt { font-weight: bold; margin-bottom: 4px; color: var(--bond-text); }
.listener-info dd { margin: 0; white-space: pre-wrap; color: var(--bond-text); }
.listener-status-block { display: flex; flex-direction: column; gap: 8px; }
.listener-status-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.listener-info .listener-status-manage-btn,
.listener-info .listener-status-history-btn { align-self: flex-start; padding: 4px 10px; font-size: 13px; }
.listener-info .listener-status-history-btn { margin-left: 0; }
.status-detail { font-size: 13px; color: var(--bond-muted); }
.status-detail-empty { font-size: 13px; color: var(--bond-text-lighter); }
.status-detail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.status-detail-item { line-height: 1.4; }
.status-detail-title { font-weight: bold; color: var(--bond-text); }
.status-detail-meta { font-size: 12px; color: var(--bond-text-lighter); }
.status-detail-description { font-size: 12px; color: var(--bond-text-light); }
.listener-url-list { list-style: none; padding: 0; margin: 0; }
.listener-url-list li { margin-bottom: 4px; }
.listener-url-list li:last-child { margin-bottom: 0; }
.listener-url-list a { color: var(--bond-teal); text-decoration: underline; word-break: break-all; }
.empty-state { color: var(--bond-text-lighter); margin: 12px 0; display: block; }
.secondary { border: 1px solid var(--bond-teal); background: var(--bond-bg-white); color: var(--bond-teal); border-radius: 4px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
.gift-summary { font-size: 14px; color: var(--bond-muted); }
#modal-bg { 
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  justify-content: center; 
  align-items: center;
  z-index: 100;
}
#modal { 
  background: var(--bond-bg-white); 
  padding: 16px; 
  border-radius: 8px; 
  width: 90%; 
  max-width: 400px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
#modal h3 { 
  margin-top: 0;
  color: var(--bond-text);
}
.modal-header-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
#modal .modal-header-actions:empty { display: none; }
.status-history-filter { display: flex; align-items: center; }
.status-history-filter-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; user-select: none; }
.status-history-filter-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: var(--bond-teal); }
.status-history-filter-text { color: var(--bond-text); }
#modal button { 
  margin-right: 8px; 
  padding: 8px 12px; 
  border: none; 
  border-radius: 4px; 
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}
#modal button.primary { 
  background: var(--bond-teal); 
  color: white; 
}
#modal button.primary:hover {
  background: var(--bond-teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
#modal button.primary:active {
  transform: translateY(0);
}
.list-item-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.list-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.list-action-btn { 
  border: none; 
  background: var(--bond-bg); 
  color: var(--bond-text); 
  padding: 4px 8px; 
  border-radius: 4px; 
  font-size: 13px; 
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 32px;
  min-width: 48px;
}
.list-action-btn:hover { 
  background: #dedede;
  transform: translateY(-1px);
}
.list-action-btn:active {
  transform: translateY(0);
}
.list-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.list-action-btn.edit {
  border: 1px solid var(--bond-teal) !important;
  color: var(--bond-teal) !important;
  background: white !important;
}
.list-action-btn.edit:hover {
  background: var(--bond-primary-light) !important;
  border-color: var(--bond-teal) !important;
}
.list-action-btn.edit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.list-action-btn.danger { 
  background: var(--bond-primary-light); 
  color: var(--bond-danger); 
}
.list-action-btn.danger:hover { 
  background: #ffcccc;
}
.stream-meta { margin: 4px 0; font-size: 14px; color: var(--bond-muted); word-break: break-all; }
#stream-url { display: none; }
button.primary { 
  background: var(--bond-teal); 
  color: #fff; 
  border: none; 
  padding: 8px 16px; 
  border-radius: 4px; 
  font-size: 14px; 
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}
button.primary:hover {
  background: var(--bond-teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
button.primary:active {
  transform: translateY(0);
}
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }

button.danger-btn { 
  border: none; 
  background: var(--bond-primary-light); 
  color: var(--bond-danger); 
  padding: 8px 16px; 
  border-radius: 4px; 
  font-size: 14px; 
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}
button.danger-btn:hover { 
  background: #ffcccc;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
button.danger-btn:active {
  transform: translateY(0);
}

.secondary { 
  border: 1px solid var(--bond-teal); 
  background: var(--bond-bg-white); 
  color: var(--bond-teal); 
  border-radius: 4px; 
  padding: 6px 12px; 
  font-size: 14px; 
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}
.secondary:hover {
  background: var(--bond-bg);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.secondary:active {
  transform: translateY(0);
}

.add-subitem { 
  display: block; 
  width: 100%; 
  padding: 12px; 
  background: var(--bond-bg); 
  border: none; 
  border-radius: 6px; 
  font-size: 16px; 
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}
.add-subitem:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.add-subitem:active {
  transform: translateY(0);
}

.status-list-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.status-list-header-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.status-detail-view { max-width: 960px; margin: 0 auto; }
.platform-list-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.platform-list-header-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.listener-list-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.listener-list-header-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stream-list-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.stream-list-header input {
  border: 1px solid var(--bond-teal);
  background: var(--bond-bg-white);
  color: var(--bond-text);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: text;
  transition: all 0.2s ease;
  min-height: 44px;
  flex: 1;
}
.stream-list-header input:focus {
  outline: none;
  border-color: var(--bond-teal-dark);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}
.profile-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.status-list { max-height: 380px; overflow-y: auto; }
.status-list li { display: flex; flex-direction: column; gap: 4px; }
.status-list li.selected { outline: 2px solid var(--bond-teal); }
.status-list .status-list-title { font-weight: bold; }
.status-list .status-list-meta { font-size: 12px; color: var(--bond-muted); display: flex; gap: 8px; }
.status-list .status-list-state { font-size: 12px; color: var(--bond-danger); }
.status-list-item--draft .status-list-title { color: var(--bond-text-lighter); font-style: italic; }

.status-editor { display: none; flex-direction: column; gap: 12px; }
.status-editor.active { display: flex; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 14px; color: var(--bond-muted); }
.form-field--checkbox label { flex-direction: row; align-items: center; gap: 8px; }
.status-editor textarea { min-height: 90px; }
.status-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.button-description { margin-top: 12px; }
.description-text { font-size: 0.9em; color: var(--bond-muted); text-align: right; }
.warning-text { color: var(--bond-danger); font-weight: bold; text-align: right; }
.button-help-text { font-size: 0.85em; color: var(--bond-muted); margin: 4px 0 0 0; }
.button-warning-text { font-size: 0.85em; color: var(--bond-danger); margin: 4px 0 0 0; }
.status-usage-info { font-size: 13px; color: var(--bond-muted); margin: 0; }
.status-history-container { display: flex; flex-direction: column; gap: 12px; max-height: 360px; overflow-y: auto; }
.status-history-target { font-size: 14px; color: var(--bond-text); margin: 0; }
.status-history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.status-history-item { border: 1px solid var(--bond-border); border-radius: 6px; padding: 10px; background: var(--bond-bg); }
.status-history-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.status-history-name { font-weight: bold; font-size: 14px; color: var(--bond-text); }
.status-history-state { font-size: 12px; }
.status-history-state--active { color: var(--bond-teal); font-weight: bold; }
.status-history-state--inactive { color: var(--bond-text-lighter); }
.status-history-meta { font-size: 12px; color: var(--bond-muted); margin-top: 6px; }
.status-history-source,
.status-history-description { font-size: 12px; color: var(--bond-muted); margin-top: 4px; white-space: pre-wrap; }
.status-history-empty { font-size: 13px; color: var(--bond-text-lighter); }
.status-history-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.status-history-item--disabled { opacity: 0.6; pointer-events: none; }
.status-history-edit { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--bond-border); }
.status-history-edit-field { display: flex; flex-direction: column; font-size: 12px; color: var(--bond-muted); gap: 4px; }
.status-history-edit-field input { padding: 6px 8px; border-radius: 4px; border: 1px solid var(--bond-border-light); font-size: 13px; }
.status-history-edit-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.status-history-edit-btn { padding: 6px 14px; border-radius: 4px; border: none; background: var(--bond-teal); color: white; font-size: 13px; cursor: pointer; }
.status-history-edit-btn--secondary { background: var(--bond-border-light); color: var(--bond-text); }

/* モバイル向けレスポンシブ対応 */
@media (max-width: 768px) {
  .app-header {
    padding: 10px 12px;
  }
  
  main {
    padding: 8px;
  }
  
  .home-hero {
    padding: 12px;
    font-size: 14px;
  }
  
  .status-management {
    gap: 16px;
  }
  
  .status-management-pane {
    padding: 12px;
  }
  
  #modal {
    width: 95%;
    padding: 12px;
  }
  .modal-header { flex-direction: column; align-items: stretch; }
  .modal-header-actions { justify-content: flex-start; }

  
  .list li {
    padding: 10px;
  }
  
  button.primary,
  button.danger-btn,
  .secondary {
    width: 100%;
    margin-right: 0;
    margin-bottom: 8px;
  }
  
  .home-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .list-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .list-toolbar select {
    width: 100%;
  }
}

/* タッチ操作の最適化 */
button,
.list li,
.tab-btn,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* スクロールの改善 */
.page-nav,
.status-list,
#modal {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--bond-muted) transparent;
}

.page-nav::-webkit-scrollbar,
.status-list::-webkit-scrollbar,
#modal::-webkit-scrollbar {
  height: 4px;
  width: 4px;
}

.page-nav::-webkit-scrollbar-thumb,
.status-list::-webkit-scrollbar-thumb,
#modal::-webkit-scrollbar-thumb {
  background: var(--bond-muted);
  border-radius: 4px;
}

/* ローカルタブナビゲーション */
.local-nav {
  display: flex;
  border-bottom: 1px solid var(--bond-muted);
  margin-bottom: 1rem;
}

.local-tab-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--bond-text);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.local-tab-btn:hover {
  color: var(--bond-teal);
}

.local-tab-btn.active {
  color: var(--bond-teal);
  border-bottom-color: var(--bond-teal);
}

.local-tab-content {
  display: none;
}

.local-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 登録者履歴サマリー */
.history-summary {
  background: white;
  border: 1px solid var(--bond-muted);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.summary-current,
.summary-diff {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-label {
  font-size: 0.875rem;
  color: var(--bond-text-muted);
}

.summary-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--bond-text);
}

.summary-diff .summary-value.positive {
  color: var(--bond-teal);
}

.summary-diff .summary-value.negative {
  color: var(--bond-red);
}

/* グラフカードのコンテナ */
.chart-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 0.5rem;
}

/* Canvasサイズ固定 */
.follower-chart-canvas {
  width: 100% !important;
  height: 300px !important;
  max-height: 300px;
}

/* ヘッダー調整 */
.chart-controls {
  display: flex;
  align-items: center;
}

footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 0.5em 0;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 10;
  min-height: 2em;
}

/* スマホ（768px以下）ではフッターの固定を解除 */
@media (max-width: 768px) {
  footer {
    position: static;
    margin-top: auto;
  }

  main {
    padding-bottom: 0;
  }
}
