:root {
  --bg: #12110f;
  --panel: #1d1b18;
  --panel-strong: #25221e;
  --line: #373027;
  --text: #f4efe6;
  --muted: #b7aa99;
  --dim: #817565;
  --gold: #d6a84b;
  --teal: #4fb7a9;
  --red: #e26d5a;
  --green: #7bbf6a;
  --focus: rgba(79, 183, 169, 0.28);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --surface: #171512;
  --surface-2: #141311;
  --surface-3: #0f0e0d;
  --hover: #201d18;
  --panel-bg: rgba(29, 27, 24, 0.92);
  --on-accent: #15110b;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4efe4;
  --panel: #ffffff;
  --panel-strong: #efe8db;
  --line: #ddd3c1;
  --text: #221d15;
  --muted: #6d6456;
  --dim: #9a8f7c;
  --gold: #b07e26;
  --teal: #2c8578;
  --red: #c44a37;
  --green: #4b942f;
  --focus: rgba(44, 133, 120, 0.3);
  --shadow: 0 12px 34px rgba(80, 64, 34, 0.14);
  --surface: #ffffff;
  --surface-2: #f6f1e8;
  --surface-3: #ece4d6;
  --hover: #f0e8d7;
  --panel-bg: rgba(255, 255, 255, 0.9);
  --on-accent: #15110b;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(214, 168, 75, 0.1), transparent 34%),
    radial-gradient(circle at 88% 4%, rgba(79, 183, 169, 0.12), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family:
    "Segoe UI",
    "Yu Gothic UI",
    "Meiryo",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

h3 {
  margin-bottom: 10px;
  font-size: 0.98rem;
}

.topbar-actions,
.panel-heading,
.list-stats,
.tag-row,
.meta-row,
.action-row {
  display: flex;
  align-items: center;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tool-button,
.ghost-button,
.primary-button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--panel-strong);
}

.tool-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--text);
}

.tool-button span:first-child {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--on-accent);
  background: var(--gold);
  border-radius: 5px;
  font-weight: 900;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.workspace {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.control-panel,
.matchup-list-panel,
.tips-panel,
.editor-panel {
  border: 1px solid var(--line);
  background: var(--panel-bg);
  border-radius: 8px;
}

.control-panel {
  padding: 14px;
}

.filter-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.filter-actions #clearFilterButton {
  margin-left: auto;
}

.sort-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.sort-field select {
  height: 36px;
}

.ghost-button.active {
  border-color: var(--gold);
  color: var(--gold);
}

.field-grid,
.compact-grid {
  display: grid;
  gap: 10px;
}

.field-grid {
  grid-template-columns: 130px minmax(150px, 1fr) minmax(150px, 1fr) minmax(220px, 1.2fr);
}

.compact-grid {
  grid-template-columns: 1fr 1fr;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  background: var(--surface-2);
  color: var(--text);
}

input,
select {
  height: 40px;
  padding: 0 11px;
}

textarea {
  resize: vertical;
  min-height: 72px;
  padding: 10px 11px;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--focus);
}

.champion-picker {
  position: relative;
}

.champion-input-wrap {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 3px 8px 3px 3px;
}

.champion-input-wrap:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--focus);
}

.champion-input-wrap input {
  height: 34px;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.picker-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
}

.champion-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 12;
  display: none;
  max-height: 320px;
  overflow: auto;
  border: 1px solid rgba(214, 168, 75, 0.46);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 6px;
}

.champion-results.open {
  display: grid;
  gap: 4px;
}

.champion-option {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.champion-option:hover,
.champion-option:focus-visible {
  border-color: rgba(79, 183, 169, 0.5);
  background: var(--hover);
}

.champion-option span:last-child {
  display: grid;
  gap: 1px;
}

.champion-option small,
.champion-option-empty {
  color: var(--muted);
}

.champion-option-empty {
  padding: 10px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(380px, 1.55fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: start;
}

.matchup-list-panel,
.tips-panel,
.editor-panel {
  min-height: 620px;
  padding: 14px;
}

.panel-heading {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ghost-button,
.primary-button,
.icon-button {
  min-height: 36px;
  padding: 0 12px;
  font-weight: 800;
}

.ghost-button {
  color: var(--muted);
}

.primary-button {
  min-height: 44px;
  border-color: rgba(214, 168, 75, 0.5);
  background: linear-gradient(135deg, #d6a84b, #9b6f22);
  color: var(--on-accent);
}

.icon-button {
  width: 38px;
  padding: 0;
  color: var(--on-accent);
  background: var(--gold);
  font-size: 1.3rem;
}

.list-stats {
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.78rem;
}

.matchup-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 532px;
  overflow: auto;
  padding-right: 2px;
}

.matchup-card {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.matchup-card:hover,
.matchup-card.active {
  border-color: rgba(214, 168, 75, 0.72);
  background: var(--hover);
}

.matchup-card.rating-good {
  border-left: 4px solid var(--green);
}

.matchup-card.rating-even {
  border-left: 4px solid var(--gold);
}

.matchup-card.rating-bad {
  border-left: 4px solid var(--red);
}

.matchup-card.rating-test {
  border-left: 4px solid var(--dim);
}

.difficulty-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.difficulty-meter {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}

.meter-seg {
  width: 8px;
  height: 6px;
  border-radius: 2px;
  background: var(--line);
}

.d-low .meter-seg.on {
  background: var(--green);
}

.d-mid .meter-seg.on {
  background: var(--gold);
}

.d-high .meter-seg.on {
  background: var(--red);
}

.card-fav {
  margin-left: auto;
  color: var(--dim);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition:
    color 120ms ease,
    transform 120ms ease;
}

.card-fav:hover,
.card-fav:focus-visible {
  color: var(--gold);
  transform: scale(1.15);
  outline: none;
}

.card-fav.on {
  color: var(--gold);
}

.champion-row {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
}

.champion-mark {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(214, 168, 75, 0.34);
  border-radius: 6px;
  color: var(--gold);
  background: var(--surface-3);
  font-size: 0.88rem;
  font-weight: 900;
}

.champion-avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.champion-avatar span {
  position: relative;
  z-index: 0;
}

.picker-mark {
  width: 28px;
  height: 28px;
  font-size: 0.74rem;
}

.option-mark {
  width: 38px;
  height: 38px;
}

.title-mark {
  width: 58px;
  height: 58px;
  font-size: 1rem;
}

.versus {
  text-align: center;
  color: var(--dim);
  font-size: 0.74rem;
  font-weight: 900;
}

.card-title {
  display: grid;
  gap: 2px;
}

.card-title strong {
  font-size: 0.95rem;
}

.card-title span {
  color: var(--muted);
  font-size: 0.76rem;
}

.tag-row,
.meta-row,
.action-row {
  flex-wrap: wrap;
  gap: 7px;
}

.tag,
.rating,
.lane-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.lane-badge {
  color: var(--on-accent);
  background: var(--teal);
  border-color: transparent;
}

.rating.good {
  color: #10150f;
  background: var(--green);
  border-color: transparent;
}

.rating.even {
  color: var(--on-accent);
  background: var(--gold);
  border-color: transparent;
}

.rating.bad {
  color: #1d0c08;
  background: var(--red);
  border-color: transparent;
}

.rating.test {
  color: var(--text);
  background: #4c4540;
}

.tips-hero {
  display: grid;
  gap: 14px;
}

.tips-header {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tips-title {
  display: grid;
  gap: 6px;
}

.champion-title {
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
}

.tips-title h2 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.summary {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.tips-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--surface);
}

.info-block p,
.info-block li {
  color: var(--muted);
  line-height: 1.65;
}

.info-block ul {
  margin: 0;
  padding-left: 18px;
}

.timeline {
  display: grid;
  gap: 8px;
}

.timing-item {
  display: grid;
  gap: 4px;
  border-left: 3px solid var(--teal);
  padding: 2px 0 2px 10px;
}

.timing-item strong {
  color: var(--text);
}

.rule-list {
  display: grid;
  gap: 8px;
}

.rule-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.rule-item strong {
  color: var(--gold);
}

.build-list {
  display: grid;
  gap: 8px;
}

.build-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: var(--surface-2);
}

.build-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
}

.build-head span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.build-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.build-items span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: var(--surface-3);
  font-size: 0.76rem;
}

.build-card p {
  margin: 0;
}

.rune-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.rune-keystone {
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.82rem;
}

.rune-tree {
  color: var(--muted);
  font-size: 0.8rem;
}

.rune-shards {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.spell-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.spell-badge {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  font-weight: 600;
  font-size: 0.82rem;
  background: var(--surface-2, rgba(127, 127, 127, 0.08));
}

.spell-second {
  border-color: var(--gold);
  color: var(--gold);
}

.spell-plus {
  color: var(--muted);
  font-size: 0.8rem;
}

.tip-form {
  display: grid;
  gap: 10px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: 20px;
  text-align: center;
}

.empty-state div {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.empty-state p {
  color: var(--muted);
  line-height: 1.7;
}

.empty-mini {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: var(--surface);
}

.empty-mini p {
  margin: 0;
  line-height: 1.6;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  border: 1px solid rgba(79, 183, 169, 0.5);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: 1fr 1.25fr;
  }

  .editor-panel {
    grid-column: 1 / -1;
    min-height: auto;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 10px;
  }

  .topbar,
  .field-grid,
  .content-grid,
  .tips-layout,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .tool-button {
    justify-content: center;
    flex: 1 1 140px;
  }

  .matchup-list-panel,
  .tips-panel {
    min-height: auto;
  }

  .matchup-list {
    max-height: 360px;
  }

  .champion-title {
    grid-template-columns: 46px 1fr 46px;
  }

  .title-mark {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 8px;
  }

  .topbar {
    padding: 12px;
  }

  h1 {
    font-size: 1.4rem;
  }

  .tool-button {
    flex: 1 1 calc(50% - 4px);
    min-height: 40px;
    padding: 0 8px;
  }

  .filter-actions > * {
    flex: 1 1 100%;
  }

  .filter-actions #clearFilterButton {
    margin-left: 0;
  }

  .sort-field select {
    width: 100%;
  }

  .matchup-list {
    max-height: 300px;
  }

  .tips-title h2 {
    font-size: 1.25rem;
  }
}

/* ===== ADC相性ヒートマップ ===== */
.heatmap-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}
.heatmap-overlay[hidden] {
  display: none;
}
.heatmap-modal {
  width: min(1100px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.heatmap-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.82rem;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend-item .chip {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}
.chip.rating-good { background: var(--green); }
.chip.rating-even { background: var(--gold); }
.chip.rating-bad { background: var(--red); }
.heatmap-hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}
.heatmap-scroll {
  overflow: auto;
  flex: 1;
}
.heatmap-grid {
  display: grid;
  gap: 3px;
  min-width: max-content;
}
.hm-corner,
.hm-col-head,
.hm-row-head,
.hm-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hm-corner {
  font-size: 0.7rem;
  color: var(--dim);
}
.hm-col-head {
  flex-direction: column;
  gap: 2px;
  font-size: 0.62rem;
  color: var(--muted);
  padding-bottom: 2px;
  text-align: center;
  line-height: 1.05;
}
.hm-row-head {
  gap: 6px;
  justify-content: flex-start;
  font-size: 0.72rem;
  color: var(--text);
  padding-right: 8px;
  white-space: nowrap;
}
.hm-col-head .champion-mark,
.hm-row-head .champion-mark {
  width: 26px;
  height: 26px;
}
.hm-cell {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--on-accent);
  transition: transform 0.08s ease, filter 0.08s ease;
}
.hm-cell:hover {
  transform: scale(1.08);
  filter: brightness(1.12);
  z-index: 1;
}
.hm-cell.rating-good { background: var(--green); }
.hm-cell.rating-even { background: var(--gold); }
.hm-cell.rating-bad { background: var(--red); }
.hm-cell.hm-self {
  background: var(--surface-3);
  color: var(--dim);
  cursor: default;
}
.hm-cell.hm-self:hover {
  transform: none;
  filter: none;
}
.hm-cell.hm-active {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}

@media (max-width: 640px) {
  .heatmap-modal { padding: 14px; }
  .hm-cell { width: 38px; height: 38px; font-size: 0.72rem; }
  .hm-col-head .champion-mark,
  .hm-row-head .champion-mark { width: 22px; height: 22px; }
  .hm-row-head { font-size: 0.62rem; }
}

.heatmap-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hm-tab {
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.hm-tab:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.hm-tab.active {
  color: var(--on-accent);
  background: var(--gold);
  border-color: var(--gold);
}
.heatmap-summary {
  font-size: 0.78rem;
  color: var(--muted);
}
.heatmap-summary.has-conflict {
  color: var(--red);
  font-weight: 600;
}
.heatmap-empty {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 24px 4px;
  margin: 0;
}
.chip.chip-empty {
  background: var(--surface-3);
  border: 1px solid var(--line);
}
.hm-cell.hm-empty {
  background: var(--surface-3);
  border: 1px dashed var(--line);
  color: var(--dim);
  font-weight: 400;
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0.55;
}
.hm-cell.hm-empty:hover {
  transform: scale(1.08);
  filter: none;
  opacity: 1;
  color: var(--gold);
  border-color: var(--gold);
  border-style: solid;
}

.editor-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.data-error {
  padding: 24px;
  color: var(--text);
}
.data-error h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--red);
}
.data-error p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}
.data-error code {
  padding: 2px 6px;
  background: var(--surface-3);
  border-radius: 4px;
  font-size: 0.85em;
}
.data-error pre {
  margin: 10px 0;
  padding: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.82rem;
  color: var(--text);
}

/* ===== パッチ入力（トップバー） ===== */
.patch-field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
  color: var(--muted);
}
.patch-field input {
  width: 62px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 2px 0;
}
.patch-field input:focus {
  outline: none;
}
.patch-field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--focus);
}

/* ===== 試合ログ ===== */
.match-log {
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.log-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.log-head h3 {
  margin: 0;
}
.log-verdict {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.log-verdict.good {
  color: var(--green);
  border-color: var(--green);
}
.log-verdict.bad {
  color: var(--red);
  border-color: var(--red);
}
.log-verdict.even {
  color: var(--gold);
  border-color: var(--gold);
}
.log-stale {
  color: var(--gold);
  border-color: var(--gold);
}

.log-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.log-form input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
}
.log-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--focus);
}
.log-win {
  border-color: var(--green);
  color: var(--green);
}
.log-lose {
  border-color: var(--red);
  color: var(--red);
}

.log-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.log-entry {
  display: grid;
  grid-template-columns: 44px 108px 1fr 24px;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--panel);
  border-left: 3px solid var(--line);
  font-size: 12px;
}
.log-entry.win {
  border-left-color: var(--green);
}
.log-entry.lose {
  border-left-color: var(--red);
}
.log-result {
  font-weight: 700;
}
.log-entry.win .log-result {
  color: var(--green);
}
.log-entry.lose .log-result {
  color: var(--red);
}
.log-date {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.log-note {
  color: var(--text);
  overflow-wrap: anywhere;
}
.log-delete {
  border: none;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px;
}
.log-delete:hover {
  color: var(--red);
}
.log-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--dim);
}

/* 一覧カードの戦績バッジ */
.log-badge.good {
  color: var(--green);
  border-color: var(--green);
}
.log-badge.bad {
  color: var(--red);
  border-color: var(--red);
}
.log-badge.even {
  color: var(--gold);
  border-color: var(--gold);
}

@media (max-width: 640px) {
  .log-entry {
    grid-template-columns: 40px 1fr 24px;
  }
  .log-date {
    grid-column: 2;
  }
  .log-note {
    grid-column: 1 / -1;
  }
}

.list-more {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
}

/* ===== 自動生成tipの潰し込み ===== */
.gen-tag {
  color: var(--gold);
  border-color: var(--gold);
}

.gen-progress {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.gen-progress.done {
  color: var(--green);
}

.gen-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px dashed var(--gold);
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}
.gen-notice > div {
  flex: 1 1 260px;
  min-width: 0;
}
.gen-notice strong {
  display: block;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 4px;
}
.gen-notice p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.gen-notice .ghost-button {
  border-color: var(--gold);
  color: var(--gold);
  white-space: nowrap;
}

.conflict-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--red);
  border-radius: 12px;
  background: color-mix(in srgb, var(--red) 10%, transparent);
}
.conflict-notice > div {
  flex: 1 1 260px;
  min-width: 0;
}
.conflict-notice strong {
  display: block;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 4px;
}
.conflict-notice p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.conflict-notice .ghost-button {
  border-color: var(--red);
  color: var(--red);
  white-space: nowrap;
}
