:root {
  color-scheme: light;
  --bg: #f7f5ee;
  --paper: #fffdf7;
  --paper-soft: #f1eadf;
  --ink: #090909;
  --muted: #6f6f6f;
  --line: #111111;
  --pink: #ee3b7d;
  --pink-soft: #ffe5ef;
  --blue: #3b9af4;
  --blue-soft: #e4f0ff;
  --green: #20d184;
  --green-soft: #e7f8e9;
  --yellow: #ffe45c;
  --shadow: 8px 8px 0 #050505;
  --shadow-small: 4px 4px 0 #050505;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(17, 17, 17, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.055) 1px, transparent 1px),
    var(--bg);
  background-size: 30px 30px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 336px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 4px solid var(--line);
  background: rgba(255, 253, 247, 0.88);
  padding: 26px 20px;
}

.brand,
.profile-chip,
.nav-item,
.topbar,
.panel-heading,
.editor-toolbar,
.meta-row,
.task-controls,
.account-label,
.nav-section-title,
.note-card {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-height: 58px;
}

.menu-button,
.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow-small);
}

.menu-button:hover,
.icon-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #050505;
}

.brand-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 4px solid var(--line);
  border-radius: 14px;
  background: var(--blue);
  color: var(--ink);
  box-shadow: var(--shadow-small);
}

.brand strong {
  display: block;
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand span,
.profile-chip span,
.panel-heading p,
.empty-state span,
.locked-state p,
.meta-row span,
.auth-hint,
.account-label span,
.setup-box,
.note-card small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.account-card {
  display: grid;
  gap: 10px;
  border: 4px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 14px;
  box-shadow: var(--shadow-small);
}

.account-label {
  justify-content: space-between;
  gap: 10px;
}

.account-label strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.auth-hint {
  margin: 0;
  line-height: 1.45;
}

.setup-box {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 3px dashed var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
  padding: 0 10px;
}

.google-button {
  min-height: 40px;
}

.create-button,
.ghost-button,
.google-auth-button,
.local-button,
.primary-button,
.secondary-button,
.new-list-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 4px solid var(--line);
  min-height: 56px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 20px;
  box-shadow: var(--shadow-small);
  font-weight: 900;
}

.google-auth-button,
.create-button,
.primary-button {
  background: var(--pink);
  color: #fff;
}

.local-button,
.secondary-button {
  background: var(--paper);
}

.google-auth-button:disabled {
  cursor: not-allowed;
  background: #d8d8d8;
  color: #777;
  box-shadow: none;
  opacity: 0.8;
}

.create-button:hover,
.google-auth-button:not(:disabled):hover,
.local-button:hover,
.primary-button:hover,
.secondary-button:hover,
.new-list-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #050505;
}

.profile-chip {
  gap: 10px;
  min-width: 0;
}

.profile-chip img {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-radius: 10px;
}

.profile-chip div {
  min-width: 0;
}

.profile-chip strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.profile-chip span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  border: 3px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
  text-align: left;
  font-weight: 900;
}

.nav-item span {
  margin-left: auto;
  color: inherit;
  font-size: 13px;
}

.nav-item.active {
  border-color: var(--line);
  background: var(--blue);
  box-shadow: var(--shadow-small);
}

.nav-item:hover {
  border-color: var(--line);
  background: var(--blue-soft);
}

.nav-section-title {
  justify-content: space-between;
  color: var(--ink);
  font-weight: 900;
  padding: 24px 8px 8px;
}

.new-list-button {
  justify-content: flex-start;
  min-height: 48px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  padding: 0 14px;
}

.new-list-button:hover {
  border-color: var(--line);
  background: var(--green-soft);
  box-shadow: var(--shadow-small);
}

.sidebar-footer {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.icon-button input {
  display: none;
}

.icon-button.danger {
  color: var(--pink);
}

.icon-button.active {
  background: var(--yellow);
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 560px;
  min-height: 52px;
  border: 4px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-small);
  padding: 0 16px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.search-box input::placeholder,
.title-input::placeholder,
.body-input::placeholder,
.meta-row input::placeholder {
  color: #8c8c8c;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr));
  gap: 8px;
}

.stats-strip div {
  display: grid;
  gap: 1px;
  min-width: 74px;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: var(--yellow);
  box-shadow: var(--shadow-small);
  padding: 7px 12px;
}

.stats-strip div:nth-child(2) {
  background: var(--green);
}

.stats-strip div:nth-child(3) {
  background: var(--blue);
}

.stats-strip span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.stats-strip small {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.view-actions {
  display: flex;
  gap: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
  gap: 28px;
  min-height: calc(100vh - 118px);
}

.items-panel,
.editor-panel {
  min-width: 0;
  border: 4px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.items-panel,
.editor-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-heading {
  justify-content: space-between;
  gap: 12px;
  border-bottom: 4px solid var(--line);
  background: var(--paper-soft);
  padding: 20px 22px;
}

.panel-heading p,
.panel-heading h1 {
  margin: 0;
}

.panel-heading h1 {
  margin-top: 3px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 950;
  letter-spacing: 0;
}

.panel-heading select {
  min-height: 42px;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-small);
  padding: 0 12px;
  font-weight: 900;
}

.ghost-icon {
  box-shadow: none;
}

.add-inline {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  border: 0;
  border-bottom: 3px solid var(--line);
  background: var(--blue-soft);
  color: var(--ink);
  padding: 0 22px;
  text-align: left;
  font-weight: 900;
}

.items-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 18px 22px 24px;
}

.items-list::-webkit-scrollbar,
.body-input::-webkit-scrollbar {
  width: 10px;
}

.items-list::-webkit-scrollbar-thumb,
.body-input::-webkit-scrollbar-thumb {
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--pink);
}

.note-card {
  position: relative;
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 70px;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px;
  text-align: left;
  box-shadow: var(--shadow-small);
}

.note-card header,
.note-card footer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.note-card header strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-card header > svg:first-child {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--green);
  padding: 3px;
}

.note-card p {
  display: -webkit-box;
  min-height: 20px;
  margin: 0 0 0 38px;
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.note-card footer {
  flex-wrap: wrap;
  margin-left: 38px;
}

.note-card.task {
  background: var(--blue-soft);
}

.note-card:hover,
.note-card.active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #050505;
}

.note-card.active {
  outline: 4px solid var(--pink);
}

.note-card.done {
  background: #ededed;
  opacity: 0.74;
}

.task-circle {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--green);
  color: var(--ink);
  margin-top: 1px;
}

.task-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.task-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.pin-dot {
  flex: 0 0 auto;
  color: var(--pink);
  margin-left: auto;
}

.locked-state,
.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 260px;
  padding: 30px;
  text-align: center;
}

.locked-state i,
.empty-state i {
  width: 44px;
  height: 44px;
  color: var(--pink);
}

.locked-state h2 {
  max-width: 420px;
  margin: 16px 0 8px;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: 0;
}

.locked-state p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.6;
}

.editor-form {
  display: grid;
  grid-template-rows: auto auto minmax(92px, auto) auto auto;
  border-bottom: 4px solid var(--line);
  background: #fff9e9;
}

.editor-toolbar {
  justify-content: space-between;
  gap: 14px;
  padding: 14px 22px 10px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-small);
  padding: 0 12px;
  font-weight: 900;
}

.segmented button.active {
  background: var(--blue);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.title-input,
.body-input,
.meta-row input,
.task-controls input[type="date"] {
  width: calc(100% - 44px);
  border: 3px solid var(--line);
  outline: 0;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-small);
  margin-inline: 22px;
}

.title-input {
  min-height: 52px;
  padding: 0 14px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.body-input {
  min-height: 92px;
  resize: vertical;
  padding: 12px 14px;
  line-height: 1.45;
  margin-top: 12px;
}

.task-controls {
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 22px 0;
}

.task-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.task-controls input[type="date"] {
  width: auto;
  min-height: 40px;
  padding: 0 10px;
  margin: 0;
}

.meta-row {
  gap: 14px;
  padding: 14px 22px 18px;
}

.meta-row input {
  flex: 1;
  min-height: 42px;
  margin: 0;
  padding: 0 12px;
}

.meta-row span {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.brand-mark svg {
  width: 30px;
  height: 30px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 4px solid var(--line);
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }

  .nav-section-title,
  .new-list-button,
  .account-card {
    grid-column: 1 / -1;
  }

  .workspace {
    padding: 18px 12px;
  }

  .topbar,
  .view-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box,
  .primary-button,
  .secondary-button {
    width: 100%;
    max-width: none;
  }

  .content-grid {
    min-height: auto;
  }

  .meta-row,
  .task-controls {
    align-items: stretch;
    flex-direction: column;
  }
}
