/* =========================
   The Library — styles.css
   Quiet. Intentional. Human.
   ========================= */

/* --- Base Reset --- */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* --- Body --- */
body {
  font-family: Georgia, "Times New Roman", serif;
  background: #fafafa;
  color: #111;
  line-height: 1.6;
  max-width: 720px;
  padding: 48px 24px 96px;
  margin: 0 auto;
}

/* --- Generic Layout --- */
.container {
  margin-top: 1rem;
}

/* Hide views when .hidden is applied */
.view.hidden,
.hidden {
  display: none;
}

/* --- Headings --- */
h1,
h2,
h3 {
  font-weight: normal;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.6rem;
}

/* Intro title shouldn't float down so far */
.intro h1 {
  margin-top: 0;
}

/* View titles / subtitles */
.view-title {
  margin-top: 0;
  font-size: 1.4rem;
}

.view-subtitle {
  font-size: 0.95rem;
  color: #444;
}

/* --- Paragraphs --- */
p {
  margin: 0.75rem 0;
}

/* --- Navigation --- */
.topbar {
  margin-bottom: 2.5rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Works for both <button.nav-link> and <a.nav-link> */
.nav-link {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #111;
  text-decoration: none;
  color: #111;
  font-size: 0.9rem;
  background: none;
}

/* Hover + active states */
.nav-link:hover {
  background: #111;
  color: #fafafa;
}

.nav-link.is-active,
nav a.is-active {
  background: #111;
  color: #fafafa;
}

/* --- Links --- */
a {
  color: #111;
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

/* --- Buttons --- */
button,
input[type="submit"] {
  font-family: inherit;
  font-size: 0.9rem;
  background: none;
  border: 1px solid #111;
  padding: 6px 10px;
  cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
  background: #111;
  color: #fafafa;
}

/* Small buttons (like Clear) */
.mini-btn {
  font-size: 0.8rem;
  padding: 4px 8px;
}

/* --- Labels / Form Fields --- */
label,
.field-label {
  font-size: 0.9rem;
  display: block;
  margin-top: 0.75rem;
}

/* --- Textareas / Inputs --- */
textarea,
input[type="text"] {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 8px;
  border: 1px solid #111;
  background: #fff;
  margin-top: 6px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* --- Sections --- */
section {
  margin-bottom: 3rem;
}

/* --- Intro / Philosophy / Prompt --- */
.subtitle {
  font-size: 1rem;
  color: #444;
}

.philosophy p {
  font-size: 0.95rem;
}

.prompt .question {
  margin-top: 1.5rem;
  font-style: italic;
}

.prompt .answer {
  font-weight: bold;
}

/* Call-to-action on home */
.action {
  margin-top: 1.5rem;
}

/* Ethos line */
.ethos {
  margin-top: 2.5rem;
}

/* --- Quiet Notes --- */
.note,
.quiet {
  font-size: 0.85rem;
  color: #444;
  margin-top: 0.5rem;
}

/* --- Local Shelf (private to device) --- */
.local-shelf {
  margin-top: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #eee;
}

.local-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.local-title {
  font-size: 0.95rem;
  font-weight: normal;
}

.local-list {
  margin-top: 0.5rem;
}

.local-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.local-dot {
  font-size: 0.8rem;
  margin-right: 0.4rem;
}

.local-text {
  font-size: 0.95rem;
}

/* meta line for category / visibility */
.local-meta {
  font-size: 0.8rem;
  color: #555;
  margin-left: 1.2rem;
  margin-top: 0.1rem;
}

.local-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #555;
}

/* Soft horizontal rule */
.soft-rule {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 1.5rem 0 0;
}

/* --- Public Shelf --- */
.shelf {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.shelf-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.15rem 0;
  text-decoration: none;
  color: inherit;
}

.shelf-item:hover .shelf-title {
  text-decoration: underline;
}

.shelf-id {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  color: #666;
  min-width: 2.5rem;
}

.shelf-title {
  font-size: 1rem;
}

.private-shelf {
  display: none;
}

.private-shelf.is-visible {
  display: block;
}

/* --- Writer / Place View --- */
.writer {
  margin-top: 1rem;
}

.writer-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.75rem;
}

.hint {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.75rem;
}

/* Visibility choice radios */
.visibility-choice {
  margin-top: 1rem;
  border: 1px solid #ddd;
  padding: 0.75rem 0.9rem;
}

.visibility-choice legend {
  font-size: 0.85rem;
  padding: 0 0.3rem;
}

.visibility-choice label {
  font-size: 0.9rem;
  display: block;
  margin-top: 0.4rem;
}

/* --- Entry pages (001/002/003) --- */
.entry {
  margin-top: 1rem;
}

/* --- Feedback Section (piece pages) --- */
.feedback {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

.feedback textarea {
  margin-top: 0.75rem;
  min-height: 6rem;
}

.feedback button {
  margin-top: 0.5rem;
}

.feedback-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

/* --- About --- */
.about p {
  max-width: 60ch;
}

/* --- Library Card View --- */
.card-shell {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid #111;
  border-radius: 6px;
  background: #fdfdfd;
}

.card-shell .quiet {
  margin-top: 0;
}

.card-main {
  font-size: 1.1rem;
  margin: 0.25rem 0;
}

.card-id {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: #555;
}

.card-form {
  margin-top: 1.5rem;
  max-width: 520px;
}

/* --- Footer --- */
.site-footer,
footer {
  margin-top: 5rem;
  font-size: 0.8rem;
  color: #555;
  text-align: center;
}

/* --- Mobile --- */
@media (max-width: 600px) {
  body {
    padding: 32px 16px 72px;
  }

  h1 {
    font-size: 1.9rem;
  }
}


