/* minidoll.net styles */

:root {
  --bg: #F5F1E6;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #8b7e66;
  --hover: #f1ece1;
  --code-bg: #f2efe8;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Courier Prime", "Atkinson Hyperlegible", monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: transparent;
}

a:hover {
  text-decoration-color: var(--accent);
}

/* Three-column layout */
.site-layout.library-layout {
  display: grid;
  grid-template-columns: 240px 260px 1fr;
  min-height: 100vh;
}

/* Left sidebar - logo at top, nav at bottom */
.sidebar {
  background: var(--bg);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar .logo {
  display: block;
  width: 216px;
  max-width: 100%;
  align-self: center;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar nav a {
  text-decoration: none;
}

.sidebar nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.sidebar nav a.current {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* Middle tree panel */
.tree-panel {
  background: var(--bg);
  padding: 1.5rem 1rem;
  overflow-y: auto;
  height: 100vh;
  position: sticky;
  top: 0;
}

.tree-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.tree-item {
  margin: 0;
  line-height: 1.8;
}

.tree-prefix {
  display: inline-block;
  white-space: pre;
  user-select: none;
  color: var(--muted);
}

.tree-item a {
  text-decoration: none;
}

.tree-item a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.tree-item.current > a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* Right content panel */
.content-panel,
.content {
  padding: 2rem 2.5rem;
  overflow-y: auto;
  min-height: 100vh;
}

.content-title,
.content h1 {
  font-size: 1.4rem;
  margin: 0 0 1.5rem 0;
  font-weight: normal;
  text-transform: lowercase;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.breadcrumb .current {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.empty-state {
  color: var(--muted);
  font-style: italic;
  margin-top: 2rem;
}

/* Media list on season pages */
.media-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.media-item {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.5rem;
  align-items: start;
}

.media-item img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  background: var(--bg);
  pointer-events: none;
}

.media-info {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.media-meta {
  margin-bottom: 0.75rem;
}

.media-meta-group {
  margin-bottom: 0.75rem;
}

.media-meta-group:last-child {
  margin-bottom: 0;
}

.media-caption {
  color: var(--text);
  font-style: italic;
}

/* Non-library pages (home, about, etc.) */
.site-layout:not(.library-layout) {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.site-layout:not(.library-layout) .content-panel,
.site-layout:not(.library-layout) .content {
  max-width: 800px;
}

/* Code / inline code */
code {
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Footer */
footer {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Folder content sections (JS single-page) */
.folder-content {
  display: none;
}

.folder-content.active {
  display: block;
}

/* Responsive */
@media (max-width: 900px) {
  .site-layout.library-layout {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .tree-panel {
    position: static;
    height: auto;
    width: 100%;
    padding: 1rem;
  }

  .media-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 700px) {
  .site-layout:not(.library-layout) {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }
}
