:root {
  --bg: #0c0f14;
  --bg-soft: #11151c;
  --surface: #161c25;
  --surface-2: #1d2531;
  --border: #293243;
  --border-strong: #37445a;
  --text: #e8ecf4;
  --muted: #98a2b3;
  --accent: #93a9ff;
  --accent-strong: #b2c1ff;
  --accent-ink: #0c0f14;
  --danger: #ff8a99;
  --danger-bg: rgba(255, 122, 138, 0.12);
  --success: #7fd8a8;
  --success-bg: rgba(127, 216, 168, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", "PT Serif", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 12% -10%, rgba(147, 169, 255, 0.09), transparent 60%),
    radial-gradient(700px 420px at 95% 0%, rgba(147, 169, 255, 0.05), transparent 60%);
  background-repeat: no-repeat;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.015em;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(12, 15, 20, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--accent-ink);
  background: linear-gradient(140deg, var(--accent-strong), var(--accent));
  font-size: 1.05rem;
  line-height: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link.is-active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Page */

.page {
  padding-top: 52px;
  padding-bottom: 80px;
}

.page-head {
  max-width: 680px;
  margin-bottom: 36px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-head h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.02rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--accent-ink);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  border-color: rgba(255, 138, 153, 0.35);
  color: var(--danger);
  background: transparent;
}

.btn-danger:hover {
  background: var(--danger-bg);
  border-color: rgba(255, 138, 153, 0.55);
  color: var(--danger);
}

.btn-small {
  padding: 7px 12px;
  font-size: 0.84rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  font-size: 0.9em;
  line-height: 1;
}

/* Tracks */

.track-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.track-card {
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.track-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-soft);
  transform: translateY(-2px);
}

.track-cover {
  flex: 0 0 148px;
  width: 148px;
  height: 148px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 4px 2px;
}

.track-title {
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.track-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.88rem;
}

.dot {
  opacity: 0.55;
}

.track-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.like-btn:hover {
  border-color: rgba(255, 138, 153, 0.5);
  color: var(--danger);
  background: var(--danger-bg);
  transform: translateY(-1px);
}

.like-btn.is-liked {
  border-color: rgba(255, 138, 153, 0.55);
  color: var(--danger);
  background: var(--danger-bg);
}

.like-btn.is-liked .heart {
  color: var(--danger);
}

.like-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.heart {
  font-size: 1.02rem;
  line-height: 1;
  transition: transform 0.16s ease;
}

.like-btn.is-liked .heart {
  transform: scale(1.08);
}

/* Empty / errors */

.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 68px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.empty-state h2,
.error-state h1 {
  font-size: 1.35rem;
}

.empty-state p,
.error-state p {
  max-width: 460px;
  color: var(--muted);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 1.5rem;
}

.empty-state .btn {
  margin-top: 12px;
}

.error-code {
  color: var(--accent);
  font-size: 3.2rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Poems */

.poem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.poem-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.poem-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-soft);
  transform: translateY(-2px);
}

.poem-card-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.poem-card-title {
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

.poem-card-date {
  color: var(--muted);
  font-size: 0.84rem;
}

.poem-excerpt {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.poem-read {
  align-self: flex-start;
  margin-top: auto;
}

.poem-detail {
  max-width: 760px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.back-link:hover {
  color: var(--accent);
}

.poem-detail-head {
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.poem-detail-head h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  overflow-wrap: anywhere;
}

.poem-detail-head time {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.poem-text {
  color: #dde3ee;
  font-family: var(--font-serif);
  font-size: 1.16rem;
  line-height: 1.95;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}


/* Poem likes and comments */

.poem-like-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.poem-like-hint {
  color: var(--muted);
  font-size: 0.84rem;
}

.comments-section {
  max-width: 760px;
  margin: 52px auto 0;
}

.comments-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comments-title {
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
}

.comments-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 9px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.comments-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.comment-form .field textarea {
  min-height: 120px;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.comment-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.form-status {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.form-status.is-success {
  border-color: rgba(127, 216, 168, 0.35);
  background: var(--success-bg);
  color: #c6f4dc;
}

.form-status.is-error {
  border-color: rgba(255, 138, 153, 0.4);
  background: var(--danger-bg);
  color: #ffd6dc;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.comment-item {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.comment-author {
  font-size: 0.94rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.comment-date {
  color: var(--muted);
  font-size: 0.8rem;
}

.comment-text {
  margin-top: 8px;
  color: #dde3ee;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comments-empty {
  margin-top: 24px;
  padding: 24px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(12, 15, 20, 0.6);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 22px;
  padding-bottom: 22px;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-link {
  color: var(--muted);
}

.footer-link:hover {
  color: var(--accent);
}

/* Player */

body.player-open {
  padding-bottom: 118px;
}

.player {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 50;
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 16px;
  background: rgba(22, 28, 37, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.player-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.player-meta {
  display: flex;
  flex: 0 1 220px;
  flex-direction: column;
  min-width: 0;
}

.player-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.player-title {
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.player-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.player-toggle:hover {
  background: var(--accent-strong);
  transform: scale(1.04);
}

.player-progress {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.player-progress input[type="range"] {
  width: 100%;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.player-times {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.player-close {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.player-close:hover {
  color: var(--text);
  background: var(--surface-2);
}

.toast {
  position: fixed;
  bottom: 104px;
  left: 50%;
  z-index: 60;
  max-width: min(92vw, 440px);
  padding: 11px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.9rem;
  text-align: center;
  transform: translateX(-50%);
}

.toast.is-error {
  border-color: rgba(255, 138, 153, 0.5);
  color: #ffd3d9;
}

/* Admin */

.admin-body {
  background-image:
    radial-gradient(800px 400px at 6% -10%, rgba(147, 169, 255, 0.06), transparent 60%);
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(17, 21, 28, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.admin-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  min-height: 68px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-badge {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.logout-form {
  margin-left: auto;
}

.admin-page {
  padding-top: 36px;
  padding-bottom: 70px;
}

.admin-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.admin-page-head h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.admin-page-head .back-link {
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.flash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.flash {
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 0.92rem;
}

.flash-success {
  border: 1px solid rgba(127, 216, 168, 0.35);
  background: var(--success-bg);
  color: #c6f4dc;
}

.flash-error {
  border: 1px solid rgba(255, 138, 153, 0.4);
  background: var(--danger-bg);
  color: #ffd6dc;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.admin-row-cover {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}

.admin-row-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-row-title h2 {
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.admin-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-row-meta a {
  color: var(--accent);
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-row-actions form {
  margin: 0;
}


.admin-section {
  margin-bottom: 36px;
}

.admin-section:last-child {
  margin-bottom: 0;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-section-head h2 {
  font-size: 1.12rem;
}

.admin-comment-row {
  align-items: flex-start;
}

.admin-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-comment-meta strong {
  color: var(--text);
  font-size: 0.9rem;
}

.admin-comment-meta a {
  color: var(--accent);
}

.admin-comment-text {
  color: #dde3ee;
  font-size: 0.94rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-empty {
  padding: 22px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
}

.status-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-badge.is-published {
  background: var(--success-bg);
  color: var(--success);
}

.status-badge.is-draft {
  background: var(--surface-2);
  color: var(--muted);
}

/* Forms */

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-form {
  max-width: 740px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > span {
  font-size: 0.9rem;
  font-weight: 650;
}

.field em {
  color: var(--accent);
  font-style: normal;
}

.field input[type="text"],
.field input[type="password"],
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  min-height: 220px;
  line-height: 1.7;
  resize: vertical;
}

.field input[type="text"]:focus,
.field input[type="password"]:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(147, 169, 255, 0.16);
}

.field input[type="file"] {
  width: 100%;
  padding: 9px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.88rem;
}

.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.field-hint,
.field-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.field-note code {
  color: var(--text);
  overflow-wrap: anywhere;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 0.93rem;
  cursor: pointer;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.cover-preview {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

/* Auth */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.auth-brand {
  margin-bottom: 6px;
}

.auth-card h1 {
  font-size: 1.45rem;
}

.auth-subtitle {
  margin-top: -10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-back {
  align-self: center;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-back:hover {
  color: var(--accent);
}

/* Responsive */

@media (max-width: 760px) {
  .page {
    padding-top: 38px;
    padding-bottom: 64px;
  }

  .track-card {
    gap: 16px;
    padding: 16px;
  }

  .track-cover {
    flex-basis: 112px;
    width: 112px;
    height: 112px;
  }

  .admin-row {
    flex-wrap: wrap;
  }

  .admin-row-main {
    flex-basis: calc(100% - 88px);
  }

  .admin-row-actions {
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .admin-form {
    padding: 20px;
  }
}

@media (max-width: 620px) {
  .header-inner {
    min-height: 62px;
    gap: 12px;
  }

  .brand {
    font-size: 1rem;
  }

  .nav-link {
    padding: 7px 12px;
    font-size: 0.9rem;
  }

  .track-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .track-cover {
    flex-basis: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .track-cover img {
    object-fit: cover;
  }

  .track-body {
    width: 100%;
  }

  .track-actions {
    padding-top: 14px;
  }

  .track-actions .btn,
  .track-actions .like-btn {
    flex: 1 1 auto;
  }

  .player {
    right: 8px;
    bottom: 8px;
    left: 8px;
    padding: 10px 12px;
  }

  .player-inner {
    flex-wrap: wrap;
    gap: 8px 10px;
  }

  .player-meta {
    flex: 1 1 calc(100% - 110px);
    order: 1;
  }

  .player-toggle {
    order: 2;
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .player-close {
    order: 3;
  }

  .player-progress {
    flex-basis: 100%;
    order: 4;
  }

  body.player-open {
    padding-bottom: 132px;
  }

  .toast {
    bottom: 124px;
  }

  .admin-badge {
    display: none;
  }

  .admin-nav {
    order: 3;
    flex-basis: 100%;
    flex-wrap: wrap;
  }

  .logout-form {
    order: 4;
    margin-left: 0;
  }

  .admin-page {
    padding-top: 26px;
  }

  .poem-grid {
    grid-template-columns: 1fr;
  }

  .poem-text {
    font-size: 1.06rem;
    line-height: 1.85;
  }

  .comments-section {
    margin-top: 38px;
  }

  .comment-form {
    padding: 16px;
  }

  .admin-row-actions .btn {
    flex: 1 1 auto;
  }

  .admin-comment-row {
    padding: 14px;
  }

  .auth-card {
    padding: 24px;
  }
}

@media (max-width: 400px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .track-actions .btn,
  .track-actions .like-btn {
    flex-basis: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-form-actions .btn,
  .comment-form-actions .form-status {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
