/* ============================================================
   style-result.css — 結果ページ Kawaii スタイル
   ============================================================ */

.result-page {
  margin: 0;
  padding: 16px;
  background: linear-gradient(160deg, #fff3f8 0%, #fce8f2 100%);
  color: #4a2d3c;
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", system-ui, sans-serif;
  min-height: 100vh;
}

/* ── セクション共通 ── */
.result-header, .result-section, .result-footer {
  background: rgba(255, 252, 254, 0.96);
  border: 1px solid rgba(255, 170, 210, 0.28);
  border-radius: 18px;
  padding: 18px;
  margin: 0 auto 14px;
  max-width: 960px;
  box-sizing: border-box;
  box-shadow: 0 8px 28px rgba(200, 120, 160, 0.1);
}

.result-header h1 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #4a2d3c, #8c3568);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.result-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 170, 210, 0.3);
  background: linear-gradient(135deg, #fff6fa, #ffecf4);
  color: #5d394c;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.result-link:hover {
  border-color: #ff7aaa;
  color: #c44880;
  transform: translateY(-1px);
}

/* ── ユーザー情報 ── */
.result-user-info .user-line {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px;
  font-size: 14px;
  margin: 4px 0;
}

.label { color: #9d7888; }
.value.small { font-size: 12px; color: #b09aaa; }
.small { color: #9d7888; font-size: 13px; }

/* ── セクション見出し ── */
.result-section h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}

.result-section h2::before {
  content: "✦";
  font-size: 0.7em;
  color: #ff7aaa;
  flex-shrink: 0;
}

/* ── 変化ダッシュボード ── */
.change-dashboard {
  background: linear-gradient(145deg, #fffdfd, #fff3f8);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.dashboard-kicker {
  margin: 0 0 4px;
  color: #c44880;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-header h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.dashboard-lead {
  max-width: 360px;
  margin: 0;
  color: #7d5b6b;
  font-size: 14px;
  line-height: 1.7;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
}

.dashboard-card {
  background: #fff;
  border: 1px solid rgba(255, 170, 210, 0.32);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(200, 120, 160, 0.08);
}

.dashboard-card-primary {
  grid-row: span 2;
  background: linear-gradient(145deg, #fff8fb, #fff0f7);
}

.dashboard-card-title {
  margin-bottom: 10px;
  color: #4a2d3c;
  font-size: 16px;
  font-weight: 900;
}

.dashboard-placeholder {
  color: #9d7888;
  font-size: 14px;
}

.dashboard-mask-group {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 6px 10px;
  margin-bottom: 12px;
  align-items: baseline;
}

.dashboard-label {
  color: #9d7888;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-mask-value {
  color: #4a2d3c;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
}

.dashboard-theme {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 236, 246, 0.72);
  color: #5d394c;
  font-size: 14px;
  line-height: 1.75;
}

.dashboard-summary {
  margin-top: 10px;
  color: #7d5b6b;
  font-size: 13px;
  line-height: 1.75;
}

.change-list,
.next-action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.change-list li,
.next-action-list li {
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(255, 246, 250, 0.86);
  color: #5d394c;
  font-size: 13px;
  line-height: 1.6;
}

.change-level {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffe4f0;
  color: #c44880;
  font-size: 12px;
  font-weight: 800;
}

.history-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.history-tab {
  border: 1px solid rgba(255, 170, 210, 0.34);
  border-radius: 999px;
  background: #fff8fb;
  color: #7d5b6b;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.history-tab.active {
  background: linear-gradient(135deg, #ff7aaa, #c44880);
  border-color: transparent;
  color: #fff;
}

/* ── サマリーカード・履歴カード ── */
.mask-summary, .history-card {
  background: linear-gradient(145deg, #fff8fb, #fff0f7);
  border: 1px solid rgba(255, 170, 210, 0.26);
  border-radius: 14px;
  padding: 12px;
}

.mask-metrics { display: flex; gap: 16px; color: #9d7888; font-size: 14px; }
.mask-names { font-weight: 700; font-size: 15px; margin-bottom: 6px; color: #4a2d3c; }
.mask-rows { display: flex; flex-direction: column; gap: 8px; }

.mask-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 170, 210, 0.22);
  background: linear-gradient(135deg, #fff5fa, #ffeef5);
  transition: transform 0.15s ease;
}

.mask-row:hover {
  transform: translateX(3px);
}

.mask-row-name { font-weight: 700; font-size: 15px; }
.mask-row-metrics { display: flex; gap: 14px; color: #9d7888; font-size: 14px; white-space: nowrap; }
.mask-row.placeholder { color: #b09aaa; justify-content: center; }

/* ── 履歴リスト ── */
.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #9d7888;
}

.history-date { font-weight: 700; color: #4a2d3c; }
.history-row { margin: 6px 0; }
.history-label { color: #9d7888; font-size: 13px; }
.history-value { color: #5d394c; font-size: 14px; }
.narrative-block { white-space: pre-wrap; line-height: 1.68; }
.metric { margin-left: 8px; color: #9d7888; font-size: 12px; }

.history-kind {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ffe8f2;
  color: #c44880;
  font-size: 12px;
  font-weight: 800;
}

.history-card-compact .history-card-header {
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.history-card-title {
  margin: 10px 0 8px;
  color: #4a2d3c;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.5;
}

.history-mask-line {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 5px 0;
  font-size: 14px;
}

.history-card-summary {
  margin-top: 10px;
  padding: 10px;
  border-radius: 11px;
  background: rgba(255, 246, 250, 0.8);
  color: #5d394c;
  font-size: 14px;
  line-height: 1.7;
}

.history-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.history-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7aaa, #c44880);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.history-map-link--ghost {
  border: 1px solid rgba(196, 72, 128, 0.24);
  background: #fff8fb;
  color: #c44880;
}

.history-map-player-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-color: rgba(196, 72, 128, 0.34);
  background: linear-gradient(135deg, #fffafd, #ffe8f2);
}

.history-map-player-title {
  color: #4a2d3c;
  font-size: 16px;
  font-weight: 900;
}

.history-map-player-card p {
  margin: 4px 0 0;
  color: #7d5b6b;
  font-size: 14px;
  line-height: 1.6;
}

.history-detail {
  margin-top: 10px;
}

.history-detail summary {
  cursor: pointer;
  color: #c44880;
  font-size: 13px;
  font-weight: 900;
}

.history-detail-body {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 170, 210, 0.24);
  padding-top: 8px;
}

/* ── シリアルカード ── */
.serial-card, .serial-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.serial-kicker {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe8f2, #ffd0e8);
  border: 1px solid rgba(255, 170, 210, 0.3);
  color: #c04880;
  font-size: 12px;
  font-weight: 700;
}

.serial-title {
  font-size: 20px;
  font-weight: 800;
  color: #4a2d3c;
}

.serial-row {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 170, 210, 0.22);
  background: linear-gradient(145deg, #fff5fa, #ffeef5);
}

/* ── トレイトカード（長所・短所） ── */
.trait-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

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

.trait-card {
  background: linear-gradient(145deg, #fff7fb, #fff1f7);
  border: 1px solid rgba(255, 170, 210, 0.24);
  border-radius: 14px;
  padding: 14px;
}

.trait-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.trait-card p {
  margin: 0;
  line-height: 1.68;
  color: #5f4352;
}

.trait-meta {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trait-meta span {
  font-size: 12px;
  color: #b09aaa;
  font-weight: 700;
}

.weakness-card {
  border-color: rgba(255, 150, 180, 0.34);
}

.placeholder-card {
  color: #b09aaa;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 170, 210, 0.36);
  background: linear-gradient(145deg, #fff7fb, #fff3f8);
}

.omokage-text { white-space: pre-wrap; line-height: 1.68; }

/* ── フィードバックフォーム ── */
.feedback-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feedback-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.feedback-form label span {
  color: #9d7888;
}

.feedback-form label.wide {
  grid-column: 1 / -1;
}

.feedback-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 170, 210, 0.3);
  border-radius: 14px;
  background: rgba(255, 238, 248, 0.9);
  color: #6d4a5d;
  line-height: 1.6;
}

.feedback-preset-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-preset-block span {
  color: #9d7888;
  font-size: 14px;
}

.feedback-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-chip {
  border: 1px solid rgba(255, 170, 210, 0.28);
  background: linear-gradient(135deg, #fff6fa, #ffecf4);
  color: #6d4a5d;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  line-height: 1.2;
}

.feedback-chip.active {
  background: linear-gradient(135deg, #ff7aaa, #e0508a);
  border-color: #ff7aaa;
  color: #fff5f9;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 170, 210, 0.28);
  background: #fffdfd;
  color: #4a2d3c;
  padding: 10px 14px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus {
  outline: none;
  border-color: rgba(255, 122, 170, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 122, 170, 0.1);
}

.feedback-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── ネクストステップカード ── */
.next-step-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 170, 210, 0.24);
  background: linear-gradient(145deg, #fff8fb, #fff0f6);
}

.next-step-card + .next-step-card {
  margin-top: 10px;
}

.next-step-actions {
  justify-content: flex-start;
  margin-top: 2px;
}

/* ── フッター ── */
.result-footer { text-align: right; }

button.back-btn {
  background: linear-gradient(135deg, #ff7aaa, #e0508a);
  color: #fff5f9;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(224, 80, 138, 0.24);
  transition: transform 0.2s ease, filter 0.2s ease;
}

button.back-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

/* ── 会話ログ ── */
.conversation-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conversation-log .turn {
  background: linear-gradient(145deg, #fff8fb, #fff4f9);
  border: 1px solid rgba(255, 170, 210, 0.24);
  border-radius: 12px;
  padding: 10px 12px;
}

.conversation-log .turn-meta {
  font-size: 12px;
  color: #9d7888;
  margin-bottom: 4px;
}

.conversation-log .turn-body {
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 14px;
  color: #4a2d3c;
}

.conversation-log .turn.user .turn-body {
  color: #c44870;
}

.conversation-log .placeholder {
  color: #b09aaa;
  margin: 0;
}

/* ── レスポンシブ（既存） ── */
@media (max-width: 640px) {
  .result-user-info .user-line { grid-template-columns: 1fr; }
  .dashboard-header { flex-direction: column; gap: 6px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-card-primary { grid-row: auto; }
  .dashboard-mask-group,
  .history-mask-line { grid-template-columns: 1fr; }
  .history-map-player-card { grid-template-columns: 1fr; }
  .history-tabs { gap: 6px; }
  .history-tab { font-size: 12px; padding: 7px 10px; }
  .mask-metrics { flex-direction: column; gap: 6px; }
  .mask-row { flex-direction: column; align-items: flex-start; }
  .mask-row-metrics { white-space: normal; }
  .history-card-header { flex-direction: column; align-items: flex-start; gap: 4px; }
  .feedback-form { grid-template-columns: 1fr; }
  .trait-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   新レイアウト（Netflix スタイル）
   ============================================================ */

/* ── トップナビ ── */
.result-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 243, 248, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 170, 210, 0.2);
  max-width: 100%;
  box-sizing: border-box;
}

.result-topnav-link {
  color: #c44880;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.result-topnav-link--data {
  padding: 7px 12px;
  border: 1px solid rgba(196, 72, 128, 0.24);
  border-radius: 999px;
  background: rgba(255, 238, 248, 0.86);
}

.result-topnav-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: #4a2d3c;
  text-align: center;
}

.result-topnav .result-user-info {
  font-size: 12px;
  color: #9d7888;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── マイデータ ── */
.my-data-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px 110px;
  box-sizing: border-box;
}

.my-data-hero-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 0 0 16px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255, 170, 210, 0.26);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 122, 170, 0.28), transparent 34%),
    linear-gradient(145deg, rgba(255, 250, 253, 0.96), rgba(255, 239, 247, 0.92));
  box-shadow: 0 18px 42px rgba(93, 40, 72, 0.12);
}

.my-data-avatar-frame {
  width: 116px;
  aspect-ratio: 1;
  border-radius: 28px;
  padding: 7px;
  background: linear-gradient(145deg, #ff7aaa, #ffd96b);
  box-shadow: 0 14px 30px rgba(224, 80, 138, 0.22);
}

.my-data-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 22px;
  background: #fff4f9;
}

.my-data-hero-copy h1 {
  margin: 2px 0 8px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  color: #4a2d3c;
}

.my-data-hero-copy p {
  margin: 0;
  color: #735568;
  line-height: 1.75;
}

.my-data-kicker {
  margin: 0 0 5px;
  color: #c44880;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.my-data-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.my-data-meta-row span,
.my-data-note {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #9d7888;
  font-size: 13px;
}

.my-data-meta-row code,
.my-data-note code {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 238, 248, 0.9);
  color: #c44880;
}

.my-data-status {
  font-weight: 800;
}

.my-data-status.is-dirty {
  color: #b45309;
}

#my-data-status.is-error,
.my-data-status.is-error {
  color: #c2410c;
}

.my-data-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.my-data-panel {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 170, 210, 0.24);
  background: rgba(255, 253, 253, 0.92);
  box-shadow: 0 12px 26px rgba(93, 40, 72, 0.08);
}

.my-data-private-group {
  padding: 20px;
  border: 1px solid rgba(196, 72, 128, 0.3);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 244, 250, 0.94), rgba(255, 250, 253, 0.9));
  box-shadow: 0 16px 34px rgba(93, 40, 72, 0.1);
}

.my-data-private-group-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 2px 2px 16px;
  border-bottom: 1px solid rgba(196, 72, 128, 0.2);
}

.my-data-private-group-head h2 {
  margin: 0;
  color: #4a2d3c;
  font-size: clamp(24px, 4vw, 32px);
}

.my-data-private-group-head > p {
  margin: 0;
  max-width: 390px;
  color: #765666;
  font-size: 13px;
  line-height: 1.7;
}

.my-data-private-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.my-data-private-panel {
  border-color: rgba(255, 170, 210, 0.2);
  box-shadow: 0 8px 20px rgba(93, 40, 72, 0.06);
}

.my-data-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 170, 210, 0.18);
}

.my-data-panel-head h2,
.my-data-panel-head h3 {
  margin: 0;
  color: #4a2d3c;
  font-size: clamp(20px, 3vw, 26px);
}

.my-data-panel-head > p {
  margin: 0;
  max-width: 340px;
  color: #8b6a7a;
  font-size: 13px;
  line-height: 1.65;
}

.my-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.my-data-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.my-data-field--wide {
  grid-column: 1 / -1;
}

.my-data-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  color: #4a2d3c;
  font-size: 14px;
  font-weight: 900;
}

.my-data-label small {
  color: #b08a9a;
  font-size: 11px;
  font-weight: 700;
}

.my-data-field em {
  color: #9d7888;
  font-style: normal;
  font-size: 12px;
  line-height: 1.5;
}

.my-data-animal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.my-data-animal-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 88px;
  border: 1.5px solid rgba(255, 170, 210, 0.34);
  border-radius: 16px;
  background: linear-gradient(145deg, #fffdfd, #fff5fa);
  color: #4a2d3c;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.my-data-animal-choice img {
  width: 54px;
  height: 54px;
  padding: 4px;
  box-sizing: border-box;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 170, 210, 0.18);
  filter: drop-shadow(0 4px 8px rgba(60, 25, 45, 0.12));
}

.my-data-animal-choice strong {
  font-size: 12px;
  line-height: 1.2;
}

.my-data-animal-choice.is-selected {
  border-color: rgba(255, 122, 170, 0.84);
  box-shadow: 0 0 0 4px rgba(255, 122, 170, 0.12), 0 12px 22px rgba(224, 80, 138, 0.14);
  transform: translateY(-1px);
}

.my-data-animal-choice:disabled {
  cursor: not-allowed;
  opacity: 0.54;
  transform: none;
}

.my-data-field input,
.my-data-field select,
.my-data-field textarea {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 170, 210, 0.34);
  background: #fffdfd;
  color: #4a2d3c;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.my-data-field textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.65;
}

.my-data-field input:focus,
.my-data-field select:focus,
.my-data-field textarea:focus {
  outline: none;
  border-color: rgba(255, 122, 170, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 122, 170, 0.12);
}

.my-data-field input[readonly],
.my-data-field input:disabled,
.my-data-field select:disabled,
.my-data-field textarea:disabled {
  background: #f7edf3;
  color: #8f7280;
  cursor: not-allowed;
  opacity: 1;
}

.my-data-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 122, 170, 0.32), transparent);
  margin: 4px 0;
}

.my-data-secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: #c44880;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.my-data-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.my-data-chip {
  border: 1px solid rgba(196, 72, 128, 0.24);
  border-radius: 999px;
  background: rgba(255, 238, 248, 0.86);
  color: #c44880;
  min-height: 34px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.my-data-chip:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.my-data-savebar {
  position: sticky;
  bottom: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
  padding: 12px 14px 12px 16px;
  border: 1px solid rgba(255, 170, 210, 0.28);
  border-radius: 22px;
  background: rgba(255, 250, 253, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 44px rgba(93, 40, 72, 0.18);
}

.my-data-savebar div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.my-data-savebar strong {
  color: #4a2d3c;
}

.my-data-savebar span {
  color: #9d7888;
  font-size: 12px;
}

.my-data-savebar button {
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .my-data-hero-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .my-data-avatar-frame {
    width: 94px;
  }

  .my-data-panel {
    padding: 16px;
    border-radius: 20px;
  }

  .my-data-private-group {
    padding: 12px;
    border-radius: 22px;
  }

  .my-data-private-group-head {
    flex-direction: column;
    gap: 8px;
    padding: 6px 4px 14px;
  }

  .my-data-panel-head {
    flex-direction: column;
    gap: 8px;
  }

  .my-data-grid {
    grid-template-columns: 1fr;
  }

  .my-data-animal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .my-data-field--wide {
    grid-column: auto;
  }

  .my-data-savebar {
    align-items: stretch;
    flex-direction: column;
    bottom: 10px;
  }

  .my-data-savebar button {
    width: 100%;
  }
}

/* ── ① ヒーローゾーン（今日のあなた） ── */
.result-hero-zone {
  padding: 16px 16px 8px;
  max-width: 960px;
  margin: 0 auto;
  box-sizing: border-box;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(145deg, #2a1435 0%, #481a52 50%, #3d1644 100%);
  color: #fff;
  padding: 32px 28px 28px;
  box-shadow: 0 20px 56px rgba(80, 20, 80, 0.4);
  min-height: 220px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(255, 150, 200, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 80%, rgba(120, 60, 180, 0.22) 0%, transparent 55%);
  pointer-events: none;
}

.hero-loading,
.why-loading,
.action-loading {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  padding: 20px 0;
}

.why-loading,
.action-loading {
  color: #9d7888;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 200, 230, 0.7);
  margin-bottom: 12px;
}

.hero-masks {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 16px;
}

.hero-mask-name {
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 210, 235, 0.95) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-mask-name.inner {
  font-size: clamp(22px, 5.5vw, 34px);
  background: linear-gradient(135deg, rgba(255,180,220,0.92) 0%, rgba(255,140,200,0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-mask-sep {
  font-size: clamp(18px, 4vw, 26px);
  color: rgba(255, 200, 230, 0.5);
  font-weight: 300;
}

.hero-mood {
  font-size: clamp(15px, 3.5vw, 18px);
  font-weight: 700;
  color: rgba(255, 230, 245, 0.9);
  line-height: 1.55;
  margin-bottom: 16px;
  padding-left: 2px;
}

.hero-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-change-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-change-tag.up {
  background: rgba(255, 100, 150, 0.22);
  border: 1px solid rgba(255, 150, 190, 0.3);
  color: #ffb8d6;
}

.hero-change-tag.down {
  background: rgba(130, 170, 255, 0.16);
  border: 1px solid rgba(150, 190, 255, 0.26);
  color: #b8d4ff;
}

.hero-stable-tag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.55);
}

.hero-date {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
}

/* ── ② セカンダリゾーン（なぜ + 今日やること） ── */
.result-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px 16px 8px;
  max-width: 960px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* なぜカード */
.why-card {
  background: rgba(255, 252, 254, 0.97);
  border: 1px solid rgba(255, 170, 210, 0.28);
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: 0 8px 28px rgba(200, 120, 160, 0.09);
}

.why-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c44880;
  margin-bottom: 14px;
}

.why-trend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.why-bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 28px;
  align-items: center;
  gap: 8px;
}

.why-axis-label {
  font-size: 12px;
  color: #7d5b6b;
  font-weight: 700;
  white-space: nowrap;
}

.why-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 170, 210, 0.18);
  overflow: hidden;
}

.why-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9dc6, #e0508a);
  transition: width 0.6s ease;
}

.why-bar-arrow {
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.why-bar-arrow.up { color: #e0508a; }
.why-bar-arrow.down { color: #89a8e0; }

.why-text {
  font-size: 14px;
  color: #5d394c;
  line-height: 1.75;
  margin: 0;
}

/* アクションカード */
.action-card {
  background: linear-gradient(145deg, #fff8fb, #fff0f7);
  border: 1px solid rgba(255, 170, 210, 0.32);
  border-radius: 20px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 28px rgba(200, 120, 160, 0.09);
}

.action-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c44880;
  margin-bottom: 14px;
}

.action-text {
  flex: 1;
  font-size: clamp(16px, 3.5vw, 20px);
  font-weight: 800;
  color: #3a1c30;
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-wrap;
}

.action-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7aaa, #d44080);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(212, 64, 128, 0.3);
  transition: transform 0.18s ease, filter 0.18s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
  box-sizing: border-box;
}

.action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* ── ③ 詳しい分析アコーディオン ── */
.result-details {
  max-width: 960px;
  margin: 8px auto 0;
  padding: 0 16px 24px;
  box-sizing: border-box;
}

.result-details-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 16px;
  background: rgba(255, 252, 254, 0.96);
  border: 1px solid rgba(255, 170, 210, 0.24);
  color: #7d5b6b;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.18s ease;
  box-shadow: 0 4px 14px rgba(200, 120, 160, 0.08);
}

.result-details-toggle::-webkit-details-marker { display: none; }
.result-details[open] .result-details-toggle { color: #c44880; }

.result-details-toggle:hover {
  background: #fff4f9;
}

.result-details-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
}

/* ── レスポンシブ（新レイアウト） ── */
@media (max-width: 640px) {
  .result-secondary {
    grid-template-columns: 1fr;
  }
  .hero-card {
    padding: 24px 20px 22px;
  }
  .why-bar-row {
    grid-template-columns: 60px 1fr 24px;
  }
}
