* { box-sizing: border-box; }
:root { color-scheme: light; font: 16px/1.5 system-ui, sans-serif; color: #482518; background: #fbf6f1; }
body { margin: 0; }
[hidden] { display: none !important; }
header, .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
header { padding: .85rem max(1rem, calc((100% - 980px)/2)); background: #f4eadf; border-bottom: 1px solid #e2d1c2; }
header strong { font-size: 1.65rem; }
main { max-width: 1012px; margin: auto; padding: 1rem; }
h1 { margin: .5rem 0 1rem; font-size: 2rem; }
h2 { margin: 0 0 1rem; }
.columns { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 2.4fr); gap: 1rem; align-items: start; }
.card { border: 1px solid #e2d1c2; border-radius: 1rem; padding: 1rem; background: #fffaf5; }
.narrow { max-width: 28rem; margin: 3rem auto 1rem; }
label { display: grid; gap: .25rem; margin-bottom: .8rem; }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; padding: .55rem; border: 1px solid #b59b89; border-radius: .5rem; background: white; }
button { min-height: 44px; cursor: pointer; background: #9a5833; color: white; padding: .55rem .85rem; border: 1px solid #9a5833; border-radius: .6rem; font-weight: 650; }
button:disabled { opacity: .65; cursor: wait; }
button.secondary, nav button { background: #fffaf5; color: #482518; border-color: #d5bfae; }
nav button { display: block; width: 100%; text-align: left; margin-bottom: .5rem; }
nav { max-height: 34rem; overflow: auto; }
nav button[aria-current=true] { border-color: #9a5833; background: #f4eadf; }
.check { display: flex; align-items: center; gap: .4rem; }
fieldset { border: 1px solid #e2d1c2; margin: .8rem 0; border-radius: .6rem; padding: .6rem; }
.size { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr auto auto; align-items: center; }
.size button { align-self: center; }
#preview { max-width: 100%; width: 180px; max-height: 180px; object-fit: cover; border-radius: .65rem; }
#status:empty { margin: 0; }
#status:not(:empty) { padding: .75rem; background: #f4eadf; border-radius: .6rem; }
#installation { border: 1px solid #e2d1c2; border-radius: .75rem; padding: .5rem .85rem; background: #fffaf5; }
#installation summary { cursor: pointer; min-height: 44px; align-content: center; font-weight: 650; }
#installation p { margin: .45rem 0 .75rem; }
#install { margin: .4rem 0; }
@media (display-mode: standalone) {
  #installation { display: none; }
  header { padding-top: calc(.85rem + env(safe-area-inset-top)); }
  main { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 660px) {
  header { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
  main { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
  .columns { grid-template-columns: minmax(0, 1fr); }
  nav { max-height: 12rem; }
  .size { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #editor-title { scroll-margin-top: 1rem; }
  #save, #login-form button { width: 100%; }
}
