/* ==========================================================================
   HappyLog - Core Design System & Styling
   ========================================================================== */

:root {
  /* Color Palette - Light Mode (Warm, Comforting & Uplifting) */
  --bg-primary: #FAF7F2;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-input: #FFFFFF;
  --border-subtle: rgba(215, 204, 190, 0.45);
  --border-hover: rgba(180, 160, 140, 0.6);
  --border-focus: #F59E0B;

  --text-main: #2D2721;
  --text-muted: #73695E;
  --text-light: #9B9185;

  /* Category Identity Colors */
  --color-my-happy: #FF6584;
  --color-my-happy-bg: rgba(255, 101, 132, 0.08);
  --color-my-happy-border: rgba(255, 101, 132, 0.28);

  --color-your-happy: #10B981;
  --color-your-happy-bg: rgba(16, 185, 129, 0.08);
  --color-your-happy-border: rgba(16, 185, 129, 0.28);

  --color-self-praise: #F59E0B;
  --color-self-praise-bg: rgba(245, 158, 11, 0.09);
  --color-self-praise-border: rgba(245, 158, 11, 0.32);

  --color-notes: #8B5CF6;
  --color-notes-bg: rgba(139, 92, 246, 0.08);
  --color-notes-border: rgba(139, 92, 246, 0.28);

  /* Primary Accent & Action Colors */
  --primary: #F59E0B;
  --primary-hover: #D97706;
  --primary-gradient: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
  --primary-text: #FFFFFF;

  --secondary: #10B981;
  --secondary-hover: #059669;

  /* Ambient Glow Colors */
  --glow-1: rgba(254, 215, 170, 0.55);
  --glow-2: rgba(254, 205, 211, 0.55);
  --glow-3: rgba(187, 247, 208, 0.45);

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(90, 70, 50, 0.04);
  --shadow-md: 0 8px 24px rgba(90, 70, 50, 0.06), 0 2px 6px rgba(90, 70, 50, 0.03);
  --shadow-lg: 0 16px 36px rgba(90, 70, 50, 0.09), 0 4px 12px rgba(90, 70, 50, 0.05);
  --shadow-focus: 0 0 0 3px rgba(245, 158, 11, 0.2);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Typography */
  --font-family-sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-display: 'Outfit', 'Noto Sans JP', sans-serif;

  /* Transitions */
  --transition-fast: 0.16s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode / Cozy Evening Theme */
[data-theme="dark"] {
  --bg-primary: #151311;
  --bg-card: rgba(29, 26, 23, 0.85);
  --bg-card-hover: rgba(35, 31, 27, 0.95);
  --bg-input: #201C19;
  --border-subtle: rgba(255, 240, 220, 0.09);
  --border-hover: rgba(255, 240, 220, 0.18);
  --border-focus: #FBBF24;

  --text-main: #F3EFEA;
  --text-muted: #B5ACA1;
  --text-light: #7E756A;

  --color-my-happy-bg: rgba(255, 101, 132, 0.15);
  --color-your-happy-bg: rgba(16, 185, 129, 0.15);
  --color-self-praise-bg: rgba(245, 158, 11, 0.15);
  --color-notes-bg: rgba(139, 92, 246, 0.15);

  --glow-1: rgba(180, 83, 9, 0.25);
  --glow-2: rgba(190, 24, 93, 0.2);
  --glow-3: rgba(4, 120, 87, 0.2);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  -webkit-font-smoothing: antialiased;
}

/* Ambient Glowing Background Orbs */
.app-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.7;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: var(--glow-1);
  top: -80px;
  left: -80px;
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: var(--glow-2);
  top: 40%;
  right: -100px;
  animation-duration: 22s;
  animation-delay: -5s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: var(--glow-3);
  bottom: -60px;
  left: 30%;
  animation-duration: 25s;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.08); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ==========================================================================
   Layout Container
   ========================================================================== */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  transition: all var(--transition-normal);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  font-size: 2rem;
  display: inline-block;
  animation: pulseGentle 3s ease-in-out infinite;
}

@keyframes pulseGentle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.brand-title {
  font-family: var(--font-family-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Profile Chip */
.profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.profile-chip:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.profile-avatar {
  font-size: 1.05rem;
}

.edit-badge {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-left: 2px;
}

/* Icon Button */
.icon-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  transform: translateY(-1px) rotate(10deg);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Main Grid Layout
   ========================================================================== */
.main-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Card Shell */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  border-color: var(--border-hover);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.title-indicator {
  font-size: 1.3rem;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Date Navigator */
.date-navigator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  padding: 4px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}

.nav-date-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-date-btn:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}

.date-input {
  border: none;
  background: transparent;
  font-family: var(--font-family-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  padding: 2px 4px;
  outline: none;
}

.chip-btn {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.chip-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* ==========================================================================
   Diary Form
   ========================================================================== */
.diary-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-input);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.form-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
  transform: translateY(-1px);
}

.group-my-happy:focus-within { border-color: var(--color-my-happy); box-shadow: 0 0 0 3px var(--color-my-happy-bg); }
.group-your-happy:focus-within { border-color: var(--color-your-happy); box-shadow: 0 0 0 3px var(--color-your-happy-bg); }
.group-self-praise:focus-within { border-color: var(--color-self-praise); box-shadow: 0 0 0 3px var(--color-self-praise-bg); }
.group-notes:focus-within { border-color: var(--color-notes); box-shadow: 0 0 0 3px var(--color-notes-bg); }

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  cursor: pointer;
}

.label-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-my-happy {
  background: var(--color-my-happy-bg);
  color: var(--color-my-happy);
  border: 1px solid var(--color-my-happy-border);
}

.badge-your-happy {
  background: var(--color-your-happy-bg);
  color: var(--color-your-happy);
  border: 1px solid var(--color-your-happy-border);
}

.badge-self-praise {
  background: var(--color-self-praise-bg);
  color: var(--color-self-praise);
  border: 1px solid var(--color-self-praise-border);
}

.badge-notes {
  background: var(--color-notes-bg);
  color: var(--color-notes);
  border: 1px solid var(--color-notes-border);
}

.label-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 60px;
  outline: none;
  padding: 2px 0;
}

.form-textarea::placeholder {
  color: var(--text-light);
  font-size: 0.88rem;
}

/* Share Setting Switch */
.share-setting-row {
  padding: 12px 16px;
  background: var(--color-your-happy-bg);
  border: 1px dashed var(--color-your-happy-border);
  border-radius: var(--radius-md);
  margin-top: 4px;
}

.switch-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: var(--border-subtle);
  border-radius: var(--radius-pill);
  transition: background-color var(--transition-fast);
  flex-shrink: 0;
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch-input:checked + .switch-slider {
  background-color: var(--secondary);
}

.switch-input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.switch-label-text {
  display: flex;
  flex-direction: column;
}

.switch-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.switch-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Form Buttons */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

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

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--color-self-praise-bg);
  border-color: var(--color-self-praise-border);
  transform: translateY(-1px);
  color: var(--color-self-praise);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}

/* ==========================================================================
   History Section
   ========================================================================== */
.badge-count {
  font-family: var(--font-family-display);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-self-praise-bg);
  color: var(--color-self-praise);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.filter-tab {
  background: transparent;
  border: none;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tab.active {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.history-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  margin-bottom: 16px;
  transition: border-color var(--transition-fast);
}

.history-search-bar:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.search-icon {
  font-size: 0.95rem;
  color: var(--text-light);
}

#history-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.88rem;
  color: var(--text-main);
  width: 100%;
}

.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.search-clear-btn:hover {
  color: var(--text-main);
}

/* Entries List */
.entries-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbar */
.entries-list::-webkit-scrollbar {
  width: 6px;
}
.entries-list::-webkit-scrollbar-thumb {
  background-color: var(--border-subtle);
  border-radius: var(--radius-pill);
}

/* Entry Item Card */
.entry-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  animation: fadeIn 0.3s ease;
}

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

.entry-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.entry-card.is-active-editing {
  border-color: var(--color-self-praise);
  box-shadow: 0 0 0 2px var(--color-self-praise-bg);
}

.entry-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entry-date-badge {
  font-family: var(--font-family-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.entry-day-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}

.entry-shared-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--secondary);
  background: var(--color-your-happy-bg);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-your-happy-border);
}

.entry-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.entry-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.entry-action-btn:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}

.entry-action-btn.btn-delete:hover {
  background: var(--color-my-happy-bg);
  color: var(--color-my-happy);
}

.entry-blocks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entry-block {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.entry-block-label {
  font-size: 0.75rem;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
  letter-spacing: 0.02em;
}

.entry-block.block-my-happy {
  background: var(--color-my-happy-bg);
  border-left: 3px solid var(--color-my-happy);
}
.entry-block.block-my-happy .entry-block-label { color: var(--color-my-happy); }

.entry-block.block-your-happy {
  background: var(--color-your-happy-bg);
  border-left: 3px solid var(--color-your-happy);
}
.entry-block.block-your-happy .entry-block-label { color: var(--color-your-happy); }

.entry-block.block-self-praise {
  background: var(--color-self-praise-bg);
  border-left: 3px solid var(--color-self-praise);
}
.entry-block.block-self-praise .entry-block-label { color: var(--color-self-praise); }

.entry-block.block-notes {
  background: var(--color-notes-bg);
  border-left: 3px solid var(--color-notes);
}
.entry-block.block-notes .entry-block-label { color: var(--color-notes); }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-icon {
  font-size: 3rem;
  animation: pulseGentle 3s ease-in-out infinite;
}

.empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.empty-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 320px;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.share-modal-card {
  max-width: 540px;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

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

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.share-preview-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
  border-left: 4px solid var(--color-self-praise);
}

.share-options-block {
  margin-top: 8px;
}

.share-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--text-main);
  color: var(--bg-primary);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.3s ease 2.7s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.hidden {
  display: none !important;
}
