:root {
  --bg: #f7f7f8;
  --panel: #ffffff;
  --text: #222;
  --accent: #0b6cff;
  --border: #e3e3e3;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
.app-header { display: flex; align-items: center; gap: 16px; padding: 16px 24px; background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000; }
.logo { width: 56px; height: 56px; object-fit: contain; background: #113a80; padding: 6px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.titles h1 { margin: 0; font-size: 22px; }
.titles h2 { margin: 2px 0 0; font-size: 14px; color: #555; font-weight: 500; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 10px; }
.controls label { display: flex; gap: 8px; align-items: center; }
.actions { display: flex; gap: 10px; }
button { background: var(--accent); color: white; border: none; border-radius: 8px; padding: 10px 14px; cursor: pointer; }
button:hover { filter: brightness(0.95); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.thumb { position: relative; background: #fafafa; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.thumb img { width: 100%; height: 120px; object-fit: cover; display: block; }
.thumb .meta { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 4px 6px; }
#sheetCanvas { width: 100%; height: auto; background: #fff; border: 1px dashed #bbb; border-radius: 8px; }
.app-footer { text-align: center; color: #666; padding: 16px; }
.hint { color: #666; font-size: 12px; }
.status { margin-top: 8px; color: #0b6cff; font-weight: 600; }
.preview-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.preview-controls button { padding: 6px 10px; border-radius: 6px; background: var(--accent); color: #fff; border: none; }
.preview-controls #pageInfo { font-weight: 600; color: #333; }
