@import url('https://fonts.googleapis.com/css2?family=Fjalla+One&family=Sora:wght@300;400;500;600;700&display=swap');

:root {
  --red: #c4152b;
  --red-dark: #8f0d1d;
  --silver: #b5b5b5;
  --silver-light: #e7e7e7;
  --charcoal: #1f1f1f;
  --ink: #303030;
  --bg: #f7f7f8;
  --bg-soft: #ededf1;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

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

body {
  font-family: 'Sora', sans-serif;
  background:
    linear-gradient(rgba(248, 248, 250, 0.56), rgba(240, 240, 244, 0.56)),
    url('dnex_background_6.jpg') center center / cover no-repeat fixed;
  color: var(--ink);
  min-height: 100vh;
}

body.locked .site-header {
  filter: none;
  pointer-events: auto;
}

body.locked .main-content,
body.locked .footer {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.access-lock {
  position: fixed;
  top: 96px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245, 245, 248, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.access-lock-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px 28px;
  border: 1px solid rgba(196, 21, 43, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  text-align: center;
  max-width: 360px;
}

.access-lock-card h2 {
  color: var(--red-dark);
  font-size: 20px;
  margin-bottom: 8px;
}

.access-lock-card p {
  color: #555;
  font-size: 14px;
  margin-bottom: 16px;
}

.access-lock-card a {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 248, 250, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(196, 21, 43, 0.08);
}

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

.brand img {
  height: 56px;
  width: auto;
}

.brand .brand-name {
  font-family: 'Fjalla One', sans-serif;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--red-dark);
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
  color: var(--charcoal);
  position: relative;
  padding-bottom: 6px;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--red);
  transition: width 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--red-dark);
}

.site-nav a:hover::after,
.site-nav a:focus::after {
  width: 100%;
}

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

.greeting {
  font-weight: 600;
  color: var(--red-dark);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(196, 21, 43, 0.25);
  background: rgba(255, 255, 255, 0.8);
}

.auth-actions .logout {
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 8px 18px rgba(196, 21, 43, 0.2);
}

.button,
.auth-actions a {
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-actions .ghost {
  color: var(--red-dark);
  border: 1px solid rgba(196, 21, 43, 0.35);
  background: transparent;
}

.auth-actions .primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  box-shadow: 0 10px 25px rgba(196, 21, 43, 0.25);
}

.button:hover,
.auth-actions a:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(196, 21, 43, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
  color: var(--red-dark);
}

.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px 90px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1fr) minmax(180px, 0.7fr);
  gap: 40px;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  position: relative;
}

.home-hero::before {
  content: 'DNEX';
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-family: 'Fjalla One', sans-serif;
  font-size: 120px;
  letter-spacing: 12px;
  color: rgba(196, 21, 43, 0.08);
  pointer-events: none;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cta-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(196, 21, 43, 0.12);
}

.cta-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--red-dark);
}

.cta-card p {
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  margin-bottom: 18px;
}

.cta-card .button {
  display: inline-block;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
}

.cta-card.alt {
  border-color: rgba(181, 181, 181, 0.4);
  background: linear-gradient(135deg, #fff, var(--silver-light));
}

.cta-card.alt .button {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red-dark);
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.logo-frame {
  width: min(360px, 80vw);
  aspect-ratio: 1 / 1;
  background: linear-gradient(145deg, #fff, var(--silver-light));
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.14);
  border: 2px solid rgba(196, 21, 43, 0.1);
}

.logo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tagline {
  font-size: 16px;
  color: #555;
  max-width: 340px;
}

.hero-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-links a {
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(196, 21, 43, 0.3);
  color: var(--red-dark);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-end;
}

.hero-side .info-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(181, 181, 181, 0.45);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
  text-align: right;
}

.hero-side h4 {
  color: var(--red-dark);
  margin-bottom: 8px;
  font-size: 16px;
}

.hero-side p {
  font-size: 13px;
  color: #555;
}

.program-card {
  display: grid;
  gap: 10px;
}

.program-toggle {
  justify-self: end;
  border: 1px solid rgba(196, 21, 43, 0.35);
  border-radius: 999px;
  padding: 7px 14px;
  background: #fff;
  color: var(--red-dark);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.program-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.program-description {
  border-top: 1px dashed rgba(196, 21, 43, 0.25);
  padding-top: 8px;
}

.program-description p {
  font-size: 12px;
  color: #4f4f4f;
  line-height: 1.55;
}

.program-description.is-hidden {
  display: none;
}

.coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  padding: 120px 24px;
}

.coming-soon h1 {
  font-family: 'Fjalla One', sans-serif;
  letter-spacing: 3px;
  font-size: 44px;
  color: var(--red-dark);
}

.coming-soon p {
  color: #555;
}

.footer {
  text-align: center;
  padding: 20px 16px 32px;
  font-size: 12px;
  color: #666;
}

.diva-content {
  align-items: stretch;
}

.diva-layout {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(360px, 2fr);
  gap: 28px;
  min-height: 70vh;
}

.diva-sidebar {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 22px;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.diva-sidebar h3 {
  color: var(--red-dark);
  font-size: 18px;
}

.diva-sidebar .new-chat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(196, 21, 43, 0.35);
  background: rgba(255, 255, 255, 0.8);
  color: var(--red-dark);
  font-weight: 600;
  cursor: pointer;
}

.chat-history {
  display: grid;
  gap: 12px;
  height: 420px;
  max-height: 420px;
  overflow-y: auto;
}

.history-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(181, 181, 181, 0.4);
  background: rgba(245, 245, 248, 0.9);
  font-size: 13px;
  color: #444;
  text-align: left;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}

.history-item.is-active {
  border-color: rgba(196, 21, 43, 0.4);
  background: rgba(196, 21, 43, 0.08);
  color: var(--red-dark);
  font-weight: 600;
}

.history-empty {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(181, 181, 181, 0.5);
  color: #666;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.diva-main {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 26px;
  padding: 28px;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diva-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.diva-logo {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(196, 21, 43, 0.18);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diva-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.diva-title h1 {
  font-family: 'Fjalla One', sans-serif;
  letter-spacing: 3px;
  font-size: 34px;
  color: var(--red-dark);
}

.diva-title p {
  color: #555;
  margin-top: 6px;
}

.diva-chat {
  flex: 1;
  background: linear-gradient(135deg, rgba(247, 247, 248, 0.9), rgba(255, 255, 255, 0.95));
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(181, 181, 181, 0.4);
  display: grid;
  gap: 5px;
  max-height: 420px;
  overflow-y: auto;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 80%;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-bubble.user {
  background: rgba(196, 21, 43, 0.12);
  color: #333;
  margin-left: auto;
}

.chat-bubble.assistant {
  background: #fff;
  border: 1px solid rgba(196, 21, 43, 0.15);
  padding: 12px 16px;
}

.plan-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.plan-action-btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.plan-action-btn:hover {
  opacity: 0.9;
}

.plan-action-btn:active {
  transform: translateY(1px);
}

.plan-action-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

.plan-action-btn.grey {
  background: #6b7280;
  color: #fff;
}

.plan-action-btn.red {
  background: #c4152b;
  color: #fff;
}

.plan-action-status {
  margin-top: 8px;
  font-size: 12px;
  color: #555;
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(196, 21, 43, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
}

.chat-input button,
.chat-input input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
}

.chat-input input {
  flex: 1;
  padding: 8px 6px;
  outline: none;
}

.chat-input .add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(196, 21, 43, 0.1);
  color: var(--red-dark);
  font-weight: 700;
  cursor: pointer;
}

.chat-input-modern {
  border-radius: 999px;
  padding: 10px 16px;
  gap: 12px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
}

.upload-menu-wrapper {
  position: relative;
}

.plus-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(196, 21, 43, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: var(--red-dark);
  font-weight: 700;
  font-size: 22px;
  cursor: pointer;
}

.plus-btn:hover {
  background: rgba(196, 21, 43, 0.08);
}

.upload-menu {
  position: absolute;
  top: 46px;
  left: 0;
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
  display: none;
  min-width: 190px;
  z-index: 5;
}

body.diva-page .diva-layout {
  grid-template-columns: minmax(240px, 0.85fr) minmax(360px, 2fr) !important;
  max-width: 1200px;
}

body.diva-page .diva-sidebar {
  display: flex !important;
}

body.diva-page .diva-main {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 26px;
  padding: 28px;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

body.diva-page .diva-head {
  padding: 0 6px;
}

body.diva-page .diva-chat {
  background: #fff;
  border-radius: 26px;
  padding: 24px;
  border: 1px solid rgba(196, 21, 43, 0.18);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  height: 420px;
  max-height: 420px;
  overflow-y: auto;
}

body.diva-page .chat-bubble {
  font-size: 14px;
  border-radius: 18px;
  word-break: break-word;
}

body.diva-page .chat-bubble.assistant {
  background: #fff;
  border: 1px solid rgba(196, 21, 43, 0.16);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

body.diva-page .chat-bubble.assistant > *:first-child {
  margin-top: 0;
}

body.diva-page .chat-bubble.assistant > *:last-child {
  margin-bottom: 0;
}

body.diva-page .chat-bubble.assistant p {
  margin: 0 0 10px;
  line-height: 1.6;
}

body.diva-page .chat-bubble.assistant h1,
body.diva-page .chat-bubble.assistant h2,
body.diva-page .chat-bubble.assistant h3,
body.diva-page .chat-bubble.assistant h4 {
  margin: 8px 0 10px;
  color: #2c2c2c;
  line-height: 1.3;
}

body.diva-page .chat-bubble.assistant h1 {
  font-size: 22px;
}

body.diva-page .chat-bubble.assistant h2 {
  font-size: 19px;
}

body.diva-page .chat-bubble.assistant h3 {
  font-size: 17px;
}

body.diva-page .chat-bubble.assistant ul,
body.diva-page .chat-bubble.assistant ol {
  margin: 8px 0 12px 20px;
}

body.diva-page .chat-bubble.assistant li {
  margin-bottom: 6px;
  line-height: 1.5;
}

body.diva-page .chat-bubble.assistant code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 12px;
  background: rgba(196, 21, 43, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

body.diva-page .chat-bubble.assistant pre {
  background: #f4f5f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  overflow-x: auto;
  margin: 8px 0 12px;
}

body.diva-page .chat-bubble.assistant pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

body.diva-page .chat-bubble.user {
  background: rgba(196, 21, 43, 0.12);
  border: 1px solid rgba(196, 21, 43, 0.12);
}

body.diva-page .chat-input-modern {
  padding: 12px 18px;
  border: 1px solid rgba(196, 21, 43, 0.22);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
}

body.diva-page .upload-menu-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

body.diva-page .upload-menu-wrapper::after {
  content: '';
  width: 1px;
  height: 28px;
  margin-left: 12px;
  background: rgba(196, 21, 43, 0.15);
}

body.diva-page .chat-input input {
  font-size: 14px;
  color: #444;
}

body.diva-page .chat-input .send-btn {
  padding: 10px 20px;
  font-size: 14px;
}

.upload-menu.active {
  display: grid;
  gap: 6px;
}

.upload-option {
  background: transparent;
  border: none;
  color: #2a2a2a;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-option:hover {
  background: rgba(0, 0, 0, 0.05);
}

.option-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  display: grid;
  place-items: center;
}

.option-icon svg {
  width: 16px;
  height: 16px;
  fill: #333;
}

.about-hero {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: center;
}

.about-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 26px;
  padding: 30px;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: var(--shadow);
}

.about-card h1 {
  font-family: 'Fjalla One', sans-serif;
  letter-spacing: 2px;
  font-size: 40px;
  color: var(--red-dark);
}

.about-card p {
  margin-top: 12px;
  color: #555;
  line-height: 1.7;
}

.about-highlights {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.about-highlight {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(196, 21, 43, 0.1), rgba(181, 181, 181, 0.2));
  border: 1px solid rgba(196, 21, 43, 0.18);
  font-size: 14px;
}

.about-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(196, 21, 43, 0.12), rgba(181, 181, 181, 0.35));
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.14);
  border: 2px solid rgba(196, 21, 43, 0.15);
}

.about-image img {
  width: min(360px, 80vw);
  height: auto;
}

.about-page {
  align-items: stretch;
  padding-top: 40px;
}

.about-hero-clean {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: center;
}

.about-eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-dark);
  font-weight: 600;
}

.about-kicker {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-dark);
  font-weight: 600;
}

.about-copy {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 16px;
}

.about-copy h1 {
  font-family: 'Fjalla One', sans-serif;
  font-size: 38px;
  letter-spacing: 2px;
  color: var(--red-dark);
}

.about-copy p {
  color: #555;
  line-height: 1.7;
}

.about-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.about-list li {
  padding-left: 18px;
  position: relative;
  color: #444;
  font-size: 14px;
}

.about-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  position: absolute;
  left: 0;
  top: 6px;
}

.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.about-pills span {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(196, 21, 43, 0.1);
  border: 1px solid rgba(196, 21, 43, 0.2);
  font-size: 12px;
  font-weight: 600;
  color: var(--red-dark);
}

.about-visual-clean {
  display: grid;
  gap: 16px;
}

.logo-panel {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.logo-panel img {
  width: min(280px, 70vw);
  margin-bottom: 10px;
}

.logo-panel p {
  font-size: 13px;
  color: #555;
}

.mini-panel {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.mini-panel img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(196, 21, 43, 0.2);
  object-fit: cover;
}

.mini-panel h4 {
  color: var(--red-dark);
  font-size: 16px;
  margin-bottom: 4px;
}

.mini-panel p {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

.about-feature-clean {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.about-visual {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.about-visual-card {
  padding: 26px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(196, 21, 43, 0.12), rgba(181, 181, 181, 0.3));
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
  border: 2px solid rgba(196, 21, 43, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-visual-card img {
  width: min(320px, 70vw);
}

.about-visual-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid rgba(196, 21, 43, 0.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  background: #fff;
}

.about-features {
  width: 100%;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.feature-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.06);
}

.feature-card h3 {
  color: var(--red-dark);
  font-size: 16px;
  margin-bottom: 8px;
}

.feature-card p {
  color: #555;
  font-size: 13px;
  line-height: 1.6;
}

.about-standard {
  width: 100%;
}

.standard-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  padding: 22px;
  border: 1px solid rgba(196, 21, 43, 0.15);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
}

.standard-card h3 {
  color: var(--red-dark);
  font-size: 16px;
  margin-bottom: 6px;
}

.standard-card p {
  color: #444;
  font-size: 14px;
}

.about-page {
  align-items: stretch;
  padding-top: 30px;
  gap: 40px;
  justify-content: flex-start;
}

.about-hero-ref {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
  align-items: center;
}

.about-kicker {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #d12b2b;
  font-weight: 700;
}

.about-hero-text h1 {
  font-family: 'Fjalla One', sans-serif;
  font-size: 40px;
  letter-spacing: 1px;
  color: #2a2a2a;
  margin-top: 12px;
}

.about-hero-text p {
  margin-top: 16px;
  color: #555;
  line-height: 1.7;
}

.about-badges-ref {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.about-badges-ref span {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 130, 170, 0.2);
  background: rgba(0, 130, 170, 0.08);
  color: #007a9c;
  font-weight: 600;
  font-size: 12px;
}

.about-hero-visual {
  position: relative;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.hero-blob {
  width: min(420px, 80vw);
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f3f6f9 65%, #e8edf2 100%);
  border-radius: 50% 45% 60% 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 6px solid #f0f3f6;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.hero-blob img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.hero-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border-radius: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(0, 130, 170, 0.2);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.08);
  position: absolute;
  bottom: -20px;
  right: 10%;
}

.hero-card img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(0, 130, 170, 0.2);
  object-fit: cover;
}

.hero-card h4 {
  font-size: 14px;
  color: #2a2a2a;
  margin-bottom: 4px;
}

.hero-card p {
  font-size: 12px;
  color: #555;
}

.hero-inline-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border-radius: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(0, 130, 170, 0.2);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.08);
  width: fit-content;
  margin-top: 12px;
}

.hero-inline-card img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(0, 130, 170, 0.2);
  object-fit: cover;
}

.hero-inline-card h4 {
  font-size: 14px;
  color: #2a2a2a;
  margin-bottom: 4px;
}

.hero-inline-card p {
  font-size: 12px;
  color: #555;
}

.hero-inline-card div {
  display: grid;
  gap: 6px;
}

.about-feature-ref {
  margin-top: 60px;
  background: linear-gradient(135deg, #007f9d, #0590b5);
  border-radius: 26px;
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.feature-illustration {
  position: relative;
  min-height: 240px;
}

.illus-circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  position: absolute;
  top: 0;
  left: 0;
}

.illus-card {
  position: absolute;
  right: 0;
  top: 40px;
  width: 200px;
  height: 140px;
  border-radius: 18px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.15);
}

.illus-screen {
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dfeef3, #f6fbfd);
  margin-bottom: 10px;
}

.illus-lines span {
  display: block;
  height: 6px;
  border-radius: 6px;
  background: #d7e3ea;
  margin-bottom: 6px;
}

.illus-lines span:last-child {
  width: 60%;
}

.illus-orbit {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  position: absolute;
  left: 120px;
  bottom: 0;
}

.feature-grid-ref {
  display: grid;
  gap: 18px;
}

.feature-card-ref {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #fff;
}

.icon-pill {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
  color: #0c7ea0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.feature-card-ref h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.feature-card-ref p {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}



.calendar-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.calendar-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  padding: 26px;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: var(--shadow);
}

.calendar-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.calendar-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.calendar-title h1 {
  font-family: 'Fjalla One', sans-serif;
  font-size: 44px;
  letter-spacing: 2px;
  color: var(--red-dark);
}

.calendar-title span {
  font-weight: 600;
  color: #555;
}

.calendar-brand {
  font-weight: 700;
  color: #444;
  letter-spacing: 1px;
}

.calendar-controls {
  display: flex;
  gap: 10px;
}

.month-btn {
  border: 1px solid rgba(196, 21, 43, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: var(--red-dark);
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.month-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.month-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.calendar-grid-wrapper {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: #fafafb;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(135deg, rgba(196, 21, 43, 0.12), rgba(181, 181, 181, 0.25));
}

.calendar-day {
  color: #333;
  font-weight: 600;
  text-align: center;
  padding: 10px 0;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.calendar-day:last-child {
  border-right: none;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-cell {
  min-height: 78px;
  padding: 10px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.calendar-cell:nth-child(7n) {
  border-right: none;
}

.calendar-cell.empty {
  background: rgba(0, 0, 0, 0.02);
}

.calendar-cell.has-date {
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.calendar-cell.has-date:hover {
  background: rgba(196, 21, 43, 0.08);
}

.calendar-cell.today {
  background: rgba(196, 21, 43, 0.12);
}

.calendar-cell.selected {
  box-shadow: inset 0 0 0 2px rgba(196, 21, 43, 0.6);
}

.calendar-cell.has-plan .calendar-date {
  color: var(--red-dark);
}

.calendar-date {
  font-weight: 600;
  color: #333;
}

.calendar-date.sunday {
  color: var(--red-dark);
}

.calendar-date.holiday {
  color: var(--red);
}

.calendar-note {
  font-size: 11px;
  color: #666;
}

.calendar-status-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #222;
  position: absolute;
  right: 8px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  color: #111;
  z-index: 2;
  pointer-events: none;
}

.calendar-status-dot.yellow {
  background: #ffe300;
}

.calendar-status-dot.green {
  background: #2bff00;
}

.calendar-status-dot.red {
  background: #ff2b2b;
}

.calendar-selected {
  margin-top: 12px;
  font-size: 13px;
  color: #555;
}

.planner-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  padding: 26px;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
}

.planner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.planner-header h2 {
  font-size: 24px;
  color: var(--red-dark);
}

.planner-header p {
  margin-top: 6px;
  color: #555;
  font-size: 14px;
}

.planner-date {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(196, 21, 43, 0.2);
  background: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  color: var(--red-dark);
  font-size: 13px;
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.meal-block {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(181, 181, 181, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  display: grid;
  gap: 10px;
}

.meal-block h3 {
  color: var(--red-dark);
  font-size: 16px;
}

.meal-block textarea {
  min-height: 88px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}

.planner-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #444;
  font-weight: 600;
}

.planner-field input {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
}

.planner-summary {
  display: grid;
  gap: 16px;
}

.planner-panels {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.planner-panel {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  border: 2px solid rgba(196, 21, 43, 0.12);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  display: grid;
  gap: 12px;
  min-height: 100%;
}

.panel-title {
  font-weight: 700;
  color: var(--red-dark);
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.panel-goals {
  border-color: rgba(46, 148, 70, 0.35);
  background: rgba(46, 148, 70, 0.06);
}

.panel-target-day {
  border-color: rgba(39, 102, 189, 0.35);
  background: rgba(39, 102, 189, 0.06);
}

.panel-consumed {
  border-color: rgba(200, 86, 140, 0.35);
  background: rgba(200, 86, 140, 0.06);
}

.panel-actions {
  border-color: rgba(230, 178, 40, 0.45);
  background: rgba(230, 178, 40, 0.08);
}

.panel-actions .planner-actions {
  justify-content: flex-start;
}

.planner-actions-secondary {
  margin-top: 8px;
}

.planner-actions .small {
  padding: 4px 10px;
  min-width: 80px;
  min-height: 30px;
  font-size: 11px;
  border-radius: 14px;
}

.planner-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.planner-actions .primary,
.planner-actions .secondary {
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  min-width: 102px;
  min-height: 38px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.panel-actions .planner-actions .primary,
.panel-actions .planner-actions .secondary {
  padding: 6px 14px;
  font-size: 13px;
}

.planner-actions .secondary {
  background: #fff;
  border: 1px solid rgba(196, 21, 43, 0.35);
  color: var(--red-dark);
}

.planner-actions .primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  box-shadow: 0 10px 25px rgba(196, 21, 43, 0.25);
}

.planner-actions .primary:hover,
.planner-actions .secondary:hover {
  transform: translateY(-1px);
}

.planner-actions .primary:active,
.planner-actions .secondary:active {
  transform: scale(0.97);
}

.planner-actions .primary:disabled,
.planner-actions .secondary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.planner-actions .primary.is-busy,
.planner-actions .secondary.is-busy {
  position: relative;
  padding-left: 28px;
}

.planner-actions .primary.is-busy::before,
.planner-actions .secondary.is-busy::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  animation: planner-spin 0.65s linear infinite;
}

@keyframes planner-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.calendar-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 24px;
}

.mini-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.mini-card h3 {
  font-size: 16px;
  color: var(--red-dark);
  margin-bottom: 10px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  font-size: 11px;
  text-align: center;
}

.mini-grid span {
  padding: 4px 0;
  border-radius: 6px;
  color: #444;
}

.mini-grid .mini-head {
  font-weight: 600;
  color: #666;
}

.mini-grid .mini-sun {
  color: var(--red-dark);
  font-weight: 600;
}

.chat-input .send-btn {
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.chat-bubble.typing {
  font-style: italic;
  color: #666;
}

.goal-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.goal-header h1 {
  font-family: 'Fjalla One', sans-serif;
  letter-spacing: 2px;
  font-size: 40px;
  color: var(--red-dark);
}

.goal-header p {
  color: #555;
  margin-top: 8px;
}

body.modal-open {
  overflow: hidden;
}

.goal-program-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 24, 0.55);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  z-index: 70;
  padding: 18px;
}

.goal-program-modal.is-hidden {
  display: none;
}

.goal-program-dialog {
  width: min(860px, 96vw);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(196, 21, 43, 0.22);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
  padding: 22px;
  display: grid;
  gap: 14px;
}

.goal-program-dialog h2 {
  font-family: 'Fjalla One', sans-serif;
  letter-spacing: 1px;
  font-size: 32px;
  color: var(--red-dark);
}

.goal-program-subtitle {
  color: #555;
  font-size: 14px;
}

.goal-program-lang {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.goal-lang-btn {
  border: 1px solid rgba(196, 21, 43, 0.35);
  border-radius: 999px;
  padding: 7px 14px;
  background: #fff;
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.goal-lang-btn.is-active {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  border-color: transparent;
}

.goal-program-list {
  display: grid;
  gap: 10px;
}

.goal-program-item {
  border: 1px solid rgba(196, 21, 43, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(196, 21, 43, 0.05), rgba(181, 181, 181, 0.08));
}

.goal-program-item h3 {
  color: var(--red-dark);
  font-size: 16px;
  margin-bottom: 6px;
}

.goal-program-item p {
  color: #3f3f3f;
  font-size: 13px;
  line-height: 1.5;
}

.goal-program-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #333;
  font-weight: 600;
}

.goal-program-check input {
  accent-color: var(--red);
}

.goal-program-actions {
  display: flex;
  justify-content: flex-end;
}

.goal-program-actions .primary {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  cursor: pointer;
}

.form-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(181, 181, 181, 0.45);
}

.form-section + .form-section {
  margin-top: 26px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--red-dark);
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #444;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(196, 21, 43, 0.2);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(196, 21, 43, 0.35);
  background: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  cursor: pointer;
}

.tag input {
  accent-color: var(--red);
}

.details-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.detail-field label {
  font-size: 13px;
  color: #444;
  margin-bottom: 6px;
  display: block;
}

.detail-field {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(196, 21, 43, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 247, 248, 0.95));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.detail-field textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 12px;
  border: 1px solid rgba(196, 21, 43, 0.2);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.detail-field textarea:focus {
  outline: none;
  border-color: rgba(196, 21, 43, 0.55);
  box-shadow: 0 0 0 3px rgba(196, 21, 43, 0.15);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}

.form-actions button {
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.form-actions button:active {
  transform: translateY(0);
}

.form-actions .secondary {
  background: transparent;
  border: 1px solid rgba(196, 21, 43, 0.4);
  color: var(--red-dark);
}

.form-actions .primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  border: none;
}

.auth-wrapper {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  padding: 30px;
  border: 1px solid rgba(196, 21, 43, 0.12);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.auth-card h1 {
  font-family: 'Fjalla One', sans-serif;
  color: var(--red-dark);
  letter-spacing: 2px;
  font-size: 34px;
}

.auth-card p {
  color: #555;
  margin-bottom: 6px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-link {
  font-size: 13px;
}

.auth-link a {
  color: var(--red-dark);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 24px;
  }

  .site-nav,
  .auth-actions {
    width: 100%;
    justify-content: center;
  }

  .main-content {
    padding: 40px 24px 70px;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero::before {
    display: none;
  }

  .hero-side {
    align-items: center;
    text-align: center;
  }

  .diva-layout {
    grid-template-columns: 1fr;
  }

  body.diva-page .diva-layout {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  .calendar-mini {
    grid-template-columns: 1fr;
  }

  .planner-grid,
  .planner-panels {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand img {
    height: 42px;
  }

  .brand .brand-name {
    font-size: 16px;
    letter-spacing: 1.4px;
  }

  .site-nav,
  .auth-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    display: none;
  }

  .site-header.open .site-nav,
  .site-header.open .auth-actions {
    display: flex;
  }

  .site-nav a {
    padding: 10px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    text-align: center;
  }

  .auth-actions a,
  .auth-actions .logout,
  .greeting {
    text-align: center;
    justify-content: center;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .main-content {
    padding: 24px 14px 60px;
  }

  .footer {
    padding: 18px 12px 28px;
  }

  .logo-frame {
    width: min(300px, 85vw);
  }

  .hero-card {
    position: static;
    width: 100%;
  }

  .about-feature-ref {
    padding: 24px;
  }

  /* Diva */
  body.diva-page .diva-layout {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  body.diva-page .diva-main {
    padding: 16px;
    border-radius: 20px;
    gap: 14px;
  }

  body.diva-page .diva-chat {
    padding: 14px;
    height: 52vh;
    max-height: 52vh;
    border-radius: 18px;
  }

  .chat-history {
    height: auto;
    max-height: 220px;
  }

  .chat-bubble {
    max-width: 92%;
    font-size: 14px;
  }

  body.diva-page .chat-input-modern {
    padding: 8px 12px;
    gap: 8px;
  }

  body.diva-page .chat-input input {
    font-size: 16px;
  }

  body.diva-page .chat-input .send-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Calendar */
  .calendar-card,
  .planner-card {
    padding: 16px;
    border-radius: 20px;
  }

  .calendar-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .calendar-title h1 {
    font-size: 30px;
    letter-spacing: 1.5px;
  }

  .calendar-controls {
    justify-content: flex-end;
  }

  .calendar-day {
    padding: 6px 0;
    font-size: 11px;
  }

  .calendar-cell {
    min-height: 54px;
    padding: 6px 4px;
    font-size: 12px;
    gap: 3px;
  }

  .calendar-status-dot {
    width: 16px;
    height: 16px;
    right: 4px;
    top: 4px;
    font-size: 10px;
    border-width: 1.5px;
  }

  .calendar-note {
    font-size: 10px;
  }

  .planner-header {
    gap: 10px;
  }

  .planner-header h2 {
    font-size: 20px;
  }

  .planner-grid,
  .planner-panels {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .meal-block {
    padding: 14px;
  }

  .meal-block textarea {
    min-height: 72px;
  }

  .planner-actions {
    justify-content: stretch;
    gap: 8px;
  }

  .planner-actions .primary,
  .planner-actions .secondary {
    flex: 1 1 140px;
    min-width: 0;
  }

  /* Goal */
  .goal-header h1 {
    font-size: 28px;
    letter-spacing: 1.5px;
  }

  .form-card {
    padding: 20px;
    border-radius: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: 16px;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions button {
    flex: 1 1 140px;
    padding: 12px 18px;
  }

  .goal-program-dialog {
    width: min(640px, 94vw);
    max-height: 90vh;
    padding: 18px;
  }

  .goal-program-dialog h2 {
    font-size: 24px;
  }

  .goal-program-actions {
    justify-content: stretch;
  }

  .goal-program-actions .primary {
    flex: 1;
  }

  /* Auth */
  .auth-card {
    padding: 24px 20px;
    border-radius: 22px;
  }

  /* Access lock overlay */
  .access-lock {
    top: 0;
    padding: 20px;
  }

  .access-lock-card {
    padding: 20px 22px;
  }

  /* Plan action buttons in diva bubble */
  .plan-action-btn {
    font-size: 13px;
    padding: 12px 14px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 10px 12px;
    gap: 8px;
  }

  .brand img {
    height: 36px;
  }

  .brand .brand-name {
    font-size: 14px;
    letter-spacing: 1.2px;
  }

  .nav-toggle {
    padding: 6px 10px;
    font-size: 13px;
  }

  .main-content {
    padding: 18px 10px 52px;
  }

  /* Calendar compact */
  .calendar-card,
  .planner-card {
    padding: 12px;
    border-radius: 16px;
  }

  .calendar-title {
    flex-wrap: wrap;
    gap: 8px;
  }

  .calendar-title h1 {
    font-size: 24px;
  }

  .calendar-title span {
    font-size: 13px;
  }

  .month-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .calendar-day {
    padding: 4px 0;
    font-size: 10px;
  }

  .calendar-cell {
    min-height: 44px;
    padding: 4px 2px;
    font-size: 11px;
    gap: 2px;
  }

  .calendar-status-dot {
    width: 12px;
    height: 12px;
    right: 2px;
    top: 2px;
    font-size: 0;
    border-width: 1.5px;
  }

  .calendar-note {
    display: none;
  }

  .calendar-selected {
    font-size: 12px;
  }

  .planner-header {
    flex-direction: column;
    align-items: stretch;
  }

  .planner-header h2 {
    font-size: 18px;
  }

  .planner-header p {
    font-size: 12px;
  }

  .planner-date {
    font-size: 12px;
    padding: 6px 10px;
    align-self: flex-start;
  }

  .meal-block {
    padding: 12px;
    border-radius: 14px;
  }

  .meal-block h3 {
    font-size: 15px;
  }

  .meal-block textarea {
    min-height: 64px;
    font-size: 13px;
  }

  .planner-field input {
    font-size: 14px;
  }

  .planner-panel {
    padding: 14px;
  }

  .planner-actions .primary,
  .planner-actions .secondary {
    flex: 1 1 100%;
  }

  /* Mini calendar cards */
  .mini-card {
    padding: 14px;
    border-radius: 14px;
  }

  .mini-grid {
    font-size: 10px;
    gap: 4px;
  }

  /* Diva chat */
  body.diva-page .diva-main {
    padding: 12px;
    border-radius: 18px;
  }

  body.diva-page .diva-chat {
    padding: 10px;
    height: 55vh;
    max-height: 55vh;
    border-radius: 16px;
  }

  .chat-history {
    max-height: 180px;
  }

  body.diva-page .chat-bubble {
    max-width: 94%;
    font-size: 13px;
  }

  body.diva-page .chat-input-modern {
    padding: 6px 10px;
  }

  /* Goal */
  .goal-header h1 {
    font-size: 24px;
  }

  .goal-header p {
    font-size: 13px;
  }

  .form-card {
    padding: 16px;
  }

  .goal-program-dialog {
    padding: 14px;
    border-radius: 18px;
  }

  .goal-program-dialog h2 {
    font-size: 20px;
  }

  .goal-program-item {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .goal-program-item h3 {
    font-size: 14px;
  }

  .goal-program-item p {
    font-size: 12px;
  }

  /* Auth */
  .auth-card {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .auth-card h1 {
    font-size: 22px;
  }

  /* Coming soon / about */
  .coming-soon {
    padding: 60px 16px;
  }

  .coming-soon h1 {
    font-size: 32px;
    letter-spacing: 2px;
  }

  /* Access lock */
  .access-lock-card {
    padding: 18px 18px;
    max-width: 94vw;
  }

  .access-lock-card h2 {
    font-size: 18px;
  }
}

/* Camera capture modal */
.camera-modal[hidden] {
  display: none !important;
}
.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 10, 14, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.camera-modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.camera-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f0e4e6;
}
.camera-modal-header h3 {
  margin: 0;
  color: var(--red, #c4152b);
  font-size: 18px;
  font-weight: 700;
}
.camera-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #777;
  padding: 0 6px;
}
.camera-close:hover {
  color: var(--red, #c4152b);
}
.camera-stage {
  position: relative;
  background: #000;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.camera-stage video,
.camera-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.camera-error {
  position: absolute;
  inset: 0;
  padding: 20px;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
}
.camera-controls {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.camera-controls button {
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.camera-controls .primary {
  background: var(--red, #c4152b);
  color: #fff;
}
.camera-controls .primary:hover {
  background: var(--red-dark, #8f0d1d);
}
.camera-controls .secondary {
  background: #ececec;
  color: #333;
}
.camera-controls .secondary:hover {
  background: #dedede;
}
.camera-controls button[hidden] {
  display: none !important;
}
@media (max-width: 480px) {
  .camera-modal {
    padding: 10px;
  }
  .camera-modal-content {
    border-radius: 12px;
  }
  .camera-controls {
    padding: 10px 12px;
    gap: 8px;
  }
  .camera-controls button {
    flex: 1 1 40%;
    padding: 10px 12px;
  }
}

/* Food details popup (after capture/upload) */
.food-details-modal[hidden] {
  display: none !important;
}
.food-details-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(20, 10, 14, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.food-details-content {
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 92vh;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.food-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f0e4e6;
}
.food-details-header h3 {
  margin: 0;
  color: var(--red, #c4152b);
  font-size: 18px;
  font-weight: 700;
}
.food-details-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#food-details-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
  display: block;
}
.food-details-body .form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #555;
  font-weight: 600;
}
.food-details-body select,
.food-details-body textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #e1d7d9;
  border-radius: 8px;
  color: #222;
  background: #fff;
  font-weight: 400;
}
.food-details-body textarea {
  min-height: 72px;
  resize: vertical;
}
.food-details-body select:focus,
.food-details-body textarea:focus {
  outline: none;
  border-color: var(--red, #c4152b);
  box-shadow: 0 0 0 3px rgba(196, 21, 43, 0.15);
}
.food-details-controls {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #f0e4e6;
  justify-content: flex-end;
}
.food-details-controls button {
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.food-details-controls .primary {
  background: var(--red, #c4152b);
  color: #fff;
}
.food-details-controls .primary:hover {
  background: var(--red-dark, #8f0d1d);
}
.food-details-controls .secondary {
  background: #ececec;
  color: #333;
}
.food-details-controls .secondary:hover {
  background: #dedede;
}
@media (max-width: 480px) {
  .food-details-modal {
    padding: 10px;
  }
  .food-details-content {
    border-radius: 12px;
  }
  .food-details-body {
    padding: 12px 14px;
    gap: 10px;
  }
  #food-details-preview {
    max-height: 160px;
  }
  .food-details-controls {
    padding: 10px 14px;
  }
  .food-details-controls button {
    flex: 1 1 40%;
    padding: 10px 12px;
  }
}
