/* style.css — 無印良品風・シンプル・ナチュラルなスタイル */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Noto+Sans+JP:wght@300;400;500&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg:          #f5f1eb;           /* ナチュラルベージュ */
  --surface:     #ffffff;           /* 白 */
  --surface-2:   #ece7df;           /* 薄いベージュ */
  --border:      #e0d8ce;           /* ベージュボーダー */
  --border-2:    #d4cbc0;           /* やや濃いボーダー */

  --text-primary:   #3c3228;        /* ダークブラウン */
  --text-secondary: #8c8076;        /* ミディアムブラウン */
  --text-dim:       #c4bab0;        /* 薄いブラウン */

  --accent:      #8b7355;           /* 落ち着いたブラウン */
  --accent-dim:  rgba(139, 115, 85, 0.12);

  --danger:      #b85c5c;           /* 落ち着いた赤 */
  --danger-dim:  rgba(184, 92, 92, 0.10);

  --nav-height:   60px;
  --header-height: 52px;
  --safe-bottom:  env(safe-area-inset-bottom, 0px);

  --font-jp:   'Noto Sans JP', sans-serif;
  --font-mono: 'DM Mono', monospace;

  --radius:   10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  --transition: 0.18s ease;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: var(--font-jp); cursor: pointer; border: none; background: none; }
input  { font-family: var(--font-jp); }

/* ─── Splash Screen ────────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 15vh;
  background: var(--bg);
  z-index: 9999;
  transition: opacity 0.6s ease;
}

.splash.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-title {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--text-primary);
  opacity: 0;
  animation: splash-in 0.8s ease forwards;
}

@keyframes splash-in {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ─── Screen Shell ──────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 0 0 calc(var(--nav-height) + var(--safe-bottom)) 0;
  overflow: hidden;
}

.screen.active { display: flex; }

.screen-header {
  flex-shrink: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.screen-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  padding-bottom: 24px;
}

.screen-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

/* ─── Bottom Nav ────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 10px;
  letter-spacing: 0.04em;
  transition: color var(--transition);
  padding-top: 4px;
}

.nav-btn.active  { color: var(--accent); }
.nav-btn:active  { opacity: 0.7; }

.nav-icon {
  font-size: 18px;
  line-height: 1;
}

.nav-label {
  font-size: 10px;
}

/* ─── HOME ──────────────────────────────────────────────────── */
#screen-home .screen-header {
  padding: 0 20px;
  justify-content: space-between;
}

.app-title {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.home-date {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-jp);
  letter-spacing: 0.02em;
}

/* 記録ボタングリッド */
.record-btns-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.record-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--btn-color, var(--border-2));
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 400;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
  -webkit-user-select: none;
  user-select: none;
  min-height: 110px;
}

.record-btn:active {
  background: var(--surface-2);
  transform: scale(0.93);
}

.record-btn.bounce {
  animation: btn-bounce 0.4s ease;
}

@keyframes btn-bounce {
  0%   { transform: scale(0.88); }
  40%  { transform: scale(1.04); }
  70%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}

.record-btn-icon {
  font-size: 32px;
  line-height: 1;
}

.record-btn-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ── スタンプオーバーレイ（通常時は非表示） ── */
.record-btn {
  position: relative;
  overflow: hidden;
}

.record-btn-stamp {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ボタン記録済み状態: 元のアイコン・名前が透けて見える */
.record-btn.done {
  border-color: var(--border);
  border-left-color: var(--border);
}

.record-btn.done .record-btn-icon,
.record-btn.done .record-btn-name {
  opacity: 0.25;
  transition: opacity 0.3s ease;
}

.record-btn.done .record-btn-stamp {
  opacity: 1;
}

/* 絵文字スタンプ */
.stamp-emoji {
  font-size: 42px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

/* ハンコ風スタンプ */
.stamp-hanko {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 3px solid #c04040;
  border-radius: 50%;
  color: #c04040;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.75;
  transform: rotate(-12deg);
  font-family: var(--font-jp);
}

/* 画像スタンプ */
.stamp-image {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

/* 長押しプログレス（取り消し中） */
.record-btn.done .record-btn-stamp.undo-progress .stamp-hanko,
.record-btn.done .record-btn-stamp.undo-progress .stamp-emoji,
.record-btn.done .record-btn-stamp.undo-progress .stamp-image {
  animation: undo-shake 0.6s ease;
}

@keyframes undo-shake {
  0%, 100% { transform: rotate(-12deg); }
  20% { transform: rotate(-18deg); }
  40% { transform: rotate(-6deg); }
  60% { transform: rotate(-16deg); }
  80% { transform: rotate(-8deg); }
}

@keyframes undo-shake-emoji {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.1) rotate(-5deg); }
  40% { transform: scale(0.95) rotate(5deg); }
  60% { transform: scale(1.05) rotate(-3deg); }
  80% { transform: scale(0.98) rotate(2deg); }
}

.record-btn.done .record-btn-stamp.undo-progress .stamp-emoji {
  animation: undo-shake-emoji 0.6s ease;
}

/* ヒントテキスト */
.hint-text {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

/* ホームリンク */
.home-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background var(--transition), color var(--transition);
}

.link-btn:active { background: var(--surface-2); color: var(--text-primary); }

#today-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ─── RECORD LIST ───────────────────────────────────────────── */
.record-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}

.record-item:last-child { border-bottom: none; }

.record-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.record-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.record-item-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.record-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.record-item-name {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
}

.record-item-memo {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.record-item-time {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.delete-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 16px;
  border-radius: 50%;
  transition: background var(--transition), color var(--transition);
}

.delete-btn:active {
  background: var(--danger-dim);
  color: var(--danger);
}

.empty-msg {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 32px 0;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ─── CALENDAR ──────────────────────────────────────────────── */
#screen-calendar .screen-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  text-align: center;
}

.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 22px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.cal-nav-btn:active { background: var(--surface-2); color: var(--text-primary); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 24px;
}

.cal-header {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  padding: 6px 0 10px;
}

.cal-header.sun { color: #c07060; }
.cal-header.sat { color: #5a8aaa; }

.cal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.cal-cell.empty { cursor: default; }

.cal-cell:not(.empty):active { background: var(--surface-2); }

.cal-day-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1;
}

.cal-cell.sun .cal-day-num { color: #c07060; }
.cal-cell.sat .cal-day-num { color: #5a8aaa; }

.cal-cell.is-today .cal-day-num {
  color: var(--accent);
  font-weight: 500;
}

.cal-cell.is-today {
  background: var(--accent-dim);
}

.cal-cell.is-selected {
  background: var(--surface-2);
  outline: 1px solid var(--border-2);
}

.cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* 選択日の詳細 */
.cal-day-detail {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 4px;
}

.cal-day-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

/* ─── SETTINGS ──────────────────────────────────────────────── */
.settings-section {
  margin-bottom: 32px;
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.settings-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: opacity var(--transition);
}

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

.settings-item.is-inactive { opacity: 0.45; }

.settings-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sort-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
  font-size: 10px;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
}

.sort-btn:active:not(.disabled) {
  background: var(--surface-2);
  color: var(--accent);
}

.sort-btn.disabled {
  opacity: 0.2;
  pointer-events: none;
}

.settings-item-icon {
  font-size: 20px;
}

.settings-item-name {
  font-size: 15px;
  font-weight: 400;
}

.settings-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* pill ボタン */
.pill-btn {
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-2);
  color: var(--text-secondary);
  background: var(--surface-2);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.pill-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* アイコンボタン */
.icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.icon-btn:active { background: var(--surface-2); color: var(--text-primary); }

/* ─── Forms ─────────────────────────────────────────────────── */
.inline-form, .add-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 1px;
}

.add-form {
  border-color: var(--border-2);
}

.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  margin-top: 14px;
}

.form-label:first-child { margin-top: 0; }

.form-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus {
  border-color: var(--accent);
}

.form-input::placeholder {
  color: var(--text-dim);
}

/* color picker */
.form-color {
  height: 40px;
  padding: 4px 8px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* プライマリボタン */
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 13px 20px;
  background: var(--accent-dim);
  border: 1px solid rgba(139, 115, 85, 0.3);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background var(--transition), border-color var(--transition);
}

.btn-primary:active {
  background: rgba(139, 115, 85, 0.18);
  border-color: rgba(139, 115, 85, 0.4);
}

.form-actions .btn-primary {
  width: auto;
  flex: 1;
  margin-top: 0;
}

/* ゴーストボタン */
.btn-ghost {
  padding: 13px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: background var(--transition), color var(--transition);
}

.btn-ghost:active {
  background: var(--surface-2);
  color: var(--text-primary);
}

/* ─── Emoji Picker ─────────────────────────────────────────── */
.emoji-picker-field {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
}

.emoji-picker-field:active {
  border-color: var(--accent);
}

.emoji-picker-preview {
  font-size: 22px;
  line-height: 1.2;
}

.emoji-picker-panel {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 10px;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 200px;
  overflow-y: auto;
}

.emoji-picker-panel.hidden {
  display: none;
}

.emoji-picker-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.emoji-picker-item:active {
  background: var(--surface-2);
}

/* ─── Sound Selector ───────────────────────────────────────── */
.sound-group-label {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  margin-top: 10px;
}

.sound-group-label:first-child {
  margin-top: 0;
}

.sound-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.sound-option {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.sound-option:active {
  background: var(--accent-dim);
}

.sound-option.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ─── Stamp Selector ──────────────────────────────────────── */
.stamp-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stamp-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
  min-height: 72px;
}

.stamp-option:active {
  background: var(--surface-2);
}

.stamp-option.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.stamp-option-emoji {
  font-size: 32px;
}

.stamp-option-hanko {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2.5px solid #c04040;
  border-radius: 50%;
  color: #c04040;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.75;
  transform: rotate(-12deg);
}

.stamp-option-image {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* ─── Export Button ────────────────────────────────────────── */
.btn-export {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background var(--transition), border-color var(--transition);
}

.btn-export:active {
  background: var(--surface-2);
  border-color: var(--border-2);
}

.export-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* ─── App Footer (設定画面下部) ─────────────────────────────── */
.app-footer {
  margin-top: 40px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.app-footer-version {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.app-footer-copy {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.app-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.app-footer a:active {
  color: var(--accent);
}

.app-footer-links {
  margin-top: 12px;
  font-size: 12px;
}

.app-footer-sep {
  color: var(--text-dim);
  margin: 0 6px;
}

/* ─── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: 0 2px 12px rgba(60, 50, 40, 0.10);
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
.screen-body::-webkit-scrollbar { width: 3px; }
.screen-body::-webkit-scrollbar-track { background: transparent; }
.screen-body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

/* ─── Auth / Login ──────────────────────────────────────────── */
.auth-guest-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.auth-user-email {
  font-size: 13px;
  color: var(--text-primary);
  margin: 0 0 10px;
  word-break: break-all;
}

.btn-open-login {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.btn-logout {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

/* ─── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 300;
}

.modal-sheet {
  background: var(--bg-card);
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  padding: 24px 24px 40px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.6;
}

.btn-login-google {
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border-1);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-primary);
}

.login-divider {
  text-align: center;
  margin: 16px 0;
  position: relative;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-1);
}

.login-divider span {
  background: var(--bg-card);
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-muted);
  position: relative;
}

.login-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border-1);
  border-radius: 10px;
  font-size: 14px;
  background: var(--bg-base);
  color: var(--text-primary);
  box-sizing: border-box;
  margin-bottom: 10px;
}

.btn-login-email {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 8px;
}

.btn-signup {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.login-error {
  margin-top: 12px;
  font-size: 13px;
  color: #c0392b;
  text-align: center;
}
