/* ==========================================================================
   MiriCanvas Japan Partners Community - Prototype Stylesheet
   ========================================================================== */

:root {
  --color-primary: #21afbf;
  --color-primary-dark: #1b8b98;
  --color-bg-tint: #e9f9fb;
  --color-bg: #ffffff;
  --color-bg-alt: #f7fafb;
  --color-text: #1f2933;
  --color-text-sub: #64748b;
  --color-border: #e2e8ec;
  --color-danger: #e0554f;
  --color-warning: #e8a33d;
  --color-success: #3fa66a;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --header-height: 64px;
  --max-width: 1080px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic",
    "Meiryo", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 2026-10-04: パートナーページ(guide/*.html, ハブ+5個の独立ページ全部が
   data-page="guide")限定 - ヒーロー(.list-page-head)と本文の背景が両方
   var(--color-bg-alt)で同じ値なのに、間に挟まる他の白い要素のせいで
   「ヒーローは灰色、本文は白」に見えていた問題(ユーザー指摘) - body自体を
   bg-altにして、その間に白い隙間ができる余地をなくす。 */
body[data-page="guide"] {
  background: var(--color-bg-alt);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.page-main {
  padding-top: var(--header-height);
}

.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--color-border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-tint {
  background: var(--color-bg-tint);
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-primary-dark);
  background: var(--color-bg-tint);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 12px;
}

.section-desc {
  color: var(--color-text-sub);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
}

.placeholder-note {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-warning);
  border: 1px dashed var(--color-warning);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

/* --------------------------------------------------------------------------
   Header / Desktop Nav
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.site-header .wrap {
  max-width: 1240px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
}

.brand .brand-sub {
  display: block;
  color: var(--color-text-sub);
  font-weight: 600;
  font-size: 12px;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-desktop::-webkit-scrollbar {
  display: none;
}

.nav-desktop a {
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.nav-desktop a:hover {
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
}

.nav-desktop a.active {
  color: var(--color-primary-dark);
  background: var(--color-bg-tint);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn .short-label {
  display: none;
}

.btn-primary {
  background: var(--color-primary-dark);
  color: #fff;
}

.btn-primary:hover {
  background: #146873;
}

/* 2026-10-19追加 - :disabled状態の見た目が一切定義されていなかったため、
   disabled属性が付いていてもアクティブなボタンと見分けがつかなかった
   (「選択した活動を謝礼発送案件に入れる」ボタンが「デフォルトで非活性化に
   見えない」との指摘 - クリックは実際には無効化されていたが、見た目だけ
   アクティブに見えていた)。 */
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary:disabled {
  background: var(--color-text-sub);
}

.btn-arrow-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  vertical-align: -1px;
}

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

.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.user-chip .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}

.user-chip .avatar.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: all 0.2s ease;
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
}

/* --------------------------------------------------------------------------
   Mobile side panel
   -------------------------------------------------------------------------- */

.mobile-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mobile-panel-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(78vw, 320px);
  background: #fff;
  z-index: 151;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

.mobile-panel.open {
  transform: translateX(0);
}

.mobile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.mobile-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 16px;
}

.mobile-panel-body {
  padding: 12px 8px;
  overflow-y: auto;
  flex: 1;
}

.mobile-panel-body a {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
}

.mobile-panel-body a.active {
  color: var(--color-primary-dark);
  background: var(--color-bg-tint);
}

.mobile-panel-body a:active {
  background: var(--color-bg-alt);
}

.mobile-panel-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   Login / Signup modal
   -------------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 380px;
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-md);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-alt);
  font-size: 14px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 18px;
}

.modal-tabs {
  display: flex;
  gap: 4px;
  background: var(--color-bg-alt);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
}

.modal-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-sub);
}

.modal-tab.active {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
}

.modal-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.modal-panel.active {
  display: flex;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-sub);
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-chip {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  cursor: pointer;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.checkbox-chip input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.checkbox-chip:has(input:checked) {
  background: var(--color-bg-tint);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  font-weight: 700;
}

.survey-section {
  margin-bottom: 26px;
}

.survey-section h4 {
  font-size: 14px;
  margin: 0 0 10px;
}

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--color-text-sub);
}

.agree-row input {
  margin-top: 3px;
  flex-shrink: 0;
}

.field input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.role-select {
  display: flex;
  gap: 8px;
}

.role-option {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-sub);
  cursor: pointer;
}

.role-option input {
  display: none;
}

.role-option.selected {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  background: var(--color-bg-tint);
}

.field-hint {
  font-size: 11px;
  color: var(--color-text-sub);
}

.mock-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-warning);
  border: 1px solid var(--color-warning);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  margin-left: 6px;
}

.modal-forgot {
  text-align: right;
  font-size: 12px;
  color: var(--color-primary-dark);
  font-weight: 700;
}

.modal-submit {
  width: 100%;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Home - hero / video
   -------------------------------------------------------------------------- */

.hero {
  padding: 56px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 32px;
  font-weight: 900;
  margin: 0 0 14px;
}

.hero p {
  color: var(--color-text-sub);
  font-size: 15px;
  margin: 0 0 28px;
}

.video-frame {
  max-width: 720px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f2b30, #1b8b98);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-frame .play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.video-frame .video-caption {
  position: absolute;
  bottom: 16px;
  font-size: 12px;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   3 points / feature grids
   -------------------------------------------------------------------------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.home-hero-video {
  max-width: 720px;
  margin: 0 auto;
}

.home-showcase-image {
  margin: 24px 0 0;
}

.home-showcase-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  display: block;
}

.security-cert-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ロゴだけでは何の認証か伝わらないので、下に名称と一言説明を添える */
.security-cert {
  text-align: center;
}

.security-cert img {
  width: 100%;
  height: 96px;
  object-fit: contain;
  display: block;
  margin-bottom: 14px;
}

.security-cert h4 {
  font-size: 17px;
  margin: 0 0 6px;
}

.security-cert p {
  font-size: 13px;
  color: var(--color-text-sub);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 760px) {
  .security-cert-row {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 32px;
  }
}

.brand-guide-logo-img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  display: block;
}

.point-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: left;
}

.point-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  display: block;
}

.point-card .icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.point-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

.point-card p {
  font-size: 13.5px;
  color: var(--color-text-sub);
  margin: 0;
}

/* Step row */

.step-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step-card {
  position: relative;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
}

.step-card-image {
  width: 100%;
  /* 4枚のスクショは縦横比が数px単位でずれるので、枠の比率を固定して
     カードの高さを揃える(はみ出すのは下端の数px程度) */
  aspect-ratio: 40 / 31;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: block;
}

.step-card .step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.step-card h4 {
  font-size: 14px;
  margin: 0 0 6px;
}

.step-card p {
  font-size: 12.5px;
  color: var(--color-text-sub);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.price-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  background: #fff;
  text-align: center;
}

.price-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-bg-tint);
}

.price-card .plan-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-text-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.price-card .plan-price {
  font-size: 26px;
  font-weight: 900;
  margin: 10px 0 4px;
}

.price-card .plan-price span {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-sub);
}

.price-card ul {
  margin-top: 16px;
  text-align: left;
  font-size: 12.5px;
  color: var(--color-text-sub);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-card li::before {
  content: "✓ ";
  color: var(--color-primary);
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-num {
  font-size: 34px;
  font-weight: 900;
  color: var(--color-primary-dark);
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-sub);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Logo grid / security placeholders
   -------------------------------------------------------------------------- */

.logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.logo-box {
  aspect-ratio: 2 / 1;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-sub);
  font-size: 11px;
  background: var(--color-bg-alt);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.security-card {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  color: var(--color-text-sub);
  font-size: 13px;
  background: var(--color-bg-alt);
}

.security-card .icon {
  font-size: 22px;
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Brand guide block
   -------------------------------------------------------------------------- */

.brand-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.brand-guide-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  background: #fff;
}

.brand-guide-card h4 {
  font-size: 14px;
  margin: 0 0 14px;
}

.swatch-row {
  display: flex;
  gap: 10px;
}

.swatch {
  flex: 1;
  border-radius: var(--radius-sm);
  height: 56px;
  display: flex;
  align-items: flex-end;
  padding: 6px;
  font-size: 10px;
  color: #fff;
  font-weight: 700;
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-sub);
}

.rule-list b {
  color: var(--color-text);
}


/* Event "apply" CTA - a wide static button placed right below the event's
   meta info block (not a floating bar - floating buttons went unnoticed). */
.event-apply-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-dark);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  margin: 14px 0;
}

.event-apply-cta:hover {
  background: #146873;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 40px 0 0;
  font-size: 12.5px;
  color: var(--color-text-sub);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 28px;
}

.footer-brand-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--color-text);
}

.footer-brand p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.footer-col h5 {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col a {
  color: var(--color-text-sub);
}

.footer-col a:hover {
  color: var(--color-primary-dark);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--color-border);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 0;
  text-align: center;
}

.footer-simple-brand b {
  font-size: 15px;
  color: var(--color-text);
}

.footer-simple-brand p {
  margin: 4px 0 0;
}

.footer-simple-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
}

.footer-simple-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-bg-tint);
  color: var(--color-text-sub);
}

.footer-simple-social a:hover {
  background: var(--color-primary);
  color: #fff;
}

.footer-simple-copyright {
  margin: 4px 0 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .nav-desktop {
    display: none;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .brand .brand-sub {
    display: none;
  }

  .header-actions .btn .full-label {
    display: none;
  }

  .header-actions .btn .short-label {
    display: inline;
  }

  .header-actions .user-chip span:not(.avatar) {
    display: none;
  }

  .header-actions #logout-btn {
    display: none;
  }

  .header-actions .user-chip {
    padding: 6px;
  }

  .grid-3,
  .grid-4,
  .step-row,
  .pricing-grid,
  .stats-row,
  .brand-guide {
    grid-template-columns: 1fr;
  }

  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .security-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 24px;
  }

  .section {
    padding: 44px 0;
  }

  .section-title {
    font-size: 22px;
  }

  .pin-grid {
    columns: 2 160px;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-main {
    padding: 20px 16px;
  }
}

/* ==========================================================================
   List / gallery pages (news, events, learning, sns, freetalk)
   ========================================================================== */

.list-page-head {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

/* title/description on the left, the write CTA pinned to the bottom-right
   corner of the hero (colored the same as an active filter chip, so it
   reads as "the" primary action on the page) */
.list-page-head-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.list-page-head h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

.list-page-head p {
  color: var(--color-text-sub);
  font-size: 13.5px;
  margin: 0;
  max-width: 640px;
}

.list-page-head-cta {
  flex-shrink: 0;
  background: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .list-page-head-top {
    flex-direction: column;
    align-items: stretch;
  }
  .list-page-head-cta {
    align-self: flex-end;
  }
}

/* below the hero, not inside it - the view toggle sits first, then the
   filter chips. Only .filter-tabs goes display:contents (its chips flow
   as individual pills in the wrap); .view-toggle keeps its own box so its
   two options read as ONE connected control, not two loose chips that
   just happen to match the chips' look - same outer height/radius as a
   single .filter-tab so it doesn't look out of place sized against them. */
.filter-view-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-view-row .filter-tabs {
  display: contents;
}

.filter-tab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-sub);
  background: #fff;
}

.filter-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Real toggle switch, not two pickable buttons: one sliding thumb behind
   whichever icon is active, whole track is one click target that flips
   list<->gallery (see renderViewToggle in post-render.js). */
.view-toggle {
  position: relative;
  flex-shrink: 0;
  display: flex;
  width: 64px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.view-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 3px);
  height: calc(100% - 4px);
  border-radius: 999px;
  background: var(--color-primary);
  transition: transform 0.18s ease;
}

.view-toggle.is-gallery .view-toggle-thumb {
  transform: translateX(calc(100% + 2px));
}

.view-toggle button {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: var(--color-text-sub);
  background: transparent;
  pointer-events: none;
  transition: color 0.18s ease;
}

.view-toggle button.active {
  color: #fff;
}

.filter-tab-count {
  font-size: 11px;
  font-weight: 800;
  opacity: 0.7;
}

.filter-tab.active .filter-tab-count {
  opacity: 0.9;
}

.topic-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.list-body {
  padding: 24px 0 80px;
}

.role-pill {
  background: #eef0f4;
  color: var(--color-text-sub);
}

.category-pill {
  font-weight: 800;
}

.tag-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
  white-space: nowrap;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-approved {
  background: #e7f6ee;
  color: var(--color-success);
}

.status-pending {
  background: #fdf2e0;
  color: var(--color-warning);
}

.status-hold {
  background: #eef0f4;
  color: var(--color-text-sub);
}

.status-rejected {
  background: #fdeceb;
  color: var(--color-danger);
}

.status-ended {
  background: #eef0f4;
  color: var(--color-text-sub);
}

.status-upcoming {
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
}

.status-private {
  background: #eef0f4;
  color: var(--color-text-sub);
}

.status-archive {
  background: #fdf3e0;
  color: #92650f;
}

/* --- List view row --- */

.post-list {
  margin-top: 8px;
  border-top: 1px solid var(--color-border);
}

.post-list-item {
  display: flex;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--color-border);
  align-items: flex-start;
}

.post-list-item .thumb {
  width: 92px;
  height: 68px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
}

.post-list-item .content {
  flex: 1;
  min-width: 0;
}

.post-list-item .meta-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.post-list-item h3 {
  font-size: 15px;
  margin: 0 0 6px;
  font-weight: 700;
}

.post-list-item .excerpt {
  font-size: 13px;
  color: var(--color-text-sub);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-counts {
  color: var(--color-text-sub);
  font-size: 12px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.card-counts svg {
  flex-shrink: 0;
  vertical-align: -1px;
}

.card-counts-sep {
  margin: 0 2px;
}

.post-list-item .sub-meta {
  font-size: 12px;
  color: var(--color-text-sub);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.post-list-item.opacity-muted {
  opacity: 0.55;
}

.post-list-item .sub-meta .comment-avatar,
.post-gallery-card .sub-meta .comment-avatar {
  width: 18px;
  height: 18px;
  font-size: 9px;
}

/* --- Gallery view grid --- */

.post-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

@media (max-width: 860px) {
  .post-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .post-gallery {
    grid-template-columns: 1fr;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }
}

.post-gallery-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.post-gallery-card .thumb {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
}

.post-gallery-card .body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-gallery-card h3 {
  font-size: 14px;
  margin: 0;
  font-weight: 700;
}

.post-gallery-card .sub-meta {
  font-size: 11.5px;
  color: var(--color-text-sub);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ==========================================================================
   Pinterest / feed grid (SNS)
   ========================================================================== */

.pin-grid {
  columns: 3 220px;
  column-gap: 16px;
  margin-top: 20px;
}

.pin-card {
  display: block;
  break-inside: avoid;
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.pin-card .og-image {
  padding: 28px 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 110px;
  justify-content: flex-end;
}

.pin-card .og-platform {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.pin-card .og-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.pin-card .og-body {
  padding: 12px 14px;
}

.pin-card .og-desc {
  font-size: 12.5px;
  color: var(--color-text-sub);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pin-card .og-meta {
  font-size: 11.5px;
  color: var(--color-text-sub);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .pin-grid {
    columns: 1;
  }
}

/* ==========================================================================
   Discovery grid (SNS) - Instagram-explore style masonry of external cards
   ========================================================================== */

/* 2026-10-04(2차): CSS만으로는 "순서가 보이면서도 빈틈 없이 빽빽한" 두 요구를
   동시에 못 맞춘다 - 멀티컬럼(columns)은 순서가 1열에 몰리고, 일반 그리드
   (grid-template-columns)는 한 줄의 높이가 제일 큰 카드에 맞춰져 짧은 카드
   밑에 큰 여백이 생긴다(사용자 지적: "구글킵/핀터레스트처럼 안 되냐").
   그래서 JS(renderGrid)가 직접 칼럼 DIV를 n개 만들고, 카드를 하나씩 "지금
   제일 짧은 칼럼"에 넣는 방식(그리디 빈패킹)으로 바꿨다 - 순서는 거의
   그대로 유지되면서(비슷한 높이끼리는 왼쪽->오른쪽 순서 그대로 배치됨),
   Keep/Pinterest처럼 칼럼마다 빈틈 없이 빽빽하게 쌓인다. */
.discovery-grid {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 20px;
}

.discovery-grid-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.discovery-card {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.discovery-card-media {
  position: relative; /* 좌상단 채널배지/우상단 비공개배지를 absolute로 띄우기 위한 기준 */
  width: 100%;
  min-height: 140px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.discovery-card-badge {
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.discovery-card-badge-channel {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

/* 우상단 배지 묶음 - New배지(있으면)와 상태배지(있으면)를 가로로 나열한다.
   2026-10-04: 각 배지를 개별 absolute로 두면 겹치므로, flex그룹 하나로
   묶어 New가 항상 상태배지 "왼쪽"에 오도록 한다(사용자 지정 순서). */
.discovery-card-badge-group {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  gap: 4px;
}

.discovery-card-badge-new {
  background: #ff5a5f;
  color: #fff;
}

.discovery-card-badge-status {
  background: rgba(33, 175, 191, 0.88); /* 읽어들이는 중(pending) - 테마 포인트컬러 */
  color: #fff;
}

.discovery-card-badge-status-failed {
  background: rgba(31, 41, 51, 0.82); /* 영구 로드불가(failed_permanent) - 중립 짙은회색 */
}

.discovery-card-media .video-embed-wrap {
  margin-bottom: 0;
  border-radius: 0;
}

/* columns:3のマソンリー風レイアウト(.discovery-grid)は各カードの高さで
   段組みを詰めるため、loading="lazy"の画像が後から読み込まれて高さが変わる
   たびに、そのカード以降 - 同じ列の下の方だけでなく、他の列にどのカードが
   落ちるかまで - 再計算されて見える(「中央・右列がガタガタ動く」の正体)。
   アスペクト比を先に固定して箱のサイズを最初から確定させれば、画像が実際に
   届いた時もサイズが変わらずただフェードインするだけになる。 */
.discovery-card-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* min-heightは持たせない(.discovery-card-mediaの高さはimgのaspect-ratioで
   既に確定済み) - ここで別の高さを指定すると、読み込み完了時にこのクラスが
   外れた瞬間に箱の高さが変わり、せっかく直したレイアウトシフトが
   ミニチュア版で再発する。 */
.discovery-card-loading {
  background: linear-gradient(100deg, var(--color-bg-alt) 30%, #eef2f4 50%, var(--color-bg-alt) 70%);
  background-size: 200% 100%;
  animation: discovery-shimmer 1.4s infinite;
}

@keyframes discovery-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.discovery-card-fallback {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-text-sub);
}

/* 写真が取れず本文(og:description)だけ確保できた投稿用 - 空の色付き
   プレースホルダーではなく実際の投稿文を見せるので、そのぶん背が高い。 */
.discovery-card-textonly {
  min-height: 0;
  align-items: flex-start;
  background: var(--color-bg-tint);
  padding: 16px;
}

.discovery-card-textonly p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}

.discovery-card-body {
  padding: 10px 12px;
}

.discovery-card-platform {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--color-primary-dark);
  background: var(--color-bg-tint);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.discovery-card-title {
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Post detail (news / events / learning / freetalk)
   ========================================================================== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-sub);
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
}

/* 本人/運営だけに見せる案内(例: SNS投稿のOG自動取得失敗) - 公開範囲が違うことが
   一目でわかるよう、本文のカードとは違う色調(警告寄り)にする。 */
.private-notice {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fff8e6;
  border: 1px solid #f0d58c;
}

.private-notice b {
  font-size: 13px;
  color: #8a6400;
}

.private-notice p {
  margin: 6px 0 10px;
  font-size: 12.5px;
  color: var(--color-text-sub);
}

.back-link:hover {
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
  background: var(--color-bg-tint);
}

.back-link-icon {
  font-size: 17px;
  line-height: 1;
}

.post-detail {
  padding: 96px 0 80px;
}

.post-detail-narrow {
  max-width: 720px;
  margin: 0 auto;
}

.post-detail-head {
  margin-bottom: 24px;
}

.post-detail-head h1 {
  font-size: 22px;
  margin: 12px 0;
}

.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-sub);
  flex-wrap: wrap;
}

.post-owner-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.post-owner-action-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-sub);
  font-size: 12.5px;
  cursor: pointer;
}

.post-owner-action-btn:hover {
  background: var(--color-bg-tint);
  color: var(--color-text);
}

.post-owner-action-danger:hover {
  background: #fdeceb;
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.post-detail-body {
  font-size: 14.5px;
  line-height: 1.9;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.post-detail-body img {
  border-radius: var(--radius-sm);
}

.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  background: #000;
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.post-detail-thumb {
  aspect-ratio: 16/7;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #fff;
  margin-bottom: 20px;
}

.reaction-bar {
  display: flex;
  gap: 8px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.reaction-chip {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--color-text-sub);
}

.reaction-chip.active {
  border-color: var(--color-primary);
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
}

.reaction-chip.add {
  color: var(--color-text-sub);
}

/* Who-reacted popover - avatar + name listed vertically, shown on hover
   (replaces a plain title="" tooltip). */
.reaction-chip-wrap {
  position: relative;
  display: inline-block;
}

.reaction-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-width: 150px;
  max-width: 240px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 6px;
}

.reaction-chip-wrap:hover .reaction-popover {
  display: flex;
}

.reaction-popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.reaction-popover-item .comment-avatar {
  width: 22px;
  height: 22px;
  font-size: 10px;
  flex-shrink: 0;
}

.reaction-popover-avatar-anon {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.reaction-popover-note {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  white-space: normal;
}

.emoji-picker {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 8px;
  box-shadow: var(--shadow-md);
  z-index: 20;
}

.emoji-picker[hidden] {
  display: none;
}

.emoji-picker-option {
  border: none;
  background: transparent;
  font-size: 17px;
  padding: 2px 4px;
  border-radius: 6px;
  line-height: 1;
}

.emoji-picker-option:hover {
  background: var(--color-bg-tint);
}

.emoji-picker-option.active {
  background: var(--color-bg-tint);
  outline: 2px solid var(--color-primary);
}

/* comments */

.comment-section {
  margin-top: 8px;
}

.comment-section h4 {
  font-size: 14px;
  margin: 0 0 14px;
}

.comment-compose {
  margin-bottom: 24px;
}

.comment-compose-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.comment-body-wrap {
  flex: 1;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  margin-bottom: 4px;
}

.comment-meta b {
  font-size: 13px;
}

.comment-owner-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.comment-owner-action-btn {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-sub);
  font-size: 11.5px;
  cursor: pointer;
}

.comment-owner-action-btn:hover {
  background: var(--color-bg-tint);
  color: var(--color-text);
}

.comment-owner-action-danger:hover {
  background: #fdeceb;
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.comment-text {
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 6px;
}

.comment-deleted-notice {
  color: var(--color-text-sub);
  font-style: italic;
}

/* comment.bodyHtmlの<p>がブラウザ既定マージン(上下各~1em)のままだったので、
   最初の行が上に寄らず・最後の行が下に余分に空いて見えていた問題を修正。 */
.comment-text p {
  margin: 0.3em 0;
}
.comment-text p:first-child {
  margin-top: 0;
}
.comment-text p:last-child {
  margin-bottom: 0;
}

/* 返信するボタンは独立した行ではなく、reaction-bar(＋絵文字)と同じ行に並べる -
   reaction-barのouterHTML差し替え(トグル時の再描画)に巻き込まれないよう、この
   行自体はreaction-barの「外側」の兄弟コンテナであり、見た目だけ横並びにする。 */
.comment-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reply-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: var(--color-text-sub);
  font-size: 12.5px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.reply-trigger-btn:hover {
  color: var(--color-primary-dark);
}

.reply-trigger-btn svg {
  flex-shrink: 0;
}

.reply-list {
  margin-top: 12px;
  margin-left: 20px;
  padding-left: 16px;
  border-left: 2px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==========================================================================
   Composer modal (write post)
   ========================================================================== */

.modal-wide {
  max-width: 560px;
}

/* Composer modal: header + submit stay fixed, only the field area scrolls
   when the viewport is short. Full-screen by default (the write flow gets
   the whole viewport rather than a small centered popup). */
.modal-overlay-fullscreen {
  padding: 0;
}

.modal-composer {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  padding-bottom: 20px;
}

/* 2026-10-03: フルスクリーン筐体を使わない縮小版コンポーザー(SNS共有の
   「URL+公開範囲だけ」のような少数項目向け) - 基本の.modal(max-width:380px)
   だと入力欄が窮屈なので少し広げるだけで、高さは内容に合わせて自然に縮む
   (上の.modal-composerのmax-height:88vhはそのまま安全網として残す)。 */
.modal-composer.modal-compact {
  max-width: 480px;
  /* 2026-10-04: 破棄/登録ボタンがモーダルの枠内に浮いて見えていた問題 -
     .modal-fullscreenと同じく、枠自体のpaddingを0にしてheadとfoot側で
     それぞれ必要な余白を持たせ、footはモーダルの角そのものに密着させる。 */
  padding: 0;
}

.modal-compact .modal-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}

.modal-compact .composer-scroll-area {
  padding: 16px 24px;
  margin: 0;
}

.modal-compact .composer-foot {
  margin: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}

.modal-compact .composer-foot button {
  border-radius: 0;
  padding: 16px;
  font-size: 15px;
}

.modal-composer.modal-fullscreen {
  max-width: 100%;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  border-radius: 0;
  padding: 0;
}

.modal-fullscreen .modal-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}

.modal-fullscreen .composer-scroll-area {
  padding: 16px 24px;
  margin: 0;
  max-width: 720px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.modal-fullscreen .composer-foot {
  margin: 0;
  border-radius: 0;
}

.modal-fullscreen .composer-foot button {
  border-radius: 0;
  padding: 16px;
  font-size: 15px;
}

/* Desktop: the write flow doesn't need the whole viewport the way it does
   on mobile - a centered popup (narrower, still tall) reads better. Mobile
   keeps the full-bleed fullscreen treatment above untouched. */
@media (min-width: 860px) {
  .modal-overlay-fullscreen {
    padding: 20px;
  }

  .modal-composer.modal-fullscreen {
    max-width: 680px;
    width: 100%;
    height: 88vh;
    height: 88dvh;
    max-height: 88vh;
    max-height: 88dvh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }

  .modal-fullscreen .composer-scroll-area {
    padding: 16px 24px;
  }

  /* the modal itself is rounded here (not full-bleed like mobile) - the
     two buttons stay flush square against EACH OTHER, but the footer row
     as a whole needs to round its own bottom-left/bottom-right corners to
     match, otherwise square button corners poke out past the modal's own
     rounded edge and the pair reads as crooked/mismatched. */
  .modal-fullscreen .composer-foot {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
  }
}

.modal-composer .modal-head {
  flex-shrink: 0;
}

.composer-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* iOS Safari's momentum-scroll can silently give up partway through a
     NESTED scroll container (the editor's own overflow-y:auto adds one
     more layer inside this one) - this is the standard fix so a touch-
     scroll started anywhere in this area, including over the editor,
     reliably reaches every field below it instead of stalling. */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px;
  margin: 4px 0;
}

/* discard (left, secondary) and submit (right, primary) sit side by side,
   flush against each other at an even 5:5 split (both used to stack
   full-width, and a 1:2 split still read lopsided - explicit feedback on
   both). A thin border stands in for a gap so there's still a visible
   seam between them without breaking the rounded-corner clipping above. */
.composer-error {
  flex-shrink: 0;
  margin: 6px 20px 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: #fdecea;
  color: var(--color-danger);
  font-size: 13px;
}

.composer-foot {
  flex-shrink: 0;
  display: flex;
  margin-top: 4px;
}

.composer-submit-fixed,
.composer-discard-btn {
  flex: 1;
  min-width: 0;
  border-radius: 0;
  /* .modal-submit (a shared base class) sets margin-top:4px, which the
     discard button doesn't have - in a flex row that shrinks the submit
     button's cross-size by 4px relative to its sibling, so the two read
     as slightly different heights even though every other property
     (padding, border, font-size) matches exactly. */
  margin-top: 0;
}

.composer-discard-btn {
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid var(--color-border);
}

.field-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.field-row > label {
  width: 96px;
  flex-shrink: 0;
  padding-top: 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-sub);
}

.field-row .field-row-input {
  flex: 1;
  min-width: 0;
}

.field-row .field-row-input input,
.field-row .field-row-input select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 13.5px;
  font-family: inherit;
}

/* Stacked field (label above, full-width content below) - used for the body
   editor so it isn't squeezed by a side label like the short fields are. */
.field-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.field-stack .composer-editor-mount {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.field-stack > label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-sub);
}

.thumb-field-preview {
  display: none;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: 8px;
}

.thumb-field-preview.has-img {
  display: block;
}

.thumb-field-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-field-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.thumb-field-or {
  font-size: 12px;
  color: var(--color-text-sub);
}

.thumb-field-controls input[type="url"] {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}

.thumb-field-remove {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-sub);
  font-size: 12px;
}

.thumb-field-remove:hover {
  border-color: var(--color-danger, #e0554f);
  color: var(--color-danger, #e0554f);
}

.topic-chip-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.topic-chip-option {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  background: #fff;
  color: var(--color-text-sub);
}

.topic-chip-option.selected {
  background: var(--color-bg-tint);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  font-weight: 700;
}

@media (max-width: 560px) {
  .field-row {
    flex-direction: column;
    /* the base rule is align-items:flex-start, which only made sense
       side-by-side (label sized to its own text) - stacked, it left every
       field-row-input shrink-to-fit its own input's browser-default width
       instead of filling the row, so category/title/event-date etc. each
       ended up a different width. Stretch makes them all match. */
    align-items: stretch;
    gap: 4px;
  }
  .field-row > label {
    width: auto;
    padding-top: 0;
  }
}

/* Block background (Notion-style: the whole block gets a color tint) -
   applies to rendered post/comment bodies (both migrated content and the
   block editor's own saved output use plain background-color styles). */
.post-detail-body p[style*="background-color"],
.comment-text p[style*="background-color"] {
  padding: 6px 10px;
  border-radius: 4px;
  margin: 4px 0;
}

/* Callout block (💡) - same look for migrated Slashpage .sp-callout content
   and the block editor's own callout blocks (icon is a real character in
   the markup, not a CSS ::before, so no extra rule needed for that). */
.post-detail-body .sp-callout,
.comment-text .sp-callout {
  background: var(--color-bg-tint);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 8px 0;
}

/* --------------------------------------------------------------------------
   Block editor (js/block-editor.js) - built on Tiptap. Tiptap is headless
   (no UI of its own), so everything here is hand-styled: the editable
   surface itself, the gutter (+/drag-handle, positioned automatically by
   the DragHandle extension - only its contents need CSS from us), the
   floating selection toolbar, block/insert popovers, callout, media/file
   blocks, and the emoji picker. Shared by the post composer and comments.
   -------------------------------------------------------------------------- */

.be-root {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  min-height: 260px;
  overflow-y: auto;
  font-size: 13.5px;
}

/* The main post composer has no per-block gutter overlap problem to solve
   with a border box - it drops the border entirely (a divider above the
   editor takes its place, see .composer-body-divider). 2026-10-04: 좌우
   패딩은 제거 - 가터가 뜰 공간은 .be-content-has-gutter의 margin-left가 이미
   확보하고 있어 이 패딩은 이중 확보였고, 우측은 애초에 가터가 없어 불필요한
   채 디바이더선보다 입력창을 좁게만 만들고 있었다(사용자 지적, 2026-10-04). */
.be-root:not(.be-compact) {
  border: none;
  padding: 4px 0 14px 0;
  /* the base rule makes .be-root its OWN scroll container (overflow-y:
     auto) - fine for the small fixed-height comment box, but the full
     post editor should just grow taller as you type and let the ONE
     outer popup scroll (.composer-scroll-area) show more of it, not
     scroll internally itself. A nested scroll container here is also the
     likely cause of "can't reach the editor" on mobile - iOS Safari's
     touch-scroll can get stuck handing the gesture from an outer
     scrollable to one nested inside it. */
  overflow-y: visible;
}

@media (min-width: 860px) {
  .be-root:not(.be-compact) {
    min-height: 420px;
  }
}

.be-compact {
  min-height: 70px;
  /* comment box felt top/bottom-heavy and loosely spaced compared to a
     typical chat-style input - tighter line-height, and more horizontal
     than vertical padding (the base .be-root padding is the reverse:
     14px 10px, tuned for the full post editor, not a compact one). */
  padding: 13px 14px 10px;
  /* 上下paddingは数値上同じ(10px)でも、文字のline-height(1.5)上側の行間が
     下側より視覚的に余白として残りやすく、上下對称にしても下の方が余白が
     広く見えていた - 上だけ少し足して体感を揃える。 */
  /* あえて縦中央揃え(flex+justify-content:center)にしていなかった理由:
     1行だけの短い文章は70px最小高さの箱の中で上寄りに見える反面、2行目を
     打った瞬間にブロック全体の高さが伸び、中央揃えだと上端が「上に」
     動く(中央から対称に広がるため)ため、1行目の文章が急に上へ跳ねる
     ように見えた。上からの固定パディングで静止させる方が、短文の時の
     多少の余白より自然。 */
}

.be-compact .ProseMirror {
  line-height: 1.5;
}

.composer-body-divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 4px 0 10px;
}

/* DragHandle renders its +/grip gutter as a direct child of .be-content
   with inline position:absolute;top:0;left:0 (coordinates meant to track
   the hovered node RELATIVE TO .be-content). Without a positioning
   context here, the browser resolved that absolute position against the
   nearest ancestor that HAD one instead - .modal-overlay (fixed, covers
   the viewport) - so the gutter landed at the literal top-left corner of
   the screen/modal, nowhere near the actual paragraph. */
.be-content {
  position: relative;
}

/* reserves room for the gutter, which sits at a negative left offset
   relative to .be-content (see createBlockEditor) - without this the
   handle/plus buttons get clipped. .be-root no longer clips this itself
   (overflow-y:visible now, see .be-root:not(.be-compact) above) so the
   real clipping boundary is .composer-scroll-area further out.
   2026-10-04: 18px(プラス)+0px(ハンドルとの間)+12px(ハンドル)=30pxがガター
   自体の幅(JSが実測してbe-gutterのleftに-30pxとして入れる) - そこに本文との
   余白4pxを足した34pxがこのmargin-left。 */
.be-content-has-gutter {
  margin-left: 34px;
}

.be-content .ProseMirror {
  outline: none;
  line-height: 1.5;
  /* 첫 블록 위/마지막 블록 아래에도 드롭할 수 있어야 하는데, 패딩이
     0이면 그 "틈"에 마우스를 가져다 둘 공간 자체가 없어 드롭커서가
     거기서는 안 뜨는 것처럼 보였다 - 최소한의 여유 공간을 둔다. */
  padding: 6px 0;
  /* 공백 없이 긴 문자열(URL, 반복문자 등)을 치면 줄바꿈 없이 한 줄로
     쭉 뻗어나가 가로 스크롤/가터·버튼과의 겹침을 유발하던 버그
     (2026-10-04 스크린샷으로 발견) - 단어 단위로 안 끊기면 글자 단위로
     강제로라도 꺾이게 한다. */
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 줄 안 간격(line-height)과 별개로, 문단 사이 위/아래 여백은 브라우저 기본
   <p> 마진(~1em씩, 위아래 합쳐 2em 가까이)을 그대로 쓰고 있어서 체감상
   "행간이 너무 넓다"로 느껴졌음 - 명시적으로 좁혀준다. */
.be-content .ProseMirror p {
  margin: 0.3em 0;
}

/* the browser's default <p> top margin (~1em) doesn't collapse out of
   .ProseMirror, so the very first block always sat ~13-14px below
   .be-content's own top edge - which is exactly where DragHandle's gutter
   wrapper anchors (top:0 relative to .be-content). That gap was the real
   cause of the gutter appearing to float above the first block: it was
   correctly at .be-content's top, the text just started lower than that.
   .be-compactも含め常時適用 - 中央揃えをやめた今は、1行目の開始位置は
   .be-compactのpadding-topだけで決まる固定値にしたい(段落マージンが
   上に乗ると、行数が増えるたびにその分だけ開始位置がずれて見える)。 */
.be-root .be-content .ProseMirror > :first-child {
  margin-top: 0;
}

.be-content p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: var(--color-text-sub);
  float: left;
  height: 0;
  pointer-events: none;
}

.be-content h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 10px 0 4px;
}
.be-content h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 8px 0 4px;
}
.be-content h3,
.be-content h4 {
  font-size: 15px;
  font-weight: 800;
  margin: 6px 0 4px;
}

.be-content blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: 12px;
  color: var(--color-text-sub);
  margin: 6px 0;
}

.be-content pre {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px;
  background: var(--color-bg-alt);
  border-radius: 4px;
  padding: 10px 12px;
  white-space: pre-wrap;
  margin: 6px 0;
}

.be-content ul,
.be-content ol {
  padding-left: 22px;
  margin: 4px 0;
}

.be-content ul {
  list-style: disc;
}

.be-content ol {
  list-style: decimal;
}

.be-content li p {
  margin: 0;
}

.be-content code {
  background: #fdeceb;
  color: #c2352c;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

.be-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.be-content a {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* StarterKitの区切り線ブロック(「---」入力 or 旧Slashpage本文由来) - 専用CSSが
   無く、ブラウザ既定の<hr>(高さ実質0〜2px)のままだったため、DragHandleの
   ガター(高さ18px)がこのブロックをhoverした時に横の細い線と比べて浮いて
   見える不具合があった(2026-10-04)。padding側で行高相当の厚みを持たせ、
   線自体はその中央に来るようにする - ブロックの実測高さがテキスト行と
   近くなり、ガターの位置・ハイライトの高さが揃って見える。 */
.be-content hr {
  height: 0;
  margin: 0;
  padding: 9px 0 8px;
  border: none;
  border-top: 1px solid var(--color-border);
}

/* the gutter DragHandle floats in via its own positioning logic - only its
   internal buttons need styling from us */
.be-gutter {
  display: flex;
  align-items: center;
  gap: 0; /* プラス/ハンドル 사이는 0 유지 */
  /* 본문과의 간격 4px - DragHandle이 "left = -(자신의 offsetWidth)"로 항상
     글자에 틈 없이 밀착시키는 걸 실측으로 확인했기 때문에(2026-10-04),
     margin-left만으론 안 통함 - 대신 이 padding-right를 가터 자신의 측정폭에
     포함시켜(18+12+4=34) DragHandle이 스스로 -34px를 계산하게 만든다. */
  padding-right: 4px;
  /* the REAL cause of the long-standing "gutter appears above the first
     block, then disappears" bug: DragHandle doesn't set an inline
     position/top/left AT ALL until the first real hover/onNodeChange
     fires (confirmed by sampling its style attribute every 60ms after
     mount with no mouse movement - it stayed as just
     "pointer-events: auto" for the whole window). With no position here
     either, it defaulted to position:static and rendered as a normal
     in-flow child BEFORE the first paragraph, i.e. visibly above it.
     Giving it this exact position up front - beside the very top of
     .be-content, using the same left offset the hover logic itself would
     compute for the first line - makes it correctly placed from the
     first frame, hover or not; the fade-in stays as a small extra
     safety net for the instant right after mount. */
  position: absolute;
  /* 2026-10-03 수정: 아래 top/left는 JS(createBlockEditor의 mount 직후
     requestAnimationFrame)가 즉시 실측해서 덮어쓰므로, 여기 값은 그 JS가
     실행되기 전 한두 프레임 동안만 보이는 "과도기 폴백"일 뿐이다 - 다만
     그 찰나에도 어긋나 보이지 않도록, JS가 쓰는 것과 동일한 공식으로 맞춰둠
     (실제 hover를 유도해 DragHandle 자신이 쓰는 값을 직접 측정해서 역산한
     것 - 과거엔 "세로 중앙정렬"로 가정하고 7.6px를 썼는데 실측 결과 그 가정
     자체가 틀렸음이 드러남: 실제로는 .ProseMirrorのpadding-top(6px)만큼
     그대로 내려갈 뿐, 센터링 보정은 없다). */
  top: 6px;
  left: -34px; /* 2026-10-04: 가터 실측 폭(18+12+padding-right 4=34px) 기준 - JS가 실행되기 전 과도기 폴백 */
  animation: be-gutter-settle 0.18s ease 0.12s both;
}

/* プラス/ハンドル/本文の間は上の.be-gutter gapと.be-content-has-gutterの
   margin-leftで余白を確保。 */

@keyframes be-gutter-settle {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.be-add-btn,
.be-handle-btn {
  /* 히트박스(호버시 배경이 뜨는 버튼 영역) 크기 - 2026-10-04 사용자 지정값.
     색도 진한 고정색 대신 노션처럼 옅은 회색(--color-text-sub)으로 되돌림 -
     호버하면 더 진해짐(아래 :hover). */
  height: 18px;
  padding: 0; /* ブラウザ既定のbutton paddingが残っていて、svgのwidth:100%が
    それ分だけ潰れていた(実機で特定: 20px幅のボタンでsvgが8pxに、12px幅の
    ボタンでは0pxに潰れていた - 両方とも差が12pxで、Chromiumのbutton既定
    padding 1px 6px(左右合計12px)と一致) */
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #b0b8c0; /* 2026-10-03(2차): --color-text-sub(#64748b)도 아직 진하다는
    피드백 - 한 단계 더 옅은 회색으로 */
  cursor: pointer;
}

.be-add-btn {
  width: 18px; /* plus 글리프는 가로세로 길이가 같아 정사각형 히트박스 */
}

.be-handle-btn {
  width: 12px; /* grip 글리프는 세로로 긴 모양 - 히트박스 가로폭을 글리프 가로폭만큼 줄임(정사각형으로 맞추지 않음) */
  cursor: grab;
}

/* .be-gutterがflexコンテナなので、SVGルート要素がflexアイテムになる際、
   width/height属性だけでは意図通りの主軸(横)サイズが出ない現象を実機で確認
   (plus svgが20pxのはずが8pxに、grip svgが12pxのはずが0pxに潰れていた -
   原因不明だがflexアイテム化したSVGの固有サイズ解決の実装差と見られる)。
   ボタン自体は幅が確定しているので、SVG側にもCSSで明示的に100%を指定して
   二重に固定する。 */
.be-add-btn svg,
.be-handle-btn svg {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: block;
}

.be-add-btn:hover,
.be-handle-btn:hover {
  background: var(--color-bg-tint);
  color: var(--color-text);
}

/* ハンドルクリックでブロック全体を選択した時の見た目 - 枠線(アウトライン)
   ではなく、Notionのような薄い背景色の塗りつぶしにする(ユーザー明示要望)。 */
.ProseMirror-selectednode {
  background-color: var(--color-bg-tint);
  border-radius: 4px;
  box-shadow: 0 0 0 4px var(--color-bg-tint);
}

/* 実際のクラス名は「ProseMirror-dropcursor」ではなく、prosemirror-dropcursor
   パッケージが付ける小文字ハイフン区切りの「prosemirror-dropcursor-block」
   (インライン位置なら「...-inline」) - 似た名前で誤って大文字キャメルケースの
   方を長らく指定していて、一度もマッチしていなかった(2026-10-02発覚)。
   しかもこのプラグインはbackground-colorを inline style で
   background-color:currentcolor と指定してくる(周囲のテキスト色をそのまま
   継承=黒っぽく見えていた正体) - !importantで上書きするにはクラス名が
   合っている必要があった。 */
.be-content [class*="prosemirror-dropcursor"] {
  background-color: rgba(33, 175, 191, 0.55) !important;
  height: 3px !important;
  border-radius: 3px;
}

.be-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 2px 0;
}

.be-callout .be-editable-content {
  flex: 1;
  min-width: 0;
}
.be-content .ProseMirror .be-callout .be-editable-content > :first-child {
  margin-top: 0;
}
.be-content .ProseMirror .be-callout .be-editable-content > :last-child {
  margin-bottom: 0;
}

.be-callout-icon {
  border: none;
  background: transparent;
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
}

.be-callout-icon:hover {
  background: rgba(0, 0, 0, 0.06);
}

.be-media-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 4px 0;
}

.be-media-box img {
  width: 100%;
  display: block;
}

.be-media-placeholder {
  display: block;
  padding: 20px;
  font-size: 12.5px;
  color: var(--color-text-sub);
  text-align: center;
}

.be-file-block,
.be-embed-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin: 4px 0;
}

.be-media-picker-btn {
  width: 100%;
  padding: 24px 14px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  color: var(--color-text-sub);
  font-size: 13px;
  cursor: pointer;
}

.be-media-picker-btn:hover {
  background: var(--color-bg-tint);
  color: var(--color-text);
}

.be-editable-content:empty::before {
  content: attr(data-placeholder);
  color: var(--color-text-sub);
  pointer-events: none;
}

/* popovers (emoji picker, callout background settings) share the same
   floating-card look as Editor.js's own native settings popup */
.be-popover {
  position: absolute;
  z-index: 300;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  min-width: 160px;
  padding: 6px;
  display: flex;
  gap: 2px;
}

.be-popover button {
  display: flex;
  align-items: center;
  gap: 9px;
  border: none;
  background: transparent;
  color: var(--color-text);
  font-size: 13px;
  text-align: left;
  padding: 7px 10px;
  border-radius: 5px;
  white-space: nowrap;
}

.be-popover button:hover,
.be-popover button.be-menu-active {
  background: var(--color-bg-tint);
}

.be-popover button.be-danger {
  color: var(--color-danger);
}

.be-popover button.be-danger:hover {
  background: #fdeceb;
}

.be-popover.be-bg-submenu {
  flex-direction: row;
  min-width: auto;
}

/* horizontal icon-only row (heading/color/align/format submenus of the
   selection toolbar) - the base .be-popover button rule is built for
   label+icon rows (left-aligned, nowrap), not compact icon-only buttons */
.be-popover-row {
  flex-direction: row;
  min-width: auto;
}

.be-popover-row button {
  justify-content: center;
  padding: 7px;
  gap: 0;
}

.be-popover-row button.active {
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
}

/* floating selection toolbar */
.be-sel-toolbar {
  position: absolute;
  z-index: 300;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: 4px;
  gap: 1px;
}

.be-sel-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.be-sel-btn:hover {
  background: var(--color-bg-tint);
}

.be-sel-btn.active {
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
}

.be-sel-sep {
  width: 1px;
  height: 18px;
  background: var(--color-border);
  margin: 0 3px;
}

.be-aa-label,
.be-sel-btn-text {
  font-size: 11px;
  font-weight: 800;
}

/* compact editor (comments) toolbar row - replaces the per-block gutter,
   meant to sit in the same row as the composer's own send button. */
.be-compact-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
}

.be-compact-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--color-text-sub);
}

.be-compact-btn:hover {
  background: var(--color-bg-tint);
  color: var(--color-text);
}

/* when the compact toolbar is present (main comment box + reply boxes),
   it sits at the left of the same row as the send button, pushed apart;
   the comment-edit foot (保存/キャンセル, no toolbar) keeps its own
   flex-end rule further up untouched. */
.comment-compose-foot:has(.be-compact-toolbar) {
  justify-content: space-between;
  align-items: center;
}

.be-inline-color-actions {
  display: flex;
  gap: 2px;
  padding: 4px;
}

.be-color-swatch-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  font-weight: 800;
  font-size: 13px;
}

.be-color-swatch-btn:hover {
  background: var(--color-bg-tint);
}

/* color now lives inside the swatch's own SVG (the "A" glyph or the
   square's outline - see beColorAIcon/beColorBgIcon), not a CSS
   background-color, so these are just plain square icon buttons - same
   base look as any other .be-popover-row button, current value marked
   the same way (.active) as everywhere else in the toolbars. */
.be-bg-swatch,
.be-color-chip {
  width: 26px;
  height: 26px;
  padding: 0 !important;
}

.be-link-menu {
  flex-direction: row;
  align-items: center;
  min-width: auto;
  padding: 6px;
  gap: 4px;
}

.be-link-input {
  width: 200px;
  max-width: 60vw;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--color-text);
}

.be-link-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.be-link-menu button {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 0;
}

.be-emoji-picker {
  max-height: 260px;
  overflow-y: auto;
  min-width: 220px;
}

.be-emoji-group-label {
  font-size: 11px;
  color: var(--color-text-sub);
  padding: 6px 4px 2px;
}

.be-emoji-group {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}

.be-emoji-btn {
  border: none;
  background: transparent;
  font-size: 17px;
  padding: 4px;
  border-radius: 5px;
}

.be-emoji-btn:hover {
  background: var(--color-bg-tint);
}

.tag-chip-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px;
}

.tag-chip {
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-chip button {
  background: none;
  border: none;
  color: inherit;
  font-size: 11px;
  padding: 0;
}

.tag-chip-input input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 80px;
  font-size: 13px;
  font-family: inherit;
}

.thumb-color-picker {
  display: flex;
  gap: 8px;
}

.thumb-color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}

.thumb-color-swatch.selected {
  border-color: var(--color-text);
}

.draft-restored-note {
  font-size: 12px;
  color: var(--color-primary-dark);
  background: var(--color-bg-tint);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-bottom: 10px;
}

/* ==========================================================================
   Guide page (ambassador / supporter)
   ========================================================================== */

.guide-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.guide-tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-sub);
  white-space: nowrap;
}

.guide-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.guide-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.guide-panel {
  display: none;
  padding: 32px 0 80px;
}

.guide-panel.active {
  display: block;
}

.guide-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  background: #fff;
  margin-bottom: 20px;
}

.guide-block h3 {
  font-size: 16px;
  margin: 0 0 12px;
}

.guide-block p,
.guide-block li {
  font-size: 14.5px;
  color: var(--color-text);
  line-height: 1.8;
}

.guide-copy-box {
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 13px;
  font-family: monospace;
  margin: 10px 0;
}

/* ==========================================================================
   Settings page
   ========================================================================== */

.settings-body {
  padding: 96px 0 80px;
  max-width: 480px;
  margin: 0 auto;
}

.settings-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 16px;
  background: #fff;
}

.settings-block h3 {
  font-size: 15px;
  margin: 0 0 14px;
}

.settings-block.danger {
  border-color: #f3d3d1;
  background: #fff8f7;
}

.settings-block.danger h3 {
  color: var(--color-danger);
}

.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   Admin (backoffice) - separate simple shell
   ========================================================================== */

/* 2026-10-06: 이전엔 인라인 스타일만 걸린 민무늬 폼(카드도 그림자도 없이
   화면 중앙에 입력창만 덩그러니)이었던 것을 공개 사이트 로그인 모달과 같은
   톤(브랜드 컬러/둥근 카드/그림자)으로 다듬었다(사용자 지정: "좀 더
   예쁘게"). */
.admin-gate-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  padding: 20px;
}

.admin-gate-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px 32px 32px;
  text-align: center;
}

.admin-gate-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-gate-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: var(--color-text);
}

.admin-gate-sub {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--color-text-sub);
}

.admin-gate-field {
  text-align: left;
  margin-bottom: 14px;
}

.admin-gate-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text-sub);
  margin-bottom: 6px;
}

.admin-gate-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.admin-gate-field input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.admin-gate-submit {
  width: 100%;
  padding: 11px;
  margin-top: 4px;
  font-size: 14.5px;
}

.admin-gate-error {
  color: var(--color-danger);
  background: #fdecea;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  padding: 8px 10px;
  margin: 14px 0 0;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background: #12232a;
  color: #cbd5e1;
  padding: 22px 14px;
  flex-shrink: 0;
  position: relative;
  transition: width 0.18s ease, padding 0.18s ease;
  overflow: hidden;
}

/* ブランド文字と開閉ボタンを同じ行に並べる見出し部 - 접힌 状態では
   admin-brandがdisplay:noneになるので、justify-content:centerにより
   トグルボタン1つだけが会員/支払いアイコンと同じ水平位置に自然に収まる
   (下のnav linkが接힐 때 center揃えになるのと同じロジック)。 */
.admin-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 14px;
}

.admin-sidebar-collapsed .admin-sidebar-head {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

/* サイドバーの縁に半分はみ出す丸ボタンではなく、サイドバー自身の配色に合わせた
   枠内のアイコンボタンにする - 境界に中途半端に乗っているように見えないよう。
   アイコン自体のサイズ/コンテナは会員・支払いと同じ.admin-nav-iconを共有する
   ので、ここではボタンの当たり判定(padding)だけ持たせる。 */
.admin-sidebar-toggle {
  border: none;
  background: transparent;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.admin-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-sidebar-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0 0 14px;
}

/* 접힌 상태 - 라벨 텍스트만 숨기고 폭을 줄인다. 아이콘(会員=人型, 支払い=¥)은
   펼침/접힘 양쪽 다 항상 보인다 - 접혔을 때 뭘 가리키는 링크인지 알아볼 수 있어야
   하니, title 툴팁만으로는 부족하다고 판단. */
.admin-sidebar-collapsed {
  width: 60px;
  padding-left: 8px;
  padding-right: 8px;
}

.admin-sidebar-collapsed .admin-brand,
.admin-sidebar-collapsed .admin-nav-label {
  display: none;
}

.admin-sidebar-collapsed a {
  justify-content: center;
  padding: 10px 4px;
}

.admin-nav-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.admin-sidebar .admin-brand {
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #cbd5e1;
  margin-bottom: 2px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.admin-sidebar a.active {
  background: var(--color-primary);
  color: #fff;
}

.admin-sidebar a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.admin-main {
  flex: 1;
  padding: 28px 32px;
  background: var(--color-bg-alt);
  min-width: 0;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-topbar h1 {
  font-size: 20px;
  margin: 0;
}

.admin-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

select.admin-select,
input.admin-input {
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}

.admin-table-wrap {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: auto;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th {
  text-align: left;
  font-size: 12px;
  color: var(--color-text-sub);
  background: var(--color-bg-alt);
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

/* both grid pages (支払い確定 / コミュニティ会員) double as spreadsheets:
   the wrap gets its own bounded scroll (both axes) with a sticky header -
   otherwise the horizontal scrollbar ends up thousands of px down the
   page, unreachable, and the remaining columns are effectively lost. The
   whole page no longer scrolls - .admin-main becomes a fixed-height flex
   column and only the table wrap scrolls vertically inside it. */
body[data-page="costs"],
body[data-page="members"],
body[data-page="rewards"] {
  height: 100%;
  overflow: hidden;
}

body[data-page="costs"] .admin-shell,
body[data-page="members"] .admin-shell,
body[data-page="rewards"] .admin-shell {
  height: 100vh;
}

body[data-page="costs"] .admin-main,
body[data-page="members"] .admin-main,
body[data-page="rewards"] .admin-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

body[data-page="costs"] .admin-grid-table-wrap,
body[data-page="members"] .admin-grid-table-wrap,
body[data-page="rewards"] .admin-grid-table-wrap {
  flex: 1;
  min-height: 0;
}

/* 2026-10-19再変更(2回目) - 縦積みにしたら「横に並べろと何度も言った」との
   指摘で撤回、3箱を横一列に戻す(1回目の変更時の解釈が誤りだった)。箱ごとの
   位置関係(上辺にタイトルを浮かせる)のため各箱はposition:relativeにし、
   タイトルは絶対配置+背景色で境界線を隠して重ねる - この部分は維持。 */
.admin-stat-box-col {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-stat-box-col .admin-stat-box-v {
  flex: 1;
  min-width: 0;
}

.admin-stat-box-v {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 18px 12px;
}

.admin-stat-box-v-title {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-sub);
  white-space: nowrap;
}

.admin-stat-box-v-eq {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  /* 2026-10-20: テキストが2行になるのを避けたいとの指摘で折り返しをやめ、
     3箱の横幅比率(発送待ち金額の箱を広く/謝礼未発送件数の箱を狭く)と
     ラベル短縮(確定金額合計→確定金額 等)を合わせて1行に収める。 */
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
}

.admin-stat-box-v-eq .eq-term {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.admin-stat-box-v-eq .eq-term b {
  font-size: 16px;
  font-weight: 800;
}

.admin-stat-box-v-eq .eq-term label {
  color: var(--color-text-sub);
  font-size: 11.5px;
}

.admin-stat-box-v-eq .eq-op {
  color: var(--color-text-sub);
  font-size: 13px;
  font-weight: 700;
}

.admin-stat-box-v-eq .eq-result b,
.admin-stat-box-v-eq .eq-result label {
  color: var(--color-primary-dark);
}

/* 2026-10-19追加 - フィルタ4つ(or2つ)とアクションボタンを1列に並べる共通
   ツールバー(以前は別々の行だった.admin-filter-panelと.admin-split-toolbar
   を統合)。 */
.admin-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 16px;
  flex-wrap: wrap;
}

.admin-toolbar-row .admin-filter-panel {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.admin-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* 謝礼発送タブ - 活動一覧の.admin-grid-table-wrapと同じく、縦方向だけここで
   閉じ込めてスクロールさせる(ページ全体は伸びない)。 */
.admin-envelope-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.admin-costs-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-costs-table th.admin-save-col {
  z-index: 3;
}

.admin-costs-table td.admin-save-col {
  z-index: 1;
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-amount-input {
  width: 90px;
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.admin-memo-input {
  width: 140px;
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.admin-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/* costs admin's stats as 3 short equations (件数の内訳 / 発送済み件数 / 発送済み
   金額) instead of 8 disconnected cards - the numbers' relationship to each
   other (総-確定-却下-保留=待機 など) is the point, so it's spelled out inline
   rather than left for the reader to reconstruct from 8 separate tiles. */
.admin-stat-eq-wrap {
  display: flex;
  flex-direction: row;
  margin-bottom: 14px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.admin-stat-eq {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 14px;
  font-size: 12px;
  border-right: 1px solid var(--color-border);
}

.admin-stat-eq:last-child {
  border-right: none;
}

.admin-stat-eq .eq-term {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.admin-stat-eq .eq-term b {
  font-size: 15px;
  font-weight: 800;
}

.admin-stat-eq .eq-term label {
  color: var(--color-text-sub);
  font-size: 11px;
}

.admin-stat-eq .eq-op {
  color: var(--color-text-sub);
  font-size: 13px;
  font-weight: 700;
}

.admin-stat-eq .eq-result b,
.admin-stat-eq .eq-result label {
  color: var(--color-primary-dark);
}

.admin-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}

.admin-chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-sub);
  background: #fff;
}

.admin-chip.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* 2026-10-19再変更 - チップ方式は見た目が軽すぎる/状態が分かりにくいとの
   指摘で撤回、ドロップダウン(<select class="admin-select">)に戻した。
   サイズは手動追加・謝礼発送ボタン等(.btn.btn-sm)に合わせる。 */
.admin-filter-panel {
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-filter-panel select.admin-select {
  padding: 7px 10px;
  font-size: 13px;
  height: 34px;
}

/* 2026-10-19再変更 - 対象活動(itemsList)/ギフトカード(giftCards)ポップアップが
   「幅が狭くUIが変」との指摘で全面的に広げた。.grid-cell-editor-wideは
   openEditor()が入れる既定のmax-width:420pxを上書きするため、各type handler
   のmount()内でbox.style.minWidthも明示的に再設定する(セル自体の幅に引っ張
   られないように)。 */
.grid-cell-editor-wide {
  padding: 10px;
  min-width: 620px;
  max-width: 620px;
}

.grid-items-header,
.grid-items-row {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
}

.grid-items-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-sub);
}

.grid-items-row {
  font-size: 12.5px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

/* itemsList(対象活動)用の列幅 - ID/作成日/作成者/種類/タイトル/謝礼金額/削除ボタン。 */
.grid-items-header--items,
.grid-items-row--items {
  grid-template-columns: 50px 90px 90px 60px 1fr 90px 24px;
}

/* giftCards(ギフトカード)用の列幅 - リンク/金額/受取期限/削除ボタン。 */
.grid-items-header--giftcards,
.grid-items-row--giftcards {
  grid-template-columns: 1fr 100px 110px 24px;
}

.grid-items-list {
  display: flex;
  flex-direction: column;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.grid-items-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-items-row .grid-cell-input {
  height: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

/* ギフトカード新規追加欄 - 貼り付けたテキストから金額/受取期限を自動抽出して
   見せるミニプレビュー行。 */
.grid-giftcard-add-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}

.grid-giftcard-add-row input {
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  font-size: 13px;
  font-family: inherit;
}

.grid-giftcard-parsed-preview {
  font-size: 11.5px;
  color: var(--color-text-sub);
  margin: 2px 0 8px;
}

.grid-giftcard-parsed-preview b {
  color: var(--color-primary-dark);
}

/* 2026-10-19追加 - 現況板(.admin-stat-eq-wrap)の下、手動追加/謝礼封筒に入れる
   の2ボタンを左右に分割して置くバー。 */
.admin-split-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0 18px;
  flex-wrap: wrap;
}

.admin-split-toolbar-side {
  display: flex;
  gap: 8px;
}

.admin-split-toolbar-right {
  margin-left: auto;
}

/* 2026-10-19追加・再変更 - 会員/活動一覧/謝礼発送の3表共通、先頭のチェック
   ボックス列(各表のまとめ選択/一括削除用)。ID列等と同じくsticky-leftの
   先頭に固定。元は#costs-table限定だったが、会員表・謝礼発送表にも同じ列を
   追加するため.admin-grid-table全体に一般化。 */
.admin-grid-table td.grid-select-col,
.admin-grid-table th.grid-select-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  text-align: center;
}
.admin-grid-table thead th.grid-select-col {
  z-index: 4;
  background: var(--color-bg-alt);
}

/* 2026-10-19追加 - costs.html内の「活動一覧／謝礼封筒」ページタブ。 */
.admin-page-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
}

.admin-page-tab {
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-sub);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
}

.admin-page-tab:hover {
  color: var(--color-text);
}

.admin-page-tab.active {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary);
}

/* 謝礼封筒カード - 開閉可能、閉じている間は件数だけ表示。 */
.envelope-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  overflow: hidden;
}

.envelope-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.envelope-toggle-btn {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--color-text-sub);
  cursor: pointer;
  padding: 0;
  width: 16px;
  flex-shrink: 0;
}

.envelope-card-name {
  font-weight: 700;
  font-size: 14.5px;
  flex: 1;
}

.envelope-card-total {
  font-weight: 700;
  color: var(--color-primary-dark);
  font-size: 13.5px;
  flex-shrink: 0;
}

/* 2026-10-19追加 - 発送済み/未発送のバッジ、連絡事項・社内記録のテキスト欄、
   ギフトカードの金額入力。 */
.envelope-sent-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e9f9fb;
  color: #1a4a54;
  flex-shrink: 0;
}

.envelope-sent-badge-pending {
  background: #fdf2d0;
  color: #8a6400;
}

.envelope-note-textarea {
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.envelope-giftcard-amount {
  max-width: 100px;
  flex-shrink: 0;
}

.envelope-card-body {
  padding: 0 16px 16px 44px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.envelope-items-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.envelope-item-row {
  display: grid;
  grid-template-columns: 90px 70px 1fr 100px;
  gap: 8px;
  font-size: 13px;
  padding: 6px 10px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
}

.envelope-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.envelope-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.envelope-card-row-label {
  font-size: 12.5px;
  color: var(--color-text-sub);
  font-weight: 700;
  flex-shrink: 0;
  min-width: 170px;
}

.envelope-giftcard-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.envelope-giftcard-row {
  display: grid;
  grid-template-columns: 1fr 90px 100px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 10px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
}

.envelope-giftcard-row a {
  font-size: 12.5px;
  color: var(--color-primary-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.envelope-row-head {
  background: none !important;
  padding: 0 10px !important;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-sub);
}

/* 2026-10-19追加 - settings.html「活動履歴」タブ: スライド可能なチップ列
   (件数併記)+ 下に一覧。横に多く並ぶ想定なのでoverflow-x:autoで
   スクロール(折り返さない - "スライダブル"というユーザー指定語に合わせる)。 */
.settings-activity-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.settings-activity-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-sub);
  background: #fff;
  white-space: nowrap;
}

.settings-activity-chip b {
  color: var(--color-primary-dark);
  font-weight: 800;
  margin-left: 2px;
}

.settings-activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
}

.settings-activity-item:hover .settings-activity-item-title {
  color: var(--color-primary-dark);
}

.settings-activity-item-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-sub);
  background: var(--color-bg-tint);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.settings-activity-item-title {
  flex: 1;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-activity-item-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--color-text-sub);
}

.admin-stat-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.admin-stat-card .num {
  font-size: 22px;
  font-weight: 800;
}

.admin-stat-card .label {
  font-size: 12px;
  color: var(--color-text-sub);
  margin-top: 2px;
}

/* Costs table - every row is a single fixed height now (memo/contact are
   truncated + edited through a popup instead of growing inline textareas -
   see .admin-cell-truncate below), and the save/edit column is sticky so
   it stays reachable even when the table has to scroll horizontally for
   the other columns. */
.admin-costs-table {
  min-width: 1560px;
}

.admin-costs-table td {
  white-space: nowrap;
  vertical-align: middle;
  height: 46px;
}

/* truncated single-line display for memo/contact/files - keeps every row
   the same height regardless of how long the underlying text is */
.admin-cell-truncate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.admin-cell-truncate-text {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-cell-truncate-text.is-empty {
  color: var(--color-text-sub);
}

.admin-cell-edit-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text-sub);
  font-size: 12px;
  cursor: pointer;
}

.admin-cell-edit-btn:hover {
  background: var(--color-bg-tint);
  color: var(--color-text);
}

.admin-cell-add-btn {
  flex-shrink: 0;
  padding: 3px 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text-sub);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.admin-cell-add-btn:hover {
  background: var(--color-bg-tint);
  color: var(--color-text);
}

/* small floating editor popup for a single memo/contact cell */
.admin-cell-popover {
  position: fixed;
  z-index: 400;
  width: 280px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 10px;
}

.admin-cell-popover textarea {
  width: 100%;
  min-height: 90px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 8px;
}

.admin-cell-popover-foot {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.admin-save-col {
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -4px 0 6px -4px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.admin-table th.admin-save-col {
  background: var(--color-bg-alt);
}

.admin-save-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-sub);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  min-width: 60px;
}

.admin-save-btn.is-dirty {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* row is in edit mode - the same button reads 保存 (accent color) instead
   of 編集 (see rowEditHtml/rowReadHtml in costs.html) */
.admin-save-btn.is-editing {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ==========================================================================
   Excel-like grid editor (js/grid-editor.js) - shared by admin/members.html
   and admin/costs.html. First column is frozen/sticky and holds the 保存
   button (disabled until the row has an uncommitted edit - see
   .admin-save-btn.is-dirty below, reusing the same button look/class as
   the old row-toggle so the two tables stay visually consistent).
   ========================================================================== */

.admin-grid-table-wrap {
  position: relative;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: auto;
}

table.admin-grid-table {
  border-collapse: separate;
  border-spacing: 0;
  /* width:100%だけだと列が多い表で全列が無理に狭く均等割りされ、内容が
     overflow:hiddenで切れて見えなくなる列が出ていた(2026-10-06指摘) -
     内容幅を優先しつつ、画面が広い時は100%まで伸ばす。 */
  width: max-content;
  min-width: 100%;
}

.admin-grid-table th,
.admin-grid-table td {
  padding: 0;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  white-space: nowrap;
  height: 42px;
}

.admin-grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--color-bg-alt);
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  color: var(--color-text-sub);
}

.admin-grid-table .grid-frozen-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 4px 0 6px -4px rgba(0, 0, 0, 0.12);
  text-align: center;
  padding: 6px 10px;
}

.admin-grid-table thead .grid-frozen-col {
  z-index: 4;
  background: var(--color-bg-alt);
}

/* costs.html: 保존/戻す列を先頭ではなく末尾に固定する場合の変形(右端に追従、
   影も右から流れ込む内容を示すよう左側に反転)。 */
.admin-grid-table .grid-frozen-col.grid-frozen-col-end {
  left: auto;
  right: 0;
  box-shadow: -4px 0 6px -4px rgba(0, 0, 0, 0.12);
}

/* 2026-10-20再構成(2回目) - costs.html専用、ユーザー指定の固定行: チェック
   ボックス/ID/作成日/作成者/種類/タイトル/確定状態/謝礼金額/謝礼発送案件の
   8列(+チェックボックス)を常に見える位置に固定し(sticky-left)、投稿日・
   開催日以降(投稿日・開催日/リンク/クーポンコード/ビュー/参加/クーポン新規/
   クーポン既存/社内記録/連絡事項/添付ファイル)だけが横スクロールする
   (投稿日・開催日は当初固定行だったが、リンク列の直前へ移動 - ユーザー指定)。
   累積left値は各列の固定幅(下のwidth指定と一致させる必要がある)から手計算
   したもの。 */
#costs-table td[data-col="seqId"],
#costs-table th[data-col="seqId"],
#costs-table td[data-col="createdAt"],
#costs-table th[data-col="createdAt"],
#costs-table td[data-col="author"],
#costs-table th[data-col="author"],
#costs-table td[data-col="type"],
#costs-table th[data-col="type"],
#costs-table td[data-col="title"],
#costs-table th[data-col="title"],
#costs-table td[data-col="status"],
#costs-table th[data-col="status"],
#costs-table td[data-col="amount"],
#costs-table th[data-col="amount"],
#costs-table td[data-col="envelopeName"],
#costs-table th[data-col="envelopeName"] {
  position: sticky;
  z-index: 2;
  background: #fff;
}
/* 2026-10-19 バグ修正 - 上の#costs-table thead th[data-col]はdata-col属性を
   持つ"全部の"ヘッダー(横スクロールする列も含む)にマッチしていたため、
   固定列も横スクロール列も同じz-index:4になり、DOM順で後ろにある横スクロール
   列(ビュー等)が固定列の上に重なって見える「固定ヘッダーの見た目崩れ」の
   原因になっていた(ユーザー指摘「固定ヘッダー行の侵犯」)。固定列だけに絞る。 */
#costs-table thead th[data-col="seqId"],
#costs-table thead th[data-col="createdAt"],
#costs-table thead th[data-col="author"],
#costs-table thead th[data-col="type"],
#costs-table thead th[data-col="title"],
#costs-table thead th[data-col="status"],
#costs-table thead th[data-col="amount"],
#costs-table thead th[data-col="envelopeName"] {
  z-index: 4;
  background: var(--color-bg-alt);
}

/* チェックボックス列(36px)がID列の前にあるため、以降のsticky-left列は全部
   +36pxしてある。 */
#costs-table td[data-col="seqId"],
#costs-table th[data-col="seqId"] {
  left: 36px;
  width: 64px;
  min-width: 64px;
  max-width: 64px;
}
#costs-table td[data-col="createdAt"],
#costs-table th[data-col="createdAt"] {
  left: 100px;
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}
#costs-table td[data-col="author"],
#costs-table th[data-col="author"] {
  left: 240px;
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}
/* 2026-10-20: 70px→100pxに拡大(ユーザー指摘 - 種類の選択肢テキストが窮屈だった)。 */
#costs-table td[data-col="type"],
#costs-table th[data-col="type"] {
  left: 350px;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}
#costs-table td[data-col="title"],
#costs-table th[data-col="title"] {
  left: 450px;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#costs-table td[data-col="status"],
#costs-table th[data-col="status"] {
  left: 610px;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}
#costs-table td[data-col="amount"],
#costs-table th[data-col="amount"] {
  left: 700px;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}
#costs-table td[data-col="envelopeName"],
#costs-table th[data-col="envelopeName"] {
  left: 800px;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 4px 0 6px -4px rgba(0, 0, 0, 0.12);
}
/* ✕(謝礼発送案件から除去)ボタンがテキストと並ぶため、セルの中身を横並びに。 */
#costs-table td[data-col="envelopeName"] .grid-cell-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 2026-10-20追加 - rewards.html専用、固定行: ID/作成日/対象者/種別/タイトル/
   発送日の6列(ユーザー指定)。対象活動以降は横スクロール。 */
#rewards-table td[data-col="id"],
#rewards-table th[data-col="id"],
#rewards-table td[data-col="createdAt"],
#rewards-table th[data-col="createdAt"],
#rewards-table td[data-col="author"],
#rewards-table th[data-col="author"],
#rewards-table td[data-col="method"],
#rewards-table th[data-col="method"],
#rewards-table td[data-col="name"],
#rewards-table th[data-col="name"],
#rewards-table td[data-col="sentAt"],
#rewards-table th[data-col="sentAt"] {
  position: sticky;
  z-index: 2;
  background: #fff;
}
#rewards-table thead th[data-col="id"],
#rewards-table thead th[data-col="createdAt"],
#rewards-table thead th[data-col="author"],
#rewards-table thead th[data-col="method"],
#rewards-table thead th[data-col="name"],
#rewards-table thead th[data-col="sentAt"] {
  z-index: 4;
  background: var(--color-bg-alt);
}
#rewards-table td[data-col="id"],
#rewards-table th[data-col="id"] {
  left: 0;
  width: 60px;
  min-width: 60px;
  max-width: 60px;
}
/* 2026-10-20: 100px→130pxに拡大(ユーザー指摘)。幅変更に伴い後続列のleftを全て+30px。 */
#rewards-table td[data-col="createdAt"],
#rewards-table th[data-col="createdAt"] {
  left: 60px;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}
#rewards-table td[data-col="author"],
#rewards-table th[data-col="author"] {
  left: 190px;
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#rewards-table td[data-col="method"],
#rewards-table th[data-col="method"] {
  left: 330px;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}
#rewards-table td[data-col="name"],
#rewards-table th[data-col="name"] {
  left: 460px;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#rewards-table td[data-col="sentAt"],
#rewards-table th[data-col="sentAt"] {
  left: 640px;
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  box-shadow: 4px 0 6px -4px rgba(0, 0, 0, 0.12);
}

/* members.html専用 - ID/メール/加入日/区分(申請時)/区分(付与)/ニックネーム/
   お名前/退会の8列を常に見える位置に固定し(sticky-left)、イベント数等の
   活動統計列だけが横スクロールする(2026-10-06、ユーザー指定)。 */
#member-table td[data-col="id"],
#member-table th[data-col="id"],
#member-table td[data-col="email"],
#member-table th[data-col="email"],
#member-table td[data-col="joinedAt"],
#member-table th[data-col="joinedAt"],
#member-table td[data-col="appliedPartnership"],
#member-table th[data-col="appliedPartnership"],
#member-table td[data-col="role"],
#member-table th[data-col="role"],
#member-table td[data-col="nickname"],
#member-table th[data-col="nickname"],
#member-table td[data-col="name"],
#member-table th[data-col="name"],
#member-table td[data-col="isWithdrawn"],
#member-table th[data-col="isWithdrawn"] {
  position: sticky;
  z-index: 2;
  background: #fff;
}
/* 2026-10-19 バグ修正 - costs-tableと同じ理由(上のコメント参照)で、ここも
   data-col属性を持つ"全部の"ヘッダー(横スクロールする活動統計列も含む)に
   マッチしていたため固定8列だけに絞る。 */
#member-table thead th[data-col="id"],
#member-table thead th[data-col="email"],
#member-table thead th[data-col="joinedAt"],
#member-table thead th[data-col="appliedPartnership"],
#member-table thead th[data-col="role"],
#member-table thead th[data-col="nickname"],
#member-table thead th[data-col="name"],
#member-table thead th[data-col="isWithdrawn"] {
  z-index: 4;
  background: var(--color-bg-alt);
}

#member-table td[data-col="id"],
#member-table th[data-col="id"] {
  left: 0;
  width: 64px;
  min-width: 64px;
  max-width: 64px;
}
#member-table td[data-col="email"],
#member-table th[data-col="email"] {
  left: 64px;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 2026-10-19: 90px→150pxに拡大(加入日時がYYYY-MM-DD HH:MM:SSフル19文字で
   切れていた不具合 - ユーザー指摘)。幅変更に伴い後続列のleftを全て+60px。 */
#member-table td[data-col="joinedAt"],
#member-table th[data-col="joinedAt"] {
  left: 244px;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}
#member-table td[data-col="appliedPartnership"],
#member-table th[data-col="appliedPartnership"] {
  left: 394px;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}
#member-table td[data-col="role"],
#member-table th[data-col="role"] {
  left: 494px;
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}
#member-table td[data-col="nickname"],
#member-table th[data-col="nickname"] {
  left: 604px;
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#member-table td[data-col="name"],
#member-table th[data-col="name"] {
  left: 724px;
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#member-table td[data-col="isWithdrawn"],
#member-table th[data-col="isWithdrawn"] {
  left: 834px;
  width: 70px;
  min-width: 70px;
  max-width: 70px;
  box-shadow: 4px 0 6px -4px rgba(0, 0, 0, 0.12);
}

.grid-frozen-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

.grid-revert-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text-sub);
  cursor: pointer;
}

.grid-revert-btn:hover:not(:disabled) {
  background: var(--color-bg-tint);
  color: var(--color-text);
}

.grid-revert-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* 2026-10-19追加 - 行の完全削除ボタン(保存/取り消しと違い常時活性)。危険操作
   なので色だけ差を付け、hoverで初めて赤を強調する(常時赤だと目立ちすぎて
   誤クリックを誘発するため)。 */
.grid-delete-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text-sub);
  cursor: pointer;
}

.grid-delete-btn:hover {
  background: #fdeceb;
  border-color: var(--color-danger, #e0554f);
  color: var(--color-danger, #e0554f);
}

/* qualified with the table selector so this beats .admin-grid-table td's
   own padding:0 on specificity - .grid-cell alone (0,1,0) used to lose to
   .admin-grid-table td (0,1,1) regardless of source order, so this padding
   was silently dead and cell text sat flush against the border. */
.admin-grid-table td.grid-cell {
  padding: 0 16px;
  font-size: 13px;
  cursor: cell;
  outline: none;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* same specificity fix as the readonly-focus rule below: plain ".grid-cell:
   focus"/".grid-cell.grid-cell-focused" (0-2-0) was losing the outline
   specifically to ".admin-grid-table td.grid-cell"'s own "outline: none"
   (0-2-1) above - the background tint still showed (nothing else was
   contesting that property), which is why this looked like it "mostly
   worked" while only the ring silently never appeared. */
.admin-grid-table td.grid-cell:focus,
.admin-grid-table td.grid-cell.grid-cell-focused {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  background: var(--color-bg-tint);
  position: relative;
  z-index: 1;
}

/* ドラッグで複数セル選択した範囲の塗り - focusのoutlineとは別物(1セルだけの
   選択時はこのクラス自体を付けない、createGridTable参照)。同じ特異性の罠が
   あるので上のfocusルールと同じ形で.admin-grid-table td.grid-cellまで書く。 */
.admin-grid-table td.grid-cell.grid-cell-selected {
  background: var(--color-bg-tint);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}

.grid-cell-readonly {
  color: var(--color-text-sub);
  background: repeating-linear-gradient(135deg, transparent, transparent 6px, rgba(0, 0, 0, 0.02) 6px, rgba(0, 0, 0, 0.02) 12px);
  cursor: default;
}

/* qualified with .admin-grid-table td for the same specificity reason as
   td.grid-cell's padding fix above: the base ".admin-grid-table td.grid-cell"
   rule's own "outline: none" (0-2-1) was silently beating this rule's
   ".grid-cell-readonly.grid-cell-focused" (0-2-0) regardless of source
   order, so the outline never rendered at all - only the equally-faint
   --color-bg-alt background was ever visible. */
.admin-grid-table td.grid-cell-readonly.grid-cell-focused {
  outline: 2px dashed var(--color-text-sub);
  outline-offset: -2px;
  background: var(--color-bg-tint);
}

.grid-cell-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* floating edit surface - fixed to the cell's exact width/position, but
   its own height is free to grow past the row (min-height only matches
   the row so short single-line edits don't look cramped). */
.grid-cell-editor {
  z-index: 500;
  background: #fff;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.grid-cell-editor-text {
  justify-content: center;
}

.grid-cell-input {
  width: 100%;
  height: 100%;
  border: none;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.grid-cell-editor-longtext {
  padding: 8px;
  min-width: 260px;
}

/* 2026-10-19追加 - 「ビュー/参加」列の4項目(ビュー/参加/クーポン新規/
   クーポン既存)入力。 */
.grid-engagement-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grid-engagement-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 2026-10-19追加 - 「謝礼発送案件」列など、長い名前を1行に収めて末尾省略
   表示するための汎用クラス。 */
.grid-ellipsis-cell {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.grid-engagement-field span {
  font-size: 12px;
  color: var(--color-text-sub);
  min-width: 90px;
  flex-shrink: 0;
}

.grid-cell-textarea {
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  overflow: hidden;
}

.grid-cell-editor-foot {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}

.grid-cell-editor-select {
  padding: 4px;
}

.grid-select-list {
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow-y: auto;
}

.grid-select-opt {
  text-align: left;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: 5px;
  font-size: 13px;
  color: var(--color-text);
}

.grid-select-opt:hover {
  background: var(--color-bg-tint);
}

.grid-select-opt.active {
  background: var(--color-primary);
  color: #fff;
}

.grid-cell-editor-autocomplete {
  padding: 4px;
  min-width: 220px;
}

.grid-cell-editor-autocomplete .grid-cell-input {
  height: 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.grid-suggest-sub {
  color: var(--color-text-sub);
  font-size: 11.5px;
}

.grid-attach-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  max-height: 160px;
  overflow-y: auto;
}

.grid-attach-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  font-size: 12.5px;
}

.grid-attach-row a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-attach-remove {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--color-text-sub);
  cursor: pointer;
  font-size: 12px;
}

/* アップロード済み行(.grid-attach-row)と同じ灰色ボックスの見た目で、常に
   リストの最後に1つ積んでおく「追加」行 - ファイルが0件の時はこれ1つだけが
   残り、それ自体が「ここを押して選んで」の案内を兼ねる。 */
.grid-attach-row-add {
  cursor: pointer;
  justify-content: center;
  color: var(--color-text-sub);
  border: 1px dashed var(--color-border);
  background: transparent;
}

.grid-attach-row-add:hover {
  background: var(--color-bg-alt);
  border-style: solid;
}

/* ネイティブ<input type=file>自体は見た目が出ないよう隠す(display:noneだと
   一部ブラウザでclick()が無視されるのでopacity+位置指定で視覚的にのみ隠す) -
   実際のトリガーは.grid-attach-row-add行のクリック。 */
.grid-attach-file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* row-level 保存 button (frozen column) - disabled/neutral until that row
   has an uncommitted cell edit, matching the same visual language as the
   older is-dirty/is-editing states above. */
.admin-save-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.admin-save-btn.is-dirty {
  opacity: 1;
}

/* ==========================================================================
   Migrated content (Slashpage -> local). Thumbnails with real images,
   comment avatars, and body blocks converted from Slashpage blockTree.
   ========================================================================== */

.thumb.has-img,
.post-detail-thumb.has-img {
  overflow: hidden;
  background: var(--color-bg-tint);
  padding: 0;
}
.thumb.has-img img,
.post-detail-thumb.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
/* 세로로 긴 썸네일(縦長スクリーンショット等)は 16:9 固定+cover だと上下が
   切れていた - 詳細ページでは全体が見えるよう、高さを画像の実比率に合わせる
   (リスト/カードの .thumb.has-img は切れてもいい仕様のままcoverを維持)。 */
.post-detail-thumb.has-img {
  aspect-ratio: auto;
  max-height: 480px;
}
.post-detail-thumb.has-img img {
  height: auto;
  max-height: 480px;
  object-fit: contain;
}

.comment-avatar.has-img {
  overflow: hidden;
  padding: 0;
}
.comment-avatar.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comment-text p {
  margin: 0 0 6px;
}
.comment-text p:last-child {
  margin-bottom: 0;
}
.comment-text .sp-image img,
.comment-text .sp-video video {
  max-width: 320px;
  width: 100%;
  border-radius: var(--radius-sm);
}
.comment-text .sp-empty {
  display: none;
}

.source-link {
  font-size: 12px;
  color: var(--color-text-sub);
  margin: 14px 0 0;
  word-break: break-all;
}

/* pin-card with real OG/thumbnail image */
.pin-card .og-image.has-img {
  padding: 0;
  min-height: 0;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.pin-card .og-image.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pin-card .og-image.has-img .og-platform {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.55);
  padding: 3px 8px;
  border-radius: 999px;
}
.pin-card .og-image.has-img .og-title {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.pin-card .og-detail-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-top: 8px;
  display: inline-block;
}

/* --- Slashpage block conversions --- */
.post-detail-body p {
  margin: 0 0 10px;
}
.post-detail-body .sp-empty {
  margin: 0;
  height: 10px;
  line-height: 10px;
}
.post-detail-body h2 {
  font-size: 20px;
  margin: 28px 0 12px;
  line-height: 1.5;
}
.post-detail-body h3 {
  font-size: 17px;
  margin: 22px 0 10px;
  line-height: 1.5;
}
.post-detail-body h4 {
  font-size: 15px;
  margin: 18px 0 8px;
}
.post-detail-body ul,
.post-detail-body ol,
.comment-text ul,
.comment-text ol {
  margin: 6px 0 12px;
  padding-left: 24px;
}
.post-detail-body ul,
.comment-text ul {
  list-style: disc;
}
.post-detail-body ol,
.comment-text ol {
  list-style: decimal;
}
.post-detail-body li,
.comment-text li {
  margin: 3px 0;
}
.post-detail-body hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 22px 0;
}
.post-detail-body blockquote {
  margin: 12px 0;
  padding: 8px 16px;
  border-left: 3px solid var(--color-primary);
  background: var(--color-bg-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-detail-body pre {
  background: #17242a;
  color: #e6f1f3;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 14px;
}
.post-detail-body code,
.comment-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #fdeceb;
  color: #c2352c;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
}
.post-detail-body pre code,
.comment-text pre code {
  background: none;
  color: inherit;
  padding: 0;
}
.post-detail-body a,
.comment-text a {
  color: var(--color-primary-dark);
  text-decoration: underline;
  word-break: break-all;
}

.sp-callout {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin: 10px 0 14px;
  font-size: 14px;
}
.sp-callout-icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1.4;
}
.sp-callout > div {
  flex: 1;
  min-width: 0;
}
.sp-callout p {
  margin: 4px 0;
}
/* コールアウト内の箇条書き/番号付きリスト。先頭・末尾ブロックの余白は消して
   アイコンと1行目の高さを揃える(エディタ保存分は中身が<p>/<ul>で包まれるため) */
.sp-callout ul,
.sp-callout ol {
  margin: 4px 0;
  padding-left: 22px;
}
.sp-callout > div > :first-child {
  margin-top: 0;
}
.sp-callout > div > :last-child {
  margin-bottom: 0;
}
.sp-callout a {
  color: inherit;
  text-decoration: underline;
}

.sp-image {
  margin: 12px 0 16px;
}
.sp-image.center {
  text-align: center;
}
.sp-image img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  border-radius: var(--radius-sm);
}

/* Migrated content sometimes carries inline max-width (e.g. style="max-width:499px")
   from the source. Inline styles beat plain selectors, so force it here -
   this is the fix for the mobile horizontal-scroll bug. */
.post-detail-body img,
.comment-text img,
.post-detail-body iframe {
  max-width: 100% !important;
}
.sp-image figcaption {
  font-size: 12px;
  color: var(--color-text-sub);
  margin-top: 6px;
  text-align: center;
}

.sp-video {
  margin: 12px 0 16px;
}
.sp-video video,
.sp-video img {
  width: 100%;
  max-height: 480px;
  border-radius: var(--radius-sm);
  background: #000;
}

.sp-embed.sp-youtube {
  position: relative;
  aspect-ratio: 16/9;
  margin: 12px 0 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.sp-embed.sp-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sp-linkcard {
  display: flex;
  gap: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 12px 0 16px;
  text-decoration: none !important;
  color: inherit !important;
  background: #fff;
}
.sp-linkcard:hover {
  border-color: var(--color-primary);
}
.sp-linkcard img {
  width: 160px;
  min-height: 100px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 0 !important;
}
.sp-linkcard-body {
  padding: 12px 14px 12px 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sp-linkcard img + .sp-linkcard-body {
  padding-left: 0;
}
.sp-linkcard-body:first-child {
  padding-left: 14px;
}
.sp-linkcard-site {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sp-linkcard-body b {
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sp-linkcard-body p {
  font-size: 12.5px;
  color: var(--color-text-sub);
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sp-linkcard-url {
  font-size: 11.5px;
  color: var(--color-text-sub);
  word-break: break-all;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sp-cols {
  display: grid;
  gap: 18px;
  margin: 8px 0 14px;
  align-items: start;
}
.sp-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sp-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .sp-cols { grid-template-columns: 1fr; }
  .sp-linkcard { flex-direction: column; }
  .sp-linkcard img { width: 100%; }
  .sp-linkcard-body { padding: 12px 14px; }
}

.sp-section {
  padding: 22px 18px;
  border-radius: var(--radius-lg);
  margin: 14px 0 18px;
}
.sp-background {
  margin: 8px 0;
}
.sp-background.center {
  text-align: center;
}
.sp-btn-wrap {
  margin: 12px 0 16px;
}
.sp-btn-wrap.center {
  text-align: center;
}
.sp-btn {
  text-decoration: none !important;
  color: #fff !important;
}
.sp-btn.btn-ghost {
  color: var(--color-primary-dark) !important;
}
.sp-imgbtn {
  display: block;
  margin: 8px 0;
}
.sp-imgbtn img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}
.sp-social a {
  display: inline-block;
  margin-right: 10px;
  font-weight: 700;
}

.sp-table-wrap {
  overflow-x: auto;
  margin: 12px 0 16px;
}
.sp-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13.5px;
}
.sp-table td,
.sp-table th {
  border: 1px solid var(--color-border);
  padding: 8px 10px;
  vertical-align: top;
}
.sp-table th {
  background: var(--color-bg-tint);
}
.sp-table p {
  margin: 0;
}
.sp-table .sp-empty {
  display: none;
}
.sp-code-caption {
  font-size: 12px;
  color: var(--color-text-sub);
  margin: -8px 0 12px;
}

/* アンバサダー報酬ガイド(guide/index.html ambassador-howto)専用 - 既存のsp-*系
   (Slashpage移行コンテンツ)の見た目に合わせた軽量パーツ。 */
.info-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12.5px;
  background: #fff;
}
.reward-group + .reward-group {
  border-top: 1px solid var(--color-border);
  margin-top: 10px;
  padding-top: 10px;
}
.reward-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px dotted var(--color-border);
}
.reward-row:last-child {
  border-bottom: 0;
}
.reward-row .reward-what {
  flex: 1;
}
.reward-row .reward-what small {
  display: block;
  color: var(--color-text-sub);
  font-size: 12.5px;
  line-height: 1.6;
  margin-top: 2px;
}
.reward-row .reward-yen {
  font-weight: 900;
  font-size: 18px;
  white-space: nowrap;
  color: var(--color-primary-dark);
}
.reward-row .reward-yen span {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-text-sub);
  margin-left: 2px;
}

/* guide article list */
.guide-article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}
.guide-article-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: #fff;
  text-decoration: none !important;
  color: inherit !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.guide-article-card:hover {
  border-color: var(--color-primary);
}
.guide-article-card h3 {
  font-size: 15.5px;
  margin: 0;
}
.guide-article-card p {
  font-size: 12.5px;
  color: var(--color-text-sub);
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* 2026-10-21 ギフトカード管理(admin/gift-cards.html) - 他の管理表(会員/支払い確定)と
   同じエクセル風グリッド。ページ全体はスクロールさせず、表のラップだけ縦横スクロール */
body[data-page="gift-cards"] {
  height: 100%;
  overflow: hidden;
}
body[data-page="gift-cards"] .admin-shell {
  height: 100vh;
}
body[data-page="gift-cards"] .admin-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
body[data-page="gift-cards"] .admin-grid-table-wrap {
  flex: 1;
  min-height: 0;
}
/* 列幅は固定(他の管理表と同様)。長い値は省略表示し、セルをコピーすると全文が取れる。
   ID~通貨の5列は左固定、「発送状態」の左に太い区切り線 */
#gift-table td.grid-handle-col,
#gift-table th.grid-handle-col { width: 28px; min-width: 28px; max-width: 28px; padding: 0; text-align: center; }
#gift-table td[data-col="purchasedAt"],
#gift-table th[data-col="purchasedAt"] { width: 104px; min-width: 104px; max-width: 104px; }
#gift-table td[data-col="giftType"],
#gift-table th[data-col="giftType"] { width: 110px; min-width: 110px; max-width: 110px; }
#gift-table td[data-col="amount"],
#gift-table th[data-col="amount"] { width: 92px; min-width: 92px; max-width: 92px; }
#gift-table td[data-col="currency"],
#gift-table th[data-col="currency"] { width: 64px; min-width: 64px; max-width: 64px; }
#gift-table td[data-col="url"],
#gift-table th[data-col="url"] { width: 150px; min-width: 150px; max-width: 150px; }
#gift-table td[data-col="expiresAt"],
#gift-table th[data-col="expiresAt"] { width: 104px; min-width: 104px; max-width: 104px; }
#gift-table td[data-col="purchaser"],
#gift-table th[data-col="purchaser"] { width: 100px; min-width: 100px; max-width: 100px; }
#gift-table td[data-col="reasonCategory"],
#gift-table th[data-col="reasonCategory"] { width: 100px; min-width: 100px; max-width: 100px; }
#gift-table td[data-col="reasonDetail"],
#gift-table th[data-col="reasonDetail"] { width: 150px; min-width: 150px; max-width: 150px; }
#gift-table td[data-col="cardApprovalNo"],
#gift-table th[data-col="cardApprovalNo"] { width: 100px; min-width: 100px; max-width: 100px; }
#gift-table td[data-col="flexDocNo"],
#gift-table th[data-col="flexDocNo"] { width: 100px; min-width: 100px; max-width: 100px; }
#gift-table td[data-col="status"],
#gift-table th[data-col="status"] { width: 92px; min-width: 92px; max-width: 92px; }
#gift-table td[data-col="sentDate"],
#gift-table th[data-col="sentDate"] { width: 104px; min-width: 104px; max-width: 104px; }
#gift-table td[data-col="sender"],
#gift-table th[data-col="sender"] { width: 100px; min-width: 100px; max-width: 100px; }
#gift-table td[data-col="recipient"],
#gift-table th[data-col="recipient"] { width: 130px; min-width: 130px; max-width: 130px; }
#gift-table td[data-col="recipientContact"],
#gift-table th[data-col="recipientContact"] { width: 190px; min-width: 190px; max-width: 190px; }
#gift-table td[data-col="internalNote"],
#gift-table th[data-col="internalNote"] { width: 150px; min-width: 150px; max-width: 150px; }
#gift-table td.grid-handle-col,
#gift-table th.grid-handle-col,
#gift-table td[data-col="purchasedAt"],
#gift-table th[data-col="purchasedAt"],
#gift-table td[data-col="giftType"],
#gift-table th[data-col="giftType"],
#gift-table td[data-col="amount"],
#gift-table th[data-col="amount"],
#gift-table td[data-col="currency"],
#gift-table th[data-col="currency"] { position: sticky; z-index: 2; background: #fff; }
#gift-table thead th.grid-handle-col,
#gift-table thead th[data-col="purchasedAt"],
#gift-table thead th[data-col="giftType"],
#gift-table thead th[data-col="amount"],
#gift-table thead th[data-col="currency"] { z-index: 4; background: var(--color-bg-alt); }
#gift-table td.grid-handle-col, #gift-table th.grid-handle-col { left: 0px; }
#gift-table td[data-col="purchasedAt"], #gift-table th[data-col="purchasedAt"] { left: 28px; }
#gift-table td[data-col="giftType"], #gift-table th[data-col="giftType"] { left: 132px; }
#gift-table td[data-col="amount"], #gift-table th[data-col="amount"] { left: 242px; }
#gift-table td[data-col="currency"], #gift-table th[data-col="currency"] { left: 334px; box-shadow: 4px 0 6px -4px rgba(0, 0, 0, 0.12); }
#gift-table td[data-col="status"], #gift-table th[data-col="status"] { border-left: 2px solid #94a3b8; }
#gift-table td.grid-cell { padding: 0 10px; }
.grid-drag-handle { cursor: grab; color: var(--color-text-sub); font-size: 16px; line-height: 1; user-select: none; display: inline-block; padding: 6px 4px; }
.grid-drag-handle[draggable="false"] { cursor: not-allowed; opacity: .35; }
#gift-tbody tr.is-dragging { opacity: .4; }
#gift-tbody tr.drop-above td { box-shadow: inset 0 3px 0 #0ea5b7; }
#gift-tbody tr.drop-below td { box-shadow: inset 0 -3px 0 #0ea5b7; }
.gift-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.gift-badge.sent { background: #dcfce7; color: #166534; }
.gift-badge.unsent { background: #fef3c7; color: #92400e; }
.gift-count { font-size: 13px; color: var(--color-text-sub); margin-left: auto; align-self: center; }
