:root {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--foreground) 36%, transparent) transparent;
  color-scheme: light;
  font: 16px/1.5 "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--background);
  color: var(--foreground);
  --background: #f4f6f8;
  --foreground: #17232a;
  --paper: #fff;
  --muted: #50616a;
  --line: #d5dfe2;
  --accent: #05756d;
  --active: color-mix(in srgb, var(--accent) 13%, var(--paper));
  --button: #05756d;
  --button-text: #fff;
  --aid-mark: #087970;
  --control: color-mix(in srgb, var(--paper) 72%, var(--background));
  --hover: color-mix(in srgb, var(--accent) 8%, var(--paper));
  --hairline: color-mix(in srgb, var(--foreground) 10%, transparent);
  --surface-radius: 16px;
  --control-radius: 10px;
  --danger: #a72e3a;
  --line-soft: color-mix(in srgb, var(--line) 68%, var(--paper));
  --tg-top: 0px;
  --tg-right: 0px;
  --tg-bottom: 0px;
  --tg-left: 0px;
}
* { box-sizing: border-box }
.design-page main { max-width: 620px }
.design-page .design-project { overflow-wrap: anywhere; font-weight: 650; margin: 12px 0 2px }
.design-description { color: var(--muted); margin: 0 0 16px }
.design-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.design-option { display: flex; flex-direction: column; min-width: 0; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px }
.design-option h2 { margin: 10px 0 3px; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere }
.design-look { margin: 1px 0 4px; color: var(--muted); font-size: .75rem; font-weight: 650; line-height: 1.25 }
.design-option p { flex: 1; margin: 0 0 10px; color: var(--muted); font-size: .84rem; line-height: 1.35; overflow-wrap: anywhere }
.design-select { display: grid; place-items: center; min-height: 44px; padding: 5px; border-radius: 10px; color: var(--button-text); background: var(--button); font-size: .88rem; font-weight: 650; text-decoration: none }
.design-select:focus-visible { outline: 2px solid var(--foreground); outline-offset: 3px }
.design-visual {
  --sketch-paper: var(--background);
  --sketch-ink: var(--muted);
  --sketch-accent: var(--accent);
  --sketch-block: var(--active);
  --sketch-rule: var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: 6px 10px repeat(3, minmax(0, 1fr));
  gap: 4px;
  height: 94px;
  padding: 7px;
  background: var(--sketch-paper);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.design-visual[data-look="ledger"] { --sketch-paper: #e7eee3; --sketch-ink: #203b27; --sketch-accent: #346047; --sketch-block: #acd0b3; --sketch-rule: #789382 }
.design-visual[data-look="print"] { --sketch-paper: #fcf0dd; --sketch-ink: #4d2716; --sketch-accent: #962f18; --sketch-block: #e0a977; --sketch-rule: #ba825a }
.design-visual[data-look="gallery"] { --sketch-paper: #1c2433; --sketch-ink: #efecdf; --sketch-accent: #fde78b; --sketch-block: #8a718e; --sketch-rule: #627993 }
.design-visual[data-look="poster"] { --sketch-paper: #f4dc63; --sketch-ink: #231f33; --sketch-accent: #512a95; --sketch-block: #ee814b; --sketch-rule: #6137a3 }
.design-visual[data-look="wayfinding"] { --sketch-paper: #d6f3ee; --sketch-ink: #153c35; --sketch-accent: #007563; --sketch-block: #78b8a9; --sketch-rule: #578b7e }
.design-visual[data-look="editorial"] { --sketch-paper: #e8effa; --sketch-ink: #1c2946; --sketch-accent: #365d99; --sketch-block: #a6bbdf; --sketch-rule: #586f98 }
.design-visual[data-look="soft"] { --sketch-paper: #f1eaf4; --sketch-ink: #462f56; --sketch-accent: #78448c; --sketch-block: #d1a9d7; --sketch-rule: #9b789e }
.design-visual[data-look="playful"] { --sketch-paper: #ffe9e6; --sketch-ink: #522744; --sketch-accent: #af3b53; --sketch-block: #eea687; --sketch-rule: #b7596d }
.design-visual span { min-width: 0; border-radius: 3px; grid-column: 1 / -1; background: var(--sketch-rule) }
.design-visual span:first-child { grid-column: 1 / 3; background: var(--sketch-ink) }
.design-visual span:nth-child(2) { grid-column: 1 / 4; background: var(--sketch-accent) }
.design-visual.cover span:nth-child(3) { grid-row: 3 / 5; background: var(--sketch-block) }
.design-visual.cover span:nth-child(4) { grid-column: 1 / 3 }
.design-visual.cover span:nth-child(5) { grid-column: 3 / 5 }
.design-visual.tiles span:nth-child(n+3) { grid-column: span 2; grid-row: 3 / 5; background: var(--sketch-block) }
.design-visual.tiles span:nth-child(5) { grid-column: 1 / 4; grid-row: 5; background: var(--sketch-rule) }
.design-visual.steps span:nth-child(3) { grid-column: 1 / 3 }
.design-visual.steps span:nth-child(4) { grid-column: 2 / 4; background: var(--sketch-block) }
.design-visual.steps span:nth-child(5) { grid-column: 3 / 5 }
.design-visual.schedule span:nth-child(n+3) { border-inline-start: 8px solid var(--sketch-accent); background: var(--sketch-block) }
.design-visual.poster span:nth-child(2) { grid-row: 2 / 4; grid-column: 1 / -1; background: var(--sketch-block) }
.design-visual.poster span:nth-child(3) { grid-column: 2 / 4; background: var(--sketch-accent) }
.design-visual.poster span:nth-child(n+4) { grid-column: span 2 }
@media (max-width: 360px) {
  .design-options { gap: 8px }
  .design-option { padding: 8px }
}
[hidden] { display: none !important }
body { margin: 0 }
main { max-width: 740px; margin-inline: auto; padding: max(18px, env(safe-area-inset-top), var(--tg-top)) max(16px, env(safe-area-inset-right), var(--tg-right)) max(24px, env(safe-area-inset-bottom), var(--tg-bottom)) max(16px, env(safe-area-inset-left), var(--tg-left)) }
header { display: flex; min-height: 44px; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap }
.cabinet-header { gap: 10px; margin-block-end: 14px }
.header-actions { display: flex; align-items: center; gap: 6px; flex: none }
.masthead, .site-identity { display: flex; align-items: center; min-width: 0; gap: 11px }
.brand-mark, .project-mark { display: grid; place-items: center; flex: none; font-size: 18px; font-weight: 700 }
.brand-mark { width: 39px; height: 39px; border-radius: 12px; background: var(--aid-mark); color: white }
.brand-mark::before {
  content: ""; width: 23px; height: 21px; background: currentColor;
  clip-path: polygon(0 100%, 41% 0, 59% 0, 100% 100%, 79% 100%, 50% 26%, 21% 100%, 0 100%, 38% 73%, 62% 73%, 68% 89%, 32% 89%, 38% 73%);
}
.project-mark { width: 43px; height: 43px; border-radius: 13px; background: var(--active); color: var(--accent); overflow: hidden }
.project-mark img { display: block; width: 100%; height: 100%; object-fit: contain }
h1 { margin: 0; font-size: clamp(23px, 5vw, 30px); font-weight: 700; letter-spacing: -.035em; line-height: 1.14; overflow-wrap: anywhere }
#status { color: var(--muted); margin: 10px 0; font-size: 14px }
#status:empty { display: none }
#connection-status { margin: 0 0 10px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--control-radius) }
.create-entry {
  display: flex; width: 100%; min-height: 68px; padding: 10px 13px; gap: 12px; text-align: start;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--surface-radius);
}
.create-copy { display: grid; gap: 3px; flex: 1; min-width: 0 }
.create-copy strong { font-size: 16px; color: var(--foreground); line-height: 1.2 }
.create-copy > span { color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.22 }
.create-icon { position: relative; flex: none }
.create-icon { width: 42px; height: 42px; border-radius: 13px; background: var(--aid-mark); color: white }
.create-icon::before, .create-icon::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 15px; height: 2px;
  translate: -50% -50%; border-radius: 2px; background: currentColor;
}
.create-icon::after { rotate: 90deg }
#new-site { max-width: 540px; margin-inline: auto }
#new-site-back { background: transparent; border-color: transparent; padding-inline: 0; margin-bottom: 12px }
#new-site-title { font-size: clamp(24px, 6vw, 34px); letter-spacing: -.035em }
.new-site-intro { color: var(--muted); margin: 6px 0 20px; max-width: 42ch }
#new-site-form { display: grid; gap: 11px; min-width: 0; padding: 15px; border: 1px solid var(--hairline); border-radius: var(--surface-radius); background: var(--paper) }
#new-site-form > label { font-size: 15px; font-weight: 650 }
#new-site-form :is(input, textarea) {
  display: block; width: 100%; min-height: 44px; padding: 9px 12px;
  font: inherit; color: var(--foreground); background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px;
}
#new-site-form :is(input, textarea)::placeholder { color: var(--muted) }
#new-site-form textarea { resize: vertical; min-height: 120px; background: var(--background) }
.suggestions, .new-site-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.suggestions button { border-radius: 22px; padding-inline: 9px; font-size: 13px; background: transparent }
.new-site-options { border-top: 1px solid var(--line); margin-top: 4px }
.new-site-options summary { min-height: 44px; align-content: center; cursor: pointer; color: var(--accent); font-weight: 550; font-size: 14px }
.new-site-options p, #new-site-result { margin: 7px 0 0; color: var(--muted); font-size: 14px }
.new-site-actions .primary { min-height: 48px; padding-inline: 18px; justify-content: center }
@media (max-width: 560px) { .new-site-actions .primary { flex-basis: 100% } }
#site-directory { margin-block-start: 20px }
.directory-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-block-end: 9px }
.directory-bar h2 { color: var(--foreground); font-size: 16px; font-weight: 700 }
#project-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums }
#projects { padding: 0; margin: 8px 0 0; list-style: none; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--surface-radius) }
#projects:not(:has(li:not([hidden]))) { display: none }
#projects > li:not([hidden]) ~ li:not([hidden]) { border-block-start: 1px solid var(--hairline) }
.project-copy { min-width: 0; flex: 1; text-align: start }
.project-name { display: block; font-size: 16px; line-height: 1.25; font-weight: 650; color: var(--foreground) }
.project-copy .project-name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;
}
.project-copy .project-state { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.project-copy .project-state { margin-top: 4px }
.project-host { margin-top: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.project-host:not([hidden]) { display: block }
.project-copy .state[data-state=running]::before { display: inline-block; vertical-align: 1px; margin-inline-end: 6px }
.chevron { flex: none; width: 7px; height: 7px; margin-inline-end: 4px; border: solid var(--muted); border-width: 1.6px 1.6px 0 0; rotate: 45deg }
h2 { font-size: 17px; line-height: 1.35; margin: 0; overflow-wrap: anywhere }
.state { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.2; font-weight: 400; color: var(--muted) }
.state[data-state=running]::before, .site-summary[data-live=true] h3::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--aid-mark);
}
button, .visit { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer; touch-action: manipulation }
button { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--control-radius); padding: 0 11px }
[data-action-icon] > .action-icon {
  display: block; flex: 0 0 auto; align-self: center; inline-size: 16px; block-size: 16px;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.visit { text-underline-offset: 3px }
#refresh, #back { background: transparent; border-color: transparent }
#refresh[aria-label] { display: inline-grid; place-items: center; width: 44px; padding: 0; border: 0 }
#refresh[aria-label] .action-icon { inline-size: 20px; block-size: 20px }
#refresh[aria-label]:disabled .action-icon { animation: refresh-spin .85s linear infinite }
@keyframes refresh-spin { to { transform: rotate(1turn) } }
.cabinet-search { position: relative; margin-bottom: 7px }
.cabinet-search::before, .cabinet-search::after { content: ""; position: absolute; pointer-events: none; color: var(--muted) }
.cabinet-search::before { width: 11px; height: 11px; top: calc(50% - 8px); inset-inline-start: 14px; border: 1.6px solid currentColor; border-radius: 50% }
.cabinet-search::after { width: 6px; height: 1.6px; top: calc(50% + 5px); inset-inline-start: 24px; background: currentColor; rotate: 45deg }
.cabinet-search input, .content .cabinet-search input { width: 100%; margin: 0; min-height: 46px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--paper); color: var(--foreground); font: inherit; padding: 9px 12px 9px 38px }
.cabinet-search input::placeholder { color: var(--muted) }
#site-filters { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px }
#site-filters button { min-height: 44px; border-radius: 10px; color: var(--muted); padding-inline: 9px; background: transparent; border-color: transparent }
#site-filters [aria-pressed=true] { background: var(--active); color: var(--foreground) }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.manage { width: 100%; min-height: 62px; padding: 8px 13px; border: 0; background: transparent; border-radius: 11px; gap: 11px }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 14px 8px 66px }
.project-actions:not(:has(:not([hidden]))) { display: none }
@media (max-width: 560px) { .project-actions { display: none } }
@media (min-width: 701px) {
  #projects > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center }
  .project-actions { padding: 5px 14px 5px 3px; justify-content: end }
}
.detail-top { margin-block-end: 13px }
.detail-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; margin-block-end: 8px }
#back { padding-inline-start: 0; gap: 8px }
.site-identity { padding-inline: 1px }
.site-identity .project-mark { width: 44px; height: 44px }
#detail-title { font-size: clamp(21px, 5vw, 26px); font-weight: 700; letter-spacing: -.026em; line-height: 1.17 }
#detail-state { margin: 4px 0 0 }
#detail-title:focus, #new-site-title:focus { outline: none }
#empty-sites { margin-block-start: 15px; padding: 22px 16px; text-align: center }
#empty-sites h2 { font-size: 19px }
#empty-sites p { color: var(--muted); margin: 6px auto 0; max-width: 30ch }
button.primary { background: var(--button); border-color: var(--button); color: var(--button-text) }
button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 34%, var(--line)) }
button:not(:disabled):active { background: var(--active) }
button.primary:not(:disabled):active, .design-select:active { background: color-mix(in srgb, var(--button) 88%, var(--foreground)) }
#refresh[aria-label]:not(:disabled):active { background: transparent; opacity: .72 }
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled), .design-select, .site-next, #join-project > summary { transition: background-color .14s ease, color .14s ease, opacity .14s ease }
  button:not(:disabled):not(:where(.primary, #refresh[aria-label])):hover, #join-project > summary:hover { background: var(--hover) }
  button.primary:not(:disabled):hover, .design-select:hover, .site-next:hover { background: color-mix(in srgb, var(--button) 92%, var(--foreground)) }
  #site-filters [aria-pressed=false]:hover { color: var(--foreground); background: var(--hover) }
  #sections .other-sections:not([open], [data-active=true]) > summary:hover { background: var(--hover) }
  #refresh[aria-label]:not(:disabled):hover { color: var(--foreground) }
}
@media (prefers-reduced-motion: reduce) {
  button, .design-select, .site-next, #join-project > summary { transition: none }
  #refresh[aria-label]:disabled .action-icon { animation: none }
}
button:disabled { cursor: default }
#sections {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; min-width: 0; align-items: stretch;
  gap: 2px; margin-block: 0 12px; background: var(--control); border: 1px solid var(--hairline); border-radius: 13px; padding: 3px;
}
#sections > button, .other-sections > summary {
  justify-content: center; white-space: nowrap; padding-inline: 4px; min-height: 44px;
  background: transparent; border-color: transparent; color: var(--muted); border-radius: 9px; font-size: 13px;
}
#sections > [aria-pressed=true], .other-sections[data-active=true] > summary {
  background: var(--active); color: var(--accent);
}
.other-sections { position: relative; min-width: 0 }
.other-sections > summary { display: grid; place-items: center; cursor: pointer; font-weight: 600; list-style: none }
#sections > button[data-action-icon], .other-sections > summary[data-action-icon] {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; line-height: 1.05;
}
#sections > button > .action-icon, .other-sections > summary > .action-icon { inline-size: 16px; block-size: 16px }
.other-sections > summary::-webkit-details-marker { display: none }
.other-sections[open] > summary { background: var(--active) }
.section-menu {
  position: absolute; z-index: 2; inset-block-start: calc(100% + 6px); inset-inline-end: 0;
  width: min(180px, 75vw); padding: 4px; display: grid; gap: 2px;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 13px; box-shadow: 0 12px 32px #0003;
}
.other-sections:not([open]) .section-menu { display: none }
.section-menu > button { border: 0; color: var(--foreground); justify-content: flex-start }
.section-menu > [aria-pressed=true] { background: var(--active); color: var(--accent) }
main:has(#manage:not([hidden])) > header { display: none }
.release { display: grid; gap: 7px }
.release .notice { margin: 0 }
.content .release { padding: 15px 16px; border-radius: 13px }
.release h3 { font-size: 17px; line-height: 1.3 }
.release[data-release-state=current] h3 { color: var(--accent) }
.release-edits { width: 100%; border-top: 1px solid var(--line-soft) }
.release-edits ol { margin: 4px 0 8px; padding-inline-start: 24px }
.release-edits li { list-style: decimal; background: transparent; border: 0; border-radius: 0; padding: 4px 0 }
.panel-actions, .dns-guides, .domain-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center }
.content .site-summary {
  gap: 7px; padding: 14px; border-radius: var(--surface-radius);
}
.site-summary h3 { display: flex; align-items: center; gap: 8px; margin: 0 }
.site-summary time { color: var(--muted); font-size: 13px }
.publication-state { display: grid; justify-items: start; gap: 4px; min-width: 0 }
.publication-state .site-address { font-size: 13px; min-height: 44px }
.draft-panel { display: grid; gap: 7px; border-top: 1px solid var(--hairline); padding-block-start: 9px }
.draft-panel:not(:has(.site-draft:not(:empty), .site-primary:not(:empty), .draft-tools:not(:empty))) { display: none }
.site-summary .site-draft { margin: 2px 0; font-weight: 600 }
.draft-change-note { margin: 0 }
.draft-change-note:empty { display: none }
.site-summary :is(.site-primary, .draft-tools):empty, .site-tools:empty { display: none }
.site-quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px }
.site-quick-actions button { justify-content: center; padding-inline: 4px; gap: 5px; white-space: nowrap }
.quick-heading { display: flex; justify-content: flex-start; align-items: center; gap: 12px; margin-block: 0 10px }
.quick-heading h3 { margin: 0; font-size: 18px }
.quick-heading h3:focus { outline: none }
#workspace[data-view=price] .menu-price-editor, #workspace[data-view=hours] .hours-editor { margin-block: 0 }
.hours-time { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
.hours-time label, .hours-time input { min-width: 0 }
.site-tools { width: 100%; display: grid; border-top: 1px solid var(--hairline); padding-block-start: 3px }
.site-tools :is(a, button) { font-size: 13px; justify-self: start }
.site-tools .site-utility { background: transparent; padding-inline: 0; border-color: transparent; text-decoration: underline; text-underline-offset: 3px }
.draft-open { justify-content: center }
.site-address { overflow-wrap: anywhere; max-width: 100% }
.site-draft:empty { display: none }
.site-next { padding-inline: 12px; border-radius: 8px; background: var(--button); color: var(--button-text); text-decoration: none }
.site-next { justify-content: center; padding-block: 6px }
.site-primary { align-items: stretch; gap: 7px }
.draft-tools { gap: 0 12px }
.draft-tools :is(.draft-changes, .draft-delete) {
  justify-content: start; padding: 0 2px; border-color: transparent; background: transparent;
  border-radius: var(--control-radius); font-size: 13px; text-decoration: none; text-align: start;
}
.draft-tools :is(.draft-changes, .draft-delete):hover { background: var(--active) }
.draft-tools .draft-delete { color: var(--danger) }
.cabinet-name-control > summary { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 13px; cursor: pointer }
.cabinet-name-form { display: grid; align-items: start; justify-items: start; gap: 8px; padding-block-end: 8px }
.cabinet-name-form label { width: 100% }
.cabinet-name-form .notice { margin: 0 }
.cabinet-name-form .notice:empty { display: none }
.cabinet-project-tools { display: flex; flex-wrap: wrap; align-items: start; gap: 0 16px }
.cabinet-project-tools > details[open] { flex-basis: 100% }
.project-state .action-icon { width: 13px; height: 13px; vertical-align: -2px; margin-inline-end: 4px }
.inbox-search { display: flex; width: 100%; min-width: 0; gap: 8px; flex-wrap: wrap; align-items: end }
.inbox-search label { flex: 1 1 180px }
.inbox-search input { width: 100%; min-height: 44px; padding: 7px 9px; font: inherit; background: var(--background); color: var(--foreground); border: 1px solid var(--line); border-radius: 7px }
.inbox-status-filters { display: flex; flex-wrap: wrap; gap: 4px }
.inbox-status-filters button { background: transparent; border-color: transparent; color: var(--muted) }
.inbox-status-filters [aria-pressed=true] { background: var(--active); color: var(--foreground) }
.inbox-export { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--control-radius); padding-inline: 12px }
.inbox-utilities { display: flex; flex-wrap: wrap; gap: 8px }
.inbox-providers { display: grid; gap: 6px; padding-block-end: 10px }
#workspace .inbox-providers > details { width: 100%; background: var(--background) }
#workspace .inbox-export[open] { width: 100%; padding: 0 12px }
#workspace .inbox-export label { margin: 0 }
.webhook-form { display: grid; gap: 10px; padding-bottom: 12px }
.webhook-form[hidden] { display: none }
.webhook-form p { margin: 0 }
.webhook-form .webhook-signing { margin: 0 }
.webhook-form .webhook-signing > p { margin-top: 8px }
.webhook-form .notice:empty { display: none }
.inbox-period { display: grid; gap: 8px; padding-block-end: 12px; justify-items: start }
.inbox-dates { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px }
.inbox-dates input { min-width: 0 }
.inbox-period .notice { margin: 0 }
.inbox-page { justify-content: space-between }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0 }
.section-heading h3 { margin: 0; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere }
.section-heading > button { flex: none }
.lead-heading { align-items: start }
.lead-state { flex: none; white-space: nowrap; padding: 4px 8px; border-radius: 6px; background: var(--active); color: var(--accent); font-size: 12px; font-weight: 650 }
.lead-state[data-handled=true] { background: var(--control); color: var(--muted) }
#sections [data-section="inbox"] { position: relative }
.inbox-count { position: absolute; inset: 1px 2px auto auto; min-width: 14px; padding: 1px 3px; border-radius: 8px;
  background: var(--button); color: var(--button-text); font-size: 10px; line-height: 1.15; text-align: center }
.lead-card time { color: var(--muted); font-size: 13px }
.lead-reply-body, .lead-note-form { display: grid; gap: 6px; justify-items: start; width: 100% }
.lead-reply { width: 100% }
.lead-reply > summary { display: flex; align-items: center; gap: 7px; min-height: 44px; padding-block: 0; list-style: none }
.lead-reply > summary::-webkit-details-marker { display: none }
.lead-reply > summary::after {
  content: ''; inline-size: 7px; block-size: 7px; flex: none; margin-inline-start: auto; margin-inline-end: 4px;
  border-inline-end: 1.5px solid; border-block-end: 1.5px solid; transform: rotate(45deg);
}
.lead-reply[open] > summary::after { transform: rotate(225deg) }
.lead-reply-body :is(label, textarea), .lead-note-form label { width: 100% }
.lead-reply-body :is(select, textarea) { margin-block: 4px 0 }
.lead-note-form { border-top: 1px solid var(--hairline); padding-top: 10px; margin-top: 4px }
.lead-note-form .notice { margin: 0 }
.lead-note-form .notice:empty { display: none }
.archive-restore-summary:empty { display: none }
.archive-restore-summary :is(p, ul) { margin: 5px 0 }
.archive-restore-summary ul { padding-inline-start: 18px }
.archive-restore-summary li { list-style: disc; overflow-wrap: anywhere }
.lead-delivery { margin-block: 8px; font-size: 13px }
.lead-delivery summary { cursor: pointer; padding-block: 6px }
.lead-delivery-list { display: grid; gap: 4px; margin-block: 4px 8px; padding-inline-start: 18px }
.lead-delivery-retry { margin-inline-start: 8px; margin-block: 3px }
.menu-csv li { overflow-wrap: anywhere; margin-block: 4px }
#workspace .lead-message { white-space: pre-wrap; overflow-wrap: anywhere }
.content-block { border-top: 1px solid var(--line-soft) }
.section-layout { margin-block: 5px 12px; border-top: 1px solid var(--hairline) }
.section-layout-rows { display: grid; gap: 8px; margin-block-end: 8px }
.section-layout-row { min-width: 0; padding: 10px; border: 1px solid var(--hairline); border-radius: var(--control-radius) }
.section-layout-label { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; overflow-wrap: anywhere }
.section-layout-actions { gap: 6px; margin-top: 7px }
.section-layout-actions button { font-size: 13px; padding-inline: 10px }
#workspace .content-block .block-row {
  display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) auto; gap: 9px;
  color: var(--foreground); overflow-wrap: anywhere; list-style: none;
}
.content-block div.block-row { padding-block: 12px }
.content-block summary::-webkit-details-marker { display: none }
.block-action { color: var(--accent); font-size: 12px; text-align: end }
#workspace .content-block[open] .block-action { visibility: hidden }
.block-feedback { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; grid-column: 1 / -1 }
.block-feedback:empty { display: none }
#workspace[data-view=content] .cabinet-search { width: 100% }
.content-edit select { display: block; width: 100%; min-height: 44px; border-radius: 7px; padding: 7px; font: inherit; color: var(--foreground); background: var(--background); border: 1px solid var(--line) }
.block-editor { display: grid; gap: 10px; padding-block: 4px 12px }
.block-editor button { justify-self: start }
@media (max-width: 420px) {
  .site-primary > :is(.site-next, .draft-open) { flex: 1 1 114px; justify-content: center; text-align: center; font-size: 13px; line-height: 1.2; min-width: 0 }
}
.site-share { padding-inline: 3px; border-radius: 8px; text-decoration: underline }
.site-share:hover { background: var(--active) }
#workspace { display: grid; gap: 12px; min-width: 0 }
#workspace > .notice { margin: 0 }
#workspace > .content:empty { display: none }
.subnav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px; justify-self: start;
  max-inline-size: 100%; background: var(--control); border-radius: 12px; padding: 3px;
}
.subnav > button { background: transparent; border: 0; color: var(--muted) }
.subnav > [aria-pressed=true] { background: var(--active); color: var(--accent) }
#preview-compare [aria-pressed=true] { background: var(--active); border-color: var(--accent) }
.content { display: grid; gap: 12px; justify-items: start; min-width: 0 }
.content label, .content article { width: 100%; min-width: 0 }
.content article { background: var(--paper); border: 1px solid var(--hairline); padding: 14px; border-radius: var(--surface-radius); overflow-wrap: anywhere }
.content article h3, .content article p { margin: 0 0 7px }
.content :is(input, select, textarea) { display: block; width: 100%; max-width: 100%; margin-top: 5px; min-height: 44px; padding: 7px 9px; font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 7px }
.content input[type=file] { font-size: 13px }
.content input::file-selector-button { min-height: 36px; margin-inline-end: 10px; color: var(--accent); background: var(--active); border: 0; border-radius: 6px; font: inherit; padding-inline: 9px }
.content :is(.section-title, .record-state) { margin: 0 }
.section-title { font-size: 16px }
.record-state { color: var(--accent); font-size: 13px; font-weight: 650 }
.settings-disclosure { width: 100%; padding-inline: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper) }
.appearance-heading { width: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px }
.link-appearance-actions { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap }
.link-appearance-actions button { min-height: 40px; padding-inline: 10px; font-size: 13px }
.link-plain-address { width: 100%; min-width: 0; padding: 10px; color: var(--foreground); background: var(--background); border: 1px solid var(--line); border-radius: 8px; font: inherit }
.appearance-editor { width: 100%; border-top: 1px solid var(--line); }
.appearance-editor .link-settings { padding-block: 8px 14px }
.appearance-icon-editor { border-top: 1px solid var(--line) }
.appearance-icon-editor summary { color: var(--accent); min-height: 44px; align-content: center }
.link-settings textarea { resize: vertical }
.link-example { width: 100%; overflow: hidden; border: 1px solid var(--line); border-inline-start: 3px solid var(--accent); border-radius: 9px; background: var(--active) }
.link-cover { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover }
.link-example-text { display: grid; gap: 8px; padding: 12px; overflow-wrap: anywhere }
.link-example-identity { min-width: 0; display: flex; align-items: center; gap: 10px }
.link-example-identity .project-mark { width: 36px; height: 36px; border-radius: 9px }
.link-example-name { min-width: 0; display: grid; gap: 2px }
.link-example-text p { margin: 0; color: var(--muted); font-size: 14px }
.content code { display: block; margin: 8px 0; overflow-wrap: anywhere; font-size: 13px }
.content .domain-card { display: grid; gap: 10px; padding: 16px }
.content .domain-card h3 { margin: 0; font-size: 18px }
.domain-card .primary { justify-self: start }
.domain-card .domain-state { justify-self: start; margin: 0; padding: 3px 8px; border-radius: 6px; background: var(--active); color: var(--accent); font-size: 14px; font-weight: 650 }
.domain-card .domain-state[data-ready=false] { background: transparent; border: 1px solid var(--line); color: var(--muted) }
.domain-card .notice { margin: 0 }
.dns-records { border-block: 1px solid var(--line); padding-block: 8px }
.dns-records summary { cursor: pointer; font-size: 14px; font-weight: 650; padding-block: 4px }
.dns-records[open] summary { margin-bottom: 8px }
.dns-record { margin-block: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px }
.dns-record strong { font-size: 13px; color: var(--accent) }
.dns-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; align-items: center }
.dns-value > span { grid-column: 1 / -1 }
.dns-value code { margin: 0; user-select: all }
.dns-value button { min-height: 44px; font-size: 13px }
.notice { color: var(--muted); font-size: 14px; white-space: pre-wrap }
.notice:empty { display: none }
#join-project { margin-block-start: 14px; padding: 0 13px; border: 1px solid var(--hairline); border-radius: 13px; background: var(--paper) }
#join-project > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; list-style: none }
#join-project > summary::-webkit-details-marker { display: none }
#join-project[open] > summary .chevron { rotate: 135deg }
.empty-account #join-project:not([open]) { border-color: transparent; background: transparent }
#cabinet-toast:not(:empty) {
  position: fixed; z-index: 8; inset-inline-start: 50%; translate: -50% 0;
  inset-block-end: max(12px, var(--tg-bottom), env(safe-area-inset-bottom));
  width: max-content; max-width: min(calc(100% - 32px), 420px); padding: 10px 15px;
  border-radius: 11px; border: 1px solid var(--hairline); background: var(--paper); color: var(--foreground);
  box-shadow: 0 5px 20px #0004; font-size: 14px; pointer-events: none;
}
#join-project summary, #workspace details summary { min-height: 44px; align-content: center; cursor: pointer; color: var(--accent); font-weight: 600 }
#workspace :is(.release-edits, .dns-records, .settings-disclosure, .inbox-export, .appearance-editor, .appearance-icon-editor) > summary {
  list-style: none;
}
#workspace :is(.release-edits, .dns-records, .settings-disclosure, .inbox-export, .appearance-editor, .appearance-icon-editor) > summary::-webkit-details-marker { display: none }
#workspace :is(.release-edits, .dns-records, .settings-disclosure, .inbox-export, .appearance-editor, .appearance-icon-editor) > summary::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-inline: 3px 10px;
  border: solid currentColor; border-width: 1.5px 1.5px 0 0; rotate: 45deg; vertical-align: .12em;
}
#workspace :is(.release-edits, .dns-records, .settings-disclosure, .inbox-export, .appearance-editor, .appearance-icon-editor)[open] > summary::before { rotate: 135deg; vertical-align: .25em }
#join-project form, #workspace details[open] { padding: 0 0 8px }
#workspace details label { margin-bottom: 8px }
#workspace .settings-disclosure[open] { padding-inline: 14px }
body[data-cabinet-view]:not([data-cabinet-view=summary], [data-cabinet-view=releases], .preview-page) #refresh { display: none }
main:has(#manage:not([hidden])) #site-home, .preview-page #site-home, .design-page #site-home,
.new-site-page main > :not(#new-site) { display: none }
.gallery { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(132px,100%),1fr)); gap: 10px }
.gallery article { display: flex; flex-direction: column; align-items: flex-start; gap: 7px }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--active); border-radius: 6px; margin-bottom: 7px }
.gallery button { max-width: 100%; text-align: start; overflow-wrap: anywhere }
#workspace .page-create, #workspace .page-editor { width: 100%; min-width: 0 }
#workspace .page-editor { gap: 9px; margin-block: 10px; justify-items: stretch }
#workspace .page-editor > button { justify-self: start }
#workspace .page-reference-preview img { display: block; max-width: 100%; max-height: 200px; border-radius: 8px }
#workspace .page-rows, #workspace .cover-crop { min-width: 0; border: 1px solid var(--hairline); border-radius: 9px; padding: 10px; margin: 0 }
#workspace .page-rows legend, #workspace .cover-crop legend { padding-inline: 4px; color: var(--muted) }
#workspace .page-row { display: grid; gap: 6px; min-width: 0; border-bottom: 1px solid var(--hairline); margin-bottom: 10px; padding-bottom: 8px }
#workspace .page-row button { justify-self: start }
#workspace .site-page-path { overflow-wrap: anywhere }
#workspace .photo-uses-item + .photo-uses-item { border-top: 1px solid var(--hairline) }
#workspace .media-use { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere }
#workspace .media-use input { width: auto; flex: none; accent-color: var(--accent) }
#workspace .photo-use-preview { width: min(100%, 240px); aspect-ratio: 4 / 3; object-fit: contain; border-radius: 8px }
#workspace .cover-crop input { accent-color: var(--accent); width: 100% }
#workspace .archive-lead { padding-block: 9px; border-top: 1px solid var(--hairline); overflow-wrap: anywhere }
#workspace .archive-lead :is(h4,p) { margin-block: 4px }
:is(button, .visit, input, select, summary, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
button:disabled { opacity: .65 }
button.primary:disabled {
  opacity: 1; background: var(--control); border-color: var(--hairline); color: var(--muted);
}
.preview-page main { max-width: none; height: 100dvh; display: flex; flex-direction: column; gap: 8px;
  height: min(100dvh, var(--tg-viewport-stable-height, 100dvh));
  padding: max(6px, env(safe-area-inset-top), var(--tg-top)) max(6px, env(safe-area-inset-right), var(--tg-right)) max(6px, env(safe-area-inset-bottom), var(--tg-bottom)) max(6px, env(safe-area-inset-left), var(--tg-left)) }
.preview-page header { align-items: center; padding: 0 4px 5px; margin-block-end: 0 }
.preview-page header > div { min-width: 0 }
.preview-page #preview-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px }
.preview-page #preview-compare:has(#compare-changes:not([hidden])) { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.preview-page #preview-compare button { justify-content: center; text-align: center; padding-block: 5px }
#preview-changes { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; padding: clamp(12px, 4vw, 24px);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--surface-radius) }
#preview-changes h2 { margin: 0 0 4px; font-size: 1.15rem }
#preview-changes .notice { margin: 0 0 12px }
#changes-items { list-style: none; padding: 0; margin: 0; min-height: 0; overflow: auto; scrollbar-width: thin }
#changes-items li { display: grid; gap: 4px; padding: 9px 0; border-top: 1px solid var(--hairline); overflow-wrap: anywhere }
#changes-items small { color: var(--muted); font-weight: 650 }
#changes-items p { margin: 0; white-space: pre-wrap }
#changes-items .changes-before { color: var(--muted) }
#changes-actions { display: flex; flex: none; flex-wrap: wrap; gap: 8px; padding-top: 12px }
.preview-page h1 { font: 650 clamp(15px, 4vw, 20px)/1.2 "Segoe UI", sans-serif; letter-spacing: -.015em; overflow-wrap: anywhere }
.preview-page .brand-mark { display: none }
#return-to-chat { flex-shrink: 0 }
@media (max-width: 550px) {
  .preview-page main { gap: 5px }
  .preview-page header { flex-wrap: nowrap; gap: 6px; padding-bottom: 0 }
  .preview-page .masthead { flex: 1 1 auto }
  .preview-page h1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden }
  #return-to-chat { padding-inline: 8px; font-size: 13px }
  #preview-compare > button { padding-inline: 8px; font-size: 13px }
}
#preview { display: block; flex: 1 1 auto; min-width: 0; min-height: 0; width: 100%; background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px }
#preview-loading { flex: 1 1 auto; min-height: 160px; padding: clamp(14px, 5vw, 38px); background: var(--paper); border-radius: 8px }
#preview-loading span { display: block; width: 72%; height: 12px; margin-bottom: 14px; border-radius: 6px; background: var(--active) }
#preview-loading span:nth-child(2) { width: 45% }
#preview-loading span:last-child { width: 100%; height: min(42dvh, 320px); margin-top: 20px }
:root[data-theme=dark] {
  color-scheme: dark;
  --background: #152025; --foreground: #edf3f5; --paper: #1f2c32; --muted: #bdcbd2; --line: #35464f;
  --accent: #75d8cc; --button: #75d8cc; --button-text: #102c2b;
  --danger: #ffa6aa;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --background: #152025; --foreground: #edf3f5; --paper: #1f2c32; --muted: #bdcbd2; --line: #35464f;
    --accent: #75d8cc; --button: #75d8cc; --button-text: #102c2b;
    --danger: #ffa6aa;
  }
}
