/* ───────────────────────────────────────────────────────────
   TeleFlora — styled after
   https://tanisha-humanouttheloop.netlify.app/
   ─────────────────────────────────────────────────────────── */

:root {
  --black: #000;
  --white: #fff;
  --grey:  #727272;
  --light-grey: #ebebeb;
  --green: #DEFF74;

  --radius: 6px;
  --gutter: 20px;
  --top-offset: calc(15vh + 20px);

  --fs-body: 18px;
  --fs-nav:  22px;
  --fs-mono: 14px;
  --fs-h1:   clamp(36px, 6vw, 72px);
  --fs-h2:   22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  position: relative;
  color: var(--black);
  background: linear-gradient(to bottom, #DEFF74 0%, #ffffff 15vh, #ffffff 100%) fixed;
  font-family: 'TASA Orbiter Variable', 'TASA Orbiter', ui-sans-serif, system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* top 15vh re-asserts the green wash over everything underneath */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 15vh;
  background: linear-gradient(to bottom, #DEFF74 0%, #ffffff 100%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover { opacity: 0.55; }

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

/* ───────── top navbar ───────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2vh var(--gutter) 20px;
  height: 15vh;
  box-sizing: border-box;
  background: transparent;
  z-index: 1000;
  isolation: isolate;
  font-family: 'Sometype Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: var(--fs-nav);
  line-height: 1;
}

.topbar-left, .topbar-right {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
  z-index: 1;
  color: var(--black);
  text-decoration: none;
  font-family: 'Sometype Mono', ui-monospace, monospace;
  font-size: var(--fs-nav);
  font-weight: 400;
  white-space: nowrap;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.nav-item:hover { opacity: 0.55; }
.nav-item.is-active { font-weight: 700; }

/* ───────── main layout wrappers ───────── */
.main {
  position: relative;
  z-index: 1;
  padding: var(--top-offset) var(--gutter) 40px;
  min-height: 100vh;
}

/* Two-column on laptops: hero on the left (sticky), content on the right. */
.split {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) 3fr;
  gap: 40px;
  align-items: start;
}
.split-left {
  position: sticky;
  top: var(--top-offset);
  align-self: start;
}
.split-right { min-width: 0; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 24px; }
  .split-left { position: static; }
}

/* Home page */
body.home-page .main {
  min-height: 100dvh;
  height: 100dvh;
  box-sizing: border-box;
  padding-top: calc(var(--top-offset) + 24px);
  padding-bottom: 12px;
}
body.home-page {
  overflow: hidden;
}
body.home-page .home-hero {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
body.home-page .home-hero-head {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
}
body.home-page .home-hero h1 {
  position: relative;
  z-index: 0;
  width: 100%;
  font-size: clamp(68px, 10.5vw, 170px);
  line-height: 0.92;
  margin: 0;
  overflow-wrap: anywhere;
}
body.home-page .home-intro {
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: var(--grey);
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(10px, 0.85vw, 12px);
  font-weight: 400;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
body.home-page .home-image-placeholder {
  width: calc(100% + (var(--gutter) * 2));
  aspect-ratio: 4 / 3;
  min-height: 0;
  height: auto;
  flex: 0 0 auto;
  overflow: hidden;
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
}
body.home-page .home-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  filter: brightness(1.04) saturate(0.95) hue-rotate(6deg);
  display: block;
  transform: scale(1);
  transform-origin: center;
}
@media (min-width: 901px) {
  body.home-page .home-image-placeholder {
    aspect-ratio: 16 / 7.5;
  }
}

@media (max-width: 900px) {
  body.home-page {
    overflow: auto;
  }
  body.home-page .main {
    height: auto;
    min-height: 100dvh;
    padding-top: var(--top-offset);
    padding-bottom: 20px;
  }
  body.home-page .home-hero {
    min-height: calc(100dvh - var(--top-offset) - 20px);
  }
  body.home-page .home-hero-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
    margin-bottom: 12px;
  }
  body.home-page .home-hero h1 {
    font-size: clamp(48px, 16vw, 84px);
    line-height: 0.94;
  }
  body.home-page .home-intro {
    font-size: clamp(11px, 2.8vw, 13px);
    line-height: 1.4;
  }
  body.home-page .home-image-placeholder {
    flex: 0 0 auto;
    aspect-ratio: 4 / 3;
    height: auto;
    margin-top: auto;
  }
  body.home-page .home-image-placeholder img {
    object-position: center 56%;
  }
}
@media (max-width: 1000px) {
  body.home-page .home-hero-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
  }
}

/* Gallery page: exact 1/3 text and 2/3 gallery */
body.gallery-page .split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
@media (max-width: 900px) {
  body.gallery-page .split {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  body.gallery-page .split-left {
    position: static;
    top: auto;
  }
}

/* Keep the create page inside one viewport with no body scroll. */
body.create-page {
  overflow: hidden;
}
body.create-page .main.split {
  min-height: 0;
  height: 100dvh;
  grid-template-columns: 1fr 2fr;
  padding: var(--top-offset) var(--gutter) 20px;
  box-sizing: border-box;
  gap: 28px;
  align-items: stretch;
}
body.create-page .split-left,
body.create-page .split-right {
  min-height: 0;
}
body.create-page .split-right {
  height: 100%;
  display: flex;
}
body.create-page .hero h1 {
  font-size: clamp(34px, 5.2vw, 64px);
}
body.create-page .hero .lede {
  margin-top: 12px;
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.28;
}
body.create-page .section {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
}
body.create-page .steps {
  margin-bottom: 12px;
}
body.create-page .draw-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 20px;
  padding-top: 0;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}
body.create-page .canvas-stage {
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1;
  justify-self: start;
}
body.create-page .draw-controls {
  gap: 12px;
}
body.create-page .sv-area {
  height: 120px;
}
body.create-page .divider {
  margin: 12px 0;
}

@media (max-width: 900px) {
  body.create-page {
    overflow: auto;
  }
  body.create-page .main.split {
    height: auto;
    min-height: 100vh;
    box-sizing: border-box;
    padding: var(--top-offset) var(--gutter) 24px;
    grid-template-columns: 1fr;
    padding-bottom: 24px;
  }
  body.create-page .section {
    height: auto;
    display: block;
    padding-bottom: 16px;
  }
  body.create-page .draw-wrap {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    gap: 16px;
  }
  body.create-page .canvas-stage {
    width: min(100%, 560px);
    height: auto;
    max-height: none;
    margin: 0 auto;
    justify-self: auto;
  }
  body.create-page .draw-controls {
    width: min(100%, 560px);
    margin: 0 auto;
  }
  body.create-page .color-picker-hsv {
    width: 100%;
    flex: 0 0 auto;
  }
  body.create-page .divider {
    margin-top: 54px;
    margin-bottom: 8px;
  }
  body.create-page .section > .btn-row {
    padding-bottom: 14px;
  }
}

.hero {
  padding: 0;
}
.hero h1 {
  font-size: var(--fs-h1);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.hero .lede {
  margin-top: 18px;
  max-width: 62ch;
  font-size: var(--fs-body);
}
.hero .tag {
  margin-top: 16px;
  color: var(--grey);
  font-family: 'Sometype Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ───────── sections ───────── */
.section {
  padding: 0 0 28px;
  border-bottom: 1px solid var(--black);
  margin-bottom: 28px;
}
.section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
}
.section-head .meta {
  font-family: 'Sometype Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ───────── inline bracket buttons (rounded, mono) ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--black);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  font-family: 'Sometype Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background .14s ease, color .14s ease;
}
.btn:hover  { background: var(--black); color: var(--white); opacity: 1; }
.btn.is-active { background: var(--black); color: var(--white); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.btn.primary {
  background: var(--black);
  color: var(--white);
}
.btn.primary:hover { background: var(--white); color: var(--black); }
.btn.ghost { border-color: var(--grey); color: var(--grey); }

/* ───────── gallery grid ───────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--black);
  border-left: 1px solid var(--black);
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 1000px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

.flower-card {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  padding: 16px;
  transition: background .15s ease;
  overflow: hidden;
  background: var(--white);
}
.flower-card:hover { background: #fafafa; }

.flower-disc {
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--black);
  background: #fff;
  display: block;
  object-fit: cover;
}
.flower-meta {
  position: absolute;
  left: 10px; right: 10px; bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Sometype Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey);
}
.flower-meta .name  { color: var(--black); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flower-meta .state { color: var(--black); font-weight: 700; }

.card-delete {
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  border: 1px solid var(--black);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-family: 'Sometype Mono', monospace;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease, background .12s ease, color .12s ease;
  z-index: 2;
}
.flower-card:hover .card-delete { opacity: 1; }
.card-delete:hover { background: var(--black); color: var(--white); }

/* ───────── forms ───────── */
.form-grid {
  display: grid;
  gap: 16px;
  max-width: 540px;
  background: var(--white);
  padding: 26px 24px;
  border: 1px solid var(--black);
  border-radius: var(--radius);
}
/* Right-align the sign-in card inside the split's right column */
#loginView .form-grid { margin-left: auto; }

/* Sign-in layout: a little decorative preview on the left, the sign-in
   card on the right with breathing room on both sides. */
.login-layout {
  display: flex;
  align-items: stretch;
  gap: 40px;
  min-height: 460px;
}
.login-layout .form-grid {
  flex: 0 0 auto;
  width: 440px;
  max-width: 100%;
  margin-right: 36px;
  margin-left: auto;
}
.login-preview {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 40%, rgba(222,255,116,0.35), transparent 50%),
    radial-gradient(circle at 80% 75%, rgba(222,255,116,0.25), transparent 55%),
    #fafafa;
  overflow: hidden;
}

/* My page desktop: 3 equal visual columns
   [intro text] [garden] [sign in] */
body.my-page {
  overflow: hidden;
}
body.my-page .main.split {
  min-height: 0;
  height: 100dvh;
  padding: var(--top-offset) var(--gutter) 20px;
  box-sizing: border-box;
}
body.my-page .split {
  grid-template-columns: 1fr 2fr;
  gap: 28px;
  align-items: stretch;
}
body.my-page .split-left {
  position: static;
  top: auto;
  align-self: stretch;
}
body.my-page .hero {
  height: 100%;
}
body.my-page .split-right {
  min-width: 0;
  height: 100%;
}
body.my-page #loginView {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
  height: 100%;
}
body.my-page .login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
  min-height: 0;
  height: 100%;
}
body.my-page .login-layout .form-grid {
  width: 100%;
  max-width: none;
  margin: 0;
  height: 100%;
}
body.my-page .login-preview {
  min-height: 100%;
}

/* Admin page desktop: text 1/3, content 2/3 */
body.admin-page .split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 28px;
  align-items: start;
}
body.admin-page .split-right {
  min-width: 0;
}
body.admin-page .admin-login-gallery {
  display: none;
}
body.admin-page.admin-login-screen {
  overflow: hidden;
}
body.admin-page.admin-login-screen .main.split {
  --admin-border-gap: 6px;
  --admin-flower-size: 96px;
  --admin-edge-gap: 12px;
  --admin-border-cols: 12;
  --admin-border-rows: 5;
  --admin-border-width: calc(
    var(--admin-border-cols) * var(--admin-flower-size) +
    (var(--admin-border-cols) - 1) * var(--admin-border-gap)
  );
  --admin-border-height: calc(
    var(--admin-border-rows) * var(--admin-flower-size) +
    (var(--admin-border-rows) - 1) * var(--admin-border-gap)
  );
  --admin-bottom-height: var(--admin-flower-size);
  min-height: 0;
  height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--top-offset) var(--gutter) 14px;
  gap: 0;
}
body.admin-page.admin-login-screen .split-left,
body.admin-page.admin-login-screen .split-right {
  width: min(88vw, 500px);
}
body.admin-page.admin-login-screen .split-left {
  position: static;
  top: auto;
  align-self: auto;
}
body.admin-page.admin-login-screen .split-left .hero,
body.admin-page.admin-login-screen .split-right #loginView {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
body.admin-page.admin-login-screen .split-left .hero {
  text-align: center;
}
body.admin-page.admin-login-screen .split-left .hero .lede {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
body.admin-page.admin-login-screen .split-right .form-grid {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 20px 20px 18px;
  gap: 12px;
}
body.admin-page .admin-auth-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
body.admin-page .admin-auth-row .btn {
  height: 100%;
  min-height: 42px;
}
@media (max-width: 640px) {
  body.admin-page .admin-auth-row {
    grid-template-columns: 1fr;
  }
  body.admin-page .admin-auth-row .btn {
    width: fit-content;
  }
}
body.admin-page.admin-login-screen #adminMsg {
  margin: 0;
  min-height: 0;
}
body.admin-page.admin-login-screen #adminMsg:empty {
  display: none;
}
body.admin-page.admin-login-screen .admin-login-gallery {
  display: grid;
  gap: 6px;
}
body.admin-page.admin-login-screen .admin-login-gallery-left,
body.admin-page.admin-login-screen .admin-login-gallery-right {
  display: none !important;
}
body.admin-page.admin-login-screen .admin-login-gallery-bottom {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-top: auto;
  min-height: 0;
}
body.admin-page.admin-login-screen .admin-login-flower {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--black);
  border-radius: var(--radius);
  background: var(--white);
  display: grid;
  place-items: center;
  padding: 6px;
}
body.admin-page.admin-login-screen .admin-login-flower .disc {
  width: 78%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid var(--black);
  object-fit: cover;
}
body.admin-page.admin-login-screen .admin-login-flower.is-empty {
  background: #f5f5f5;
}

@media (max-width: 900px) {
  body.admin-page .split {
    grid-template-columns: 1fr;
  }
  body.admin-page.admin-login-screen {
    overflow: auto;
  }
  body.admin-page.admin-login-screen .main.split {
    height: auto;
    min-height: 100vh;
    padding: var(--top-offset) var(--gutter) 20px;
  }
  body.admin-page.admin-login-screen .admin-login-gallery {
    margin-top: 18px;
  }
  body.admin-page.admin-login-screen .admin-login-gallery-bottom {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 900px) {
  body.my-page {
    overflow: auto;
  }
  body.my-page .main.split {
    height: auto;
    min-height: 100vh;
    padding: var(--top-offset) var(--gutter) 40px;
  }
  body.my-page .split {
    grid-template-columns: 1fr;
  }
  body.my-page .split-left {
    align-self: start;
  }
  body.my-page .hero {
    height: auto;
  }
  body.my-page .login-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    height: auto;
  }
  body.my-page .login-preview {
    min-height: 100dvh;
    height: 100dvh;
  }
}
.login-preview::after {
  content: "[ GARDEN ]";
  position: absolute;
  top: 14px; left: 16px;
  font-family: 'Sometype Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--grey);
  pointer-events: none;
}
.preview-flower {
  position: absolute;
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--black);
  background: #fff;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: box-shadow .2s ease;
  cursor: grab;
  touch-action: none;
}
.preview-flower:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
}
.preview-flower.is-dragging {
  cursor: grabbing;
}
.preview-caption {
  position: absolute;
  left: 16px; right: 16px; bottom: 14px;
  font-family: 'Sometype Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--grey);
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .login-layout {
    flex-direction: column-reverse;
    min-height: 0;
    gap: 20px;
  }
  .login-layout .form-grid { margin-right: 0; margin-left: 0; width: 100%; }
  .login-preview { min-height: 220px; }
}
label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'Sometype Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--grey);
}
label.field input,
label.field textarea {
  padding: 10px 12px;
  border: 1px solid var(--black);
  background: #fff;
  font-family: 'TASA Orbiter Variable', sans-serif;
  font-size: var(--fs-body);
  color: var(--black);
  border-radius: var(--radius);
  resize: vertical;
}
label.field input:focus,
label.field textarea:focus { outline: 2px solid var(--green); outline-offset: -2px; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ───────── drawing canvas ───────── */
.draw-wrap {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 8px 0 0;
}
@media (max-width: 900px) {
  .draw-wrap { flex-direction: column; gap: 20px; }
}

.canvas-stage {
  position: relative;
  flex: 0 0 auto;
  width: min(70vh, 560px);
  max-width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--black);
  border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, #fafafa 0 8px, #fff 8px 16px);
  display: grid;
  place-items: center;
}
.canvas-circle {
  width: 92%;
  height: 92%;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--black);
  touch-action: none;
  cursor: crosshair;
  display: block;
}

.draw-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: 'Sometype Mono', monospace;
  font-size: 13px;
}
.draw-controls .title {
  font-size: 22px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--black);
  text-transform: none;
  letter-spacing: -0.01em;
}
.draw-controls .hint {
  color: var(--grey);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.toolrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* HSV picker — fixed width so the draw-wrap grid column doesn't resize
   when recent-color swatches appear. SV area and hue slider stack on top;
   the big "current color" chip sits alongside the recent colors below. */
.color-picker-hsv {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 280px;
  flex: 0 0 280px;
  touch-action: none;
}
.sv-area {
  position: relative;
  width: 100%;
  height: 150px;
  background-color: hsl(0, 100%, 50%);
  background-image:
    linear-gradient(to top,   #000, rgba(0,0,0,0)),
    linear-gradient(to right, #fff, rgba(255,255,255,0));
  border: 1px solid var(--black);
  border-radius: var(--radius);
  cursor: crosshair;
  user-select: none;
}
.sv-thumb {
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hue-slider {
  position: relative;
  width: 100%;
  height: 18px;
  background: linear-gradient(to right,
    #ff0000 0%, #ffff00 17%, #00ff00 33%,
    #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  border: 1px solid var(--black);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}
.hue-thumb {
  position: absolute;
  top: -3px;
  width: 6px; height: 24px;
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 2px;
  transform: translateX(-50%);
  pointer-events: none;
}
.picker-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}
.color-chip {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--black);
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px #fff;
}

/* Recent colors strip — up to 8 most-recently-used swatches.
   Sits next to the color chip in the picker footer. Fixed flex basis so
   a populated list doesn't widen the parent grid column. */
.recent-colors {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 22px;
}
.recent-swatch {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--black);
  padding: 0;
  cursor: pointer;
  background-clip: border-box;
  transition: transform .1s ease;
  box-shadow: inset 0 0 0 2px #fff;
}
.recent-swatch:hover { transform: scale(1.15); }

.size-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 140px;
  height: 2px;
  background: var(--black);
  outline: none;
}
.size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--black);
  border-radius: 50%;
  cursor: pointer;
}
.size-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--black);
  border-radius: 50%;
  cursor: pointer;
  border: 0;
}

/* step progress */
.steps {
  display: flex;
  gap: 0;
  border: 1px solid var(--black);
  border-radius: var(--radius);
  width: fit-content;
  margin-bottom: 18px;
  overflow: hidden;
}
.step {
  padding: 8px 14px;
  border-right: 1px solid var(--black);
  font-family: 'Sometype Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--grey);
  background: var(--white);
}
.step:last-child { border-right: none; }
.step.is-active { background: var(--black); color: var(--white); }
.step.is-done { color: var(--black); background: var(--green); }

/* ───────── admin grid ───────── */
.slots {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  border-top: 1px solid var(--black);
  border-left: 1px solid var(--black);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
@media (max-width: 900px) { .slots { flex-wrap: wrap; } }
@media (max-width: 520px) { .slots { flex-wrap: wrap; } }

.slot {
  flex: 1 1 0;
  aspect-ratio: auto;
  min-height: 180px;
  min-width: 0;
  border-right: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  position: relative;
  background: var(--white);
}
@media (max-width: 900px) {
  .slot { flex: 0 0 calc(100% / 3); min-height: 170px; }
}
@media (max-width: 520px) {
  .slot { flex: 0 0 calc(100% / 2); min-height: 160px; }
}
.slot-num {
  position: absolute;
  top: 8px; left: 10px;
  font-family: 'Sometype Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--grey);
  text-transform: uppercase;
}
.slot-empty {
  color: var(--grey);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'Sometype Mono', monospace;
}
.slot img.disc {
  width: 70%; aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--black);
  object-fit: cover;
}
.slot .slot-label {
  width: 100%;
  font-family: 'Sometype Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--black);
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot .slot-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-scroller {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.picker-nav {
  width: 40px;
  height: 40px;
  min-width: 40px;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  font-family: 'Sometype Mono', monospace;
}
.picker-viewport {
  min-width: 0;
  overflow: hidden;
}
.picker {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 150px);
  gap: 0;
  border-top: 1px solid var(--black);
  border-left: 1px solid var(--black);
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--white);
  border-radius: var(--radius);
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.picker::-webkit-scrollbar { display: none; }
.picker .flower-card { cursor: pointer; }
.picker .flower-card.is-selected { background: var(--green); }

/* ───────── states view (my page) ───────── */
.states {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--black);
  border-left: 1px solid var(--black);
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 720px) { .states { grid-template-columns: 1fr; } }
.manage-note-grid {
  width: calc((100% * 2 / 3) - 1px);
  max-width: none;
}
@media (max-width: 720px) {
  .manage-note-grid { width: 100%; }
}
.state-cell {
  border-right: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
  position: relative;
}
.state-cell.is-current { background: var(--green); }
.state-cell h3 {
  font-family: 'Sometype Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--grey);
  font-weight: 500;
}
.state-cell .disc-lg {
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--black);
}

/* ───────── utility ───────── */
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--grey); }
.small {
  font-size: 11px;
  font-family: 'Sometype Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mono {
  font-family: 'Sometype Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--light-grey);
  padding: 1px 6px;
  border-radius: 4px;
  word-break: break-all;
}
.divider {
  height: 1px;
  background: var(--black);
  margin: 20px 0;
}
.footer {
  margin-top: 40px;
  padding: 24px 0 0;
  border-top: 1px solid var(--black);
  font-family: 'Sometype Mono', monospace;
  font-size: 11px;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ───────── toast ───────── */
.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  background: var(--black);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: 'Sometype Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* hidden helper */
[hidden] { display: none !important; }

/* ───────── responsive nav ───────── */
@media (max-width: 720px) {
  .topbar {
    font-size: 12px;
    height: 72px;
    min-height: 72px;
    padding: 12px var(--gutter);
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
  }
  .topbar-left, .topbar-right { gap: 8px; flex-wrap: nowrap; }
  .topbar .nav-item {
    font-size: 12px;
  }
  :root { --top-offset: 98px; }
  .hero h1 { font-size: clamp(30px, 9vw, 56px); }
}
