/* The public entrance uses the same neutral palette and type as beka.global. */
.guest-nav { display: none; }
.ed-app:has(#auth-view:not([hidden])) {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
  background: #f5f5f7;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.ed-app:has(#auth-view:not([hidden])) > :is(.ed-topbar, .statusbar) { display: none; }
.ed-app:has(#auth-view:not([hidden])) .guest-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  position: sticky; top: 0; z-index: 4;
  min-height: 58px;
  padding: calc(6px + env(safe-area-inset-top)) max(calc((100vw - 1280px) / 2), 4vw, env(safe-area-inset-right)) 6px max(calc((100vw - 1280px) / 2), 4vw, env(safe-area-inset-left));
  border-bottom: 1px solid #dedee2; background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.guest-wordmark { display: flex; align-items: center; gap: 9px; font-size: 1.18rem; font-weight: 650; letter-spacing: -.052em; }
.guest-switch { display: flex; align-items: center; gap: 12px; }
.guest-switch a { display: grid; place-items: center; min-height: 44px; padding: 0 12px; font-size: .875rem; font-weight: 550; }
.guest-switch .to-menu { display: none; }
.guest-switch .to-login { color: #0066cc; }
.guest-switch a:hover { text-decoration: underline; }
#menu-editor, #login-card { scroll-margin-top: calc(72px + env(safe-area-inset-top)); }
#menu-editor:focus:not(:focus-visible), #login-card:focus:not(:focus-visible) { outline: none; }
#auth-view {
  flex: 1; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 376px);
  align-content: center; align-items: center; overflow: visible;
  width: min(92%, 1280px); max-width: none; min-height: 0;
  gap: clamp(28px, 3.8vw, 64px); margin: 0 auto;
  padding: clamp(36px, 6vh, 82px) 0;
}
#login-card {
  width: 100%; max-width: none; min-width: 0; margin: 0;
  padding: clamp(22px, 2.8vw, 38px);
  border: 1px solid #e1e1e6; border-radius: 24px; background: #fff;
  box-shadow: 0 8px 32px -22px #15151c38;
}
#login-card .auth-tabs:has(#auth-setup-tab[hidden]) { display: none; }
#auth-title { color: #1d1d1f; font-size: clamp(1.95rem, 2.7vw, 2.55rem); font-weight: 650; letter-spacing: -.053em; line-height: 1.04; text-wrap: balance; }
#login-card form > #auth-description { margin: 12px 0 25px; color: #636367; font-size: 1rem; line-height: 1.5; }
#login-card .form-label { color: #424245; font-weight: 550; font-size: .875rem; }
#login-card .form-input { border: 1px solid #c9c9ce; border-radius: 12px; box-shadow: none; background: #fff; color: #1d1d1f; min-height: 46px; }
#login-card .form-input:focus { outline: 2px solid #0071e3; outline-offset: 1px; }
#login-card .button.primary { margin-top: 21px; min-height: 45px; border-radius: 24px; background: #0071e3; color: #fff; box-shadow: none; border: 0; }
#login-card .button.primary:hover { background: #0066cc; }
#login-card .button.subtle { color: #0066cc; margin-top: 4px; background: transparent; }
#login-card .button.subtle:hover { text-decoration: underline; }
.guest-plan { border-top: 1px solid #e5e5ea; margin-top: 18px; padding: 18px 0 0; }
.guest-plan strong { font-size: .875rem; font-weight: 600; }
.guest-plan p { color: #6e6e73; font-size: .8125rem; line-height: 1.55; margin: 4px 0 0; max-width: 34ch; }

.menu-editor {
  --sheet: #f5efdf; --menu-ink: #32271f;
  width: 100%; min-width: 0; container-type: inline-size;
  background: #fff; border: 1px solid #dadade; border-radius: 22px;
  box-shadow: 0 16px 55px -27px #24242435, 0 3px 12px -8px #0002;
  overflow: hidden;
}
.menu-editor[data-paper="salbei"] { --sheet: #e2ebdf; --menu-ink: #213b2d; }
.menu-editor[data-paper="rose"] { --sheet: #f4e3df; --menu-ink: #522d31; }
.menu-titlebar, .menu-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 clamp(12px, 2.8cqi, 25px); }
.menu-titlebar { min-height: 49px; border-bottom: 1px solid #dedee2; }
.menu-document { display: flex; align-items: center; gap: 8px; min-width: 0; }
.menu-document svg { width: 17px; height: 17px; color: #707077; }
.menu-document h2 { font-size: .93rem; font-weight: 600; letter-spacing: -.025em; color: #1d1d1f; }
.menu-document h2 span,.menu-demo-label { color: #68686d; font-weight: 400; }
.menu-demo-label { font-size: .78rem; }
.menu-stage {
  display: grid; place-items: center; background: #f2f2f4;
  padding: clamp(18px, 4.8cqi, 40px);
}
.menu-sheet {
  width: 100%; display: grid; grid-template-columns: 41% minmax(0,1fr);
  color: var(--menu-ink); background: var(--sheet);
  box-shadow: 0 7px 17px -8px #201e1a60, 0 0 0 1px #0000000c;
}
.menu-photo { touch-action: pan-y pinch-zoom; position: relative; overflow: hidden; min-height: 100%; background: #302d26; }
.menu-photo img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 54% 50%; }
.menu-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg,#080b0cd9,transparent 58%); }
.menu-wordmark { position: absolute; z-index: 1; left: 10%; bottom: 8%; color: #fff; font-size: clamp(26px, 6.9cqi, 66px); font-weight: 720; line-height: .83; letter-spacing: -.082em; }
.menu-wordmark b { font-weight: inherit; }
.menu-wordmark span { color: #dfab81; }
.menu-copy { min-width: 0; display: flex; flex-direction: column; padding: clamp(14px, 3.6cqi, 32px); }
.menu-imprint, .menu-folio { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: clamp(.67rem, 1.5cqi, .78rem); line-height: 1.3; }
.menu-imprint { padding-bottom: clamp(7px, 1.6cqi, 14px); border-bottom: 1px solid currentColor; }
.menu-imprint span:first-child { font-weight: 650; letter-spacing: -.04em; }
.menu-title-wrap { margin: clamp(9px, 2.1cqi, 18px) 0 clamp(6px, 1.4cqi, 12px); }
.menu-sheet input {
  display: block; width: 100%; max-width: 100%; padding: 1px 0; margin: 0; border: 0; border-radius: 1px;
  color: inherit; background: transparent; box-shadow: none; text-overflow: ellipsis;
}
.menu-sheet input:hover { outline: 1px dashed #817362; outline-offset: 2px; }
.menu-sheet input:focus { outline: 2px solid #0071e3; outline-offset: 2px; background: #fff7; }
.menu-sheet .menu-heading { font: italic 500 clamp(31px, 7.4cqi, 72px)/1.12 Georgia, "Times New Roman", serif; letter-spacing: -.07em; }
.menu-editor[data-type="sans"] .menu-heading { font-family: inherit; font-style: normal; font-weight: 650; }
#menu-entries { padding: 0; margin: 0; list-style: none; }
#menu-entries li { padding: clamp(5px, 1.03cqi, 10px) 0; border-bottom: 1px solid color-mix(in srgb, currentColor 28%, transparent); }
.menu-item-name { font-family: inherit; font-size: clamp(.89rem, 2.35cqi, 1.25rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.15; }
.menu-item-detail { font-family: inherit; font-size: clamp(.74rem, 1.65cqi, .875rem); opacity: .8; line-height: 1.35; }
.menu-folio { margin-top: auto; padding-top: clamp(10px, 2.5cqi, 22px); }
.menu-controls { min-height: 52px; border-top: 1px solid #dedee2; }
.menu-tools, .menu-pages, .type-picker { display: flex; align-items: center; }
.menu-tools { gap: clamp(5px, 1.5cqi, 14px); }
.type-picker { position: relative; min-height: 42px; gap: 4px; font-weight: 550; }
.type-picker > span { font: 1.05rem Georgia,serif; color: #414145; }
.type-picker select { appearance: auto; font: inherit; font-size: .8125rem; background: transparent; color: #38383c; border: 0; min-height: 42px; max-width: 81px; cursor: pointer; }
.paper-picker { display: flex; border: 0; border-left: 1px solid #dedee2; padding: 0 0 0 7px; margin: 0; }
.paper-picker label { display: grid; position: relative; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.paper-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.swatch { width: 19px; height: 19px; border-radius: 50%; border: 1px solid #0002; pointer-events: none; }
.creme { background: #f5efdf; } .salbei { background: #e2ebdf; } .rose { background: #f4e3df; }
.paper-picker input:checked + .swatch { outline: 1.5px solid #55555a; outline-offset: 2px; }
.paper-picker input:focus-visible + .swatch { outline: 2px solid #0071e3; outline-offset: 3px; }
.menu-pages { gap: 1px; }
.menu-pages button { display: grid; place-items: center; width: 44px; min-height: 44px; border-radius: 8px; padding: 4px; }
.menu-pages button:hover:enabled { background: #f1f1f3; }
.menu-pages svg { width: 17px; height: 17px; }
#menu-prev svg { transform: rotate(180deg); }
#menu-page { font-size: .8rem; color: #515156; font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu-edit-hint { color: #67676b; font-size: .77rem; line-height: 1.45; padding: 0 clamp(12px, 2.8cqi, 25px) 12px; }

@media (min-width: 861px) and (max-height: 800px) {
  #auth-view { padding-block: 22px; }
  .menu-stage { padding: clamp(16px, 2.7cqi, 25px); }
  .menu-copy { padding: clamp(16px, 2.8cqi, 24px); }
  #menu-entries li { padding-block: 5px; }
  .menu-title-wrap { margin-block: 8px 4px; }
}
@media (max-width: 860px) {
  #auth-view {
    display: flex; flex-direction: column; justify-content: flex-start;
    width: min(100%, 630px); gap: 0;
    padding: 20px max(16px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  }
  .ed-app:has(#auth-view:not([hidden])) .guest-nav {
    padding: calc(3px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 3px max(14px, env(safe-area-inset-left));
  }
  .guest-switch { gap: 0; padding: 2px; border-radius: 25px; background: #eeeef0; }
  .guest-switch a { min-height: 44px; padding: 0 13px; font-size: .875rem; color: #515154; border-radius: 22px; }
  .guest-switch .to-menu { display: grid; }
  .ed-app:not(:has(:is(#login-card,#login-email):target)) .to-menu,
  .ed-app:has(:is(#login-card,#login-email):target) .to-login {
    background: #fff; color: #1d1d1f; box-shadow: 0 1px 5px #0002;
  }
  #auth-view:not(:has(:is(#login-card,#login-email):target)) #login-card { display: none; }
  #auth-view:has(:is(#login-card,#login-email):target) #menu-editor { display: none; }
  #login-card { width: 100%; max-width: 440px; padding: clamp(23px, 5vw, 34px); }
  #auth-title { font-size: 2.15rem; }
}
@media (max-width: 540px) {
  #auth-view { padding-top: 12px; padding-inline: max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right)); }
  .guest-wordmark { font-size: 1.04rem; gap: 6px; }
  .guest-switch a { padding-inline: 9px; }
  .menu-editor { border-radius: 17px; }
  .menu-titlebar { min-height: 44px; padding: 0 13px; }
  .menu-stage { padding: 10px; }
  .menu-sheet { grid-template-columns: minmax(0,1fr); }
  .menu-photo { height: clamp(95px, 29cqi, 136px); min-height: 0; }
  .menu-photo img { object-position: 50% 47%; }
  .menu-photo::after { background: linear-gradient(90deg, #090c0ece, #090c0e18 72%); }
  .menu-wordmark { left: 14px; bottom: 14px; font-size: 27px; letter-spacing: -.07em; }
  .menu-wordmark br { display: none; }
  .menu-wordmark .word-two::before { content: " "; }
  .menu-copy { padding: 12px 16px; }
  .menu-imprint, .menu-folio { font-size: .75rem; }
  .menu-title-wrap { margin: 4px 0; }
  .menu-sheet .menu-heading { font-size: 36px; padding-block: 2px; }
  .menu-item-name, .menu-item-detail { font-size: 16px; line-height: 1.22; }
  .menu-item-name { font-weight: 630; }
  .menu-item-detail { opacity: .8; }
  #menu-entries li { padding: 5px 0; }
  .menu-folio { padding-top: 9px; }
  .menu-controls { padding: 0 8px; flex-wrap: wrap; gap: 0; min-height: 48px; }
  .menu-tools { gap: 4px; }
  .type-picker > span { display: none; }
  .type-picker select { min-height: 44px; font-size: 16px; }
  .paper-picker { padding: 0; border: 0; }
  .menu-pages { margin-left: auto; }
  .menu-edit-hint { padding: 1px 12px 10px; font-size: .78rem; }
}
@media (max-width: 350px) {
  .guest-wordmark .app-symbol { display: none; }
  .menu-controls { padding-inline: 4px; }
  .menu-tools { gap: 0; }
}
@media (prefers-reduced-transparency: reduce) {
  .ed-app:has(#auth-view:not([hidden])) .guest-nav { background: #fff; backdrop-filter: none; }
}
