@import url("https://fonts.googleapis.com/css2?family=Patrick+Hand&family=Kalam:wght@400;700&display=swap");

:root{
  --bg: #ffffff;
  --ink: #121212;
  --muted: rgba(0,0,0,.55);
  --panel: #f5f3e7;
  --tile: #ececec;
  --shadow: 0 16px 34px rgba(0,0,0,.12);
  --soft: 0 10px 24px rgba(0,0,0,.10);

  --blue:  #79a9e2;
  --pink:  #ffb3ba;
  --green: #bfe9a9;
  --peach: #ffc5a5;

  --paper: #f7f4e6;
  --radius: 12px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* a11y */
.srOnly{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  border:0;
}

/* Topbar */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.topbar__home{
  text-decoration:none;
  color: var(--ink);
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.04);
}
.topbar__title{
  margin:0;
  font-family: "Kalam","Patrick Hand",system-ui,sans-serif;
  letter-spacing: .10em;
  font-size: 32px;
  text-transform: uppercase;
}
.topbar__right{
  display:flex;
  gap: 10px;
  align-items:center;
}
.fileBtn{ user-select:none; }

/* Layout */
.layout{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  width: min(1280px, 96vw);
  margin: 18px auto 28px;
}

.sidebar{
  background: radial-gradient(120% 120% at 30% 20%, #ffffff 0%, var(--panel) 50%, #f1efdf 100%);
  border-radius: var(--radius);
  box-shadow: var(--soft);
  padding: 16px;
  position: sticky;
  top: 18px;
  height: calc(100vh - 110px);
  overflow: auto;
}

.content{
  min-height: calc(100vh - 120px);
}

/* Controls */
.control{ margin-top: 14px; }
.control--compact{ margin-top: 12px; }

.control__label{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.input, .select{
  width:100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  outline: none;
  background: #fff;
}
.select--small{ padding: 8px 10px; }



/* Toggle */
.toggleRow{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.06);
}
.toggleRow input{ transform: translateY(2px); }
.toggleLabel{
  font-weight: 900;
  letter-spacing: .02em;
}
.toggleSub{
  display:block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(0,0,0,.58);
}

/* Nudge */
.nudge{
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(0,0,0,.18);
  background: rgba(255,255,255,.60);
  font-size: 13px;
  line-height: 1.35;
}
.nudge b{
  font-family: "Patrick Hand","Kalam",system-ui,sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Buttons */
.btn{
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
}
.btn--primary{
  background: var(--ink);
  color: #fff;
}
.btn--ghost{
  background: rgba(0,0,0,.05);
  color: var(--ink);
}
.btn:active{ transform: translateY(1px); }
.btn.danger{ color: #b00020; }

/* Category chips */
.chips{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}
.chip{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  cursor:pointer;
  font-weight: 900;
  font-size: 12px;
}
.chip[data-active="true"]{
  background: rgba(0,0,0,.08);
}

/* Content header */
.contentHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.contentHeader__title{
  font-family: "Kalam","Patrick Hand",system-ui,sans-serif;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 24px;
  font-weight: 800;
}
.contentHeader__sub{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(0,0,0,.58);
  font-weight: 700;
}

/* Board */
.board{
  display:grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
  align-items: start;
}

@media (max-width: 1120px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ position: relative; height: auto; }
  .board{ grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
@media (max-width: 700px){
  .board{ grid-template-columns: 1fr; }
}

.noteCard{
  background: var(--tile);
  border-radius: var(--radius);
  box-shadow: var(--soft);
  padding: 14px;
  text-decoration:none;
  color: var(--ink);
  position: relative;
  overflow:hidden;
  transition: box-shadow .12s ease, transform .12s ease;
}
.noteCard:hover{ box-shadow: var(--shadow); transform: translateY(-1px); }

.noteCard[draggable="true"]{ cursor: grab; }
.noteCard.isDragging{
  opacity: .55;
  transform: rotate(-1deg);
}
.noteCard.dropTarget{
  outline: 3px dashed rgba(0,0,0,.25);
  outline-offset: 4px;
}

.noteBlob{
  height: 150px;
  border-radius: 56% 44% 58% 42% / 44% 56% 40% 60%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  padding: 12px;
  text-align:center;
  position: relative;
}

.noteTitle{
  font-family:"Patrick Hand","Kalam",system-ui,sans-serif;
  font-size: 22px;
  letter-spacing: .08em;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.notePreview{
  font-size: 13px;
  color: rgba(0,0,0,.80);
  margin: 0;
  line-height: 1.25;
  max-width: 28ch;
}

.noteMeta{
  margin-top: 10px;
  display:flex;
  justify-content:space-between;
  font-size: 12px;
  color: rgba(0,0,0,.62);
  font-weight: 700;
}

.star{
  position:absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,.78);
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 1000;
  letter-spacing: .06em;
}
/* pin removed */
/*   position:absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,.78);
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 1000;
  letter-spacing: .06em;
 */


/* Timeline */
.timeline{
  border-radius: var(--radius);
}
.group{
  border-radius: var(--radius);
  background: rgba(0,0,0,.03);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.groupTitle{
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(0,0,0,.62);
  font-weight: 1000;
}
.row{
  display:grid;
  grid-template-columns: 96px 1fr 150px;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 8px;
  align-items:center;
  cursor:pointer;
  border: 1px solid rgba(0,0,0,.06);
}
.row:hover{ box-shadow: var(--soft); }

.rowTitle{
  font-weight: 1000;
  font-family: "Patrick Hand","Kalam",system-ui,sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.badge{
  display:inline-flex;
  gap: 6px;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  font-size: 12px;
  font-weight: 1000;
  text-align:center;
}
.badgeDot{
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--blue);
}

/* Empty */
.empty{
  display:grid;
  place-items:center;
  min-height: 50vh;
}
.empty__card{
  background: radial-gradient(120% 120% at 30% 20%, #ffffff 0%, var(--paper) 55%, #f1efdf 100%);
  border-radius: var(--radius);
  box-shadow: var(--soft);
  padding: 22px;
  text-align:center;
}
.empty__title{
  font-family:"Kalam","Patrick Hand",system-ui,sans-serif;
  font-size: 28px;
  margin-bottom: 6px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.empty__text{ color: rgba(0,0,0,.65); font-weight: 700; }

/* Modal */
.modal{
  position:fixed;
  inset:0;
  z-index: 50;
}
.modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.35);
}
.modal__panel{
  position:relative;
  width: min(980px, 92vw);
  height: min(78vh, 720px);
  margin: 6vh auto 0;
  background: radial-gradient(120% 120% at 30% 20%, #ffffff 0%, var(--paper) 55%, #f1efdf 100%);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
  display:flex;
  flex-direction:column;
}
.modal__top{
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content:space-between;
}
.titleInput{
  flex: 1;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  font-size: 18px;
  font-weight: 900;
  font-family:"Patrick Hand","Kalam",system-ui,sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.modal__actions{
  display:flex;
  gap: 10px;
  align-items:center;
}

.metaRow{
  margin-top: 10px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.meta{
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  padding: 8px 10px;
  display:flex;
  gap: 8px;
  align-items:center;
}
.meta--right{ margin-left: auto; }
.meta__label{
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 1000;
  color: rgba(0,0,0,.55);
}
.meta__value{
  font-size: 12px;
  color: rgba(0,0,0,.75);
  font-weight: 900;
}

.textarea{
  margin-top: 12px;
  flex: 1;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.10);
  padding: 14px;
  font-size: 15px;
  line-height: 1.35;
  outline:none;
  resize:none;
  background: #fff;
}

/* Hidden */
.hidden{ display:none; }

/* Focus mode */
body.focus .topbar,
body.focus .sidebar{
  display:none;
}
body.focus .layout{
  grid-template-columns: 1fr;
  width: min(980px, 96vw);
  margin-top: 22px;
}
body.focus .contentHeader{
  justify-content:center;
}
body.focus #focusBtn{ display:none; }
body.focus #exitFocusBtn,
body.focus #exitFocusBtn2{ display:inline-flex !important; }

/* Focus mode exit button */
.focusExit{
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100;
}
body:not(.focus) .focusExit{ display:none; }


.headerBtns{ display:flex; gap:10px; align-items:center; }
