.notes-index-header {
  background: rgba(13, 13, 12, 0.94);
  border-bottom: 1px solid var(--line);
}

.notes-index {
  min-height: 100dvh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 150px clamp(20px, 5vw, 64px) 80px;
}

.notes-index-heading {
  max-width: 900px;
  margin-bottom: 64px;
}

.notes-index-heading h1 {
  max-width: none;
  margin: 8px 0 18px;
  font-size: clamp(3.4rem, 8vw, 7.4rem);
}

.notes-index-heading > p:last-child {
  color: var(--muted);
  font-size: 1rem;
}

.notes-gate {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(320px, 1fr);
  gap: 32px 56px;
  max-width: 980px;
  border: 1px solid var(--line);
  padding: clamp(24px, 4vw, 42px);
  background: var(--panel);
}

.notes-gate h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.notes-gate p,
.notebook-card p {
  color: var(--muted);
}

.notes-unlock-form {
  position: relative;
  display: grid;
  align-content: center;
  gap: 9px;
}

.notes-unlock-form label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.credential-username {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.notes-unlock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.notes-unlock-row input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 13px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  outline: none;
}

.notes-unlock-row input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(201, 152, 84, 0.16);
}

.notes-form-message {
  min-height: 20px;
  margin: 0;
  color: #b85b5b !important;
  font-size: 0.78rem;
}

.notebook-list {
  margin-top: 48px;
  border-top: 1px solid var(--line);
}

.notebook-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.notebook-list-heading h2 {
  margin: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.notebook-list-heading .eyebrow {
  margin: 0 0 6px;
}

.private-notebook-list {
  margin-top: 0;
}

.publish-note {
  margin: -8px 0 22px;
  color: var(--muted);
  font-size: 0.8rem;
}

.notebook-list-heading button {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.notebook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}

.notebook-card {
  position: relative;
  min-height: 260px;
  border: 1px solid var(--line);
  padding: 28px;
  background: var(--panel);
  transition: border-color 160ms ease, transform 160ms ease;
}

.notebook-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.visibility-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
}

.visibility-control input {
  width: 16px;
  height: 16px;
  accent-color: var(--amber);
}

.notebook-share-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}

.notebook-share-button:hover {
  border-color: var(--amber);
  color: var(--ink);
}

.notebook-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.notebook-card-open {
  display: block;
  color: inherit;
}

.notebook-card-label {
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 700;
}

.notebook-card h3 {
  max-width: 380px;
  margin: 54px 0 12px;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 500;
}

.notebook-card p {
  margin: 0;
}

.notebook-card-arrow {
  position: absolute;
  right: 28px;
  bottom: 24px;
  color: var(--amber);
  font-size: 1.5rem;
}

.shelf-message {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .notes-index-header {
    position: absolute;
  }
}

@media (max-width: 560px) {
  .notes-index {
    padding-top: 114px;
  }

  .notes-index-heading {
    margin-bottom: 54px;
  }

  .notes-gate {
    grid-template-columns: 1fr;
  }

  .notes-unlock-row {
    grid-template-columns: 1fr;
  }

  .notes-unlock-row .button {
    width: 100%;
  }
}
