:root { color-scheme: light; --bg: #f6f7f3; --paper: #fff; --ink: #24382c; --muted: #5e6c60; --line: #dce3d7; --soft: #eaf0e3; --green: #294b34; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: 24px; }
a { color: var(--green); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #8cab7a; outline-offset: 3px; }
.auth-header { position: relative; z-index: 2; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 7px max(24px, calc((100vw - 1240px) / 2)); background: rgba(255,255,255,.78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.auth-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; letter-spacing: -.4px; text-decoration: none; }
.auth-mark { display: grid; place-items: center; width: 28px; height: 28px; background: var(--green); color: #fff; border-radius: 8px; font-size: 21px; }
.explore-link { font-size: 13px; color: var(--muted); text-decoration: none; }
.explore-link:hover { text-decoration: underline; }
.auth-panel { min-width: 0; padding: 28px 30px; }
h1 { margin: 0; font-size: 25px; line-height: 1.2; font-weight: 600; letter-spacing: -.65px; }
.intro { margin: 8px 0 20px; color: var(--muted); font-size: 14px; }
.field { margin-top: 13px; }
label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; }
input:not([type=hidden]) { display: block; width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; }
input[aria-invalid=true] { border-color: #ac4c3c; }
button[type=submit] { width: 100%; min-height: 44px; margin-top: 20px; padding: 10px 14px; border: 1px solid var(--green); border-radius: 7px; background: var(--green); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
button[type=submit]:hover { background: #203e2a; }
.switch { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.switch a { font-weight: 600; }
.help, .password-help { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.help ul { margin: 6px 0 0; padding-left: 17px; }
.password-help summary { width: fit-content; cursor: pointer; }
.errorlist { margin: 6px 0 0; padding-left: 17px; color: #943b2e; font-size: 12px; }
.form-errors { padding: 10px 12px; margin: 0 0 14px; background: #fff3ef; border: 1px solid #edc9bd; border-radius: 7px; }
.form-errors .errorlist { margin: 0; }
@media (max-width: 700px) {
  .auth-header { padding: 7px 16px; }
  .auth-layout { width: calc(100% - 32px); margin: 24px auto; }
  .auth-panel { padding: 24px; }
}
@media (pointer: coarse) { input:not([type=hidden]) { min-height: 44px; font-size: 16px; } .explore-link { display: inline-flex; align-items: center; min-height: 44px; } }

/* The underlying workspace is a decorative preview; authentication still gates the editor. */
.auth-layout { position: relative; z-index: 1; width: calc(100% - 48px); max-width: 420px; margin: auto; border: 1px solid rgba(255,255,255,.92); border-radius: 16px; background: rgba(255,255,255,.78); box-shadow: 0 20px 70px #24382c29, inset 0 1px 0 #fff; backdrop-filter: blur(20px) saturate(1.15); -webkit-backdrop-filter: blur(20px) saturate(1.15); }
.auth-panel { padding: 28px; }
.glass-auth > .auth-header { margin-bottom: 24px; }
.glass-auth input:not([type=hidden]) { background: rgba(255,255,255,.72); }
.detail-preview { position: fixed; inset: 52px 0 0; padding: 18px max(24px, calc((100vw - 1200px)/2)); overflow: hidden; pointer-events: none; user-select: none; filter: blur(1.4px); opacity: .8; }
.detail-preview-heading { display: flex; justify-content: space-between; gap: 20px; font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.detail-preview-heading > span:last-child { color: var(--muted); font-size: 13px; white-space: nowrap; }
.detail-preview-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
.detail-preview-image, .detail-preview-tools, .detail-preview-below > div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.detail-preview-toolbar { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 12px; padding: 2px 0; }
.detail-preview-stage { height: clamp(280px, calc(100dvh - 240px), 580px); margin: 12px 0; overflow: hidden; background: #e2e9dd; border-radius: 6px; }
.auth-layout-with-image { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); max-width: 780px; }
.auth-image-preview { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 0; margin: 0; padding: 24px; border-right: 1px solid var(--line); }
.auth-image-preview img { display: block; width: 100%; height: clamp(180px, 35vh, 300px); border-radius: 8px; object-fit: contain; background: var(--soft); }
.auth-image-preview figcaption { min-width: 0; }
.auth-image-preview figcaption span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.auth-image-preview figcaption strong { display: block; font-size: 13px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.detail-preview-art { display: grid; place-items: center; height: 100%; background: radial-gradient(ellipse at 20% 80%, #607957 0%, transparent 50%), radial-gradient(ellipse at 70% 20%, #becdab, transparent 60%), #d8e1cb; }
.detail-preview-art span { color: #fff9; font-size: clamp(25px,5vw,64px); letter-spacing: -2px; }
.detail-preview-tabs { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 12px; font-size: 13px; }
.detail-preview-tabs span:first-child { color: var(--green); font-weight: 600; }
.detail-preview-tools p { font-size: 13px; margin: 18px 0 8px; }
.detail-preview-tools p span, .preview-control span { float: right; }
.preview-control { padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.preview-slider { height: 5px; border-radius: 5px; background: linear-gradient(to right, #507341 50%, #e1e6dc 50%); margin: 20px 0; position: relative; }
.preview-slider::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #507341; left: calc(50% - 7px); top: -4px; }
.detail-preview-tools small { font-size: 12px; color: var(--muted); }
.preview-export { margin-top: 28px; border-top: 1px solid var(--line); }
.preview-download { padding: 10px; background: var(--green); color: white; border-radius: 6px; text-align: center; font-size: 13px; margin-top: 16px; }
.preview-reset { font-size: 12px; text-align: center; padding-top: 12px; }
.detail-preview-below { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 20px; }
.detail-preview-below h2 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.detail-preview-below p, .preview-caption { font-size: 13px; color: var(--muted); }
.preview-caption { border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .auth-layout { background: rgba(255,255,255,.96); } }
@media (max-width: 700px) {
  .auth-layout { width: calc(100% - 32px); margin: 20px auto; }
  .auth-layout-with-image { display: block; max-width: 420px; }
  .auth-image-preview { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding: 16px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-image-preview img { flex: 0 0 72px; width: 72px; height: 82px; }
  .auth-panel { padding: 24px; }
  .detail-preview { padding: 16px; }
  .detail-preview-heading { font-size: 15px; }
  .detail-preview-heading > span:last-child { display: none; }
  .detail-preview-workspace { grid-template-columns: minmax(0, 1fr) 190px; width: 650px; gap: 14px; transform: translateX(-90px); }
  .detail-preview-stage { height: 460px; }
  .detail-preview-below { min-width: 600px; }
}
