:root {
  color-scheme: light;
  --bg: #f6faf7;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f7f3;
  --line: #d7e5dc;
  --line-soft: #e6f0ea;
  --text: #102019;
  --muted: #52645a;
  --faint: #5c6e64;
  --action: #0b7a53;
  --action-strong: #086341;
  --success: #1f7a4d;
  --warning: #b45309;
  --danger: #b91c1c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 16px 40px rgba(16, 32, 25, 0.08);
  --max: 1200px;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Hiragino Kaku Gothic ProN",
    "Noto Sans JP",
    sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 15% -10%, rgba(11, 122, 83, 0.08), transparent 60%),
    linear-gradient(180deg, #fbfdfb, var(--bg));
}

a {
  color: var(--action);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(246, 250, 247, 0.88);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}

.brand-name {
  line-height: 1;
}

.brand-reading {
  color: var(--muted);
  font-size: 0.62em;
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1;
}

.name-reading {
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e8f5ee;
  color: var(--action);
  font-size: 20px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
}
.nav a {
  color: var(--muted);
}
.nav-sep {
  display: inline-block;
  width: 1px;
  height: 1rem;
  background: var(--line);
  flex-shrink: 0;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  line-height: 1.2;
}
.lang-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.lang-switch a[aria-current="page"] {
  color: var(--text);
}
.lang-switch a:hover {
  color: var(--text);
  border-color: var(--line);
  text-decoration: none;
}
.form-card > .lang-switch {
  display: flex;
  margin-bottom: 4px;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav a.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--action), var(--action-strong));
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    transform 120ms ease,
    filter 120ms ease;
}
.nav a.nav-cta:hover {
  color: #ffffff;
  filter: brightness(1.06);
  text-decoration: none;
}
.nav a.nav-cta:active {
  transform: translateY(1px);
}
.nav a.nav-cta:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

/* dashboard の nav は項目が多い。文字を折らず、幅が足りないときは項目ごと折り返す。 */
.dash-header .brand {
  flex-shrink: 0;
  white-space: nowrap;
}
.dash-header .nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  gap: 4px;
  font-size: 0.85rem;
}
.dash-header .nav a {
  flex-shrink: 0;
  min-height: 36px;
  padding: 6px;
  line-height: 1.2;
  white-space: nowrap;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 22px 88px;
}

h1,
h2,
h3,
.brand {
  font-family:
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Hiragino Kaku Gothic ProN",
    "Noto Sans JP",
    sans-serif;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}

p {
  margin: 0 0 14px;
  color: #3c4f46;
}
.lead {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 62ch;
}
.muted,
.note {
  color: var(--muted);
  font-size: 0.88rem;
}
.note {
  margin-top: 18px;
}
.error {
  color: var(--danger);
}
.status-banner {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.55;
}
.status-banner:empty {
  display: none;
}
.status-banner.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
}
.status-banner.note {
  margin-top: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.status-panel {
  margin: 20px 0 4px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid #a7f3d0;
  border-left: 4px solid var(--action);
  background: #ecfdf5;
  color: var(--text);
}
.status-panel-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.status-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--action);
  color: #ffffff;
}
.status-panel-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.4;
  color: #064e3b;
}
.status-ref-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #a7f3d0;
  background: #ffffff;
}
.status-ref-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}
.status-ref-code {
  display: block;
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #064e3b;
  user-select: all;
  word-break: break-all;
}
.status-ref-copy {
  width: auto;
  margin: 0;
  padding: 6px 12px;
  min-height: 34px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--action-strong);
  cursor: pointer;
}
.status-ref-copy:hover {
  background: #dff3e8;
}
.status-panel p {
  margin: 0 0 10px;
  font-size: 0.94rem;
  line-height: 1.65;
  color: #16382b;
}
.status-panel p:last-of-type {
  margin-bottom: 0;
}
.status-panel-appeal {
  font-weight: 600;
  color: #064e3b;
}
.status-panel-actions {
  margin-top: 18px;
}
.status-panel-actions button {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #a7f3d0;
  background: #ffffff;
  color: var(--action-strong);
  cursor: pointer;
}
.status-panel-actions button:hover {
  background: var(--panel-2);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
  padding: 42px 0 34px;
}
.hero-copy {
  min-width: 0;
}
.hero .actions {
  margin-top: 26px;
}
.hero-visual {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
}
.url-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.url-card code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.url-card-after {
  border-color: #bfe3cf;
  background: #f2fbf6;
}
.url-card-after code {
  color: var(--success);
  font-size: 1.25rem;
  font-weight: 700;
}
.url-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.url-chip {
  justify-self: start;
  padding: 3px 9px;
  border: 1px solid #bfe3cf;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 700;
}
.url-arrow {
  display: flex;
  justify-content: center;
  padding: 8px 0;
  color: var(--action);
}
.url-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-visual figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--action);
  background: #e8f5ee;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  white-space: nowrap;
}
.badge.active {
  color: var(--success);
  background: #e3f6eb;
  border-color: #a7e3c0;
}
.badge.paused,
.badge.pending,
.badge.verifying {
  color: var(--warning);
  background: #fef3c7;
  border-color: #fcd34d;
}
.badge.revoked,
.badge.expired,
.badge.failed,
.badge.limit_reached {
  color: var(--danger);
  background: #fdecec;
  border-color: #f5c2c2;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  font: inherit;
  cursor: pointer;
  transition:
    transform 120ms ease,
    filter 120ms ease;
}

.button {
  border: 1px solid var(--action);
  border-radius: var(--radius-sm);
  background: var(--action);
  color: #ffffff;
  font-weight: 700;
}

button {
  border: 1px solid var(--action);
  border-radius: var(--radius-sm);
  background: var(--action);
  color: #ffffff;
  font-weight: 700;
}

.button:hover,
button:hover {
  filter: brightness(1.06);
  text-decoration: none;
}
.button:active,
button:active {
  transform: translateY(1px);
}
.button.secondary,
button.secondary,
.btn-secondary {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}
.button.secondary:hover,
button.secondary:hover,
.btn-secondary:hover {
  border-color: var(--action);
  background: var(--panel-2);
  filter: none;
}
.button.danger,
button.danger,
.danger-btn,
.btn-danger,
button[data-id] {
  border-color: var(--danger);
  background: var(--panel);
  color: var(--danger);
}
.button.danger:hover,
button.danger:hover,
.danger-btn:hover,
.btn-danger:hover,
button[data-id]:hover {
  background: #fef2f2;
  filter: none;
}
.button:focus-visible,
button:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button[hidden],
.button[hidden] {
  display: none;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 28px 0;
}

.feature {
  padding: 20px;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.use-cases {
  margin-top: 16px;
}
.use-case {
  padding: 20px;
}
.use-case-label {
  color: var(--action);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.use-case h3 {
  margin-top: 8px;
}
.use-case p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty {
  color: var(--muted);
  padding: 18px 0;
}

.price-summary td:first-child {
  color: var(--muted);
}

.faq details {
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.faq details:last-child {
  border-bottom: 1px solid var(--line-soft);
}
.faq summary {
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
}
.faq summary:hover {
  color: var(--action);
}
.faq details p {
  max-width: 72ch;
  margin: 8px 0 0;
  color: var(--muted);
}

.cta-panel {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  text-align: center;
}
.cta-panel h2 {
  font-size: 1.35rem;
}
.cta-panel p {
  margin: 8px 0 18px;
  color: var(--muted);
}

.stats-panel {
  margin: 24px 0 8px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.kpi {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.kpi-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}
.kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.trend-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.trend-panel h2 {
  margin-bottom: 4px;
}
.trend-svg {
  display: block;
  width: 100%;
  height: 160px;
  margin-top: 12px;
}
.trend-bar {
  fill: var(--action);
}
.trend-baseline {
  stroke: var(--line);
  stroke-width: 1;
}
.trend-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
}
.trend-data {
  margin-top: 10px;
}
.trend-data summary {
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.quota {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.9rem;
}

.table-scroll {
  overflow-x: auto;
}
.table-scroll table {
  min-width: 520px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 14px;
}
th {
  text-align: left;
  padding: 10px 8px;
  color: var(--faint);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
tbody tr:hover {
  background: rgba(11, 122, 83, 0.04);
}
td code,
p code,
li code {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.86em;
}

pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f1f7f3;
  color: #102019;
  font-size: 0.84rem;
  line-height: 1.6;
}
pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

form {
  display: grid;
  gap: 16px;
}
/* author の display は hidden 属性の UA style に勝つので、明示的に消す。 */
form[hidden] {
  display: none;
}
label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(11, 122, 83, 0.35);
  outline-offset: 1px;
  border-color: var(--action);
}

.form-card {
  max-width: 480px;
  margin: 0 auto;
}
/* dashboard の一覧ページと同じ幅。中身はカード幅を使い、入力欄だけ上限を置く。 */
.form-card.page-wide {
  max-width: min(calc(var(--max) - 44px), calc(100% - 44px));
  margin: 44px auto 88px;
}
.form-card.page-wide input,
.form-card.page-wide select,
.form-card.page-wide textarea {
  max-width: 720px;
}
.form-card.page-wide label > input,
.form-card.page-wide label > select,
.form-card.page-wide label > textarea {
  display: block;
}
.form-card.page-wide form > button,
.page-wide form > button,
.card form > button {
  justify-self: start;
}
.section {
  margin-top: 44px;
}
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 22px 40px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 0.8rem;
}
.site-footer a {
  color: var(--faint);
  margin-right: 12px;
}
.site-footer a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .brand-reading {
    display: none;
  }
  .site-header .inner {
    padding: 12px 16px;
  }
  .nav {
    gap: 10px;
    font-size: 0.82rem;
  }
  .nav a.hide-sm {
    display: none;
  }
  .nav a.nav-cta {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
  .dash-header .nav {
    font-size: 0.82rem;
  }
  .dash-header .nav a {
    min-height: 32px;
    padding: 4px 6px;
  }
  .dash-header .nav a.hide-sm {
    display: none;
  }
}

@media (max-width: 400px) {
  .dash-header .inner {
    padding: 8px 12px;
  }
  .dash-header .nav a {
    min-height: 28px;
    padding: 2px 5px;
  }
}

@media (max-width: 640px) {
  main {
    padding: 28px 16px 64px;
  }
  .card {
    padding: 18px;
  }
  .form-card.page-wide {
    max-width: calc(100% - 32px);
    margin: 28px auto 64px;
  }
}

/* pricing */
.billing-toggle {
  display: inline-flex;
  gap: 4px;
  margin: 18px 0 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}
.billing-toggle button {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
}
.billing-toggle button.is-active {
  border-color: var(--action);
  background: var(--action);
  color: #ffffff;
}
.billing-toggle button:disabled {
  opacity: 1;
  color: var(--muted);
  cursor: not-allowed;
}
.toggle-badge {
  margin-left: 4px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.plan.featured {
  border-color: var(--action);
  box-shadow: 0 0 0 1px var(--action);
}
.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.plan h2 {
  margin: 0;
}
.plan-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--action);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}
.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  min-height: 2.4em;
  margin: 12px 0 4px;
  font-weight: 700;
}
.price-list s {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.price-launch {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.price-unit {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.plan-note {
  margin: 0 0 8px;
  color: var(--action);
  font-size: 0.85rem;
  font-weight: 650;
}
.plan-for {
  min-height: 2.8em;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
}
.plan ul {
  margin: 0 0 16px;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.plan .button {
  width: 100%;
  margin-top: auto;
}

.founding {
  padding: 14px 18px;
  margin: 18px 0;
  border: 1px solid var(--action);
  border-radius: 14px;
  background: color-mix(in srgb, var(--action) 8%, transparent);
}
.founding p {
  margin: 6px 0 0;
}

.plan-conditions {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.comparison .plan-consult {
  text-align: center;
  vertical-align: middle;
  color: var(--text);
  font-weight: 600;
  background: var(--panel-2);
}

.assurance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.assurance-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.assurance-item h3 {
  margin-top: 0;
}
.assurance-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.comparison {
  min-width: 760px;
}
.comparison th:first-child,
.comparison td:first-child {
  color: var(--muted);
  font-weight: 600;
}

.trust-line {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .assurance-grid {
    grid-template-columns: 1fr;
  }
  .price-launch {
    font-size: 1.7rem;
  }
}

.oauth-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.oauth-stack[hidden],
.oauth-btn[hidden],
.auth-divider[hidden] {
  display: none;
}
.oauth-btn {
  width: 100%;
  justify-content: center;
  gap: 10px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.copy-link-btn {
  min-width: 11.5em;
  text-align: center;
  white-space: nowrap;
}
.copy-link-btn.is-copied {
  background: #d1fae5;
  color: #0b7a53;
  border-color: #0b7a53;
}
.copy-link-btn.is-copy-error {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #b91c1c;
}
.links-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.links-toolbar input[type="search"] {
  flex: 1 1 220px;
  min-width: 0;
}
.links-toolbar select {
  flex: 0 0 auto;
}
.active-tag-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 0.85rem;
}
.active-tag-filter[hidden] {
  display: none;
}
.active-tag-filter button {
  padding: 0 6px;
  min-height: auto;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
}
.icon-btn .icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.links-table .cell-actions {
  white-space: nowrap;
}
.links-table .cell-actions .icon-btn + .icon-btn {
  margin-left: 6px;
}
.dest-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.dest-favicon,
.dest-favicon-fallback {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  line-height: 16px;
  font-size: 13px;
}
.dest-body {
  min-width: 0;
}
.link-title {
  font-weight: 700;
  margin-bottom: 2px;
}
.dest-url {
  color: var(--muted);
  font-size: 0.85rem;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.tag-list[hidden] {
  display: none;
}
.tag-chip {
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: inherit;
  cursor: pointer;
}
.tag-chip[aria-pressed="true"] {
  border-color: var(--action);
  box-shadow: 0 0 0 1px var(--action) inset;
  font-weight: 700;
}
.folder-chip {
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: inherit;
  cursor: pointer;
}
.folder-chip:hover {
  border-color: var(--action);
}
.folder-manage {
  margin: 0 0 12px;
  padding: 10px 12px;
}
.folder-manage > summary {
  cursor: pointer;
  font-weight: 600;
}
.folder-create {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
}
.folder-create input {
  flex: 1 1 220px;
}
.folder-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.folder-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.folder-row input {
  flex: 1 1 200px;
}
.expiry-badge {
  white-space: nowrap;
  font-size: 0.85rem;
}
.expiry-warn {
  color: #b45309;
  font-weight: 700;
}
.expiry-expired {
  color: #b91c1c;
  font-weight: 700;
}
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}
.qr-modal[hidden] {
  display: none;
}
.qr-modal-card {
  max-width: 420px;
  width: 100%;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  text-align: center;
}
.qr-img {
  display: block;
  margin: 12px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}
.qr-modal-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.qr-controls {
  display: grid;
  gap: 10px;
  margin: 8px 0 12px;
}
.qr-themes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.qr-theme {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: inherit;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.qr-theme[aria-pressed="true"] {
  border-color: var(--action);
  box-shadow: 0 0 0 1px var(--action) inset;
}
.qr-theme-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--qr-finder);
  background: linear-gradient(135deg, var(--qr-fg) 0 50%, var(--qr-bg) 50% 100%);
}
.qr-theme-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qr-colors {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.qr-color {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
}
.qr-color input[type="color"] {
  width: 44px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.qr-reset {
  padding: 4px 8px;
  font-size: 12px;
}
.qr-message {
  color: var(--danger);
}
.qr-warn {
  color: var(--warning);
}
.qr-saved {
  margin-top: 2px;
  font-size: 11px;
}
.qr-modal-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.qr-box {
  margin: 12px 0;
  text-align: center;
}
.utm-builder {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.utm-builder legend {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0 4px;
}
.utm-tpl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 10px;
}
.utm-tpl-label {
  font-size: 0.85rem;
  color: var(--muted);
}
.utm-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  overflow: hidden;
}
.utm-chip button {
  border: 0;
  background: none;
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  color: inherit;
  min-height: auto;
}
.utm-chip .utm-chip-del {
  padding: 4px 8px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}
.utm-chip .utm-chip-apply[aria-pressed="true"] {
  background: var(--action, #0b7a53);
  color: #ffffff;
}
.utm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.utm-save-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.utm-save-bar[hidden] {
  display: none;
}
.utm-save-bar input {
  flex: 1 1 160px;
  min-width: 0;
}
.utm-preview {
  margin: 10px 0 0;
  font-size: 0.85rem;
}
.utm-preview code {
  display: block;
  margin-top: 2px;
  word-break: break-all;
}
.utm-preview mark {
  background: #fef3c7;
  padding: 0 2px;
  border-radius: 2px;
}
.utm-undo-btn {
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 0.8rem;
  min-height: auto;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.checkbox-label input[type="checkbox"] {
  width: auto;
}
.pw-badge {
  font-size: 0.85rem;
}
.badge.limit_reached {
  background: #fee2e2;
  color: #b91c1c;
}
.links-notice {
  margin: 8px 0 12px;
  padding: 10px 14px;
  border: 1px solid #0b7a53;
  border-radius: var(--radius-sm);
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.9rem;
}
.links-notice[hidden] {
  display: none;
}
.links-table tr.is-newly-cloned {
  background: #ecfdf5;
}
.badge.archived {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.links-table .cell-select {
  width: 40px;
  text-align: center;
}
.links-table .cell-select input[type="checkbox"] {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}
.links-table .cell-url .copy-link-btn {
  margin-left: 6px;
  vertical-align: middle;
}
.links-table .cell-tags {
  min-width: 120px;
}
.links-table .cell-tags .tag-list {
  margin-top: 0;
}
.bulk-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 14px;
}
.bulk-action-bar[hidden] {
  display: none;
}
.bulk-count {
  font-size: 0.9rem;
  white-space: nowrap;
}
.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bulk-actions button {
  min-height: 36px;
}
.bulk-tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}
.bulk-tag-bar[hidden] {
  display: none;
}
.bulk-tag-bar input {
  flex: 1 1 220px;
  min-width: 0;
}
.cols-menu {
  position: relative;
}
.cols-menu > summary {
  list-style: none;
  cursor: pointer;
}
.cols-menu > summary::-webkit-details-marker {
  display: none;
}
.cols-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  gap: 8px;
  min-width: 200px;
  padding: 12px 14px;
}
.links-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px 0;
}
.links-pager[hidden] {
  display: none;
}
.edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.danger-zone {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  background: #fffafa;
}
.danger-zone h2,
.danger-zone h3 {
  color: var(--danger);
  margin-top: 0;
}
/* 共通部品: ページ見出し・パンくず・空の状態・確認ダイアログ・トースト */
.page-head {
  margin-bottom: 20px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.84rem;
}
.breadcrumb[hidden] {
  display: none;
}
.breadcrumb a {
  color: var(--muted);
}
.breadcrumb a:hover {
  color: var(--action);
}
.breadcrumb-sep {
  color: var(--faint);
}
.page-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}
.page-head-main {
  min-width: 0;
  flex: 1 1 240px;
}
.page-head-main h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.page-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.page-desc:empty {
  display: none;
}
.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.empty-state {
  padding: 28px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  text-align: center;
}
.empty-state p {
  margin: 0 0 14px;
  color: var(--muted);
}
.empty-state p:last-child {
  margin-bottom: 0;
}
.empty-state .actions {
  justify-content: center;
}
.ui-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(16, 32, 25, 0.45);
}
.ui-dialog {
  width: 100%;
  max-width: 440px;
  padding: 22px;
  background: var(--panel);
}
.ui-dialog-title {
  margin: 0 0 8px;
  font-size: 1.08rem;
}
.ui-dialog-body {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}
.ui-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.ui-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}
.ui-toast {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--text);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}
.ui-toast.is-success {
  border-color: #0b7a53;
  background: #065f46;
}
.ui-toast.is-error {
  border-color: #b91c1c;
  background: #991b1b;
}
.ui-toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}
.delete-confirm-box {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  background: #fef2f2;
}
.delete-confirm-box[hidden] {
  display: none;
}
@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .kpi {
    padding: 12px;
  }
  .kpi strong {
    font-size: 1.3rem;
  }
  .links-table-wrap {
    overflow-x: visible;
  }
  .links-table-wrap .links-table {
    min-width: 0;
    width: 100%;
    display: block;
  }
  .links-table thead {
    display: none;
  }
  .links-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .links-table tbody tr:not(.edit-row) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
  }
  .links-table tbody tr:not(.edit-row) td {
    display: block;
    padding: 0;
    border: none;
    word-break: break-word;
  }
  .links-table tbody tr:not(.edit-row) td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 2px;
  }
  .links-table .cell-select {
    order: 0;
    text-align: right;
  }
  .links-table .cell-url {
    order: 1;
    word-break: break-all;
  }
  .links-table .cell-actions {
    order: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
  }
  .links-table .cell-actions .icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin-left: 0;
  }
  .links-table .cell-clicks {
    order: 3;
  }
  .links-table .cell-destination {
    order: 4;
  }
  .links-table .cell-state {
    order: 5;
  }
  .links-table .cell-tags {
    order: 6;
  }
  .links-table .cell-expires {
    order: 7;
  }
  .links-table .cell-created {
    order: 8;
  }
  .bulk-action-bar {
    position: sticky;
    bottom: 8px;
    z-index: 10;
  }
  .links-table tr.edit-row,
  .links-table tr.edit-row td {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
  }
  .links-table tr.edit-row .card {
    box-sizing: border-box;
    max-width: 100%;
  }
  .links-table tr.edit-row .note {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .inline-edit-form input {
    width: 100%;
    box-sizing: border-box;
  }
  .inline-edit-form button {
    min-height: 40px;
  }
}

#turnstile {
  max-width: 100%;
  overflow-x: auto;
}

.keys-table td:nth-child(2) {
  word-break: break-word;
  white-space: normal;
  min-width: 140px;
}
.keys-table td:last-child {
  white-space: nowrap;
}

.brand-reading:empty {
  display: none;
}

/* クリックストリームの列切替（#443）。チェックボックスを折り返して並べる。 */
#column-picker {
  margin: 0.5rem 0 0.75rem;
}

#column-picker summary {
  cursor: pointer;
  display: inline-block;
}

.column-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.5rem;
}

.column-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}

/* 左サイドバーナビ（#487） */
:root {
  --sidebar-width: 248px;
}
body:has(.dash-sidebar) {
  padding-left: var(--sidebar-width);
}
body:has(.dash-sidebar) main {
  max-width: min(1080px, 100%);
  padding: 28px 28px 72px;
}
body:has(.dash-sidebar) .form-card.page-wide {
  max-width: min(1040px, calc(100% - 44px));
  margin: 28px auto 72px;
}
.dash-topbar {
  display: none;
}
.dash-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.dash-sidebar-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.dash-sidebar-nav {
  flex: 1 1 auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-nav-heading {
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.dash-sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.dash-sidebar-nav a:hover {
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
}
.dash-sidebar-nav a[aria-current="page"] {
  background: #e3f6eb;
  color: var(--action-strong);
}
.dash-sidebar-footer {
  padding: 12px 14px 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel-2);
}
.dash-usage {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.dash-meter {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dash-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--muted);
}
.dash-meter-val {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dash-meter-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.dash-meter-fill {
  height: 100%;
  background: var(--action);
  border-radius: 999px;
}
.dash-meter-fill.is-warn {
  background: var(--warning);
}
.dash-meter-fill.is-over {
  background: var(--danger);
}
.dash-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}
.dash-logout {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--panel);
}
.dash-logout:hover {
  color: var(--text);
  border-color: var(--action);
  text-decoration: none;
}
.dash-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(16, 32, 25, 0.4);
}
.dash-sidebar-backdrop[hidden] {
  display: none;
}
@media (max-width: 900px) {
  body:has(.dash-sidebar) {
    padding-left: 0;
  }
  body:has(.dash-sidebar) main {
    padding: 20px 16px 64px;
  }
  body:has(.dash-sidebar) .form-card.page-wide {
    max-width: calc(100% - 24px);
    margin: 18px auto 64px;
  }
  .dash-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
  }
  .dash-menu-btn {
    min-height: 38px;
    width: 38px;
    padding: 0;
  }
  .dash-sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }
  .dash-sidebar.is-open {
    transform: translateX(0);
  }
}

.advanced-settings {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--panel-2);
}
.advanced-settings summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}
.advanced-settings-body {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

/* 有料機能ゲート & 上限超過帯（#491） */
.quota-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid #fcd34d;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  background: #fffbeb;
  color: #78350f;
  font-size: 0.9rem;
}
.quota-banner[hidden] {
  display: none;
}
.plan-gate {
  position: relative;
  margin-top: 12px;
}
.plan-gate-preview {
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}
.plan-gate-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(246, 250, 247, 0.55);
  border-radius: var(--radius-sm);
}
.plan-gate-card {
  max-width: 400px;
  text-align: center;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.plan-gate-card h3 {
  margin: 8px 0 6px;
}
.plan-gate-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ドメイン手順ステッパー・表の折り返し防止（#499 C） */
.domain-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 10px 0 14px;
  padding: 0;
}
.domain-steps li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.domain-steps li.is-done {
  border-color: #a7e3c0;
  background: #e3f6eb;
  color: var(--success);
}
.domain-steps li.is-current {
  border-color: var(--action);
  background: var(--action);
  color: #ffffff;
}
.domain-steps li.is-failed {
  border-color: var(--danger);
  background: #fef2f2;
  color: var(--danger);
}
.links-table th,
.links-table .cell-clicks,
.click-ip {
  white-space: nowrap;
}

/* 640px 以下では、操作ボタンのある表を見出し付きのカードに並べ直す */
@media (max-width: 640px) {
  .table-scroll .stack-table,
  .stack-table {
    min-width: 0;
  }
  .stack-table thead {
    display: none;
  }
  .stack-table,
  .stack-table tbody,
  .stack-table tr,
  .stack-table td {
    display: block;
    width: 100%;
  }
  .stack-table tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }
  .stack-table td {
    padding: 3px 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .stack-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 2px;
  }
  .stack-table td.stack-actions {
    padding-top: 6px;
  }
}
