:root {
  color-scheme: light;
  --page: #fff8f7;
  --blush: #fff0f1;
  --rose-wash: #fce9eb;
  --paper: #fff;
  --ink: #23191b;
  --muted: #554245;
  --rose: #df6c87;
  --berry: #9d3854;
  --berry-hover: #bc516c;
  --line: rgba(219, 192, 195, .6);
  --line-soft: rgba(219, 192, 195, .5);
  --line-strong: rgba(219, 192, 195, .7);
  --shadow: 0 1px 2px rgba(35, 25, 27, .05);
  --display: "Playfair", Georgia, serif;
  --body: "Poppins", "Segoe UI", sans-serif;
  --mono: "Spline Sans Mono", Consolas, monospace;
  font: 14px/1.5 var(--body);
  color: var(--ink);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 1024px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button { border: 0; background: transparent; }
button:disabled { cursor: default; opacity: .58; }
::selection { background: #f4ccd6; color: var(--ink); }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; line-height: 18px; }
.mono { font: 500 12px/18px var(--mono); font-variant-numeric: tabular-nums; }

.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  overflow: hidden;
  direction: ltr;
  white-space: nowrap;
  font: normal 15px/1 "Material Symbols Outlined";
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 0;
  text-transform: none;
  color: var(--rose);
  user-select: none;
}
.icon.filled { font-variation-settings: "FILL" 1; }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 5;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--paper);
}

.page {
  display: grid;
  gap: 24px;
  max-width: 1280px;
  margin-inline: auto;
  padding: 24px 16px;
}
.hero, .workspace, main, .bottom { display: grid; gap: 24px; min-width: 0; }
.hero { align-items: center; }
.workspace, .bottom { align-items: start; }
.hero-copy { display: grid; gap: 8px; }
.studio { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 16px; }
.studio-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--ink); }
.studio-mark .icon { color: var(--page); }
h1 { font: 700 32px/38px var(--display); letter-spacing: -.25px; text-wrap: balance; }
h1 span { color: var(--rose); }
.hero-copy p { color: var(--muted); letter-spacing: .025em; }
.hero-photo {
  position: relative;
  overflow: hidden;
  height: 160px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--blush);
  box-shadow: var(--shadow);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background: linear-gradient(to right, rgba(255, 248, 247, .75), rgba(255, 248, 247, .2), transparent);
}
.hero-overlay span {
  padding: 4px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.sidebar, .panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}
.sidebar { gap: 24px; background: var(--blush); }
.sidebar-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 4px;
  color: var(--berry);
  font: italic 600 15px/22px var(--display);
}
.sidebar-section, .sidebar-links { display: grid; gap: 8px; }
.sidebar-links { gap: 4px; }
.sidebar-section h2 {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-inline: 4px;
  font: 500 14px/20px var(--body);
}
.sidebar-links a, .quick {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.sidebar-links .quick {
  padding-block: 8px;
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
  line-height: 20px;
}
.sidebar-links a:hover, .quick:hover { background: var(--rose-wash); color: var(--ink); }
.sidebar-links a[aria-current="location"] {
  border-color: var(--line-soft);
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  font-weight: 500;
}
.sidebar-links a[aria-current="location"] .icon { color: var(--berry); }
.studio-note {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--rose-wash);
}
.studio-note p { font: italic 12px/18px var(--body); }
.studio-note span { color: var(--berry); font-size: 12px; font-weight: 500; line-height: 16px; }

.panel { gap: 16px; background: var(--paper); box-shadow: var(--shadow); scroll-margin-top: 12px; }
.panel-header, .board-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.panel h2, dialog h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 24px/32px var(--display);
  letter-spacing: -.2px;
}
.panel h2 .icon { font-size: 24px; }
.panel h3 { font: 600 15px/22px var(--body); }
.toolbar, .tabs, .board-date, .gallery-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.gallery-meta, .board-date { gap: 8px; color: var(--muted); }
#board-month { color: var(--ink); font-weight: 600; }

.icon-button, .primary, .secondary, .tab, .token {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 10px;
  font: 500 12px/16px var(--body);
  transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}
.icon-button { width: 32px; height: 32px; padding: 0; color: var(--muted); }
.icon-button .icon, .primary .icon { color: inherit; }
.icon-button:hover, .icon-button[aria-expanded="true"] { background: var(--rose-wash); }
.primary { color: white; background: var(--berry); }
.primary:hover:enabled { background: var(--berry-hover); }
.secondary { background: var(--paper); border: 1px solid var(--line-strong); }
.secondary:hover:enabled, .tab:hover { background: var(--blush); }
.tab { color: var(--muted); }
.tab[aria-pressed="true"], button.token[aria-pressed="true"] {
  background: var(--rose-wash);
  color: var(--ink);
  font-weight: 600;
}
.token {
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  background: var(--blush);
}
button.token:hover { background: var(--rose-wash); }

.option-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  background: var(--blush);
}
.option-panel label, .field label { font-weight: 500; }
input, select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #aa878e;
  border-radius: 10px;
  background: var(--paper);
  accent-color: var(--berry);
  caret-color: var(--berry);
}
.option-panel select { width: auto; }
.option-panel input { flex: 1 1 250px; }
input::placeholder { color: #705b60; }

.metrics, .notes-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  text-align: left;
  transition: border-color 150ms ease-out;
}
.metric:hover { border-color: var(--rose); }
.metric[aria-pressed="true"] { border-color: var(--berry); }
.metric-art {
  display: grid;
  place-items: center;
  height: 96px;
  border-radius: 12px;
  background: var(--blush);
}
.metric-art .icon { font-size: 32px; }
.metric-title { display: flex; gap: 4px; align-items: center; font-size: 15px; font-weight: 600; line-height: 22px; }
.metric-description { color: var(--muted); }
.metric-progress { display: flex; width: 100%; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.progress-track { height: 8px; flex: 1; overflow: hidden; border-radius: 999px; background: var(--rose-wash); }
.progress-fill { display: block; height: 100%; border-radius: inherit; background: var(--rose); }

.board-scroll {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  scrollbar-color: #b36d80 var(--blush);
}
.board-grid { display: grid; grid-template-columns: repeat(5, minmax(151px, 1fr)); }
.stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 112px;
  gap: 8px;
  padding: 8px;
}
.stage + .stage { border-inline-start: 1px solid var(--line-soft); }
.stage > header { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.stage > header h3 { font-size: 12px; font-weight: 500; line-height: 16px; color: var(--muted); }
.stage-list { display: grid; gap: 8px; }
.order-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--blush);
  overflow-wrap: anywhere;
}
.order-card:focus-within { border-color: var(--berry); }
.order-title, .text-button {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  color: var(--berry);
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .17em;
  overflow-wrap: anywhere;
}
.order-title { font: 600 13px/18px var(--body); }
.order-title:hover, .text-button:hover { text-decoration-color: currentColor; }
.order-card p, .order-card time { font-size: 12px; line-height: 18px; }
.order-card .target-date { display: block; color: var(--berry); font-family: var(--mono); }
.due-state { display: block; font-weight: 600; }
.due-state[data-state="late"] { color: #9e1e34; }
.due-state[data-state="today"] { color: #795000; }
.due-state[data-state="shipped"] { color: #00612b; }
.advance {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  min-height: 32px;
  width: 100%;
  margin-top: 3px;
  padding: 4px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--berry);
  background: var(--paper);
  font-size: 12px;
  text-align: left;
}
.advance:hover:enabled { background: var(--rose-wash); }
.advance .icon { color: inherit; }
.empty-board { padding: 8px 10px; border-radius: 10px; background: var(--blush); }

.note-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; overflow-wrap: anywhere; }
.note-card img { width: 100%; height: 96px; object-fit: cover; }
.note-content { display: grid; gap: 4px; padding: 8px; }
.note-card h3 { display: flex; align-items: baseline; gap: 4px; }
.note-card .token { min-height: auto; width: fit-content; padding: 2px 8px; border-radius: 6px; }
.note-copy { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.note-copy p { flex: 1; }
.note-copy h3 { font-size: 12px; line-height: 16px; }

.calendar, .calendar-summary, .calendar-orders { display: grid; gap: 8px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-variant-numeric: tabular-nums; }
.weekday { font-size: 12px; font-weight: 500; line-height: 16px; color: var(--muted); }
.calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  width: min(28px, 100%);
  height: 28px;
  justify-self: center;
  padding: 0;
  border-radius: 50%;
  font: 500 12px/18px var(--mono);
}
.calendar-day:hover { background: var(--rose-wash); }
.calendar-day[aria-current="date"] { box-shadow: inset 0 0 0 1px var(--berry); }
.calendar-day[aria-pressed="true"] { background: var(--berry); color: var(--paper); }
.calendar-day[data-has-orders]::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--berry);
}
.calendar-day[aria-pressed="true"]::after { background: var(--paper); }
.calendar-summary { padding-top: 8px; border-top: 1px solid var(--line-soft); }
.calendar-summary h3, .calendar-orders li { display: flex; align-items: baseline; gap: 4px; }
.calendar-orders li { gap: 8px; color: var(--muted); font-size: 12px; line-height: 18px; }

.notice {
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2adb9;
  border-radius: 10px;
  background: var(--rose-wash);
  color: #82253e;
  overflow-wrap: anywhere;
}
.notice button { margin-top: 6px; }
dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 16px 46px rgba(35, 25, 27, .22);
}
dialog::backdrop { background: rgba(35, 25, 27, .42); }
dialog form { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.field { display: grid; gap: 4px; }
.field-error { color: #9e1e34; font-size: 12px; }
input[aria-invalid="true"] { border-color: #9e1e34; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.form-actions button { min-height: 38px; }
.toast {
  position: fixed;
  pointer-events: none;
  z-index: 2;
  max-width: min(420px, calc(100% - 32px));
  right: 16px;
  bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  color: white;
  background: var(--berry);
  box-shadow: 0 4px 14px rgba(35, 25, 27, .18);
  overflow-wrap: anywhere;
}
.toast:empty { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.mobile-confirmation { display: none; }

@media (min-width: 640px) {
  .metrics, .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .toast { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .mobile-confirmation { display: block; padding: 4px 8px; color: var(--berry); background: white; border-inline-start: 2px solid var(--berry); overflow-wrap: anywhere; }
  .board-grid { grid-template-columns: repeat(5, minmax(210px, 1fr)); }
  .advance { min-height: 44px; }
  .order-title { display: block; min-height: 32px; }
  .form-actions button { min-height: 44px; }
  input, select { font-size: 16px; }
}

@media (min-width: 1024px) {
  .page { padding-inline: 32px; }
  .hero { grid-template-columns: minmax(0, 1fr) 420px; }
  h1 { font-size: 48px; line-height: 54px; letter-spacing: -.5px; }
  .hero-photo { height: 176px; }
  .workspace { grid-template-columns: 248px minmax(0, 1fr); }
  .sidebar { min-height: 1024px; }
  .panel { padding: 24px; }
  .bottom { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
}

@media (min-width: 1280px) {
  .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .portfolio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.portfolio-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.portfolio-photo { display: grid; place-items: center; aspect-ratio: 1; background: var(--blush); cursor: zoom-in; }
.portfolio-photo:focus-visible { outline-offset: -3px; }
.portfolio-photo img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.portfolio-caption { display: grid; gap: 4px; padding: 12px 16px; }
.portfolio-caption .mono, .portfolio-source { color: var(--berry); }
.portfolio-caption h3 { font: 600 15px/22px var(--body); }
.portfolio-source { font-size: 12px; width: fit-content; padding: 5px 0; text-underline-offset: 3px; }
.portfolio-shortcut { text-decoration: none; }
dialog#portfolio-viewer { width: min(670px, calc(100% - 24px)); padding: 16px; }
.portfolio-header, .portfolio-controls { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.portfolio-header h2 { font-size: 20px; }
#portfolio-full { width: 100%; height: min(58vh, 550px); object-fit: contain; margin-block: 12px; background: var(--page); border-radius: 10px; }
.portfolio-controls { justify-content: center; }
.portfolio-controls button, #portfolio-close { min-height: 44px; min-width: 44px; }
