/* ============================================================
   なんでも推し図鑑 スタイル
   ============================================================ */

/* ---------- 色・形の基本設定 ---------- */
:root {
  /* ピンク系 */
  --bg: #FFF8FA;            /* 背景（ごく淡いピンク） */
  --surface: #FFFFFF;       /* カードの白 */
  --pink-pale: #FFEAF1;     /* 淡いピンク（帯・案内） */
  --pink-line: #F6C9D8;     /* 細い枠線 */
  --pink: #BE4A75;          /* ボタンなど要所（白い文字をのせても読みやすい濃さ） */
  --pink-deep: #A33D64;     /* 押したとき */
  --text-pink: #9A3F62;     /* 見出しの濃いピンク */
  --text: #43383C;          /* 本文の濃いグレー */
  --text-sub: #6E6066;      /* 補足の文字（淡いピンクの上でも読みやすい濃さ） */

  /* ジャンルの色（パステル） */
  --g-food: #FFE2D4;        /* ピーチ */
  --g-place: #D6F2E6;       /* ミント */
  --g-ent: #E7DEF8;         /* ラベンダー */
  --g-daily: #D9ECFB;       /* スカイブルー */
  --g-hobby: #FFF3BF;       /* レモン */
  --g-other: #ECECEC;       /* ライトグレー */

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 10px rgba(201, 80, 124, 0.08);
  --tap: 48px;              /* 指で押しやすい高さ */
}

/* ---------- 全体 ---------- */
/* ライトモードのみ（端末がダークモードでも、色を自動で変えさせない） */
:root {
  color-scheme: only light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic",
    "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* スマホ幅を基本に、パソコンでは中央に寄せる */
.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px calc(96px + env(safe-area-inset-bottom));
  /* iPhoneを横向きにしたとき、画面の切り欠き（ノッチ）に文字がかからないように */
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* ---------- ヘッダー ---------- */
.top-header {
  padding: 20px 0 12px;
}

.top-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-pink);
  letter-spacing: 0.04em;
}

.icon-btn {
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--pink-line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 20px;
  line-height: 1;
}

.icon-btn:active {
  background: var(--pink-pale);
}

.status {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.status__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius-sm);
}

.status__label {
  font-size: 13px;
  color: var(--text-sub);
}

.status__value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-pink);
}

.status__limit {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-sub);
}

.status__value--title {
  font-size: 17px;
}

/* ---------- お試し公開中の案内 ---------- */
.notice {
  position: relative;
  margin: 4px 0 12px;
  padding: 12px 44px 12px 14px;
  background: var(--surface);
  border: 1px dashed var(--pink-line);
  border-radius: var(--radius-sm);
}

.notice__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-pink);
}

.notice__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

/* ---------- ジャンルのタブ ---------- */
.tabs {
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 4px 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  min-height: var(--tap);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  white-space: nowrap;
}

.tab--food  { background: var(--g-food); }
.tab--place { background: var(--g-place); }
.tab--ent   { background: var(--g-ent); }
.tab--daily { background: var(--g-daily); }
.tab--hobby { background: var(--g-hobby); }
.tab--other { background: var(--g-other); }

.tab:not(.is-active) {
  border-color: rgba(0, 0, 0, 0.04);
}

.tab.is-active {
  border-color: var(--pink);
  box-shadow: inset 0 0 0 1px var(--pink);
  color: var(--text-pink);
  font-weight: 700;
}

/* ---------- 0件のときの案内 ---------- */
.empty {
  margin-top: 8px;
  padding: 28px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty__emoji {
  font-size: 44px;
  line-height: 1;
}

.empty__title {
  margin: 12px 0 4px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-pink);
}

.empty__text {
  margin: 0 0 16px;
  color: var(--text-sub);
}

.empty__examples {
  margin: 0 auto 20px;
  padding: 0;
  max-width: 300px;
  list-style: none;
  text-align: left;
}

.empty__examples li {
  padding: 8px 4px;
  border-bottom: 1px dotted var(--pink-line);
}

.empty__examples li:last-child {
  border-bottom: none;
}

.empty__cat {
  font-size: 14px;
  color: var(--pink);
}

.empty__arrow {
  margin: 0 8px;
  color: var(--text-sub);
}

/* ---------- 推しの一覧 ---------- */
.oshi-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oshi-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.oshi-item:active {
  background: var(--pink-pale);
}

.oshi-item__emoji {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  background: var(--g-other);
}

.oshi-item--food  .oshi-item__emoji { background: var(--g-food); }
.oshi-item--place .oshi-item__emoji { background: var(--g-place); }
.oshi-item--ent   .oshi-item__emoji { background: var(--g-ent); }
.oshi-item--daily .oshi-item__emoji { background: var(--g-daily); }
.oshi-item--hobby .oshi-item__emoji { background: var(--g-hobby); }

.oshi-item__body {
  flex: 1;
  min-width: 0;
}

.oshi-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.oshi-item__no {
  flex: 0 0 auto;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.oshi-item__cat {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pink);
}

.oshi-item__lock {
  font-size: 12px;
}

.oshi-item__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oshi-item__chevron {
  flex: 0 0 auto;
  font-size: 24px;
  color: var(--pink-line);
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
}

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

.btn--primary:active {
  background: var(--pink-deep);
}

.btn--sub {
  background: var(--surface);
  border-color: var(--pink-line);
  color: var(--text-pink);
}

.btn--sub:active {
  background: var(--pink-pale);
}

/* ---------- 下部の操作ボタン ---------- */
.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  background: rgba(255, 248, 250, 0.94);
  border-top: 1px solid var(--pink-line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.action-bar .btn {
  flex: 1;
  padding: 0 8px;
  white-space: nowrap;
}

@media (max-width: 359px) {
  .action-bar .btn {
    font-size: 15px;
  }
}

/* ---------- 広告枠 ---------- */
.ad-slot {
  display: grid;
  place-items: center;
  min-height: 100px;
  margin-top: 24px;
  border: 1px dashed #D8D8D8;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #AAA;
}

/* ---------- 読み込みエラーの案内 ---------- */
.alert {
  margin: 4px 0 12px;
  padding: 12px 14px;
  background: #FFF4F4;
  border: 1px solid #F2B8B8;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #9A3434;
}

/* ---------- 推しの一覧（登録済み） ---------- */
.list-area .oshi-list:not(:empty) {
  margin-top: 4px;
}

/* ---------- 登録・編集画面 ---------- */
.sub-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -16px;
  padding: 8px 16px;
  background: rgba(255, 248, 250, 0.94);
  border-bottom: 1px solid var(--pink-line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.back-btn {
  min-height: 44px;
  padding: 0 12px 0 4px;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--text-pink);
}

.sub-title {
  margin: 0;
  font-size: 18px;
  color: var(--text-pink);
}

.form {
  padding-top: 16px;
}

.field {
  margin-bottom: 26px;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-pink);
}

.field__hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

.field__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
  margin-top: 4px;
  font-size: 13px;
}

.field__foot {
  flex-wrap: wrap;
}

/* エラーは文字数の下に、1行まるごと使って表示 */
.field__error:not(:empty) {
  order: 2;
  flex-basis: 100%;
}

.field__error {
  color: #C0392B;
  font-weight: 700;
}

.counter {
  margin-left: auto;
  color: var(--text-sub);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.counter.is-low {
  color: var(--pink-deep);
}

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 2px;
}

.tag--req {
  background: var(--pink);
  color: #fff;
}

.tag--opt {
  background: #F1ECEE;
  color: var(--text-sub);
}

/* 入力欄 */
.input,
.prefix-input {
  width: 100%;
  min-height: var(--tap);
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius-sm);
}

.input {
  display: block;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px; /* 16px未満だとiPhoneで画面が拡大されるため */
  color: var(--text);
}

textarea.input {
  resize: vertical;
  line-height: 1.6;
}

.input:focus,
.prefix-input:focus-within {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(231, 113, 154, 0.18);
}

.input.is-invalid,
.prefix-input:has(.is-invalid) {
  border-color: #C0392B;
  background: #FFF8F8;
}

.input::placeholder,
.prefix-input__input::placeholder {
  color: #8E7F86;
}

.prefix-input {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.prefix-input__prefix {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--pink-pale);
  font-weight: 700;
  color: var(--text-pink);
}

.prefix-input__input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--text);
}

.prefix-input__input:focus {
  outline: none;
}

/* 入力例のボタン */
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.chips__label {
  font-size: 13px;
  color: var(--text-sub);
}

.chip {
  min-height: var(--tap);
  padding: 0 14px;
  border: 1px solid var(--pink-line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  color: var(--text-pink);
}

.chip:active {
  background: var(--pink-pale);
}

/* ジャンルの選択ボタン */
.genre-picker {
  display: grid;
  /* 文字の大きさに合わせて列の数が変わる（文字を大きくしている端末では1列） */
  grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
  gap: 8px;
}

.genre-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 6px 10px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-align: left;
}

.genre-btn--food  { background: var(--g-food); }
.genre-btn--place { background: var(--g-place); }
.genre-btn--ent   { background: var(--g-ent); }
.genre-btn--daily { background: var(--g-daily); }
.genre-btn--hobby { background: var(--g-hobby); }
.genre-btn--other { background: var(--g-other); }

.genre-btn[aria-pressed="true"] {
  border-color: var(--pink);
  font-weight: 700;
  color: var(--text-pink);
}

.genre-btn[aria-pressed="true"]::after {
  content: "✓";
  margin-left: auto;
  color: var(--pink);
}

.genre-btn__emoji {
  font-size: 20px;
}



/* 順位ごとの入力 */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.rank {
  padding: 12px 14px 8px;
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius);
}

.rank__head {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.rank__badge {
  font-weight: 700;
  color: var(--text-pink);
}

.rank__move {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.move-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--pink-line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 14px;
  color: var(--pink);
}

.move-btn:active:not(:disabled) {
  background: var(--pink-pale);
}

.move-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.more-btn {
  min-height: 44px;
  padding: 0 4px;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--pink);
}

.rank__more {
  padding: 4px 0 8px;
  border-top: 1px dotted var(--pink-line);
}

.sub-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
}

/* ひみつのスイッチ */
.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  cursor: pointer;
}

.switch__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch__ui {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #E4DADE;
  transition: background 0.2s;
}

.switch__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.switch__input:checked + .switch__ui {
  background: var(--pink);
}

.switch__input:checked + .switch__ui::after {
  transform: translateX(22px);
}

.switch__input:focus-visible + .switch__ui {
  box-shadow: 0 0 0 3px rgba(231, 113, 154, 0.3);
}

.switch__text {
  font-weight: 700;
  color: var(--text-pink);
}

.form-actions {
  margin-top: 8px;
}

.btn--block {
  width: 100%;
}

/* ---------- お知らせ（トースト） ---------- */
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(67, 56, 60, 0.92);
  color: #fff;
  font-size: 15px;
  text-align: center;
}

.toast__action {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: none;
  color: #FFD3E2;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- ボタン（追加） ---------- */
.btn--small {
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
  text-decoration: none;
}

.btn--danger {
  background: #C0392B;
  color: #fff;
}

.btn--danger:active {
  background: #A93226;
}

.btn--danger-outline {
  background: var(--surface);
  border-color: #EBB3B1;
  color: #C0392B;
}

.btn--danger-outline:active {
  background: #FFF4F4;
}

.danger-zone {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px dotted var(--pink-line);
}

/* ---------- 詳細画面 ---------- */
.detail {
  padding-top: 16px;
}

.detail-hero {
  padding: 18px 18px 14px;
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detail-hero__no {
  font-size: 14px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.detail-hero__cat {
  margin: 12px 0 4px;
  font-size: 24px;
  color: var(--text-pink);
  overflow-wrap: anywhere;
}

.detail-hero__secret {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text-sub);
}

.detail-hero__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
}

.detail-hero__dates div {
  flex: 1 1 9em;
  padding: 8px 12px;
  background: var(--pink-pale);
  border-radius: var(--radius-sm);
}

.detail-hero__dates dt {
  font-size: 12px;
  color: var(--text-sub);
}

.detail-hero__dates dd {
  margin: 0;
  font-size: 15px;
  white-space: nowrap;
  font-weight: 700;
  color: var(--text-pink);
}

.genre-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  background: var(--g-other);
}

.genre-chip--food  { background: var(--g-food); }
.genre-chip--place { background: var(--g-place); }
.genre-chip--ent   { background: var(--g-ent); }
.genre-chip--daily { background: var(--g-daily); }
.genre-chip--hobby { background: var(--g-hobby); }

.detail-ranks {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-rank {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius);
}

.detail-rank--1 {
  background: var(--pink-pale);
}

.detail-rank__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-pink);
}

.detail-rank__name {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.detail-rank--1 .detail-rank__name {
  font-size: 22px;
}

.detail-rank__memo {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dotted var(--pink-line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-rank__url {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.detail-rank__url-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-sub);
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

/* ---------- 確認のウィンドウ ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(67, 56, 60, 0.4);
}

.modal__box {
  width: 100%;
  max-width: 360px;
  padding: 24px 20px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.modal__msg {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

.modal__sub {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-sub);
}

.modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal__actions .btn {
  flex: 1;
  padding: 0 12px;
}

/* ---------- 残り枠の案内 ---------- */
.limit-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

.limit-note::before {
  content: "ⓘ ";
  color: var(--pink);
}

/* ---------- 件数と並び替え ---------- */
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}

.list-toolbar__count {
  font-size: 14px;
  color: var(--text-sub);
}

.sort-hint {
  margin: 0 0 10px;
  padding: 8px 12px;
  background: var(--pink-pale);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-pink);
}

.oshi-list.is-sorting .oshi-item {
  border-style: dashed;
  border-color: var(--pink);
  box-shadow: none;
}

.oshi-list.is-sorting .oshi-item:active {
  background: var(--surface);
}

.oshi-item__move {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
}

.filter-empty {
  margin: 8px 0 0;
  padding: 28px 16px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--pink-line);
  border-radius: var(--radius);
  color: var(--text-sub);
}

/* 幅のせまいスマホでは、並び替え中は絵文字を隠して名前を見やすく */
@media (max-width: 399px) {
  .oshi-list.is-sorting .oshi-item__emoji {
    display: none;
  }
}

/* ---------- カード作成画面 ---------- */
.card-setup {
  padding-top: 16px;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seg__btn {
  min-height: 52px;
  padding: 6px 8px;
  border: 2px solid var(--pink-line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 15px;
  color: var(--text);
}

.seg__btn[aria-pressed="true"] {
  border-color: var(--pink);
  background: var(--pink-pale);
  color: var(--text-pink);
  font-weight: 700;
}

.card-setup__pick-label {
  margin-top: 24px;
}

.pick-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius);
  cursor: pointer;
}

.pick-item:has(.pick-item__input:checked) {
  border-color: var(--pink);
  background: #FFF6F9;
  box-shadow: inset 0 0 0 1px var(--pink);
}

.pick-item:has(.pick-item__input:disabled) {
  opacity: 0.45;
  cursor: default;
}

.pick-item--food  .oshi-item__emoji { background: var(--g-food); }
.pick-item--place .oshi-item__emoji { background: var(--g-place); }
.pick-item--ent   .oshi-item__emoji { background: var(--g-ent); }
.pick-item--daily .oshi-item__emoji { background: var(--g-daily); }
.pick-item--hobby .oshi-item__emoji { background: var(--g-hobby); }

.pick-item .oshi-item__body,
.pick-item .oshi-item__meta,
.pick-item .oshi-item__name {
  display: block;
}

.pick-item .oshi-item__meta {
  display: flex;
}

/* チェック欄（見た目だけ。本物の入力欄は見えないように重ねる） */
.pick-item__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.pick-item__check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid var(--pink-line);
  border-radius: 8px;
  background: var(--surface);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.pick-item__input[type="radio"] + .pick-item__check {
  border-radius: 50%;
}

.pick-item__input:checked + .pick-item__check {
  border-color: var(--pink);
  background: var(--pink);
}

.pick-item__input:checked + .pick-item__check::after {
  content: "✓";
}

.pick-item__input:focus-visible + .pick-item__check {
  box-shadow: 0 0 0 3px rgba(231, 113, 154, 0.3);
}

.pick-count {
  flex: 1;
  align-self: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-pink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-bar .pick-count + .btn {
  flex: 0 0 auto;
  padding: 0 20px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ---------- プレビュー画面 ---------- */
.preview {
  padding-top: 16px;
}

.preview__frame {
  margin-bottom: 16px;
  padding: 10px;
  background: #F6EEF1;
  border-radius: var(--radius);
}

.preview__canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.preview__hint {
  text-align: center;
}

.detail-actions__note {
  margin: 0;
}

/* ---------- 設定画面 ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.settings {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 16px;
}

.settings-card {
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius);
}

.settings-card--danger {
  border-color: #F0C8C6;
}

.settings-card__title {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--text-pink);
}

.settings-card__lead {
  margin: 0;
  font-size: 16px;
  color: var(--text-sub);
}

.settings-card__buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.settings-card--danger .btn {
  margin-top: 14px;
}

.settings-card__notes {
  margin: 12px 0 0;
  padding-left: 1.2em;
  font-size: 13px;
  color: var(--text-sub);
}

.settings-card__notes li + li {
  margin-top: 4px;
}

.settings-card__notes strong {
  color: #C0392B;
}

.settings-links {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.settings-links__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap);
  border-bottom: 1px dotted var(--pink-line);
  color: var(--text);
  text-decoration: none;
}

.settings-links li:last-child .settings-links__item {
  border-bottom: none;
}

.settings-links__item.is-disabled {
  color: var(--text-sub);
}

.settings-links__soon {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #F1ECEE;
}

.settings-version {
  margin: 4px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-sub);
}

/* ---------- 称号アップのお祝い ---------- */
.celebrate {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 22px 12px 16px;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: 24px;
  box-shadow: 0 6px 24px rgba(201, 80, 124, 0.18);
  cursor: pointer;
  animation: celebrate-in 0.35s ease-out;
}

.celebrate__emoji {
  font-size: 28px;
  line-height: 1;
}

.celebrate__lead {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--pink);
}

.celebrate__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-pink);
}

@keyframes celebrate-in {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* 動きをひかえる設定の端末では、アニメーションしない */
@media (prefers-reduced-motion: reduce) {
  .celebrate {
    animation: none;
  }
}

/* ---------- 次の称号までの数 ---------- */
.status__next {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-sub);
}

.nowrap {
  white-space: nowrap;
}

/* ---------- 有料版 ---------- */
.license-row {
  display: flex;
  gap: 8px;
}

.license-row__input {
  flex: 1;
  min-width: 0;
  letter-spacing: 0.05em;
}

.license-row__btn {
  flex: 0 0 auto;
  padding: 0 18px;
}

.license-msg {
  display: block;
  min-height: 0;
  margin: 6px 0 0;
  font-size: 14px;
}

.license-paid {
  margin: 0;
  font-weight: 700;
  color: var(--text-pink);
}

@media (max-width: 379px) {
  .license-row {
    flex-direction: column;
  }
}

/* ---------- 規約・ポリシーのページ ---------- */
a.back-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.doc {
  padding: 16px 0 48px;
  line-height: 1.8;
}

.doc h2 {
  margin: 28px 0 8px;
  padding-bottom: 4px;
  font-size: 17px;
  color: var(--text-pink);
  border-bottom: 1px dotted var(--pink-line);
}

.doc p {
  margin: 0 0 8px;
}

.doc ul {
  margin: 0 0 8px;
  padding-left: 1.3em;
}

.doc li + li {
  margin-top: 4px;
}

.doc ul ul {
  margin-top: 4px;
}

.doc a {
  color: var(--pink-deep);
}

.doc__date {
  margin-top: 32px !important;
  font-size: 14px;
  color: var(--text-sub);
  text-align: right;
}

/* パソコン（マウス操作）では、横スクロールしにくいのでタブを折り返して全部見せる */
@media (hover: hover) and (pointer: fine) {
  .tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    margin: 0;
    padding: 4px 0 12px;
  }
}

/* お試し公開中の案内の「×」 */
.notice__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-sub);
}

.notice__close:active {
  color: var(--text-pink);
}

/* 入力欄のすぐ下の補足 */
.field__hint--tight {
  margin-top: 0;
}

/* 登録したばかりの推しを、一瞬だけ目立たせる */
.oshi-item.is-new {
  animation: just-added 1.8s ease-out;
}

@keyframes just-added {
  0%, 35% {
    background: var(--pink-pale);
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(190, 74, 117, 0.25);
  }
  100% {
    background: var(--surface);
  }
}

@media (prefers-reduced-motion: reduce) {
  .oshi-item.is-new {
    animation: none;
    border-color: var(--pink);
  }
}

/* 見出しへのフォーカス（画面を切り替えたとき）は、枠を出さない */
[tabindex="-1"]:focus {
  outline: none;
}

/* キーボードで操作しているときは、どこを選んでいるか分かるように枠を出す */
button:focus-visible,
a:focus-visible,
.chip:focus-visible {
  outline: 3px solid rgba(190, 74, 117, 0.45);
  outline-offset: 2px;
}

/* パソコン（マウス）では、ボタンに乗せたときに少し色を変えて、押せることが分かるように */
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--pink-deep); }
  .btn--sub:hover,
  .icon-btn:hover,
  .chip:hover,
  .move-btn:hover:not(:disabled),
  .oshi-item:hover,
  .pick-item:hover,
  .seg__btn:hover { background: var(--pink-pale); }
  .tab:hover,
  .genre-btn:hover { filter: brightness(0.97); }
  .back-btn:hover,
  .more-btn:hover { text-decoration: underline; }
  .settings-links__item:hover { color: var(--text-pink); }
  button, a, label.pick-item, label.switch { cursor: pointer; }
}

/* ---------- 記事への入口（一覧のいちばん下） ---------- */
.list-footer {
  margin: 24px 0 0;
  text-align: center;
}

.list-footer__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  font-size: 15px;
  color: var(--text-sub);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 記事一覧 ---------- */
.articles {
  padding: 16px 0 48px;
}

.articles__lead {
  margin: 0 0 8px;
  color: var(--text-sub);
}

.article-group__title {
  margin: 24px 0 10px;
  font-size: 17px;
  color: var(--text-pink);
}

.article-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-card {
  display: block;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
}

.article-card:active {
  background: var(--pink-pale);
}

.article-card__title {
  display: block;
  font-weight: 700;
  color: var(--text-pink);
}

.article-card__desc {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-sub);
}

@media (hover: hover) and (pointer: fine) {
  .article-card:hover { background: var(--pink-pale); }
}

/* ---------- 記事ページ ---------- */
.article__tag {
  display: inline-block;
  margin: 0 0 8px !important;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--pink-pale);
  font-size: 14px;
  color: var(--text-pink);
}

.article__title {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.5;
  color: var(--text-pink);
}

.article__lead {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius-sm);
}

.doc ol {
  margin: 0 0 8px;
  padding-left: 1.5em;
}

.doc ol li + li {
  margin-top: 4px;
}

.article__cta {
  margin: 32px 0 8px;
}

.article__cta .btn {
  color: #fff;
  text-decoration: none;
}

.article__more ul {
  padding-left: 1.3em;
}

.article__more li {
  padding: 4px 0;
}

/* 画面上部の「もどる」は1行のまま。見出しが長いときは「…」で省略 */
.back-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.sub-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 一覧のいちばん下：規約へのリンク */
.list-footer__legal {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

.list-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 8px;
  margin: 0;
}

/* ---------- ロゴ（シンボルマーク） ---------- */
.app-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-title__mark {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
}

.empty__mark {
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

/* 幅のせまいスマホでは、ツール名とロゴを少し小さくして1行に収める */
@media (max-width: 359px) {
  .app-title {
    font-size: 20px;
  }

  .app-title__mark {
    width: 32px;
    height: 32px;
  }
}

/* やわらかい注意（アプリの中のブラウザの案内など） */
.alert--soft {
  background: var(--pink-pale);
  border-color: var(--pink-line);
  color: var(--text);
  line-height: 1.7;
}

.alert--soft strong {
  color: var(--text-pink);
}

/* 著作権の表示 */
.copyright {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--text-sub);
  text-align: center;
}

.doc .copyright {
  margin-top: 8px;
  text-align: right;
}

/* ---------- ツールの紹介（タイトルの下） ---------- */
.intro__lead {
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.intro__features,
.intro__badges {
  display: flex;
  flex-wrap: wrap;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.intro__features {
  gap: 2px 14px;
  font-size: 13px;
  color: var(--text-sub);
}

.intro__badges {
  gap: 6px;
  margin-top: 8px;
}

.intro__features li,
.intro__badges li {
  white-space: nowrap;
}

.intro__badges li {
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-pink);
  background: var(--pink-pale);
  border: 1px solid var(--pink-line);
  border-radius: 999px;
}

/* お試し公開中の案内は、一覧の下に置く */
.list-area .notice {
  margin: 24px 0 0;
}
