.brand { min-width: 0; }
.brand [data-site-name] { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.brand img { width: 40%; height: auto; max-width: 100%; min-width: 0; object-fit: contain; flex: 0 0 40%; }
.brand[data-site-mode="logo"] img { width: 100%; flex-basis: 100%; }
.mobile-brand-row { display: none; }
.appearance-controls, .appearance-image-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.appearance-controls input[type="color"] { min-height: 44px; padding: 4px; }
.appearance-image-fields fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 8px; }
.appearance-image { display: block; max-width: 100%; height: 70px; object-fit: contain; margin: 12px 0; }
.appearance-checkbox { display: flex; gap: 10px; align-items: center; }
.appearance-checkbox input { width: auto; }
.appearance-preview { padding: 18px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
.appearance-preview-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; min-width: 0; }
.appearance-preview-brand strong { min-width: 0; overflow-wrap: anywhere; }
.appearance-preview-brand img { max-width: 100px; max-height: 48px; object-fit: contain; }
.appearance-preview .card { padding: var(--appearance-padding); }
.appearance-preview h2 { color: var(--text); font-size: calc(var(--appearance-size)*20/14); }
.appearance-preview p { font-size: calc(var(--appearance-size)*13/14); }
.appearance-preview .button { font-size: var(--appearance-size); border-radius: var(--appearance-control-radius); }
.appearance-preview-soft { display: block; padding: 12px; margin-top: 12px; background: var(--soft); color: var(--text); }
.appearance-navigation-icons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.appearance-navigation-icons fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 8px; }
.appearance-navigation-icons .icon { width: 32px; height: 32px; object-fit: contain; }
.navigation-icon-image { object-fit: contain; flex-shrink: 0; }

@media (min-width:701px) and (hover:hover) and (pointer:fine) {
    :root { background-color: var(--outer-bg, var(--bg)); background-image: var(--site-background-image, none); background-position: center; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; }
    body { max-width: 1280px; margin-inline: auto; background: var(--bg); }
    .sidebar { left: max(0px, calc((100% - 1280px) / 2)); }
    .app-shell { min-height: 100vh; background: var(--bg); }
}
.appearance-preview-brand { background: var(--surface); padding: 12px; border-radius: var(--radius); background-size: cover; background-position: center; }
.appearance-preview { background-color: var(--outer-bg, var(--bg)); background-size: cover; background-position: center; }
@media(max-width:700px), (hover:none) and (pointer:coarse) {
    .sidebar .brand[data-site-mode="name"]::before { content: attr(data-site-initial); font-size: 22px; }
    .sidebar .brand { width: 100%; }
    .sidebar .brand img { width: 100%; height: auto; max-width: 100%; flex-basis: 100%; }
    .mobile-brand-row { display: block; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
    .mobile-brand-row .brand { margin: 0; justify-content: flex-start; font-size: 20px; letter-spacing: -.5px; }
    .mobile-brand-row .brand > [data-site-name] { display: block; }
    .mobile-brand-row .brand img { width: auto; height: auto; max-width: 40%; max-height: min(100px, 15vh); flex: 0 1 auto; }
    .mobile-brand-row .brand[data-site-mode="logo"] { justify-content: center; }
    .mobile-brand-row .brand[data-site-mode="logo"] img { max-width: 100%; }
    .appearance-controls, .appearance-image-fields, .appearance-navigation-icons { grid-template-columns: minmax(0,1fr); }
}
@media (min-width:701px) and (hover:none) and (pointer:coarse) {
    .mobile-brand-row .brand img { max-height: min(343px, 36.75vh); }
}
.appearance-direction { display: grid; gap: .5rem; }
.appearance-direction[hidden] { display: none; }
.appearance-direction-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.appearance-direction-controls label { max-width: 12rem; }
.appearance-direction-dial { width: 96px; height: 96px; flex: none; border: 2px solid var(--line, #d9e4de); border-radius: 50%; background: var(--surface, #fff); color: var(--text, #202b32); touch-action: none; cursor: crosshair; }
.appearance-direction-dial svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; transform: rotate(var(--gradient-angle, 135deg)); }
.appearance-direction-dial:focus-visible { outline: 3px solid var(--accent, #176c54); outline-offset: 3px; }
