/* ===================================
   SECTIONS CSS - Styles for embedded section content
   =================================== */

/* ===================================
   SHEETS SECTION - Horizontal Timeline
   =================================== */

#sheets-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheets-container {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sheets-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  position: relative;
}

.sheets-title {
  font-family: Futura, sans-serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--color-text-muted, #999999);
  text-align: center;
  margin: 0;
}

/* Info button - positioned absolutely to the right of title */
/* TODO: Unhide info buttons once real text is provided */
.sheets-info-btn,
.diary-info-btn,
.publication-info-btn {
  display: none;
}

.sheets-info-btn {
  position: absolute;
  left: calc(50% + 70px);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--color-text-muted, #999999);
  background: transparent;
  color: var(--color-text-muted, #999999);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12px;
  font-style: italic;
  cursor: pointer;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.sheets-info-btn:hover {
  border-color: var(--color-text-active, #ffffff);
  color: var(--color-text-active, #ffffff);
  transform: scale(1.15);
}

/* Info popup - positioned to the right of the info button */
.sheets-info-popup {
  position: absolute;
  top: 50%;
  left: calc(50% + 110px);
  transform: translateY(-50%);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.07) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px 24px;
  width: 280px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  white-space: normal;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

.sheets-info-popup.visible {
  opacity: 1;
  visibility: visible;
}

.sheets-info-popup p {
  font-family: Futura, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text, #c8c8c8);
  margin: 0;
  line-height: 1.5;
}

.sheets-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 60px;
  position: relative;
}

/* Timeline line - connects all dots */
.sheets-section::before {
  content: '';
  position: absolute;
  bottom: 39px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-text-muted, #999999);
  opacity: 0.4;
  pointer-events: none;
}

.sheets-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #999999);
  text-decoration: none;
  padding: 20px 28px 45px;
  min-width: 90px;
  transition: color 0.3s ease, transform 0.3s ease;
  text-align: center;
  flex-shrink: 0;
}

/* Timeline dot marker */
.sheets-link::after {
  content: '';
  position: absolute;
  bottom: 15px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--color-text-muted, #999999);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
  z-index: 1;
}

.sheets-link:visited {
  color: var(--color-text-muted, #999999);
}

.sheets-link:hover,
.sheets-link:focus {
  color: var(--color-text-active, #ffffff);
  transform: translateY(-4px);
}

.sheets-link:hover::after,
.sheets-link:focus::after {
  background: var(--color-text-active, #ffffff);
  transform: translateX(-50%) scale(1.5);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.sheets-link:active {
  transform: translateY(-2px);
}

/* Light mode sheets */
body.light-mode .sheets-section::before {
  background: var(--color-text-muted, #757575);
}

body.light-mode .sheets-link {
  color: var(--color-text-muted, #757575);
}

body.light-mode .sheets-link::before {
  background: var(--color-text-muted, #757575);
}

body.light-mode .sheets-link::after {
  background: var(--color-text-muted, #757575);
}

body.light-mode .sheets-link:visited {
  color: var(--color-text-muted, #757575);
}

body.light-mode .sheets-link:hover,
body.light-mode .sheets-link:focus {
  color: var(--color-text-active, #000000);
}

body.light-mode .sheets-link:hover::after,
body.light-mode .sheets-link:focus::after {
  background: var(--color-text-active, #000000);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

body.light-mode .sheets-info-btn {
  border-color: var(--color-text-muted, #757575);
  color: var(--color-text-muted, #757575);
}

body.light-mode .sheets-info-btn:hover {
  border-color: var(--color-text-active, #000000);
  color: var(--color-text-active, #000000);
  transform: scale(1.15);
}

body.light-mode .sheets-info-popup {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.35) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -1px 1px rgba(0, 0, 0, 0.03);
}

body.light-mode .sheets-info-popup p {
  color: var(--color-text, #2a2a2a);
}

/* ===================================
   PLAYLISTS SECTION
   =================================== */

#playlists-content {
  padding: 0 !important;
}

.playlists-view {
  display: none;
  min-height: 100vh;
  padding: 80px 20px 120px;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
}

.playlists-view.active {
  display: flex;
}

/* Playlists Landing Navigation */
.playlists-nav-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
  min-height: 60vh;
  margin-top: 60px;
}

/* Top row: GENRE, MOMENTS, DIARY in horizontal layout */
.playlists-nav-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

/* MORE button below the row */
.playlist-nav-btn.more-btn {
  margin-top: 10px;
}

.playlist-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  padding: 20px 50px;
  font-family: Futura, sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-text, #c8c8c8);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.playlist-nav-btn:hover {
  transform: translateY(-4px) scale(1.05);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--color-text-active, #ffffff);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

body.light-mode .playlist-nav-btn {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--color-text, #2a2a2a);
}

body.light-mode .playlist-nav-btn:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--color-text-active, #000000);
}

/* Playlists back button */
.playlists-back {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 100;
}

/* Back button positioning handled by .section-back in global.css */

/* Genre view header */
.genre-view-header {
  text-align: center;
  margin-top: 60px;
  margin-bottom: -30px;
}

.genre-view-title {
  font-family: Futura, sans-serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted, #999999);
  margin: 0;
}

.genre-view-disclaimer {
  font-size: var(--font-size-caption, 11px);
  color: var(--color-text-muted, #999999);
  margin: 6px 0 0;
  letter-spacing: 0.05em;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 700px;
  width: 100%;
  margin-top: 60px;
  padding: 0 20px;
}

.misc-grid {
  grid-template-columns: repeat(2, 1fr);
  max-width: 400px;
}

/* ===================================
   DIARY VIEW - Sequenced Playlists
   =================================== */

.diary-container {
  max-width: 700px;
  width: 90%;
  margin: 0 auto;
  padding: 20px 0 100px;
}

.diary-password-container {
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100%;
}

.diary-password-input {
  width: 100%;
  max-width: 350px;
  padding: 14px 24px;
  background: var(--glass-bg, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  border-radius: 50px;
  color: var(--color-text, #c8c8c8);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  text-align: center;
}

/* Hide native placeholder */
.diary-password-input::placeholder {
  color: transparent;
}

/* Custom placeholder overlay with mixed fonts */
.password-placeholder-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-text-muted, #999999);
  font-family: inherit;
  font-size: 14px;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

/* Question mark in system font for cleaner glyph */
.password-placeholder-overlay .alt-font {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
}

/* Hide overlay when input has value or is focused */
.diary-password-input:focus + .password-placeholder-overlay,
.diary-password-input:not(:placeholder-shown) + .password-placeholder-overlay {
  opacity: 0;
}

.diary-password-input:focus {
  border-color: var(--glass-border-focus, rgba(255, 255, 255, 0.4));
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

/* Password field glow when typing */
.diary-password-input.typing {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
}

/* Flash effect on password acceptance */
.diary-password-input.accepted {
  animation: passwordFlash 0.6s ease-out;
}

@keyframes passwordFlash {
  0% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.25); }
  50% { box-shadow: 0 0 40px rgba(255, 255, 255, 0.6); }
  100% { box-shadow: none; }
}

/* DIARY header with title and info button */
.diary-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}

/* DIARY title - centered, with info button positioned absolutely */
.diary-title {
  font-family: Futura, sans-serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--color-text-muted, #999999);
  text-align: center;
  margin: 0;
}

/* Info button - positioned absolutely to the right of title */
.diary-info-btn {
  position: absolute;
  left: calc(50% + 60px);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--color-text-muted, #999999);
  background: transparent;
  color: var(--color-text-muted, #999999);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12px;
  font-style: italic;
  cursor: pointer;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.diary-info-btn:hover {
  border-color: var(--color-text-active, #ffffff);
  color: var(--color-text-active, #ffffff);
  transform: scale(1.15);
}

/* Info popup - positioned to the right of the info button */
.diary-info-popup {
  position: absolute;
  top: 50%;
  left: calc(50% + 100px);
  transform: translateY(-50%);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.07) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px 24px;
  width: 280px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  white-space: normal;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

.diary-info-popup.visible {
  opacity: 1;
  visibility: visible;
}

.diary-info-popup p {
  font-family: Futura, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text, #c8c8c8);
  margin: 0;
  line-height: 1.5;
}

/* Password message below field */
.diary-password-message {
  font-family: Futura, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text, #c8c8c8);
  text-align: center;
  height: 20px;
  margin-top: 12px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.diary-password-message.visible {
  opacity: 1;
}

.diary-password-message .alt-font {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 350;
  color: inherit;
}

.diary-year-section {
  margin-bottom: 30px;
}

.diary-year {
  font-family: Futura, sans-serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--color-text-muted, #999999);
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
}

/* Diary year toggle styling */
.diary-year-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.3s ease,
              transform 0.3s ease,
              text-shadow 0.3s ease;
}

.diary-year-toggle:hover {
  color: var(--color-text-active, #ffffff);
  transform: translateX(4px);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.diary-year-toggle:hover .diary-year-icon {
  color: var(--color-text-active, #ffffff);
}

.diary-year-icon {
  font-size: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed state (default for non-expanded sections) */
.diary-year-section:not(.expanded) .diary-year-icon {
  transform: rotate(-90deg);
}

.diary-year-section:not(.expanded) .diary-year-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
  transition: max-height 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
              margin-top 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
              padding-top 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Expanded state */
.diary-year-section.expanded .diary-year-content {
  max-height: 2000px;
  opacity: 1;
  margin-top: 20px;
  padding-top: 0;
  transition: max-height 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.1s,
              margin-top 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
              padding-top 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.diary-year-section.expanded .diary-year-icon {
  transform: rotate(0deg);
}

.diary-playlist-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diary-playlist-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.diary-playlist-item:hover {
  background: var(--glass-bg, rgba(255, 255, 255, 0.08));
  transform: translateX(4px);
}

.diary-playlist-number {
  font-family: Futura, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted, #999999);
  width: 35px;
  flex-shrink: 0;
}

.diary-playlist-name {
  flex: 1;
  font-size: 16px;
  color: var(--color-text, #c8c8c8);
  transition: color 0.3s ease;
}

.diary-playlist-item:hover .diary-playlist-name {
  color: var(--color-text-active, #ffffff);
}

.diary-playlist-date {
  font-size: 14px;
  color: var(--color-text-muted, #999999);
  margin-left: 20px;
  flex-shrink: 0;
}

.diary-artwork-preview {
  position: absolute;
  left: -180px;
  top: 50%;
  transform: translateY(-50%);
  width: 150px;
  height: 150px;
  border-radius: 12px;
  background: var(--glass-bg, rgba(255, 255, 255, 0.08));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.diary-playlist-item:hover .diary-artwork-preview {
  opacity: 1;
}

/* Hidden playlists styling */
.diary-hidden-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid var(--color-text-muted, #999999);
}

.diary-hidden-label {
  color: var(--color-text-active, #ffffff);
}

.diary-hidden-section .diary-playlist-item {
  opacity: 0.9;
}

/* Light mode diary */
body.light-mode .diary-password-input {
  background: var(--glass-bg, rgba(0, 0, 0, 0.05));
  border-color: var(--glass-border, rgba(0, 0, 0, 0.1));
  color: var(--color-text, #2a2a2a);
}

body.light-mode .diary-year {
  color: var(--color-text-muted, #757575);
  border-bottom-color: var(--glass-border, rgba(0, 0, 0, 0.1));
}

body.light-mode .diary-year-toggle:hover {
  color: var(--color-text-active, #000000);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

body.light-mode .diary-year-toggle:hover .diary-year-icon {
  color: var(--color-text-active, #000000);
}

body.light-mode .diary-playlist-name {
  color: var(--color-text, #2a2a2a);
}

body.light-mode .diary-playlist-item:hover .diary-playlist-name {
  color: var(--color-text-active, #000000);
}

body.light-mode .diary-playlist-item:hover {
  background: var(--glass-bg, rgba(0, 0, 0, 0.05));
}

body.light-mode .diary-info-btn {
  border-color: var(--color-text-muted, #757575);
  color: var(--color-text-muted, #757575);
}

body.light-mode .diary-info-btn:hover {
  border-color: var(--color-text-active, #000000);
  color: var(--color-text-active, #000000);
  transform: scale(1.15);
}

body.light-mode .diary-info-popup {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.35) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -1px 1px rgba(0, 0, 0, 0.03);
}

body.light-mode .diary-info-popup p {
  color: var(--color-text, #2a2a2a);
}

/* ===================================
   MOMENTS VIEW - Date-specific playlists
   =================================== */

.moments-container {
  max-width: 600px;
  width: 90%;
  margin: 0 auto;
  padding: 40px 0 100px;
}

.moments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.moment-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--glass-bg, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  text-decoration: none;
  transition: all 0.3s ease;
  gap: 24px;
}

.moment-item:hover {
  background: var(--glass-bg-hover, rgba(255, 255, 255, 0.12));
  transform: translateX(4px);
  border-color: var(--glass-border-focus, rgba(255, 255, 255, 0.2));
}

.moment-date {
  font-family: Futura, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted, #999999);
  min-width: 100px;
  flex-shrink: 0;
}

.moment-title {
  font-size: 16px;
  color: var(--color-text, #c8c8c8);
  flex: 1;
  transition: color 0.3s ease;
}

.moment-item:hover .moment-title {
  color: var(--color-text-active, #ffffff);
}

.moments-placeholder-note {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  color: var(--color-text-muted, #999999);
  font-style: italic;
}

/* Light mode moments */
body.light-mode .moment-item {
  background: var(--glass-bg, rgba(0, 0, 0, 0.05));
  border-color: var(--glass-border, rgba(0, 0, 0, 0.1));
}

body.light-mode .moment-item:hover {
  background: var(--glass-bg-hover, rgba(0, 0, 0, 0.08));
}

body.light-mode .moment-title {
  color: var(--color-text, #2a2a2a);
}

body.light-mode .moment-item:hover .moment-title {
  color: var(--color-text-active, #000000);
}

.genre-folder {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.genre-folder:hover {
  transform: scale(1.05) translateY(-4px);
  background: var(--glass-bg-hover, rgba(255, 255, 255, 0.12));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.folder-label {
  font-family: Futura, sans-serif;
  font-size: var(--font-size-callout, 16px);
  font-weight: 500;
  letter-spacing: var(--tracking-normal, 0.08em);
  text-transform: uppercase;
  color: var(--color-text, #c8c8c8);
}

.genre-folder:hover .folder-label {
  color: var(--color-text-active, #ffffff);
}

.sequences-folder {
  opacity: 0.4;
  cursor: not-allowed;
}

.coming-soon {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  font-style: italic;
}

.search-container {
  position: fixed;
  bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  z-index: 100;
}

.search-bar {
  width: 100%;
  padding: 16px 24px;
  background: var(--glass-bg, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  border-radius: 50px;
  color: var(--color-text, #c8c8c8);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  box-sizing: border-box;
}

.search-bar::placeholder {
  color: var(--color-text-muted, #999999);
}

.search-bar:focus {
  border-color: var(--glass-border-focus, rgba(255, 255, 255, 0.4));
}

/* Wheel View - fixed layout, no scroll */
#wheel-view {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding: 0;
  justify-content: space-between;
}

#wheel-view.active {
  display: flex;
}

.wheel-back-container {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 100;
  width: auto;
  padding: 0;
}

.wheel-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 70px 30px 5px;
  width: 100%;
}

.current-genre-label {
  font-family: Futura, sans-serif;
  font-size: var(--font-size-title2, 20px);
  font-weight: 500;
  letter-spacing: var(--tracking-wide, 0.12em);
  text-transform: uppercase;
  color: var(--color-text-muted, #999999);
}

.playlist-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.artwork-container {
  width: 180px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  background: var(--glass-bg, rgba(255, 255, 255, 0.08));
  position: relative;
}

.artwork-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 60%),
    linear-gradient(
      135deg,
      rgba(60, 60, 60, 0.5) 0%,
      rgba(30, 30, 30, 0.6) 50%,
      rgba(45, 45, 45, 0.5) 100%
    );
  z-index: 0;
}

.playlist-artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.playlist-name {
  font-family: Futura, sans-serif;
  font-size: var(--font-size-title2, 24px);
  font-weight: 500;
  margin-bottom: var(--space-2, 4px);
  letter-spacing: var(--tracking-wider, 0.15em);
  text-transform: uppercase;
  color: var(--color-text-active, #ffffff);
  text-align: center;
}

.genre-description {
  text-align: center;
  margin-bottom: 12px;
  max-width: 300px;
}

.genre-tag {
  font-style: italic;
  font-size: 14px;
  color: var(--color-text-muted, #999999);
  text-decoration: none;
  transition: color 0.2s ease;
}

.genre-tag:hover {
  color: var(--color-text-active, #ffffff);
  text-decoration: underline;
}

.genre-desc-text {
  font-size: var(--font-size-footnote, 13px);
  color: var(--color-text-muted, #999999);
  margin-top: var(--space-4, 8px);
  line-height: var(--line-height-normal, 1.5);
}

.subgenre-pills {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 20px;
  margin-bottom: 20px;
}

.subgenre-pill {
  padding: 10px 20px;
  background: var(--glass-bg, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  border-radius: 50px;
  color: var(--color-text, #c8c8c8);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.subgenre-pill:hover {
  background: var(--glass-bg-hover, rgba(255, 255, 255, 0.12));
}

.subgenre-pill.active {
  background: var(--color-text-active, #ffffff);
  color: #131313;
  border-color: transparent;
}

/* Click Wheel */
.click-wheel {
  position: fixed;
  bottom: calc(-80px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(60, 60, 60, 0.95) 0%, rgba(35, 35, 35, 0.98) 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4), inset 0 2px 20px rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.wheel-center {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(80, 80, 80, 0.9) 0%, rgba(50, 50, 50, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text, #c8c8c8);
  font-size: 22px;
  transition: all 0.3s ease;
}

.wheel-center:hover {
  background: linear-gradient(145deg, rgba(90, 90, 90, 0.9) 0%, rgba(60, 60, 60, 0.95) 100%);
  color: var(--color-text-active, #ffffff);
}

.wheel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.wheel-nav:hover {
  color: rgba(255, 255, 255, 0.8);
}

.wheel-nav.prev {
  left: 15%;
}

.wheel-nav.next {
  right: 15%;
}

.wheel-indicator {
  position: absolute;
  top: 25%;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
}

.wheel-indicator .current-index {
  color: rgba(255, 255, 255, 0.8);
}

/* ===================================
   WRITING SECTION
   =================================== */

.writing-section {
  max-width: 700px;
  width: 90%;
  margin: 0 auto;
  padding: 80px 0 100px;
  display: flex;
  flex-direction: column;
}

.publication-section {
  margin-bottom: 64px;
}

.publication-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 100%;
  padding: 20px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  cursor: pointer;
  transition: border-color 0.3s ease,
              transform 0.3s ease;
}

.publication-header:hover {
  border-bottom-color: var(--color-text-active, #ffffff);
  transform: translateX(4px);
}

.publication-header .heading {
  margin: 0;
  font-family: Futura, sans-serif;
  font-size: 28px;
  color: var(--color-text-muted, #999999);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
  transition: color 0.3s ease,
              text-shadow 0.3s ease;
}

.publication-header:hover .heading {
  color: var(--color-text-active, #ffffff);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.publication-header .heading a,
.publication-header .heading a:visited,
.publication-header .heading a:active {
  color: inherit;
  text-decoration: none;
}

.publication-header .heading a:hover {
  text-decoration: underline;
}

.publication-name-link {
  color: inherit !important;
}

.dropdown-icon {
  font-size: 14px;
  color: var(--color-text-muted, #999999);
  transition: transform 0.3s ease, color 0.3s ease;
}

.publication-header.expanded .dropdown-icon {
  transform: rotate(180deg);
}

.publication-header:hover .dropdown-icon {
  color: var(--color-text-active, #ffffff);
}

/* Right side of publication header: info button + chevron */
.publication-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Publication info button — matches sheets/diary info button style */
.publication-info-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--color-text-muted, #999999);
  background: transparent;
  color: var(--color-text-muted, #999999);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12px;
  font-style: italic;
  cursor: pointer;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  position: relative;
}

.publication-info-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.publication-info-btn:hover {
  border-color: var(--color-text-active, #ffffff);
  color: var(--color-text-active, #ffffff);
  transform: scale(1.15);
}

/* Publication info popup — positioned below the header */
.publication-info-popup {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.07) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px 24px;
  width: 280px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.publication-info-popup.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.publication-info-popup p {
  font-family: Futura, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text, #c8c8c8);
  margin: 0;
  line-height: 1.5;
}

.publication-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease;
  padding: 0;
  opacity: 0;
}

.publication-content.expanded {
  padding: 24px 0 0 0;
  opacity: 1;
}

.article-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin: 8px 0;
  font-size: 16px;
  color: var(--color-text, #c8c8c8);
  text-decoration: none;
  transition: color 0.3s ease,
              background 0.3s ease,
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  line-height: 1.5;
  gap: 20px;
}

.article-title {
  flex: 1;
}

.article-date {
  font-size: 14px;
  color: var(--color-text-muted, #999999);
  white-space: nowrap;
  flex-shrink: 0;
}

.article-link:visited {
  color: var(--color-text, #c8c8c8);
}

.article-link:hover {
  color: var(--color-text-active, #ffffff);
  background: var(--glass-bg, rgba(255, 255, 255, 0.08));
  transform: translateX(4px);
}

.article-link:hover .article-date {
  color: var(--color-text, #c8c8c8);
}

.article-link:active {
  color: var(--color-text-active, #ffffff);
}

/* ===================================
   LIGHT MODE OVERRIDES
   =================================== */

body.light-mode .genre-view-title {
  color: var(--color-text-muted, #757575);
}

body.light-mode .genre-view-disclaimer {
  color: var(--color-text-muted, #888888);
}

body.light-mode .genre-folder {
  background: var(--glass-bg, rgba(0, 0, 0, 0.05));
  border-color: var(--glass-border, rgba(0, 0, 0, 0.1));
}

body.light-mode .genre-folder:hover {
  background: var(--glass-bg-hover, rgba(0, 0, 0, 0.08));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

body.light-mode .folder-label {
  color: var(--color-text, #2a2a2a);
}

body.light-mode .genre-folder:hover .folder-label {
  color: var(--color-text-active, #000000);
}

body.light-mode .search-bar {
  background: var(--glass-bg, rgba(0, 0, 0, 0.05));
  border-color: var(--glass-border, rgba(0, 0, 0, 0.1));
  color: var(--color-text, #2a2a2a);
}

body.light-mode .search-bar::placeholder {
  color: var(--color-text-muted, #757575);
}

body.light-mode .subgenre-pill {
  background: var(--glass-bg, rgba(0, 0, 0, 0.05));
  border-color: var(--glass-border, rgba(0, 0, 0, 0.1));
  color: var(--color-text, #2a2a2a);
}

body.light-mode .subgenre-pill.active {
  background: var(--color-text-active, #000000);
  color: #ffffff;
}

body.light-mode .click-wheel {
  background: linear-gradient(145deg, rgba(220, 220, 220, 0.95) 0%, rgba(200, 200, 200, 0.98) 100%);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .wheel-center {
  background: linear-gradient(145deg, rgba(240, 240, 240, 0.9) 0%, rgba(220, 220, 220, 0.95) 100%);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--color-text, #2a2a2a);
}

body.light-mode .wheel-nav {
  color: rgba(0, 0, 0, 0.5);
}

body.light-mode .wheel-nav:hover {
  color: rgba(0, 0, 0, 0.8);
}

body.light-mode .wheel-indicator {
  color: rgba(0, 0, 0, 0.4);
}

body.light-mode .wheel-indicator .current-index {
  color: rgba(0, 0, 0, 0.8);
}

body.light-mode .publication-header {
  border-bottom-color: var(--glass-border, rgba(0, 0, 0, 0.1));
}

body.light-mode .publication-header:hover {
  border-bottom-color: var(--color-text-active, #000000);
  transform: translateX(4px);
}

body.light-mode .publication-header .heading {
  color: var(--color-text-muted, #757575);
}

body.light-mode .publication-header:hover .heading {
  color: var(--color-text-active, #000000);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

body.light-mode .publication-info-popup {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.35) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -1px 1px rgba(0, 0, 0, 0.03);
}

body.light-mode .publication-info-popup p {
  color: var(--color-text, #2a2a2a);
}

body.light-mode .article-link {
  color: var(--color-text, #2a2a2a);
}

body.light-mode .article-link:visited {
  color: var(--color-text, #2a2a2a);
}

body.light-mode .article-link:hover {
  color: var(--color-text-active, #000000);
  background: var(--glass-bg, rgba(0, 0, 0, 0.05));
}

body.light-mode .article-link:active {
  color: var(--color-text-active, #000000);
}

/* ===================================
   RESPONSIVE
   =================================== */

/* Tablet Landscape (1024px) */
@media (max-width: 1024px) {
  .genre-grid {
    gap: var(--space-12, 24px);
  }

  .sheets-link {
    padding: var(--space-8, 16px) var(--space-12, 24px) 45px;
    min-width: 80px;
  }

  .writing-section {
    max-width: 600px;
  }

  .diary-container,
  .moments-container {
    max-width: 600px;
  }

  .playlist-display {
    max-width: 450px;
  }
}

/* Tablet Portrait (768px) */
@media (max-width: 768px) {
  /* Playlists landing - fit viewport, no scrolling */
  #playlists-landing {
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
  }

  #playlists-landing .playlists-nav-container {
    min-height: 100vh;
    margin-top: 0;
  }

  /* Sheets - prevent elastic dragging on mobile */
  #sheets-content {
    overflow: hidden;
  }

  /* Click wheel - part of layout flow on mobile so it fits viewport */
  .click-wheel {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin: 0 auto calc(10px + env(safe-area-inset-bottom, 0px));
    width: 200px;
    height: 200px;
    flex-shrink: 0;
  }

  .wheel-center {
    width: 65px;
    height: 65px;
  }

  /* Reduce header padding to reclaim vertical space */
  .wheel-header {
    padding: 50px 20px 5px;
  }

  /* Playlists nav - vertical on mobile */
  .playlists-nav-row {
    flex-direction: column;
    gap: 20px;
  }

  .playlist-nav-btn.more-btn {
    margin-top: 0;
  }

  /* Sheets - Vertical Timeline on mobile */
  .sheets-container {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    padding: 80px 20px;
    box-sizing: border-box;
  }

  .sheets-header {
    margin-bottom: 30px;
    width: 100%;
  }

  .sheets-info-btn {
    left: calc(50% + 55px);
  }

  .sheets-info-popup {
    left: auto;
    right: -20px;
    top: 100%;
    transform: translateY(10px);
    width: 250px;
  }

  .sheets-section {
    flex-direction: column;
    align-items: center;
    padding: 20px 0 40px;
    gap: 0;
    position: relative;
    width: 100%;
    margin: 0 auto;
  }

  .sheets-section::before {
    /* Hide section-level line on mobile; line segments are on each link instead */
    content: none;
  }

  .sheets-link {
    flex-direction: row;
    padding: 12px 20px 12px 50px;
    min-width: auto;
    width: 185px;
    justify-content: flex-start;
    position: relative;
    box-sizing: border-box;
  }

  /* Vertical line segment on each link - guaranteed aligned with dot */
  .sheets-link::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-text-muted, #999999);
    opacity: 0.4;
    transform: translateX(-50%);
    pointer-events: none;
  }

  /* Clip line at first and last items so it spans dot-to-dot */
  .sheets-link:first-child::before {
    top: 50%;
  }

  .sheets-link:last-child::before {
    bottom: 50%;
  }

  .sheets-link::after {
    bottom: auto;
    top: 50%;
    left: 25px;
    transform: translate(-50%, -50%);
  }

  .sheets-link:hover::after,
  .sheets-link:focus::after {
    transform: translate(-50%, -50%) scale(1.5);
  }

  .sheets-link:hover,
  .sheets-link:focus {
    transform: none;
    color: var(--color-text-active, #ffffff);
  }

  .genre-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8, 16px);
    margin-top: 40px;
  }

  .folder-label {
    font-size: var(--font-size-caption, 12px);
  }

  /* Mobile diary artwork - inline thumbnail instead of hover preview */
  .diary-artwork-preview {
    position: static;
    width: 40px;
    height: 40px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    flex-shrink: 0;
    order: -1;
    margin-right: 12px;
    border-radius: 6px;
    box-shadow: none;
  }

  .diary-playlist-item:hover .diary-artwork-preview {
    opacity: 1;
  }

  /* Diary mobile - constrain password field and container */
  .diary-container {
    width: 100%;
    padding: 20px 0 100px;
    box-sizing: border-box;
  }

  .diary-password-container {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .diary-password-input {
    max-width: 280px;
    width: 100%;
    box-sizing: border-box;
  }

  .diary-year-toggle {
    padding-right: 0;
  }

  .publication-header .heading {
    font-size: var(--font-size-title1, 22px);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Writing section mobile - ensure chevron is visible */
  .publication-header {
    padding: 15px 10px;
    gap: 10px;
  }

  .dropdown-icon {
    font-size: 16px;
    min-width: 20px;
    flex-shrink: 0;
  }

  .article-link {
    font-size: 15px;
    padding: 10px 12px;
  }

  /* Writing section container - proper mobile spacing */
  .writing-section {
    padding: 80px 0 100px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .publication-header {
    width: 100%;
    box-sizing: border-box;
  }

  .publication-header-right {
    flex-shrink: 0;
  }
}

/* Touch devices - prevent sticky hover states */
@media (hover: none) {
  .diary-year-toggle:hover {
    color: var(--color-text-muted, #999999);
    transform: none;
    text-shadow: none;
  }

  .diary-year-toggle:hover .diary-year-icon {
    color: inherit;
  }

  .diary-playlist-item:hover {
    background: transparent;
    transform: none;
  }

  .diary-playlist-item:hover .diary-playlist-name {
    color: var(--color-text, #c8c8c8);
  }
}

/* Diary playlist highlight state (applied via JS) */
.diary-playlist-item.highlighted {
  background: var(--glass-bg, rgba(255, 255, 255, 0.08));
  transform: translateX(4px);
}

.diary-playlist-item.highlighted .diary-playlist-name {
  color: var(--color-text-active, #ffffff);
}

/* Smooth fade-out when highlight timer expires */
.diary-playlist-item.highlight-fading {
  background: transparent !important;
  transform: translateX(0) !important;
  transition: background 1s ease, transform 1s ease !important;
}

.diary-playlist-item.highlight-fading .diary-playlist-name {
  color: var(--color-text, #c8c8c8) !important;
  transition: color 1s ease !important;
}

@media (max-width: 480px) {
  .sheets-link {
    font-size: var(--font-size-subheadline, 14px);
    padding: var(--space-6, 14px) var(--space-8, 16px) var(--space-6, 14px) 50px;
  }

  .sheets-link::after {
    left: 25px;
    width: 8px;
    height: 8px;
  }

  .genre-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6, 12px);
    padding: 0 10px;
  }

  .folder-label {
    font-size: var(--font-size-caption, 11px); /* Minimum 11px for legibility */
  }

  .publication-header .heading {
    font-size: var(--font-size-body, 18px);
  }

  /* Ensure dropdown icon stays visible on very small screens */
  .dropdown-icon {
    font-size: var(--font-size-subheadline, 14px);
    min-width: 18px;
  }

  .publication-header {
    padding: var(--space-6, 12px) var(--space-4, 8px);
  }

  .publication-header-right {
    gap: 8px;
  }

  .publication-info-popup {
    width: 220px;
  }

  .article-link {
    font-size: var(--font-size-subheadline, 14px);
  }

  /* Writing section container - tighter padding on small phones */
  .writing-section {
    padding: 80px 0 100px;
    width: 100%;
  }

  .diary-password-input {
    max-width: 240px;
  }
}
