@font-face {
  font-family: Editoriale;
  src: url("/fonts/EditorialeRegular.ttf");
  font-weight: 400;
}
@font-face {
  font-family: Editoriale;
  src: url("/fonts/Editoriale.ttf");
  font-weight: 700;
}
@font-face {
  font-family: Editoriale;
  src: url("/fonts/EditorialeItalic.ttf");
  font-style: italic;
}
@font-face {
  font-family: Editoriale;
  src: url("/fonts/EditorialeBoldItalic.ttf");
  font-weight: 700;
  font-style: italic;
}
@font-face {
  font-family: Contemporanea;
  src: url("/fonts/Contemporanea.ttf");
}
@font-face {
  font-family: Contemporanea;
  src: url("/fonts/ContemporaneaBold.ttf");
  font-weight: 700;
}
@font-face {
  font-family: Contemporanea;
  src: url("/fonts/ContemporaneaItalic.ttf");
  font-style: italic;
}
@font-face {
  font-family: Contemporanea;
  src: url("/fonts/ContemporaneaBoldItalic.ttf");
  font-weight: 700;
  font-style: italic;
}
:root {
  --ink: #232322;
  --muted: #62615d;
  --accent: #684237;
  --line: #e6e5e3;
  --paper: #fff;
  --surface: #f5f5f4;
  --keyboard: 0px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font:
    16px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  min-height: 44px;
  border: 1px solid #817e78;
  background: white;
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 14px;
  cursor: pointer;
}
button:hover {
  background: #f4efec;
}
button:active {
  background: #e9ddd6;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
button.primary:hover {
  background: #513328;
}
button.quiet {
  border-color: transparent;
  background: transparent;
}
button.selected,
button[aria-pressed="true"] {
  background: #f4efec;
  border-color: var(--accent);
  color: var(--accent);
}
button.icon-button {
  width: 44px;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
input,
select,
textarea {
  font-size: 16px;
  min-height: 44px;
  border: 1px solid #817e78;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 8px 10px;
  max-width: 100%;
  caret-color: var(--accent);
}
input:not([type="color"]):not([type="file"]),
select,
textarea {
  width: 100%;
}
input[type="color"] {
  width: 44px;
  padding: 6px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: #e6d7cf;
}
h1 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}
h2 {
  font-size: 20px;
  margin: 0 0 16px;
}
h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
p {
  margin: 0 0 16px;
}
small,
.muted {
  color: var(--muted);
  font-size: 14px;
}
.icon {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  flex-shrink: 0;
}
.site-header {
  padding: 12px 32px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand img {
  width: 96px;
  height: 64px;
  object-fit: contain;
}
.restaurant-name {
  font-family: Editoriale, Georgia, serif;
  font-size: 25px;
  line-height: 1.05;
}
.brand small {
  display: block;
  font-size: 13px;
  margin-top: 6px;
}
.main-nav {
  display: flex;
  gap: 8px;
}
.main-nav button {
  display: flex;
  align-items: center;
  gap: 8px;
}
.main {
  max-width: 1240px;
  padding: 32px;
  margin: auto;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.status {
  font-size: 13px;
  color: var(--muted);
}
.status.error {
  color: #9f3b32;
}
.public-note {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  margin-top: 32px;
  max-width: 85ch;
}
.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 32px 24px;
  display: flex;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.site-footer button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 13px;
  min-height: 32px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.document-list {
  background: white;
  border-radius: 8px;
}
.document-row {
  display: grid;
  grid-template-columns: 72px minmax(130px, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.document-row:last-child {
  border: 0;
}
.doc-title {
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  border: 0;
  padding: 0;
  background: none;
  display: block;
}
.document-row .actions button {
  font-size: 14px;
}
.mini-page {
  position: relative;
  background: white;
  overflow: hidden;
  aspect-ratio: 210/297;
  border: 1px solid #d2d0ca;
  width: 72px;
}
.mini-line {
  position: absolute;
  left: 4%;
  width: 92%;
  text-align: center;
  font-family: Editoriale;
  line-height: 1;
  white-space: pre;
}
.search {
  max-width: 260px;
}
.segmented {
  display: inline-flex;
  gap: 2px;
  background: #eeeae6;
  border-radius: 6px;
  padding: 2px;
  flex-shrink: 0;
}
.segmented button {
  min-height: 36px;
  border-color: transparent;
  padding: 4px 12px;
  background: transparent;
  font-size: 14px;
}
.segmented button[aria-pressed="true"] {
  background: white;
  color: var(--accent);
  border-color: transparent;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px;
}
.template {
  background: white;
  padding: 20px;
  border-radius: 8px;
}
.template-preview {
  padding: 18px 0 24px;
  display: flex;
  justify-content: center;
  background: #f5f4f1;
  margin: -20px -20px 20px;
  border-radius: 8px 8px 0 0;
}
.template .mini-page {
  width: 100px;
  box-shadow: 0 4px 12px #23232212;
}
.template p {
  font-size: 14px;
  color: var(--muted);
  min-height: 42px;
}
.template .actions {
  justify-content: space-between;
}
.template .variant {
  margin: 12px 0;
}
.library {
  display: grid;
  gap: 16px;
}
.asset {
  background: white;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  border-radius: 8px;
}
.asset img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.panel {
  background: white;
  padding: 24px;
  border-radius: 8px;
}
.field {
  margin-bottom: 18px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.banner {
  padding: 12px 16px;
  background: #f4efec;
  color: var(--accent);
  font-size: 14px;
  border-radius: 6px;
  margin: 16px 0;
}
.banner.error {
  background: #fff0ec;
  color: #9f3b32;
}
.empty {
  padding: 40px 20px;
  text-align: center;
  background: white;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
/* The editor is a document surface. Controls only appear after a block is selected. */
.editor-mode .site-header {
  padding-top: 6px;
  padding-bottom: 6px;
}
.editor-mode .brand img {
  width: 64px;
  height: 44px;
}
.editor-mode .restaurant-name {
  font-size: 20px;
}
.editor-mode .brand small {
  display: none;
}
.editor-main {
  padding: 0;
  max-width: none;
}
.editor-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 10px 24px;
  display: grid;
  grid-template-columns: 44px minmax(100px, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.editor-top .document-name {
  font-weight: 600;
  border-color: transparent;
  background: transparent;
  max-width: 500px;
  padding-left: 0;
  text-overflow: ellipsis;
}
.editor-top .actions {
  flex-wrap: nowrap;
}
.editor-subbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: #f5f5f4;
  border-bottom: 1px solid var(--line);
}
.editor-subbar .actions {
  gap: 6px;
}
.editor-subbar select {
  width: auto;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 70vh;
}
.workspace.with-inspector {
  grid-template-columns: minmax(0, 1fr) 320px;
}
.canvas-area {
  min-width: 0;
  overflow: auto;
  padding: 28px 24px 150px;
  touch-action: pan-x pan-y pinch-zoom;
}
.sheet {
  background: white;
  position: relative;
  margin: 0 auto;
  box-shadow: 0 8px 28px #23232216;
  flex-shrink: 0;
  isolation: isolate;
}
.sheet-outer {
  min-width: 100%;
  display: flex;
  padding-bottom: 30px;
}
.sheet .botanical {
  position: absolute;
  width: 16%;
  left: 2%;
  top: 2%;
  pointer-events: none;
}
.sheet .botanical.bottom {
  left: auto;
  top: auto;
  right: 2%;
  bottom: 2%;
}
.editable-block {
  position: absolute;
  white-space: pre-wrap;
  overflow-wrap: normal;
  word-break: normal;
  outline: 0;
  border: 1px solid transparent;
  margin: 0;
  padding: 0;
  line-height: var(--leading);
  font-size: var(--text-size);
  z-index: 1;
  cursor: text;
  min-height: var(--block-height);
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  caret-color: #684237;
}
.editable-block:hover {
  border-color: #d4c5bd;
}
.editable-block.selected {
  outline: 1px solid #9b7767;
  outline-offset: 4px;
}
.editable-block:empty::before {
  content: attr(data-placeholder);
  color: #817e78;
  pointer-events: none;
}
.editable-block[data-invalid="true"] {
  outline: 2px solid #9f3b32;
  outline-offset: 3px;
}
.editable-block:focus {
  outline: 2px solid #684237;
  outline-offset: 4px;
  z-index: 8;
}
.sheet .image-block {
  position: absolute;
  border: 1px solid transparent;
  cursor: pointer;
}
.image-block img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.image-block.selected {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.block-handle {
  position: absolute;
  z-index: 12;
  touch-action: none;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 1px solid var(--accent);
  background: white;
  color: var(--accent);
  box-shadow: 0 3px 8px #23232216;
}
.block-handle.move {
  cursor: move;
}
.block-handle.resize {
  cursor: nwse-resize;
}
.page-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  flex-wrap: wrap;
}
.page-strip button {
  font-size: 14px;
}
.page-strip button[aria-current="page"] {
  border-color: var(--accent);
  background: #f4efec;
}
.context-toolbar {
  position: fixed;
  bottom: calc(var(--keyboard) + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: white;
  box-shadow: 0 -3px 22px #23232214;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  white-space: nowrap;
}
.context-toolbar label {
  margin: 0;
}
.context-toolbar select {
  min-width: 110px;
  width: auto;
}
.context-toolbar input[type="number"] {
  width: 68px;
}
.context-toolbar .divider {
  height: 28px;
  width: 1px;
  background: var(--line);
  flex-shrink: 0;
}
.context-toolbar p {
  font-size: 14px;
  margin: 0;
}
.inspector {
  background: white;
  border-left: 1px solid var(--line);
  padding: 24px;
  max-height: calc(100vh - 150px);
  position: sticky;
  top: 80px;
  overflow: auto;
}
.inspector h2 {
  font-size: 18px;
}
.inspector .actions button {
  font-size: 14px;
}
.inspector-close {
  float: right;
}
.inspector details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 16px;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 8px 0;
  font-weight: 600;
}
.preflight {
  max-width: 760px;
  margin: 0 auto 20px;
}
.preflight ul {
  padding-left: 20px;
  margin: 0;
}
.preflight:empty {
  display: none;
}
.sheet-caption {
  max-width: 760px;
  margin: 16px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.export-menu {
  position: fixed;
  z-index: 40;
  background: white;
  right: 24px;
  top: 130px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 24px #23232216;
  display: grid;
  gap: 8px;
  min-width: 220px;
}
.legal-page {
  max-width: 760px;
}
.legal-page h2 {
  margin-top: 28px;
}
.legal-page p,
.legal-page li {
  max-width: 75ch;
}
.history-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.history-row button {
  font-size: 14px;
}
.loading {
  padding: 40px;
}
#notice {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 12px;
  max-width: calc(100vw - 24px);
  padding: 12px 20px;
  background: #232322;
  color: white;
  border-radius: 8px;
  z-index: 100;
  display: none;
  font-size: 14px;
}
#notice.show {
  display: block;
}
dialog {
  border: 0;
  border-radius: 12px;
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow: auto;
  padding: 28px;
}
dialog::backdrop {
  background: #23232270;
}
dialog .actions {
  margin-top: 20px;
}
@media (max-width: 900px) {
  .document-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px;
  }
  .document-row .actions {
    grid-column: 2;
  }
  .workspace.with-inspector {
    grid-template-columns: minmax(0, 1fr);
  }
  .inspector {
    position: fixed;
    top: 0;
    right: 0;
    bottom: calc(var(--keyboard) + env(safe-area-inset-bottom));
    width: min(360px, 100vw);
    max-height: none;
    z-index: 45;
    box-shadow: -8px 0 24px #23232212;
  }
  .editor-top {
    padding: 8px 16px;
  }
  .editor-subbar {
    padding: 8px 16px;
    gap: 8px;
  }
}
@media (max-width: 600px) {
  .site-header {
    padding: 12px 16px;
    display: block;
  }
  .brand img {
    width: 80px;
    height: 56px;
  }
  .restaurant-name {
    font-size: 22px;
  }
  .main-nav {
    margin-top: 14px;
    justify-content: space-between;
    gap: 4px;
  }
  .main-nav button {
    font-size: 14px;
    padding: 8px;
    flex: 1;
    justify-content: center;
  }
  .main-nav .icon {
    width: 18px;
    height: 18px;
  }
  .main {
    padding: 24px 16px;
  }
  .section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .section-head h1 {
    font-size: 24px;
  }
  .section-head .actions {
    width: 100%;
  }
  .search {
    max-width: none;
  }
  .site-footer {
    padding: 16px 16px 24px;
    gap: 4px 16px;
  }
  .document-row {
    padding: 16px 12px;
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .mini-page {
    width: 56px;
  }
  .doc-title {
    font-size: 16px;
  }
  .document-row .actions {
    grid-column: 1/-1;
    gap: 6px;
  }
  .document-row .actions button {
    font-size: 13px;
    padding: 8px 10px;
  }
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .template {
    padding: 14px;
    min-width: 0;
  }
  .template-preview {
    margin: -14px -14px 16px;
    padding: 16px;
  }
  .template .mini-page {
    width: 80px;
  }
  .template h2 {
    font-size: 17px;
  }
  .template p {
    min-height: 63px;
  }
  .template .actions > button {
    width: 100%;
  }
  .template .actions {
    gap: 12px;
  }
  .editor-mode .site-header {
    padding: 6px 16px;
  }
  .editor-mode .brand img {
    width: 52px;
    height: 36px;
  }
  .editor-mode .restaurant-name {
    font-size: 19px;
  }
  .editor-mode .main-nav {
    display: none;
  }
  .editor-main {
    padding: 0;
  }
  .editor-top {
    grid-template-columns: 36px minmax(60px, 1fr) auto;
    gap: 6px;
    padding: 6px 10px;
  }
  .editor-top .icon-button {
    width: 36px;
    padding: 6px;
  }
  .editor-top .actions {
    gap: 4px;
  }
  .editor-top .actions button {
    padding: 7px 9px;
    font-size: 14px;
  }
  .editor-top .document-name {
    font-size: 16px;
    min-width: 0;
  }
  .editor-subbar {
    flex-wrap: wrap;
    padding: 8px 12px;
  }
  .editor-subbar .status {
    order: 3;
    width: 100%;
    font-size: 12px;
    min-height: 18px;
  }
  .editor-subbar .actions {
    gap: 4px;
  }
  .editor-subbar .actions button {
    padding: 7px 9px;
    font-size: 13px;
  }
  .editor-subbar select {
    min-height: 40px;
    font-size: 14px;
    padding: 5px;
  }
  .canvas-area {
    padding: 20px 12px 140px;
  }
  .context-toolbar {
    left: 0;
    transform: none;
    max-width: none;
    width: 100%;
    border-radius: 0;
    gap: 6px;
    padding: 8px;
    min-height: 60px;
  }
  .context-toolbar .icon-button {
    flex-shrink: 0;
  }
  .editable-block {
    min-height: max(var(--block-height), 18px);
  }
  .editable-block:focus {
    font-size: max(16px, var(--text-size));
    line-height: 1.35;
    min-height: 32px;
    height: auto !important;
    background: white;
    white-space: pre-wrap;
    box-shadow: 0 4px 16px #23232216;
  }
  .page-strip {
    padding: 12px;
    gap: 6px;
  }
  .export-menu {
    right: 10px;
    top: 100px;
  }
  .sheet-caption {
    font-size: 12px;
  }
  .editor-mode .site-footer {
    padding-bottom: 100px;
  }
  .inspector {
    padding: 20px;
  }
  .public-note {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background-color 0.15s ease-out;
  }
}
@media print {
  .site-header,
  .editor-top,
  .editor-subbar,
  .context-toolbar,
  .site-footer {
    display: none;
  }
}
[hidden] {
  display: none !important;
}
.thumb-button {
  padding: 0;
}
.thumb-botanical {
  position: absolute;
  width: 28%;
  top: 2%;
  left: 2%;
}
.editor-mode .sheet .thumb-botanical {
  width: 16%;
}
@media (max-width: 600px) {
  .editable-block:not(:focus) {
    min-height: var(--block-height);
  }
}
.editable-block {
  border: 0;
  box-sizing: content-box;
}
.editable-block:hover:not(.selected):not(:focus) {
  outline: 1px solid #d4c5bd;
}
