/* ============================================================
   Decaf Map — 案A（マップ中心）デザインシステム
   docs/design/plan-a.html のトークンとコンポーネントを
   実アプリ（可変ビューポート）向けに調整したもの。
   ============================================================ */

:root {
  /* --- Ink & neutrals --- */
  --ink: #4a3b34; --ink-2: #5c4b43; --muted: #8b7a71; --muted-2: #a2928a; --faint: #b5a69d;
  --line: #e6ddd5; --line-2: #f0e8e1; --border-soft: #e0d5cc; --disc: #dccfc7;
  /* --- Grounds --- */
  --screen: #faf7f4; --raised: #fdfbf9; --wash: #f3ebe4; --wash-2: #efe6de; --map: #f1ebe3;
  /* --- Brand --- */
  --brand: #8c6a63; --brand-deep: #7c574f; --brand-link: #a0766e;
  --rose: #c89a9a; --rose-bg: #f3e3e4; --rose-ink: #8c5f60;
  --sage: #7e9070; --sage-bg: #edf1e8; --sage-ink: #4c5a42;
  --tan: #a98f6f; --tan-bg: #f6efe6; --tan-ink: #8a7457;

  --font-display: 'Playfair Display', 'Hiragino Mincho ProN', Georgia, serif;
  --font-mincho: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-body: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 480px;
  --tabbar-h: calc(66px + env(safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--screen);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* 横長端末でもアプリ本体は常に利用可能領域いっぱいに広げる。 */
@media (min-width: 620px) {
  :root { --shell: 100%; }
  body { background: var(--screen); }
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  max-width: none;
  margin: 0 auto;
  background: var(--screen);
  overflow: hidden;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* --- デスクトップ：左のナビ列＋広い本文 --- */
@media (min-width: 1024px) {
  :root { --shell: 100%; --tabbar-h: 0px; }
  body { padding: 0; }
  .app {
    max-width: none;
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    grid-template-areas: 'nav screen';
  }
  .screen { grid-area: screen; min-width: 0; }
  .toast { left: calc(50% + 104px); }
  .sheet { left: calc(50% + 104px); max-width: 520px; }
}

/* ============ shared primitives ============ */
.scroll { flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.scroll::-webkit-scrollbar, .chipRow::-webkit-scrollbar { width: 0; height: 0; }
.chipRow { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pad { padding-left: 24px; padding-right: 24px; }
.label { font-size: 11.5px; letter-spacing: .16em; color: var(--muted-2); }
.h-mincho { font-family: var(--font-mincho); color: var(--ink); line-height: 1.55; }
.h-serif { font-family: var(--font-display); color: var(--ink); line-height: 1.2; }
.body-sm { font-size: 12.5px; line-height: 1.85; color: var(--muted); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; border-radius: 0 0 12px 0; background: var(--ink); color: #f7f1ec; font-size: 13px;
}
.skip-link:focus { left: 0; }

.chip {
  flex: 0 0 auto; height: 44px; padding: 0 17px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; letter-spacing: .02em; white-space: nowrap; cursor: pointer; font-family: inherit;
  border: 1px solid var(--border-soft); background: transparent; color: var(--muted);
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.chip:hover { background: var(--wash); }
.chip.on { border-color: #d9bfbf; background: var(--rose-bg); color: var(--rose-ink); }
.chip.on:hover { background: #efdbdc; }

.seg { display: flex; padding: 4px; background: var(--wash-2); border-radius: 999px; }
.seg button {
  flex: 1; height: 42px; border: 0; border-radius: 999px; font-family: inherit; font-size: 13.5px;
  letter-spacing: .04em; cursor: pointer; background: transparent; color: var(--muted-2);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.seg button.on { background: var(--raised); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(74, 59, 52, .1); }

.cta {
  width: 100%; height: 54px; border: 0; border-radius: 999px; background: var(--brand); color: #fdfbf9;
  font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: .04em; cursor: pointer;
  transition: background .18s ease;
}
.cta:hover { background: var(--brand-deep); }
.cta.sm { height: 52px; }
.ghost {
  height: 48px; border-radius: 999px; border: 1px solid var(--border-soft); background: transparent;
  color: var(--brand-deep); font-family: inherit; font-size: 13.5px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; transition: background .18s ease;
}
.ghost:hover { background: var(--wash); }
.linkish {
  min-height: 44px; border: 0; background: none; font-family: inherit; font-size: 12.5px; color: var(--brand-link);
  cursor: pointer; padding: 8px 6px; display: inline-flex; align-items: center; justify-content: center;
}
.linkish:hover { color: var(--brand-deep); }

.tag { padding: 6px 12px; border-radius: 999px; font-size: 11.5px; letter-spacing: .02em; background: var(--wash-2); color: #7c6a62; }
.tag.soft { background: var(--rose-bg); color: var(--rose-ink); }

.track {
  width: 54px; height: 44px; flex: 0 0 auto; border-radius: 999px; padding: 8px 4px; display: flex; cursor: pointer;
  border: 0; background: var(--disc); justify-content: flex-start; transition: background .22s ease;
}
.track.on { background: var(--brand); justify-content: flex-end; }
.track i { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--raised); }

.iconBtn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--raised);
  display: flex; align-items: center; justify-content: center; color: #7c6a62; cursor: pointer;
  box-shadow: 0 2px 8px rgba(74, 59, 52, .12); transition: color .18s ease;
}
.plain { border: 0; background: none; padding: 0; font-family: inherit; cursor: pointer; color: inherit; text-align: left; }

.trustDot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; display: block; }
.trustText { font-size: 11.5px; letter-spacing: .02em; }
.thumb {
  flex: 0 0 auto; border-radius: 14px; background: linear-gradient(150deg, #f1e8e1, #e7dbd2);
  display: flex; align-items: center; justify-content: center; color: #cbb8ac; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; border-radius: 6px; }

/* ============ app bar / search ============ */
.appbar { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 24px 0; }
.appbar > a.plain { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.appbar .title { font-family: var(--font-display); font-size: 25px; color: var(--ink); }
.searchline {
  min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 2px 12px; margin: 14px 24px 0;
  border-bottom: 1px solid var(--line); cursor: pointer; background: none;
  border-left: 0; border-right: 0; border-top: 0; width: calc(100% - 48px); font-family: inherit;
}
.searchline span { flex: 1; text-align: left; font-size: 15.5px; color: var(--faint); letter-spacing: .04em; }
.searchline input {
  flex: 1; border: 0; background: none; font-family: inherit; font-size: 15.5px; color: var(--ink);
  letter-spacing: .04em; padding: 0; min-width: 0;
}
.searchline input::placeholder { color: var(--faint); }
a.plain[aria-label="戻る"] { min-width: 44px !important; min-height: 44px !important; }

.homeHead { flex: 0 0 auto; display: flex; flex-direction: column; }
.homeLayout { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }

/* ============ map ============ */
.mapWrap { position: relative; flex: 1 1 auto; min-height: 220px; margin-top: 12px; background: var(--map); overflow: hidden; }
.mapWrap .leaflet-container { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--map); font-family: var(--font-body); }
.mapFallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }

/* 地形や道路を消さない範囲で、タイルをデザインの暖色へ少しだけ寄せる。 */
.leaflet-tile-pane {
  filter: sepia(.16) saturate(.78) hue-rotate(-4deg) brightness(1.01) contrast(.98);
}
.leaflet-container { background: var(--map); }
.leaflet-control-attribution {
  background: rgba(253, 251, 249, .82) !important;
  color: var(--muted-2) !important;
  font-family: var(--font-body);
  font-size: 9.5px !important;
  padding: 2px 7px !important;
  border-radius: 999px 0 0 0;
}
.leaflet-control-attribution a { color: var(--brand-link) !important; }

.pinMarker { background: none; border: 0; }
.pin {
  width: 38px; height: 38px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--raised);
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  box-shadow: 0 3px 10px rgba(74, 59, 52, .18);
  transition: width .2s ease, height .2s ease, background .2s ease;
}
.pin svg { width: 19px; height: 19px; }
.pin.sel { width: 50px; height: 50px; }
.pin.sel svg { width: 24px; height: 24px; }

.legend {
  position: absolute; left: 16px; top: 14px; z-index: 500; display: flex; align-items: center; gap: 12px;
  padding: 8px 13px; border-radius: 999px; background: rgba(253, 251, 249, .9); backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(74, 59, 52, .1); font-size: 10.5px; color: var(--muted);
}
.legend b { display: flex; align-items: center; gap: 5px; font-weight: 400; }
.locate {
  position: absolute; right: 18px; bottom: 18px; z-index: 500; width: 46px; height: 46px; border-radius: 50%;
  background: var(--raised); border: 0; display: flex; align-items: center; justify-content: center;
  color: var(--brand); cursor: pointer; box-shadow: 0 4px 14px rgba(74, 59, 52, .16);
}

/* ============ list sheet ============ */
.sheetList {
  flex: 0 1 auto; min-height: 96px; background: var(--screen); border-top: 1px solid var(--line-2); padding: 10px 24px 8px;
  display: flex; flex-direction: column; gap: 12px; max-height: 46vh; overflow-y: auto;
  box-shadow: 0 -8px 20px -18px rgba(74, 59, 52, .5);
}
.grabber { width: 38px; height: 4px; border-radius: 2px; background: var(--border-soft); margin: 0 auto 2px; }
.row {
  display: flex; gap: 14px; align-items: flex-start; padding: 4px 0 14px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; width: 100%; text-align: left; transition: opacity .15s ease;
}
.rowText { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rowText .meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowText .name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row:last-child { border-bottom: 0; }
.row:hover { opacity: .78; }
.favBtn {
  flex: 0 0 auto; width: 44px; height: 44px; border: 0; background: none; display: flex; align-items: center;
  justify-content: center; cursor: pointer; color: var(--disc); transition: color .18s ease, transform .18s ease;
}
.favBtn.on { color: var(--rose); }
.favBtn:hover { transform: scale(1.12); }

/* 高さが限られる端末では、一覧を隠さず地図を少し圧縮する。 */
@media (max-width: 699px) and (max-height: 650px) {
  .mapWrap { min-height: 180px; }
}

/* ============ detail ============ */
.hero {
  position: relative; height: 244px; background: linear-gradient(155deg, #eee4dc, #e2d6cc);
  display: flex; align-items: center; justify-content: center; color: #cbb8ac;
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heroCap {
  position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .08em; color: var(--muted-2);
}
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 20px 20px 18px; }
.actions a, .actions button {
  height: 62px; border: 0; border-radius: 14px; background: none; font-family: inherit; font-size: 12.5px;
  color: var(--brand-deep); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; cursor: pointer; text-decoration: none; transition: background .16s ease;
}
.actions a[aria-disabled="true"] { color: var(--faint); pointer-events: none; }
.actions a:hover, .actions button:hover { background: var(--wash); }
.trustCard { margin: 0 24px; padding: 18px; border-radius: 20px; background: var(--sage-bg); display: flex; flex-direction: column; gap: 13px; }
.trustCard.stale { background: var(--tan-bg); }
.detailMap { height: 220px; margin: 0 24px; border-radius: 20px; overflow: hidden; background: var(--map); }
.detailMap .leaflet-container { width: 100%; height: 100%; background: var(--map); }

/* ============ tab bar ============ */
.tabbar {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 10px 8px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-2); background: var(--screen);
}
.tabbar a {
  border: 0; background: none; font-family: inherit; display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 6px 0; cursor: pointer; color: var(--faint); text-decoration: none; transition: color .18s ease;
}
.tabbar a.on { color: var(--brand); }
.tabbar span { font-size: 10px; letter-spacing: .02em; white-space: nowrap; }

/* ============ responsive: タブレットの2カラム ============ */
@media (min-width: 700px) and (max-width: 1023px) {
  :root { --shell: 100%; }
  .app { max-width: 900px; }
  .homeLayout {
    display: grid;
    grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: 'head map' 'list map';
    gap: 0 16px;
    padding: 0 16px 16px;
  }
  .homeHead { grid-area: head; padding-top: 8px; }
  .homeHead .appbar { display: none; }
  .homeHead .searchline { margin-left: 0; width: 100%; }
  .homeHead .chipRow.pad { padding-left: 0; padding-right: 0; }
  .mapWrap {
    grid-area: map; margin-top: 12px; border-radius: 22px;
    box-shadow: 0 0 0 1px rgba(74, 59, 52, .07), 0 18px 40px -24px rgba(74, 59, 52, .45);
  }
  .sheetList {
    grid-area: list; max-height: none; padding: 14px 0 6px; border-top: 0; box-shadow: none; min-height: 0;
  }
  .sheetList .grabber { display: none; }
}

/* タブレット横幅からナビゲーションを左列に固定する。
   画面幅を変えてもナビが突然消えたり下へ移動したりしない。 */
@media (min-width: 768px) and (max-width: 1023px) {
  :root { --tabbar-h: 0px; }
  .app {
    display: grid;
    grid-template-columns: clamp(168px, 21vw, 192px) minmax(0, 1fr);
    grid-template-areas: 'nav screen';
  }
  .screen { grid-area: screen; min-width: 0; }
  .tabbar {
    grid-area: nav; display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 24px 12px; border-top: 0; border-right: 1px solid var(--line-2);
    position: relative;
  }
  .tabbar::before {
    content: 'Decaf Map';
    font-family: var(--font-display); font-size: 20px; color: var(--ink);
    padding: 0 10px 20px;
  }
  .tabbar a {
    flex-direction: row; justify-content: flex-start; gap: 11px;
    padding: 12px; border-radius: 14px;
  }
  .tabbar a:hover { background: var(--wash); }
  .tabbar a.on { background: var(--rose-bg); color: var(--rose-ink); }
  .tabbar span { font-size: 12.5px; letter-spacing: .02em; }
  .toast { left: calc(50% + 88px); }
  .sheet { left: calc(50% + 88px); max-width: 520px; }
}

/* 700px以上では一覧の列が狭くなるので、店名・情報を省略せず折り返す。 */
@media (min-width: 700px) {
  .rowText .name { white-space: normal; overflow: visible; text-overflow: clip; }
  .rowText .meta { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.7; }
}

/* 詳細・お気に入り・マイページは、タブレット幅から読みやすい幅で中央に置く。 */
@media (min-width: 700px) {
  /* 幅を絞るのはスクロール領域そのもの。中の要素に max-width を掛けると
     flex の子が縮んでボタンまで潰れてしまう。 */
  .screen > .scroll { width: 100%; max-width: 720px; margin: 0 auto; }
  .hero { border-radius: 0 0 28px 28px; }
  .detailMap { height: 280px; }
}

/* ============ responsive: 1024px 以上のレイアウト ============ */
@media (min-width: 1024px) {
  /* ホーム：左に検索＋一覧、右に大きな地図 */
  .homeLayout {
    display: grid;
    grid-template-columns: clamp(320px, 34vw, 400px) minmax(320px, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: 'head map' 'list map';
    gap: 0 24px;
    padding: 0 24px 24px;
  }
  .homeHead { grid-area: head; padding-top: 8px; }
  .homeHead .appbar { display: none; }
  .homeHead .searchline { margin-left: 0; width: 100%; }
  .homeHead .chipRow.pad { padding-left: 0; padding-right: 0; }
  .mapWrap {
    grid-area: map; margin-top: 12px; border-radius: 24px;
    box-shadow: 0 0 0 1px rgba(74, 59, 52, .07), 0 18px 40px -24px rgba(74, 59, 52, .45);
  }
  .sheetList {
    grid-area: list; max-height: none; padding: 16px 0 8px; border-top: 0; box-shadow: none; min-height: 0;
  }
  .sheetList .grabber { display: none; }

  /* 詳細・お気に入り・マイページは読みやすい幅で中央に */
  .detailMap { height: 300px; }

  /* タブバーを左のナビ列に変える */
  .tabbar {
    grid-area: nav; display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 26px 16px; border-top: 0; border-right: 1px solid var(--line-2);
    position: relative;
  }
  .tabbar::before {
    content: 'Decaf Map';
    font-family: var(--font-display); font-size: 21px; color: var(--ink);
    padding: 0 12px 22px;
  }
  .tabbar a {
    flex-direction: row; justify-content: flex-start; gap: 12px;
    padding: 12px 14px; border-radius: 14px; transition: background .16s ease, color .18s ease;
  }
  .tabbar a:hover { background: var(--wash); }
  .tabbar a.on { background: var(--rose-bg); color: var(--rose-ink); }
  .tabbar span { font-size: 13px; letter-spacing: .02em; }
}

@media (min-width: 1200px) {
  .homeLayout { grid-template-columns: 420px minmax(0, 1fr); }
}

/* ============ sheet / toast ============ */
.scrim { position: fixed; inset: 0; z-index: 900; background: rgba(74, 59, 52, .32); border: 0; padding: 0; animation: fade .2s ease both; }
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 901; width: 100%; max-width: var(--shell);
  border-radius: 28px 28px 0 0; background: var(--screen); padding: 10px 24px calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 16px; animation: sheetUp .3s cubic-bezier(.22, 1, .36, 1) both;
}
.optRow {
  display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line-2);
  font-size: 14px; color: #7c6a62; background: none; border-left: 0; border-right: 0; border-top: 0;
  font-family: inherit; cursor: pointer; text-align: left; width: 100%;
}
.optRow.on { color: var(--ink); }
.check {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--disc);
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.optRow.on .check { border-color: var(--rose); background: var(--rose); color: #fdfbf9; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 18px); z-index: 950;
  width: calc(100% - 48px); max-width: calc(var(--shell) - 48px); padding: 15px 20px; border-radius: 16px;
  background: var(--ink); color: #f7f1ec; font-size: 13px; line-height: 1.6; text-align: center;
  animation: rise .3s ease both; box-shadow: 0 12px 30px -12px rgba(74, 59, 52, .6);
}

/* ============ forms / my page ============ */
.field {
  height: 50px; padding: 0 16px; border-radius: 14px; background: var(--wash); display: flex; align-items: center;
  font-size: 14px; color: var(--ink); border: 0; font-family: inherit; width: 100%;
}
.field::placeholder { color: var(--faint); }
.statCell { padding: 16px 10px; border-radius: 16px; background: var(--wash); display: flex; flex-direction: column; align-items: center; gap: 5px; }
.prefRow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; border-bottom: 1px solid #e9dfd7; }
.prefRow:last-child { border-bottom: 0; }
.linkRow {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; border-bottom: 1px solid var(--line-2);
  font-size: 14px; color: var(--ink); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%;
  font-family: inherit; cursor: pointer; text-decoration: none;
}

/* ============ 認証（ログイン・新規登録） ============ */
.authScreen { display: flex; flex-direction: column; min-height: 100dvh; }
.authBar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 24px 0;
}
.authBar .title { font-family: var(--font-display); font-size: 22px; color: var(--ink); text-decoration: none; }
.authBar a.back {
  min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--brand-link); text-decoration: none;
}
.authBody {
  flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 26px;
  padding: 28px 24px calc(36px + env(safe-area-inset-bottom, 0px));
  max-width: 460px; width: 100%; margin: 0 auto;
}
.authIntro { display: flex; flex-direction: column; gap: 10px; }
.authIntro h1 { font-family: var(--font-mincho); font-size: 26px; line-height: 1.5; color: var(--ink); margin: 0; }
.authIntro p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--muted); }
.authForm { display: flex; flex-direction: column; gap: 18px; }
.authField { display: flex; flex-direction: column; gap: 9px; }
.authField label { font-size: 12.5px; color: var(--ink-2); letter-spacing: .02em; }
.authField .hint { font-size: 11.5px; color: var(--muted-2); line-height: 1.7; }
.authField input {
  height: 52px; padding: 0 16px; border-radius: 14px; background: var(--wash); border: 1px solid transparent;
  font-family: inherit; font-size: 14px; color: var(--ink); width: 100%;
  transition: border-color .16s ease, background .16s ease;
}
.authField input::placeholder { color: var(--faint); }
.authField input:focus { outline: none; border-color: var(--brand); background: var(--raised); }
.authError {
  padding: 14px 16px; border-radius: 14px; background: var(--rose-bg); color: var(--rose-ink);
  font-size: 12.5px; line-height: 1.8;
}
.authError.hidden { display: none; }
.authDivider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 11.5px; }
.authDivider::before, .authDivider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.authAdmin { border-radius: 16px; background: var(--wash); padding: 4px 18px 6px; }
.authAdmin summary {
  min-height: 44px; display: flex; align-items: center; font-size: 12.5px; color: var(--muted); cursor: pointer;
  list-style: none;
}
.authAdmin summary::-webkit-details-marker { display: none; }
.authAdmin summary::after { content: '＋'; margin-left: auto; color: var(--faint); }
.authAdmin[open] summary::after { content: '−'; }
.authAdmin .authField { padding-bottom: 14px; }
.authFoot { text-align: center; font-size: 12.5px; color: var(--muted); line-height: 2; }
.authFoot a { color: var(--brand-link); text-decoration: none; }
.authFoot a:hover { color: var(--brand-deep); }

@media (min-width: 620px) {
  .authScreen { max-width: 520px; margin: 0 auto; background: var(--screen); }
}

/* ============ motion ============ */
@keyframes rise { from { transform: translate(-50%, 24px); opacity: 0 } to { transform: translate(-50%, 0); opacity: 1 } }
@keyframes sheetUp { from { transform: translate(-50%, 100%) } to { transform: translate(-50%, 0) } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
/* 画面全体の opacity アニメーションは、バックグラウンド復帰時に
   opacity: 0 のまま止まるブラウザがあるため使用しない。 */
.anim-fade { animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
