/* The app screen. Builds on /style.css. */
.app { padding-top: 1.25rem; padding-bottom: 2rem; }
.cols { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.col-form, .col-preview { display: grid; gap: 1rem; min-width: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; min-width: 0; }
@media (min-width: 700px) { .card { padding: 1.4rem; } }
.card h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.card h2 .n { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ironbark); color: var(--paper); font-family: var(--font-mono); font-size: 0.85rem; }
@media (min-width: 980px) { .sticky { position: sticky; top: 1rem; } }

details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
#brandBox > summary h2 { margin-bottom: 0; }
#brandBox > summary h2::after { content: '+'; margin-left: auto; font-family: var(--font-mono); color: var(--muted); }
#brandBox[open] > summary h2 { margin-bottom: 0.9rem; }
#brandBox[open] > summary h2::after { content: '−'; }

label { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.85rem; }
label small, .hint { font-family: var(--font-serif); font-weight: 400; color: var(--muted); font-size: 0.9rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: 0.3rem;
  font: 16px/1.4 var(--font-serif); color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { font-family: var(--font-mono); font-size: 14px; line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; border-color: transparent; }
input[type='color'] { height: 46px; padding: 4px; }
input[type='file'] { padding: 8px; font-size: 14px; }
code { font-family: var(--font-mono); font-size: 0.85em; background: var(--paper-dim); padding: 1px 4px; border-radius: 4px; }

.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.row2 { display: grid; gap: 0 0.8rem; grid-template-columns: 7rem minmax(0, 1fr); }
.btn.small { padding: 9px 14px; font-size: 0.9rem; }
#logoPrev { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }

.howto { margin: -0.4rem 0 0.9rem; font-size: 0.95rem; }
.howto summary { color: var(--terracotta); font-family: var(--font-mono); font-size: 0.85rem; }
.howto ul { margin: 0.5rem 0 0 1.2rem; }

.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 9px; overflow: hidden; margin-bottom: 0.9rem; }
.seg button { font: 600 0.92rem var(--font-display); background: transparent; color: var(--ink); border: 0; padding: 8px 14px; cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--paper); }

.prev-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.prev-head h2 { margin-bottom: 0.6rem; }
.prev-head select { width: auto; max-width: 55%; margin: 0 0 0.6rem; padding: 6px 8px; font-size: 14px; }
.subj { font-family: var(--font-display); font-weight: 700; margin-bottom: 0.5rem; overflow-wrap: anywhere; }
#preview { width: 100%; height: 560px; display: block; border: 1px solid var(--line); border-radius: 10px; background: #ede4d3; }
.warn { margin-top: 0.7rem; background: #fbe9df; border-left: 4px solid var(--terracotta); padding: 0.6rem 0.8rem; border-radius: 0 8px 8px 0; font-size: 0.95rem; }

.go { margin-top: 1rem; }
.go .btn { width: 100%; font-size: 1.05rem; }
.go .hint { margin-top: 0.5rem; text-align: center; }
#status { margin-top: 0.8rem; font-size: 0.95rem; }
#status ul { list-style: none; display: grid; gap: 0.35rem; margin-top: 0.4rem; }
#status li { overflow-wrap: anywhere; }
#status .ok::before { content: '✓ '; color: #3c7a3a; font-weight: 700; }
#status .bad::before { content: '✕ '; color: var(--terracotta); font-weight: 700; }
#status .open { display: inline-block; margin-top: 0.7rem; }

.who-chip { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.who-chip.on { color: #3c7a3a; }
.forget { margin-top: 1.5rem; text-align: center; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
