.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.btn:hover {
  background: var(--accent-2);
  color: var(--accent-contrast);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent-2);
}

.btn-copy {
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}

.chip:hover,
.chip.is-active {
  border-color: var(--accent);
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-elev));
}

.chip-quiet { opacity: 0.85; font-size: 0.75rem; }
.chip-row { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }

.card-list {
  list-style: none;
  padding: 0;
  margin: 0 0 3rem;
  display: grid;
  gap: 0.75rem;
}

.card-link {
  display: grid;
  gap: 0.35rem;
  padding: 1.05rem 1.15rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease), background 0.15s var(--ease);
}

.card-link:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.table-wrap { overflow-x: auto; margin-bottom: 3rem; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th,
.data-table td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
.data-table a { color: var(--accent-2); }

.admin-form { display: grid; gap: 0.85rem; max-width: 36rem; }
.admin-form label { display: grid; gap: 0.35rem; font-size: 0.9rem; }
.admin-form input,
.admin-form textarea,
.admin-form select,
.calc-grid input,
.calc-grid select {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.calc-grid input:focus,
.calc-grid select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.empty-state {
  background: var(--bg-elev);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin: 1rem 0 2rem;
  text-align: center;
}

.empty-state-title { margin: 0 0 0.35rem; font-weight: 600; }

.ads,
.ad-slot {
  margin: 1.25rem 0;
  padding: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  min-height: 2.5rem;
  overflow: hidden;
}

.ad-slot--live,
.ads.ad-slot--live {
  border-style: solid;
  border-color: var(--line);
  padding: 0.5rem;
  color: inherit;
}

.ads[data-ad-slot="header"] { min-height: 90px; }
.ads[data-ad-slot="center"],
.ads[data-ad-slot="detail"],
.ads[data-ad-slot="inArticle"] { min-height: 250px; }
.ads[data-ad-slot="multiplex"] { min-height: 280px; }

/* Sticky box — clasher_sticky */
.ad-sticky {
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 1040;
  box-sizing: border-box;
  width: auto;
  max-width: calc(100vw - 16px);
  padding: 30px 10px 12px;
  background: var(--bg-elev, #fff);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 28px -6px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: none;
}

.ad-sticky.is-loading {
  display: block;
  visibility: hidden;
}

.ad-sticky.is-shown {
  display: block;
  visibility: visible;
}

.ad-sticky__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 320px;
  min-height: 110px;
  overflow: hidden;
  line-height: 0;
}

.ad-sticky__slot iframe {
  display: block;
  border: 0;
}

.ad-sticky__label {
  position: absolute;
  top: 9px;
  left: 12px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #999);
  pointer-events: none;
}

.ad-sticky__close {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.ad-sticky__close:hover {
  background: rgba(0, 0, 0, 0.78);
}

@media (min-width: 1024px) {
  .ad-sticky {
    right: 16px;
    bottom: 16px;
    max-width: calc(100vw - 32px);
  }
  .ad-sticky__slot {
    min-width: 400px;
    min-height: 300px;
  }
}

.faq-list {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.faq-item dt {
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.faq-item dd {
  margin: 0;
  color: var(--muted);
}

.codes-period {
  font-weight: 500;
  font-size: 0.85em;
}

.tag { font-size: 0.75rem; opacity: 0.6; margin-left: 0.35rem; }
.fine { opacity: 0.75; font-size: 0.82rem; line-height: 1.5; }
.muted { color: var(--muted); }
.error { color: var(--danger); }

.guide-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  align-items: center;
}

.guide-search input[type="search"] {
  flex: 1 1 14rem;
  min-width: 12rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.guide-search input[type="search"]:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
