/*
Theme Name: My Memory Boxes
Theme URI: https://mymemoryboxes.local/
Author: My Memory Boxes
Description: A purpose-built dashboard theme for a private digital memory-box service, styled after DearMemory V2.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mymemoryboxes
*/

:root {
  /* Brand Color Palette - DearMemory V2 Design System */
  --dm-color-primary: #C86D51;
  --dm-color-primary-hover: #B25C42;
  --dm-color-primary-pressed: #9E4A32;
  --dm-color-primary-light: #FBF0EC;
  --dm-color-primary-soft: #F6EBE6;

  --dm-color-secondary: #0E362E;
  --dm-color-secondary-hover: #08241F;
  --dm-color-secondary-pressed: #04120F;
  --dm-color-secondary-light: #F4F8F6;

  --dm-color-dark-teal: #0E362E;
  --dm-color-footer-bg: #0E362E;

  --dm-color-text: #1A2E2B;
  --dm-color-text-secondary: #4A5552;
  --dm-color-text-muted: #6B7774;
  --dm-color-text-light: #FFFFFF;

  --dm-color-white: #FFFFFF;
  --dm-color-app-bg: #FFFFFF;
  --dm-color-surface-soft: #F4F8F6;
  --dm-color-quote-bg: #FBF0EC;

  --dm-color-border: #E1ECE8;
  --dm-color-border-strong: #C4D9D2;
  --dm-color-focus: rgba(200, 109, 81, 0.35);

  /* MyMemoryBoxes aliases for backwards compatibility & token mapping */
  --mmb-green: var(--dm-color-secondary);
  --mmb-green-dark: var(--dm-color-secondary-hover);
  --mmb-green-light: var(--dm-color-secondary-light);
  --mmb-rust: var(--dm-color-primary);
  --mmb-rust-dark: var(--dm-color-primary-hover);
  --mmb-rust-light: var(--dm-color-primary-light);
  --mmb-charcoal: #1A2E2B;
  --mmb-text: var(--dm-color-text);
  --mmb-text-secondary: var(--dm-color-text-secondary);
  --mmb-muted: var(--dm-color-text-muted);
  --mmb-border: var(--dm-color-border);
  --mmb-border-strong: var(--dm-color-border-strong);
  --mmb-bg: #FFFFFF;
  --mmb-surface: #FFFFFF;
  --mmb-surface-alt: #F4F8F6;
  --mmb-card: #FFFFFF;

  /* Layout Dimensions */
  --dm-width-app: 1400px;
  --dm-width-public: 1240px;
  --dm-width-content: 1040px;
  --dm-width-reading: 760px;
  --dm-width-form: 720px;
  --dm-sidebar-width: 260px;

  /* Border Radii */
  --dm-radius-small: 8px;
  --dm-radius-control: 12px;
  --dm-radius-card: 20px;
  --dm-radius-large: 24px;
  --dm-radius-pill: 9999px;

  /* Shadows */
  --dm-shadow-sm: 0 1px 3px rgba(20, 24, 24, 0.05);
  --dm-shadow-md: 0 4px 16px rgba(20, 24, 24, 0.06);
  --dm-shadow-lg: 0 12px 32px rgba(20, 24, 24, 0.09);
  --dm-shadow-floating: 0 16px 40px rgba(0, 0, 0, 0.12);

  /* Typography Families */
  --dm-font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --dm-font-serif: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-ui: var(--dm-font-sans);
  --font-display: var(--dm-font-serif);
  --mmb-sans: var(--dm-font-sans);
  --mmb-serif: var(--dm-font-serif);
}

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--dm-color-text);
  background-color: var(--dm-color-app-bg);
  font: 400 16px/1.6 var(--dm-font-sans);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dm-color-text);
  font-family: var(--dm-font-sans);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
}

a {
  color: var(--dm-color-primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover, a:focus-visible {
  color: var(--dm-color-primary-hover);
}

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

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

:focus-visible {
  outline: 3px solid var(--dm-color-focus);
  outline-offset: 2px;
}

.screen-reader-text, .dm-screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link, .dm-skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 10000;
  padding: 0.75rem 1rem;
  background: var(--dm-color-primary);
  color: var(--dm-color-white);
  border-radius: var(--dm-radius-small);
  box-shadow: var(--dm-shadow-md);
  font-weight: 600;
}

.skip-link:focus, .dm-skip-link:focus {
  top: 1rem;
}

/* ==================================================
   CONTAINERS & LAYOUT
   ================================================== */
.dm-container, .mmb-container, .container {
  width: 100%;
  max-width: var(--dm-width-public);
  margin-inline: auto;
  padding-inline: var(--dm-space-6);
}

.dm-app-container, .mmb-app-container {
  width: 100%;
  max-width: var(--dm-width-app);
  margin-inline: auto;
  padding-inline: var(--dm-space-6);
}

.dm-reading-container, .mmb-reading-container {
  width: 100%;
  max-width: var(--dm-width-reading);
  margin-inline: auto;
  padding-inline: var(--dm-space-6);
}

/* ==================================================
   BUTTON SYSTEM (DearMemory V2 Standard)
   ================================================== */
.dm-btn, .mmb-btn, .primary-button, .secondary-button, .hero-button, .rust-button, .outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--dm-space-2);
  padding: 10px 20px;
  font-family: var(--dm-font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  border-radius: var(--dm-radius-control);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: var(--dm-shadow-sm);
  white-space: nowrap;
}

.dm-btn:hover, .mmb-btn:hover, .primary-button:hover, .secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--dm-shadow-md);
}

.dm-btn:active, .mmb-btn:active {
  transform: translateY(0);
  box-shadow: var(--dm-shadow-sm);
}

/* Primary Terracotta Button */
.dm-btn--primary, .mmb-btn--primary, .primary-button, .rust-button, .public-primary {
  background-color: var(--dm-color-primary) !important;
  color: var(--dm-color-white) !important;
  border-color: var(--dm-color-primary) !important;
}

.dm-btn--primary:hover, .mmb-btn--primary:hover, .primary-button:hover, .rust-button:hover, .public-primary:hover {
  background-color: var(--dm-color-primary-hover) !important;
  border-color: var(--dm-color-primary-hover) !important;
  color: var(--dm-color-white) !important;
}

/* Secondary Deep Green Button */
.dm-btn--secondary, .mmb-btn--secondary, .secondary-button {
  background-color: var(--dm-color-secondary) !important;
  color: var(--dm-color-white) !important;
  border-color: var(--dm-color-secondary) !important;
}

.dm-btn--secondary:hover, .mmb-btn--secondary:hover, .secondary-button:hover {
  background-color: var(--dm-color-secondary-hover) !important;
  border-color: var(--dm-color-secondary-hover) !important;
  color: var(--dm-color-white) !important;
}

/* Outline Button */
.dm-btn--outline, .mmb-btn--outline, .outline-button {
  background-color: var(--dm-color-white) !important;
  color: var(--dm-color-text) !important;
  border-color: var(--dm-color-border-strong) !important;
}

.dm-btn--outline:hover, .mmb-btn--outline:hover, .outline-button:hover {
  background-color: var(--dm-color-surface-soft) !important;
  border-color: var(--dm-color-text-secondary) !important;
  color: var(--dm-color-text) !important;
}

/* Pill Rounded Button */
.dm-btn--pill, .mmb-btn--pill {
  border-radius: var(--dm-radius-pill) !important;
  padding: 12px 24px !important;
}

/* Destructive Button */
.dm-btn--danger, .mmb-btn--danger, .destructive-button {
  background-color: #B93636 !important;
  color: var(--dm-color-white) !important;
  border-color: #B93636 !important;
}

.dm-btn--danger:hover, .mmb-btn--danger:hover, .destructive-button:hover {
  background-color: #9E2B2B !important;
  border-color: #9E2B2B !important;
}

/* ==================================================
   CARD SYSTEM
   ================================================== */
.dm-card, .mmb-card, .memory-card, .account-card, .create-box-card {
  background: var(--dm-color-white);
  border: 1px solid var(--dm-color-border);
  border-radius: var(--dm-radius-card);
  padding: var(--dm-space-5);
  box-shadow: var(--dm-shadow-sm);
  transition: all 0.2s ease-in-out;
}

.dm-card--interactive:hover, .memory-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--dm-shadow-md);
  border-color: var(--dm-color-border-strong);
}

/* Pills & Badges */
.dm-pill, .mmb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--dm-radius-pill);
  background: var(--dm-color-white);
  border: 1px solid var(--dm-color-border);
  color: var(--dm-color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.dm-pill:hover, .mmb-pill:hover {
  background: var(--dm-color-surface-soft);
  color: var(--dm-color-text);
}

.dm-pill.is-active, .dm-pill--active, .mmb-pill--active {
  background: var(--dm-color-secondary);
  color: var(--dm-color-white);
  border-color: var(--dm-color-secondary);
  font-weight: 600;
}

.dm-badge, .mmb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--dm-radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--dm-color-surface-soft);
  color: var(--dm-color-text-secondary);
}

.dm-badge--primary, .mmb-badge--primary {
  background: var(--dm-color-primary-light);
  color: var(--dm-color-primary);
}

/* ==================================================
   FORM DESIGN SYSTEM
   ================================================== */
.dm-form-group, .mmb-form-group, .field {
  display: flex;
  flex-direction: column;
  gap: var(--dm-space-2);
  margin-bottom: var(--dm-space-4);
}

.dm-label, .mmb-label, label {
  font-size: 14px;
  font-weight: 600;
  color: var(--dm-color-text);
}

.dm-input, .dm-select, .dm-textarea, .mmb-input, .field input, .field select, .field textarea, input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--dm-color-white);
  border: 1px solid var(--dm-color-border-strong);
  border-radius: var(--dm-radius-control);
  color: var(--dm-color-text);
  font-size: 15px;
  transition: all 0.15s ease-in-out;
}

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

.dm-input:focus, .dm-select:focus, .dm-textarea:focus, .mmb-input:focus, .field input:focus, .field textarea:focus, .field select:focus, input:focus, textarea:focus, select:focus {
  border-color: var(--dm-color-primary);
  box-shadow: 0 0 0 3px var(--dm-color-focus);
  outline: none;
}

.dm-helper-text, .mmb-helper-text, .field small {
  font-size: 13px;
  color: var(--dm-color-text-muted);
}

.dm-error-text, .mmb-error-text {
  font-size: 13px;
  color: #D32F2F;
  font-weight: 500;
}

/* Alerts and Notices */
.mmb-box-notice, .dm-notice {
  padding: 14px 20px;
  border-radius: var(--dm-radius-control);
  font-weight: 600;
  margin-bottom: 24px;
  font-size: 14.5px;
  line-height: 1.5;
  background: #EEF5F1;
  border: 1px solid #B9CEC4;
  border-left: 4px solid var(--dm-color-secondary);
  color: var(--dm-color-secondary);
}

.mmb-box-notice--error, .dm-notice--error {
  background: #FFF2EE;
  border-color: #A7685C;
  border-left-color: #B93636;
  color: #5B2F28;
}

/* ==================================================
   SITE HEADER & NAVIGATION
   ================================================== */
.dm-site-header, .site-header, .public-header {
  position: relative;
  z-index: 9999;
  width: 100%;
  background: var(--dm-color-white) !important;
  border-bottom: 1px solid var(--dm-color-border) !important;
  box-shadow: var(--dm-shadow-sm);
  height: auto;
  min-height: 76px;
  padding: 0;
}

.dm-header-inner, .header-inner-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dm-space-5);
  min-height: 76px;
  padding-block: var(--dm-space-3);
  max-width: var(--dm-width-public);
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--dm-space-6);
}

.dm-brand, .public-logo, .brand {
  display: flex;
  align-items: center;
  gap: var(--dm-space-3);
  text-decoration: none;
  color: var(--dm-color-secondary);
}

.dm-brand-text, .brand-text {
  display: flex;
  flex-direction: column;
}

.dm-site-name, .brand-name {
  color: var(--dm-color-secondary);
  font-family: var(--dm-font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.dm-site-tagline, .brand-tagline {
  color: var(--dm-color-text-secondary);
  font-size: 12px;
  font-weight: 500;
}

/* Header Navigation Links */
.dm-primary-navigation, .public-nav, .header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  margin-right: 12px;
}

.dm-primary-navigation a, .public-nav a, .header-nav a {
  color: var(--dm-color-text) !important;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--dm-radius-small);
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.dm-primary-navigation a:hover, .public-nav a:hover, .header-nav a:hover {
  color: var(--dm-color-primary) !important;
  background: transparent !important;
}

.dm-primary-navigation a.is-active, .dm-primary-navigation a[aria-current="page"],
.header-nav a.current, .header-nav a[aria-current="page"] {
  color: var(--dm-color-primary) !important;
  font-weight: 700;
  background: transparent !important;
  position: relative;
}

.dm-primary-navigation a.is-active::after, .dm-primary-navigation a[aria-current="page"]::after,
.header-nav a.current::after, .header-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 10px;
  right: 10px;
  height: 2px;
  background-color: var(--dm-color-primary);
  border-radius: 2px;
}

/* Header Action Buttons */
.dm-header-actions, .public-header-right, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 0;
}

/* Accessible User Menu Dropdown */
.dm-profile-dropdown, .user-menu-wrapper {
  position: relative;
  display: inline-block;
}

.dm-user-pill, .user-menu-toggle {
  display: flex;
  align-items: center;
  gap: var(--dm-space-3);
  padding: 4px 12px 4px 4px;
  background: var(--dm-color-white);
  border: 1px solid var(--dm-color-border);
  border-radius: var(--dm-radius-pill);
  cursor: pointer;
  text-decoration: none;
  color: var(--dm-color-text);
  transition: all 0.15s ease-in-out;
  font-size: 14px;
  font-weight: 600;
}

.dm-user-pill:hover, .user-menu-toggle:hover {
  background: var(--dm-color-surface-soft);
  border-color: var(--dm-color-border-strong);
}

.dm-user-avatar, .user-menu-toggle .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--dm-color-primary-soft);
  color: var(--dm-color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.dm-profile-menu, .user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--dm-color-white);
  border: 1px solid var(--dm-color-border);
  border-radius: 16px;
  box-shadow: var(--dm-shadow-lg);
  padding: 8px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dm-profile-menu[hidden], .user-menu-dropdown[hidden] {
  display: none !important;
}

.dm-profile-menu__header, .user-menu-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--dm-color-border);
  margin-bottom: 4px;
}

.dm-profile-menu__user-name, .user-menu-display-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--dm-color-text);
}

.dm-profile-menu__user-role, .user-menu-email {
  display: block;
  font-size: 12px;
  color: var(--dm-color-text-muted);
  margin-top: 2px;
}

.dm-profile-menu a, .user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--dm-color-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.dm-profile-menu a:hover, .user-menu-item:hover {
  background: var(--dm-color-surface-soft);
  color: var(--dm-color-primary);
}

.dm-profile-menu a.dm-profile-menu__logout, .user-menu-logout {
  color: #D32F2F !important;
  border-top: 1px solid var(--dm-color-border);
  margin-top: 4px;
  padding-top: 10px;
}

.dm-profile-menu a.dm-profile-menu__logout:hover, .user-menu-logout:hover {
  background: var(--dm-color-primary-light) !important;
  color: #B34B36 !important;
}

/* Mobile Header Hamburger Toggle */
.dm-menu-toggle, .public-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--dm-color-border-strong);
  border-radius: var(--dm-radius-control);
  background: var(--dm-color-white);
  color: var(--dm-color-secondary);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.dm-menu-toggle:hover, .public-menu:hover {
  background: var(--dm-color-surface-soft);
  color: var(--dm-color-primary);
  border-color: var(--dm-color-primary);
}

/* ==================================================
   ART-DIRECTED EXPANDED PHOTOGRAPHIC HERO COLLAGE
   ================================================== */
.mmb-hero__photo-composition {
  position: relative;
  width: 100%;
  max-width: 580px;
  height: 520px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mmb-hero-photo-card {
  position: absolute;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
  will-change: transform, opacity;
}

.mmb-hero-photo-card__frame {
  position: relative;
  background: #FFFFFF;
  padding: 8px 8px 12px 8px;
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38), 0 4px 14px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.mmb-hero-photo-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.mmb-hero-photo-card__caption {
  margin-top: 8px;
  padding-inline: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mmb-hero-photo-card__title {
  color: #0E362E;
  font-family: var(--dm-font-sans, "Plus Jakarta Sans", sans-serif);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
}

.mmb-hero-photo-card__meta {
  color: #6B7774;
  font-size: 11px;
  font-weight: 500;
}

/* --------------------------------------------------
   FADED BACKGROUND LAYERS (Depth Level 3 - Softest)
   -------------------------------------------------- */
.mmb-hero-photo-card--bg-left {
  z-index: 1;
  width: 190px;
  top: 15px;
  left: 10px;
  opacity: 0.65;
  filter: blur(0.3px);
  transform: rotate(-5.5deg);
}

.mmb-hero-photo-card--bg-left .mmb-hero-photo-card__frame img {
  height: 125px;
}

.mmb-hero-photo-card--bg-center {
  z-index: 1;
  width: 200px;
  top: 130px;
  right: 140px;
  opacity: 0.55;
  filter: blur(0.4px);
  transform: rotate(5deg);
}

.mmb-hero-photo-card--bg-center .mmb-hero-photo-card__frame img {
  height: 130px;
}

.mmb-hero-photo-card--bg-bottom {
  z-index: 1;
  width: 180px;
  bottom: 25px;
  left: 25px;
  opacity: 0.50;
  filter: blur(0.4px);
  transform: rotate(-3deg);
}

.mmb-hero-photo-card--bg-bottom .mmb-hero-photo-card__frame img {
  height: 115px;
}

/* --------------------------------------------------
   MID-LAYER SUPPORTING MEMORIES (Depth Level 2)
   -------------------------------------------------- */
.mmb-hero-photo-card--mid-top {
  z-index: 3;
  width: 220px;
  top: 10px;
  right: 25px;
  opacity: 0.90;
  transform: rotate(-3.5deg);
}

.mmb-hero-photo-card--mid-top .mmb-hero-photo-card__frame img {
  height: 145px;
}

.mmb-hero-photo-card--mid-right {
  z-index: 4;
  width: 215px;
  bottom: 40px;
  right: 15px;
  opacity: 0.88;
  transform: rotate(4.5deg);
}

.mmb-hero-photo-card--mid-right .mmb-hero-photo-card__frame img {
  height: 140px;
}

/* --------------------------------------------------
   PRIMARY & SECONDARY DOMINANT FRONT MEMORIES (Depth Level 1)
   -------------------------------------------------- */
.mmb-hero-photo-card--primary {
  z-index: 6;
  width: 290px;
  top: 110px;
  left: 50px;
  opacity: 1;
  transform: rotate(-1.5deg);
}

.mmb-hero-photo-card--primary .mmb-hero-photo-card__frame {
  padding: 10px 10px 14px 10px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.22);
}

.mmb-hero-photo-card--primary .mmb-hero-photo-card__frame img {
  height: 195px;
}

.mmb-hero-photo-card--primary .mmb-hero-photo-card__title {
  font-size: 15px;
}

.mmb-hero-photo-card--secondary {
  z-index: 5;
  width: 260px;
  bottom: 80px;
  right: 70px;
  opacity: 1;
  transform: rotate(2.5deg);
}

.mmb-hero-photo-card--secondary .mmb-hero-photo-card__frame {
  padding: 10px 10px 14px 10px;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42), 0 6px 20px rgba(0, 0, 0, 0.2);
}

.mmb-hero-photo-card--secondary .mmb-hero-photo-card__frame img {
  height: 175px;
}

.mmb-hero-photo-card--secondary .mmb-hero-photo-card__title {
  font-size: 14.5px;
}

/* Hover Interactivity - Bring any card into crisp focus on hover */
.mmb-hero-photo-card:hover {
  opacity: 1 !important;
  filter: none !important;
  z-index: 10 !important;
  transform: scale(1.04) rotate(0deg) !important;
}

/* ==================================================
   STATEMENT CTA SECTION
   ================================================== */
.mmb-statement-section {
  background: #FFFFFF;
  padding-block: clamp(64px, 8vw, 100px);
  text-align: center;
  border-bottom: 1px solid var(--dm-color-border);
}

.mmb-statement-title {
  color: var(--dm-color-secondary);
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 700;
  line-height: 1.25;
  max-width: 820px;
  margin: 0 auto 16px auto;
  letter-spacing: -0.02em;
}

.mmb-statement-desc {
  color: var(--dm-color-text-secondary);
  font-size: 17px;
  max-width: 580px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

/* ==================================================
   SITE FOOTER (DearMemory V2 Sister Standard)
   ================================================== */
.dm-site-footer--public, .public-footer, .site-shared-footer, .site-footer {
  background: var(--dm-color-footer-bg) !important;
  color: var(--dm-color-text-light) !important;
  padding-block: clamp(60px, 7vw, 96px) clamp(36px, 4vw, 56px);
  margin-top: auto;
}

.dm-footer-grid, .footer-top-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(40px, 5vw, 64px);
  margin-bottom: clamp(28px, 3.5vw, 40px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.dm-footer-brand-col, .footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dm-footer-brand-title, .footer-brand-logo {
  font-family: var(--dm-font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--dm-color-white);
  text-decoration: none;
  margin-bottom: 0;
  display: block;
}

.dm-footer-brand-desc, .footer-brand-tagline, .footer-brand-desc {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

.dm-footer-cols, .footer-nav-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.dm-footer-col-heading, .footer-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dm-color-primary);
  margin: 0 0 20px 0;
}

.dm-footer-links, .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dm-footer-links a, .footer-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14.5px;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.15s ease;
}

.dm-footer-links a:hover, .footer-links a:hover {
  color: var(--dm-color-white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.dm-footer-bottom-row, .footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.dm-footer-bottom-row a, .footer-bottom-bar a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.15s ease;
}

.dm-footer-bottom-row a:hover, .footer-bottom-bar a:hover {
  color: var(--dm-color-white);
  text-decoration: underline;
}

.footer-reassurance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
}

/* ==================================================
   RESPONSIVE LAYOUT SCALING
   ================================================== */
@media (max-width: 1024px) {
  .dm-footer-grid, .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .dm-footer-cols, .footer-nav-cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .mmb-hero__photo-composition {
    height: 440px;
    max-width: 460px;
  }
  .mmb-hero-photo-card--primary {
    width: 250px;
    left: 30px;
    top: 90px;
  }
  .mmb-hero-photo-card--secondary {
    width: 220px;
    right: 40px;
    bottom: 60px;
  }
  .mmb-hero-photo-card--mid-top {
    width: 190px;
    right: 10px;
  }
  .mmb-hero-photo-card--mid-right {
    width: 180px;
    right: 5px;
  }
  .mmb-hero-photo-card--bg-left,
  .mmb-hero-photo-card--bg-bottom {
    display: none;
  }
}

@media (max-width: 768px) {
  .dm-header-inner, .header-inner-wrap {
    min-height: 64px;
    padding-inline: var(--dm-space-4);
  }

  .dm-menu-toggle, .public-menu {
    display: flex;
  }

  .dm-primary-navigation, .public-nav, .header-nav {
    display: none;
  }

  .dm-primary-navigation.is-open, .public-header-right.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dm-color-white);
    border-bottom: 1px solid var(--dm-color-border);
    padding: 20px;
    box-shadow: var(--dm-shadow-lg);
    z-index: 100000;
    gap: 16px;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .dm-footer-cols, .footer-nav-cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .dm-footer-bottom-row, .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .mmb-hero__container {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .mmb-hero__photo-composition {
    height: 380px;
    max-width: 380px;
    margin-top: 10px;
  }
  .mmb-hero-photo-card--primary {
    width: 220px;
    left: 10px;
    top: 60px;
  }
  .mmb-hero-photo-card--primary .mmb-hero-photo-card__frame img {
    height: 155px;
  }
  .mmb-hero-photo-card--secondary {
    width: 195px;
    right: 15px;
    bottom: 40px;
  }
  .mmb-hero-photo-card--secondary .mmb-hero-photo-card__frame img {
    height: 135px;
  }
  .mmb-hero-photo-card--mid-top {
    width: 165px;
    right: 5px;
    top: 5px;
  }
  .mmb-hero-photo-card--mid-top .mmb-hero-photo-card__frame img {
    height: 115px;
  }
  .mmb-hero-photo-card--mid-right {
    width: 160px;
    right: 0px;
    bottom: 10px;
  }
  .mmb-hero-photo-card--mid-right .mmb-hero-photo-card__frame img {
    height: 110px;
  }
  .mmb-hero-photo-card--bg-left,
  .mmb-hero-photo-card--bg-center,
  .mmb-hero-photo-card--bg-bottom {
    display: none;
  }
}

/* ==========================================================================
   MY MEMORY BOXES — TWO-COLUMN APPLICATION LAYOUT & SIDEBAR REFINEMENT
   ========================================================================== */
.mmb-page-layout {
  display: grid !important;
  grid-template-columns: 270px minmax(0, 1fr) !important;
  gap: 36px !important;
  align-items: start !important;
  max-width: 1500px !important;
  margin-inline: auto !important;
  padding: 32px 40px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.mmb-main-content {
  width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Sidebar Styling: Clean application sidebar (no giant floating card) */
.mmb-collection-sidebar {
  position: sticky !important;
  top: 84px !important;
  width: 270px !important;
  min-width: 250px !important;
  max-width: 290px !important;
  max-height: calc(100vh - 104px) !important;
  background: #FFFFFF !important;
  border-right: 1px solid var(--dm-color-border, #E1ECE8) !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-radius: 0 !important;
  padding: 0 20px 0 0 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 50 !important;
}

.mmb-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: calc(100vh - 110px);
}

.mmb-sidebar-header {
  margin-bottom: 14px;
}

.mmb-sidebar-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mmb-sidebar-title {
  font-family: var(--dm-font-sans, "Plus Jakarta Sans", sans-serif);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--dm-color-text-muted, #6B7774);
  text-transform: uppercase;
  margin: 0;
}

.mmb-sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--dm-color-text-muted, #6B7774);
  cursor: pointer;
  padding: 4px;
}

.mmb-sidebar-search-input-wrap {
  position: relative;
  width: 100%;
}

.mmb-sidebar-search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dm-color-text-muted, #6B7774);
  pointer-events: none;
}

.mmb-sidebar-search-input-wrap input {
  width: 100%;
  height: 36px;
  padding: 6px 12px 6px 34px;
  background: var(--dm-color-surface-soft, #F4F8F6);
  border: 1px solid var(--dm-color-border, #E1ECE8);
  border-radius: 9999px;
  font-size: 13px;
  color: var(--dm-color-secondary, #0E362E);
  box-sizing: border-box;
}

.mmb-sidebar-search-input-wrap input:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--dm-color-primary, #C86D51);
  box-shadow: 0 0 0 3px rgba(200, 109, 81, 0.15);
}

.mmb-sidebar-filters {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}

.mmb-sidebar-filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--dm-color-text-secondary, #4A5552);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.mmb-sidebar-filter-item:hover {
  background: var(--dm-color-surface-soft, #F4F8F6);
  color: var(--dm-color-secondary, #0E362E);
}

.mmb-sidebar-filter-item.is-active {
  background: #F4F8F6;
  color: var(--dm-color-secondary, #0E362E);
  font-weight: 700;
  border-left: 3px solid var(--dm-color-primary, #C86D51);
  padding-left: 7px;
}

.mmb-sidebar-filter-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dm-color-text-muted, #6B7774);
}

.mmb-sidebar-filter-item.is-active .mmb-sidebar-filter-icon {
  color: var(--dm-color-primary, #C86D51);
}

.mmb-sidebar-filter-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mmb-sidebar-badge {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--dm-color-border, #E1ECE8);
  color: var(--dm-color-secondary, #0E362E);
  padding: 2px 8px;
  border-radius: 999px;
}

.mmb-sidebar-filter-item.is-active .mmb-sidebar-badge {
  background: rgba(200, 109, 81, 0.15);
  color: var(--dm-color-primary, #C86D51);
}

.mmb-sidebar-divider {
  height: 1px;
  background: var(--dm-color-border, #E1ECE8);
  margin-block: 8px 12px;
}

.mmb-sidebar-box-list-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mmb-sidebar-subheading {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--dm-color-text-muted, #6B7774);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.mmb-sidebar-box-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 4px;
}

.mmb-sidebar-box-list::-webkit-scrollbar {
  width: 4px;
}
.mmb-sidebar-box-list::-webkit-scrollbar-thumb {
  background: var(--dm-color-border, #E1ECE8);
  border-radius: 4px;
}

.mmb-sidebar-box-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--dm-color-secondary, #0E362E);
  transition: all 0.15s ease;
}

.mmb-sidebar-box-item:hover {
  background: var(--dm-color-surface-soft, #F4F8F6);
}

.mmb-sidebar-box-item.is-active {
  background: #F4F8F6;
  font-weight: 700;
  border-left: 3px solid var(--dm-color-primary, #C86D51);
  padding-left: 5px;
}

.mmb-sidebar-box-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #E1ECE8;
}

.mmb-sidebar-box-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mmb-sidebar-box-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mmb-sidebar-box-title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dm-color-secondary, #0E362E);
  line-height: 1.25;
}

.mmb-sidebar-box-count {
  font-size: 11.5px;
  color: var(--dm-color-text-muted, #6B7774);
  font-weight: 400;
}

.mmb-sidebar-footer-area {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--dm-color-border, #E1ECE8);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mmb-sidebar-storage__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.mmb-sidebar-storage__title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--dm-color-text-muted, #6B7774);
  text-transform: uppercase;
}

.mmb-sidebar-storage__stats {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--dm-color-text-secondary, #4A5552);
}

.mmb-sidebar-storage__bar {
  width: 100%;
  height: 6px;
  background: var(--dm-color-border, #E1ECE8);
  border-radius: 999px;
  overflow: hidden;
}

.mmb-sidebar-storage__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dm-color-primary, #C86D51) 0%, #D87D61 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.mmb-sidebar-create-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--dm-color-border-strong, #C4D9D2);
  background: #FFFFFF;
  color: var(--dm-color-secondary, #0E362E);
  text-decoration: none;
  transition: all 0.2s ease;
}

.mmb-sidebar-create-btn:hover {
  background: var(--dm-color-secondary, #0E362E);
  color: #FFFFFF;
  border-color: var(--dm-color-secondary, #0E362E);
}

/* Restored 3-column Image-Led Memory Box Grid */
.mmb-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)) !important;
  gap: 28px !important;
  width: 100% !important;
}

.mmb-box-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--dm-color-border, #E1ECE8);
  border-radius: var(--dm-radius-card, 20px);
  overflow: hidden;
  box-shadow: var(--dm-shadow-sm, 0 1px 3px rgba(20,24,24,0.05));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.mmb-box-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--dm-shadow-md, 0 4px 16px rgba(20,24,24,0.06));
  border-color: var(--dm-color-border-strong, #C4D9D2);
}

.mmb-box-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--dm-color-surface-soft, #F4F8F6);
  overflow: hidden;
}

.mmb-box-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mmb-box-card:hover .mmb-box-card__media img {
  transform: scale(1.03);
}

.mmb-box-card__body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}

.mmb-box-card__title {
  font-size: 19px;
  font-weight: 700;
  color: var(--dm-color-secondary, #0E362E);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.mmb-box-card__meta {
  font-size: 13.5px;
  color: var(--dm-color-text-muted, #6B7774);
  margin: 0;
}

.mmb-mobile-collection-trigger {
  display: none;
}

/* Mobile & Tablet Drawer Breakpoint (< 900px) */
@media (max-width: 899px) {
  .mmb-page-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-block: 20px;
  }

  .mmb-collection-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    max-width: 300px;
    height: 100vh;
    max-height: 100vh;
    z-index: 99999;
    border-radius: 0;
    border: none;
    padding: 20px;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mmb-collection-sidebar.is-open {
    transform: translateX(320px);
  }

  .mmb-sidebar-close-btn {
    display: flex;
  }

  .mmb-mobile-collection-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: var(--dm-color-surface-soft, #F4F8F6);
    border: 1px solid var(--dm-color-border, #E1ECE8);
    border-radius: 12px;
    color: var(--dm-color-secondary, #0E362E);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  }

  .mmb-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(14, 54, 46, 0.4);
    backdrop-filter: blur(2px);
    z-index: 99998;
  }

  .mmb-sidebar-backdrop.is-open {
    display: block;
  }
}


