@font-face {
  font-family: "Manrope";
  src: url("/assets/Manrope.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --porcelain: #FBFAF7;
  --page: #F3EEE4;
  --curio: #FFFFFF;
  --ink: #433E38;
  --muted: #797269;
  --line: #E9E3D9;
  --honey: #AA824D;
  --surface: #F1ECE3;
  font-family: "Manrope", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.frame {
  width: min(1240px, calc(100% - 104px));
  margin-inline: auto;
}
.site-header { flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1.65px;
  line-height: 1;
}
.brand-mark {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--honey);
  transform: translateY(1px);
}
.header-nav { display: flex; align-items: center; gap: 34px; }
.text-link {
  min-height: 44px;
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}
.text-link:hover { color: var(--ink); }
.text-link:focus-visible,
.brand:focus-visible,
.close-button:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 3px;
  border-radius: 4px;
}

.page-status {
  margin: 14px auto -10px;
  width: min(1240px, calc(100% - 104px));
  color: var(--muted);
  font-size: 13px;
}
#curio-stage {
  position: relative;
  flex: 1 0 auto;
  width: min(1240px, calc(100% - 104px));
  margin: 24px auto;
  min-height: 280px;
  display: flex;
  background: var(--curio);
}
#curio-stage > iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
}
.site-footer { flex: 0 0 auto; border-top: 1px solid var(--line); }
.footer-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}
.footer-note { margin: 0; }
.footer-nav { display: flex; align-items: center; gap: 27px; }
.footer-nav .text-link { font-size: 13px; }
.owner-link { display: inline-flex; align-items: center; gap: 7px; }
.owner-link svg { width: 14px; height: 14px; color: var(--muted); }

dialog {
  width: min(460px, calc(100% - 36px));
  max-height: min(780px, calc(100% - 36px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--porcelain);
  color: var(--ink);
  box-shadow: 0 18px 60px rgb(67 62 56 / 15%);
}
dialog::backdrop { background: rgb(49 45 40 / 28%); }
.dialog-content { padding: 31px 32px 32px; }
.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.dialog-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.55px;
  line-height: 1.35;
}
.close-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  margin: -7px -8px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}
.close-button:hover { background: var(--surface); color: var(--ink); }
.dialog-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.preview-note {
  margin: 0 0 22px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.form-stack { display: grid; gap: 17px; }
.field { display: grid; gap: 7px; }
.field label, .field-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--porcelain);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.field input, .field select { min-height: 46px; padding: 10px 12px; }
.field textarea { min-height: 116px; padding: 11px 12px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field select { cursor: pointer; }
.field-note { margin: -2px 0 0; color: var(--muted); font-size: 12px; }
.optional-label { color: var(--muted); font-weight: 400; }
.primary-button {
  min-height: 46px;
  justify-self: start;
  padding: 11px 17px;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background: var(--ink);
  color: var(--porcelain);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.primary-button:hover { opacity: .92; }
.primary-button:disabled { cursor: wait; opacity: .65; }

.owner-tabs { display: flex; gap: 22px; margin: 2px 0 21px; border-bottom: 1px solid var(--line); }
.owner-tab {
  min-height: 43px;
  padding: 0 1px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.owner-tab[aria-selected="true"] { border-bottom-color: var(--honey); color: var(--ink); }
.status-message {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.status-message:not(:empty) { padding: 11px 13px; border-radius: 9px; background: var(--surface); }
.recent-section { margin-top: 26px; }
.recent-section h3 { margin: 0 0 9px; font-size: 14px; font-weight: 600; }
.recent-list, .archive-list { margin: 0; padding: 0; list-style: none; }
.recent-item, .archive-item { padding: 11px 0; border-top: 1px solid var(--line); }
.recent-item:first-child, .archive-item:first-child { border-top: 0; }
.recent-item p { margin: 0; overflow-wrap: anywhere; }
.recent-meta { margin-top: 3px !important; color: var(--muted); font-size: 12px; }
.empty-note { margin: 0; color: var(--muted); font-size: 13px; }
.archive-list { margin-top: 5px; }
.archive-item a { color: var(--ink); font-weight: 500; text-decoration-color: var(--line); text-underline-offset: 3px; }
.archive-item a:hover { color: var(--honey); }
.archive-description { margin: 3px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.feedback-context { margin-bottom: 19px; }
.owner-actions { display: flex; justify-content: flex-end; margin-top: 22px; border-top: 1px solid var(--line); }

@media (max-width: 640px) {
  .frame { width: calc(100% - 44px); }
  .page-status { width: calc(100% - 44px); }
  .header-inner { min-height: 84px; gap: 16px; }
  .brand { gap: 9px; font-size: 30px; }
  .header-nav { gap: 19px; }
  .text-link { font-size: 13px; }
  #curio-stage { width: calc(100% - 44px); margin-block: 16px; min-height: 220px; }
  .footer-inner {
    min-height: 92px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding-block: 15px;
  }
  .footer-nav { gap: 23px; }
  .footer-nav .text-link { min-height: 40px; }
  .dialog-content { padding: 25px 23px 26px; }
  .dialog-header h2 { font-size: 21px; }
}
