:root {
  --bg: #f6f7f9;
  --bg-deep: #edf0f3;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --line: rgba(0, 0, 0, 0.06);
  --accent: #1c1c1c;
  --accent-soft: #d9dde3;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --pinterest: #bd081c;
  --bg-gradient: linear-gradient(180deg, #f6f7f9 0%, #edf0f3 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body[data-view="landing"] {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--ink);
  background: var(--bg-gradient);
  overflow-x: hidden;
}

body[data-view="moods"],
body[data-view="builder"] {
  background: var(--bg-gradient);
  color: var(--ink);
}

body[data-theme="date-night"] { --accent: #1c1c1c; --accent-soft: #d9dde3; }
body[data-theme="girls-night-out"] { --accent: #5a0f1f; --accent-soft: #e3d7da; }
body[data-theme="street-style"] { --accent: #2d343b; --accent-soft: #d6dde4; }
body[data-theme="casual"] { --accent: #8b7563; --accent-soft: #e3dcd6; }
body[data-theme="create-your-own"] { --accent: #5b6f8a; --accent-soft: #d7dfe8; }
body[data-theme="landing"] { --accent: #1c1c1c; --accent-soft: #d9dde3; }

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 24px;
  isolation: isolate;
}

body[data-view="moods"] .page-shell,
body[data-view="moods"] .topbar,
body[data-view="moods"] .studio-mood-browser {
  background: transparent;
}

.texture {
  position: fixed;
  inset: auto;
  pointer-events: none;
  opacity: 0.45;
  filter: blur(0.3px);
  z-index: -1;
}

body[data-view="moods"] .texture,
body[data-view="builder"] .texture {
  display: none;
}

.texture-one {
  top: -8rem;
  left: -5rem;
  width: 28rem;
  height: 28rem;
  background:
    radial-gradient(circle at 30% 40%, rgba(123, 41, 63, 0.18), transparent 32%),
    radial-gradient(circle at 70% 45%, rgba(255, 255, 255, 0.9), transparent 24%),
    radial-gradient(circle at 55% 70%, rgba(32, 22, 31, 0.12), transparent 28%);
}

.texture-two {
  right: -7rem;
  bottom: -8rem;
  width: 32rem;
  height: 32rem;
  background:
    radial-gradient(circle at 50% 45%, rgba(123, 41, 63, 0.14), transparent 34%),
    radial-gradient(circle at 35% 70%, rgba(245, 226, 221, 0.88), transparent 26%),
    radial-gradient(circle at 72% 35%, rgba(32, 22, 31, 0.1), transparent 18%);
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.brand-button {
  padding: 0;
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.topbar-row,
.topbar-title-row {
  display: flex;
  width: 100%;
  align-items: center;
}

.topbar-row {
  justify-content: space-between;
  gap: 16px;
}

.topbar-meta {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.topbar-title-row {
  justify-content: center;
}

.page-title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 36px;
  font-weight: 600;
  text-align: center;
}

.page-intro {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.page-subtitle {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: #5a5a5a;
  text-align: center;
}

body[data-view="moods"] .page-subtitle,
body[data-view="moods"] .eyebrow,
body[data-view="moods"] .topbar-studio {
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-heading h2,
.panel-header h3,
.landing-copy h1 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.1;
}

.section-heading h2 {
  font-size: 36px;
}

.section-description,
.landing-description,
.landing-subtitle {
  margin: 0;
  color: #5a5a5a;
  line-height: 1.7;
  font-size: 14px;
}

.landing-copy h1 {
  font-size: 40px;
}

.landing-subtitle {
  font-size: 14px;
  color: var(--ink);
}

.primary-button,
.secondary-button,
.upload-control {
  border-radius: 12px;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.primary-button,
.secondary-button {
  padding: 0.95rem 1.5rem;
}

.primary-button {
  background: #1a1a1a;
  color: #ffffff;
  box-shadow: none;
}

.primary-button:hover,
.secondary-button:hover,
.upload-control:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  background: #000000;
}

.secondary-button {
  background: #f1f2f4;
  color: #333333;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.primary-button.small {
  padding: 0.8rem 1.1rem;
}

.secondary-button.small {
  padding: 0.8rem 1.1rem;
}

.panel {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.panel-header {
  margin-bottom: 1rem;
}

.panel-header h3 {
  font-size: 18px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #1a1a1a;
}

.upload-control {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 16px 24px;
  margin-bottom: 24px;
  background: #ffffff;
  border: 1px dashed rgba(0, 0, 0, 0.08);
}

.upload-hint {
  color: #8a8a8a;
  font-size: 12px;
}

.upload-grid,
.suggestions-stack {
  display: grid;
  gap: 1rem;
}

.mode-switcher {
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mode-switcher.is-visible {
  display: flex;
}

.mode-switcher-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mode-switcher-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f1f2f4;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #444444;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.mode-switcher-button.is-active {
  background: var(--mode-pill-accent, var(--accent));
  color: #ffffff;
  box-shadow: none;
}

.mode-manage-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #f1f2f4;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #444444;
  font-size: 14px;
  font-weight: 700;
}

.mood-card {
  position: relative;
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 280px;
  padding: 24px;
  text-align: left;
  color: #fffaf5;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(32, 22, 31, 0.08), rgba(32, 22, 31, 0.78)),
    radial-gradient(circle at top right, rgba(123, 41, 63, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(123, 41, 63, 0.3), rgba(32, 22, 31, 0.72));
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 6px 12px rgba(0, 0, 0, 0.06);
  isolation: isolate;
  transition:
    transform 450ms ease,
    box-shadow 450ms ease,
    filter 450ms ease;
}

.mood-card::before,
.mood-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.mood-card::before {
  background:
    linear-gradient(180deg, rgba(20, 14, 18, 0.04), rgba(20, 14, 18, 0.6)),
    var(--mood-preview, linear-gradient(135deg, rgba(123, 41, 63, 0.28), rgba(32, 22, 31, 0.72)));
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  z-index: -2;
  transition: transform 600ms ease;
}

.mood-card::after {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0), transparent 60%),
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.45),
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0)
    );
  z-index: -1;
  opacity: 1;
  transition: opacity 450ms ease, background 450ms ease;
}

.mood-card-meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.84;
}

.mood-card-title {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.mood-card-subtitle {
  margin: 0;
  max-width: 28ch;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 249, 246, 0.88);
}

.pinterest-cta-button {
  width: 100%;
  margin-top: 24px;
  padding: 12px 18px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid var(--pinterest);
  color: var(--pinterest);
  font-size: 14px;
  font-weight: 600;
  transition:
    transform 220ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease;
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.canvas-note {
  margin: 0;
  max-width: 28rem;
  color: #5a5a5a;
  line-height: 1.6;
  font-size: 14px;
}

.saved-look-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 16px;
  text-align: left;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.saved-look-card strong {
  font-size: 16px;
}

.saved-look-card span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a8a8a;
}

.saved-looks-panel[hidden] {
  display: none;
}

.saved-looks-panel {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 24px;
}

.saved-looks-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 18, 20, 0.34);
  backdrop-filter: blur(10px);
}

.saved-looks-sheet {
  position: relative;
  width: min(540px, 100%);
  padding: 24px;
}

.saved-looks-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.saved-looks-header h3 {
  margin: 8px 0 0;
  font-size: 24px;
}

.saved-looks-list {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.scope-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f1f2f4;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #444444;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scope-button.is-active {
  background: var(--accent);
  color: #fffaf7;
}

.upload-category-field {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.wardrobe-list,
.modal-checkbox-list {
  display: grid;
  gap: 10px;
}

.wardrobe-list-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.wardrobe-list-button {
  width: 100%;
  justify-content: flex-start;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  font-size: 15px;
  font-weight: 500;
}

.wardrobe-list-button.is-active {
  background: #1a1a1a;
  color: #fffaf7;
}

.wardrobe-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #f1f2f4;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #444444;
  font-size: 14px;
  font-weight: 700;
}

.wardrobe-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 12;
  display: grid;
  gap: 4px;
  width: 200px;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
}

.wardrobe-menu-item {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.wardrobe-menu-item:hover {
  background: #f6f7f9;
}

.mode-checkbox-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.mode-checkbox-option input {
  width: 16px;
  height: 16px;
}

.mood-card-shell {
  position: relative;
}

.mood-card-shell .mode-manage-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
}

.upload-category-field span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.upload-category-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: var(--ink);
  appearance: none;
}

.toolbar-button-row,
.header-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.crop-modal[hidden] {
  display: none;
}

[hidden] {
  display: none !important;
}

.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.crop-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 22, 31, 0.38);
  backdrop-filter: blur(10px);
}

.crop-modal-panel {
  position: relative;
  width: min(38rem, 100%);
  padding: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.crop-modal-header,
.crop-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.crop-modal-header {
  margin-bottom: 1rem;
}

.crop-preview-wrap {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.crop-preview {
  position: relative;
  height: 18rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #fafafa;
}

.crop-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.crop-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(32, 22, 31, 0.18);
  pointer-events: none;
}

.crop-stage-image {
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  cursor: grab;
}

.crop-stage-image.is-dragging {
  cursor: grabbing;
}

.crop-frame {
  position: absolute;
  left: 16%;
  top: 14%;
  width: 68%;
  height: 72%;
  border-radius: 22px;
  border: 1px dashed rgba(255, 249, 245, 0.95);
  box-shadow:
    0 0 0 9999px rgba(32, 22, 31, 0.26),
    inset 0 0 0 1px rgba(123, 41, 63, 0.18);
  pointer-events: auto;
  cursor: move;
}

.crop-corner {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff8f4;
  box-shadow: 0 6px 12px rgba(36, 21, 30, 0.18);
  pointer-events: auto;
}

.corner-nw {
  left: -0.45rem;
  top: -0.45rem;
  cursor: nwse-resize;
}

.corner-ne {
  right: -0.45rem;
  top: -0.45rem;
  cursor: nesw-resize;
}

.corner-sw {
  left: -0.45rem;
  bottom: -0.45rem;
  cursor: nesw-resize;
}

.corner-se {
  right: -0.45rem;
  bottom: -0.45rem;
  cursor: nwse-resize;
}

.crop-controls {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.crop-field {
  display: grid;
  gap: 0.45rem;
}

.crop-field span {
  color: var(--muted);
  font-size: 12px;
}

.library-helper {
  margin: 0 0 24px;
  color: #8a8a8a;
  font-size: 12px;
  line-height: 1.6;
}

.pinterest-cta-button {
  width: 100%;
  margin-top: 24px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: #f3f4f6;
  color: #333333;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 220ms ease,
    transform 220ms ease;
}

.pinterest-cta-button:hover {
  background: #e9ebef;
  transform: translateY(-1px);
}

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