  :root {
    --bg: #fdffff;
    --card: #ffffff;
    --text: #2c2c2c;
    --muted: #666;
    --accent: #046d97;
    --border: #b8c1bf;
    --radius: 12px;
  }

  body.name { --accent: #046d97; --accent-dark: #028d71; }
  body.tango { --accent: #967505; --accent-dark: #6e5503; }
  body.quiz { --accent: #900596; --accent-dark: #6d0370; }

  color-1 { color: #046d97; }
  color-2 { color: #967505; }
  color-q { color: #900596; }


  * { box-sizing: border-box; }
  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
  }
  header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  header h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
  }
  header p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
  }
  .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
  }
  /* Filters - compact */
  .filters {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 16px;
  }
  .filter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }
  .filter-header h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
  }
  .active-filters {
    font-size: 0.8rem;
    color: var(--accent);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .active-filters span {
    background: #f0ebe5;
    padding: 2px 6px;
    border-radius: 4px;
  }
  .filter-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
  }
  .filter-label-btn {
    background: none;
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text);
  }
  .filter-label-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
  }
  .filter-input-row {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
  }
  .filter-input-row.show {
    display: flex;
  }
  .filter-input-row select {
    flex: 1;
    min-width: 140px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
  }
  .action-btns {
    display: flex;
    gap: 6px;
  }
  .action-btns button {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
  }
  .search-btn {
    background: var(--accent);
    color: #fff;
    border: none;
  }
  .reset-btn {
    background-color: rgb(243, 235, 235);
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: 800;
    color: #d05a5a;
    border: 1px solid var(--border);
  }
  .cocktail-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 0.9rem;
  }
  .controls input[type="text"] {
    flex: 1;
    min-width: 140px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
  }
  .sort-btns button {
    padding: 4px 8px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
  }
  .no-result {
    text-align: center;
    color: var(--muted);
    padding: 24px 0;
    font-size: 0.95rem;
  }
  .card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid transparent;
  }
  .title-area { flex: 1; }
  .badge {
    display: inline-block;
    background: #e8f2f5;
    color: var(--accent);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
    white-space: nowrap;
  }
  .card-body {
    display: none;
    padding: 10px 12px;
  }
  .info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: 8px;
  }
  .info-table th {
    text-align: left;
    width: 28%;
    color: var(--muted);
    font-weight: normal;
    padding: 2px 0;
    vertical-align: top;
  }
  .info-table td { padding: 2px 0; }
  .section {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
  }
  .section h4 {
    margin: 0 0 3px;
    font-size: 0.88rem;
  }
  .section p { margin: 0 0 4px; font-size: 0.88rem; line-height: 1.4; }
  .pill-link {
    display: inline-block;
    background: #f4fcff;
    /* color: var(--accent); */
    color: #032649;
    border-radius: 12px;
    border: 0.5px solid #9bcadc;
    padding: 2px 8px;
    margin: 2px 2px 2px 0;
    font-size: 0.82rem;
    text-decoration: none;
  }
  .cocktail-google-btn {
    display: inline-block;
    margin-top: 4px;
    margin-right: 6px;
    padding: 4px 10px;
    font-size: 0.78rem;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #a7b3c6;
  }

  .cocktail-link-btn {
    display: inline-block;
    margin-top: 4px;
    margin-right: 6px;
    padding: 4px 10px;
    font-size: 0.78rem;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    background: #e2e6eb;
    color: #646c7a;
    border: 1px solid #4e5051;
  }

  .cocktail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid transparent;
  }
  .card-header.open { border-bottom-color: var(--border); }
  .glass-icon {
    width: 48px;
    height: 64px;
    flex-shrink: 0;
  }
  .title-area h3 {
    margin: 0;
    font-size: 1.05rem;
  }
  .title-area .en {
    font-size: 0.8rem;
    color: var(--muted);
  }
  .badge {
    display: inline-block;
    background: #f0ebe5;
    color: var(--accent);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
  }
  .card-body {
    display: none;
    padding: 14px;
  }
  .card-body.open { display: block; }
  .info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 12px;
  }
  .info-table th {
    text-align: left;
    width: 30%;
    color: var(--muted);
    font-weight: normal;
    padding: 3px 0;
    vertical-align: top;
  }
  .info-table td { padding: 3px 0; }
  .section {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
  }
  .section h4 {
    margin: 0 0 4px;
    font-size: 0.9rem;
  }
  .section p { margin: 0 0 6px; font-size: 0.9rem; line-height: 1.4; }
  .source-btn, .google-btn, .wordbook-link {
    display: inline-block;
    margin-top: 6px;
    margin-right: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
  }
  .source-btn {
    background: #f5f5f5;
    border: 1px solid var(--border);
    color: var(--text);
  }
  .google-btn {
    background: #4285f4;
    color: #fff;
    border: none;
  }
  .wordbook-link {
    color: var(--accent);
    text-decoration: underline;
  }
  .hidden { display: none !important; }
  .count {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 8px;
  }
/* 検索欄の幅調整（スマホでソートボタンが改行されないように） */
.count-row, .list-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
#search-input {
  flex: 1 1 auto;
  max-width: 180px;
  min-width: 100px;
}
@media (max-width: 480px) {
  #search-input {
    max-width: 120px;
  }
}

