/* 지시자: ohjh (2026-11-13) / 작성: Claude Sonnet 5.5 — note 프로젝트 (crm과 같은 다크 테마) */
:root {
  color-scheme: dark;
  --bg: #202020; --surface: #2b2b2b; --raised: #323232; --border: #3f3f3f;
  --text: #f3f3f3; --muted: #a0a0a0; --primary: #8b5cf6; --primary-dark: #7c3aed; --danger: #f87171;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.screen { min-height: 100dvh; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); min-height: 1.2em; margin: 0; font-size: 13px; }

input, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=range]):not([type=color]) {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.btn { background: var(--raised); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.btn:active { filter: brightness(1.2); }
.btn.primary { background: var(--primary); border-color: var(--primary-dark); }
.btn.danger { color: var(--danger); }
.check { display: flex; align-items: center; gap: 6px; }

#screen-login { display: flex; align-items: center; justify-content: center; padding: 16px; }
.card { width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card h1 { margin: 0 0 4px; font-size: 20px; text-align: center; }

.topbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--bg); }
.sticky { position: sticky; top: 0; z-index: 20; }
.sticky2 { position: sticky; top: 56px; z-index: 19; }
.title-input { font-size: 16px; font-weight: 600; }

.note-list { list-style: none; margin: 0; padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.note-list li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.note-list li:active { background: var(--raised); }
#list-empty { padding: 24px 16px; text-align: center; }

.toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--surface);
  border-block: 1px solid var(--border); overflow-x: auto; }
.tool { background: var(--raised); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.tool.on { background: var(--primary); border-color: var(--primary-dark); }
.sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; flex: none; }
#tool-color { width: 34px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; }

.blocks { padding: 12px; display: flex; flex-direction: column; gap: 12px; max-width: 1000px; margin: 0 auto; }
.block { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.block .del { position: absolute; top: 4px; right: 4px; z-index: 2; opacity: .5; padding: 2px 8px; }
.block textarea { width: 100%; min-height: 90px; background: transparent; border: 0; color: var(--text);
  padding: 12px 40px 12px 14px; font: inherit; line-height: 1.6; resize: none; overflow: hidden; display: block; }
.block canvas { display: block; width: 100%; border-radius: var(--radius); touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.block.ink { background-image: repeating-linear-gradient(transparent 0 39px, #ffffff0d 39px 40px); }
.addbar { display: flex; gap: 8px; padding: 4px 12px 40px; justify-content: center; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #000c; padding: 10px 16px; border-radius: 20px; z-index: 100; font-size: 14px; }
