:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #43233e;
  background: #fff8f3;
  font-synthesis: none;
  --ink: #43233e;
  --muted: #806378;
  --line: #ebd4e3;
  --rose: #ad2367;
  --surface: #fffdfb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 0% 20%, #ffe0d899 0, transparent 40%),
              radial-gradient(ellipse at 100% 65%, #f0dfff99 0, transparent 42%), #fff8f3;
}
header {
  height: 88px; padding: 0 4vw; display: flex; align-items: center;
  border-bottom: 1px solid var(--line); gap: 24px; background: #fffaf5ed;
}
.brand {
  text-decoration: none; color: var(--ink); display: flex; align-items: center;
  gap: 9px; font-weight: 750; font-size: 22px; letter-spacing: -1px;
}
.brand > span:last-child { font-weight: 400; }
.mark { width: 48px; height: 48px; margin-right: 5px; }
.tag { color: var(--muted); font-size: 13px; }
#logout { margin-left: auto; }
main { padding: 42px 4vw; min-height: calc(100vh - 150px); }
h1 {
  font-weight: 500; font-size: clamp(38px, 5vw, 70px); line-height: 1.05;
  letter-spacing: -3px; margin: 14px 0 24px;
}
h2 { font-weight: 550; font-size: 22px; letter-spacing: -.6px; }
em { font-family: Georgia, serif; font-weight: 400; color: var(--rose); }
.eyebrow { font-size: 11px; letter-spacing: 2px; font-weight: 700; color: #a62467; }
.muted { color: var(--muted); line-height: 1.6; }
.small { font-size: 12px; }
.narrow { max-width: 530px; margin: 2vh auto; }
.card {
  background: var(--surface); padding: 36px 40px; border: 1px solid #efcdda;
  border-radius: 26px; position: relative; overflow: hidden;
  box-shadow: 0 18px 65px #a9356a0c;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, #a670e8, #f43e87 42%, #ff8555 72%, #ffbc42);
}
.login-blossom { display: block; margin-bottom: 20px; }
.card h1 { font-size: 49px; }
.card form { margin: 28px 0 24px; }
.card button { width: 100%; margin-top: 16px; }
button {
  font: inherit; font-size: 13px; cursor: pointer; border: 1px solid #e7c6db;
  border-radius: 10px; background: #fffdfb; color: #8f215c; padding: 11px 16px;
  white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s;
}
button:hover { background: #fff0f6; border-color: #d69abb; }
button:disabled { opacity: .5; cursor: wait; }
.primary {
  background: linear-gradient(115deg, #a52377, #bd285f 65%, #c43b4e);
  border-color: #ad2367; color: #fff; box-shadow: 0 4px 12px #ad236718;
}
.primary:hover { background: linear-gradient(115deg, #8d1d68, #a81f57 65%, #ad2f43); border-color: #8d1d68; }
.primary span { float: right; }
input, textarea {
  font: inherit; color: inherit; border: 1px solid #e5cada; border-radius: 10px;
  padding: 12px; background: #fffcfa; width: 100%;
}
input::placeholder, textarea::placeholder { color: #8b7283; }
label { display: block; font-size: 12px; font-weight: 650; margin: 15px 0 8px; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid #9a39ba; outline-offset: 3px; }
.intro { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 52px; gap: 20px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: 34px; }
.project {
  padding: 25px; border: 1px solid #ebcde0; background: #fffdfb; border-radius: 18px;
  display: flex; flex-direction: column; align-items: flex-start; min-height: 175px; gap: 10px;
  border-top: 4px solid #e95d96;
}
.project:nth-child(3n+2) { border-top-color: #a670e8; }
.project:nth-child(3n+3) { border-top-color: #f4a234; }
.project h2 { margin: 4px 0; overflow-wrap: anywhere; }
.project .row { display: flex; gap: 8px; flex-wrap: wrap; }
.empty {
  padding: 50px; border: 1px dashed #dba5ca; border-radius: 18px; grid-column: 1/-1;
  color: #806378; background: linear-gradient(120deg, #fff0f6b3, #fff6df99, #f5ecffb3);
}
.workbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#project-name { max-width: 250px; flex: 1; min-width: 150px; }
.hint { font-size: 11px; color: var(--muted); margin: 12px 0; }
.editor-layout { display: flex; gap: 14px; }
#editor {
  width: 100%; height: calc(100vh - 265px); min-height: 500px;
  border: 1px solid #dcb9d6; border-radius: 12px; background: #f5eef6;
}
aside {
  flex: 0 0 320px; background: #fffafa; border: 1px solid #ebcde0; border-top: 4px solid #a670e8;
  border-radius: 14px; padding: 22px; overflow: auto; max-height: calc(100vh - 265px);
}
aside button { width: 100%; margin-top: 10px; }
aside h2 { margin: 8px 0; }
.pill { border: 1px solid #d9b8e7; border-radius: 24px; padding: 10px 16px; font-size: 12px; background: #f5eaff; color: #703c91; }
.preview { border: 1px solid #ebcde0; background: white; border-radius: 20px; overflow: auto; padding: 15px; text-align: center; }
.preview img { max-width: 100%; height: auto; }
#notice {
  position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: #572347;
  color: white; border: 1px solid #ae6b99; border-radius: 12px; padding: 15px 24px;
  max-width: 90vw; z-index: 10; font-size: 13px; box-shadow: 0 8px 32px #64204722; white-space: pre-wrap;
}
footer { padding: 20px 4vw; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
footer a { color: #934270; }
[hidden] { display: none !important; }
@media (max-width: 800px) {
  header { height: 72px; } .tag { display: none; } main { padding: 25px 5vw; }
  .intro { align-items: flex-start; margin-bottom: 32px; } h1 { letter-spacing: -2px; }
  .section-title { display: block; } .editor-layout { flex-direction: column; }
  aside { flex: auto; max-height: none; width: 100%; } #editor { min-height: 520px; height: 70vh; }
  .card { padding: 28px 26px; } .card h1 { font-size: 40px; }
  .login-blossom { width: 60px; height: 60px; margin-bottom: 16px; }
  .workbar button { padding: 10px; } .intro .primary { margin-top: 15px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

/* The design workspace occupies the viewport; the editor owns its native sidebars. */
.work-logo { display: none; }
.work-actions, .panel-tools { display: flex; align-items: center; gap: 6px; }
.ai-close { float: right; }
body.editing { height: 100vh; height: 100dvh; overflow: hidden; background: #202023; }
.editing > header, .editing > footer { display: none; }
.editing > main { padding: 0; min-height: 0; height: 100%; }
.editing #work { height: 100%; display: flex; flex-direction: column; }
.editing .workbar {
  flex: 0 0 54px; min-height: 54px; padding: 7px 12px; gap: 8px; flex-wrap: nowrap;
  background: #29262d; border-bottom: 1px solid #45404b; color: #f8eff8;
}
.editing .work-logo { display: block; flex: 0 0 30px; }
.editing .workbar button {
  padding: 7px 10px; height: 34px; color: #efe6ef; background: transparent;
  border-color: #514755; border-radius: 7px; font-size: 12px;
}
.editing .workbar button:hover { background: #443247; border-color: #b472a3; }
.editing .workbar .primary { background: #ad2367; border-color: #c4397e; color: #fff; }
.editing #project-name {
  width: 220px; max-width: 300px; min-width: 110px; height: 34px;
  color: #fff2fb; background: #342e38; border-color: #514755; padding: 7px 10px; font-size: 13px;
}
.editing .work-actions { margin-left: auto; }
.editing .hint { display: none; }
.editing .editor-layout { flex: 1 1 0; min-height: 0; position: relative; display: flex; gap: 0; }
.editing #editor { display: block; flex: 1 1 0; min-width: 0; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; }
.editing #ai {
  position: absolute; inset: 0 0 0 auto; width: 350px; max-width: 92vw; max-height: none;
  border: 0; border-left: 1px solid #dabed9; border-radius: 0; padding: 24px;
  box-shadow: -12px 0 32px #170e202e; z-index: 2;
}
.editing #ai .ai-close { width: 30px; height: 30px; margin: -8px -8px 0 0; padding: 0; font-size: 24px; }
@media (max-width: 900px) {
  .editing .workbar { overflow-x: auto; scrollbar-width: thin; padding: 7px 8px; gap: 6px; }
  .editing .workbar > *, .editing .work-actions, .editing .panel-tools { flex-shrink: 0; }
  .editing #project-name { width: 155px; flex: 0 0 155px; }
  .editing .workbar button { padding: 7px 8px; }
  .editing .editor-layout { flex-direction: row; }
}

/* Floral workspace: compact file-browser navigation and editor menus. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body.browsing { height: 100vh; height: 100dvh; overflow: hidden; }
.browsing > header, .browsing > footer { display: none; }
.browsing > main { padding: 0; min-height: 0; height: 100%; }
#home { display: flex; height: 100%; }
.library-sidebar {
  flex: 0 0 236px; width: 236px; max-height: none; border: 0; border-right: 1px solid #ead9e5;
  border-radius: 0; padding: 22px 14px; background: #fbf1f7; display: flex; flex-direction: column; overflow-y: auto;
}
.library-brand { font-size: 20px; padding: 0 10px 22px; gap: 5px; }
.workspace-account { display: flex; gap: 10px; padding: 14px 9px 24px; align-items: center; }
.account-avatar { width: 32px; height: 32px; background: #ad2367; color: white; border-radius: 50%; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.workspace-account strong { font-size: 12px; font-weight: 650; }
.workspace-account div > span { display: block; font-size: 10px; margin-top: 4px; color: #806378; }
.library-sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.library-sidebar nav button { text-align: left; border: 0; margin: 0; background: none; border-radius: 7px; padding: 11px 13px; font-size: 12px; color: #67415c; }
.library-sidebar nav button span { display: inline-block; font-size: 17px; width: 25px; vertical-align: middle; }
.library-sidebar nav button:hover { background: #f2e1ef; }
.library-sidebar nav button[aria-current] { background: #f2d7e9; color: #8e1d58; font-weight: 650; }
.sidebar-bottom { margin-top: auto; padding: 32px 9px 0; }
.sidebar-bottom > p { font-size: 9px; letter-spacing: 1.5px; color: #98768b; }
.workspace-label { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 12px 0 20px; }
.sidebar-bottom a { display: block; margin-top: 16px; font-size: 10px; color: #94647e; text-decoration: none; }
.sidebar-bottom #logout { font-size: 11px; width: 100%; background: transparent; text-align: left; padding: 9px 12px; margin: 0; }
.file-browser { flex: 1; min-width: 0; overflow-y: auto; background: #fffafc; }
.library-topbar { height: 66px; padding: 0 32px; border-bottom: 1px solid #eee0e9; display: flex; align-items: center; gap: 20px; }
.file-search { display: flex; align-items: center; gap: 10px; margin: 0; width: 360px; max-width: 70%; color: #95617f; }
.file-search > span { font-size: 25px; }
.file-search input { padding: 9px 10px; font-size: 12px; border: 1px solid transparent; background: transparent; }
.file-search input:focus { background: white; }
.library-private { font-size: 11px; color: #98768b; margin-left: auto; }
.library-heading { padding: 32px 32px 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.library-heading h1 { font-size: 28px; letter-spacing: -.8px; margin: 8px 0 0; font-weight: 650; }
.library-heading .eyebrow { font-size: 9px; margin: 0; }
.library-heading button { font-size: 12px; border-radius: 7px; }
.file-controls { display: flex; justify-content: space-between; align-items: center; padding: 0 32px 18px; gap: 12px; }
.file-controls > div { display: flex; align-items: center; gap: 5px; }
.file-controls select { font: inherit; font-size: 11px; color: #806378; background: transparent; border: 0; padding: 8px 12px; }
.file-controls button { padding: 5px 10px; border: 0; background: transparent; font-size: 18px; border-radius: 6px; color: #94647e; }
.file-controls button[aria-pressed="true"] { background: #f2d7e9; color: #8e1d58; }
.file-browser .projects { margin: 0 32px 28px; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 22px; }
.file-browser .project { display: block; padding: 0; min-height: 0; overflow: hidden; border: 1px solid #e8d6e2; border-radius: 9px; background: #fffdfc; }
.file-browser .project:hover { border-color: #cb83ad; box-shadow: 0 3px 16px #8b28660c; }
.file-preview { width: 100%; display: grid; place-items: center; aspect-ratio: 16/10; padding: 16px; border: 0; border-bottom: 1px solid #eee0e9; border-radius: 0; background: #f4edf4; overflow: hidden; }
.file-preview:hover { background: #f1e7f1; }
.file-preview img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.file-placeholder { color: #c496bd; font-size: 42px; }
.file-info { padding: 15px 16px; }
.file-name { border: 0; padding: 0; background: none; color: #43233e; font-size: 13px; font-weight: 650; display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.file-name:hover { background: none; color: #ad2367; }
.file-info > p { margin: 6px 0 10px; font-size: 10px; }
.file-badge { color: #94647e; font-size: 10px; }
.file-sharing { align-items: center; justify-content: space-between; }
.revoke-link { padding: 3px 7px; font-size: 10px; border-radius: 5px; }
.file-browser .empty { background: transparent; border: 1px dashed #e4c8dc; text-align: center; padding: 64px 20px; }
.empty-symbol { display: block; font-size: 36px; color: #bf7eae; }
.empty h2 { font-size: 18px; margin: 16px 0 8px; }
.empty p { font-size: 12px; margin: 0; }
.library-note { margin: 0 32px 28px; color: #98768b; font-size: 10px; line-height: 1.6; }
.projects.list-layout { display: flex; flex-direction: column; gap: 9px; }
.projects.list-layout .project { display: flex; align-items: center; }
.projects.list-layout .file-preview { width: 112px; height: 80px; flex: 0 0 112px; border: 0; border-right: 1px solid #eee0e9; }
.projects.list-layout .file-info { flex: 1; min-width: 0; }
.projects.list-layout .empty { width: 100%; }
.editor-menus { display: flex; align-items: center; gap: 1px; }
.command-menu { position: relative; }
.command-menu summary { list-style: none; cursor: pointer; padding: 8px 8px; font-size: 11px; border-radius: 5px; }
.command-menu summary::-webkit-details-marker { display: none; }
.command-menu summary:hover, .command-menu[open] summary { background: #443247; }
.command-menu > div { position: absolute; top: calc(100% + 8px); left: 0; width: 235px; padding: 6px; background: #fffafc; border: 1px solid #d9bcd1; border-radius: 9px; box-shadow: 0 10px 35px #1b0d2833; color: #43233e; z-index: 20; }
.editing .command-menu button { display: flex; justify-content: space-between; align-items: center; width: 100%; height: auto; min-height: 31px; border: 0; color: #67415c; font-size: 11px; padding: 8px 10px; text-align: left; background: none; }
.editing .command-menu button:hover { color: #8e1d58; background: #f2d7e9; }
.command-menu hr { border: 0; border-top: 1px solid #ead9e5; margin: 5px 3px; }
.command-menu kbd { font-family: inherit; font-size: 10px; color: #98768b; }
#save-status { color: #bdaabc; font-size: 10px; white-space: nowrap; padding: 0 5px; }
.editing #project-name { max-width: 240px; }
#login.narrow { max-width: 430px; margin: 5vh auto; }
#login.card { padding: 32px; border-radius: 14px; }
#login .login-blossom { width: 48px; height: 48px; margin-bottom: 22px; }
#login h1 { font-size: 32px; letter-spacing: -1.1px; line-height: 1.15; }
#login .muted { font-size: 12px; }
#login .eyebrow { font-size: 9px; }
#login input, #login button { border-radius: 7px; }
.viewing > header { height: 58px; }
.viewing > header .mark { width: 32px; height: 32px; }
.viewing > header .brand { font-size: 18px; }
.viewing > header .tag { display: none; }
.viewing > main { padding: 0; }
.viewing #viewer .intro { padding: 20px 28px; margin: 0; background: #fffafc; border-bottom: 1px solid #ead9e5; }
.viewing #viewer .eyebrow { font-size: 9px; }
.viewing #view-name { font-size: 22px; letter-spacing: -.6px; margin: 8px 0; }
.viewing #view-updated { font-size: 11px; margin: 0; }
.viewing .preview { border: 0; border-radius: 0; padding: 36px; background: #f1e9f1; min-height: 65vh; }
.viewing .preview img { box-shadow: 0 8px 30px #43233e14; }
.viewing #viewer > p { padding: 0 28px; }
@media (max-width: 1000px) {
  .editing .panel-tools { display: none; }
  .editing #save-status { display: none; }
  .editing #project-name { width: 160px; max-width: 160px; }
}
@media (max-width: 900px) {
  .editing .workbar { overflow: visible; }
  .editing .editor-menus { flex-shrink: 0; }
  .editing .work-actions { flex-shrink: 1; }
  .editing #download { display: none; }
  .command-menu > div { position: fixed; top: 51px; left: 50px; }
}
@media (max-width: 650px) {
  .library-sidebar { width: 165px; flex-basis: 165px; padding: 18px 8px; }
  .library-brand { font-size: 16px; padding: 0 4px 15px; }.library-brand img { width: 28px; height: 28px; }
  .workspace-account { padding: 10px 4px 20px; }.workspace-account strong { font-size: 10px; }.workspace-account div > span { font-size: 9px; }
  .account-avatar { width: 26px; height: 26px; }.library-sidebar nav button { font-size: 11px; padding: 9px 7px; }
  .library-sidebar nav button span { width: 20px; }
  .library-topbar { padding: 0 16px; height: 58px; }.library-private { display: none; }.file-search { max-width: 100%; width: 100%; }
  .library-heading { padding: 24px 16px 18px; align-items: flex-start; flex-direction: column; }.library-heading h1 { font-size: 24px; }
  .file-controls { padding: 0 16px 15px; align-items: flex-start; flex-direction: column; }.file-controls select { padding-left: 0; }
  .file-browser .projects { margin: 0 16px 20px; grid-template-columns: minmax(0,1fr); }.library-note { margin: 0 16px 20px; }
  .file-browser .empty { padding: 32px 14px; }.empty h2 { font-size: 15px; }.empty p { font-size: 11px; }
  .projects.list-layout .file-preview { display: none; }
  .editing .workbar { overflow-x: auto; }.editing .workbar .work-actions { flex-shrink: 0; }
  .editing #project-name { width: 125px; flex: 0 0 125px; }
}
.projects.list-layout .project { flex-direction: row; text-align: left; }
