/* 中司不動産 ダッシュボード — モバイルファースト */

/*
 * 文字サイズ基準
 * - 従来: html 16px（ブラウザ標準）→ 本文 0.875rem≒14px / 補足 0.75rem≒12px / ナビ≈10px
 * - 変更: html 112.5%（≒18px）で rem 全体を一段階拡大 → 本文≒15.8px / 補足≒13.5px / ナビ≈11px
 */
html {
  font-size: 112.5%;
}

:root {
  --nak-bg: #f8fafc;
  --nak-card: #fff;
  --nak-border: #e2e8f0;
  --nak-text: #0f172a;
  --nak-muted: #64748b;
  --nak-primary: #2563eb;
  --nak-brief-bg1: #fff7ed;
  --nak-brief-bg2: #fffbeb;
  --nak-brief-border: #fcd34d;
  --nak-brief-accent: #d97706;
  --nak-safe-top: env(safe-area-inset-top, 0);
  --nak-safe-bottom: env(safe-area-inset-bottom, 0);
}

* {
  box-sizing: border-box;
}

body.nak-app {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", sans-serif;
  background: var(--nak-bg);
  color: var(--nak-text);
  min-height: 100dvh;
  padding-bottom: calc(4.5rem + var(--nak-safe-bottom));
  line-height: 1.5;
}

.nak-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.5rem + var(--nak-safe-top)) 1rem 0.5rem;
  background: #fff;
  border-bottom: 1px solid var(--nak-border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nak-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nak-header__logo {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.nak-header__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
}

.nak-header__sub {
  margin: 0;
  font-size: 0.75rem;
  color: var(--nak-muted);
}

.nak-header__user {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: var(--nak-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nak-main {
  padding: 1rem;
  max-width: 32rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nak-briefing {
  border-radius: 1rem;
  border: 1px solid var(--nak-brief-border);
  background: linear-gradient(135deg, var(--nak-brief-bg1), var(--nak-brief-bg2));
  padding: 1rem;
}

.nak-briefing__inner {
  display: flex;
  gap: 0.75rem;
}

.nak-briefing__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: var(--nak-brief-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.nak-briefing__label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--nak-brief-accent);
}

.nak-briefing__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #334155;
}

.nak-briefing__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.nak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  font-family: inherit;
}

.nak-btn--outline {
  border-color: var(--nak-brief-accent);
  color: var(--nak-brief-accent);
  background: #fff;
}

.nak-btn--ghost {
  color: #92400e;
}

.nak-kpi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.nak-kpi__card {
  background: var(--nak-card);
  border: 1px solid var(--nak-border);
  border-radius: 0.75rem;
  padding: 0.875rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}

.nak-kpi__card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s, background-color 0.15s;
}

.nak-kpi__card--link:hover {
  border-color: #bfdbfe;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.nak-kpi__card--action {
  position: relative;
  cursor: pointer;
  background: linear-gradient(160deg, #fffbeb 0%, #fff 55%);
  border-color: #fcd34d;
  box-shadow: 0 1px 2px rgb(217 119 6 / 12%);
  padding-right: 2rem;
}

.nak-kpi__card--action:hover {
  border-color: #f59e0b;
  background: linear-gradient(160deg, #fef3c7 0%, #fffbeb 60%);
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.16);
}

.nak-kpi__card--action:active {
  transform: scale(0.98);
}

.nak-kpi__card--action .nak-kpi__label {
  color: #b45309;
  font-weight: 600;
}

.nak-kpi__hint {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0.4rem 0 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #d97706;
}

.nak-kpi__card--action::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.65rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #d97706;
  border-bottom: 2px solid #d97706;
  transform: translateY(-50%) rotate(-45deg);
  opacity: 0.85;
}

.nak-kpi__label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  color: var(--nak-muted);
}

.nak-kpi__value {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nak-kpi__trend {
  font-size: 0.75rem;
  margin-left: 0.25rem;
  color: #16a34a;
}

.nak-kpi__trend--warn {
  color: #d97706;
}

.nak-kpi__unit {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--nak-muted);
  margin-left: 0.125rem;
}

.nak-card {
  background: var(--nak-card);
  border: 1px solid var(--nak-border);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}

.nak-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.nak-card__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
}

.nak-card__link {
  font-size: 0.75rem;
  color: var(--nak-primary);
  text-decoration: none;
}

.nak-activity {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--nak-border);
  text-decoration: none;
  color: inherit;
}

.nak-activity:last-child {
  border-bottom: none;
}

.nak-activity__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.nak-activity__meta {
  font-size: 0.7rem;
  color: var(--nak-muted);
  margin: 0.15rem 0 0;
}

.nak-empty {
  text-align: center;
  padding: 1.5rem 0.5rem;
  color: var(--nak-muted);
  font-size: 0.875rem;
}

.nak-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  background: var(--nak-primary);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 0.75rem;
  text-decoration: none;
}

.nak-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--nak-border);
  padding: 0.35rem 0 calc(0.35rem + var(--nak-safe-bottom));
  z-index: 50;
  font-size: 0.65rem;
}

.nak-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  color: var(--nak-muted);
  text-decoration: none;
  min-width: 0;
}

.nak-nav__item--active {
  color: var(--nak-primary);
  font-weight: 600;
}

.nak-nav__item--primary {
  color: var(--nak-primary);
  font-weight: 700;
}

.nak-skeleton,
.nak-skeleton--line,
.nak-skeleton--num,
.nak-skeleton--text {
  display: inline-block;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: nak-shimmer 1.2s ease-in-out infinite;
  border-radius: 0.25rem;
}

.nak-skeleton--line {
  width: 5rem;
  height: 0.65rem;
}

.nak-skeleton--num {
  width: 2.5rem;
  height: 1.5rem;
}

.nak-skeleton--text {
  width: 100%;
  height: 3rem;
}

.nak-skeleton-block {
  min-height: 5rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
}

@keyframes nak-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ─── ヘッダーアクション ─────────────────────────────────── */

.nak-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nak-notif {
  position: relative;
}

.nak-notif__toggle {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.nak-notif__toggle:hover {
  background: #f1f5f9;
}

.nak-notif__badge {
  position: absolute;
  top: 0.15rem;
  right: 0.1rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.nak-notif__badge[hidden] {
  display: none !important;
}

.nak-notif__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  width: min(20.5rem, calc(100vw - 1.5rem));
  max-height: min(24rem, 70vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  z-index: 60;
}

.nak-notif__panel[hidden] {
  display: none !important;
}

.nak-notif__panel-head {
  padding: 0.75rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
}

.nak-notif__list {
  overflow-y: auto;
  max-height: min(20rem, 60vh);
}

.nak-notif__empty {
  margin: 0;
  padding: 1.25rem 0.9rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  text-align: center;
}

.nak-notif__item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  text-align: left;
  border: none;
  border-bottom: 1px solid #f8fafc;
  background: #fff;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
}

.nak-notif__item:hover {
  background: #f8fafc;
}

.nak-notif__item--unread {
  background: #eff6ff;
}

.nak-notif__item--unread:hover {
  background: #dbeafe;
}

.nak-notif__item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nak-notif__message {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
}

.nak-notif__preview {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.nak-notif__when {
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: #94a3b8;
  padding-top: 0.1rem;
}

/* ─── ボタン追加スタイル ─────────────────────────────────── */

.nak-btn--primary {
  background: var(--nak-primary);
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 0.45rem 0.85rem;
  transition: background 0.15s, transform 0.1s;
}

.nak-btn--primary:hover {
  background: #1d4ed8;
}

.nak-btn--primary:active {
  transform: scale(0.97);
}

.nak-btn--lg {
  width: 100%;
  justify-content: center;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  min-height: 3.25rem;
  border-radius: 0.75rem;
}

.nak-btn--icon {
  background: transparent;
  border: 1px solid var(--nak-border);
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1rem;
  color: var(--nak-muted);
  transition: color 0.15s, border-color 0.15s;
}

.nak-btn--icon:hover {
  color: var(--nak-primary);
  border-color: var(--nak-primary);
}

.nak-btn--outline-default {
  border-color: var(--nak-border);
  color: var(--nak-text);
  background: #fff;
  padding: 0.5rem 1.25rem;
  transition: background 0.15s;
}

.nak-btn--outline-default:hover:not(:disabled) {
  background: var(--nak-bg);
}

.nak-btn:disabled,
.nak-pagination__arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.nak-btn__icon {
  margin-right: 0.3rem;
  font-size: 0.7rem;
}

/* ─── ページネーション（顧客一覧） ───────────────────────── */

.nak-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid var(--nak-border);
  border-radius: 0.75rem;
  flex-wrap: wrap;
}

.nak-pagination__indicator {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nak-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nak-pagination__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.nak-pagination__arrow {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nak-pagination__input {
  width: 3.5rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--nak-border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.nak-pagination__go {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  min-height: 2.5rem;
}

/* ─── 次のアクション一覧 ───────────────────────────────────── */

.nak-task-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nak-task-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #fff;
  border: 1px solid var(--nak-border);
  border-radius: 0.75rem;
  color: inherit;
}

.nak-task-card__body {
  min-width: 0;
}

.nak-task-card__next {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
}

.nak-task-card__meta,
.nak-task-card__sub {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.nak-task-card__customer {
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
}

.nak-task-card__customer:hover {
  text-decoration: underline;
}

.nak-task-card__sep {
  color: #cbd5e1;
}

.nak-task-card__content {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nak-task-card__actions {
  display: flex;
  gap: 0.5rem;
}

.nak-task-card__done,
.nak-task-card__open {
  flex: 1;
  min-height: 2.5rem;
  font-size: 0.8125rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nak-task-card__chevron {
  display: none;
}

/* ─── 個人タスク ───────────────────────────────────────────── */

.nak-mytask-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nak-mytask {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid var(--nak-border, #e2e8f0);
  border-radius: 0.75rem;
  margin-bottom: 5px;
}

.nak-mytask:last-child {
  margin-bottom: 0;
}

.nak-mytask--overdue {
  background: #fff7ed;
  border-color: #fdba74;
}

.nak-mytask__body {
  flex: 1;
  min-width: 0;
}

.nak-mytask__line {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  line-height: 1.35;
}

.nak-mytask__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.nak-mytask__due {
  display: inline-block;
  margin-top: 0;
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

.nak-mytask__due--overdue {
  color: #c2410c;
  font-weight: 600;
}

.nak-mytask__actions {
  flex-shrink: 0;
}

.nak-mytask__btn {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  height: auto;
  white-space: nowrap;
}

.nak-tomorrow-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nak-tomorrow-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nak-tomorrow-row input {
  flex: 1;
}

/* ─── 日報一覧 ───────────────────────────────────────────── */

.nak-report-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nak-report-list__head,
.nak-report-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(3.5rem, 0.45fr) auto;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.nak-report-list__head {
  padding: 0.35rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nak-report-list__row {
  padding: 0.875rem 1rem;
  background: #fff;
  border: 1px solid var(--nak-border);
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nak-report-list__row:hover {
  border-color: #bfdbfe;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.nak-report-list__date {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}

.nak-report-list__name {
  font-size: 0.875rem;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nak-report-list__submitted {
  font-size: 0.8125rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.nak-report-list__confirm {
  font-size: 0.8125rem;
  color: #334155;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.nak-report-list__chevron {
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.nak-view-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin: 0.75rem 0 0.25rem;
  padding: 0.2rem;
  background: #f1f5f9;
  border-radius: 0.65rem;
}

.nak-view-toggle__btn {
  border: none;
  background: transparent;
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 0.5rem;
  cursor: pointer;
}

.nak-view-toggle__btn--active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.nak-customer-map-wrap {
  display: none;
  margin-top: 0.75rem;
}

.nak-customers--map .nak-customer-list,
.nak-customers--map .nak-pagination {
  display: none !important;
}

.nak-customers--map .nak-customer-map-wrap {
  display: block;
}

.nak-customers--map .nak-count {
  display: none;
}

.nak-customer-map__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  margin: 0 0 0.65rem 0;
  padding: 0.55rem 0.75rem;
  background: #fff;
  border: 1px solid var(--nak-border, #e2e8f0);
  border-radius: 0.75rem;
  font-size: 0.75rem;
  color: #475569;
}

.nak-customer-map__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nak-customer-map__legend-pin {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
}

.nak-customer-map__legend-pin--primary {
  background: #2563eb;
}

.nak-customer-map__legend-pin--property {
  background: #d97706;
}

.nak-customer-map {
  width: 100%;
  height: min(60vh, 28rem);
  border-radius: 0.85rem;
  border: 1px solid var(--nak-border, #e2e8f0);
  overflow: hidden;
  background: #e2e8f0;
}

.nak-customers--map .nak-customer-map {
  height: calc(100dvh - 14.5rem);
  min-height: 18rem;
  max-height: none;
}

.nak-property-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nak-property-list__item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  border: 1px solid var(--nak-border, #e2e8f0);
  border-radius: 0.75rem;
  background: #fff;
}

.nak-property-list__body {
  flex: 1;
  min-width: 0;
}

.nak-property-list__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.nak-property-list__type {
  font-weight: 500;
  color: #64748b;
  font-size: 0.75rem;
}

.nak-property-list__addr {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #334155;
  word-break: break-word;
}

.nak-property-list__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex-shrink: 0;
}

.nak-property-list__maps {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  align-self: center;
}

.nak-report-detail-meta {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.nak-report-detail-meta__row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}

.nak-report-detail-meta__row dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.nak-report-detail-meta__row dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
}

.nak-feedback__check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
  cursor: pointer;
  user-select: none;
}

.nak-feedback__check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--nak-primary, #2563eb);
}

.nak-feedback__hint,
.nak-feedback__empty {
  margin: 0 0 0.75rem 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.nak-feedback__people,
.nak-feedback__comments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nak-feedback__people li,
.nak-feedback__comment {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nak-feedback__comment {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}

.nak-feedback__comment:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.nak-feedback__comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}

.nak-feedback__name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.nak-feedback__meta {
  font-size: 0.75rem;
  color: #64748b;
}

.nak-feedback__comment-body {
  margin: 0.2rem 0 0 0;
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.nak-feedback__form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nak-feedback__form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.nak-feedback__status {
  margin: 0.5rem 0 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.nak-report-feedback-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.nak-report-feedback-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.nak-report-feedback-panel__head strong {
  font-size: 0.9375rem;
  color: #0f172a;
}

.nak-report-feedback-panel__link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.nak-report-feedback-panel__link:hover {
  text-decoration: underline;
}

.nak-report-feedback-panel__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nak-report-feedback-panel__label {
  margin: 0 0 0.5rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.nak-feedback__people + .nak-feedback__check,
.nak-feedback__empty + .nak-feedback__check,
.nak-feedback__people + .nak-feedback__hint,
.nak-feedback__empty + .nak-feedback__hint,
.nak-feedback__comments + .nak-feedback__hint,
.nak-feedback__empty + .nak-feedback__form {
  margin-top: 0.75rem;
}

@media (max-width: 480px) {
  .nak-report-list__head {
    display: none;
  }

  .nak-report-list__row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto auto;
  }

  .nak-report-list__date {
    grid-column: 1;
    grid-row: 1;
  }

  .nak-report-list__chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .nak-report-list__name {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.8125rem;
  }

  .nak-report-list__submitted {
    grid-column: 1;
    grid-row: 3;
    font-size: 0.75rem;
  }

  .nak-report-list__confirm {
    grid-column: 1;
    grid-row: 4;
    text-align: left;
    font-size: 0.75rem;
    color: #64748b;
  }
  }
}

/* ─── ページタイトル ─────────────────────────────────────── */

.nak-page-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nak-page-title__icon {
  font-size: 1.25rem;
}

.nak-page-title__text {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}

/* ─── 検索バー ───────────────────────────────────────────── */

.nak-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--nak-border);
  border-radius: 0.75rem;
  padding: 0.65rem 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nak-search:focus-within {
  border-color: var(--nak-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nak-search__icon {
  font-size: 0.875rem;
  color: var(--nak-muted);
  flex-shrink: 0;
}

.nak-search__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--nak-text);
  background: transparent;
}

.nak-search__input::placeholder {
  color: #94a3b8;
}

/* ─── フィルタチップ ─────────────────────────────────────── */

.nak-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nak-chips::-webkit-scrollbar {
  display: none;
}

.nak-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--nak-border);
  background: #fff;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--nak-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.nak-chip:hover {
  border-color: var(--nak-primary);
  color: var(--nak-primary);
}

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

.nak-chip--active:hover {
  background: #1d4ed8;
  color: #fff;
}

/* ─── 件数表示 ───────────────────────────────────────────── */

.nak-count {
  margin: 0;
  font-size: 0.8rem;
  color: var(--nak-primary);
  font-weight: 600;
}

/* ─── 顧客カード ─────────────────────────────────────────── */

.nak-customer-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nak-customer-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 0.75rem;
  background: var(--nak-card);
  border: 1px solid var(--nak-border);
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.5rem;
  transition: box-shadow 0.15s, border-color 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.nak-customer-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nak-customer-card:active {
  background: #f8fafc;
}

.nak-customer-card__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.nak-customer-card__body {
  flex: 1;
  min-width: 0;
}

.nak-customer-card__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.nak-customer-card__name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nak-customer-card__id {
  display: block;
  margin-top: 0.05rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.nak-customer-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.nak-customer-card__sub {
  font-size: 0.75rem;
  color: var(--nak-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nak-customer-card__arrow {
  font-size: 1.25rem;
  color: #cbd5e1;
  flex-shrink: 0;
  margin-left: auto;
}

/* ─── モーダル ───────────────────────────────────────────── */

.nak-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: nak-fade-in 0.2s ease;
}

.nak-modal-backdrop[hidden] {
  display: none;
}

.nak-modal {
  background: #fff;
  border-radius: 1.25rem 1.25rem 0 0;
  width: 100%;
  max-width: 32rem;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 1.25rem 1rem calc(1.25rem + var(--nak-safe-bottom));
  animation: nak-slide-up 0.25s ease;
}

.nak-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.nak-modal__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.nak-modal__title-icon {
  font-size: 0.875rem;
}

.nak-modal__close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--nak-muted);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.nak-modal__close:hover {
  color: var(--nak-text);
}

/* ─── フォーム ───────────────────────────────────────────── */

.nak-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.nak-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.nak-form__row {
  display: flex;
  gap: 0.75rem;
}

.nak-form__group--half {
  flex: 1;
}

.nak-form__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nak-primary);
}

.nak-form__label--required::after {
  content: " *";
  color: #dc2626;
}

.nak-form__input,
.nak-form__select,
.nak-form__textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--nak-border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--nak-text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nak-form__input:focus,
.nak-form__select:focus,
.nak-form__textarea:focus {
  outline: none;
  border-color: var(--nak-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nak-form__input--error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.nak-form__input::placeholder,
.nak-form__textarea::placeholder {
  color: #94a3b8;
}

.nak-form__select {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  padding-right: 2rem;
}

.nak-form__textarea {
  resize: vertical;
  min-height: 4rem;
}

.nak-form__actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.nak-form__actions .nak-btn {
  min-width: 7rem;
  justify-content: center;
}

/* ─── アニメーション ─────────────────────────────────────── */

@keyframes nak-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes nak-slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ─── ナビアイコン ───────────────────────────────────────── */

.nak-nav__icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-bottom: 0.15rem;
  transition: transform 0.2s;
}

.nak-nav__item:active .nak-nav__icon {
  transform: scale(0.9);
}

/* ═══════════════════════════════════════════════════════════
   顧客詳細画面
   ═══════════════════════════════════════════════════════════ */

/* ─── 戻るボタン ─────────────────────────────────────────── */

.nak-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--nak-text);
  font-size: 1.125rem;
  transition: background 0.15s;
  flex-shrink: 0;
}

.nak-back-btn:hover {
  background: var(--nak-bg);
}

/* ─── プロフィールカード ─────────────────────────────────── */

.nak-detail-profile__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.nak-detail-profile__top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.nak-detail-profile__edit {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  margin: 0;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--nak-border);
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.nak-detail-profile__edit:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.nak-detail-profile__avatar {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.nak-detail-profile__info {
  flex: 1;
  min-width: 0;
}

.nak-detail-profile__name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nak-detail-profile__name {
  font-size: 1.1rem;
  font-weight: 700;
}

.nak-detail-profile__badge {
  display: none;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 600;
}

.nak-detail-profile__id {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.nak-detail-profile__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--nak-muted);
  line-height: 1.4;
}

.nak-detail-profile__address {
  min-width: 0;
  word-break: break-word;
}

.nak-detail-profile__maps {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  padding: 0.1rem 0.4rem;
  border-radius: 0.375rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nak-detail-profile__maps:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* ─── クイックアクションボタン ───────────────────────────── */

.nak-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.nak-detail-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem;
  border: 1px solid var(--nak-border);
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--nak-text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.nak-detail-action:hover {
  background: var(--nak-bg);
  border-color: #cbd5e1;
}

.nak-detail-action--ai {
  border-color: var(--nak-brief-border);
  color: var(--nak-brief-accent);
}

.nak-detail-action--ai:hover {
  background: var(--nak-brief-bg1);
}

.nak-detail-action__icon {
  font-size: 0.875rem;
}

/* ─── ステッパー（案件進捗） ─────────────────────────────── */

.nak-stepper {
  display: flex;
  align-items: flex-start;
}

.nak-stepper__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  min-width: 3.5rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nak-stepper__step:hover .nak-stepper__circle {
  transform: scale(1.1);
  border-color: var(--nak-primary);
}

.nak-stepper__circle {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--nak-muted);
  transition: all 0.25s;
}

.nak-stepper__circle--done {
  background: var(--nak-primary);
  color: #fff;
}

.nak-stepper__circle--current {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.nak-stepper__label {
  margin-top: 0.35rem;
  font-size: 0.6rem;
  color: var(--nak-muted);
  text-align: center;
  white-space: nowrap;
}

.nak-stepper__line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin-top: 0.9375rem;
  min-width: 0.5rem;
  transition: background 0.25s;
}

.nak-stepper__line--done {
  background: var(--nak-primary);
}

/* ─── タイムライン ───────────────────────────────────────── */

.nak-timeline-item {
  position: relative;
  display: flex;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
}

.nak-timeline-item--last {
  padding-bottom: 0;
}

.nak-timeline-item__line {
  position: absolute;
  left: 0.8125rem;
  top: 1.75rem;
  bottom: 0;
  width: 2px;
  background: var(--nak-border);
}

.nak-timeline-item__dot {
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.nak-timeline-item__body {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.nak-timeline-item__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.nak-timeline-item__date {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--nak-muted);
}

.nak-timeline-item__type {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  font-size: 0.6rem;
  font-weight: 600;
}

.nak-timeline-item__user {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--nak-text);
  padding: 0.1rem 0.45rem;
  background: #f1f5f9;
  border-radius: 9999px;
}

.nak-timeline-item__content {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--nak-text);
}

.nak-timeline-item__next {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: #eff6ff;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  color: var(--nak-primary);
  line-height: 1.5;
}

.nak-timeline-item__next-body {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.nak-timeline-item__next-icon {
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.nak-timeline-item__next-done {
  flex-shrink: 0;
  margin-left: auto;
  padding: 0.25rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  color: #1d4ed8;
  background: #fff;
  border: 1px solid #93c5fd;
  border-radius: 0.375rem;
  cursor: pointer;
  white-space: nowrap;
}

.nak-timeline-item__next-done:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

.nak-timeline-item__next-done:disabled {
  opacity: 0.6;
  cursor: wait;
}

.nak-timeline-item__next--done {
  background: #f1f5f9;
  color: #64748b;
}

.nak-timeline-item__next--done strong {
  color: #475569;
}

.nak-timeline-item__next-status {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.nak-timeline-more {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

.nak-timeline-more[hidden] {
  display: none !important;
}

.nak-timeline-more__btn {
  width: 100%;
  max-width: 16rem;
  font-size: 0.8125rem;
}

/* ─── メモ ───────────────────────────────────────────────── */

.nak-detail-memo {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--nak-text);
  white-space: pre-wrap;
}

/* ─── 小ボタン ───────────────────────────────────────────── */

.nak-btn--sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
}

/* ─── その他共有 ─────────────────────────────────────────── */

.nak-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nak-card__sub-title {
  font-size: 0.75rem;
  color: var(--nak-muted);
  margin-top: 0.15rem;
}

/* ─── 更新中インジケーター ─────────────────────────────── */

.nak-detail-action--disabled {
  opacity: 0.55;
  filter: grayscale(1);
  pointer-events: none;
  cursor: not-allowed;
  border-style: dashed;
  background: #f8fafc;
  color: #94a3b8;
}
.nak-detail-action--ai {
  border: 1px solid #d97706 !important;
  background: #fffcf0 !important;
  color: #92400e !important;
}

.nak-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--nak-muted);
  font-weight: 500;
  transition: opacity 0.2s;
}

.nak-status-indicator[hidden] {
  display: none;
  opacity: 0;
}

.nak-spinner {
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: #64748b;
  border-radius: 9999px;
  animation: nak-spin 0.8s linear infinite;
}

@keyframes nak-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* AI チャット：処理中・ストリーム中の演出 */
.nak-ai-row {
  display: flex;
  gap: 1rem;
}

.nak-ai-avatar {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.nak-ai-avatar--pulse {
  animation: nak-ai-avatar-pulse 1.4s ease-in-out infinite;
}

@keyframes nak-ai-avatar-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); transform: scale(1); }
  50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); transform: scale(1.04); }
}

.nak-ai-bubble {
  background: #e2e8f0;
  padding: 1rem;
  border-radius: 0.5rem;
  max-width: 80%;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.6;
  word-break: break-all;
  position: relative;
}

.nak-ai-bubble--thinking {
  min-width: 7.5rem;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 45%, #e2e8f0 90%);
  background-size: 200% 100%;
  animation: nak-ai-shimmer 1.6s ease-in-out infinite;
}

@keyframes nak-ai-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.nak-ai-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #64748b;
  font-size: 0.8125rem;
}

.nak-ai-status[hidden] {
  display: none !important;
}

.nak-ai-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  height: 1rem;
}

.nak-ai-dots span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #64748b;
  animation: nak-ai-dot 1.2s ease-in-out infinite;
}

.nak-ai-dots span:nth-child(2) { animation-delay: 0.15s; }
.nak-ai-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes nak-ai-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-0.2rem); }
}

.nak-ai-body {
  display: none;
}

.nak-ai-body.is-visible {
  display: block;
}

.nak-ai-caret {
  display: inline-block;
  width: 0.12em;
  height: 1em;
  margin-left: 0.1em;
  vertical-align: -0.1em;
  background: #2563eb;
  animation: nak-ai-caret 0.9s steps(1) infinite;
}

.nak-ai-caret[hidden] {
  display: none;
}

@keyframes nak-ai-caret {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.nak-ai-form.is-busy #ai-chat-input {
  opacity: 0.7;
}

.nak-ai-form.is-busy #ai-chat-submit {
  position: relative;
}

.nak-ai-form.is-busy #ai-chat-submit .nak-ai-send-icon {
  opacity: 0;
}

.nak-ai-form.is-busy #ai-chat-submit::after {
  content: "";
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 9999px;
  animation: nak-spin 0.8s linear infinite;
}
