/* Minimal, clean aesthetic (brand color: #a52a2a) */
:root {
  --brand: #a52a2a;
  --bg: #0f0f11;
  --card: #151518;
  --text: #eae9f0;
  --muted: #9aa0a6;
  --border: #2a2a30;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, Noto Sans, Apple Color Emoji, Segoe UI Emoji;
  background: linear-gradient(180deg, #0b0b0d 0%, #0f0f11 100%);
  color: var(--text);
}

.app-header, .app-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(15,15,17,0.8); backdrop-filter: blur(8px);
  z-index: 10;
}
.app-footer { border-top: 1px solid var(--border); border-bottom: none; bottom: 0; top: auto; position: sticky; }

.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 40px; height: 40px; background: var(--brand); color: white; font-weight: 800;
  display:flex;align-items:center;justify-content:center; border-radius: 12px; }
.titles h1 { margin: 0; font-size: 18px; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.hint { font-size: 12px; color: var(--muted); }
.container { padding: 18px; max-width: 1000px; margin: 0 auto; }

.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--border) margin-top:20px;
  border-radius: 16px; padding: 16px; box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.card h2 { margin-top: 0; font-size: 18px; }

.btn {
  background: var(--brand); color: white; border: none; padding: 10px 14px;
  border-radius: 10px; font-weight: 600; cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-small { padding: 6px 10px; border-radius: 8px; font-size: 12px; }
.btn.install { background: #198754; }

textarea, input[type="text"] {
  width: 100%; padding: 10px; border-radius: 12px; background: #0f0f11;
  color: var(--text); border: 1px solid var(--border);
}

.row { display: flex; gap: 8px; align-items: center; }
.row.right { justify-content: flex-end; }

.preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin-top: 10px; border: 1px solid var(--border); }
.muted { color: var(--muted); font-size: 12px; }
.code { background: #0f0f11; border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-height: 60px; margin-top:15px !important;}

.ticks { padding-left: 18px; }
.ticks li { margin: 6px 0; }

.chip { background: #1f1f25; border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; font-size: 12px; }
.update-banner { display:flex; gap:10px; align-items:center; }

dialog {
  border: 1px solid var(--border); border-radius: 16px; padding: 16px;
  background: var(--card); color: var(--text);
}

.notes { list-style: none; padding: 0; margin-top: 10px; }
.notes li { display:flex; justify-content: space-between; align-items: center;
  padding:8px 10px; border:1px solid var(--border); border-radius:10px; margin-bottom:8px;
  background:#0f0f11;
}
.notes .meta { color: var(--muted); font-size: 11px; margin-left: 8px; }
.notes button { font-size: 12px; }
.diag { padding-left: 16px; }
.diag li { margin:6px 0; }

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.thumb {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #0f0f11;
}
.thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}
.thumb .del {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.6);
  color: white; border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 6px; font-size: 11px; cursor: pointer;
}
