/* Hallmark · genre: modern-minimal · macrostructure: Workbench · theme: project-preserved warm-gold
 * enrichment: none · nav: breadcrumb index · footer: inline related links
 * pre-emit critique: P5 H5 E4 S5 R5 V4
 */
:root {
  --gold: #b8945a;
  --gold-lt: #ddc7a0;
  --bg: #f4f1ec;
  --panel: #fff;
  --ink: #3f3931;
  --sub: #8b8378;
  --line: #e6e0d6;
  --danger: #c96a5a;
  --ok: #5c8f6a;
  --billing-accent-deep: #805b24;
  --billing-highlight: #fdf9f0;
  --billing-muted-surface: #f4f1eb;
  --billing-raised-shadow: rgba(91, 61, 23, 0.55);
  --billing-focus: #9a671d;
}
html,
body {
  overflow-x: clip;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.serif {
  font-family: 'Shippori Mincho', serif;
}
button,
input,
select {
  font-family: inherit;
}
a {
  color: var(--gold);
}

/* ---- 一般公開ページ共通ヘッダー・フッター ----
 * Hallmark · pre-emit critique: P5 H4 E5 S5 R5 V4
 */
.public-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.public-shell {
  width: min(calc(100% - 40px), 1024px);
  margin-inline: auto;
}
.public-skip {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-180%);
  border-radius: 8px;
  background: var(--ink);
  color: var(--panel);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.public-skip:focus {
  transform: translateY(0);
}
.public-header {
  position: sticky;
  z-index: 40;
  top: 0;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.public-header__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.public-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}
.public-brand img {
  display: block;
  width: auto;
  height: 30px;
}
.public-header__nav,
.public-footer nav {
  display: flex;
  align-items: center;
  gap: 12px 24px;
}
.public-header__nav a,
.public-footer a {
  white-space: nowrap;
  color: var(--sub);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 4px;
}
.public-header__nav a:hover,
.public-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.public-header__nav .public-header__cta {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 8px 18px;
  background: var(--gold);
  color: var(--panel);
  font-weight: 700;
}
.public-header__nav .public-header__cta:hover {
  color: var(--panel);
  filter: brightness(1.05);
  text-decoration: none;
}
.public-page :focus-visible {
  outline: 3px solid var(--billing-focus);
  outline-offset: 3px;
}
.public-main {
  width: 100%;
  flex: 1 0 auto;
  padding: 30px 18px 60px;
}
.contact-page .public-main {
  display: grid;
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
  align-content: start;
}
.contact-page .auth-card {
  max-width: none;
}
.public-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding: 40px 0 24px;
  background: color-mix(in srgb, var(--gold-lt) 18%, var(--bg));
}
.public-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}
.public-footer__brand > p {
  max-width: 420px;
  margin-top: 8px;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.7;
}
.public-footer nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.public-footer__note {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--sub);
  font-size: 12px;
}
@media (max-width: 640px) {
  .public-shell {
    width: min(calc(100% - 32px), 1024px);
  }
  .public-header__inner {
    gap: 12px;
  }
  .public-header__nav {
    gap: 10px;
  }
  .public-header__nav > a:not(.public-header__cta) {
    display: none;
  }
  .public-header__nav .public-header__cta {
    min-height: 38px;
    padding-inline: 14px;
  }
  .public-main {
    padding: 24px 16px 48px;
  }
  .public-footer__top {
    flex-direction: column;
  }
  .public-footer nav {
    justify-content: flex-start;
  }
}

/* ---- 認証画面 ---- */
.auth-bg {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(
      60% 40% at 50% 0%,
      rgba(233, 217, 210, 0.6),
      transparent 70%
    ),
    var(--bg);
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 60px -34px rgba(90, 64, 40, 0.5);
  padding: 38px 32px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.auth-card .mark {
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  margin-left: auto;
  margin-right: auto;
}
.auth-card h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.auth-card .lead {
  font-size: 12.5px;
  color: var(--sub);
  margin: 12px 0 20px;
  line-height: 1.7;
}
.auth-card form {
  text-align: left;
}
.auth-card label {
  display: block;
  font-size: 11.5px;
  color: var(--sub);
  margin: 12px 0 5px;
  font-weight: 500;
}
.auth-card input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: #fbf9f5;
}
.auth-card input:focus {
  outline: 2px solid var(--gold-lt);
  border-color: var(--gold);
}
.btn-gold {
  display: block;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--gold);
  color: #fff;
  width: 100%;
  margin-top: 20px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn-gold:hover {
  filter: brightness(1.05);
}
.alert {
  background: #fbeae6;
  color: #a8412f;
  border: 1px solid #efc9c0;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 12.5px;
  text-align: left;
}
.switch {
  font-size: 12px;
  color: var(--sub);
  margin-top: 18px;
}
/* 長文入力を含むフォーム（お問い合わせ）向けの幅と複数行入力 */
.auth-card--wide {
  max-width: 560px;
}
.auth-card textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.8;
  background: #fbf9f5;
  min-height: 160px;
  resize: vertical;
}
.auth-card textarea:focus {
  outline: 2px solid var(--gold-lt);
  border-color: var(--gold);
}
.auth-card .g-recaptcha {
  margin-top: 16px;
}

/* ---- 編集画面 ---- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  flex-wrap: wrap;
}
.bar .brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
}
.bar .brand img {
  display: block;
  width: auto;
  height: 28px;
}
/* Hallmark · component: avatar menu · genre: modern-minimal · theme: project-preserved warm-gold
 * states: default · hover · focus · active · disabled · loading · error · success
 * contrast: pass
 * pre-emit critique: P5 H5 E5 S5 R5 V4
 */
.user-menu {
  position: relative;
  flex: 0 0 auto;
}
.user-menu > summary {
  list-style: none;
}
.user-menu > summary::-webkit-details-marker {
  display: none;
}
.user-menu-trigger {
  display: flex;
  min-width: 68px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--billing-highlight);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}
.user-menu-trigger img,
.user-menu-profile img {
  display: block;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--billing-muted-surface);
  object-fit: cover;
}
.user-menu-chevron {
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid var(--gold);
  transition: transform 0.18s ease;
}
.user-menu[open] .user-menu-chevron {
  transform: rotate(180deg);
}
.user-menu-trigger:hover,
.user-menu[data-state='success'] .user-menu-trigger {
  border-color: var(--gold-lt);
  background: var(--panel);
}
.user-menu-trigger:focus-visible,
.user-menu.is-focus .user-menu-trigger {
  outline: 3px solid var(--billing-focus);
  outline-offset: 3px;
}
.user-menu-trigger:active,
.user-menu.is-active .user-menu-trigger {
  transform: translateY(1px);
}
.user-menu[data-state='loading'] .user-menu-trigger {
  cursor: wait;
  opacity: 0.7;
}
.user-menu[data-state='error'] .user-menu-trigger {
  border-color: var(--danger);
}
.user-menu-trigger[aria-disabled='true'],
.user-menu.is-disabled .user-menu-trigger {
  pointer-events: none;
  opacity: 0.45;
}
.user-menu-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(300px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 42px -22px var(--billing-raised-shadow);
}
.user-menu-profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.user-menu-profile strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.user-header-nav {
  display: grid;
  padding: 8px;
}
.user-header-nav a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.user-header-nav a span {
  color: var(--gold);
  text-align: center;
}
.user-header-nav a:hover,
.user-header-nav a[aria-current='page'] {
  background: var(--billing-highlight);
  color: var(--billing-accent-deep);
}
.user-header-nav a:focus-visible {
  outline: 3px solid var(--billing-focus);
  outline-offset: -2px;
}
.user-header-nav .user-menu-logout {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 9px 9px;
}
.public-page-menu {
  position: relative;
  flex: 0 0 auto;
}
.public-page-menu > summary {
  list-style: none;
}
.public-page-menu > summary::-webkit-details-marker {
  display: none;
}
.public-page-menu-trigger {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.public-page-menu-chevron {
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.18s ease;
}
.public-page-menu[open] .public-page-menu-trigger {
  border-color: var(--gold);
  color: var(--gold);
}
.public-page-menu[open] .public-page-menu-chevron {
  transform: rotate(180deg);
}
.public-page-menu-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(250px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 42px -22px var(--billing-raised-shadow);
}
.public-page-menu-popover a,
.public-page-menu-popover button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.public-page-menu-popover a span,
.public-page-menu-popover button > span:first-child {
  color: var(--gold);
  text-align: center;
}
.public-page-menu-popover a:hover,
.public-page-menu-popover button:hover,
.public-page-menu-popover a[data-state='success'],
.public-page-menu-popover button[data-state='success'] {
  background: var(--billing-highlight);
  color: var(--billing-accent-deep);
}
.public-page-menu-popover a:focus-visible,
.public-page-menu-popover button:focus-visible {
  outline: 3px solid var(--billing-focus);
  outline-offset: -2px;
}
.public-page-menu-popover a:active,
.public-page-menu-popover button:active {
  transform: translateY(1px);
}
.public-page-menu-popover button:disabled,
.public-page-menu-popover [aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.55;
}
.public-page-menu-popover [aria-busy='true'] {
  cursor: wait;
  opacity: 0.7;
}
.public-page-menu-popover [data-state='error'] {
  color: var(--danger);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
@media (max-width: 700px) {
  .user-header {
    gap: 8px;
    padding: 10px 12px;
  }
  .user-header .brand {
    width: auto;
  }
  .user-header .brand img {
    height: 24px;
  }
  .user-menu-popover {
    position: fixed;
    top: 70px;
    right: 12px;
  }
  .public-page-menu-popover {
    right: -64px;
  }
}
.btn-sm {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.btn-sm:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.saveflag {
  font-size: 11px;
  color: var(--ok);
  opacity: 0;
  transition: opacity 0.3s;
}
.saveflag.on {
  opacity: 1;
}
.editor-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 18px 0;
}
.editor-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 18px 60px;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 26px;
  align-items: start;
}
@media (max-width: 920px) {
  .editor-main {
    grid-template-columns: 1fr;
  }
}
.url-note {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 12.5px;
  margin-bottom: 16px;
}
.url-note b {
  color: var(--gold);
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px -24px rgba(90, 64, 40, 0.5);
}
.panel h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel h2::before {
  content: '';
  width: 4px;
  height: 15px;
  background: var(--gold);
  border-radius: 3px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}
.f {
  margin-bottom: 12px;
}
.f label {
  display: block;
  font-size: 11.5px;
  color: var(--sub);
  margin-bottom: 5px;
  font-weight: 500;
}
.f input[type='text'],
.f select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13.5px;
  background: #fbf9f5;
}
.f input:focus,
.f select:focus {
  outline: 2px solid var(--gold-lt);
  border-color: var(--gold);
}
.f.chk {
  display: flex;
  align-items: flex-end;
  padding-bottom: 10px;
}
label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}
input[type='range'] {
  width: 100%;
  accent-color: var(--gold);
}
input[type='color'] {
  width: 56px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: none;
  cursor: pointer;
  padding: 2px;
}
#ovVal {
  color: var(--gold);
  font-weight: 700;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar-prev {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold-lt);
  background: #efe7dd;
  flex: 0 0 auto;
}
.avatar-prev.rect {
  width: 104px;
  height: 72px;
  border-radius: 10px;
}
.avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
}
.file-btn input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.mini {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--sub);
  cursor: pointer;
}
.mini:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.mini.del:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.mini[disabled] {
  opacity: 0.35;
  cursor: default;
}

.link-item {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fcfbf8;
}
.link-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.link-head .idx {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}
.link-head .grow {
  flex: 1;
  font-size: 13px;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.sw {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
}
.sw.active {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.link-tools {
  display: flex;
  justify-content: flex-end;
}
.link-item .link-file-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.link-item .link-file-name {
  font-size: 12px;
  color: var(--sub);
  min-width: 0;
  overflow-wrap: anywhere;
}
.link-item .link-file-conditions {
  font-size: 11.5px;
  color: var(--sub);
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}
.link-item .link-file-error {
  color: #8b1e1e;
  background: #fbeae6;
  border: 1px solid #efc9c0;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12.5px;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
.link-item[aria-busy='true'] {
  opacity: 0.6;
}
.link-item .btn-sm[disabled] {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
@media (max-width: 540px) {
  .link-item .link-file-row {
    flex-direction: column;
    align-items: stretch;
  }
  .link-item .link-file-row .btn-sm {
    text-align: center;
  }
}
.add-btn {
  width: 100%;
  border: 1.5px dashed var(--gold-lt);
  background: #fff;
  color: var(--gold);
  border-radius: 11px;
  padding: 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.add-btn:hover {
  background: #fbf6ec;
}
.link-quota {
  margin: -6px 0 14px;
  color: var(--sub);
  font-size: 12.5px;
  line-height: 1.8;
}
.link-limit-guide {
  border: 1px solid var(--gold-lt);
  border-radius: 11px;
  padding: 12px 14px;
  background: var(--billing-highlight);
  color: var(--sub);
  font-size: 12.5px;
  line-height: 1.8;
}
.link-limit-guide a {
  white-space: nowrap;
  font-weight: 700;
}

.preview-wrap {
  position: sticky;
  top: 74px;
}
.phone {
  background: #111;
  border-radius: 34px;
  padding: 12px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
  max-width: 420px;
  margin: 0 auto;
}
.phone iframe {
  width: 100%;
  height: 720px;
  border: none;
  border-radius: 24px;
  background: #fbf7f1;
  display: block;
}
.preview-note {
  text-align: center;
  font-size: 11px;
  color: var(--sub);
  margin-top: 10px;
}

/* ---- 追加：認証まわり ---- */
.notice {
  background: #eef6ef;
  color: #2f6b41;
  border: 1px solid #cfe6d3;
  border-radius: 9px;
  padding: 11px 13px;
  font-size: 12.5px;
  text-align: left;
  line-height: 1.7;
  margin-top: 1rem;
}
.auth-card .agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--sub);
  margin-top: 16px;
  line-height: 1.6;
  text-align: left;
}
.auth-card .agree input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--gold);
  flex: 0 0 auto;
}
.auth-card .agree a {
  color: var(--gold);
}
.legal-links {
  margin-top: 18px;
  font-size: 11px;
  color: var(--sub);
  text-align: center;
}
.legal-links a {
  color: var(--sub);
  text-decoration: underline;
}
.btn-danger-full {
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 700;
  background: var(--danger);
  color: #fff;
  width: 100%;
  margin-top: 18px;
  cursor: pointer;
}
.btn-danger-full:hover {
  filter: brightness(1.05);
}

/* ---- 退会パネル ---- */
.danger-panel {
  border-color: #f0d6d0;
}
.danger-panel h2::before {
  background: var(--danger);
}
.danger-note {
  font-size: 12px;
  color: var(--sub);
  margin-bottom: 12px;
  line-height: 1.7;
}
.btn-danger {
  display: inline-block;
  border: 1px solid var(--danger);
  color: var(--danger);
  background: #fff;
  border-radius: 9px;
  padding: 9px 15px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ---- 規約・ポリシーページ ---- */
.legal-bg {
  background: var(--bg);
}
.legal {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 30px;
  box-shadow: 0 20px 50px -34px rgba(90, 64, 40, 0.5);
}
.legal h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  color: var(--ink);
}
.legal h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 22px 0 6px;
  color: var(--gold);
}
.legal ol {
  padding-left: 1.5em;
}
.legal p,
.legal li {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink);
}
.legal .lead {
  color: var(--sub);
  margin-bottom: 8px;
}
.legal ul {
  margin: 4px 0 4px 1.2em;
}
.legal .date {
  margin-top: 24px;
  font-size: 12px;
  color: var(--sub);
}
.legal .back {
  margin-top: 20px;
}
.legal .back a {
  color: var(--gold);
}

/* 公開状態バッジ・公開ボタン */
.btn-sm.primary {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-sm.primary:hover {
  filter: brightness(1.05);
  color: #fff;
}
.pubstate {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.pubstate.dirty {
  background: #fbeee0;
  color: #b5761f;
  border: 1px solid #efd8b6;
}
.pubstate.clean {
  background: #e7f1ea;
  color: var(--ok);
  border: 1px solid #cfe4d5;
}
.slug-card .og-upload-row > label {
  margin-top: 0;
}
.slug-card {
  max-width: 760px;
  margin: 1rem auto;
}
.break-url {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.slug-input {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-wrap: anywhere;
}
.slug-input input {
  min-width: 8rem;
  flex: 1;
}
.notice {
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid #b8863b;
  border-radius: 8px;
}
.error {
  color: #8b1e1e;
  font-weight: 700;
}
.slug-card label {
  display: block;
  margin-top: 1rem;
}
.slug-card dl {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.5rem;
}
.slug-card .public-url-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 10px 0;
}
.slug-card .public-url-row .break-url {
  flex: 1 1 320px;
  min-width: 0;
  margin: 0;
}
.slug-card .public-url-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}
.slug-card .public-url-actions .btn-sm {
  flex: 0 0 auto;
  white-space: nowrap;
}
/* ---- 公開・シェア：折り畳みセクション（.slug-card 配下に限定） ---- */
.share-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid #ddc7a0;
  border-radius: 12px;
  background: #fff;
  margin: 8px 0;
}
.qr-preview {
  max-width: 220px;
}
.slug-card .share-acc {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfbf8;
  margin-top: 14px;
  overflow: hidden;
}
.slug-card .share-acc-head {
  margin: 0;
}
.slug-card .share-acc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 13px 15px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.slug-card .share-acc-toggle:hover .share-acc-title {
  color: var(--gold);
}
.slug-card .share-acc-arrow {
  color: var(--gold);
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}
.slug-card .share-acc-toggle[aria-expanded='true'] .share-acc-arrow {
  transform: rotate(180deg);
}
.slug-card .share-acc-summary {
  margin: 0;
  padding: 0 15px 12px;
  font-size: 12px;
  color: var(--sub);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.slug-card .share-acc-panel {
  padding: 12px 15px 15px;
  border-top: 1px solid var(--line);
}
.slug-card .share-acc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.slug-card .share-acc-actions .btn-sm {
  display: inline-block;
}
.slug-card .share-acc-note {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.8;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.slug-card .share-acc-note p {
  margin-bottom: 8px;
}
.slug-card .og-kind {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold);
  margin: 6px 0;
}
.slug-card .og-use-label {
  font-size: 12px;
  font-weight: 700;
  margin: 10px 0 6px;
}
.slug-card .og-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.slug-card .og-conditions {
  font-size: 11.5px;
  color: var(--sub);
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.slug-card .og-status {
  color: var(--ok);
  font-size: 12.5px;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.slug-card .og-error {
  color: #8b1e1e;
  background: #fbeae6;
  border: 1px solid #efc9c0;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12.5px;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.slug-card .og-actions[aria-busy='true'] .btn-sm {
  opacity: 0.5;
  pointer-events: none;
}
.slug-card .btn-sm[disabled] {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
.slug-card .file-btn input[type='file'][disabled] {
  cursor: default;
}
/* Hallmark · macrostructure: Index-First · tone: utilitarian · anchor hue: warm-gold
 * theme: project-preserved LinkCMS · enrichment: none
 * pre-emit critique: P5 H5 E5 S5 R5 V4
 */
.share-settings-page {
  max-width: 1040px;
}
.share-settings-head {
  max-width: 680px;
  padding: 18px 2px 26px;
}
.share-settings-head h1 {
  min-width: 0;
  margin-bottom: 8px;
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.share-settings-head p,
.share-settings-section-head p,
.share-settings-url > div:first-child p,
.share-settings-note {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.75;
}
.share-settings-url,
.share-settings-qr,
.share-settings-og {
  padding: clamp(22px, 3vw, 32px);
}
.share-settings-url h2,
.share-settings-section-head h2 {
  margin-bottom: 5px;
  font-size: 19px;
}
.share-settings-url .public-url-row {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  margin-top: 18px;
}
.share-settings-url .break-url {
  flex: 1 1 360px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.share-settings-url .public-url-actions,
.share-settings-page .share-acc-actions,
.share-settings-page .og-upload-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.share-copy-status {
  min-height: 20px;
  margin-top: 8px;
  color: var(--ok);
  font-size: 12px;
}
.share-settings-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
  gap: 20px;
  margin-top: 20px;
}
.share-settings-section-head {
  margin-bottom: 18px;
}
.share-settings-page .share-preview {
  margin: 0 0 14px;
}
.share-settings-page .qr-preview {
  width: min(100%, 220px);
}
.share-settings-page .og-kind {
  margin: 4px 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}
.share-settings-page .og-use-label {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}
.share-settings-page .og-conditions,
.share-settings-note {
  margin-top: 12px;
}
.share-settings-page .og-conditions {
  color: var(--sub);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.share-settings-page .og-status {
  min-height: 20px;
  margin-top: 8px;
  color: var(--ok);
  font-size: 12px;
}
.share-settings-page .og-error {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--danger);
  border-radius: 9px;
  color: var(--danger);
  font-size: 12px;
}
.share-settings-page .og-actions[aria-busy='true'] {
  opacity: 0.65;
}
.share-settings-page .og-actions[aria-busy='true'] .btn-sm,
.share-settings-page .btn-sm[disabled] {
  cursor: default;
  pointer-events: none;
}
.share-settings-page .btn-sm {
  white-space: nowrap;
}
.share-settings-page .btn-sm[disabled] {
  opacity: 0.45;
}
.share-settings-unpublished {
  display: grid;
  justify-items: start;
  gap: 8px;
}
/* フリープラン: 読み取り不能なダミープレビューとアップグレード導線 */
.qr-locked-preview {
  width: min(100%, 220px);
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #ddc7a0;
  border-radius: 12px;
  background: #fff;
}
.qr-locked-preview svg {
  display: block;
  width: 100%;
  height: auto;
}
.qr-locked-lead {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}
.qr-locked-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 16px;
}
.qr-locked-link {
  font-size: 13px;
}
/* 料金プラン案内用QR。固定QRのダミーとは区切り線で分離し、主CTAより控えめに置く */
.share-plan-qr {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.share-plan-qr h3 {
  margin-bottom: 4px;
  font-size: 14px;
}
.share-plan-qr p {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.75;
}
.share-plan-qr img {
  display: block;
  width: 120px;
  height: 120px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
@media (max-width: 540px) {
  .slug-card .public-url-row {
    align-items: flex-start;
  }
  .slug-card .public-url-actions {
    width: 100%;
  }
  .slug-card .og-upload-row {
    flex-direction: column;
    align-items: stretch;
  }
  .slug-card .og-upload-row .btn-sm {
    width: 100%;
    text-align: center;
  }
  .slug-card .share-acc-actions {
    flex-direction: column;
  }
  .slug-card .share-acc-actions .btn-sm {
    width: 100%;
    text-align: center;
  }
  .share-settings-head {
    padding-top: 10px;
  }
  .share-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .share-settings-url .public-url-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .share-settings-url .public-url-actions,
  .share-settings-page .share-acc-actions,
  .share-settings-page .qr-locked-actions,
  .share-settings-page .og-upload-row {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
  .share-settings-page .btn-sm {
    width: 100%;
    text-align: center;
  }
  /* 料金プラン案内用QRはスマートフォン幅では表示しない（display:none でフォーカス対象にも残さない）。
     主CTAと補助リンクはこの幅でも利用できる。 */
  .share-plan-qr {
    display: none;
  }
}
.btn-sm:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid #805b24;
  outline-offset: 3px;
}

/* ---- 公開URL変更 ---- */
.settings-bg {
  min-height: 100vh;
  background:
    radial-gradient(
      70% 35% at 50% 0%,
      rgba(221, 199, 160, 0.22),
      transparent 70%
    ),
    var(--bg);
  padding: 0;
}
.settings-bg > .slug-page {
  width: calc(100% - 36px);
  margin-top: 24px;
  padding-bottom: 60px;
}
.slug-page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}
.settings-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 14px;
  font-size: 12px;
  color: var(--sub);
}
.settings-nav a {
  color: var(--sub);
}
.slug-change-card {
  padding: 30px;
}
.slug-change-head {
  padding-bottom: 22px;
  /* border-bottom: 1px solid var(--line); */
  margin-bottom: 22px;
}
.settings-kicker {
  display: inline-block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 7px;
}
.slug-change-head h1 {
  font-size: 24px;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}
.slug-change-head p,
.impact-guide p,
.field-help,
.subtle {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--sub);
}
.current-url-box {
  background: #f8f5ef;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
}
.current-url-box span {
  display: block;
  font-size: 11px;
  color: var(--sub);
  margin-bottom: 4px;
}
.current-url-box strong {
  font-size: 14px;
}
.billing-card {
  max-width: 100%;
}
.billing-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #f8f5ef;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 28px;
}
.billing-eyebrow {
  display: block;
  color: var(--sub);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}
.billing-current h2,
.billing-plan-head h3 {
  font-size: 19px;
  margin: 0;
}
.billing-current p {
  color: var(--sub);
  font-size: 12.5px;
  line-height: 1.7;
  margin: 0;
  text-align: right;
}
.billing-guide,
.billing-options {
  margin-top: 30px;
}
.billing-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}
.billing-section-head h2 {
  font-size: 17px;
  margin: 1px 0 3px;
}
.billing-section-head p {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}
.billing-step {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.billing-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.billing-method-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px;
  background: #fff;
}
.billing-method-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.billing-method-title h3 {
  font-size: 14px;
  margin: 0;
}
.billing-method-card p {
  color: var(--sub);
  font-size: 11.5px;
  line-height: 1.75;
  margin: 0;
}
.billing-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
}
.billing-status.is-open {
  background: #e9f5eb;
  color: #28683a;
}
.billing-status.is-closed {
  background: #f1eee8;
  color: var(--sub);
}
.billing-empty {
  border: 1px dashed #c9bca9;
  border-radius: 14px;
  background: #fbf9f5;
  padding: 24px 20px;
  text-align: center;
}
.billing-empty strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}
.billing-empty p {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.8;
  margin: 0 auto;
  max-width: 520px;
}
.billing-plans {
  display: grid;
  gap: 16px;
}
.billing-plan-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 20px;
}
.billing-plan-card.billing-plan-current {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(183, 133, 61, 0.12);
}
.billing-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.billing-current-badge {
  border-radius: 999px;
  background: #f8eddc;
  color: #805b24;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
}
.billing-plan-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
  margin: 0 0 18px;
  padding: 15px 16px 15px 32px;
  border-radius: 11px;
  background: #faf8f4;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
}
.billing-purchase-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.billing-purchase-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.billing-purchase-group h4 {
  color: var(--sub);
  font-size: 11px;
  margin: 0 0 10px;
}
.billing-purchase-onetime {
  border-color: var(--gold-lt);
  background: #fdfaf4;
}
.billing-price-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.billing-price-option:first-of-type {
  padding-top: 0;
  border-top: 0;
}
.billing-price-option + .billing-price-option {
  margin-top: 10px;
}
.billing-price-option > div span,
.billing-price-option > div small {
  display: block;
  color: var(--sub);
  font-size: 10px;
}
.billing-price-option > div strong {
  display: inline-block;
  font-size: 19px;
  margin: 2px 0;
}
.billing-checkout-btn {
  flex: 0 0 auto;
}
.billing-unavailable,
.billing-plan-note {
  color: var(--sub);
  font-size: 11px;
}
.billing-plan-note {
  margin: 12px 0 0;
}
.billing-page {
  max-width: 1040px;
}
.billing-card {
  padding: clamp(26px, 4vw, 44px);
  border-color: #ded5c7;
  box-shadow: 0 22px 60px -42px rgba(70, 49, 24, 0.42);
}
.billing-card > .slug-change-head {
  margin-bottom: 30px;
  padding-bottom: 28px;
}
.billing-card > .slug-change-head h1 {
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: 0.02em;
}
.billing-card > .slug-change-head p {
  font-size: 13px;
}
.billing-section-title {
  margin: 30px 0 16px;
}
.billing-section-title h2 {
  margin: 0 0 5px;
  font-size: 19px;
}
.billing-section-title p,
.billing-portal p {
  margin: 0;
  color: var(--sub);
  font-size: 12.5px;
  line-height: 1.75;
}
.billing-contract-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gold-lt);
  border-radius: 18px;
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(221, 199, 160, 0.24),
      transparent 34%
    ),
    #fff;
  padding: clamp(20px, 3vw, 28px);
  box-shadow: 0 16px 40px -30px rgba(65, 48, 25, 0.38);
}
.billing-contract-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #c9a66d, #a97c3f);
}
.billing-contract-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.billing-contract-head h3 {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.45;
  margin: 0;
}
.billing-kind-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid #e2c99f;
  background: rgba(255, 250, 241, 0.9);
  color: #6e4c1b;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 700;
}
.billing-contract-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 7px 0 0;
}
.billing-contract-card.is-lifetime .billing-contract-details,
.billing-contract-card.is-free .billing-contract-details {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.billing-contract-details > div {
  min-width: 0;
  padding: 17px 0 15px;
  border-bottom: 1px solid var(--line);
}
.billing-contract-details dt {
  color: var(--sub);
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 4px;
}
.billing-contract-details dd {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.billing-lifetime-note,
.billing-schedule {
  margin: 16px 0 0;
  border: 1px solid #e7d8bb;
  border-radius: 13px;
  background: linear-gradient(135deg, #fffaf1, #f8f0e1);
  padding: 15px 17px;
  font-size: 12.5px;
  line-height: 1.7;
}
.billing-lifetime-note {
  display: flex;
  align-items: center;
  gap: 13px;
}
.billing-lifetime-note strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.billing-lifetime-note p {
  margin: 0;
  color: #6c6255;
}
.billing-lifetime-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8b6a36;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
.billing-schedule strong {
  display: block;
  font-size: 12px;
}
.billing-schedule p {
  margin: 2px 0 0;
}
.billing-schedule.is-cancel {
  border-left-color: #9b7136;
}
.billing-rate-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  align-items: stretch;
  gap: 24px;
}
.billing-rate-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  padding: clamp(22px, 3vw, 32px);
  text-align: left;
  font: inherit;
}
.billing-rate-card.is-lifetime {
  border: 1px solid var(--gold);
  background: var(--billing-highlight);
  box-shadow: 0 14px 32px -24px var(--billing-raised-shadow);
  min-height: 100%;
}
.billing-feature-badge {
  display: inline-flex;
  border-radius: 999px;
  background: var(--billing-accent-deep);
  color: #fff;
  padding: 5px 9px;
  margin-bottom: 10px;
  font-size: 10px !important;
  font-weight: 800 !important;
  white-space: nowrap;
}
.billing-rate-card.is-lifetime small {
  margin: 5px 0;
}
.billing-rate-card.is-lifetime em {
  width: 100%;
  border-radius: 9px;
  background: var(--billing-accent-deep);
  color: #fff;
  min-height: 48px;
  padding: 13px 16px;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}
.billing-rate-card.is-sold-out,
.billing-rate-card.is-unavailable {
  border-style: solid;
  background: var(--billing-muted-surface);
  box-shadow: none;
}
button.billing-rate-card:not(:disabled) {
  cursor: pointer;
  transition:
    transform 150ms ease-out,
    box-shadow 150ms ease-out,
    border-color 150ms ease-out;
}
button.billing-rate-card:not(:disabled):hover {
  border-color: var(--gold);
  box-shadow: 0 5px 18px rgba(91, 61, 23, 0.1);
  transform: translateY(-1px);
}
button.billing-rate-card:not(:disabled):active {
  transform: translateY(0);
  box-shadow: none;
}
.billing-rate-card:focus-visible,
.billing-action:focus-visible {
  outline: 3px solid #9a671d;
  outline-offset: 3px;
}
.billing-rate-card > strong {
  font-size: 15px;
  margin-bottom: 7px;
}
.billing-rate-card > span:not(.billing-current-badge) {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}
.billing-rate-card > .billing-offer-price {
  margin: 5px 0 18px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.25;
  white-space: normal;
}
.billing-payment-type {
  display: block;
  border-top: 1px solid var(--line);
  margin-bottom: 24px;
  padding-top: 18px;
  white-space: normal !important;
}
.billing-payment-type strong,
.billing-payment-type small {
  display: block;
}
.billing-payment-type strong {
  font-size: 14px;
}
.billing-payment-type small {
  margin-top: 4px !important;
}
.billing-sale-card {
  min-width: 0;
  border: 1px solid var(--gold);
  border-radius: 16px;
  background: var(--billing-highlight);
  padding: clamp(22px, 3vw, 32px);
}
.billing-sale-card h3 {
  border-bottom: 1px solid #dfcfb2;
  margin: 0 0 4px;
  padding-bottom: 16px;
  font-size: 17px;
}
.billing-sale-details {
  margin: 0;
}
.billing-sale-details > div {
  min-width: 0;
  border-bottom: 1px solid #e7dcc8;
  padding: 14px 0;
}
.billing-sale-details dt {
  color: var(--sub);
  font-size: 11px;
  font-weight: 700;
}
.billing-sale-details dd {
  overflow-wrap: anywhere;
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.billing-sale-details .is-highlight dd {
  color: var(--billing-accent-deep);
  font-size: 18px;
}
.billing-sale-card > p {
  color: var(--sub);
  margin: 16px 0 0;
  font-size: 11.5px;
  line-height: 1.75;
}
.billing-rate-card small {
  display: block;
  color: var(--sub);
  line-height: 1.65;
  margin: 12px 0;
}
.billing-rate-card em {
  margin-top: auto;
  color: #6e4c1b;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.billing-rate-card.is-current {
  border-style: dashed;
  background: #f4f1eb;
}
.billing-rate-card.is-current small {
  font-weight: 700;
}
.billing-rate-card:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}
.billing-portal {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.billing-portal h2 {
  font-size: 17px;
  margin: 0 0 5px;
}
.billing-portal .btn-sm {
  margin-top: 13px;
}
.billing-plan-link {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}
.billing-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding-inline: 18px;
  border-color: #cdb992;
  background: #fff;
  color: #604722;
  font-weight: 700;
  text-decoration: none;
}
.billing-secondary-link:hover {
  border-color: var(--gold);
  background: #fbf6ed;
}
.billing-feedback:empty {
  display: none;
}
.slug-change-form > .f {
  margin-bottom: 20px;
}
.slug-input {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf9f5;
  padding: 0 11px;
  overflow: hidden;
}
.slug-input:focus-within {
  outline: 2px solid var(--gold-lt);
  border-color: var(--gold);
}
.slug-input span {
  font-size: 13px;
  color: var(--sub);
  white-space: nowrap;
}
.slug-input input {
  min-width: 80px;
  flex: 1;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  padding: 11px 2px !important;
}
.field-help {
  margin-top: 6px;
}
.field-help code {
  background: #eee8de;
  padding: 1px 5px;
  border-radius: 4px;
}
.impact-guide {
  border-left: 4px solid var(--ok);
  background: #f2f7f3;
  border-radius: 0 10px 10px 0;
  padding: 13px 15px;
  margin: 15px 0;
}
.impact-guide.caution {
  border-left-color: #c38a38;
  background: #fbf5ea;
}
.impact-guide h2 {
  font-size: 13px;
  margin-bottom: 3px;
}
.impact-guide p strong {
  color: var(--ink);
}
.slug-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.slug-actions .btn-sm {
  min-width: 120px;
  text-align: center;
}
.slug-errors {
  background: #fbeae6;
  color: #8b1e1e;
  border: 1px solid #efc9c0;
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 18px;
  font-size: 12.5px;
}
.slug-errors ul {
  margin: 6px 0 0 1.2em;
  line-height: 1.7;
}
.slug-success {
  display: flex;
  gap: 13px;
  background: #eef6ef;
  border: 1px solid #cfe6d3;
  border-radius: 12px;
  padding: 17px;
}
.slug-success .status-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-weight: 700;
}
.slug-success strong {
  display: block;
  margin-bottom: 4px;
}
.confirm-title {
  font-size: 15px;
  margin-bottom: 12px;
}
.url-comparison {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}
.url-comparison > div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.url-comparison .next-url {
  border-color: var(--gold-lt);
  background: #fbf7ef;
}
.url-comparison dt {
  font-size: 11px;
  color: var(--sub);
  font-weight: 700;
}
.url-comparison dd {
  font-size: 13px;
  font-weight: 700;
}
.impact-check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px !important;
  margin: 18px 0 !important;
  font-size: 12.5px;
  line-height: 1.65;
}
.impact-check input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--gold);
}
@media (max-width: 540px) {
  .settings-bg > .slug-page {
    width: calc(100% - 20px);
    margin-top: 12px;
    padding-bottom: 40px;
  }
  .slug-change-card {
    padding: 21px 17px;
  }
  .slug-change-head h1 {
    font-size: 21px;
  }
  .billing-current {
    align-items: flex-start;
    flex-direction: column;
  }
  .billing-current p {
    text-align: left;
  }
  .billing-method-grid,
  .billing-plan-features,
  .billing-purchase-options {
    grid-template-columns: 1fr;
  }
  .billing-price-option {
    align-items: stretch;
    flex-direction: column;
  }
  .billing-checkout-btn {
    width: 100%;
    text-align: center;
  }
  .billing-contract-card,
  .billing-plan-card {
    padding: 17px;
  }
  .billing-contract-head {
    flex-direction: column;
    gap: 9px;
  }
  .billing-contract-head h3 {
    font-size: 20px;
  }
  .billing-contract-details,
  .billing-rate-grid {
    grid-template-columns: 1fr;
  }
  .billing-contract-card.is-lifetime .billing-contract-details,
  .billing-contract-card.is-free .billing-contract-details {
    grid-template-columns: 1fr;
  }
  .billing-rate-card {
    min-height: 0;
  }
  .billing-plan-link .btn-sm,
  .billing-portal .btn-sm {
    width: 100%;
    text-align: center;
  }
  .slug-input {
    flex-wrap: wrap;
    padding-top: 8px;
  }
  .slug-input input {
    order: 3;
    flex-basis: 100%;
    border-top: 1px solid var(--line) !important;
  }
  .url-comparison > div {
    grid-template-columns: 1fr;
  }
  .slug-actions {
    flex-direction: column-reverse;
  }
  .slug-actions .btn-sm {
    width: 100%;
  }
}
@media (min-width: 541px) and (max-width: 820px) {
  .billing-card {
    padding: 30px;
  }
  .billing-contract-card.is-lifetime .billing-contract-details,
  .billing-contract-card.is-free .billing-contract-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  button.billing-rate-card {
    transition: none;
  }
}

/* ---- Billing workspace: contract, comparison, guide ---- */
.billing-page-head {
  max-width: 660px;
}
.billing-page-head h1 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.billing-page .billing-options {
  margin-top: 34px;
}
.billing-options .billing-section-title {
  margin-bottom: 16px;
}
.billing-options .billing-section-title > span {
  display: block;
  color: var(--billing-accent-deep);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.billing-options .billing-section-title h2 {
  font-size: 20px;
  margin-bottom: 5px;
}
.billing-cta-note {
  color: var(--ink) !important;
  margin: 8px 0 0 !important;
  text-align: center;
  width: 100%;
}
.billing-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}
.billing-resource-card {
  display: flex;
  min-width: 0;
  min-height: 220px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  color: var(--ink);
  padding: 20px;
  text-decoration: none;
  transition:
    transform 150ms ease-out,
    border-color 150ms ease-out;
}
.billing-resource-card > span {
  color: var(--sub);
  font-size: 11px;
  font-weight: 700;
}
.billing-resource-card strong {
  font-size: 17px;
  margin: 8px 0;
}
.billing-resource-card p {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.75;
}
.billing-resource-card em {
  color: var(--billing-accent-deep);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  margin-top: auto;
  padding-top: 18px;
  white-space: nowrap;
}
.billing-resource-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.billing-resource-card:focus-visible,
.billing-page-links a:focus-visible,
.guide-index a:focus-visible,
.guide-faq summary:focus-visible,
.plan-card-action:focus-visible {
  outline: 3px solid var(--billing-focus);
  outline-offset: 3px;
}
.plans-current {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border-block: 1px solid var(--line);
  padding: 16px 0;
  margin-bottom: 28px;
}
.plans-current span {
  border-radius: 999px;
  background: var(--billing-accent-deep);
  color: #fff;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
}
.plans-current p {
  color: var(--sub);
  font-size: 12px;
  margin: 0;
}
.plans-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.plan-compare-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.plan-compare-card.is-current {
  background: var(--billing-muted-surface);
}
.plan-compare-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.plan-compare-card h2 {
  font-size: 19px;
}
.plan-compare-card header div > span {
  display: inline-block;
  color: var(--billing-accent-deep);
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
}
.plan-compare-card header p {
  text-align: right;
}
.plan-compare-card header strong {
  display: block;
  font-size: 20px;
  white-space: nowrap;
}
.plan-compare-card header small {
  color: var(--sub);
}
.plan-spec-list {
  margin: 10px 0 20px;
}
.plan-spec-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}
.plan-spec-list dt {
  color: var(--sub);
  font-size: 12px;
}
.plan-spec-list dd {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}
.plan-card-action {
  display: block;
  min-height: 44px;
  border-radius: 9px;
  background: var(--billing-accent-deep);
  color: #fff;
  margin-top: auto;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.plan-card-action.is-current,
.plan-card-action.is-disabled {
  background: #e6e0d6;
  color: #686158;
}
.plan-purpose {
  margin-top: 42px;
}
.plan-purpose h2,
.guide-section h2,
.guide-contact h2 {
  font-size: 20px;
  margin-bottom: 14px;
}
.plan-purpose > div,
.guide-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.plan-purpose article,
.guide-columns article,
.guide-fact {
  border-top: 1px solid var(--gold);
  background: var(--billing-highlight);
  padding: 18px;
}
.plan-purpose h3,
.guide-columns h3,
.guide-fact h3 {
  font-size: 15px;
  margin-bottom: 5px;
}
.plan-purpose p,
.guide-columns p,
.guide-fact p {
  font-size: 13px;
  line-height: 1.75;
}
.billing-page-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 38px;
  padding-top: 20px;
}
.billing-page-links a {
  min-height: 44px;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.guide-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}
.guide-index a {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.guide-section {
  scroll-margin-top: 20px;
  margin-top: 42px;
}
.guide-steps {
  list-style: none;
  counter-reset: billing-guide;
  display: grid;
  gap: 0;
  margin-bottom: 18px;
}
.guide-steps li {
  counter-increment: billing-guide;
  display: grid;
  grid-template-columns: 36px 180px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.guide-steps li::before {
  content: counter(billing-guide, decimal-leading-zero);
  color: var(--billing-accent-deep);
  font-size: 12px;
  font-weight: 700;
}
.guide-steps strong {
  font-size: 14px;
}
.guide-steps span {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.7;
}
.guide-faq details {
  border-top: 1px solid var(--line);
}
.guide-faq details:last-of-type {
  border-bottom: 1px solid var(--line);
}
.guide-faq summary {
  cursor: pointer;
  min-height: 52px;
  padding: 15px 34px 15px 0;
  font-weight: 700;
}
.guide-faq details p {
  max-width: 68ch;
  color: var(--sub);
  line-height: 1.8;
  padding: 0 0 18px;
}
.guide-contact {
  border: 1px solid var(--line);
  background: var(--billing-muted-surface);
  margin-top: 42px;
  padding: 20px;
}
.guide-contact p {
  line-height: 1.8;
  margin-bottom: 10px;
}

@media (max-width: 700px) {
  .billing-rate-grid,
  .billing-resource-grid,
  .plans-card-grid,
  .plan-purpose > div,
  .guide-columns {
    grid-template-columns: 1fr;
  }
  .billing-resource-card {
    min-height: 0;
  }
  .billing-rate-card.is-lifetime {
    min-height: 0;
  }
  .billing-rate-card.is-lifetime em {
    width: 100%;
  }
  .plans-current {
    grid-template-columns: 1fr;
  }
  .plan-compare-card header {
    flex-direction: column;
  }
  .plan-compare-card header p {
    text-align: left;
  }
  .guide-steps li {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .guide-steps li span {
    grid-column: 2;
  }
  .billing-page-links {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 414px) {
  .guide-index {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .guide-index a {
    display: grid;
    place-items: center;
    text-align: center;
  }
  .plan-spec-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .plan-spec-list dd {
    text-align: left;
  }
}

/* ---- アカウント設定 ---- */
.account-page {
  min-height: 100vh;
}
.account-shell {
  width: min(100% - 36px, 820px);
  margin: 0 auto;
  padding: 32px 0 72px;
}
.account-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.account-back:hover {
  color: var(--gold);
}
.account-back:focus-visible,
.account-page button:focus-visible,
.account-page input:focus-visible {
  outline: 3px solid var(--billing-focus);
  outline-offset: 3px;
}
.account-head {
  max-width: 620px;
  margin: 20px 0 28px;
}
.account-head > span,
.account-current span {
  color: var(--sub);
  font-size: 11px;
  font-weight: 700;
}
.account-head h1 {
  margin: 4px 0 8px;
  font-size: clamp(26px, 5vw, 36px);
  overflow-wrap: anywhere;
}
.account-head p,
.account-card header > p,
.account-field p,
.account-flow span {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.75;
}
.account-notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--ok);
  border-radius: 10px;
  background: var(--panel);
  margin-bottom: 18px;
  padding: 14px 16px;
}
.account-notice.is-error {
  border-left-color: var(--danger);
}
.account-notice strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}
.account-notice p {
  font-size: 13px;
  line-height: 1.6;
}
.account-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  margin-bottom: 22px;
}
.account-current h2 {
  margin-top: 3px;
  font-size: 16px;
}
.account-current > p {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}
.account-settings {
  display: grid;
  gap: 18px;
}
.account-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 10px 30px -26px rgba(90, 64, 40, 0.5);
}
.account-card.is-active {
  border-top: 4px solid var(--gold);
}
.account-card > header {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.25fr);
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 18px;
}
.account-card h2 {
  margin-top: 5px;
  font-size: 21px;
}
.account-state {
  display: inline-block;
  color: var(--billing-accent-deep);
  font-size: 11px;
  font-weight: 700;
}
.account-next,
.account-caution {
  border-left: 3px solid var(--gold-lt);
  background: var(--billing-highlight);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
}
.account-step {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.account-step strong,
.account-step span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.account-step span {
  color: var(--sub);
}
.account-form {
  margin-top: 18px;
}
.account-field {
  margin-bottom: 16px;
}
.account-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 700;
}
.account-field p {
  margin-bottom: 7px;
}
.account-field input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf9f5;
  padding: 10px 12px;
  font-size: 16px;
}
.account-field input:focus {
  border-color: var(--gold);
}
.account-primary,
.account-secondary {
  min-height: 46px;
  border-radius: 9px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}
.account-primary {
  border: 1px solid var(--billing-accent-deep);
  background: var(--billing-accent-deep);
  color: #fff;
}
.account-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.account-primary:disabled,
.account-secondary:disabled {
  cursor: wait;
  opacity: 0.55;
  text-decoration: line-through;
}
.account-inline-form {
  margin-top: 10px;
}
.account-cancel {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.account-link-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 0;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.account-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}
.account-flow li {
  border-top: 2px solid var(--gold-lt);
  padding-top: 10px;
}
.account-flow strong,
.account-flow span {
  display: block;
}
.account-form[aria-busy='true'] {
  opacity: 0.75;
}
@media (max-width: 600px) {
  .account-shell {
    width: min(100% - 24px, 820px);
    padding-top: 16px;
  }
  .account-current,
  .account-card > header,
  .account-flow {
    grid-template-columns: minmax(0, 1fr);
  }
  .account-current {
    gap: 8px;
  }
  .account-current > p {
    text-align: left;
  }
  .account-card {
    padding: 18px;
  }
  .account-step {
    flex-direction: column;
  }
  .account-primary,
  .account-secondary,
  .account-link-button {
    width: 100%;
  }
}
