:root {
  --bg: #e8e3d8;
  --panel: rgba(252, 250, 246, 0.92);
  --panel-soft: #f3efe6;
  --ink: #1f1c18;
  --muted: #69635d;
  --line: rgba(50, 44, 38, 0.14);
  --shadow: 0 22px 55px rgba(50, 39, 28, 0.12);
  --accent: #3b3937;
  --analysis-overlay-rgb: 31 28 24;
  --scan-focus-x: 50%;
  --scan-focus-y: 50%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.5), transparent 25%),
    linear-gradient(180deg, #f2ede4 0%, #e4dccf 100%);
  color: var(--ink);
  font-family: "Segoe UI", "Aptos", "Trebuchet MS", sans-serif;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

p,
ul {
  margin: 0;
}

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

.app {
  width: min(1360px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.title-row h1 {
  font-size: clamp(2.35rem, 5vw, 3.8rem);
}

.intro {
  max-width: 740px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 12px;
}

.header-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
  min-width: 0;
}

.top-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  justify-content: flex-end;
  align-items: center;
}

.top-nav-link {
  padding: 0 12px;
  color: var(--ink);
  font-size: 0.91rem;
  line-height: 1;
  border-right: 1px solid rgba(50, 44, 38, 0.18);
  transition: color 180ms ease, opacity 180ms ease;
}

.top-nav-link:first-child {
  padding-left: 0;
}

.top-nav-link:last-child {
  padding-right: 0;
  border-right: 0;
}

.top-nav-link:hover {
  color: #c96a3d;
}

.top-nav-link.is-current {
  opacity: 0.52;
  pointer-events: none;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.social-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(50, 44, 38, 0.1);
  background: rgba(255, 255, 255, 0.38);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.social-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(30, 25, 20, 0.2);
  opacity: 0.92;
}

.social-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  display: block;
}

.button,
.button-secondary {
  border-radius: 999px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  cursor: pointer;
  font: inherit;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button {
  background: #c96a3d;
  color: #ffffff;
  border-color: rgba(201, 106, 61, 0.26);
  box-shadow: 0 10px 24px rgba(201, 106, 61, 0.18);
}

.button-secondary {
  background: #c96a3d;
  color: #ffffff;
  border-color: rgba(201, 106, 61, 0.26);
  box-shadow: 0 10px 24px rgba(201, 106, 61, 0.18);
}

.button:hover,
.button-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 106, 61, 0.36);
  background: #cf7348;
}

.button[disabled],
.button-secondary[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 140ms ease, transform 140ms ease;
}

.back-link:hover {
  color: var(--ink);
  transform: translateX(-1px);
}

.back-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.left-column {
  display: grid;
  gap: 22px;
  align-content: start;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(61, 51, 40, 0.1);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 20px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.workspace-meta {
  text-align: right;
}

.overlay-color-control {
  position: relative;
  flex: 0 0 auto;
  margin-top: 10px;
}

.overlay-color-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(50, 44, 38, 0.12);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.overlay-color-button:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 106, 61, 0.24);
  background: rgba(255, 255, 255, 0.78);
}

.overlay-color-preview,
.overlay-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(31, 28, 24, 0.22);
  display: inline-block;
  flex: 0 0 auto;
}

.overlay-color-black {
  background: #1f1c18;
}

.overlay-color-white {
  background: #ffffff;
}

.overlay-color-red {
  background: #c96a3d;
}

.overlay-color-label {
  font-size: 0.88rem;
}

.overlay-color-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(252, 250, 246, 0.95);
  border: 1px solid rgba(61, 51, 40, 0.1);
  box-shadow: 0 18px 30px rgba(50, 39, 28, 0.12);
  z-index: 3;
}

.overlay-swatch {
  width: 22px;
  height: 22px;
  cursor: pointer;
  padding: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.overlay-swatch-black {
  background: #1f1c18;
}

.overlay-swatch-white {
  background: #ffffff;
  border-color: rgba(31, 28, 24, 0.26);
}

.overlay-swatch-red {
  background: #d34b2f;
}

.overlay-swatch:hover {
  transform: scale(1.06);
  border-color: rgba(31, 28, 24, 0.34);
}

.overlay-swatch.active {
  box-shadow: 0 0 0 3px rgba(201, 106, 61, 0.22);
  border-color: rgba(201, 106, 61, 0.62);
}

.studio-note-card {
  display: grid;
  gap: 18px;
}

.studio-note-copy {
  display: grid;
  gap: 12px;
}

.artist-feedback-block {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.artist-feedback-title {
  font-size: 1.28rem;
}

.artist-feedback-list {
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--ink);
}

.artist-feedback-list li {
  line-height: 1.5;
}

.artist-feedback-button {
  width: fit-content;
}

#analysisFileInput {
  display: none;
}

.canvas-wrap {
  position: relative;
  min-height: 620px;
  border-radius: 22px;
  border: 1px dashed rgba(62, 54, 47, 0.18);
  overflow: hidden;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(85, 76, 66, 0.05) 0,
      rgba(85, 76, 66, 0.05) 14px,
      transparent 14px,
      transparent 28px
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(241, 235, 225, 0.8));
  display: grid;
  place-items: center;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.canvas-wrap.upload-enabled {
  cursor: pointer;
}

.canvas-wrap.upload-enabled:hover,
.canvas-wrap.upload-enabled:focus-visible {
  border-color: rgba(62, 54, 47, 0.28);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(85, 76, 66, 0.06) 0,
      rgba(85, 76, 66, 0.06) 14px,
      transparent 14px,
      transparent 28px
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(241, 235, 225, 0.84));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
  outline: none;
}

.canvas-wrap.upload-enabled.dragover {
  border-color: rgba(59, 57, 55, 0.34);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(85, 76, 66, 0.075) 0,
      rgba(85, 76, 66, 0.075) 14px,
      transparent 14px,
      transparent 28px
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(241, 235, 225, 0.88));
}

.image-stage {
  width: 100%;
  height: 100%;
  min-height: 620px;
  display: grid;
  place-items: center;
  padding: 18px;
}

.analysis-surface {
  position: relative;
  width: fit-content;
  max-width: 100%;
  display: inline-block;
  border-radius: 18px;
  overflow: hidden;
  line-height: 0;
  isolation: isolate;
}

.filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.workspace-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(74vh, 760px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(50, 39, 28, 0.08);
  opacity: 0;
  transition: filter 720ms ease, transform 720ms ease, opacity 260ms ease;
}

.workspace-image.is-loaded {
  opacity: 1;
}

.image-loading-overlay {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  padding: 22px;
  border-radius: 18px;
  background: rgba(247, 242, 235, 0.78);
  border: 1px solid rgba(61, 51, 40, 0.1);
  box-shadow: 0 18px 36px rgba(50, 39, 28, 0.08);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 4;
}

.canvas-wrap.is-loading .image-loading-overlay,
.canvas-wrap.has-load-error .image-loading-overlay {
  opacity: 1;
}

.image-loading-copy {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  color: var(--ink);
}

.image-loading-title {
  font-size: 1rem;
  font-weight: 700;
}

.image-loading-subcopy {
  color: var(--muted);
  font-size: 0.88rem;
}

.status-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1250;
  max-width: min(320px, calc(100% - 28px));
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(61, 51, 40, 0.12);
  background: rgba(252, 250, 246, 0.95);
  color: var(--ink);
  box-shadow: 0 16px 32px rgba(50, 39, 28, 0.12);
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.status-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.analysis-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 520ms ease, transform 760ms ease;
}

.thirds-overlay {
  display: block;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(
      to right,
      transparent 0,
      transparent calc(33.333333% - 1px),
      rgb(var(--analysis-overlay-rgb) / 0.5) calc(33.333333% - 1px),
      rgb(var(--analysis-overlay-rgb) / 0.5) calc(33.333333% + 1px),
      transparent calc(33.333333% + 1px),
      transparent 100%
    ),
    linear-gradient(
      to right,
      transparent 0,
      transparent calc(66.666667% - 1px),
      rgb(var(--analysis-overlay-rgb) / 0.5) calc(66.666667% - 1px),
      rgb(var(--analysis-overlay-rgb) / 0.5) calc(66.666667% + 1px),
      transparent calc(66.666667% + 1px),
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(33.333333% - 1px),
      rgb(var(--analysis-overlay-rgb) / 0.5) calc(33.333333% - 1px),
      rgb(var(--analysis-overlay-rgb) / 0.5) calc(33.333333% + 1px),
      transparent calc(33.333333% + 1px),
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(66.666667% - 1px),
      rgb(var(--analysis-overlay-rgb) / 0.5) calc(66.666667% - 1px),
      rgb(var(--analysis-overlay-rgb) / 0.5) calc(66.666667% + 1px),
      transparent calc(66.666667% + 1px),
      transparent 100%
    );
}

.thirds-overlay line {
  display: none;
}

.center-overlay {
  background-image:
    linear-gradient(to right,
      transparent 0,
      transparent calc(50% - 0.5px),
      rgb(var(--analysis-overlay-rgb) / 0.32) calc(50% - 0.5px),
      rgb(var(--analysis-overlay-rgb) / 0.32) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)),
    linear-gradient(to bottom,
      transparent 0,
      transparent calc(50% - 0.5px),
      rgb(var(--analysis-overlay-rgb) / 0.32) calc(50% - 0.5px),
      rgb(var(--analysis-overlay-rgb) / 0.32) calc(50% + 0.5px),
      transparent calc(50% + 0.5px));
}

.focal-overlay {
  background:
    radial-gradient(circle at var(--scan-focus-x) var(--scan-focus-y), rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0.1) 10%, rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at var(--scan-focus-x) var(--scan-focus-y), rgb(var(--analysis-overlay-rgb) / 0.18) 0, rgb(var(--analysis-overlay-rgb) / 0.08) 14%, rgb(var(--analysis-overlay-rgb) / 0) 34%);
  transform: scale(0.98);
}

.scanning-overlay {
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.04) 40%,
      rgba(255, 255, 255, 0.22) 50%,
      rgba(255, 255, 255, 0.04) 60%,
      rgba(255, 255, 255, 0) 100%
    ),
    linear-gradient(
      90deg,
      rgb(var(--analysis-overlay-rgb) / 0) 0%,
      rgb(var(--analysis-overlay-rgb) / 0.03) 42%,
      rgb(var(--analysis-overlay-rgb) / 0.12) 50%,
      rgb(var(--analysis-overlay-rgb) / 0.03) 58%,
      rgb(var(--analysis-overlay-rgb) / 0) 100%
    );
  background-size: 34% 100%, 34% 100%;
  background-repeat: no-repeat;
  background-position: -34% 0, -34% 0;
  mix-blend-mode: screen;
  transform: translate3d(0, 0, 0);
}

.guidance-overlay,
.pull-overlay {
  mix-blend-mode: multiply;
}

.guidance-overlay {
  background:
    radial-gradient(circle at var(--scan-focus-x) var(--scan-focus-y), rgb(var(--analysis-overlay-rgb) / 0.16) 0, rgb(var(--analysis-overlay-rgb) / 0.07) 14%, rgb(var(--analysis-overlay-rgb) / 0) 34%);
}

.pull-overlay {
  background:
    radial-gradient(circle at var(--scan-focus-x) var(--scan-focus-y), rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0) 18%);
}

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

.analysis-surface::before {
  background:
    radial-gradient(circle at var(--scan-focus-x) var(--scan-focus-y), rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0) 22%, rgba(42, 36, 31, 0.06) 62%, rgba(42, 36, 31, 0.12) 100%);
  transition: opacity 620ms ease;
}

.analysis-surface::after {
  background:
    linear-gradient(180deg,
      rgba(245, 240, 232, 0.12) 0%,
      rgba(190, 180, 168, 0.08) 28%,
      rgba(120, 112, 105, 0.08) 52%,
      rgba(72, 66, 61, 0.1) 76%,
      rgba(35, 31, 28, 0.12) 100%);
  mix-blend-mode: multiply;
  transition: opacity 360ms ease;
}

.analysis-surface.stage-grid .thirds-overlay,
.analysis-surface.stage-final .thirds-overlay {
  opacity: 1;
}

.analysis-surface.stage-grayscale .thirds-overlay,
.analysis-surface.stage-contrast .thirds-overlay,
.analysis-surface.stage-posterize .thirds-overlay,
.analysis-surface.stage-center .thirds-overlay {
  opacity: 1;
}

.analysis-surface.stage-grayscale .workspace-image {
  filter: grayscale(1) contrast(1.04) brightness(1.02);
}

.analysis-surface.stage-contrast .workspace-image {
  filter: grayscale(1) contrast(1.18) brightness(1.03);
}

.analysis-surface.stage-posterize .workspace-image {
  filter: url("#valuePassFilter") saturate(0.18) contrast(1.08) brightness(1.02);
}

.analysis-surface.stage-posterize::after {
  opacity: 1;
}

.analysis-surface.stage-center .workspace-image {
  filter: grayscale(0.9) contrast(1.1) brightness(1.01);
}

.analysis-surface.stage-center .center-overlay {
  opacity: 0.58;
}

.analysis-surface.stage-center::before,
.analysis-surface.stage-focus-lock::before {
  opacity: 1;
}

.analysis-surface.stage-grid .scanning-overlay,
.analysis-surface.stage-contrast .scanning-overlay,
.analysis-surface.stage-posterize .scanning-overlay {
  opacity: 0.95;
  animation: scanSweep 1.45s ease-in-out 1 forwards;
}

.analysis-surface.stage-grayscale .scanning-overlay {
  opacity: 0.28;
}

.analysis-surface.stage-focus-lock .workspace-image {
  filter: grayscale(0.18) contrast(1.06) brightness(1.01);
}

.analysis-surface.stage-focus-lock .thirds-overlay,
.analysis-surface.stage-focus-lock .center-overlay,
.analysis-surface.stage-focus-lock .focal-overlay {
  opacity: 1;
}

.analysis-surface.stage-focus-lock .scanning-overlay {
  opacity: 0;
}

.analysis-surface.stage-focus-lock .focal-overlay {
  animation: focalPulse 1.6s ease-in-out 2;
}

.analysis-surface.stage-final .workspace-image {
  filter: none;
}

.analysis-surface.stage-final .thirds-overlay {
  opacity: 0.94;
}

.analysis-surface.stage-final .center-overlay,
.analysis-surface.stage-final .focal-overlay,
.analysis-surface.stage-final .scanning-overlay {
  opacity: 0;
}

.analysis-surface.stage-final .guidance-overlay,
.analysis-surface.stage-final .pull-overlay {
  opacity: 0;
}

.analysis-surface.stage-final.guidance-centered .center-overlay {
  opacity: 0.42;
}

.analysis-surface.stage-final.guidance-centered .guidance-overlay {
  opacity: 0.92;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0) 13%, rgb(var(--analysis-overlay-rgb) / 0.11) 17%, rgb(var(--analysis-overlay-rgb) / 0) 24%),
    radial-gradient(circle at 50% 50%, rgb(var(--analysis-overlay-rgb) / 0.06) 0, rgb(var(--analysis-overlay-rgb) / 0) 36%);
}

.analysis-surface.stage-final.guidance-low-clarity .focal-overlay {
  opacity: 0.72;
  animation: none;
}

.analysis-surface.stage-final.guidance-low-clarity .guidance-overlay {
  opacity: 1;
}

.analysis-surface.stage-final.guidance-left-heavy .pull-overlay,
.analysis-surface.stage-final.guidance-right-heavy .pull-overlay {
  opacity: 0.9;
}

.analysis-surface.stage-final.guidance-left-heavy .pull-overlay {
  background:
    linear-gradient(90deg, rgb(var(--analysis-overlay-rgb) / 0.16) 0%, rgb(var(--analysis-overlay-rgb) / 0.06) 16%, rgb(var(--analysis-overlay-rgb) / 0) 38%),
    linear-gradient(270deg, rgb(var(--analysis-overlay-rgb) / 0) 0%, rgb(var(--analysis-overlay-rgb) / 0.12) 48%, rgb(var(--analysis-overlay-rgb) / 0) 61%);
  background-position: left top, var(--scan-focus-x) var(--scan-focus-y);
  background-size: 100% 100%, 44% 18%;
  background-repeat: no-repeat;
}

.analysis-surface.stage-final.guidance-right-heavy .pull-overlay {
  background:
    linear-gradient(270deg, rgb(var(--analysis-overlay-rgb) / 0.16) 0%, rgb(var(--analysis-overlay-rgb) / 0.06) 16%, rgb(var(--analysis-overlay-rgb) / 0) 38%),
    linear-gradient(90deg, rgb(var(--analysis-overlay-rgb) / 0) 0%, rgb(var(--analysis-overlay-rgb) / 0.12) 48%, rgb(var(--analysis-overlay-rgb) / 0) 61%);
  background-position: right top, var(--scan-focus-x) var(--scan-focus-y);
  background-size: 100% 100%, 44% 18%;
  background-repeat: no-repeat;
}

.analysis-surface.stage-final::before,
.analysis-surface.stage-final::after {
  opacity: 0;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 24px;
  line-height: 1.6;
}

.upload-empty-state {
  pointer-events: none;
}

.upload-empty-state-inner {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.upload-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 1px solid rgba(62, 54, 47, 0.14);
  background: rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 24px rgba(50, 39, 28, 0.06);
  display: grid;
  place-items: center;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.canvas-wrap.upload-enabled:hover .upload-empty-icon,
.canvas-wrap.upload-enabled:focus-visible .upload-empty-icon,
.canvas-wrap.upload-enabled.dragover .upload-empty-icon {
  transform: translateY(-1px);
  border-color: rgba(62, 54, 47, 0.22);
  background: rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 28px rgba(50, 39, 28, 0.08);
}

.upload-empty-icon svg {
  width: 26px;
  height: 26px;
  stroke: rgba(31, 28, 24, 0.78);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-empty-label {
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  color: rgba(69, 63, 57, 0.92);
}

.upload-empty-subcopy {
  font-size: 0.86rem;
  color: rgba(105, 99, 93, 0.9);
}

.analysis-grid,
.placeholder-panel,
.side-panel {
  display: grid;
  gap: 16px;
}

.placeholder-card,
.detail-card,
.feedback-cta {
  padding: 18px;
  border-radius: 18px;
  background: var(--panel-soft);
  border: 1px solid rgba(59, 52, 45, 0.08);
}

.placeholder-card,
.detail-copy,
.feedback-description {
  color: var(--muted);
  line-height: 1.7;
}

.analysis-button {
  width: 100%;
  justify-content: center;
  font-weight: 700;
}

.premium-unlock-button {
  background: #c96a3d;
  color: #ffffff;
  border-color: rgba(201, 106, 61, 0.3);
  box-shadow: 0 14px 28px rgba(201, 106, 61, 0.22);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.premium-unlock-button:hover {
  background: #cf7348;
  border-color: rgba(201, 106, 61, 0.4);
  box-shadow: 0 16px 30px rgba(201, 106, 61, 0.26);
}

.status-helper {
  color: rgba(105, 99, 93, 0.9);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

#statusNote {
  transition: opacity 220ms ease;
}

#statusNote.is-fading {
  opacity: 0.28;
}

#quickCheckResult:not(.hidden) {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(59, 52, 45, 0.08);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 360ms ease, transform 420ms ease;
}

#quickCheckResult.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.result-label {
  margin-bottom: 0;
}

.quick-check-score {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  line-height: 0.96;
  color: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms ease, transform 380ms ease;
}

.quick-check-score.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.result-reason-list {
  display: grid;
  gap: 8px;
}

.result-reason-list p {
  position: relative;
  padding-left: 14px;
}

.result-reason-list p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(201, 106, 61, 0.6);
  transform: translateY(-50%);
}

.result-helper {
  color: rgba(105, 99, 93, 0.9);
  line-height: 1.6;
  font-size: 0.9rem;
}

.result-summary {
  color: var(--ink);
  line-height: 1.7;
}

.breakdown-toggle {
  width: fit-content;
  align-self: center;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(201, 106, 61, 0.26);
  background: #c96a3d;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(201, 106, 61, 0.18);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.breakdown-toggle:hover {
  border-color: rgba(201, 106, 61, 0.36);
  background: #cf7348;
  transform: translateY(-1px);
}

.result-details {
  display: grid;
  gap: 12px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 280ms ease, opacity 220ms ease;
}

.result-details.expanded {
  max-height: 2000px;
  opacity: 1;
}

.dynamic-breakdown {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(50, 44, 38, 0.08);
}

.notan-reading-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(50, 44, 38, 0.08);
  box-shadow: 0 16px 34px rgba(43, 35, 28, 0.07);
}

.notan-reading-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.notan-strength {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 700;
}

.notan-reading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.notan-tooltip {
  max-width: 240px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(201, 106, 61, 0.12);
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.45;
}

.notan-fix-panel {
  margin-top: 2px;
}

.notan-fix-panel .painters-fix-lock {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.notan-fix-panel .painters-fix-lock p {
  margin: 0;
}

.breakdown-section {
  display: grid;
  gap: 6px;
}

.breakdown-section-title {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.breakdown-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
  display: grid;
  gap: 4px;
}

.painters-fix {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(50, 44, 38, 0.08);
  overflow: hidden;
}

.painters-fix-list {
  display: grid;
  gap: 8px;
}

.painters-fix-line {
  color: var(--muted);
  line-height: 1.5;
}

.painters-fix.is-locked .painters-fix-line {
  filter: blur(3px);
  user-select: none;
}

.painters-fix-lock {
  position: absolute;
  inset: auto 12px 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(252, 250, 246, 0.88);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  box-shadow: 0 12px 26px rgba(50, 39, 28, 0.12);
}

#quickCheckTopSections {
  display: grid;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms ease, transform 380ms ease;
}

#quickCheckTopSections.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.result-block {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(50, 44, 38, 0.08);
  display: grid;
  gap: 5px;
}

.result-reveal {
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 320ms ease, transform 380ms ease;
}

.is-visible > .result-reveal,
.result-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-visible > .result-reveal:nth-child(1) {
  transition-delay: 40ms;
}

.is-visible > .result-reveal:nth-child(2) {
  transition-delay: 110ms;
}

.is-visible > .result-reveal:nth-child(3) {
  transition-delay: 180ms;
}

.result-block-title {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.result-suggestion {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(50, 44, 38, 0.08);
}

.result-breakdown {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(50, 44, 38, 0.08);
}

.score-breakdown-list {
  display: grid;
  gap: 10px;
}

.score-breakdown-row {
  display: grid;
  gap: 8px;
}

.score-breakdown-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.score-breakdown-label,
.score-breakdown-value {
  font-size: 0.86rem;
}

.score-breakdown-label {
  color: var(--ink);
  font-weight: 600;
}

.score-breakdown-value {
  color: var(--muted);
}

.score-breakdown-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(50, 44, 38, 0.08);
  overflow: hidden;
}

.score-breakdown-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(201, 106, 61, 0.72), rgba(201, 106, 61, 0.32));
}

.result-compare-summary {
  display: grid;
  gap: 4px;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms ease, transform 380ms ease;
}

.result-tags.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.result-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(50, 44, 38, 0.1);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 300ms ease, transform 360ms ease;
}

.result-tags.is-visible .result-tag {
  opacity: 1;
  transform: translateY(0);
}

.result-tags.is-visible .result-tag:nth-child(1) {
  transition-delay: 30ms;
}

.result-tags.is-visible .result-tag:nth-child(2) {
  transition-delay: 90ms;
}

.result-tags.is-visible .result-tag:nth-child(3) {
  transition-delay: 150ms;
}

.result-note {
  color: rgba(105, 99, 93, 0.88);
  font-size: 0.88rem;
  line-height: 1.5;
}

#freeCheckNote,
#freeDailyNote,
#streakNote {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms ease, transform 380ms ease;
}

#freeCheckNote.is-visible,
#freeDailyNote.is-visible,
#streakNote.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.streak-note {
  font-weight: 700;
  color: #c96a3d;
}

.free-limit-helper {
  margin-top: -6px;
  text-align: center;
}

.locked-title {
  font-size: 1.24rem;
}

.feedback-cta {
  display: grid;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(243, 239, 230, 0.96));
}

.feedback-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(50, 44, 38, 0.1);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 700;
}

.feedback-title {
  font-size: 1.28rem;
}

.feedback-list {
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--ink);
}

.feedback-list li {
  line-height: 1.5;
}

.feedback-button {
  width: fit-content;
}

.hidden {
  display: none;
}

.premium-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(420px, calc(100% - 28px));
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(201, 106, 61, 0.26);
  background: rgba(34, 28, 24, 0.94);
  color: #f8f3ec;
  box-shadow: 0 20px 36px rgba(20, 16, 13, 0.24);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.premium-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.footer {
  margin-top: 28px;
  padding: 20px 24px;
  border-radius: 22px;
  border: 1px solid rgba(59, 52, 45, 0.1);
  background: rgba(255, 255, 255, 0.42);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.footer-copy {
  color: var(--muted);
  line-height: 1.65;
}

.footer-links {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 16px;
  align-items: center;
}

.footer-link {
  color: var(--ink);
  font-size: 0.94rem;
}

.footer-link:hover {
  color: #c96a3d;
}

@keyframes scanSweep {
  0% {
    background-position: -34% 0, -34% 0;
  }

  100% {
    background-position: 134% 0, 134% 0;
  }
}

@keyframes focalPulse {
  0% {
    opacity: 0.2;
    transform: scale(0.94);
  }

  45% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0.42;
    transform: scale(1.04);
  }
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .left-column {
    gap: 18px;
  }

  .canvas-wrap,
  .image-stage {
    min-height: 520px;
  }
}

@media (max-width: 720px) {
  .app {
    width: min(100% - 22px, 1360px);
    padding-top: 22px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions,
  .top-nav,
  .social-links,
  .controls,
  .button,
  .button-secondary,
  .feedback-button {
    width: 100%;
  }

  .social-links,
  .controls {
    justify-content: flex-start;
  }

  .panel-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .overlay-color-control,
  .overlay-color-button {
    width: 100%;
  }

  .overlay-color-button {
    justify-content: center;
  }

  .overlay-color-menu {
    left: 0;
    right: auto;
  }

  .artist-feedback-button {
    width: 100%;
  }

  .workspace-meta {
    text-align: left;
  }

  .canvas-wrap,
  .image-stage {
    min-height: 360px;
  }

  .workspace-image {
    max-height: 56vh;
  }

  .image-loading-overlay {
    inset: 14px;
  }

  .status-toast {
    right: 14px;
    bottom: 14px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    grid-auto-flow: row;
    gap: 8px;
  }

  .notan-reading-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .notan-reading-grid {
    grid-template-columns: 1fr;
  }

  .notan-tooltip {
    max-width: none;
  }
}
