@font-face {
  font-family: "Great Vibes Web";
  src: url("../fonts/GreatVibes-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Long Cang Web";
  src: url("../fonts/LongCang-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Ma Shan Zheng Web";
  src: url("../fonts/MaShanZheng-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond Web";
  src: url("../fonts/EBGaramond.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond Web";
  src: url("../fonts/CormorantGaramond.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC Web";
  src: url("../fonts/NotoSerifSC.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Zhi Mang Xing Web";
  src: url("../fonts/ZhiMangXing-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #f8f4e9;
  --paper-secondary: #f1ecd9;
  --ink: #1b1c1f;
  --ink-soft: #717277;
  --accent: #0068d6;
  --border: #d0cbbe;
  --panel: rgba(254, 250, 241, 0.76);
  --shadow: rgba(0, 0, 0, 0.08);
  --page-bg: #f8f4e9;

  --mood-top: #090a14;
  --mood-mid: #22315a;
  --mood-glow: #8a95f7;

  --radius-card: 26px;
  --radius-pill: 999px;
  --ease-spring: cubic-bezier(0.18, 0.78, 0.2, 1);

  --font-ui: "Avenir Next", "PingFang SC", "Noto Sans SC", "SF Pro Text", sans-serif;
  --font-title-zh: "Long Cang Web", "STKaiti", "KaiTi", serif;
  --font-title-en: "Great Vibes Web", "Snell Roundhand", cursive;
  --font-body-zh: "Noto Serif SC Web", "Songti SC", "STSong", serif;
  --font-body-en: "EB Garamond Web", Garamond, serif;
}

body.theme-dark {
  --paper: #06091a;
  --paper-secondary: #0b0f1f;
  --ink: #e8e9ef;
  --ink-soft: #a0a6b6;
  --accent: #4d95ff;
  --border: #26304a;
  --panel: rgba(16, 22, 38, 0.84);
  --shadow: rgba(0, 0, 0, 0.36);
  --page-bg: #06091a;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--page-bg);
  overflow: hidden;
}

.tiny-btn.active {
  background: linear-gradient(130deg, var(--accent), color-mix(in srgb, var(--accent) 84%, #fff 16%));
  color: #fff;
  border-color: transparent;
}

.app-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 76px 1fr;
  width: 100vw;
  height: 100vh;
}

.sidebar {
  border-right: 1px solid rgba(208, 203, 190, 0.62);
  background: linear-gradient(180deg, rgba(248, 244, 233, 0.9), rgba(241, 236, 217, 0.74));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
}

body.theme-dark .sidebar {
  border-right-color: rgba(42, 53, 80, 0.72);
  background: linear-gradient(180deg, rgba(12, 21, 36, 0.96), rgba(10, 18, 31, 0.92));
}

.brand-btn {
  width: 58px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-title-zh);
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.section-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0.9px solid rgba(208, 203, 190, 0.64);
  background: linear-gradient(140deg, rgba(254, 250, 241, 0.92), rgba(241, 236, 217, 0.74));
  color: var(--ink-soft);
  font-size: 18px;
  transition: transform 220ms ease, background 220ms ease, color 220ms ease;
}

body.theme-dark .section-btn {
  border-color: rgba(42, 53, 80, 0.86);
  background: linear-gradient(140deg, rgba(20, 32, 53, 0.96), rgba(13, 23, 39, 0.9));
}

.section-btn.active {
  background: var(--accent);
  border-color: rgba(0, 104, 214, 0.55);
  color: #fff;
}

.section-btn:hover {
  transform: translateY(-1px) scale(1.02);
}

.avatar-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(208, 203, 190, 0.7);
  background: linear-gradient(130deg, #ffd9a7, rgba(0, 104, 214, 0.9));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: none;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.avatar-has-image .avatar-image {
  display: block;
}

.avatar-has-image .avatar-fallback {
  display: none;
}

.workspace {
  position: relative;
  overflow: hidden;
}

.section {
  display: none;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.section.active {
  display: block;
  animation: fadeIn 320ms ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 32px;
}

.section-header h1 {
  margin: 0;
  font-family: "Noto Serif SC Web", "Songti SC", serif;
  font-size: clamp(30px, 2.8vw, 36px);
  color: var(--ink);
}

.section-header p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.section-header.split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.studio-layout {
  max-width: 900px;
  padding-inline: clamp(24px, 5vw, 72px);
  padding-top: clamp(32px, 8vh, 74px);
  padding-bottom: clamp(82px, 9vh, 94px);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.studio-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
}

.poem-title-input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--font-title-zh);
  font-size: clamp(38px, 4vw, 44px);
  color: var(--ink);
  letter-spacing: 0.01em;
}

.poem-title-input::placeholder,
.poem-editor::placeholder,
input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--ink-soft) 66%, #fff 34%);
}

.round-save-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid rgba(20, 26, 42, 0.1);
  background: linear-gradient(145deg, var(--panel), rgba(241, 236, 217, 0.82));
  color: var(--accent);
  font-size: 33px;
  font-weight: 300;
  cursor: pointer;
  transition: transform 220ms var(--ease-spring);
}

.round-save-btn:hover {
  transform: scale(1.03);
}

.round-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.editorial-panel,
.poem-surface {
  border-radius: var(--radius-card);
  background: linear-gradient(140deg, rgba(254, 250, 241, 0.78), rgba(241, 236, 217, 0.92));
  box-shadow: 0 12px 24px var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

body.theme-dark .editorial-panel,
body.theme-dark .poem-surface {
  background: linear-gradient(140deg, rgba(18, 29, 49, 0.9), rgba(13, 23, 39, 0.92));
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.studio-controls {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
  position: sticky;
  bottom: 14px;
  z-index: 8;
}

.control-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.control-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.control-select {
  appearance: none;
  border-radius: 14px;
  border: 1px solid rgba(208, 203, 190, 0.82);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
  font-size: 14px;
  font-family: var(--font-ui);
}

.align-buttons {
  display: flex;
  gap: 8px;
}

.brand-btn[data-i18n="brand.label"] {
  font-family: var(--font-title-zh);
}

html[lang="en"] .brand-btn[data-i18n="brand.label"] {
  font-family: "Great Vibes Web", cursive;
  font-size: 29px;
  letter-spacing: 0.02em;
}

.poem-editor {
  width: 100%;
  min-height: clamp(300px, 50vh, 620px);
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(13, 14, 18, 0.82);
  font-size: clamp(21px, 2vw, 23px);
  line-height: 1.76;
  letter-spacing: 0.01em;
  font-family: var(--font-body-zh);
}

body.theme-dark .poem-editor {
  color: rgba(242, 246, 255, 0.96);
  caret-color: rgba(242, 246, 255, 0.96);
}

body.theme-dark .poem-editor::placeholder {
  color: color-mix(in srgb, var(--ink-soft) 78%, #fff 22%);
}

.pill-btn,
.tiny-btn {
  border: 0;
  border-radius: 18px;
  background: linear-gradient(140deg, var(--panel), rgba(241, 236, 217, 0.82));
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  border: 1px solid rgba(208, 203, 190, 0.56);
  transition: transform 180ms ease, filter 180ms ease;
}

.pill-btn.primary {
  background: linear-gradient(130deg, var(--accent), color-mix(in srgb, var(--accent) 86%, #fff 14%));
  color: #fff;
  border-color: transparent;
}

.pill-btn:hover,
.tiny-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.filter-zone {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  border: 1px solid rgba(208, 203, 190, 0.62);
  border-radius: var(--radius-pill);
  background: var(--panel);
  color: var(--ink-soft);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.filter-pill.active {
  color: var(--ink);
  background: var(--paper-secondary);
}

.archive-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.archive-card {
  position: relative;
  min-height: 290px;
  max-height: 360px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  overflow: hidden;
}

.archive-card.selected {
  box-shadow: 0 0 0 1.5px var(--accent), 0 12px 22px var(--shadow);
}

.archive-top {
  display: flex;
  gap: 10px;
}

.archive-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.15;
  font-family: var(--poem-title-font, var(--font-title-zh));
  color: var(--ink);
}

.archive-author {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.archive-body {
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.7;
  font-family: var(--poem-body-font, var(--font-body-zh));
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.hero-wrap {
  margin-top: 16px;
}

.sub-head {
  margin: 0 0 12px;
  font-size: 24px;
  font-family: "Noto Serif SC Web", serif;
  color: var(--ink);
}

.plaza-hero {
  min-height: 460px;
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1300px;
  overflow: visible;
}

.hero-card {
  width: min(62vw, 500px);
  min-height: 430px;
  border-radius: 34px;
  padding: 28px;
  background: linear-gradient(145deg, rgba(254, 250, 241, 0.84), rgba(241, 236, 217, 0.92));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.13), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: center top;
  transition: transform 420ms var(--ease-spring), opacity 300ms ease, filter 320ms ease;
  will-change: transform, opacity;
}

body.theme-dark .hero-card {
  background: linear-gradient(145deg, rgba(16, 25, 43, 0.95), rgba(10, 17, 31, 0.96));
  box-shadow: 0 18px 34px rgba(1, 4, 10, 0.56), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hero-card.layer-0 {
  z-index: 20;
  opacity: 1;
  filter: none;
  transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
}

.hero-card.layer-1 {
  z-index: 12;
  opacity: 0.92;
  filter: saturate(0.95);
  transform: translateX(calc(-50% - 24px)) translateY(24px) scale(0.945) rotate(-3deg);
}

.hero-card.layer-2 {
  z-index: 8;
  opacity: 0.84;
  filter: saturate(0.86);
  transform: translateX(calc(-50% + 24px)) translateY(46px) scale(0.895) rotate(3deg);
}

.hero-card.layer-hidden {
  z-index: 1;
  opacity: 0;
  transform: translateX(-50%) translateY(74px) scale(0.84);
  pointer-events: none;
}

.hero-card.front-draggable {
  cursor: grab;
}

.hero-card.front-draggable:active {
  cursor: grabbing;
}

.hero-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hero-author {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.hero-handle,
.hero-metrics {
  color: var(--ink-soft);
  font-size: 13px;
}

body.theme-dark .hero-title,
body.theme-dark .hero-author {
  color: rgba(242, 246, 255, 0.98);
}

body.theme-dark .hero-body,
body.theme-dark .hero-handle,
body.theme-dark .hero-metrics {
  color: rgba(196, 205, 222, 0.95);
}

.hero-title {
  margin: 8px 0 0;
  font-size: clamp(28px, 3.1vw, 40px);
  line-height: 1.18;
  color: var(--ink);
  font-family: var(--poem-title-font, var(--font-title-zh));
}

.hero-body {
  margin: 0;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.68;
  color: var(--ink-soft);
  font-family: var(--poem-body-font, var(--font-body-zh));
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-nav {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.plaza-columns {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
}

.authors-col {
  padding: 18px;
}

.authors-col h3,
.feed-col h3 {
  margin: 0 0 12px;
  font-family: "Noto Serif SC Web", serif;
  font-size: 24px;
  color: var(--ink);
}

.author-chip {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border-radius: 18px;
  background: linear-gradient(140deg, var(--panel), rgba(241, 236, 217, 0.74));
  padding: 14px 10px 13px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.author-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.08);
  filter: brightness(1.01);
}

.plaza-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(245, 241, 228, 0.95), rgba(234, 226, 202, 0.78));
  border: 1px solid rgba(208, 203, 190, 0.52);
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.plaza-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.author-chip-avatar {
  width: 62px;
  height: 62px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
}

.author-name {
  font-size: 20px;
  line-height: 1.1;
  color: var(--ink);
}

.author-handle {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.author-count {
  color: var(--ink-soft);
  font-size: 10px;
}

.feed-card {
  padding: 18px 18px 17px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.feed-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.08);
  filter: brightness(1.01);
}

.feed-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-avatar {
  width: 48px;
  height: 48px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

body.theme-dark .feed-card {
  border-color: rgba(42, 53, 80, 0.76);
  background: linear-gradient(145deg, rgba(14, 23, 39, 0.92), rgba(10, 18, 32, 0.94));
}

.feed-author {
  margin: 0;
  font-size: 25px;
  color: var(--ink);
}

.feed-handle {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.feed-title {
  margin: 8px 0 0;
  font-size: 22px;
  font-family: var(--poem-title-font, var(--font-title-zh));
  color: var(--ink);
}

.feed-excerpt {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  font-family: var(--poem-body-font, var(--font-body-zh));
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.author-poem-entry {
  border-radius: 18px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.author-poem-entry:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.08);
}

.author-modal-avatar {
  width: 88px;
  height: 88px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.1);
}

.author-modal-profile {
  padding: 22px;
}

.author-modal-top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.author-modal-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.author-modal-name {
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1;
  color: var(--ink);
}

.author-modal-handle,
.author-modal-stat {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.author-modal-stat {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

.author-modal-bio {
  margin: 16px 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 15px;
}

.author-poem-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.author-poem-entry-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.author-poem-entry-title {
  font-size: 23px;
  color: var(--ink);
  line-height: 1.15;
}

.author-poem-entry-date {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.author-poem-entry-body {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-wrap {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr);
  gap: 16px;
}

.hero-profile {
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: center;
}

.hero-avatar {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(130deg, #ffd9a7, rgba(0, 104, 214, 0.84));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 700;
}

.hero-profile h2 {
  margin: 0;
  font-size: clamp(28px, 3.1vw, 32px);
  color: var(--ink);
  font-family: "Noto Serif SC Web", serif;
}

.hero-profile p {
  margin: 6px 0 0;
}

#profile-handle-display,
#profile-bio-display {
  color: var(--ink-soft);
}

.profile-editor {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.profile-editor label {
  display: grid;
  gap: 8px;
}

.profile-editor span {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 700;
}

.profile-avatar-controls {
  display: grid;
  gap: 8px;
}

.profile-avatar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-avatar-actions .pill-btn,
.profile-avatar-actions label.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.profile-avatar-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.profile-editor input,
.profile-editor textarea {
  border: 1px solid rgba(208, 203, 190, 0.82);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  outline: 0;
  font-family: var(--font-ui);
}

.profile-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-display-controls {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(208, 203, 190, 0.72);
  background: rgba(255, 255, 255, 0.42);
}

.display-control-row {
  display: grid;
  gap: 6px;
}

.display-control-label {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.display-control-buttons {
  display: flex;
  gap: 8px;
}

.display-control-buttons .tiny-btn {
  flex: 1;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.status-toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(9, 12, 18, 0.88);
  color: #fff;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 120;
}

.status-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.poem-modal {
  width: min(760px, calc(100vw - 24px));
  border: 0;
  background: transparent;
  padding: 0;
}

.poem-modal::backdrop {
  background: rgba(3, 6, 12, 0.5);
}

.modal-card {
  border-radius: 26px;
  background: linear-gradient(140deg, rgba(254, 250, 241, 0.96), rgba(241, 236, 217, 0.94));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

body.theme-dark .modal-card {
  background: linear-gradient(145deg, rgba(14, 22, 38, 0.98), rgba(9, 16, 30, 0.98));
  box-shadow: 0 24px 46px rgba(2, 5, 12, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(208, 203, 190, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.theme-dark .modal-header {
  border-bottom-color: rgba(42, 53, 80, 0.78);
}

.modal-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-family: "Noto Serif SC Web", serif;
}

.modal-content {
  padding: 18px;
  max-height: min(70vh, 760px);
  overflow: auto;
}

body.theme-dark .modal-content {
  background: transparent;
}

.modal-poem-body {
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 20px;
  color: var(--ink-soft);
  margin-top: 12px;
}

body.theme-dark .modal-poem-body {
  color: rgba(224, 230, 243, 0.96);
}

.modal-comment-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.modal-comment {
  border-radius: 16px;
  border: 1px solid rgba(208, 203, 190, 0.62);
  background: rgba(255, 255, 255, 0.5);
  padding: 12px;
}

.modal-comment-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.modal-comment-body {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.58;
}

body.theme-dark .modal-comment-author {
  color: rgba(235, 240, 251, 0.98);
}

body.theme-dark .modal-comment-body {
  color: rgba(196, 206, 223, 0.96);
}

.modal-comment-form {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.modal-comment-form textarea {
  border: 1px solid rgba(208, 203, 190, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 12px;
  min-height: 74px;
  resize: vertical;
  outline: none;
  font-family: var(--font-ui);
}

body.theme-dark .modal-comment-form textarea::placeholder {
  color: rgba(164, 176, 197, 0.9);
}

body.theme-dark .modal-comment,
body.theme-dark .modal-comment-form textarea,
body.theme-dark .control-select,
body.theme-dark .profile-editor input,
body.theme-dark .profile-editor textarea,
body.theme-dark .profile-display-controls,
body.theme-dark .search-box input,
body.theme-dark .search-box,
body.theme-dark .filter-pill,
body.theme-dark .author-chip {
  background: rgba(12, 21, 36, 0.7);
  color: var(--ink);
}

body.theme-dark .author-modal-stat {
  background: rgba(11, 19, 33, 0.72);
}

body.theme-dark .hero-nav .tiny-btn {
  border-color: rgba(42, 53, 80, 0.78);
  background: rgba(12, 21, 36, 0.8);
  color: rgba(232, 236, 245, 0.94);
}

body.theme-dark .mobile-nav {
  background: rgba(10, 18, 31, 0.96);
  border-top-color: rgba(42, 53, 80, 0.78);
}

.mobile-nav {
  display: none;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    min-height: calc(100dvh - 68px);
    height: auto;
  }

  .sidebar {
    display: none;
  }

  .section {
    min-height: calc(100dvh - 68px);
  }

  .studio-layout {
    max-width: 100%;
    padding: 26px 18px 110px;
    gap: 18px;
  }

  .studio-controls {
    grid-template-columns: 1fr 1fr;
    position: static;
  }

  .poem-title-input {
    font-size: 40px;
  }

  .round-save-btn {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  .section-inner {
    padding: 18px 14px 96px;
  }

  .section-header.split {
    align-items: flex-start;
    flex-direction: column;
  }

  .plaza-columns {
    grid-template-columns: 1fr;
  }

  .authors-col {
    order: 2;
  }

  .author-modal-top {
    align-items: flex-start;
  }

  .author-modal-avatar {
    width: 74px;
    height: 74px;
  }

  .author-modal-name {
    font-size: 34px;
  }

  .author-poem-entry-top {
    flex-direction: column;
    gap: 6px;
  }

  .plaza-hero {
    min-height: auto;
  }

  .hero-card {
    width: 100%;
    min-height: 350px;
    padding: 20px;
  }

  .hero-card.layer-1 {
    transform: translateX(calc(-50% - 10px)) translateY(16px) scale(0.96) rotate(-2deg);
  }

  .hero-card.layer-2 {
    transform: translateX(calc(-50% + 10px)) translateY(30px) scale(0.92) rotate(2deg);
  }

  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    z-index: 60;
    background: rgba(250, 246, 236, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(208, 203, 190, 0.74);
  }

  .mobile-tab {
    border: 0;
    background: transparent;
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--ink-soft);
    font-size: 13px;
  }

  .mobile-tab.active {
    color: var(--accent);
  }

}
