:root{
  --bg:#f5f7fb;
  --panel:#ffffff;
  --muted:#6b7280;
  --accent:#2563eb;
  --danger:#ef4444;
  --green:#16a34a;
  color-scheme: light;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:Segoe UI, Roboto, "Noto Sans KR", Arial, sans-serif;background:var(--bg);color:#111}
.app-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:linear-gradient(90deg,#fff,#f7fafc);border-bottom:1px solid #e6edf3}
.app-header h1{margin:0;font-size:18px}
.header-actions button{margin-left:8px;padding:6px 10px;border-radius:6px;cursor:pointer;text-align:center}
.app-main{display:flex;height:calc(100vh - 116px)}
.sidebar{width:300px;border-right:1px solid #e6edf3;padding:12px;background:var(--panel);overflow:auto}
#search{
  width:100%;
  padding:8px;
  border-radius:8px;
  border:none;
  margin-bottom:10px;
  background:var(--green);
  color:#fff;
}

#search::placeholder{ color: rgba(255,255,255,0.9) }
.notes-list{list-style:none;padding:0;margin:0}
.notes-list li{padding:10px;border-radius:8px;margin-bottom:8px;cursor:pointer;border:1px solid transparent}
.notes-list li .title{font-weight:600;margin-bottom:4px}
.notes-list li .meta{font-size:12px;color:var(--muted)}
.notes-list li.active{background:#eef6ff;border-color:var(--accent)}
.editor{flex:1;padding:16px;display:flex;flex-direction:column;gap:8px}
.note-title{padding:10px;border-radius:8px;border:2px solid #d4af37;font-size:16px}
.note-content{flex:1;padding:12px;border-radius:8px;border:2px solid #d4af37;resize:none;font-size:16px}
.editor-actions{display:flex;gap:8px;justify-content:flex-end}
.editor-actions button{padding:8px 12px;border-radius:8px;cursor:pointer;text-align:center}
.editor-actions .danger{background:var(--danger);color:#fff;border:none;transition:background-color 0.3s ease;}

.editor-actions .danger:hover{
  background:var(--green);
}

/* Make all buttons green except those with .danger */
button:not(.danger){
  background:var(--green);
  color:#fff;
  border: none;
  text-align:center;
  transition: background-color 0.3s ease;
}

button:not(.danger):hover {
  background-color: #dc2626;
}
.app-footer{padding:10px 16px;font-size:13px;color:var(--muted);border-top:1px solid #e6edf3;background:#fff}

/* Footer marquee animation */
.app-footer.marquee {
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  min-height: 1.5em;
}
.app-footer .marquee-text {
  display: inline-block;
  position: absolute;
  left: 100%;
  top: -0.2em;
  padding-left: 2rem;
  padding-right: 2rem;
  min-width: max-content;
  animation: footer-marquee 24s linear infinite;
  font-weight: bold;
  color: var(--green);
  box-sizing: border-box;
}
@keyframes footer-marquee {
  0% { left: 100%; }
  100% { left: -100%; }
}

@media (max-width:700px){
  .app-main{flex-direction:column}
  .sidebar{width:100%;height:220px}
}

/* Animation: horizontal sway for header title only */
@keyframes sway {
  0%, 100% { transform: translateX(-2px) }
  50% { transform: translateX(2px) }
}

.app-header h1 {
  animation: sway 2s ease-in-out infinite;
  color: #d4af37;
}

/* small accessibility improvements */
button:focus, input:focus, textarea:focus{outline:3px solid rgba(37,99,235,0.12);outline-offset:2px}

