:root {
  --bg: #0a0a0c;
  --bg-soft: #111116;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #f7f7fb;
  --muted: #b4b8c7;
  --muted-soft: #8b91a7;
  --primary: #ff7a18;
  --primary-soft: rgba(255, 122, 24, 0.14);
  --primary-strong: #ff9a4b;
  --danger: #ff5a67;
  --success: #59d7a1;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 24, 0.16), transparent 34%),
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.06), transparent 22%),
    linear-gradient(180deg, #09090b 0%, #0f1014 100%);
  color: var(--text);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
}

.hidden {
  display: none !important;
}

.site-shell {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.section {
  padding: 38px 0;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: 100%;
  margin: 18px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  background: rgba(10, 10, 12, 0.72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--shadow);
}

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

.brand h1,
.sidebar-brand h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.14em;
}

.brand-kicker {
  margin: 0;
  color: var(--muted-soft);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #101014;
  background: linear-gradient(145deg, #ffb16d 0%, #ff7a18 48%, #ff4f0f 100%);
  box-shadow: 0 14px 30px rgba(255, 122, 24, 0.35);
}

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

.topnav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.mobile-menu-btn {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.04);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-btn span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 0.92rem 1.2rem;
  transition: 0.2s ease;
  font-weight: 600;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

.btn-large {
  padding: 1rem 1.35rem;
}

.btn-primary {
  background: linear-gradient(145deg, #ff9a4b 0%, #ff7a18 58%, #ff5911 100%);
  color: #141414;
  box-shadow: 0 14px 30px rgba(255, 122, 24, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--surface-border);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--surface-border);
}

.text-btn {
  border: none;
  background: transparent;
  color: var(--primary-strong);
  font-weight: 600;
  padding: 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 32px;
  min-height: calc(100vh - 130px);
}

.pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 122, 24, 0.25);
  background: rgba(255, 122, 24, 0.1);
  color: #ffd0ac;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
}

.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 4vw, 4.55rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p,
.section-heading p,
.preview-card p,
.feature-card p,
.experience-row span,
.flow-list span,
.panel-card p,
.help-text,
.summary-item span,
.stat-card small,
.preview-card p,
.profile-value,
.empty-state-large,
.empty-state-small {
  color: var(--muted);
}

.hero-copy > p {
  max-width: 62ch;
  font-size: 1.04rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hero-metrics article,
.stat-card,
.feature-card,
.preview-card,
.panel-card,
.experience-panel,
.hero-card,
.sidebar,
.modal-dialog {
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-metrics article,
.feature-card,
.preview-card,
.stat-card,
.panel-card {
  border-radius: var(--radius-lg);
  padding: 20px;
}

.hero-metrics strong,
.summary-item strong,
.stat-card strong,
.feature-card h4,
.preview-card h4,
.panel-card h4,
.section-heading h3,
.cta-strip h3,
.modal-header-sticky h3 {
  display: block;
  margin-bottom: 8px;
}

.hero-metrics strong,
.summary-item strong,
.feature-card h4,
.preview-card h4,
.panel-card h4,
.modal-header-sticky h3 {
  font-size: 1.05rem;
}

.card-glow {
  position: relative;
  overflow: hidden;
}

.card-glow::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 122, 24, 0.18), transparent 72%);
  pointer-events: none;
}

.hero-card {
  border-radius: var(--radius-xl);
  padding: 26px;
}

.hero-card-top,
.panel-card-header,
.app-header,
.experience-row,
.history-item-header,
.goal-item-top,
.modal-header-sticky {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hero-card-top p,
.mini-label,
.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 8px rgba(89, 215, 161, 0.14);
}

.hero-card-grid,
.summary-grid,
.dashboard-grid,
.preview-grid,
.feature-grid {
  display: grid;
  gap: 16px;
}

.hero-card-grid,
.summary-grid,
.dashboard-grid,
.preview-grid {
  grid-template-columns: repeat(2, 1fr);
}

.hero-card-grid article,
.summary-item {
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-log-preview {
  margin-top: 20px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.section-heading {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 28px;
}

.align-left {
  text-align: left;
  margin-left: 0;
}

.section-heading h3,
.cta-strip h3 {
  margin: 12px 0;
  font-size: clamp(1.8rem, 3vw, 2.9rem);
  line-height: 1.08;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: #161616;
  font-weight: 800;
  background: linear-gradient(145deg, #ffb16d 0%, #ff7a18 55%, #ff5911 100%);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: start;
}

.flow-list {
  display: grid;
  gap: 16px;
  padding-left: 20px;
}

.flow-list li {
  padding-left: 8px;
}

.flow-list strong {
  display: block;
  margin-bottom: 6px;
}

.experience-panel {
  border-radius: var(--radius-xl);
  padding: 22px;
}

.experience-row {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.experience-row:last-child {
  border-bottom: none;
}

.preview-grid {
  grid-template-columns: repeat(4, 1fr);
}

.cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  border-radius: var(--radius-xl);
  padding: 30px;
  border: 1px solid rgba(255, 122, 24, 0.18);
  background: linear-gradient(145deg, rgba(255, 122, 24, 0.08), rgba(255, 255, 255, 0.03));
}

.app-view {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 22px;
  padding-top: 24px;
}

.sidebar {
  border-radius: 26px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 112px);
  position: sticky;
  top: 108px;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.nav-link {
  width: 100%;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 600;
}

.nav-link.active {
  background: rgba(255, 122, 24, 0.12);
  color: #ffd0ac;
  border-color: rgba(255, 122, 24, 0.2);
}

.sidebar-footer {
  margin-top: auto;
}

.app-main {
  display: grid;
  gap: 20px;
}

.app-header {
  padding: 4px 0;
}

.app-header h3 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 2.8vw, 2.8rem);
}

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

.dashboard-content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 18px;
}

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

.activity-item,
.history-item,
.goal-item {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.activity-item {
  padding: 14px 16px;
}

.activity-item strong,
.goal-item strong,
.history-item strong {
  display: block;
  margin-bottom: 6px;
}

.segmented-control {
  display: inline-flex;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.segment {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.68rem 1rem;
  border-radius: 999px;
  font-weight: 700;
}

.segment.active {
  background: linear-gradient(145deg, #ff9a4b 0%, #ff7a18 60%, #ff5911 100%);
  color: #161616;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-label {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select option {
  color: #111;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(255, 122, 24, 0.35);
  box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.manual-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.profile-grid {
  margin-top: 8px;
}

.profile-card-mini {
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-label {
  display: block;
  color: var(--muted-soft);
  font-size: 0.82rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.profile-value {
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
}

.full-span {
  grid-column: 1 / -1;
}

.form-actions,
.journal-actions,
.history-tools,
.goal-grid-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.history-tools {
  align-items: center;
}

.goal-form {
  display: grid;
  gap: 16px;
}

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

.history-list,
.goals-list {
  display: grid;
  gap: 14px;
}

.history-item,
.goal-item {
  padding: 16px;
}

.history-item-header {
  margin-bottom: 14px;
}

.history-meta,
.goal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  font-size: 0.82rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.goal-progress-wrap {
  margin-top: 14px;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(145deg, #ffb16d 0%, #ff7a18 58%, #ff5911 100%);
}

.progress-info {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.goal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.goal-update-input {
  max-width: 180px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 8, 0.8);
  backdrop-filter: blur(14px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: min(540px, calc(100% - 24px));
  border-radius: 28px;
  padding: 24px;
}

.modal-large {
  width: min(980px, calc(100% - 24px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.5rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.auth-tab {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 0.86rem 1rem;
  font-weight: 700;
}

.auth-tab.active {
  background: rgba(255, 122, 24, 0.12);
  color: #ffd0ac;
  border-color: rgba(255, 122, 24, 0.2);
}

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

.modal-header-sticky {
  position: sticky;
  top: -24px;
  z-index: 2;
  padding: 8px 0 18px;
  background: linear-gradient(180deg, rgba(19, 19, 24, 0.98) 0%, rgba(19, 19, 24, 0.92) 100%);
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  padding-top: 18px;
  background: linear-gradient(180deg, rgba(19, 19, 24, 0) 0%, rgba(19, 19, 24, 0.98) 30%);
}

.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 80;
}

.toast {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 15, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  min-width: 260px;
}

.toast.success {
  border-color: rgba(89, 215, 161, 0.22);
}

.toast.error {
  border-color: rgba(255, 90, 103, 0.22);
}

.empty-state-large,
.empty-state-small {
  padding: 14px 0;
}

@media (max-width: 1180px) {
  .hero,
  .split-section,
  .app-view,
  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .topbar {
    border-radius: 28px;
    align-items: flex-start;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .topnav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
  }

  .topnav.open {
    display: flex;
  }

  .hero-metrics,
  .feature-grid,
  .preview-grid,
  .manual-grid,
  .profile-grid,
  .goal-grid-row,
  .hero-card-grid,
  .summary-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .cta-strip,
  .app-header,
  .panel-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(var(--container), calc(100% - 18px));
  }

  .topbar {
    margin-top: 10px;
    padding: 12px;
  }

  .section {
    padding: 28px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 16px;
  }

  .hero-card,
  .panel-card,
  .feature-card,
  .preview-card,
  .stat-card,
  .modal-dialog,
  .cta-strip,
  .sidebar {
    border-radius: 22px;
  }

  .app-header h3,
  .section-heading h3,
  .cta-strip h3,
  .hero h2 {
    line-height: 1.1;
  }

  .form-actions,
  .journal-actions,
  .history-tools,
  .app-header-actions {
    width: 100%;
  }

  .btn,
  .text-btn,
  .history-tools input,
  .goal-update-input {
    width: 100%;
  }

  .goal-actions {
    flex-direction: column;
  }
}


/* ===== STRIKER V2 refinements ===== */
:root {
  --radius: 18px;
  --space-1: 10px;
  --space-2: 14px;
  --space-3: 18px;
  --space-4: 22px;
  --space-5: 28px;
}

code,
.topbar,
.brand-mark,
.btn,
.nav-link,
.hero-metrics article,
.stat-card,
.feature-card,
.preview-card,
.panel-card,
.experience-panel,
.hero-card,
.sidebar,
.modal-dialog,
.feature-icon,
.hero-card-grid article,
.summary-item,
.activity-item,
.history-item,
.goal-item,
input,
textarea,
select,
.auth-tab,
.profile-card-mini,
.upload-tile,
.diary-card,
.diary-photo,
.diary-preview-item,
.cta-strip {
  border-radius: var(--radius) !important;
}

.topbar {
  padding: 16px 18px;
}

.brand-mark,
.btn,
.nav-link,
input,
textarea,
select,
.auth-tab {
  border-radius: var(--radius) !important;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.95rem;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.topnav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.panel-view {
  display: grid;
  gap: var(--space-4);
}

.panel-card,
.goal-form,
.log-mode,
.profile-grid,
.history-list,
.goals-list,
.diary-list {
  gap: var(--space-3);
}

.panel-card {
  padding: 22px;
}

.panel-card-header {
  margin-bottom: var(--space-3);
}

.panel-subtitle {
  margin: 6px 0 0;
  font-size: 0.95rem;
  max-width: 68ch;
}

.app-main {
  gap: var(--space-4);
}

.app-header {
  padding: 6px 2px;
}

.app-header-actions {
  gap: var(--space-2);
}

.btn-emphasis {
  padding: 1.06rem 1.45rem;
  min-width: 170px;
  font-size: 1rem;
}

textarea {
  resize: none !important;
  overflow-y: auto;
  scrollbar-width: thin;
}

#journalText {
  min-height: 190px;
  max-height: 280px;
}

#trainingField,
#nutritionField,
#notesField,
#structuredTraining,
#structuredNutrition,
#structuredNotes,
#goalDescription,
#diaryNotes,
#profileSupplements,
#profileNotes {
  min-height: 132px;
  max-height: 220px;
}

.manual-grid,
.profile-grid,
.goal-grid-row,
.dashboard-content-grid,
.dashboard-grid,
.preview-grid,
.feature-grid,
.hero-card-grid,
.summary-grid {
  gap: var(--space-3);
}

.history-tools,
.form-actions,
.journal-actions,
.goal-actions,
.profile-actions-grid {
  gap: var(--space-2);
}

.profile-hero {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background:
    linear-gradient(135deg, rgba(255, 122, 24, 0.26), rgba(255, 255, 255, 0.06)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 30%),
    rgba(255, 255, 255, 0.04);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
}

.profile-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.10) 0%, rgba(8, 8, 10, 0.70) 100%);
}

.profile-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  padding: 24px;
  min-height: 240px;
}

.profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, #ffb16d 0%, #ff7a18 48%, #ff4f0f 100%);
  color: #121214;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.25);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero-copy {
  display: grid;
  gap: 6px;
  max-width: 560px;
}

.profile-overline {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.profile-hero-copy h4 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.profile-hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.profile-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--space-4);
}

.upload-tile {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
  display: grid;
  gap: 6px;
  min-height: 104px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.upload-tile:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 122, 24, 0.28);
  transform: translateY(-1px);
}

.upload-tile-title {
  font-weight: 700;
}

.upload-tile-copy {
  color: var(--muted);
  line-height: 1.5;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.upload-preview-grid,
.diary-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--space-2);
}

.empty-state-inline {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.025);
  padding: 18px;
  color: var(--muted);
  border-radius: var(--radius);
}

.diary-preview-item,
.diary-photo {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  min-height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.diary-preview-item img,
.diary-photo img {
  width: 100%;
  height: 100%;
  min-height: 130px;
  object-fit: cover;
}

.diary-list {
  display: grid;
}

.diary-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: var(--space-3);
}

.diary-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.diary-card-header h5 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.diary-card-header p {
  margin: 0;
  color: var(--muted);
}

.diary-date {
  color: var(--muted-soft);
  font-size: 0.9rem;
}

.help-text.voice-note {
  margin-top: 2px;
}

@media (max-width: 900px) {
  .topbar,
  .panel-card,
  .sidebar,
  .modal-dialog,
  .hero-card,
  .cta-strip,
  .upload-tile,
  .diary-card {
    border-radius: var(--radius) !important;
  }

  .profile-actions-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero-content {
    align-items: flex-start;
    flex-direction: column;
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .btn-emphasis {
    width: 100%;
  }

  .upload-preview-grid,
  .diary-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* --- Auth real + pulido fino --- */
body.authenticated #landingNav a {
  display: none;
}

body.authenticated #landingNav {
  gap: var(--space-2);
}

#journalMode {
  display: grid;
  gap: var(--space-3);
}

#journalMode .field-label {
  display: block;
  margin: 0;
}

#journalText {
  margin: 0;
}

.journal-actions {
  margin-top: 2px;
  align-items: center;
}

.journal-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: 2px;
}

.voice-note {
  margin: 0;
  color: var(--muted);
}

.panel-card > .panel-card-header + .log-mode,
.panel-card > .panel-card-header + .manual-grid,
.panel-card > .panel-card-header + .history-list,
.panel-card > .panel-card-header + .goal-form,
.panel-card > .panel-card-header + .profile-grid,
.panel-card > .panel-card-header + .profile-hero {
  margin-top: 0;
}

#historyList.empty-state-large,
#goalsList.empty-state-large,
#diaryList.empty-state-large {
  padding: 22px;
}

.app-view .topbar-placeholder {
  display: none;
}

.history-item .profile-grid {
  margin-top: 4px;
}

@media (max-width: 860px) {
  body.authenticated #landingNav a {
    display: none !important;
  }
}

/* =========================================================
   STRIKER v1.2 — pulido UX, historial editable y responsive
   ========================================================= */

:root {
  --space-2xs: 6px;
  --space-xs: 10px;
  --space-sm: 14px;
  --space-md: 20px;
  --space-lg: 28px;
  --space-xl: 40px;
  --radius-striker: 28px;
}

.section,
.panel-card,
.feature-card,
.preview-card,
.stat-card,
.history-item,
.diary-card,
.goal-item,
.profile-card-mini,
.upload-tile,
.cta-strip {
  border-radius: var(--radius-striker);
}

.panel-card {
  padding: clamp(22px, 2.4vw, 34px);
}

.panel-card + .panel-card,
.panel-view > .panel-card + .panel-card {
  margin-top: var(--space-lg);
}

.panel-card-header {
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.field-group {
  gap: var(--space-xs);
}

.manual-grid,
.structured-grid,
.profile-grid,
.goal-form,
.diary-list,
.goals-list,
.history-list,
.stack-list {
  gap: var(--space-md);
}

textarea,
input,
select {
  resize: none;
}

#logPanel .panel-card:first-child .panel-card-header {
  margin-bottom: var(--space-md);
}

#journalMode {
  display: grid;
  gap: var(--space-md);
}

#journalMode.hidden {
  display: none;
}

#journalText {
  margin-top: 0;
}

.journal-actions {
  margin-top: 0;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

.help-text {
  margin-top: 0;
  line-height: 1.45;
}

/* Landing actualizada */
.hero,
.split-section,
.cta-strip {
  overflow: hidden;
}

.hero-card {
  min-width: 0;
}

.hero-card-top {
  align-items: center;
}

.hero-card-top p {
  max-width: 100%;
  white-space: normal;
  text-align: right;
}

.hero-card-grid {
  min-width: 0;
}

.hero-card-grid article,
.summary-item,
.preview-card,
.feature-card {
  min-width: 0;
}

.hero-card-grid strong,
.summary-item strong,
.preview-card p,
.feature-card p {
  overflow-wrap: anywhere;
}

.cta-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-lg);
}

.cta-strip h3 {
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: .96;
  max-width: 1100px;
  overflow-wrap: anywhere;
}

.cta-strip .btn {
  white-space: nowrap;
}

/* Historial v1.2 */
#historyPanel .panel-card > .panel-card-header {
  align-items: flex-end;
  margin-bottom: var(--space-lg);
}

.history-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.history-tools input[type="date"] {
  width: min(280px, 100%);
  min-height: 56px;
  padding-inline: 18px;
  font-size: 1rem;
}

.history-tools .btn {
  min-height: 56px;
  padding-inline: 20px;
}

.history-list-v12 {
  display: grid;
  gap: var(--space-md);
}

.history-item-v12 {
  padding: clamp(20px, 2vw, 28px);
}

.history-item-header-v12 {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.history-title-block {
  display: grid;
  gap: var(--space-xs);
  min-width: 0;
}

.history-title-block > strong {
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.1;
}

.history-meta {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.history-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text-muted, #b8bac8);
  font-size: .9rem;
  line-height: 1.15;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-small {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 20px;
  font-size: .95rem;
}

.btn-soft-danger {
  color: #ffb4a8;
  border-color: rgba(255, 116, 94, .25);
  background: rgba(255, 92, 64, .08);
}

.btn-soft-danger:hover {
  border-color: rgba(255, 116, 94, .42);
  background: rgba(255, 92, 64, .14);
}

.history-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.history-content-card {
  min-width: 0;
  min-height: 112px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}

.history-content-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--text-soft, #989caf);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.history-content-card p {
  margin: 0;
  line-height: 1.45;
  color: var(--text-main, #f6f4f1);
  overflow-wrap: anywhere;
}

.entry-edit-dialog {
  max-height: min(86vh, 920px);
  overflow: auto;
}

.entry-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.entry-edit-grid .full-span {
  grid-column: 1 / -1;
}

.modal-header-compact {
  margin-bottom: var(--space-md);
}

/* Diario visual */
#diaryImages {
  width: 100%;
  min-height: 74px;
  padding: 17px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.045);
  color: var(--text-main, #f6f4f1);
  cursor: pointer;
}

#diaryImages::file-selector-button {
  border: 0;
  margin-right: 14px;
  padding: 12px 18px;
  border-radius: 18px;
  color: #14100c;
  font-weight: 800;
  background: linear-gradient(135deg, #ff9c42, #ff5a12);
  cursor: pointer;
}

.upload-preview-grid {
  margin-top: var(--space-md);
}

.diary-card-header {
  gap: var(--space-md);
}

.diary-photo,
.diary-preview-item {
  border-radius: 24px;
  overflow: hidden;
}

/* Perfil */
.profile-hero {
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.profile-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.26));
}

.profile-hero-content {
  position: relative;
  z-index: 2;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-actions-grid {
  gap: var(--space-md);
  margin-block: var(--space-lg);
}

.upload-tile {
  padding: 24px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.upload-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 132, 44, .35);
  background: rgba(255, 132, 44, .065);
}

/* Responsive */
@media (max-width: 1000px) {
  .cta-strip {
    grid-template-columns: 1fr;
  }

  .cta-strip .btn {
    width: fit-content;
  }

  .history-content-grid,
  .entry-edit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .panel-card {
    padding: 20px;
  }

  #historyPanel .panel-card > .panel-card-header,
  .history-item-header-v12 {
    align-items: stretch;
    flex-direction: column;
  }

  .history-tools,
  .history-actions {
    justify-content: stretch;
  }

  .history-tools input[type="date"],
  .history-tools .btn,
  .history-actions .btn {
    width: 100%;
  }

  .cta-strip h3 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero-card-top p {
    text-align: left;
  }
}
