:root {
  --grad-pink: #ff6b9d;
  --grad-orange: #ff8e53;
  --grad-yellow: #ffd54f;
  --grad-green: #4ecdc4;
  --grad-purple: #9b5de5;          /* DS-02 secondary accent */
  --grad-purple-soft: rgba(155, 93, 229, 0.12);
  --bg: #fafafa;
  --card: #ffffff;
  --text: #1f1f1f;
  --text-soft: #6b6b6b;
  --text-muted: #9b9b9b;
  --border: #ececec;
  --danger: #e74c3c;
  --danger-bg: #fee;
  --accent: #ff6b9d;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-strong: 0 4px 20px rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 76px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang SC",
    "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
}

.app {
  display: flex;
  flex-direction: column;
  min-height: min(100vh, 100dvh);  /* v59: iPhone Safari 18.7 100svh 算成 836+ (被誤差這實上超 viewport)，改取 vh / dvh 較小值 */
}

main {
  flex: 1;
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* ============== Brand stripe ============== */
.brand-stripe {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--grad-pink),
    var(--grad-orange),
    var(--grad-yellow),
    var(--grad-green),
    var(--grad-purple)
  );
  border-radius: 2px;
  margin-bottom: 18px;
}

/* ============== Bottom tabs ============== */
.bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, transform 0.1s;
  font-family: inherit;
}

.tab-btn:active {
  transform: scale(0.95);
}

.tab-btn .emoji {
  font-size: 22px;
  line-height: 1;
}

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

.tab-btn.active .emoji {
  filter: drop-shadow(0 2px 4px rgba(255, 107, 157, 0.3));
}

/* ============== Wheel page ============== */
.wheel-page {
  text-align: center;
}

.wheel-page h1 {
  font-size: 26px;
  background: linear-gradient(
    90deg,
    var(--grad-pink),
    var(--grad-orange),
    var(--grad-yellow)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
  font-weight: 800;
}

.wheel-subtitle {
  color: var(--text-soft);
  margin-bottom: 20px;
  font-size: 13px;
}

.wheel-container {
  position: relative;
  width: 100%;
  max-width: 280px;  /* v63: 340 -> 280 縮 ( Cathy 「轉盤變長」) */
  margin: 0 auto 20px;
  aspect-ratio: 1;
}

/* v63: recent picks (最近抽過的 3 個結果填底部空白) */
.recent-picks { margin: 8px 8px 0; padding: 0; text-align: left; }
.recent-title { font-size: 12px; color: var(--text-soft); font-weight: 700; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--card); border-radius: 12px; margin-bottom: 6px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); font-size: 14px; }
.recent-name { font-weight: 600; color: var(--text); }
.recent-time { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 26px solid var(--accent);
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.wheel-svg {
  width: 100%;
  height: 100%;
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.21, 1);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.1));
  transform-origin: center;
}

.well-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 5;
  pointer-events: none;
}

.spin-btn {
  background: linear-gradient(
    90deg,
    var(--grad-pink),
    var(--grad-orange)
  );
  color: white;
  border: none;
  padding: 16px 44px;
  border-radius: 30px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
  transition: transform 0.1s, box-shadow 0.2s;
  font-family: inherit;
}

.spin-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.spin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.2);
}

.result-display {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 157, 0.1),
    rgba(255, 142, 83, 0.1)
  );
  border-radius: var(--radius);
  border: 2px dashed var(--accent);
  display: none;
}

.result-display.show {
  display: block;
  animation: resultAppear 0.5s ease-out;
}

.result-display .label {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.result-display .winner {
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--grad-pink), var(--grad-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes resultAppear {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============== List page ============== */
.page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.add-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.add-form input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  outline: none;
  font-family: inherit;
  background: var(--card);
  transition: border-color 0.2s;
}

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

.add-form button {
  background: linear-gradient(90deg, var(--grad-pink), var(--grad-orange));
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  white-space: nowrap;
}

.food-list {
  list-style: none;
}

.food-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  transition: opacity 0.2s, background 0.2s;
}

.food-item.excluded {
  opacity: 0.55;
  background: #f7f7f7;
}

.food-item.excluded .name {
  text-decoration: line-through;
  color: var(--text-muted);
}

.food-item .name {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  word-break: break-all;
}

.food-item .actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.icon-btn:active {
  background: rgba(0, 0, 0, 0.05);
}

.icon-btn.exclude-toggle.excluded {
  background: rgba(255, 107, 157, 0.15);
}

/* ============== History page ============== */
.history-list {
  list-style: none;
}

.history-item {
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-item .emoji {
  font-size: 22px;
  flex-shrink: 0;
}

.history-item .winner-name {
  flex: 1;
  font-weight: 600;
  font-size: 16px;
}

.history-item .time {
  font-size: 12px;
  color: var(--text-soft);
  flex-shrink: 0;
}

/* ============== Settings page ============== */
.settings-item {
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-item .label {
  font-size: 15px;
  font-weight: 500;
}

.settings-item .value {
  color: var(--text-soft);
  font-size: 14px;
}

.danger-btn {
  background: var(--danger-bg);
  color: var(--danger);
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 13px;
}

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

.section-title {
  font-size: 13px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 16px 0 8px;
  font-weight: 600;
}

/* ============== Empty state ============== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-soft);
}

.empty-state .emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

/* ============== Toast ============== */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background: rgba(0, 0, 0, 0.88);
  color: white;
  padding: 11px 20px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 1000;
  transition: transform 0.3s ease;
  pointer-events: none;
  max-width: 80vw;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

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

/* ============== Hint card ============== */
.hint-card {
  background: linear-gradient(
    135deg,
    rgba(78, 205, 196, 0.1),
    rgba(255, 213, 79, 0.1)
  );
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-soft);
  border-left: 3px solid var(--grad-green);
}

.hint-card strong {
  color: var(--text);
}

/* ============== Period selector ============== */
.period-input,
.period-select {
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
  outline: none;
  /* iOS native picker look */
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data="image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239b9b9b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.period-input:focus,
.period-select:focus {
  border-color: var(--accent);
}

.period-input {
  /* In the add form, smaller height to match input */
  padding: 12px 28px 12px 14px;
  font-size: 14px;
  max-width: 110px;
}

.period-select {
  /* In food list, compact */
  font-size: 12px;
  padding: 6px 24px 6px 8px;
  min-width: 88px;
  flex-shrink: 0;
}

.food-item .period-select {
  background-color: rgba(255, 213, 79, 0.12);
}

.add-form {
  flex-wrap: wrap;
}

/* ============== Period chips (wheel page) ============== */
.period-chips {
  display: flex;
  gap: 8px;
  margin: 0 -20px 18px;
  padding: 4px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.period-chips::-webkit-scrollbar {
  display: none;
}

.period-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;  // v13: 完全圓 pill
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  scroll-snap-align: start;
  position: relative;
}

.period-chip:active {
  transform: scale(0.95);
}

.period-chip.active {
  background: linear-gradient(90deg, var(--grad-pink), var(--grad-orange));
  color: white;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 107, 157, 0.35);
}

.period-chip .chip-icon {
  font-size: 14px;
  line-height: 1;
}

.period-chip .auto-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  font-size: 10px;
  color: var(--grad-purple);
  background: var(--card);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.period-chip.active .auto-dot {
  background: white;
  color: var(--grad-purple);
}

.override-note {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 2px;
}
/* ============== v15 (Firebase Auth) ============== */

/* Auth chip slot — top-right of wheel page */
#auth-chip-slot {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
  min-height: 36px;
}

/* Signed-out: 兩顆小登入按鈕 */
.auth-chip.signed-out {
  display: flex;
  gap: 6px;
}

.auth-btn {
  border: none;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.1s, box-shadow 0.1s;
}

.auth-btn:active {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.auth-btn.google {
  border: 1px solid rgba(66, 133, 244, 0.25);
}

.auth-btn.apple {
  background: #000;
  color: #fff;
  border: 1px solid #000;
}

/* Signed-in: 頭像 + 名稱 chip（點擊跳到設定頁） */
.auth-chip.signed-in {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: none;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: transform 0.1s;
}

.auth-chip.signed-in:active {
  transform: scale(0.96);
}

.auth-avatar,
.auth-avatar-fallback {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
}

.auth-avatar {
  object-fit: cover;
}

.auth-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-purple-soft);
  font-size: 14px;
}

.auth-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-dot {
  font-size: 11px;
  opacity: 0.6;
}

/* Settings — 帳號 section */
.account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px !important;
}

.settings-avatar,
.settings-avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
}

.settings-avatar {
  object-fit: cover;
}

.settings-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-purple-soft);
  font-size: 22px;
}

.account-info {
  flex: 1;
  min-width: 0;
}

.account-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-email {
  font-size: 12px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-status {
  font-size: 11px;
  color: var(--grad-green);
  margin-top: 2px;
}

.auth-inline {
  display: flex;
  gap: 6px;
}

.hint-row {
  background: rgba(78, 205, 196, 0.08) !important;
  border-left: 3px solid var(--grad-green);
}

.hint-text {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.5;
}


/* ============== v17 (DS-02 Login Page) ============== */
/* DS-02 = "Vibrant Gradient Recipe App"
   規格：暖白底 + 粉桃→橘→黃 signature 漸層 blob (hero) + pill 膠囊 + 圓潤粗字 + 浮動卡片
   來源：~/.openclaw/workspace/design-styles/02-vibrant-gradient-recipe-app.md
*/

/* Auth-locked state: 隱藏底部 tabs + 背景換 hero gradient */
body.auth-locked {
  min-height: min(100vh, 100dvh);  /* v59: 同上 */
  background: #FAFAFA;
  overflow: hidden;
}

body.auth-locked .bottom-tabs {
  display: none !important;
}

/* === Hero: 多色 organic blobs === */
.login-page {
  position: relative;
  min-height: min(100vh, 100dvh);  /* v59: 100svh 改 min(100vh, 100dvh) 避免 iPhone Safari 18.7 100svh 算出錯 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(48px + env(safe-area-inset-top, 0px)) 24px calc(80px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  overflow: hidden;
}

/* 大 blob 1 — 粉桃→橘 (左上) */
.login-page::before {
  content: "";
  position: absolute;
  top: -120px;
  left: -80px;
  width: 380px;
  height: 380px;
  border-radius: 50% 50% 50% 30%;
  background: linear-gradient(135deg, #FF4D8D 0%, #FF8C42 100%);
  filter: blur(60px);
  opacity: 0.45;
  z-index: 0;
  animation: blobFloat1 12s ease-in-out infinite;
}

/* 大 blob 2 — 紫→珊瑚粉 (右下) */
.login-page::after {
  content: "";
  position: absolute;
  bottom: -100px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 60% 40% 50% 50%;
  background: linear-gradient(135deg, #9B5DE5 0%, #FF8B7B 100%);
  filter: blur(70px);
  opacity: 0.40;
  z-index: 0;
  animation: blobFloat2 14s ease-in-out infinite;
}

/* 小 blob 3 — 黃 (右上) — 用 pseudo element 加不上，用 div */
.login-blob-3 {
  position: absolute;
  top: 20%;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFC93C 0%, #4ECDC4 100%);
  filter: blur(50px);
  opacity: 0.35;
  z-index: 0;
  animation: blobFloat3 10s ease-in-out infinite;
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(20px, 30px) rotate(15deg); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-25px, -20px) rotate(-20deg); }
}
@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-15px, 15px) scale(1.15); }
}

/* === Logo 區 === */
.login-logo-wrap {
  position: relative;
  z-index: 1;
  width: 160px;
  height: 160px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 36px;
  padding: 24px;
  box-shadow:
    0 12px 40px rgba(255, 77, 141, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: float 3s ease-in-out infinite;
}

.login-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* === 標題：三色 signature 漸層 === */
.login-title {
  position: relative;
  z-index: 1;
  font-size: 38px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #FF4D8D 0%, #FF8C42 50%, #FFC93C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* DS-02: 粗體友善 */
}

.login-subtitle {
  position: relative;
  z-index: 1;
  font-size: 15px;
  color: #6B7280;
  font-weight: 500;
  margin: 0 0 40px;
}

/* === 按鈕容器 === */
.login-buttons {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 340px;
  margin-bottom: 36px;
}

/* === Pill 膠囊按鈕：漸層 + 柔浮陰影 === */
.auth-btn-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 999px; /* DS-02: pill 形狀 */
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.12s, box-shadow 0.15s;
  letter-spacing: 0.2px;
}

.auth-btn-large:active {
  transform: scale(0.97);
}

/* Google 按鈕：白底 + 圓角框 + 柔浮陰影 */
.auth-btn-large.google {
  background: #FFFFFF;
  color: #1A1A2E; /* DS-02: 深炭 */
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.04);
}

.auth-btn-large.google:hover {
  box-shadow:
    0 8px 24px rgba(255, 77, 141, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Apple 按鈕：黑底 */
.auth-btn-large.apple {
  background: #000000;
  color: #FFFFFF;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.08);
}

.auth-btn-icon {
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

/* === 底部小提示 === */
.login-hint {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: #9B5DE5;
  font-weight: 500;
  line-height: 1.6;
  max-width: 300px;
  text-align: center;
  padding: 10px 16px;
  background: rgba(155, 93, 229, 0.08);
  border-radius: 999px;
}

/* ============== v18 (DS-02: Auth chip + Account card 全改) ============== */

/* === Auth pill — 已登入 chip（轉盤右上） DS-02 pill 風 === */
.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: #FFFFFF;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #1A1A2E;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.1s;
  max-width: 200px;
}

.auth-pill:active { transform: scale(0.96); }

.auth-pill-avatar,
.auth-pill-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.auth-pill-avatar { object-fit: cover; }

.auth-pill-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF4D8D 0%, #FF8C42 100%);
  color: #FFFFFF;
  font-size: 14px;
}

.auth-pill-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-pill-cloud {
  font-size: 12px;
  opacity: 0.55;
  flex-shrink: 0;
}

/* === Account card (settings 頁) — DS-02 浮動卡片 === */
.ds-account-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow:
    0 8px 24px rgba(255, 77, 141, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
}

.ds-account-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.ds-account-avatar,
.ds-account-avatar-fallback {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ds-account-avatar { object-fit: cover; }

.ds-account-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF4D8D 0%, #FF8C42 100%);
  color: #FFFFFF;
  font-size: 24px;
}

.ds-account-info {
  flex: 1;
  min-width: 0;
}

.ds-account-name {
  font-size: 16px;
  font-weight: 800;
  color: #1A1A2E;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-account-email {
  font-size: 13px;
  color: #6B7280;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.ds-account-cloud {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(78, 205, 196, 0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #2BA39B;
  margin-bottom: 16px;
}

.ds-cloud-icon {
  font-size: 13px;
}

.ds-account-hint {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.5;
  margin: 0 0 16px;
  text-align: center;
}

.ds-account-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* === 登出按鈕 — pill 膠囊 === */
.auth-btn-large.logout-pill {
  width: 100%;
  background: linear-gradient(135deg, #FF4D8D 0%, #FF8C42 100%);
  color: #FFFFFF;
  box-shadow:
    0 6px 20px rgba(255, 77, 141, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.05);
}

.auth-btn-large.logout-pill:hover {
  box-shadow:
    0 8px 24px rgba(255, 77, 141, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.06);
}

/* === v22 (2026-08-18 22:31) — 暫時屏蔽 Apple login button === */
/* 原因：Apple Sign-in 需要 Apple Developer 帳號 + Services ID + Return URL 設定，
   Cathy 說之後再處理 Apple。Google 通了先 deploy。
   之後要恢復：拿掉這條 .apple { display: none } rule。 */
.auth-btn-large.apple {
  display: none !important;
}

/* === v24 (2026-08-18 22:41) — 拿掉右上角 auth chip === */
/* 原因：Cathy 覺得「顯示使用者 0 意義 + 醜死了」
   v16 login gate 後，登入狀態已經由 login page 強制 gate，app 內不需要再顯示
   之後反悔：拿掉這條 #auth-chip-slot { display: none } rule */
#auth-chip-slot {
  display: none !important;
}
