* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
html, body { height: 100%!important; width: 100%!important; overflow: hidden!important; position: fixed!important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background-color: var(--bg-app); color: var(--text-main); line-height: 1.4; -webkit-font-smoothing: antialiased; }
button { background: none; border: none; outline: none; font-family: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; user-select: none; transition: all .2s ease; }
input, select, textarea { background: none; border: none; outline: none; font-family: inherit; color: inherit; }
html, body, #app, * {scrollbar-width: none!important;-ms-overflow-style: none!important;}
::-webkit-scrollbar, *::-webkit-scrollbar { display: none!important; width: 0!important; height: 0!important; background: transparent!important; }

/* ГЛОБАЛЬНЫЙ ХЕЛПЕР СКРЫТИЯ ЭЛЕМЕНТОВ */
.hidden {
  display: none !important;
}

#app { max-width: 520px; margin: 0 auto; padding: 24px 16px 100px; display: flex; flex-direction: column; gap: 24px; height: 100%!important; overflow-y: auto!important; -webkit-overflow-scrolling: touch!important; }

.user-profile-card {
  background-color: #18181a;
  border-radius: 24px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.plate-avatar-wrapper {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border: 2px solid var(--accent-blue);
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-blue), #5AC8FA);
  font-weight: 700;
  font-size: 1.8rem;
  color: #FFF;
}

.user-profile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.user-profile-meta-wrapper { flex: 1; }
.user-name-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.theme-toggle-btn:hover { background: rgba(255, 255, 255, 0.12); }
.theme-toggle-btn:active { transform: scale(0.90); }

.theme-icon-container {
  width: 22px;
  height: 22px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-svg {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-svg.icon-sun { color: #FFCC00; opacity: 1; transform: scale(1) rotate(0deg); }
.theme-svg.icon-moon { color: #0A7AFF; opacity: 0; transform: scale(0.5) rotate(-90deg); }

.light-theme .theme-toggle-btn { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.08); }
.light-theme .theme-svg.icon-sun { opacity: 0; transform: scale(0.5) rotate(90deg); }
.light-theme .theme-svg.icon-moon { opacity: 1; transform: scale(1) rotate(0deg); }

.user-name {
  font-weight: 700; font-size: 1.6rem; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2;
}

.trial-days-left-pill {
  height: 32px; padding: 0 14px; background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-main);
  border-radius: 16px; font-size: 0.85rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer; transition: all 0.2s cubic-bezier(0.15, 0.85, 0.35, 1);
  box-sizing: border-box; white-space: nowrap; line-height: 1;
}

.btn-renew-premium, .btn-referral-plate, .btn-support-plate {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  height: 48px;
  width: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-support-plate {
  background-color: rgba(255, 159, 10, 0.08);
}

.btn-renew-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.renew-text-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
}

.crown-icon, .referral-icon {
  color: var(--accent-blue);
  flex-shrink: 0;
}

.support-icon {
  color: var(--warning-color);
  flex-shrink: 0;
}

.chevron-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.morning-settings-plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 10px 14px;
  width: 100%;
}

.morning-settings-left { display: flex; align-items: center; gap: 10px; }
.morning-icon { color: var(--accent-blue); font-size: 1.4rem; flex-shrink: 0; }
.morning-settings-text { display: flex; flex-direction: column; gap: 2px; }
.morning-title { font-size: 0.88rem; font-weight: 600; color: var(--text-main); line-height: 1.2; }
.morning-sub { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.2; }

.morning-toggle-wrapper { display: flex; align-items: center; gap: 10px; }
.morning-time-picker {
  background: var(--bg-app);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}

.plate-mascot-bubble {
  border-radius: 16px;
  padding: 8px 10px;
  width: 100%;
}

.quote-container { position: relative; width: 100%; }
.quote-symbol { font-size: 2rem; font-weight: 700; color: rgba(255, 255, 255, 0.15); line-height: 1; position: absolute; }
.quote-symbol.open { top: -8px; left: -8px; }
.quote-symbol.close { bottom: -20px; right: -8px; }
.mascot-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.45; margin: 0; padding: 0 16px; }

.section { display: flex; flex-direction: column; gap: 16px; }
.section-header { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.section-header h2 { font-size: 1.35rem; font-weight: 600; color: var(--text-main); }
.icon-my-habits { color: var(--accent-blue); font-size: 1.6rem; }

/* Оверлей остановки реактора (Блокировка по истечении триала) */
.trial-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.trial-lock-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 32px 20px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-lg);
}

.trial-lock-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.trial-lock-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.trial-lock-icon {
  font-size: 3.5rem;
  color: var(--accent-blue);
}
