/* ========================================
   에스프레쏘Log - Main Stylesheet
   ======================================== */

:root {
  --primary: #6B4423;
  --primary-light: #8B5E3C;
  --primary-dark: #4A2E14;
  --accent: #D4A96A;
  --accent-light: #F0C98A;
  --bg: #FDF8F3;
  --bg-card: #FFFFFF;
  --bg-sidebar: #2C1A0E;
  --text: #1A1008;
  --text-sub: #6B5B4E;
  --text-muted: #A0907F;
  --border: #E8D9C8;
  --border-light: #F0E6D8;
  --success: #4CAF7D;
  --danger: #E05252;
  --warning: #F5A623;
  --info: #4A90D9;
  --shadow-sm: 0 1px 3px rgba(107,68,35,0.08);
  --shadow-md: 0 4px 16px rgba(107,68,35,0.12);
  --shadow-lg: 0 8px 32px rgba(107,68,35,0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --sidebar-w: 260px;
  --topbar-h: 60px;
  --transition: 0.2s ease;
}

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

html { font-size: 16px; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ========================================
   SCREENS
   ======================================== */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

/* ========================================
   LOGIN SCREEN
   ======================================== */
#screen-login {
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1A0F06 0%, #2C1A0E 35%, #5D3820 70%, #8B5E3C 100%);
  position: relative;
  overflow: hidden;
}

#screen-login::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(212,169,106,0.08);
  top: -200px; right: -200px;
}

#screen-login::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(212,169,106,0.05);
  bottom: -100px; left: -100px;
}

.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 420px;
  padding: 32px 24px;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  color: white;
}

/* SVG 로고 이미지 스타일 */
.login-logo-img {
  width: 260px;
  height: auto;
  display: block;
  margin: 0 auto 4px;
  filter: brightness(0) invert(1) drop-shadow(0 2px 12px rgba(0,0,0,0.3));
}

.setup-logo-img {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 16px;
  filter: none;
}

.topbar-logo-img {
  height: 32px;
  width: auto;
  display: block;
  cursor: pointer;
  filter: none;
}

.sidebar-logo-img {
  width: 160px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: brightness(0) invert(1) opacity(0.9);
}

/* 구버전 호환 (이모지 아이콘) */
.logo-icon {
  font-size: 52px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.logo-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 10px;
  letter-spacing: -0.2px;
}

.login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.login-card h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 6px;
}

.login-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* 이메일 로그인 섹션 */
.login-email-section {
  margin-bottom: 4px;
}
.login-email-section input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  color: var(--text);
  background: #fff;
  margin-bottom: 10px;
}
.login-email-section input[type="email"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107,68,35,0.1);
}
.login-email-section input[type="email"]::placeholder {
  color: var(--text-muted);
  font-size: 13px;
}
.login-email-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 14px;
  display: block;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.btn-kakao {
  background: #FEE500;
  color: #3C1E1E;
}
.btn-kakao:hover { background: #F5DC00; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-kakao img { width: 20px; height: 20px; object-fit: contain; }

.btn-naver {
  background: #03C75A;
  color: white;
}
.btn-naver:hover { background: #02B34E; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.naver-logo {
  width: 20px; height: 20px;
  background: white;
  color: #03C75A;
  font-weight: 900;
  font-size: 14px;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

.btn-guest {
  background: var(--bg);
  color: var(--text-sub);
  border: 1.5px solid var(--border);
  font-size: 14px;
}
.btn-guest:hover { background: var(--border-light); }

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 4px 0 12px;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ========================================
   PROFILE SETUP SCREEN
   ======================================== */
#screen-profile-setup {
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1A0F06 0%, #3D2010 50%, #6B4423 100%);
}

.profile-setup-wrap {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  margin: 24px;
  box-shadow: var(--shadow-lg);
}

.setup-header {
  text-align: center;
  margin-bottom: 32px;
}

.setup-header .logo-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.setup-header h2 { font-size: 22px; font-weight: 700; }
.setup-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ========================================
   APP SHELL
   ======================================== */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* ========== TOPBAR ========== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.topbar-title {
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--primary);
  display: none;
}

.btn-icon {
  width: 38px; height: 38px;
  border: none;
  background: transparent;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-sub);
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg); color: var(--primary); }
.btn-icon.danger:hover { background: #FFF0F0; color: var(--danger); }

.avatar { font-size: 20px; cursor: pointer; }
.avatar-wrap { cursor: pointer; }

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  display: none;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

.sidebar-brand {
  padding: 20px 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 16px;
  margin-bottom: 0;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-avatar {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sidebar-user-info strong {
  font-size: 14px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-info span {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-menu {
  list-style: none;
  padding: 16px 12px;
  flex: 1;
}

.sidebar-menu li { margin-bottom: 4px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}
.menu-item i { width: 18px; text-align: center; }
.menu-item:hover { background: rgba(255,255,255,0.08); color: white; }
.menu-item.active { background: var(--accent); color: var(--primary-dark); font-weight: 600; }

.sidebar-footer {
  padding: 16px 12px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  cursor: pointer;
  border-radius: 8px;
  transition: all var(--transition);
}
.btn-logout:hover { background: rgba(255,80,80,0.12); color: #FF8080; }

/* ========== PAGE CONTAINER ========== */
.page-container {
  padding: calc(var(--topbar-h) + 24px) 16px 80px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.page { display: none; }
.page.active { display: block; }

.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  flex: 1;
}

.page-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-back {
  width: 36px; height: 36px;
  border: 1.5px solid var(--border);
  background: white;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-sub);
  font-size: 14px;
  flex-shrink: 0;
  transition: all var(--transition);
}
.btn-back:hover { background: var(--bg); color: var(--primary); }

/* ========================================
   DASHBOARD
   ======================================== */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.summary-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.summary-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}
.summary-icon.star { background: linear-gradient(135deg, #F5A623, #FFCC44); }
.summary-icon.green { background: linear-gradient(135deg, #4CAF7D, #6DD89B); }
.summary-icon.purple { background: linear-gradient(135deg, #9B59B6, #BE84D6); }

.summary-info { display: flex; flex-direction: column; min-width: 0; }
.summary-num { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); line-height: 1.2; }
.summary-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.recommend-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}

.recommend-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(212,169,106,0.16);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.recommend-content {
  min-width: 0;
  flex: 1;
}

.recommend-eyebrow {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
}

.recommend-card h3 {
  font-size: 18px;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 8px;
}

.recommend-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-sub);
}

.recommend-analysis {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  color: var(--primary);
  font-weight: 650;
}

.recommend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.recommend-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--bg);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 11px;
}

.recommend-btn {
  min-height: 36px;
  padding: 0 14px;
}

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.chart-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.chart-card.full-width { margin-bottom: 16px; }

.chart-card h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-sub);
  margin-bottom: 16px;
}

/* ENV SCORE */
.env-impact-summary {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 12px;
  line-height: 1.5;
}

.env-impact-bar {
  display: flex;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border-light);
  margin-bottom: 14px;
}

.env-impact-segment {
  height: 100%;
  width: 0%;
  min-width: 0;
  transition: width 0.5s ease;
}

.env-impact-segment.temp,
.env-dot.temp { background: var(--accent); }
.env-impact-segment.humidity,
.env-dot.humidity { background: var(--info); }
.env-impact-segment.dose,
.env-dot.dose { background: var(--success); }

.env-impact-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.env-impact-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
}

.env-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.env-label { font-size: 13px; color: var(--text-sub); display: flex; align-items: center; gap: 6px; min-width: 0; }
.env-impact-item strong {
  grid-column: 2;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SECTION HEADER */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-header h3 { font-size: 16px; font-weight: 600; }
.link-more { font-size: 13px; color: var(--primary); text-decoration: none; }
.link-more:hover { text-decoration: underline; }

/* ========================================
   LOG CARDS
   ======================================== */
.log-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.log-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 18px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.log-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--accent); }

.log-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.log-card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; color: var(--text); }
.log-card-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.log-card-stars { font-size: 14px; color: var(--warning); flex-shrink: 0; margin-left: 8px; }

.log-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-sub);
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 3px 10px;
}

.taste-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.taste-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
}

.taste-bar-track {
  width: 100%;
  height: 32px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.taste-bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.4s ease;
}

.taste-bar-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

/* ========================================
   LOGS TOOLBAR
   ======================================== */
.logs-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  transition: border-color var(--transition);
}
.search-wrap:focus-within { border-color: var(--accent); }
.search-wrap i { color: var(--text-muted); font-size: 14px; }
.search-wrap input { border: none; outline: none; flex: 1; font-size: 14px; font-family: inherit; background: transparent; padding: 12px 0; color: var(--text); }

#filter-sort,
#filter-author {
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: white;
  font-size: 13px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text);
  cursor: pointer;
  outline: none;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; opacity: 0.4; }
.empty-state p { font-size: 14px; line-height: 1.8; margin-bottom: 20px; }

/* ========================================
   FORMS
   ======================================== */
.form-section {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.form-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  margin-top: -10px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,169,106,0.15);
  background: white;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.setup-form .form-group { margin-bottom: 18px; }

/* LABEL HINT */
.label-hint {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* TASTE SECTION HEADER */
.taste-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.taste-section-header h3 { margin-bottom: 0; }

.btn-taste-config {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--accent);
  border-radius: 20px;
  background: white;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--primary);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-taste-config:hover { background: rgba(212,169,106,0.12); }
.btn-taste-config.active { background: var(--accent); color: var(--primary-dark); }

/* TASTE CONFIG PANEL */
.taste-config-panel {
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border);
  padding: 16px;
  margin-bottom: 20px;
}

.config-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.taste-toggle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.taste-toggle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text-muted);
  transition: all var(--transition);
  line-height: 1.3;
  text-align: center;
}
.taste-toggle-btn .toggle-emoji { font-size: 20px; }
.taste-toggle-btn:hover { border-color: var(--accent); color: var(--primary); }
.taste-toggle-btn.on {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(107,68,35,0.2);
}
.taste-toggle-btn.on .toggle-emoji { filter: none; }

/* TASTE SCORE SLIDERS */
.taste-score-group {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  animation: slideDown 0.2s ease;
}
.taste-score-group:last-child { border-bottom: none; margin-bottom: 0; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.taste-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.taste-name { font-size: 14px; font-weight: 600; color: var(--text); }
.taste-emoji { font-size: 18px; }
.taste-val {
  margin-left: auto;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  min-width: 28px;
  text-align: right;
}

.score-slider-wrap { position: relative; }

.score-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) 50%, var(--border) 50%, var(--border) 100%);
  outline: none;
  cursor: pointer;
  transition: background var(--transition);
}

.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(107,68,35,0.3);
  transition: transform var(--transition);
}

.score-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.slider-ticks span {
  font-size: 10px;
  color: var(--text-muted);
}

/* STAR RATING */
.overall-score-wrap {
  text-align: center;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-top: 16px;
}

.overall-score-wrap h4 { font-size: 14px; color: var(--text-sub); margin-bottom: 12px; }

.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.star-btn {
  font-size: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--border);
  transition: all var(--transition);
  line-height: 1;
  padding: 0;
}
.star-btn.active { color: var(--warning); }
.star-btn:hover { transform: scale(1.2); }

/* TEXTAREA */
textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.7;
}

.form-group textarea {
  min-height: 100px;
  line-height: 1.7;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(107,68,35,0.25);
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(107,68,35,0.3); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  color: var(--text-sub);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-secondary:hover { background: var(--bg); border-color: var(--accent); color: var(--primary); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-danger:hover { opacity: 0.88; }

.btn-full { width: 100%; }

.btn-link {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.btn-link:hover { color: var(--accent); }

/* ========================================
   LOG DETAIL
   ======================================== */
.detail-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.detail-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.detail-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

.detail-info-item {}
.detail-info-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.detail-info-value { font-size: 15px; font-weight: 600; color: var(--text); }

.detail-taste-bars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
}

.detail-taste-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.detail-taste-label { font-size: 10px; color: var(--text-muted); text-align: center; }
.detail-taste-dots { display: flex; flex-direction: column-reverse; gap: 2px; }

.taste-dot {
  width: 24px; height: 8px;
  border-radius: 4px;
  background: var(--border-light);
}
.taste-dot.filled { background: var(--accent); }

.detail-taste-score { font-size: 16px; font-weight: 700; color: var(--primary); }

.detail-overall {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, var(--bg), white);
  border-radius: var(--radius-sm);
}
.detail-overall-stars { font-size: 28px; color: var(--warning); }
.detail-overall-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ========================================
   PREDICT PAGE
   ======================================== */
.predict-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.predict-input-card,
.predict-result-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.predict-input-card h3,
.predict-result-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.predict-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
}

.predict-scores { margin-top: 16px; }
.predict-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}
.predict-score-row:last-child { border-bottom: none; }
.predict-score-label { font-size: 13px; color: var(--text-sub); }
.predict-score-val { font-size: 16px; font-weight: 700; color: var(--primary); }
.predict-score-stars { font-size: 13px; color: var(--warning); }

.predict-similar { margin-top: 16px; }
.predict-similar h4 { font-size: 13px; font-weight: 600; color: var(--text-sub); margin-bottom: 10px; }

.predict-tip {
  margin-top: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(212,169,106,0.1), rgba(107,68,35,0.05));
  border-radius: 10px;
  border-left: 3px solid var(--accent);
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

.beta-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* ========================================
   PROFILE PAGE
   ======================================== */
.profile-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-avatar-lg {
  font-size: 56px;
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  border: 0;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  position: relative;
  color: white;
  transition: transform var(--transition), box-shadow var(--transition);
}
.profile-avatar-lg:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(107,68,35,0.2); }
.profile-avatar-lg:focus-visible { outline: 3px solid rgba(212,169,106,0.5); outline-offset: 4px; }
.profile-avatar-lg.has-image { background: var(--bg); }
.profile-avatar-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

.profile-form { width: 100%; max-width: 400px; }

.settings-tabs,
.machine-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: white;
}

.settings-tab,
.machine-tab {
  flex: 1;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  cursor: pointer;
}

.settings-tab.active,
.machine-tab.active {
  background: var(--accent);
  color: var(--primary-dark);
}

.settings-panel,
.machine-panel {
  display: none;
}

.settings-panel.active,
.machine-panel.active {
  display: block;
}

.settings-panel {
  padding: 4px 0 0;
}

.equipment-section {
  margin-top: 18px;
}

.equipment-section:first-of-type {
  margin-top: 0;
}

.equipment-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.equipment-section-header h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
}

.btn-equipment-add {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.equipment-list {
  display: grid;
  gap: 12px;
}

.equipment-card {
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg);
}

.equipment-card .form-group:last-child {
  margin-bottom: 0;
}

.equipment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.equipment-card-header strong {
  font-size: 13px;
  color: var(--primary);
}

.btn-equipment-remove {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-equipment-remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-equipment-remove:not(:disabled):hover {
  color: #D04545;
  border-color: #F0C4C4;
  background: #FFF7F7;
}

.provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-sub);
}

.profile-stats-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.profile-stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.profile-stat-num { font-size: 22px; font-weight: 700; color: var(--primary); display: block; }
.profile-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: block; }

/* ========================================
   TOAST
   ======================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: 360px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.modal-box p { font-size: 14px; color: var(--text-sub); margin-bottom: 24px; }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.page.active { animation: slideUp 0.25s ease; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
  .charts-row { grid-template-columns: 1fr; }
  .predict-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .detail-info-grid { grid-template-columns: 1fr 1fr; }
  .detail-taste-bars { grid-template-columns: repeat(4, 1fr); }
  .profile-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-cards { grid-template-columns: 1fr 1fr; }
  .recommend-card { flex-direction: column; }
  .taste-toggle-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  .topbar { padding: 0 24px; }
  .page-container { padding: calc(var(--topbar-h) + 32px) 24px 80px; }
}

/* ========================================
   DASHBOARD TREND CHART (탭 + 레이더 연동)
   ======================================== */
.trend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.trend-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border-light);
}

.trend-tab {
  padding: 7px 18px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: -0.2px;
}

.trend-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.trend-hint {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.trend-hint::before {
  content: '👆';
  font-size: 12px;
}

.trend-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  align-items: start;
}

.trend-chart-wrap { position: relative; }
.trend-radar-wrap {
  display: flex;
  flex-direction: column;
}

.trend-selected-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(107,68,35,0.06);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  animation: fadeIn 0.2s ease;
}

#trend-selected-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

#trend-selected-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.radar-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.radar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.radar-tip {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  opacity: 0.8;
}

.radar-badge {
  font-size: 11px;
  background: var(--accent);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.radar-badge.show { opacity: 1; }

/* 레이더 업데이트 애니메이션 */
@keyframes radarPulse {
  0% { transform: scale(0.96); opacity: 0.7; }
  50% { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.radar-updating { animation: radarPulse 0.4s ease; }

/* ========================================
   BEAN PICKER (원두 선택 UI)
   ======================================== */
.bean-picker {
  position: relative;
  margin-top: 6px;
}

.bean-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 10px 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 56px;
}
.bean-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,169,106,0.15);
  background: #fffdf9;
}
.bean-search-wrap > i {
  color: var(--accent);
  font-size: 15px;
  flex-shrink: 0;
}
.form-group .bean-search-wrap input,
.bean-search-wrap input {
  flex: 1;
  height: auto;
  min-width: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  font-size: 15px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text);
  padding: 15px 0;
}
.form-group .bean-search-wrap input:focus,
.bean-search-wrap input:focus {
  border: 0;
  box-shadow: none;
  background: transparent;
}
.bean-search-wrap input::placeholder { color: var(--text-muted); font-size: 14px; }

.btn-bean-add {
  width: 36px; height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.btn-bean-add:hover { background: var(--primary); color: white; border-color: var(--primary); }
.btn-bean-add:disabled { opacity: 0.5; cursor: default; }

/* 드롭다운 */
.bean-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(107,68,35,0.15);
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
  animation: fadeIn 0.15s ease;
}

.bean-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  transition: background 0.12s ease;
  border-bottom: 1px solid var(--border-light);
}
.bean-option:last-child { border-bottom: none; }
.bean-option:hover { background: var(--bg); }
.bean-option:active { background: rgba(212,169,106,0.1); }

.bean-option-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.bean-option-body { flex: 1; min-width: 0; }
.bean-option-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bean-option-memo {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bean-option-count {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

.bean-option-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.8;
}

/* 선택된 원두 태그 */
.bean-selected-tag {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 12px 0 14px;
  background: linear-gradient(135deg, rgba(107,68,35,0.07), rgba(212,169,106,0.1));
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  animation: fadeIn 0.2s ease;
}

.bean-tag-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bean-clear-btn {
  width: 26px; height: 26px;
  border: none;
  background: rgba(107,68,35,0.1);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.bean-clear-btn:hover { background: var(--danger); color: white; }

/* ========================================
   BEANS MANAGEMENT PAGE
   ======================================== */
.bean-form-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  border: 1.5px dashed var(--accent);
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.2s ease;
}
.bean-form-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.beans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.bean-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 18px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.2s ease;
}
.bean-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }

.bean-card-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.bean-card-info { flex: 1; min-width: 0; }
.bean-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bean-card-memo { font-size: 12px; color: var(--text-muted); }
.bean-card-stat { font-size: 11px; color: var(--accent); font-weight: 600; margin-top: 4px; }

.bean-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ========================================
   FORM SECTION TITLE ROW
   ======================================== */
.form-section-titlerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.form-section-titlerow h3 { margin-bottom: 0; }

/* ========================================
   TASTE CONFIG PAGE
   ======================================== */
.tc-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* 추가 카드 */
.tc-add-card {
  background: white;
  border-radius: var(--radius);
  border: 1.5px dashed var(--accent);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.tc-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
}

.tc-add-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.tc-add-toggle {
  width: 30px; height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.tc-add-toggle:hover { background: var(--accent); color: var(--primary-dark); border-color: var(--accent); }

.tc-add-form {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border-light);
  animation: slideDown 0.2s ease;
}
.tc-add-form .form-row { margin-top: 16px; }
.tc-add-form .form-group { margin-bottom: 0; }

.tc-emoji-input {
  font-size: 22px !important;
  text-align: center;
  padding: 8px !important;
}

/* 색상 선택 */
.tc-color-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tc-color-input {
  width: 44px !important;
  height: 44px !important;
  padding: 2px !important;
  border-radius: 8px !important;
  cursor: pointer;
  flex-shrink: 0;
}

.tc-color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tc-preset-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.tc-preset-dot:hover { transform: scale(1.2); }
.tc-preset-dot.selected { border-color: var(--primary); transform: scale(1.15); box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary); }

/* 목록 헤더 */
.tc-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.tc-list-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tc-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px; height: 22px;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  border-radius: 11px;
  padding: 0 6px;
}
.tc-list-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* 항목 행 */
.tc-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-item {
  background: white;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-light);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  cursor: grab;
  user-select: none;
}
.tc-item:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.tc-item.dragging { opacity: 0.4; cursor: grabbing; }
.tc-item.drag-over { border-color: var(--primary); background: rgba(212,169,106,0.06); transform: scale(1.01); }

.tc-item-drag {
  color: var(--text-muted);
  font-size: 14px;
  cursor: grab;
  flex-shrink: 0;
}

.tc-item-color {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.tc-item-emoji {
  font-size: 22px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.tc-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tc-item-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.tc-item-ticks {
  font-size: 11px;
  color: var(--text-muted);
}

.tc-item-badges { display: flex; gap: 4px; flex-shrink: 0; }
.tc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.2px;
}
.tc-badge.built-in { background: rgba(107,68,35,0.1); color: var(--primary); }
.tc-badge.custom   { background: rgba(76,175,125,0.12); color: #2E7D32; }

.tc-item-actions { flex-shrink: 0; }

/* required star */
.req { color: var(--danger); }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

@media (max-width: 640px) {
  .trend-body {
    grid-template-columns: 1fr;
  }
  .trend-body .trend-radar-wrap {
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
    margin-top: 4px;
  }
  .beans-grid { grid-template-columns: 1fr; }
  .predict-layout { grid-template-columns: 1fr; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .trend-body { grid-template-columns: 1.3fr 1fr; }
}

/* ========================================
   AUTH TABS (로그인/회원가입 탭)
   ======================================== */
.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: -0.3px;
}

.auth-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-panel { }

.auth-help-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.remember-login {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: -2px 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
}

.remember-login input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

/* 비밀번호 입력 래퍼 */
.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-wrap input {
  flex: 1;
  padding-right: 44px !important;
}

.btn-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  padding: 0;
  border-radius: 6px;
  transition: color 0.15s;
}
.btn-pw-toggle:hover { color: var(--primary); }

/* 인증코드 입력 */
.code-input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.code-input-wrap input {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  text-align: center;
}

/* ========================================
   TEAM PAGE
   ======================================== */
.team-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 24px;
}

.team-action-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.team-action-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px 20px;
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}
.team-action-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }

.team-action-card i {
  font-size: 32px;
  color: var(--accent);
}

.team-action-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.team-action-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* 팀 정보 카드 */
.team-info-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.team-info-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.team-info-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.team-desc-text {
  font-size: 13px;
  color: var(--text-muted);
}

.team-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.team-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 6px 10px;
}

.team-meta-row i {
  color: var(--accent);
  font-size: 11px;
}

/* 팀 역할 배지 */
.team-role-badge {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  flex-shrink: 0;
  margin-left: 12px;
}
.team-role-badge.owner {
  background: linear-gradient(135deg, #D4A96A, #B8860B);
  color: white;
}
.team-role-badge.member {
  background: var(--bg);
  color: var(--text-sub);
  border: 1px solid var(--border);
}

/* 초대 코드 섹션 */
.team-invite-section {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border-light);
  margin-top: 4px;
}

.invite-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 8px;
}

.invite-code-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 8px;
}

.invite-code {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--primary);
  font-family: 'Courier New', monospace;
  flex: 1;
  text-align: center;
}

.invite-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.team-setting-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 12px;
}

.team-setting-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.team-setting-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.setting-switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  cursor: pointer;
}

.setting-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setting-switch span {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.2s ease;
}

.setting-switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.setting-switch input:checked + span {
  background: var(--accent);
}

.setting-switch input:checked + span::after {
  transform: translateX(20px);
}

.setting-switch input:disabled + span {
  opacity: 0.55;
  cursor: not-allowed;
}

.team-danger-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.team-archive-section {
  margin-top: 24px;
}

.team-archive-list {
  display: grid;
  gap: 10px;
}

.archive-team-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.archive-team-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.archive-team-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--accent);
  flex: 0 0 auto;
}

.archive-team-main {
  display: grid;
  gap: 2px;
  flex: 1;
}

.archive-team-main strong {
  font-size: 14px;
  color: var(--text);
}

.archive-team-main small {
  font-size: 12px;
  color: var(--text-muted);
}

.archive-dashboard-card {
  background: white;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.archive-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.archive-label {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
}

.archive-dashboard-header h3 {
  font-size: 18px;
  color: var(--text);
}

.archive-date {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 6px 10px;
}

/* 팀원 목록 */
.team-members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.team-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.team-member-row.left {
  opacity: 0.5;
  background: var(--bg);
}

.member-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.member-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-role {
  font-size: 12px;
  color: var(--text-muted);
}

.you-badge {
  font-size: 10px;
  background: var(--primary);
  color: white;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.left-badge {
  font-size: 10px;
  background: var(--text-muted);
  color: white;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}

/* 사이드바 팀 배지 */
.sidebar-team-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  background: rgba(212,169,106,0.25);
  color: var(--accent-light);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  margin-top: 2px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 대시보드 팀 뷰 토글 */
.dash-view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.view-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: -0.2px;
}
.view-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ========================================
   PROFILE STAT (프로필 통계)
   ======================================== */
.ps-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}
.ps-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.profile-stat {
  background: white;
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

/* ========================================
   BUILT-IN / TOGGLE BADGE (맛항목 관리)
   ======================================== */
.built-in-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: rgba(107,68,35,0.1);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}

.tc-toggle-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  flex-shrink: 0;
  border: none;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  cursor: pointer;
}
.tc-toggle-badge.on {
  background: rgba(76,175,125,0.15);
  color: #2E7D32;
}
.tc-toggle-badge.off {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.condition-color {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: rgba(212,169,106,0.18);
}

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

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

/* ========================================
   LABEL HINT
   ======================================== */
.label-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

/* ========================================
   SECTION DESC
   ======================================== */
.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  margin-top: -8px;
  line-height: 1.6;
}

/* ========================================
   BEAN CARD COUNT
   ======================================== */
.bean-card-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========================================
   BEAN OPT MEMO
   ======================================== */
.bean-opt-memo {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
}

/* ========================================
   COLOR PRESET BUTTON
   ======================================== */
.color-preset {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.color-preset:hover { transform: scale(1.2); border-color: var(--primary); }

/* ========================================
   OVERALL SCORE WRAP
   ======================================== */
.overall-score-wrap {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.overall-score-wrap h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.star-rating {
  display: flex;
  gap: 4px;
}

.star-btn {
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--border);
  transition: color 0.15s, transform 0.1s;
  line-height: 1;
  padding: 2px;
}
.star-btn.active { color: var(--warning); }
.star-btn:hover { transform: scale(1.15); }

/* ========================================
   TASTE SECTION HEADER
   ======================================== */
.taste-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.btn-taste-config {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-taste-config:hover,
.btn-taste-config.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* 맛 항목 토글 패널 */
.taste-config-panel {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  animation: slideDown 0.2s ease;
}

.config-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.taste-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
}

.taste-toggle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  background: white;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.15s;
}
.taste-toggle-btn .toggle-emoji { font-size: 18px; }
.taste-toggle-btn.on {
  background: rgba(107,68,35,0.08);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.taste-toggle-btn:hover { border-color: var(--accent); }

/* 맛 슬라이더 */
.taste-score-group {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}
.taste-score-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.taste-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.taste-name { font-size: 14px; font-weight: 600; color: var(--text); }
.taste-emoji { font-size: 18px; }
.taste-val {
  margin-left: auto;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  min-width: 24px;
  text-align: right;
}

.score-slider-wrap { }

.score-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) 50%, var(--border) 50%, var(--border) 100%);
  margin-bottom: 6px;
}
.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  border: 2.5px solid var(--primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.score-slider::-webkit-slider-thumb:hover { box-shadow: 0 0 0 5px rgba(107,68,35,0.12); }

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  padding: 0 2px;
}

/* ========================================
   ANIMATIONS (추가)
   ======================================== */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   TEAM ACTION CARDS RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
  .team-action-cards { grid-template-columns: 1fr; }
  .invite-code { font-size: 22px; letter-spacing: 4px; }
  .auth-tabs { margin-bottom: 20px; }
  .code-input-wrap { flex-direction: column; }
  .code-input-wrap .btn-secondary { width: 100%; }
}

/* ========================================
   DASHBOARD PAGE HEADER
   ======================================== */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 2px;
}

.page-header p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========================================
   ENV SCORE GRID
   ======================================== */
.env-impact-summary {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 12px;
  line-height: 1.5;
}

.env-impact-bar {
  display: flex;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border-light);
  margin-bottom: 14px;
}

.env-impact-segment {
  height: 100%;
  width: 0%;
  min-width: 0;
  transition: width 0.5s ease;
}

.env-impact-segment.temp,
.env-dot.temp { background: var(--accent); }
.env-impact-segment.humidity,
.env-dot.humidity { background: var(--info); }
.env-impact-segment.dose,
.env-dot.dose { background: var(--success); }

.env-impact-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.env-impact-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
}

.env-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.env-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.env-impact-item strong {
  grid-column: 2;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .env-impact-legend { grid-template-columns: 1fr; }
  .env-label { font-size: 12px; }
  .env-impact-item strong { font-size: 11px; }
}

/* ========================================
   SUMMARY CARDS
   ======================================== */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.summary-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}
.summary-card:hover { box-shadow: var(--shadow-md); }

.summary-icon {
  width: 40px; height: 40px;
  background: rgba(212,169,106,0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 17px;
  flex-shrink: 0;
}
.summary-icon.star { background: rgba(245,166,35,0.15); color: var(--warning); }
.summary-icon.green { background: rgba(76,175,125,0.15); color: var(--success); }
.summary-icon.purple { background: rgba(200,155,220,0.15); color: #C89BDC; }

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.summary-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.summary-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 500px) {
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .summary-num { font-size: 20px; }
}

/* ========================================
   CHART CARD
   ======================================== */
.chart-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.chart-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.chart-card.full-width { }

/* ========================================
   SECTION HEADER
   ======================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.link-more {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}
.link-more:hover { color: var(--primary); }

/* ========================================
   LOG CARDS
   ======================================== */
.log-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.log-card {
  background: white;
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.log-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); transform: translateY(-1px); }

.log-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.log-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.log-card-date {
  font-size: 12px;
  color: var(--text-muted);
}

.log-card-stars {
  font-size: 14px;
  color: var(--warning);
  flex-shrink: 0;
  margin-left: 8px;
}

.log-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-sub);
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 3px 9px;
  font-weight: 500;
}

/* taste bars */
.taste-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 36px;
}

.taste-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
}

.taste-bar-track {
  width: 100%;
  height: 32px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.taste-bar-fill {
  width: 100%;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
  min-height: 2px;
}

.taste-bar-label {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ========================================
   LOGS TOOLBAR
   ======================================== */
.logs-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,169,106,0.1);
}
.search-wrap i { color: var(--text-muted); font-size: 13px; }
.search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text);
  padding: 12px 0;
}

#filter-sort,
#filter-author {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text-sub);
  background: white;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state i {
  font-size: 40px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ========================================
   FORM STYLES
   ======================================== */
.log-form { }

.form-section {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.form-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group {
  margin-bottom: 16px;
}
.form-group:last-child { margin-bottom: 0; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text);
  background: #FAFAF8;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,169,106,0.12);
  background: white;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); font-size: 13px; }
.form-group textarea { resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: -0.3px;
}
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.author-chip {
  color: var(--primary);
  background: #FFF7EC;
  border-color: rgba(196, 136, 64, 0.28);
  font-weight: 700;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  color: var(--text-sub);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-secondary:hover { background: var(--bg); border-color: var(--accent); }

.btn-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-sub);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
}
.btn-icon:hover { background: var(--bg); color: var(--primary); }
.btn-icon.danger:hover { background: rgba(224,82,82,0.08); color: var(--danger); }

.btn-back {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  background: var(--bg);
  color: var(--text-sub);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
  flex-shrink: 0;
}
.btn-back:hover { background: var(--border-light); color: var(--primary); }

/* ========================================
   TOPBAR + SIDEBAR
   ======================================== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: white;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-wrap {
  cursor: pointer;
  transition: opacity 0.2s;
}
.avatar-wrap:hover { opacity: 0.8; }

.avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: white;
}

.sidebar {
  position: fixed;
  top: 0; left: -100%;
  width: var(--sidebar-w);
  height: 100%;
  background: var(--bg-sidebar);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: left 0.28s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  padding: 20px 0 20px;
}
.sidebar.open { left: 0; }

.sidebar-brand {
  padding: 8px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-profile {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
}

.sidebar-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.avatar.has-image,
.sidebar-avatar.has-image {
  background: var(--bg);
  overflow: hidden;
}
.avatar img,
.sidebar-avatar img,
.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#sidebar-nickname {
  font-size: 14px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-menu {
  list-style: none;
  flex: 1;
  padding: 0 12px;
}

.sidebar-menu li { margin-bottom: 2px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.menu-item i { width: 18px; text-align: center; font-size: 14px; }
.menu-item:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }
.menu-item.active { background: rgba(212,169,106,0.18); color: var(--accent); font-weight: 600; }

.sidebar-footer {
  padding: 12px 12px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 8px;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { background: rgba(224,82,82,0.15); color: var(--danger); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 290;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

/* ========================================
   PAGE CONTAINER
   ======================================== */
.page-container {
  flex: 1;
  overflow-y: auto;
  padding: calc(var(--topbar-h) + 24px) 16px 80px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.page {
  display: none;
}
.page.active {
  display: block;
  animation: slideUp 0.25s ease;
}

/* ========================================
   TASTE TUNER
   ======================================== */
.tuner-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.tuner-panel,
.tuner-result-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.tuner-result-panel { margin-top: 14px; }

.tuner-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tuner-panel-title i { color: var(--accent); }

.tuner-panel-title h3 {
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
}

.tuner-bean-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.tuner-bean-row select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #FFFCF8;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
  padding: 0 42px 0 14px;
}

#tuner-bean-context,
.tuner-mixer-copy {
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.55;
}

.tuner-mixer-copy {
  margin: -4px 0 12px;
}

.tuner-mixer {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
}

.tuner-channel {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #FFFCF8;
  padding: 15px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: center;
  gap: 10px 14px;
  min-height: 116px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tuner-channel:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196,139,69,0.14);
}

.tuner-channel:nth-child(3n+1) { border-top: 3px solid var(--accent); }
.tuner-channel:nth-child(3n+2) { border-top: 3px solid var(--success); }
.tuner-channel:nth-child(3n) { border-top: 3px solid var(--info); }

.tuner-channel-top {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tuner-channel-top strong {
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tuner-channel-emoji {
  flex: 0 0 auto;
  font-size: 18px;
}

.tuner-slider {
  grid-column: 1 / 3;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  height: 34px;
  accent-color: var(--accent);
  border-radius: 999px;
  appearance: none;
  cursor: pointer;
  touch-action: pan-y;
}

.tuner-slider::-webkit-slider-thumb {
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(107,68,35,0.24);
  cursor: grab;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.tuner-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(107,68,35,0.24);
  cursor: grab;
}

.tuner-slider:active::-webkit-slider-thumb {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(107,68,35,0.32);
}

.tuner-channel-value {
  grid-column: 2;
  grid-row: 1;
  min-width: 72px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(196,139,69,0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.tuner-channel-scale {
  grid-column: 1 / 3;
  grid-row: 3;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.25;
}

.tuner-channel-scale span {
  white-space: nowrap;
}

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

.tuner-adjust-row {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px;
  background: #FFFCF8;
}

.tuner-adjust-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tuner-adjust-values {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 700;
}

.tuner-adjust-values span {
  color: var(--text-sub);
  font-weight: 600;
}

.tuner-adjust-values i {
  color: var(--accent);
  font-size: 12px;
}

.tuner-adjust-values strong { color: var(--primary); }

.tuner-adjust-row p {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.55;
}

.tuner-forecast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.tuner-forecast-block {
  border-left: 3px solid var(--success);
  background: rgba(76,175,125,0.08);
  border-radius: 10px;
  padding: 14px 16px;
}

.tuner-forecast-block.caution {
  border-left-color: var(--warning);
  background: rgba(245,166,35,0.08);
}

.tuner-forecast-block h4 {
  font-size: 13px;
  margin-bottom: 8px;
}

.tuner-forecast-block ul {
  padding-left: 18px;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.7;
}

.tuner-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  .tuner-forecast {
    grid-template-columns: 1fr;
  }
  .tuner-mixer {
    grid-template-columns: 1fr;
  }
  .tuner-result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .tuner-panel,
  .tuner-result-panel {
    padding: 16px;
  }
  .tuner-bean-row {
    grid-template-columns: 1fr;
  }
  .tuner-mixer {
    grid-template-columns: 1fr;
  }
  .tuner-channel {
    min-height: 0;
    padding: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .tuner-channel-top {
    min-height: 0;
  }
  .tuner-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}
