/* =========================================================
   GSC Priority Tool CSS
   common.css 読み込み前提の個別上書き
   目的:
   - PC/スマホで見やすい
   - common.css の影響で全体が縮小して見える現象を防ぐ
   - テーブルはページ全体を縮めず、表だけ横スクロール
========================================================= */

/* -------------------------
   0) Safety
------------------------- */
.tp-container,
.tp-card,
.tp-local-grid,
.tp-local-row,
.tp-local-row > *,
.tp-toolbar,
.tp-toolbar__row,
.tp-toolbar__left,
.tp-toolbar__right,
.tp-local-kpi,
.tp-stickySummary,
.tp-stickySummary__grid,
.tp-stickySummary__item,
.gsc-guideGrid,
.gsc-guideCard,
.gsc-mainCell,
.gsc-resultTabs,
.gsc-resultTab {
  min-width: 0;
}

/* -------------------------
   1) Guide / Intro
------------------------- */
.gsc-guideGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gsc-guideCard {
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fbfcfd;
}

.gsc-guideCard__title {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.5;
}

.gsc-guideList,
.gsc-guideSteps {
  margin: 0;
  padding-left: 1.2em;
  color: #374151;
  line-height: 1.9;
}

.gsc-guideList li,
.gsc-guideSteps li {
  margin-bottom: 2px;
}

/* -------------------------
   2) Tabs
------------------------- */
.gsc-resultTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gsc-resultTab {
  appearance: none;
  border: 0;
  cursor: pointer;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef2f7;
  color: #1f2937;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.gsc-resultTab.is-active {
  background: var(--tp-primary, #20c997);
  color: #fff;
}

.gsc-resultTab.is-disabled {
  opacity: 0.55;
}

/* -------------------------
   3) Status / Notes
------------------------- */
.gsc-statusBox {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #f8fafc;
  color: #374151;
  line-height: 1.8;
}

.tp-local-head__top .tp-meta {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* -------------------------
   4) Grid / Cards
------------------------- */
.tp-local-grid--wide {
  grid-template-columns: 1fr;
}

.tp-card--full {
  width: 100%;
}

/* -------------------------
   5) Table
------------------------- */
.tp-local-tableWrap,
.tp-tableWrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gsc-table {
  min-width: 980px;
}

.gsc-mainCell {
  max-width: 420px;
}

.gsc-query {
  font-weight: 700;
  color: #111827;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gsc-page,
.gsc-action,
.gsc-sub {
  margin-top: 6px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* -------------------------
   6) Chips / Reasons
------------------------- */
.gsc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.gsc-chip-push {
  background: #d1fae5;
  color: #065f46;
}

.gsc-chip-ctr {
  background: #fef3c7;
  color: #92400e;
}

.gsc-chip-decline {
  background: #ffe4e6;
  color: #9f1239;
}

.gsc-chip-watch {
  background: #e5e7eb;
  color: #374151;
}

.gsc-reason {
  display: inline-flex;
  margin: 0 6px 6px 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gsc-empty {
  padding: 28px 16px !important;
  color: #6b7280;
}

/* -------------------------
   7) Desktop wide result section
------------------------- */
@media (min-width: 721px) {
  .tp-local-grid > .tp-card:nth-child(3) {
    grid-column: 1 / -1;
  }
}

/* -------------------------
   8) Tablet
------------------------- */
@media (max-width: 767px) {
  .tp-container {
    width: calc(100% - 24px);
    padding: 14px 0;
  }

  .tp-card {
    padding: 14px;
    border-radius: 16px;
  }

  .tp-local-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tp-local-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .tp-local-head__top {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
  }

  .tp-local-head__top .tp-badge,
  .tp-local-head__top .tp-meta {
    max-width: 100%;
  }

  .tp-h1 {
    font-size: 18px;
    line-height: 1.35;
  }

  .tp-lede,
  .tp-sub,
  .tp-help {
    font-size: 12px;
    line-height: 1.75;
  }

  .tp-local-kpi {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .tp-kpi {
    padding: 12px;
  }

  .tp-kpi__label {
    font-size: 11px;
  }

  .tp-kpi__value {
    font-size: 16px;
  }

  .tp-stickySummary {
    top: 8px;
  }

  .tp-stickySummary__grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
  }

  .tp-stickySummary__item {
    padding: 8px;
    border-radius: 12px;
  }

  .tp-stickySummary__label {
    font-size: 10px;
  }

  .tp-stickySummary__val {
    font-size: 14px;
    margin-top: 4px;
  }

  .gsc-guideGrid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gsc-guideCard {
    padding: 14px;
    border-radius: 14px;
  }

  .gsc-guideCard__title {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.45;
  }

  .gsc-guideList,
  .gsc-guideSteps {
    padding-left: 1.1em;
    font-size: 13px;
    line-height: 1.8;
  }

  .gsc-resultTabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .gsc-resultTab {
    flex: 1 1 calc(50% - 3px);
    min-width: 0;
    min-height: 40px;
    padding: 9px 10px;
    font-size: 12px;
    text-align: center;
    justify-content: center;
    white-space: normal;
    line-height: 1.35;
  }

  .gsc-statusBox {
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.7;
  }

  .gsc-mainCell {
    max-width: 220px;
  }

  .gsc-query {
    font-size: 13px;
    line-height: 1.6;
  }

  .gsc-page,
  .gsc-action,
  .gsc-sub {
    font-size: 10px;
    line-height: 1.55;
  }

  .gsc-chip,
  .gsc-reason {
    font-size: 10px;
    line-height: 1.4;
    padding: 5px 8px;
  }

  .tp-table {
    min-width: 720px;
  }

  .gsc-table {
    min-width: 720px;
  }

  .gsc-empty {
    padding: 22px 12px !important;
    font-size: 14px;
    line-height: 1.7;
  }
}

/* -------------------------
   9) Small mobile
------------------------- */
@media (max-width: 480px) {
  .tp-container {
    width: calc(100% - 20px);
  }

  .tp-card {
    padding: 12px;
  }

  .tp-local-kpi {
    grid-template-columns: 1fr;
  }

  .tp-stickySummary__grid {
    grid-template-columns: 1fr 1fr;
  }

  .gsc-guideCard {
    padding: 12px;
  }

  .gsc-guideCard__title {
    font-size: 15px;
  }

  .gsc-guideList,
  .gsc-guideSteps {
    font-size: 13px;
    line-height: 1.75;
  }

  .gsc-resultTabs {
    gap: 6px;
  }

  .gsc-resultTab {
    flex: 1 1 100%;
    min-height: 40px;
    padding: 9px 10px;
    font-size: 12px;
  }

  .gsc-mainCell {
    max-width: 180px;
  }

  .gsc-query {
    font-size: 13px;
  }

  .gsc-page,
  .gsc-action,
  .gsc-sub {
    font-size: 10px;
  }

  .gsc-chip,
  .gsc-reason {
    font-size: 10px;
  }

  .tp-table {
    min-width: 680px;
  }

  .gsc-table {
    min-width: 680px;
  }
}

.gsc-lead{
  font-size:15px;
  line-height:1.8;
  color:#334155;
}

.gsc-introBox{
  padding:14px 16px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  background:#f8faf8;
}

.gsc-introBox__title{
  margin:0 0 8px;
  font-size:14px;
  font-weight:700;
}

.gsc-introBox__list{
  margin:0;
  padding-left:1.2em;
}

.gsc-introBox__list li + li{
  margin-top:6px;
}

.gsc-sampleGuide{
  padding:14px 16px;
  border:1px dashed rgba(0,0,0,.16);
  border-radius:14px;
  background:#fffdf5;
}

.gsc-sampleGuide__title{
  margin:0 0 6px;
  font-size:14px;
  font-weight:700;
}

.gsc-sampleGuide__text{
  margin:0;
  font-size:14px;
  line-height:1.7;
}

.gsc-note{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background:#f6f7f8;
  font-size:13px;
  line-height:1.7;
  color:#444;
}

.gsc-emptyBox{
  padding:24px 18px;
  border:1px dashed rgba(0,0,0,.14);
  border-radius:14px;
  background:#fafafa;
}

.gsc-emptyBox__title{
  margin:0 0 6px;
  font-size:15px;
  font-weight:700;
}

.gsc-emptyBox__text{
  margin:0;
  color:#555;
  line-height:1.7;
}

.gsc-sectionHead{
  gap:12px;
  align-items:flex-start;
}

.gsc-kpiGrid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.gsc-kpiGrid .tp-kpi{
  min-height:88px;
}

.tp-inlineHelp{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  margin-left:6px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.18);
  font-size:11px;
  font-weight:700;
  line-height:1;
  color:#444;
  background:#fff;
  cursor:help;
  vertical-align:middle;
}

.tp-btn--sm{
  min-width:96px;
  padding:.55em .95em;
  font-size:13px;
  white-space:nowrap;
}

.tp-label{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  font-size:13px;
  line-height:1.5;
}

.tp-local-row{
  gap:18px;
}

.tp-local-row .tp-help{
  margin-top:6px;
}

@media (min-width: 720px){
  .gsc-kpiGrid{
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:14px;
  }
}

@media (max-width: 720px){
  .tp-label{
    font-size:12px;
    gap:5px;
  }

  .tp-inlineHelp{
    width:17px;
    height:17px;
    font-size:10px;
  }
}
