@font-face {
  font-family: LocalSerif;
  src: local("Georgia");
}
:root {
  --bg: #f8f6f1;
  --paper: #fffefa;
  --ink: #302b28;
  --muted: #8a847c;
  --line: #e6e0d6;
  --accent: #793f4a;
  --accent-soft: #f0e5e4;
  --sage: #637669;
  --hero: #eee9dd;
  --shadow: 0 16px 60px #3d2c2319;
  --serif: Georgia, "Batang", "바탕", serif;
  --sans: "Pretendard", "Segoe UI", "Malgun Gothic", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
svg.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button svg {
  pointer-events: none;
}
button {
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.btn.primary {
  background: var(--button-bg, var(--accent));
  color: var(--button-ink, white);
}
.btn.primary:hover {
  background: var(--button-hover, #65323d);
  transform: translateY(-1px);
}
.btn.secondary {
  border: 1px solid var(--line);
  background: var(--paper);
}
.btn.secondary:hover {
  background: var(--hero);
}
.btn.small {
  padding: 8px 12px;
  font-size: 12px;
}
.btn.danger {
  background: #f6e7e5;
  color: #a23732;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 7px;
}
.icon-btn:hover {
  background: var(--hero);
}
.text-link {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.text-link:hover {
  color: var(--accent);
}
.text-link .icon {
  width: 14px;
  height: 14px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.2px;
  color: var(--accent);
}
.tag {
  font-size: 10px;
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  background: #eeede5;
  color: #6e7761;
}
.tag.purple {
  background: #eee9f2;
  color: #796487;
}
.tag.amber {
  background: #f6edde;
  color: #a18254;
}
.tag.private {
  background: var(--hero);
  color: var(--muted);
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #e7e5da;
  color: #697668;
  font-family: var(--serif);
  font-size: 15px;
}
.avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 24px;
  background: #ede0d6;
  color: #966c56;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  background: var(--accent);
  color: var(--on-accent, white);
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 8px;
}
.loading {
  padding: 100px;
  text-align: center;
  color: var(--muted);
}
#header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  height: 88px;
  position: relative;
  z-index: 30;
}
.header-inner {
  max-width: 1320px;
  margin: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  gap: 30px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img,
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.brand-name {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.3px;
  line-height: 1.1;
}
.brand-sub {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: var(--muted);
  margin-top: 6px;
}
.top-nav {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 34px;
  margin-left: 20px;
}
.nav-link {
  height: 100%;
  position: relative;
  font-size: 13px;
  color: #807970;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 2px;
}
.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}
.nav-link.active:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  width: 180px;
  color: var(--muted);
}
.search-box .icon {
  width: 15px;
}
.search-box input {
  background: none;
  border: 0;
  outline: 0;
  min-width: 0;
  width: 100%;
  font-size: 11px;
  color: var(--ink);
}
.menu-button {
  border: 1px solid var(--line);
  margin-left: 3px;
}
.menu-button .icon {
  width: 19px;
}
.header-separator {
  height: 20px;
  border-left: 1px solid var(--line);
}
#main {
  max-width: 1320px;
  margin: auto;
  padding: 31px 40px 50px;
  min-height: calc(100vh - 205px);
}
.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 11px;
}
.page-top .welcome {
  color: #8d8478;
  display: flex;
  align-items: center;
  gap: 7px;
}
.page-top .welcome .icon {
  width: 15px;
  color: #b39671;
}
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 278px;
  gap: 28px;
}
.hero {
  min-height: 270px;
  border: 1px solid #e4dbca;
  border-radius: 10px;
  background: var(--hero);
  overflow: hidden;
  position: relative;
  padding: 35px 36px;
  display: flex;
  align-items: center;
}
.hero.hero-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}
.hero-spotlight .hero-copy { width: auto; align-self: center; min-width: 0; }
.hero-character {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-character .eyebrow { font-size: 8px; letter-spacing: 1.6px; }
.character-portrait { width: 100%; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--hero); }
.character-portrait img { display: block; width: 100%; height: 145px; object-fit: contain; }
.hero-character h2 { font-family: var(--serif); font-size: 21px; margin: 5px 0; overflow-wrap: anywhere; }
.hero .hero-character p { font-size: 11px; margin: 5px 0 10px; line-height: 1.7; max-width: none; }
.character-world, .character-credit { font-size: 9px; color: var(--muted); }
.character-credit { display: block; margin: 0 0 12px; }
.character-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.character-empty { justify-content: center; }
.character-empty > .icon { width: 38px; height: 38px; color: var(--accent); margin: 15px 0 5px; }
.character-empty .btn { align-self: flex-start; }
.age-tag { margin-bottom: 6px; display: inline-block; }
.adult-tag { color: var(--accent); border-color: var(--accent); }
.world-card.locked .world-cover { display: flex; justify-content: center; align-items: center; }
.world-card.locked .world-cover > .icon { width: 32px; height: 32px; color: var(--accent); }
.age-gate { padding: 40px 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); text-align: center; }
.age-gate > .icon { width: 32px; height: 32px; color: var(--accent); }
.age-gate h2 { font-family: var(--serif); font-size: 26px; margin: 14px 0; }
.age-gate p { font-size: 12px; line-height: 1.9; margin: 15px auto; max-width: 470px; }
.adult-preview { grid-column: 1 / -1; }
.adult-update { display: flex; align-items: center; gap: 20px; justify-content: space-between; }
.adult-update strong { font-size: 12px; font-weight: 600; }
.adult-update p { color: var(--muted); font-size: 11px; line-height: 1.8; }
.adult-update .btn { flex-shrink: 0; }
.hero-copy {
  z-index: 1;
  width: 64%;
}
.hero h1 {
  font-size: 37px;
  line-height: 1.4;
  letter-spacing: -1.4px;
  font-family: var(--serif);
  font-weight: 700;
  margin: 12px 0;
}
.hero h1 span {
  color: var(--accent);
}
.hero p {
  font-size: 12px;
  line-height: 1.85;
  color: #8c8275;
  margin-bottom: 21px;
}
.hero-art {
  position: absolute;
  right: 2px;
  top: 7px;
  width: 320px;
  height: 260px;
  opacity: 0.93;
}
.hero .eyebrow {
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 2.3px;
}
.section {
  margin-top: 31px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  letter-spacing: -0.6px;
  font-weight: 600;
}
.section-title .icon {
  color: var(--accent);
  width: 21px;
}
.section-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: #82937a;
}
.chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  font-size: 11px;
  border-radius: 20px;
  background: var(--paper);
  color: var(--muted);
}
.chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent, white);
}
.world-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.world-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.world-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px #3d2c2310;
}
.cover {
  background-image: url("/assets/worlds-triptych.png");
  background-size: 300% auto;
  background-position: left center;
  background-color: #d6ccc1;
}
.cover.cover-1 {
  background-position: center;
}
.cover.cover-2 {
  background-position: right;
}
.world-cover {
  flex-shrink: 0;
  height: 153px;
  position: relative;
  display: block;
  width: 100%;
  border: 0;
}
.world-cover:after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(transparent, #18161735);
  pointer-events: none;
}
.world-cover .tag {
  position: absolute;
  bottom: 11px;
  left: 12px;
  z-index: 1;
  background: #fffef0e6;
  font-size: 9px;
}
.bookmark {
  position: absolute;
  right: 9px;
  top: 9px;
  background: #fffdf2e8;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  z-index: 2;
  color: #776960;
}
.bookmark .icon {
  width: 14px;
  height: 14px;
}
.bookmark.saved {
  color: var(--accent);
  background: var(--accent-soft);
}
.card-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 15px 15px 13px;
}
.card-title {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.5;
  text-align: left;
}
.card-summary {
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid #eee8e0;
  margin-top: auto;
  padding-top: 10px;
  font-size: 9px;
  color: var(--muted);
}
.card-meta .avatar {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  font-size: 10px;
}
.card-meta time {
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 8px;
}
.card-meta > .icon { flex-shrink: 0; }
.card-author {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-heading .scope-tag { margin: 0 4px 6px 0; }
.publication-controls { display: flex; flex-wrap: wrap; gap: 14px; }
.publication-controls .form-field { flex: 1; min-width: 160px; }
.post-composer .publication-controls + .form-help { margin: 0 0 18px; }
.art-locked { display: grid; place-items: center; background: var(--hero); color: var(--accent); }
.empty {
  padding: 35px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  grid-column: 1/-1;
}
.empty p {
  margin: 9px 0 14px;
  font-size: 12px;
}
.board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 29px;
}
.board-preview {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 19px;
}
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}
.board-head h2 {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.board-head .icon {
  width: 17px;
  color: var(--accent);
}
.post-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid #eee9e1;
  width: 100%;
  text-align: left;
}
.post-row:last-child {
  border-bottom: 0;
}
.post-row-title {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.post-row:hover .post-row-title {
  color: var(--accent);
}
.post-row .count {
  font-size: 9px;
  color: var(--accent);
}
.post-row time {
  font-size: 8px;
  white-space: nowrap;
  color: #a7a095;
}
.tiny-new {
  display: inline-grid;
  place-items: center;
  background: #efe2df;
  color: #ac746c;
  font-size: 8px;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.art-preview {
  grid-column: 1/-1;
}
.art-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.art-row {
  display: flex;
  gap: 12px;
  text-align: left;
  align-items: center;
}
.art-thumb {
  width: 88px;
  height: 65px;
  border-radius: 5px;
  flex-shrink: 0;
}
.art-row h3 {
  font-size: 12px;
  margin: 3px 0;
}
.art-row p {
  font-size: 10px;
  color: var(--muted);
}
.aside-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 23px;
  margin-bottom: 22px;
}
.create-card {
  padding: 25px 23px 21px;
  text-align: center;
  background: #f3eee5;
}
.create-card .mini-orbit {
  font-family: var(--serif);
  font-size: 37px;
  line-height: 1;
  color: #9b795f;
  margin: 3px 0 18px;
}
.create-card h2 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: -0.3px;
  overflow-wrap: anywhere;
}
.create-card p {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.85;
  color: var(--muted);
  margin: 11px 0 21px;
}
.create-card .btn {
  width: 100%;
}
.create-note {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #a49786;
  margin-top: 13px;
}
.create-note .icon {
  width: 12px;
  height: 12px;
}
.aside-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 17px;
}
.aside-title > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aside-title .icon {
  color: var(--accent);
  width: 17px;
}
.notice-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0 0 14px;
  margin: 0 0 13px;
  border-bottom: 1px solid var(--line);
}
.notice-row:last-child {
  border: 0;
  padding: 0;
  margin: 0;
}
.notice-row h3 {
  font-size: 11px;
  line-height: 1.65;
  margin-bottom: 6px;
  font-weight: 600;
}
.notice-row time {
  font-size: 9px;
  color: var(--muted);
}
.notice-row .tag {
  font-size: 8px;
  padding: 2px 5px;
  margin-bottom: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}
.prompt-card {
  background: #74434b;
  color: #f7eee0;
  border: 0;
  position: relative;
  overflow: hidden;
  padding: 24px;
}
.prompt-card .eyebrow {
  color: #d9b4a0;
  font-size: 9px;
}
.prompt-card h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
  margin: 17px 0 12px;
}
.prompt-card p {
  font-size: 10px;
  color: #d2b5ae;
  line-height: 1.9;
}
.prompt-card .text-link {
  color: #f2dac8;
  margin-top: 20px;
}
.prompt-star {
  position: absolute;
  right: 17px;
  top: 40px;
  color: #d2a983;
  font-size: 45px;
  transform: rotate(12deg);
}
.station-stats {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.stat {
  text-align: center;
}
.stat strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  display: block;
  color: #816152;
}
.stat span {
  font-size: 9px;
  color: var(--muted);
}
.aside-foot {
  font-size: 9px;
  line-height: 1.9;
  color: #a99f91;
  text-align: center;
  margin-top: 16px;
}
.footer-inner {
  max-width: 1240px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 23px 0 27px;
  color: #a39a8f;
  font-size: 9px;
}
.footer-brand {
  font-family: var(--serif);
  letter-spacing: 1px;
  font-size: 12px;
  color: #968879;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.drawer-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  background: #241d1c55;
  z-index: 60;
  backdrop-filter: blur(3px);
}
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 340px;
  background: var(--paper);
  z-index: 61;
  padding: 24px;
  overflow: auto;
  box-shadow: var(--shadow);
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line);
}
.drawer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0 18px;
}
.drawer-profile strong {
  display: block;
  font-size: 15px;
}
.drawer-profile p {
  color: var(--muted);
  font-size: 11px;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 10px;
  text-align: left;
  font-size: 13px;
  border-radius: 7px;
}
.drawer-link .icon {
  color: #94786d;
}
.drawer-link:hover {
  background: var(--hero);
}
.drawer-section {
  border-top: 1px solid var(--line);
  margin-top: 21px;
  padding-top: 18px;
}
.drawer-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 0 10px 6px;
}
.modal-overlay {
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--paper);
  width: 500px;
  max-width: 100%;
  border-radius: 13px;
  box-shadow: var(--shadow);
  max-height: 90dvh;
  overflow: auto;
}
.modal.wide {
  width: 740px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 27px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 1;
}
.modal-header h2 {
  font-size: 19px;
  letter-spacing: -0.5px;
}
.modal-body {
  padding: 25px 27px;
}
.modal-body > p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}
.form-field {
  display: block;
  margin-bottom: 17px;
}
.form-field > span,
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 7px;
  color: #827568;
}
.form-field input,
.form-field select,
.form-field textarea,
.form-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
}
.form-field textarea {
  min-height: 100px;
  resize: vertical;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}
.form-error {
  color: #b45245;
  font-size: 12px;
  min-height: 18px;
}
.form-help {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.auth-intro {
  text-align: center;
  color: var(--muted);
  margin-bottom: 24px;
}
.google-sign-in {
  text-align: center;
  margin-bottom: 18px;
}
#google-sign-in-button {
  display: flex;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
}
.google-sign-in .form-help {
  line-height: 1.7;
}
.google-sign-in a {
  color: var(--accent);
  text-decoration: underline;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #403430;
  color: #fff9ed;
  border-radius: 8px;
  padding: 13px 23px;
  box-shadow: var(--shadow);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  font-size: 12px;
  max-width: 90vw;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.cover-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cover-choice {
  height: 85px;
  border: 3px solid transparent;
  border-radius: 6px;
}
.cover-choice.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--paper) inset;
}
.cover-choice input {
  appearance: none;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.cover-choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.cover-custom { background-image: none; }
.cover-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reader-cover { position: relative; overflow: hidden; }
.world-cover-upload { margin-top: 14px; }
.world-cover-preview { height: 140px; overflow: hidden; border: 3px solid var(--accent); border-radius: 7px; margin-bottom: 12px; }
.world-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.world-cover-upload-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.world-cover-upload .form-help { margin-top: 10px; overflow-wrap: anywhere; }
.world-cover-upload [hidden] { display: none; }
.entity-mention { display: inline; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-weight: 700; padding: 0; overflow-wrap: anywhere; }
.entity-mention:hover { text-decoration-thickness: 2px; }
.entity-link-preview, .entity-reference-detail { border: 1px solid var(--line); border-radius: 7px; padding: 14px; margin: 12px 0 20px; background: var(--bg); }
.entity-link-preview h3, .entity-reference-card h3 { font-size: 12px; margin-bottom: 10px; }
.entity-link-preview [data-entity-link-text] { white-space: pre-wrap; font-size: 12px; line-height: 1.9; overflow-wrap: anywhere; max-height: 200px; overflow: auto; }
.entity-reference-detail { max-height: 420px; overflow: auto; }
.entity-reference-card { margin-top: 15px; }
.entity-reference-detail[hidden], .entity-link-preview[hidden] { display: none; }
.view-heading {
  margin-bottom: 28px;
}
.view-heading .eyebrow {
  margin-bottom: 7px;
}
.view-heading h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
}
.view-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
}
.explore-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.explore-grid .world-cover {
  height: 180px;
}
.board-tabs {
  flex-wrap: wrap;
  display: flex;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 25px;
}
.board-tab {
  padding: 12px 22px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.board-tab.active {
  border-color: var(--accent);
  color: var(--accent);
}
.board-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.board-list-row {
  width: 100%;
  display: grid;
  grid-template-columns: 70px 1fr 130px 80px;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--line);
  gap: 15px;
  text-align: left;
}
.board-list-row:last-child {
  border: 0;
}
.board-list-row:hover {
  background: var(--hero);
}
.board-list-row strong {
  font-weight: 600;
  font-size: 14px;
}
.board-list-row small {
  color: var(--muted);
  font-size: 11px;
}
.reader {
  max-width: 840px;
  margin: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.reader-cover {
  height: 245px;
}
.reader-body {
  padding: 35px 55px;
}
.reader-title {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.4;
  margin: 14px 0;
}
.reader-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 30px;
}
.reader-actions {
  margin-left: auto;
  display: flex;
  gap: 7px;
}
.prose {
  font-size: 15px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}
.prose h1,
.prose h2,
.prose h3 {
  line-height: 1.5;
  margin: 28px 0 15px;
}
.prose h2 {
  font-size: 24px;
}
.prose h3 {
  font-size: 20px;
}
.prose p {
  margin: 12px 0;
}
.prose b,.prose strong { font-weight: 700; }
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 22px 0;
  padding: 12px 20px;
  background: var(--bg);
  color: #9a7b6a;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 15px 0;
}
.prose td,
.prose th {
  border: 1px solid var(--line);
  padding: 10px;
  min-width: 50px;
}
.prose ul,
.prose ol {
  padding-left: 25px;
}
.prose pre {
  background: var(--hero);
  padding: 15px;
  overflow: auto;
}
.subpages {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 25px;
}
.subpage {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bg);
  margin-top: 8px;
  border-radius: 5px;
  width: 100%;
  text-align: left;
}
.comments {
  border-top: 1px solid var(--line);
  margin-top: 35px;
  padding-top: 25px;
}
.comments h3 {
  font-size: 15px;
  margin-bottom: 15px;
}
.comment {
  display: flex;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.comment p {
  font-size: 12px;
  white-space: pre-wrap;
  margin-top: 6px;
}
.comment strong {
  font-size: 11px;
}
.comment time {
  color: var(--muted);
  font-size: 9px;
  margin-left: 10px;
}
.comment-form {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.comment-form textarea {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 12px;
  border-radius: 5px;
  min-height: 70px;
  resize: vertical;
  color: var(--ink);
}
.plain-post {
  white-space: pre-wrap;
  line-height: 2;
  font-size: 14px;
}
.studio {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: 680px;
  overflow: hidden;
}
.studio-sidebar {
  background: #f0ede5;
  border-right: 1px solid var(--line);
  padding: 21px 15px;
}
.studio-pages-toggle, .studio-sidebar-mobile-heading { display: none; }
.studio-sidebar-backdrop { position: fixed; inset: 0; z-index: 64; background: #0005; }
.studio-sidebar-backdrop[hidden] { display: none; }
body.studio-sidebar-open { overflow: hidden; }
.studio-sidebar > select {
  width: 100%;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  color: var(--ink);
}
.world-picker-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 3px 9px;
  font-size: 11px;
  color: var(--muted);
}
.world-picker-heading .text-link { display: inline-flex; align-items: center; gap: 4px; }
.world-picker-heading .icon { width: 13px; height: 13px; }
.world-management-list { display: grid; gap: 12px; }
.world-management-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.world-management-item h3 { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.world-management-item p { font-size: 11px; color: var(--muted); margin-top: 5px; }
.world-management-summary { white-space: pre-wrap; overflow-wrap: anywhere; }
.world-management-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tree-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  margin: 24px 8px 9px;
}
.tree-row {
  display: flex;
  align-items: center;
  border-radius: 5px;
}
.tree-toggle, .tree-leaf-space {
  width: 24px;
  height: 32px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tree-toggle { color: var(--muted); border-radius: 4px; }
.tree-toggle:hover { color: var(--accent); background: var(--paper); }
.tree-toggle .icon { width: 13px; height: 13px; transition: transform .15s; }
.tree-toggle[aria-expanded="true"] .icon { transform: rotate(90deg); }
.tree-children[hidden] { display: none; }
.editor-modebar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.editor-modes { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px; }
.editor-modes button { padding: 6px 11px; border-radius: 4px; font-size: 11px; color: var(--muted); }
.editor-modes button[aria-pressed="true"] { background: var(--paper); color: var(--accent); box-shadow: 0 1px 3px #0001; }
.markdown-upload-tools { display: flex; gap: 5px; }
.markdown-content { display: block; width: 100%; min-height: 360px; resize: vertical; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); padding: 16px; font-family: Consolas, "Malgun Gothic", monospace; font-size: 13px; font-weight: 600; line-height: 1.8; tab-size: 2; }
.markdown-help { margin-top: 12px; }
.rich-editor [hidden] { display: none; }
.tree-item {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  padding: 8px;
  font-size: 11px;
  text-align: left;
  border-radius: 5px;
}
.tree-row.active {
  background: #e7ded4;
  color: var(--accent);
  font-weight: 600;
}
.tree-row:hover {
  background: #e8e2d8;
}
.tree-item .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.tree-item span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-item .icon:last-child {
  margin-left: auto;
  opacity: 0.5;
  width: 11px;
}
.page-delete {
  flex-shrink: 0;
  color: var(--muted);
}
.page-delete:hover,
.page-delete:focus-visible {
  background: #f6e7e5;
  color: #a23732;
}
.tree-delete {
  width: 32px;
  height: 34px;
}
.tree-delete .icon {
  width: 15px;
  height: 15px;
}
.sidebar-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}
.sidebar-footer .icon {
  width: 12px;
}
.studio-header {
  padding: 17px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.studio-tabs {
  display: flex;
  gap: 20px;
}
.studio-tab {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  color: var(--muted);
}
.studio-tab.active {
  color: var(--accent);
  font-weight: 600;
}
.studio-tab .icon {
  width: 16px;
}
.studio-state {
  font-size: 10px;
  color: var(--muted);
}
.editor-head {
  padding: 22px 32px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.editor-head .visibility-select {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--ink);
  font-size: 10px;
  padding: 7px;
}
.editor-head .btn:first-of-type {
  margin-left: auto;
}
.editor-toolbar {
  border-block: 1px solid var(--line);
  padding: 8px 25px;
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.tool-btn {
  width: 31px;
  height: 31px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.tool-btn:hover {
  background: var(--hero);
  color: var(--accent);
}
.tool-btn .icon {
  width: 16px;
  height: 16px;
}
.tool-separator {
  height: 17px;
  border-left: 1px solid var(--line);
  margin: 0 6px;
}
.format-select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  padding: 6px;
  width: 82px;
}
.editor-document {
  padding: 27px 45px 60px;
}
.editor-title {
  width: 100%;
  font-family: var(--serif);
  font-size: 30px;
  color: var(--ink);
  font-weight: 700;
  background: transparent;
  border: 0;
  padding: 0 0 18px;
  margin-bottom: 10px;
  outline: none;
}
.editor-content {
  min-height: 380px;
  outline: none;
}
.editor-content:empty:before {
  content: "이곳에서 당신의 세계를 기록해 보세요…";
  color: #b1a79a;
  pointer-events: none;
}
.upload-status {
  margin: 12px 32px;
  font-size: 11px;
  color: var(--accent);
}
.upload-status:empty {
  display: none;
}
.visibility-note {
  font-size: 10px;
  color: #a77f54;
  padding: 0 32px 12px;
}
.world-setting {
  padding: 28px 32px;
}
.setting-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 23px;
}
.setting-top h2 {
  font-size: 21px;
}
.setting-top p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.entity-categories {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 23px;
}
.entity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.entity-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 18px;
  text-align: left;
  position: relative;
  background: var(--paper);
}
.entity-card:hover {
  border-color: #bba591;
}
.entity-card .tag {
  margin-bottom: 8px;
}
.entity-card h3 {
  font-size: 14px;
}
.entity-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entity-card .entity-year {
  font-size: 10px;
  color: #9b7d68;
  margin-top: 8px;
}
.entity-image {
  width: 44px;
  height: 44px;
  float: right;
  border-radius: 6px;
  object-fit: cover;
}
.check-summary {
  background: #eeeae1;
  border-radius: 9px;
  padding: 23px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 17px;
}
.check-summary > .icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
}
.check-summary h3 {
  font-size: 19px;
}
.check-summary p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.issue {
  padding: 19px;
  border: 1px solid #e5d4ca;
  border-radius: 7px;
  background: #faf3ea;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
}
.issue .icon {
  color: #ba8058;
  width: 18px;
}
.issue strong {
  font-size: 12px;
}
.issue p {
  font-size: 11px;
  color: #967c66;
  margin-top: 4px;
}
.check-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  margin: 20px 0;
}
.repeat-block {
  background: var(--bg);
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 10px;
}
.repeat-row {
  display: grid;
  grid-template-columns: 1fr 75px 75px 28px;
  gap: 8px;
  align-items: center;
}
.repeat-row input,
.repeat-row select {
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 4px;
  color: var(--ink);
  font-size: 11px;
}
.repeat-row input[type="checkbox"] {
  width: auto;
}
.check-label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
}
.repeat-row.relationship {
  grid-template-columns: 1fr 1fr 28px;
}
.multi-select {
  height: 110px;
}
.confirm-copy {
  font-size: 13px;
  line-height: 1.9;
}
.storage-meter {
  height: 7px;
  background: var(--hero);
  border-radius: 8px;
  overflow: hidden;
  margin: 12px 0;
}
.storage-meter span {
  display: block;
  background: var(--accent);
  height: 100%;
}
.settings-section {
  margin-bottom: 25px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.settings-section h3 {
  font-size: 14px;
  margin-bottom: 15px;
}
body.dark {
  --bg: #242320;
  --paper: #2d2b28;
  --ink: #eee6da;
  --muted: #afa497;
  --line: #484139;
  --accent: #bb828c;
  --accent-soft: #533f43;
  --hero: #39332b;
  --shadow: 0 16px 60px #0004;
}
.dark .hero {
  border-color: var(--line);
}
.dark .hero p,
.dark .create-card p {
  color: var(--muted);
}
.dark .create-card,
.dark .studio-sidebar {
  background: #36312b;
}
.dark .tree-row.active {
  background: #4b3c35;
}
.dark .tree-row:hover {
  background: #42382f;
}
.dark .page-delete:hover,
.dark .page-delete:focus-visible {
  background: #51352f;
  color: #f3aaa3;
}
.dark .issue {
  background: #44372d;
  border-color: #675044;
}
.dark .check-summary {
  background: #3b352e;
}
.dark .card-meta,
.dark .post-row {
  border-color: var(--line);
}
.dark .tag {
  background: #3a4036;
  color: #acb69f;
}
.dark .prompt-card {
  background: #653a42;
}
.compact .world-cover {
  height: 110px;
}
.compact .card-summary {
  display: none;
}
.compact .post-row {
  padding: 7px 0;
}
@media (min-width: 1500px) {
  .hero {
    min-height: 305px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .hero-art {
    width: 350px;
    height: 295px;
  }
  .world-cover {
    height: 168px;
  }
}
@media (max-width: 1120px) {
  .header-inner,
  #main {
    padding-left: 25px;
    padding-right: 25px;
  }
  .top-nav {
    gap: 23px;
    margin-left: 0;
  }
  .search-box {
    width: 140px;
  }
  .home-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 22px;
  }
  .hero {
    padding: 28px;
  }
  .hero h1 {
    font-size: 31px;
  }
  .hero-art {
    width: 260px;
    right: -15px;
  }
  .hero-copy {
    width: 66%;
  }
  .world-grid {
    gap: 12px;
  }
  .card-copy {
    padding: 12px;
  }
  .world-cover {
    height: 130px;
  }
  .card-meta time {
    display: none;
  }
  .aside-card {
    padding: 20px;
  }
  .footer-inner {
    margin: 0 25px;
  }
  .explore-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .brand-sub {
    display: none;
  }
  .brand-name {
    font-size: 19px;
  }
  .header-inner {
    gap: 15px;
  }
  .search-box {
    display: none;
  }
  .home-layout {
    grid-template-columns: 1fr;
  }
  .home-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .aside-card {
    margin: 0;
  }
  .aside-card.stats-card {
    display: none;
  }
  .prompt-card {
    grid-column: 1/-1;
  }
  .prompt-card h2 {
    margin: 12px 0;
  }
  .prompt-star {
    right: 50px;
  }
  .hero-art {
    right: 25px;
    width: 310px;
  }
  .hero-copy {
    width: 60%;
  }
  .hero h1 {
    font-size: 37px;
  }
  .world-cover {
    height: 175px;
  }
  .studio {
    grid-template-columns: 190px 1fr;
  }
  .studio-tabs {
    gap: 12px;
  }
  .editor-document {
    padding: 25px;
  }
  .studio-header {
    padding: 15px;
  }
  .editor-head {
    padding: 17px;
  }
  .entity-grid {
    grid-template-columns: 1fr;
  }
  .world-setting {
    padding: 24px;
  }
  .explore-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 650px) {
  #header {
    height: 70px;
  }
  .header-inner {
    padding: 0 18px;
  }
  .brand-name {
    font-size: 18px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .brand {
    gap: 8px;
  }
  .top-nav {
    display: none;
  }
  .header-actions {
    gap: 7px;
  }
  .header-separator {
    display: none;
  }
  #main {
    padding: 22px 18px 35px;
  }
  .page-top {
    margin-bottom: 16px;
  }
  .page-top .date {
    display: none;
  }
  .hero {
    padding: 26px 23px;
    min-height: 295px;
    align-items: flex-start;
  }
  .hero-copy {
    width: 85%;
  }
  .hero h1 {
    font-size: 32px;
    line-height: 1.45;
  }
  .hero p {
    font-size: 11px;
    max-width: 220px;
  }
  .hero-art {
    width: 220px;
    height: 210px;
    right: -85px;
    top: 76px;
    opacity: 0.42;
  }
  .hero .btn {
    position: relative;
    z-index: 1;
  }
  .eyebrow {
    font-size: 9px;
  }
  .section {
    margin-top: 27px;
  }
  .section-title {
    font-size: 18px;
  }
  .section-desc {
    font-size: 10px;
  }
  .world-grid,
  .explore-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .world-cover,
  .explore-grid .world-cover {
    height: 143px;
  }
  .card-title {
    font-size: 12px;
  }
  .card-summary {
    font-size: 9px;
  }
  .world-grid .world-card:last-child:nth-child(odd) {
    grid-column: 1/-1;
  }
  .world-grid .world-card:last-child:nth-child(odd) .world-cover {
    height: 190px;
  }
  .board-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .art-preview {
    grid-column: auto;
  }
  .art-rows {
    grid-template-columns: 1fr;
  }
  .home-aside {
    grid-template-columns: 1fr;
    margin-top: 7px;
    gap: 16px;
  }
  .create-card {
    display: none;
  }
  .prompt-card {
    grid-column: auto;
  }
  .prompt-star {
    right: 27px;
  }
  .footer-inner {
    padding: 22px 0;
    margin: 0 18px;
    flex-direction: column;
    gap: 13px;
  }
  .drawer {
    width: min(340px, 90vw);
  }
  .modal-overlay {
    padding: 12px;
  }
  .modal-body {
    padding: 22px;
  }
  .modal-header {
    padding: 18px 22px;
  }
  .form-row {
    gap: 10px;
  }
  .board-tab {
    padding: 11px 12px;
    font-size: 11px;
  }
  .board-tabs {
    gap: 3px;
    overflow: auto;
  }
  .board-list-row {
    grid-template-columns: 1fr 65px;
    padding: 18px;
    gap: 8px;
  }
  .board-list-row > .tag,
  .board-list-row > .author-col {
    display: none;
  }
  .board-list-row strong {
    font-size: 12px;
  }
  .reader-body {
    padding: 25px 21px;
  }
  .reader-title {
    font-size: 27px;
  }
  .reader-cover {
    height: 190px;
  }
  .reader-meta {
    flex-wrap: wrap;
  }
  .prose {
    font-size: 13px;
  }
  .studio {
    grid-template-columns: 1fr;
  }
  .studio-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 65;
    width: 70vw;
    height: 100vh;
    height: 100dvh;
    padding: 18px 12px max(24px, env(safe-area-inset-bottom));
    border-right: 1px solid var(--line);
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s;
    box-shadow: 8px 0 30px #0002;
  }
  .studio.sidebar-open .studio-sidebar { transform: translateX(0); visibility: visible; }
  .studio-pages-toggle { display: inline-flex; flex-shrink: 0; width: 40px; height: 40px; }
  .studio-page-top { gap: 8px; flex-wrap: wrap; }
  .studio-page-top > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .studio-sidebar-mobile-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
  .studio-sidebar-mobile-heading h2 { font-size: 15px; font-weight: 700; }
  .studio-sidebar-mobile-heading .icon-btn { width: 40px; height: 40px; }
  .tree-toggle, .tree-leaf-space { width: 32px; height: 40px; flex-basis: 32px; }
  .studio-sidebar > select {
    max-width: 200px;
  }
  .tree-heading {
    margin: 10px 5px 4px;
  }
  .tree-delete {
    width: 40px;
    height: 40px;
  }
  .sidebar-footer {
    display: none;
  }
  .studio-header {
    padding: 13px 15px;
    flex-wrap: wrap;
  }
  .studio-tab {
    font-size: 11px;
  }
  .studio-tabs {
    gap: 17px;
  }
  .studio-state {
    font-size: 9px;
  }
  .editor-head {
    gap: 6px;
  }
  .editor-head .btn {
    font-size: 10px;
    padding: 7px 9px;
  }
  .editor-toolbar {
    padding: 7px 12px;
  }
  .tool-btn {
    width: 29px;
  }
  .editor-title {
    font-size: 25px;
  }
  .editor-document {
    padding: 23px 21px;
  }
  .world-setting {
    padding: 20px 17px;
  }
  .setting-top h2 {
    font-size: 18px;
  }
  .setting-top .btn {
    font-size: 11px;
    padding: 9px;
  }
  .entity-categories .chip {
    font-size: 10px;
    padding: 5px 8px;
  }
  .repeat-row {
    grid-template-columns: 1fr 62px 62px 24px;
    gap: 5px;
  }
  .repeat-row.relationship {
    grid-template-columns: 1fr 80px 24px;
  }
  .comment-form {
    flex-wrap: wrap;
  }
  .comment-form textarea {
    flex-basis: 100%;
  }
  .view-heading h1 {
    font-size: 28px;
  }
  .section-heading > .text-link {
    font-size: 10px;
  }
  .page-top .welcome {
    font-size: 10px;
  }
}
@media (max-width: 650px) {
  .hero.hero-spotlight { grid-template-columns: 1fr; gap: 24px; }
  .hero-spotlight .hero-copy { width: auto; }
  .hero-character:not(.character-empty) { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; }
  .hero-character > .eyebrow { grid-column: 1 / -1; }
  .character-portrait img { height: 140px; }
  .hero-character h2 { font-size: 20px; }
  .hero-character .text-link { font-size: 11px; }
  .adult-update { flex-wrap: wrap; gap: 10px; }
  .character-empty { min-height: 215px; }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.art-thumb {
  object-fit: cover;
}
.post-image {
  max-width: 100%;
  height: auto;
  border-radius: 7px;
  margin: 0 0 24px;
}
.art-album {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.art-album > .empty { grid-column: 1 / -1; }
.album-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.album-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.album-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.album-image { display: block; aspect-ratio: 4 / 3; width: 100%; background: var(--hero); }
.album-image img { width: 100%; height: 100%; object-fit: cover; }
.album-placeholder { height: 100%; display: flex; gap: 12px; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.album-placeholder .icon { width: 34px; height: 34px; }
.album-body { display: block; padding: 18px; width: 100%; }
.album-body > strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.album-meta { display: flex; gap: 10px; margin-top: 12px; align-items: center; color: var(--muted); font-size: 11px; }
.album-meta > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-comments { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.album-comments .icon { width: 13px; height: 13px; }
.post-composer.wide { width: 980px; }
.post-composer .modal-header { z-index: 20; }
.post-editor { border: 1px solid var(--line); border-radius: 8px; }
.post-editor .editor-toolbar { top: 69px; border-top: 0; border-radius: 8px 8px 0 0; padding: 10px 14px; }
.post-editor .editor-document { padding: 24px 30px 36px; }
.post-editor .editor-title { font-size: 25px; }
.post-editor .editor-content { min-height: 280px; }
.post-editor .editor-content:empty:before { content: attr(data-placeholder); }
.editor-content:focus-visible { outline: 1px solid var(--line); outline-offset: 8px; }
.editor-tools { padding: 18px 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
.editor-tools .form-field { margin-bottom: 10px; }
.editor-tools .btn { margin-right: 6px; }
.editor-tools .form-error { margin-bottom: 0; }
.admin-content { margin-top: 24px; }
.admin-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-bottom: 22px; }
.admin-stats > div { padding: 22px; background: var(--hero); border: 1px solid var(--line); border-radius: 10px; }
.admin-stats strong { display: block; font-size: 28px; font-weight: 700; }
.admin-stats span { color: var(--muted); font-size: 12px; }
.admin-panel { padding: 24px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); margin-bottom: 20px; }
.admin-panel h2 { font-size: 17px; margin-bottom: 15px; }
.permission-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-role-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.admin-role-grid .form-help { min-height: 40px; }
.admin-member,.admin-post { display: flex; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding: 16px 0; }
.admin-member[hidden] { display: none; }
.admin-member > div { flex: 1; min-width: 0; }
.admin-member strong,.admin-post strong { overflow-wrap: anywhere; font-size: 14px; }
.admin-member small { display: block; color: var(--muted); margin-top: 5px; overflow-wrap: anywhere; }
.admin-search { margin: 5px 0 16px; }
.admin-post-link { flex: 1; min-width: 0; text-align: left; display: flex; gap: 12px; align-items: center; }
.admin-post-link strong { flex: 1; }
.admin-post-link small { color: var(--muted); }
.admin-audit p { display: flex; align-items: center; gap: 18px; padding: 10px 0; font-size: 12px; border-bottom: 1px solid var(--line); }
.admin-audit time { margin-left: auto; color: var(--muted); }
.role-permissions { display: grid; gap: 8px; margin: 18px 0; }
@media (max-width: 900px) {
  .art-album,.admin-role-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-post-link { flex-wrap: wrap; }
  .admin-post-link small { flex-basis: 100%; }
}
@media (max-width: 560px) {
  .art-album,.admin-role-grid { grid-template-columns: 1fr; }
  .post-composer .modal-body { padding: 16px 12px; }
  .post-editor .editor-document { padding: 20px 18px 30px; }
  .post-editor .editor-title { font-size: 21px; }
  .post-editor .editor-toolbar { top: 64px; padding: 7px; }
  .admin-panel { padding: 18px; }
  .admin-member { gap: 10px; flex-wrap: wrap; }
  .admin-stats { gap: 8px; }
  .admin-stats > div { padding: 15px; }
  .admin-audit p { flex-wrap: wrap; gap: 8px; }
}
.bookmark-reader.saved {
  color: var(--accent);
}

.check-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
}
.archive-notice {
  font-size: 10px;
  color: var(--muted);
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 5px;
  margin: -6px 0 20px;
}
.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.archive-description {
  white-space: pre-wrap;
  margin-top: 15px !important;
}
.archive-details {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 13px;
  font-size: 12px;
}
.archive-details dt {
  color: var(--muted);
}
.archive-details dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 650px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }
  .archive-details {
    grid-template-columns: 95px 1fr;
  }
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* A personal palette also covers decorative surfaces that have default brand colors. */
body.custom-color .hero,
body.custom-color .card-meta,
body.custom-color .post-row { border-color: var(--line); }
body.custom-color .create-card,
body.custom-color .studio-sidebar { background: var(--sidebar); }
body.custom-color .tree-row.active { background: var(--tree-active); }
body.custom-color .tree-row:hover { background: var(--tree-hover); }
body.custom-color .tag,
body.custom-color .avatar,
body.custom-color .check-summary { background: var(--accent-soft); color: var(--accent); }
body.custom-color .tag.private { background: var(--hero); color: var(--muted); }
body.custom-color .world-card { box-shadow: var(--card-shadow); }
body.custom-color .prompt-card,
body.custom-color #toast { background: var(--prompt-bg); color: var(--prompt-ink); }
body.custom-color .prompt-card .eyebrow,
body.custom-color .prompt-card p,
body.custom-color .prompt-card .text-link,
body.custom-color .prompt-star { color: var(--prompt-muted); }
body.custom-color .nav-link:not(.active),
body.custom-color .page-top .welcome,
body.custom-color .hero p,
body.custom-color .create-note,
body.custom-color .aside-foot,
body.custom-color .footer-inner,
body.custom-color .footer-brand,
body.custom-color .entity-card .entity-year { color: var(--muted); }
body.custom-color .page-top .welcome .icon,
body.custom-color .create-card .mini-orbit,
body.custom-color .stat strong,
body.custom-color .drawer-link .icon { color: var(--accent); }
body.custom-color .entity-card:hover { border-color: var(--accent); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.preference-color { margin: 20px 0; }
.color-picker-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.color-picker-row input[type=color] { width: 54px; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); cursor: pointer; flex-shrink: 0; }
.color-hex-label { flex: 1; min-width: 95px; max-width: 140px; }
.color-hex-label input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font-family: ui-monospace, monospace; }
.palette-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; margin: 14px 0 0; background: var(--hero); border: 1px solid var(--line); border-radius: 8px; }
.palette-preview strong { font-size: 13px; }
.palette-preview p { color: var(--muted); font-size: 10px; margin-top: 4px; }
.palette-preview-button { background: var(--button-bg, var(--accent)); color: var(--button-ink, white); border-radius: 5px; padding: 8px 11px; font-size: 10px; font-weight: 600; flex-shrink: 0; }
@media (max-width: 400px) { .palette-preview { align-items: flex-start; flex-direction: column; } }

.hero-carousel { margin-bottom: 34px; }
.hero-carousel .hero { min-height: 0; height: 100%; margin: 0; }
.hero-carousel-stage { aspect-ratio: 12 / 5; overflow: hidden; border-radius: 10px; }
.hero-slide { animation: hero-slide-in .35s ease; }
@keyframes hero-slide-in { from { opacity: .35; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
.hero-character-slide { display: flex; flex-direction: column; padding: 22px; }
.character-slide-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.character-slide-heading .eyebrow { font-size: 9px; letter-spacing: 1.7px; }
.character-slide-heading > span:last-child { color: var(--muted); font-size: 10px; }
.character-slide-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; flex: 1; min-height: 0; }
.featured-character-frame { position: relative; height: 100%; min-height: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-align: left; }
.featured-character-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.featured-character-frame:after { content: ""; position: absolute; inset: 30% 0 0; background: linear-gradient(transparent, #111525ee); pointer-events: none; }
.featured-character-copy { position: absolute; left: 12px; right: 12px; bottom: 18px; color: white; z-index: 1; }
.featured-character-world, .featured-character-race { display: block; font-size: 10px; font-weight: 600; line-height: 1.5; }
.featured-character-world { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.featured-character-copy strong { display: block; font-family: var(--serif); font-size: 23px; font-weight: 700; line-height: 1.3; margin: 6px 0 7px; overflow-wrap: anywhere; }
.featured-character-race { opacity: .85; }
.featured-character-frame:hover img { transform: scale(1.035); transition: transform .25s; transform-origin: top center; }
.hero-carousel-controls { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 12px 0 0; }
.hero-carousel-controls .icon-btn { width: 30px; height: 30px; }
.hero-carousel-controls .rotate-back { transform: rotate(180deg); }
.hero-carousel-dots { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; max-width: 65%; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.hero-dot.active { background: var(--accent); }
.hero-slide-count, .hero-pause { font-size: 10px; color: var(--muted); white-space: nowrap; }
.hero-pause { padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; }
@media (max-width: 650px) {
  .hero-carousel-stage { aspect-ratio: auto; height: 430px; }
  .hero-carousel .hero-character { display: none; }
  .hero-carousel .hero-spotlight { grid-template-columns: 1fr; }
  .hero-character-slide { padding: 16px; }
  .character-slide-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .featured-character-copy { left: 10px; right: 10px; }
  .featured-character-copy strong { font-size: 21px; }
  .hero-carousel-controls { gap: 6px; }
  .hero-carousel-dots { max-width: 45%; }
}
@media (prefers-reduced-motion: reduce) { .hero-slide { animation: none; } }
.hero-banner-slide { display: block; padding: 0; background: var(--hero); }
.hero-banner-slide img, .hero-banner-slide video { display: block; width: 100%; height: 100%; object-fit: contain; }
.admin-banner-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 16px; margin-top: 22px; }
.admin-banner { padding: 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.admin-banner img, .admin-banner video, .banner-upload-preview img, .banner-upload-preview video { display: block; width: 100%; aspect-ratio: 12 / 5; object-fit: contain; background: var(--hero); border-radius: 5px; }
.admin-banner strong { display: block; font-size: 13px; margin-top: 12px; overflow-wrap: anywhere; }
.banner-spec { padding: 16px; background: var(--hero); border: 1px solid var(--line); border-radius: 7px; margin-bottom: 18px; }
.banner-spec strong { font-size: 23px; color: var(--accent); }
.banner-spec p { font-size: 12px; line-height: 1.8; margin-top: 7px; }
.banner-upload-preview { margin-top: 18px; }
.hero-carousel .hero-spotlight { padding: clamp(20px,3.2vw,38px); }
.hero-carousel .hero-character { max-height: 100%; overflow: hidden; padding: 16px; }
.hero-carousel .character-portrait { height: 135px; }
.hero-carousel .hero-character h2 { font-size: 19px; }
