* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #fff;
  color: #0f0f0f;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ????E? */
.home-page {
  min-height: 100vh;
  padding: 32px 20px 56px;
}

/* ???? index.html ???E?Ehome-page ? creator ?????E?????????E*/
.home-page.home-page--index {
  font-family: "Playfair Display", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "MS Mincho", serif;
}

.home-header {
  max-width: 960px;
  margin: 0 auto 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ececec;
}

.home-logo {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-subtitle {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

.home-actions {
  margin-top: 14px;
}

.home-action-link {
  display: inline-block;
  text-decoration: none;
  color: #111;
  border: 1px solid #e3e3e3;
  background: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.home-action-link:hover {
  border-color: #cfcfcf;
}

/* ???E???E????E??Ereator-works.html?E?E*/
.creator-works-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.creator-works-search {
  flex: 1 1 160px;
  min-width: 0;
  max-width: 320px;
  font: inherit;
  font-size: 0.9rem;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #111;
}

.creator-works-sort-label {
  font-size: 0.9rem;
  color: #444;
}

.creator-works-sort {
  font: inherit;
  font-size: 0.9rem;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #111;
}

.creator-works-ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.creator-works-li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #ececec;
}

.creator-works-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.creator-works-empty {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

/* index: smartphone ? search between band and shelf (hidden on PC; wrapper stays inert) */
.works-index-mobile-search {
  display: none;
}

/* index: プロフィール横の小さな▼で並び替え・表示切替（スマホのみ） */
.home-page.home-page--index .header-index-mobile-display-menu {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
}

.home-page.home-page--index .header-index-mobile-display-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.home-page.home-page--index .header-index-mobile-display-chevron {
  display: none;
}

@media (max-width: 600px) {
  .home-page.home-page--index .header-index-mobile-display-anchor {
    gap: 3px;
  }

  .home-page.home-page--index .header-index-mobile-display-chevron {
    position: static;
    align-self: center;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--shelf-frame-color, #2c1d17);
    box-shadow: none;
    cursor: pointer;
    line-height: 0;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
  }

  .home-page.home-page--index .header-index-mobile-display-chevron:hover,
  .home-page.home-page--index .header-index-mobile-display-chevron:focus-visible,
  .home-page.home-page--index .header-index-mobile-display-chevron:active {
    background: transparent;
    box-shadow: none;
    outline: none;
  }

  .home-page.home-page--index .header-index-mobile-display-chevron:focus-visible {
    outline: 2px solid #666;
    outline-offset: 2px;
  }

  .home-page.home-page--index .header-index-mobile-display-chevron svg {
    display: block;
    width: 10px;
    height: 10px;
    pointer-events: none;
  }

  .home-page.home-page--index .header-index-mobile-display-flyout {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 2100;
    min-width: 168px;
    max-width: min(240px, calc(100vw - 24px));
    padding: 6px 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  }

  .home-page.home-page--index .header-index-mobile-display-section-label {
    margin: 0;
    padding: 8px 14px 4px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(44, 29, 23, 0.5);
  }

  .home-page.home-page--index .header-index-mobile-display-section-label:not(:first-child) {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .home-page.home-page--index .header-index-mobile-display-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 14px;
    border: none;
    background: none;
    text-align: left;
    font: inherit;
    font-size: 15px;
    line-height: 1.35;
    color: #333;
    cursor: pointer;
  }

  .home-page.home-page--index .header-index-mobile-display-item:hover,
  .home-page.home-page--index .header-index-mobile-display-item:focus-visible {
    background: #f5f5f5;
    outline: none;
  }

  .home-page.home-page--index .header-index-mobile-display-item.is-active {
    font-weight: 600;
    color: var(--shelf-frame-color, #2c1d17);
  }

  .home-page.home-page--index .header-index-mobile-display-menu.is-open .header-index-mobile-display-chevron {
    opacity: 0.75;
  }
}

@media (max-width: 600px) {
  .home-page.home-page--index #works-list-search-toggle {
    display: none !important;
  }

  .home-page.home-page--index .works-index-mobile-search {
    display: block;
    width: 100%;
    max-width: none;
    margin: -8px 0 10px 0;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    box-sizing: border-box;
    text-align: left;
  }

  .home-page.home-page--index .works-index-mobile-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding: 10px 14px 10px 12px;
    border: none;
    border-radius: 10px;
    box-sizing: border-box;
    background: #fff;
    color: #2c1d17;
    box-shadow: 0 1px 2px rgba(44, 29, 23, 0.05);
    transition: box-shadow 0.15s ease, background 0.15s ease;
  }

  .home-page.home-page--index .works-index-mobile-search-field:focus-within {
    background: #fdfdfd;
    box-shadow: 0 2px 5px rgba(44, 29, 23, 0.08);
  }

  .home-page.home-page--index .works-index-mobile-search-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(44, 29, 23, 0.4);
    line-height: 0;
  }

  .home-page.home-page--index .works-index-mobile-search .works-list-search--index-inline {
    flex: 1;
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #2c1d17;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
  }

  .home-page.home-page--index .works-index-mobile-search .works-list-search--index-inline:focus {
    outline: none;
    background: transparent;
    box-shadow: none;
  }

  .home-page.home-page--index .works-index-mobile-search .works-list-search--index-inline::placeholder {
    color: rgba(44, 29, 23, 0.38);
  }

  /* editor タイトル・著者は共通スタイル（エディタ節）へ移動。スマホは一覧検索に近い字サイズ */
  .home-page.home-page--editor .editor-main--writing .editor-field-shell .editor-input,
  .home-page.home-page--editor .editor-main--writing .editor-field-shell select.editor-input,
  .home-page.home-page--editor .editor-main--writing .editor-field-shell .editor-textarea-summary {
    font-size: 0.8rem;
    line-height: 1.4;
  }
}

.works-section {
  max-width: 960px;
  margin: 0 auto;
}

.home-page.home-page--index .works-author-filter-banner {
  margin: 2px 0 12px;
  padding: 0;
  border: none;
  background: transparent;
}

.home-page.home-page--index .works-author-filter-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-page.home-page--index .works-author-filter-banner-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ececec;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9a9a;
  font-weight: 600;
}

.home-page.home-page--index .works-author-filter-banner-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-page.home-page--index .works-author-filter-banner-avatar-inner {
  line-height: 1;
}

.home-page.home-page--index .works-author-filter-banner-text {
  min-width: 0;
}

.home-page.home-page--index .works-author-filter-banner-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
}

.works-list-toolbar {
  margin-bottom: 16px;
}

.works-list-search {
  width: 100%;
  max-width: 320px;
  font: inherit;
  font-size: 0.9rem;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #111;
}

@media (min-width: 600px) {
  .works-list-search {
    max-width: 360px;
  }
}

.restore-static-works-wrap {
  margin-bottom: 12px;
}

.restore-static-works-button {
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 1px;
  color: #333;
}

.restore-static-works-button:hover {
  border-color: #bbb;
  background: #fafafa;
}

.works-group-title {
  grid-column: 1 / -1;
  font-size: 1rem;
  margin: 16px 0 10px;
  font-weight: 600;
}

.works-group-title:first-child {
  margin-top: 0;
}

.works-published-header {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.works-published-header .works-group-title {
  grid-column: auto;
  margin: 16px 0 10px;
}

.works-published-header:first-child .works-group-title {
  margin-top: 0;
}

.works-sort-controls {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.works-sort-button {
  padding: 4px 10px;
  font-size: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 1px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.works-sort-button:hover {
  border-color: #bbb;
  background: #fafafa;
}

.works-sort-button.is-active {
  border-color: #999;
  background: #eee;
}

.works-view-mode-controls {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.works-view-mode-button {
  padding: 4px 10px;
  font-size: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.works-view-mode-button.is-active {
  border-color: #999;
  background: #eee;
}

.works-empty-message {
  grid-column: 1 / -1;
  margin: 4px 0 8px;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

.works-empty-link {
  grid-column: 1 / -1;
  margin: 0 0 16px;
  color: inherit;
  text-decoration: underline;
  font-size: 0.95rem;
}

.works-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.works-list.works-list--shelf {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  align-content: flex-start;
  gap: 3px;
  width: 100%;
  min-width: 0;
  grid-template: none;
}

/* ???????? / ?????????????E??E??E??????????????E?? */
.works-list--shelf .works-published-header,
.works-list--shelf > .works-group-title {
  width: 100%;
  flex-basis: 100%;
  box-sizing: border-box;
}

.works-list--shelf > .works-empty-message,
.works-list--shelf > .works-empty-link {
  width: 100%;
  flex-basis: 100%;
  box-sizing: border-box;
}

.works-list--shelf .work-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 46px;
  min-width: 38px;
  max-width: 54px;
  height: 342px;
  min-height: 300px;
  max-height: 372px;
  border-radius: 3px;
  padding: 4px 3px;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

/* ???E?????? draggable ????E?EnD ????????E???E??E*/
.works-list--shelf .work-card[draggable="true"] {
  cursor: grab;
}

.works-list--shelf .work-card[draggable="true"]:active {
  cursor: grabbing;
}

.works-list--shelf .work-card.is-dragging {
  opacity: 0.88;
  z-index: 2;
}

.works-list--shelf .work-card.is-drop-target {
  outline: 2px dashed #888;
  outline-offset: 2px;
}

.works-list--shelf .work-card.shelf-book--thin {
  width: 40px;
  min-width: 34px;
  max-width: 48px;
}

.works-list--shelf .work-card.shelf-book--normal {
  width: 46px;
  min-width: 38px;
  max-width: 54px;
}

.works-list--shelf .work-card.shelf-book--thick {
  width: 52px;
  min-width: 44px;
  max-width: 60px;
}

.works-list--shelf .work-card.shelf-color--1 {
  --shelf-top-color: #f7f7f4;
  --shelf-bottom-color: #d9dddc;
  background-color: #eceeea;
  border-color: #d8dcda;
  color: #2a3037;
}

.works-list--shelf .work-card.shelf-color--2 {
  --shelf-top-color: #c9d1d4;
  --shelf-bottom-color: #a6b2b7;
  background-color: #bac4c8;
  border-color: #a8b2b7;
  color: #253038;
}

.works-list--shelf .work-card.shelf-color--3 {
  --shelf-top-color: #d7dde0;
  --shelf-bottom-color: #b6c0c5;
  background-color: #c9d1d6;
  border-color: #b6c0c5;
  color: #273038;
}

.works-list--shelf .work-card.shelf-color--4 {
  --shelf-top-color: #dee3e4;
  --shelf-bottom-color: #c2cacf;
  background-color: #d2d9dc;
  border-color: #c0c9ce;
  color: #273038;
}

/* ???E??E??E????E*/
.works-list--shelf .work-card.shelf-color--3:nth-of-type(14n + 3) {
  --shelf-top-color: #e8dcc4;
  --shelf-bottom-color: #c9bba4;
  background-color: #ddd0ba;
  border-color: #cdbfa9;
  color: #2d2a25;
}

/* ?????E???E*/
.works-list--shelf .work-card.shelf-color--4:nth-of-type(17n + 5) {
  --shelf-top-color: #c9cfbf;
  --shelf-bottom-color: #9aa18d;
  background-color: #b8bead;
  border-color: #a9af9f;
  color: #283028;
}

/* ?E???????????E???E??E????E?E*/
.works-list--shelf .work-card.shelf-color--4:nth-of-type(17n + 12) {
  --shelf-top-color: #b47a68;
  --shelf-bottom-color: #8f4632;
  background-color: #9c5f4b;
  border-color: #8a4f3c;
  color: #f3ece6;
}

/* ???E????????????????E????????E?????E*/
.home-page.home-page--index .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 3),
.home-page.home-page--creator .creator-works .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 3) {
  --shelf-top-color: #e8dcc4;
  --shelf-bottom-color: #c9bba4;
  background-color: #ddd0ba;
  border-color: #cdbfa9;
  color: #2d2a25;
}

.home-page.home-page--index .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 8),
.home-page.home-page--creator .creator-works .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 8) {
  --shelf-top-color: #c9cfbf;
  --shelf-bottom-color: #9aa18d;
  background-color: #b8bead;
  border-color: #a9af9f;
  color: #283028;
}

.home-page.home-page--index .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 11),
.home-page.home-page--creator .creator-works .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 11) {
  --shelf-top-color: #b47a68;
  --shelf-bottom-color: #8f4632;
  background-color: #9c5f4b;
  border-color: #8a4f3c;
  color: #f3ece6;
}

.works-list--shelf .work-card.shelf-rank--1 {
  --shelf-top-color: #f2d676;
  --shelf-bottom-color: #c89d31;
  background-color: #ddba56;
  border-color: #b78b24;
  color: #3a2a08;
}

.works-list--shelf .work-card.shelf-rank--2 {
  --shelf-top-color: #ffffff;
  --shelf-bottom-color: #8f959f;
  background-color: #d5dae1;
  border-color: #848c97;
  color: #1f252d;
}

.works-list--shelf .work-card.shelf-rank--3 {
  --shelf-top-color: #eba66d;
  --shelf-bottom-color: #642410;
  background-color: #b45425;
  border-color: #4f1c0c;
  color: #fff1e6;
  box-shadow:
    inset 0 10px 12px -10px rgba(255, 241, 225, 0.52),
    inset 2px 0 4px rgba(74, 32, 16, 0.2),
    inset -1px 0 2px rgba(255, 255, 255, 0.34),
    0 1px 0 rgba(60, 26, 14, 0.28),
    0 2px 4px rgba(60, 26, 14, 0.22),
    0 8px 14px rgba(60, 26, 14, 0.16);
}

.home-page.home-page--index .works-list.works-list--shelf .work-card.top-feed-after-third {
  margin-left: 16px;
}

.home-page.home-page--index .works-list.works-list--shelf .work-card.top-feed-after-tenth {
  margin-left: 16px;
}

.works-list--shelf .work-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.works-list--shelf .work-card-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Noto Serif JP", "Hina Mincho", "Sawarabi Mincho", serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin: 0;
  line-height: 1.3;
  flex: 0 0 55%;
  min-height: 55%;
  max-height: 55%;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.works-list--shelf .work-card-meta {
  display: block;
  flex: 0 0 auto;
  max-height: calc(45% - 4px);
  min-height: 0;
  overflow: hidden;
  margin: auto 0 0;
  transform: translateY(-0.30em);
}

.works-list--shelf .work-card-meta .work-card-author {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: block;
  font-family: "Noto Serif JP", "Hina Mincho", "Sawarabi Mincho", serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: inherit;
  margin: 0;
  line-height: 1.2;
  max-height: 100%;
  overflow: hidden;
}

.works-list--shelf .work-card-meta .work-card-date {
  display: none;
}

.works-list--shelf .work-card-description,
.works-list--shelf .work-card-stats,
.works-list--shelf .work-card-views,
.works-list--shelf .work-card-likes {
  display: none;
}

.works-list--shelf .work-card-actions {
  position: static;
  margin-top: auto;
  padding-top: 4px;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
}

.works-list--shelf .work-card-edit,
.works-list--shelf .work-card-delete {
  padding: 2px 4px;
  font-size: 0.54rem;
  line-height: 1.25;
  color: #888;
  background: #fff;
  border: 1px solid #e2e2e2;
  font-weight: normal;
}

.works-list--shelf .work-card-edit:hover,
.works-list--shelf .work-card-delete:hover {
  color: #555;
  border-color: #ccc;
  background: #fafafa;
}

.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #ededed;
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.work-card:hover {
  border-color: #cfcfcf;
  transform: translateY(-8px);
}

.work-card-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 600;
}

.work-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 12px;
}

.work-card-meta .work-card-author,
.work-card-meta .work-card-date {
  margin: 0;
}

.work-card-meta .work-card-date {
  position: relative;
  padding-left: 0;
}

.work-card-meta .work-card-date::before {
  content: none;
  position: absolute;
  left: 0;
  color: #c8c8c8;
  font-weight: 600;
}

.work-card-author {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: #666;
}

.work-card-description {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #555;
}

.work-card-date {
  font-size: 0.8rem;
  color: #777;
  margin-top: 0;
}

.work-card-views {
  font-size: 0.75rem;
  color: #777;
  margin-top: 4px;
}

.work-card-likes {
  font-size: 0.75rem;
  color: #777;
  margin-top: 4px;
}

.work-card--published {
  position: relative;
}

/* Top フィード 1〜3 位: カード右上の王冠（金・銀・銅） */
.work-card-top-crown {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  width: 17px;
  height: 17px;
  pointer-events: none;
  line-height: 0;
}

.work-card-top-crown svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.22));
}

.work-card-top-crown--gold svg {
  fill: #c9a227;
}

.work-card-top-crown--silver svg {
  fill: #8f96a3;
}

.work-card-top-crown--bronze svg {
  fill: #a66a3a;
}

.works-list--shelf .work-card-top-crown {
  top: 3px;
  right: 2px;
  width: 13px;
  height: 13px;
}

.work-card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
}

.work-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.work-card-edit,
.work-card-delete {
  padding: 4px 8px;
  font-size: 0.75rem;
  line-height: 1.2;
  cursor: pointer;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
}

.work-card-edit:hover,
.work-card-delete:hover {
  border-color: #bbb;
  background: #fafafa;
}

/* ????E? */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.meta {
  flex-shrink: 0;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8e8e8;
  max-width: 100%;
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: #555;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.author {
  margin: 0 0 14px;
  font-size: 0.875rem;
  color: #606060;
  font-weight: 500;
}

.description {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #606060;
  white-space: pre-wrap;
  max-width: 720px;
}

.work-info {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-chip {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #e3e3e3;
  font-size: 0.78rem;
  color: #555;
  background: #fff;
}

.reader-like-actions {
  width: 100%;
  margin-top: 8px;
}

.like-button {
  padding: 6px 10px;
  font-size: 0.85rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.like-button:hover {
  border-color: #bbb;
  background: #fafafa;
}

.like-button:disabled {
  cursor: default;
  opacity: 0.7;
}

/* ??E?????UI */
.paged-reader-section {
  padding: 20px 24px 28px;
  border-bottom: 1px solid #ececec;
}

.paged-reader-toolbar {
  max-width: none;
  width: 100%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-nav-button {
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #111;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
}

.page-nav-button:hover:not(:disabled) {
  border-color: #bdbdbd;
}

.page-nav-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.page-indicator {
  font-size: 0.9rem;
  color: #444;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.paged-reader-viewport {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.reader-stack {
  position: relative;
  z-index: 1;
  height: 72vh;
  min-height: 520px;
}

.reader-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  background: transparent;
  z-index: 5;
  pointer-events: auto;
}

.reader-hit-next {
  left: 0;
}

.reader-hit-prev {
  right: 0;
}

.reader-paper {
  position: relative;
  height: 100%;
  border: 1px solid #ececec;
  background: #fff;
  padding: 30px 22px;
  overflow: hidden;
}

.reader-paper-flow {
  height: 100%;
  width: max-content;
  min-width: 100%;
  white-space: pre-wrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "MS PMincho", serif;
  font-size: 1.125rem;
  line-height: 2.06;
  color: #1a1a1a;
  line-break: strict;
  word-break: normal;
  overflow: hidden;

  column-gap: 0;
  column-fill: auto;

  will-change: transform;
  transition: transform 0.28s ease;
}

.reader-paper-flow p {
  margin: 0;
}

.reader-paper-flow p + p {
  margin-block-start: 0.78em;
}

.reader-paper-flow .reader-paragraph {
  text-indent: 0;
}

.reader-paper-flow .reader-paragraph.reader-paragraph--indent {
  text-indent: 1em;
}

.bottom-panel {
  display: none;
}

/* ????E*/
.comments-section {
  border-top: 1px solid #ececec;
  padding: 24px 20px 48px;
  background: #fff;
}

.comments-inner {
  max-width: 960px;
  margin: 0 auto;
}

.comments-title {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 600;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.comment-input {
  width: 100%;
  border: 1px solid #dddddd;
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  color: #111;
  outline: none;
}

.comment-input:focus {
  border-color: #b8b8b8;
}

.comment-name {
  max-width: 240px;
}

.comment-text {
  min-height: 110px;
  resize: vertical;
  line-height: 1.7;
}

.comment-button {
  align-self: flex-start;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  padding: 10px 18px;
  font: inherit;
  cursor: pointer;
}

.comment-button:hover {
  opacity: 0.92;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  border-top: 1px solid #efefef;
  padding-top: 16px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-author {
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
}

.comment-date {
  font-size: 0.78rem;
  color: #777;
}

.comment-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: #333;
  white-space: pre-wrap;
}

.empty-comments {
  color: #777;
  font-size: 0.9rem;
}

/* ??????E*/
@media (max-width: 600px) {
  .home-page {
    padding: 24px 16px 40px;
  }

  .home-logo {
    font-size: 1.5rem;
  }

  .works-list {
    grid-template-columns: 1fr;
  }

  .meta {
    padding: 16px 16px 12px;
  }

  .title {
    font-size: 1.1rem;
  }

  .paged-reader-section {
    padding: 16px 12px 20px;
  }

  .paged-reader-toolbar {
    margin-bottom: 12px;
  }

  .page-nav-button {
    padding: 9px 12px;
    font-size: 0.9rem;
  }

  .page-indicator {
    font-size: 0.85rem;
  }

  .reader-paper {
    height: auto;
    min-height: 0;
    padding: 20px 14px;
  }

  .reader-stack {
    height: 62vh;
    min-height: 420px;
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
  }

  .bottom-panel {
    display: block;
  }

  .reader-paper-flow {
    font-size: 1rem;
    line-height: 1.94;
  }

  .comments-section {
    padding: 20px 16px 36px;
  }

  .comment-name {
    max-width: 100%;
  }
}

/* ???E??E?????E?E JS ????? */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #fff;
  color: #0f0f0f;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ????E? */
.home-page {
  min-height: 100vh;
  padding: 32px 20px 56px;
}

/* ???? index.html ???E?Ehome-page ? creator ?????E?????????E*/
.home-page.home-page--index {
  font-family: "Playfair Display", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "MS Mincho", serif;
}

.home-header {
  max-width: 960px;
  margin: 0 auto 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ececec;
}

.home-logo {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-subtitle {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

.works-section {
  max-width: 960px;
  margin: 0 auto;
}

.restore-static-works-wrap {
  margin-bottom: 12px;
}

.restore-static-works-button {
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
}

.restore-static-works-button:hover {
  border-color: #bbb;
  background: #fafafa;
}

.works-group-title {
  grid-column: 1 / -1;
  font-size: 1rem;
  margin: 16px 0 10px;
  font-weight: 600;
}

.works-group-title:first-child {
  margin-top: 0;
}

.works-published-header {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.works-published-header .works-group-title {
  grid-column: auto;
  margin: 16px 0 10px;
}

.works-published-header:first-child .works-group-title {
  margin-top: 0;
}

.works-sort-controls {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.works-sort-button {
  padding: 4px 10px;
  font-size: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.works-sort-button:hover {
  border-color: #bbb;
  background: #fafafa;
}

.works-sort-button.is-active {
  border-color: #999;
  background: #eee;
}

.works-view-mode-controls {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.works-view-mode-button {
  padding: 4px 10px;
  font-size: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.works-view-mode-button.is-active {
  border-color: #999;
  background: #eee;
}

.works-empty-message {
  grid-column: 1 / -1;
  margin: 4px 0 8px;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

.works-empty-link {
  grid-column: 1 / -1;
  margin: 0 0 16px;
  color: inherit;
  text-decoration: underline;
  font-size: 0.95rem;
}

.works-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.works-list.works-list--shelf {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  align-content: flex-start;
  gap: 3px;
  width: 100%;
  min-width: 0;
  grid-template: none;
}

/* ???????? / ?????????????E??E??E??????????????E?? */
.works-list--shelf .works-published-header,
.works-list--shelf > .works-group-title {
  width: 100%;
  flex-basis: 100%;
  box-sizing: border-box;
}

.works-list--shelf > .works-empty-message,
.works-list--shelf > .works-empty-link {
  width: 100%;
  flex-basis: 100%;
  box-sizing: border-box;
}

.works-list--shelf .work-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 46px;
  min-width: 38px;
  max-width: 54px;
  height: 342px;
  min-height: 300px;
  max-height: 372px;
  border-radius: 3px;
  padding: 4px 3px;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

/* ???E?????? draggable ????E?EnD ????????E???E??E*/
.works-list--shelf .work-card[draggable="true"] {
  cursor: grab;
}

.works-list--shelf .work-card[draggable="true"]:active {
  cursor: grabbing;
}

.works-list--shelf .work-card.is-dragging {
  opacity: 0.88;
  z-index: 2;
}

.works-list--shelf .work-card.is-drop-target {
  outline: 2px dashed #888;
  outline-offset: 2px;
}

.works-list--shelf .work-card.shelf-book--thin {
  width: 40px;
  min-width: 34px;
  max-width: 48px;
}

.works-list--shelf .work-card.shelf-book--normal {
  width: 46px;
  min-width: 38px;
  max-width: 54px;
}

.works-list--shelf .work-card.shelf-book--thick {
  width: 52px;
  min-width: 44px;
  max-width: 60px;
}

.works-list--shelf .work-card.shelf-color--1 {
  --shelf-top-color: #f7f7f4;
  --shelf-bottom-color: #d9dddc;
  background-color: #eceeea;
  border-color: #d8dcda;
  color: #2a3037;
}

.works-list--shelf .work-card.shelf-color--2 {
  --shelf-top-color: #c9d1d4;
  --shelf-bottom-color: #a6b2b7;
  background-color: #bac4c8;
  border-color: #a8b2b7;
  color: #253038;
}

.works-list--shelf .work-card.shelf-color--3 {
  --shelf-top-color: #d7dde0;
  --shelf-bottom-color: #b6c0c5;
  background-color: #c9d1d6;
  border-color: #b6c0c5;
  color: #273038;
}

.works-list--shelf .work-card.shelf-color--4 {
  --shelf-top-color: #dee3e4;
  --shelf-bottom-color: #c2cacf;
  background-color: #d2d9dc;
  border-color: #c0c9ce;
  color: #273038;
}

/* ???E??E??E????E*/
.works-list--shelf .work-card.shelf-color--3:nth-of-type(14n + 3) {
  --shelf-top-color: #e8dcc4;
  --shelf-bottom-color: #c9bba4;
  background-color: #ddd0ba;
  border-color: #cdbfa9;
  color: #2d2a25;
}

/* ?????E???E*/
.works-list--shelf .work-card.shelf-color--4:nth-of-type(17n + 5) {
  --shelf-top-color: #c9cfbf;
  --shelf-bottom-color: #9aa18d;
  background-color: #b8bead;
  border-color: #a9af9f;
  color: #283028;
}

/* ?E???????????E???E??E????E?E*/
.works-list--shelf .work-card.shelf-color--4:nth-of-type(17n + 12) {
  --shelf-top-color: #b47a68;
  --shelf-bottom-color: #8f4632;
  background-color: #9c5f4b;
  border-color: #8a4f3c;
  color: #f3ece6;
}

/* ???E????????????????E????????E?????E*/
.home-page.home-page--index .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 3),
.home-page.home-page--creator .creator-works .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 3) {
  --shelf-top-color: #e8dcc4;
  --shelf-bottom-color: #c9bba4;
  background-color: #ddd0ba;
  border-color: #cdbfa9;
  color: #2d2a25;
}

.home-page.home-page--index .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 8),
.home-page.home-page--creator .creator-works .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 8) {
  --shelf-top-color: #c9cfbf;
  --shelf-bottom-color: #9aa18d;
  background-color: #b8bead;
  border-color: #a9af9f;
  color: #283028;
}

.home-page.home-page--index .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 11),
.home-page.home-page--creator .creator-works .works-list.works-list--shelf .work-card[data-work-id]:nth-of-type(12n + 11) {
  --shelf-top-color: #b47a68;
  --shelf-bottom-color: #8f4632;
  background-color: #9c5f4b;
  border-color: #8a4f3c;
  color: #f3ece6;
}

.works-list--shelf .work-card.shelf-rank--1 {
  --shelf-top-color: #f2d676;
  --shelf-bottom-color: #c89d31;
  background-color: #ddba56;
  border-color: #b78b24;
  color: #3a2a08;
}

.works-list--shelf .work-card.shelf-rank--2 {
  --shelf-top-color: #ffffff;
  --shelf-bottom-color: #8f959f;
  background-color: #d5dae1;
  border-color: #848c97;
  color: #1f252d;
}

.works-list--shelf .work-card.shelf-rank--3 {
  --shelf-top-color: #eba66d;
  --shelf-bottom-color: #642410;
  background-color: #b45425;
  border-color: #4f1c0c;
  color: #fff1e6;
  box-shadow:
    inset 0 10px 12px -10px rgba(255, 241, 225, 0.52),
    inset 2px 0 4px rgba(74, 32, 16, 0.2),
    inset -1px 0 2px rgba(255, 255, 255, 0.34),
    0 1px 0 rgba(60, 26, 14, 0.28),
    0 2px 4px rgba(60, 26, 14, 0.22),
    0 8px 14px rgba(60, 26, 14, 0.16);
}

.home-page.home-page--index .works-list.works-list--shelf .work-card.top-feed-after-third {
  margin-left: 16px;
}

.home-page.home-page--index .works-list.works-list--shelf .work-card.top-feed-after-tenth {
  margin-left: 16px;
}

.works-list--shelf .work-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.works-list--shelf .work-card-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Noto Serif JP", "Hina Mincho", "Sawarabi Mincho", serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin: 0;
  line-height: 1.3;
  flex: 0 0 55%;
  min-height: 55%;
  max-height: 55%;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.works-list--shelf .work-card-meta {
  display: block;
  flex: 0 0 auto;
  max-height: calc(45% - 4px);
  min-height: 0;
  overflow: hidden;
  margin: auto 0 0;
  transform: translateY(-0.30em);
}

.works-list--shelf .work-card-meta .work-card-author {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: block;
  font-family: "Noto Serif JP", "Hina Mincho", "Sawarabi Mincho", serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: inherit;
  margin: 0;
  line-height: 1.2;
  max-height: 100%;
  overflow: hidden;
}

.works-list--shelf .work-card-meta .work-card-date {
  display: none;
}

.works-list--shelf .work-card-description,
.works-list--shelf .work-card-stats,
.works-list--shelf .work-card-views,
.works-list--shelf .work-card-likes {
  display: none;
}

.works-list--shelf .work-card-actions {
  position: static;
  margin-top: auto;
  padding-top: 4px;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
}

.works-list--shelf .work-card-edit,
.works-list--shelf .work-card-delete {
  padding: 2px 4px;
  font-size: 0.54rem;
  line-height: 1.25;
  color: #888;
  background: #fff;
  border: 1px solid #e2e2e2;
  font-weight: normal;
}

.works-list--shelf .work-card-edit:hover,
.works-list--shelf .work-card-delete:hover {
  color: #555;
  border-color: #ccc;
  background: #fafafa;
}

.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #ededed;
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.work-card:hover {
  border-color: #cfcfcf;
  transform: translateY(-8px);
}

.work-card-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 600;
}

.work-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 12px;
}

.work-card-meta .work-card-author,
.work-card-meta .work-card-date {
  margin: 0;
}

.work-card-meta .work-card-date {
  position: relative;
  padding-left: 0;
}

.work-card-meta .work-card-date::before {
  content: none;
  position: absolute;
  left: 0;
  color: #c8c8c8;
  font-weight: 600;
}

.work-card-author {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: #666;
}

.work-card-description {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #555;
}

.work-card-date {
  font-size: 0.8rem;
  color: #777;
  margin-top: 0;
}

.work-card-views {
  font-size: 0.75rem;
  color: #777;
  margin-top: 4px;
}

.work-card-likes {
  font-size: 0.75rem;
  color: #777;
  margin-top: 4px;
}

.work-card--published {
  position: relative;
}

/* Top フィード 1〜3 位: カード右上の王冠（金・銀・銅） */
.work-card-top-crown {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  width: 17px;
  height: 17px;
  pointer-events: none;
  line-height: 0;
}

.work-card-top-crown svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.22));
}

.work-card-top-crown--gold svg {
  fill: #c9a227;
}

.work-card-top-crown--silver svg {
  fill: #8f96a3;
}

.work-card-top-crown--bronze svg {
  fill: #a66a3a;
}

.works-list--shelf .work-card-top-crown {
  top: 3px;
  right: 2px;
  width: 13px;
  height: 13px;
}

.work-card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
}

.work-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.work-card-edit,
.work-card-delete {
  padding: 4px 8px;
  font-size: 0.75rem;
  line-height: 1.2;
  cursor: pointer;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
}

.work-card-edit:hover,
.work-card-delete:hover {
  border-color: #bbb;
  background: #fafafa;
}

/* ????E? */
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  --reader-font-size: 1.125rem;
  --reader-line-height: 2.06;
  --reader-paper-padding-y: 30px;
  --reader-paper-padding-x: 22px;
}

.meta {
  flex-shrink: 0;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8e8e8;
  max-width: 100%;
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: #555;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.author {
  margin: 0 0 14px;
  font-size: 0.875rem;
  color: #606060;
  font-weight: 500;
}

.description {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #606060;
  white-space: pre-wrap;
  max-width: 720px;
}

.work-info {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-chip {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #e3e3e3;
  font-size: 0.78rem;
  color: #555;
  background: #fff;
}

.reader-like-actions {
  width: 100%;
  margin-top: 8px;
}

.like-button {
  padding: 6px 10px;
  font-size: 0.85rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.like-button:hover {
  border-color: #bbb;
  background: #fafafa;
}

.like-button:disabled {
  cursor: default;
  opacity: 0.7;
}

/* ??E?????UI */
.paged-reader-section {
  padding: 20px 24px 28px;
  border-bottom: 1px solid #ececec;
}

.paged-reader-toolbar {
  max-width: none;
  width: 100%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.font-size-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e2e2;
  background: #fff;
}

.font-size-button {
  border: 0;
  border-right: 1px solid #e2e2e2;
  background: #fff;
  color: #555;
  min-width: 38px;
  height: 36px;
  padding: 0 10px;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.font-size-button:last-child {
  border-right: 0;
}

.font-size-button.is-active {
  color: #111;
  background: #f6f6f6;
}

.reader-writing-mode-button {
  min-width: 56px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.page-nav-button {
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #111;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
}

.page-nav-button:hover:not(:disabled) {
  border-color: #bdbdbd;
}

.page-nav-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.page-indicator {
  font-size: 0.9rem;
  color: #444;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.paged-reader-viewport {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.reader-stack {
  height: 72vh;
  min-height: 520px;
}

.reader-paper {
  position: relative;
  height: 100%;
  border: 1px solid #ececec;
  background: #fff;
  padding: var(--reader-paper-padding-y) var(--reader-paper-padding-x);
  overflow: hidden;
}

#paged-reader-viewport .reader-paper {
  background: rgb(248,243,236);
}

.reader-paper-flow {
  height: 100%;
  width: max-content;
  min-width: 100%;
  /* ????? logical margin ????????????E??????????E*/
  margin-left: auto;
  margin-right: 0;
  white-space: pre-wrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "MS PMincho", serif;
  font-size: var(--reader-font-size);
  line-height: var(--reader-line-height);
  color: #1a1a1a;
  line-break: strict;
  word-break: normal;
  overflow: hidden;

  column-gap: 0;
  column-fill: auto;

  will-change: transform;
  transition: transform 0.28s ease;
}

.reader-paper-flow p {
  margin: 0;
}

.reader-paper-flow p + p {
  margin-block-start: 0.78em;
}

.reader-paper-flow .reader-paragraph {
  text-indent: 0;
}

.reader-paper-flow .reader-paragraph.reader-paragraph--indent {
  text-indent: 1em;
}

.bottom-panel {
  display: none;
}

.reader-ui-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: 1px solid #d9d9d9;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

/* ???: ??????????E?????????????E?????E????????E?????????? */
.page.ui-hidden .meta,
.page.ui-hidden .comments-section {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page[data-font-size="small"] {
  --reader-font-size: 1rem;
  --reader-line-height: 1.96;
}

.page[data-font-size="medium"] {
  --reader-font-size: 1.125rem;
  --reader-line-height: 2.06;
}

.page[data-font-size="large"] {
  --reader-font-size: 1.28rem;
  --reader-line-height: 2.1;
}

/* ????E*/
.comments-section {
  border-top: 1px solid #ececec;
  padding: 24px 20px 48px;
  background: #fff;
}

.comments-inner {
  max-width: 960px;
  margin: 0 auto;
}

.comments-title {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 600;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.comment-input {
  width: 100%;
  border: 1px solid #dddddd;
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  color: #111;
  outline: none;
}

.comment-input:focus {
  border-color: #b8b8b8;
}

.comment-name {
  max-width: 240px;
}

.comment-text {
  min-height: 110px;
  resize: vertical;
  line-height: 1.7;
}

.comment-button {
  align-self: flex-start;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  padding: 10px 18px;
  font: inherit;
  cursor: pointer;
}

.comment-button:hover {
  opacity: 0.92;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  border-top: 1px solid #efefef;
  padding-top: 16px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-author {
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
}

.comment-date {
  font-size: 0.78rem;
  color: #777;
}

.comment-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: #333;
  white-space: pre-wrap;
}

.empty-comments {
  color: #777;
  font-size: 0.9rem;
}

/* ??????E*/
@media (max-width: 600px) {
  .home-page {
    padding: 24px 16px 40px;
  }

  .home-logo {
    font-size: 1.5rem;
  }

  .works-list {
    grid-template-columns: 1fr;
  }

  .meta {
    padding: 16px 16px 12px;
  }

  .title {
    font-size: 1.1rem;
  }

  .paged-reader-section {
    padding: 16px 12px 20px;
  }

  .paged-reader-toolbar {
    margin-bottom: 12px;
  }

  .page-nav-button {
    padding: 9px 12px;
    font-size: 0.85rem;
  }

  .page-indicator {
    font-size: 0.85rem;
  }

  .reader-paper {
    height: auto;
    min-height: 0;
    --reader-paper-padding-y: 22px;
    --reader-paper-padding-x: 15px;
  }

  .reader-stack {
    height: 62vh;
    min-height: 420px;
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
  }

  .bottom-panel {
    display: block;
  }

  .reader-paper-flow {
    letter-spacing: 0.012em;
  }

  .comments-section {
    padding: 20px 16px 36px;
  }

  .comment-name {
    max-width: 100%;
  }

  .font-size-controls {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .font-size-button {
    flex: 1;
    height: 40px;
    font-size: 0.92rem;
  }

  .reader-ui-toggle {
    width: 48px;
    height: 48px;
    right: 12px;
    bottom: 12px;
  }

  .page[data-font-size="small"] {
    --reader-font-size: 0.96rem;
    --reader-line-height: 1.91;
  }

  .page[data-font-size="medium"] {
    --reader-font-size: 1.06rem;
    --reader-line-height: 1.99;
  }

  .page[data-font-size="large"] {
    --reader-font-size: 1.18rem;
    --reader-line-height: 2.06;
  }

  .editor-page[data-font-size="small"] {
    --reader-font-size: 0.96rem;
    --reader-line-height: 1.91;
  }

  .editor-page[data-font-size="medium"] {
    --reader-font-size: 1.06rem;
    --reader-line-height: 1.99;
  }

  .editor-page[data-font-size="large"] {
    --reader-font-size: 1.18rem;
    --reader-line-height: 2.06;
  }
}

/* ??E????E????????????????????????E??????????E?ES ???E???E?E*/
#paged-reader-viewport {
  perspective: 1100px;
  perspective-origin: 50% 50%;
}

#paged-reader-viewport .reader-stack {
  transition: opacity 0.35s ease-out, transform 0.35s ease, filter 0.35s ease;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
}

#paged-reader-viewport.reader-page-nav-dim.reader-page-nav--next .reader-stack {
  transform-origin: 100% 50%;
  opacity: 0.94;
  transform: translateZ(20px) scale(1.008) rotateY(-4deg);
  filter: drop-shadow(-8px 14px 22px rgba(0, 0, 0, 0.13));
}

#paged-reader-viewport.reader-page-nav-dim.reader-page-nav--prev .reader-stack {
  transform-origin: 0% 50%;
  opacity: 0.94;
  transform: translateZ(20px) scale(1.008) rotateY(4deg);
  filter: drop-shadow(8px 14px 22px rgba(0, 0, 0, 0.13));
}

@media (prefers-reduced-motion: reduce) {
  #paged-reader-viewport .reader-stack {
    transition: none;
  }
  #paged-reader-viewport.reader-page-nav-dim.reader-page-nav--next .reader-stack,
  #paged-reader-viewport.reader-page-nav-dim.reader-page-nav--prev .reader-stack {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ???E??E?????E?E JS ????? */

/* ???E?????E?E*/
.editor-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  --reader-font-size: 1.125rem;
  --reader-line-height: 2.06;
  --reader-paper-padding-y: 30px;
  --reader-paper-padding-x: 22px;
}

/* 本文・プレビュー: 読書ページの .page[data-font-size] と同じトーンで可変（localStorage キー共用） */
.editor-page[data-font-size="small"] {
  --reader-font-size: 1rem;
  --reader-line-height: 1.96;
}

.editor-page[data-font-size="medium"] {
  --reader-font-size: 1.125rem;
  --reader-line-height: 2.06;
}

.editor-page[data-font-size="large"] {
  --reader-font-size: 1.28rem;
  --reader-line-height: 2.1;
}

/* column flex 下で main の min-width:auto が縦書き max-content に引っ張られて横に膨らむのを防ぐ。
 * overflow-x は main にかけない（本文だけ editor-body-field でクリップ。main にかけるとツールバー右の投稿・ページ送りまで欠ける） */
.home-page.home-page--editor .editor-page > main.editor-main--writing {
  min-width: 0;
  max-width: 100%;
}

.editor-meta-heading-title-wrap {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(58%, 28rem);
}

.home-page.home-page--editor .editor-meta-title-input {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 2px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #2c1d17;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  resize: none;
  vertical-align: top;
  min-height: 1.4em;
  min-height: calc(1lh + 2px);
  max-height: min(7.5em, 30vh);
  overflow-y: auto;
  field-sizing: content;
}

.home-page.home-page--editor .editor-meta-title-input::placeholder {
  color: rgba(44, 29, 23, 0.42);
  font-weight: 500;
}

.home-page.home-page--editor .editor-meta-title-input:focus,
.home-page.home-page--editor .editor-meta-title-input:focus-visible {
  outline: none;
  box-shadow: none;
  border: none;
}

.editor-meta-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.editor-meta-heading-row .editor-meta-fold-toggle {
  cursor: pointer;
}

.editor-meta-heading-side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  transform: translateX(-10px);
}

/* work-fields は meta の外（main 内）にあるので .editor-page で畳む */
.editor-page.is-work-fields-folded #editor-work-fields-card {
  display: none;
}

.editor-toolbar-primary-fold-anchor {
  display: none;
}

.editor-meta.is-work-fields-folded {
  padding-bottom: 10px;
}

.home-page.home-page--editor .editor-meta:not(.is-work-fields-folded) .reader-meta-fold-icon {
  transform: rotate(180deg);
}

/* 縦書き本文（width: max-content 相当）の横はみ出しは本文ブロック内だけでクリップする。
 * .editor-page 全体にかけると、拡大表示などでツールバー右端のページ送りまで欠けて操作不能になる。 */
.home-page.home-page--editor .editor-body-field {
  overflow-x: hidden;
  min-width: 0;
}

/* editor.html 全体 — レイアウトは従来どおり（flex カラム化はしない） */
.home-page.home-page--editor {
  min-height: 100vh;
  padding: 0 20px 56px;
  font-family: "Playfair Display", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "MS Mincho", serif;
  --creator-wood-image: url("assets/shelf-grain-frame.png");
}

/* 紹介文・ジャンルほか作品情報: 一覧検索と同型のシェル（アイコンなし）。折りたたみ対象は editor-details-grid のみ */
.home-page.home-page--editor .editor-field-shell {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 10px 14px 10px 12px;
  border: none;
  border-radius: 10px;
  box-sizing: border-box;
  background: #fff;
  color: #2c1d17;
  box-shadow: 0 1px 2px rgba(44, 29, 23, 0.05);
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.home-page.home-page--editor .editor-field-shell--textarea {
  align-items: stretch;
}

.home-page.home-page--editor .editor-field-shell:focus-within {
  background: #fdfdfd;
  box-shadow: 0 2px 5px rgba(44, 29, 23, 0.08);
}

.home-page.home-page--editor .editor-field-shell .editor-input {
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.45;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #2c1d17;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.home-page.home-page--editor .editor-field-shell select.editor-input {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  margin: 0;
  /* ネイティブ select の表示文が左に寄りすぎないよう、文頭側に余白を確保 */
  padding: 0 8px 0 10px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.45;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #2c1d17;
  box-shadow: none;
}

.home-page.home-page--editor .editor-field-shell .editor-input:focus {
  outline: none;
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}

.home-page.home-page--editor .editor-field-shell select.editor-input:focus {
  outline: none;
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}

.home-page.home-page--editor .editor-field-shell .editor-input::placeholder {
  color: rgba(44, 29, 23, 0.38);
}

.home-page.home-page--editor .editor-field-shell .editor-textarea-summary {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.45;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #2c1d17;
  box-shadow: none;
  resize: vertical;
  min-height: 2.6em;
  max-height: 4.8em;
}

.home-page.home-page--editor .editor-field-shell .editor-textarea-summary:focus {
  outline: none;
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}

.home-page.home-page--editor .editor-field-shell .editor-textarea-summary::placeholder {
  color: rgba(44, 29, 23, 0.38);
}

.editor-main {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 20px 44px;
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 18px;
  align-items: start;
}

.editor-main--writing {
  position: relative;
  max-width: none;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-top: 10px;
}

.editor-form {
  border: 1px solid #ececec;
  background: #fff;
  padding: 16px;
}

.editor-main--writing .editor-form {
  border: none;
  background: transparent;
  padding: 0;
  min-width: 0;
  max-width: 100%;
}

.editor-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 16px;
  border: none;
  background: transparent;
}

.editor-main--writing .editor-details-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 10px 12px;
  min-width: 0;
}

/* 6 列時: grid 子の min-width:auto や select の intrinsic 幅で横に溢れないようにする */
.editor-main--writing .editor-work-fields-card {
  min-width: 0;
  max-width: 100%;
}

.editor-main--writing .editor-details-grid > .editor-field {
  min-width: 0;
}

.editor-main--writing .editor-details-grid .editor-field-shell,
.editor-main--writing .editor-details-grid .editor-field-shell--textarea {
  min-width: 0;
}

.editor-main--writing .editor-details-grid .editor-input,
.editor-main--writing .editor-details-grid select.editor-input,
.editor-main--writing .editor-details-grid .editor-textarea-summary {
  min-width: 0;
  max-width: 100%;
}

.editor-details-grid .editor-field {
  margin-bottom: 0;
}

.editor-main--writing .editor-details-grid .editor-field {
  gap: 4px;
}

.editor-field--wide {
  grid-column: span 2;
}

.editor-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.editor-label {
  font-size: 0.88rem;
  color: #444;
}

.editor-main--writing .editor-label {
  font-size: 0.76rem;
}

.editor-input,
.editor-textarea,
select.editor-input {
  width: 100%;
  border: 1px solid #dddddd;
  background: #fff;
  padding: 12px 12px;
  font: inherit;
  color: #111;
  outline: none;
}

.editor-main--writing .editor-input,
.editor-main--writing .editor-textarea-summary,
.editor-main--writing select.editor-input {
  padding: 7px 9px;
  font-size: 0.86rem;
}

.editor-input:focus,
.editor-textarea:focus,
select.editor-input:focus {
  border-color: #b8b8b8;
}

select.editor-input {
  cursor: pointer;
}

.editor-textarea {
  min-height: 42vh;
  resize: vertical;
  line-height: 1.7;
}

.editor-textarea-summary {
  min-height: 6.2em;
  max-height: 12em;
}

.editor-main--writing .editor-textarea-summary {
  min-height: 2.6em;
  max-height: 4.8em;
  line-height: 1.45;
}

.editor-ruby-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.editor-main--writing .editor-ruby-tools {
  gap: 4px;
  align-items: stretch;
  /* button / select で同一の外寸高さ（ネイティブ select の余白差を潰す） */
  --editor-ruby-toolbar-h: 2.5rem;
}

.editor-ruby-input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 9px 10px;
}

.editor-ruby-open-button {
  flex: 0 0 auto;
  padding: 0.56em 12px;
}

.editor-toolbar-font-field {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

.editor-toolbar-font-select {
  min-width: 0;
  width: auto;
  max-width: min(220px, 52vw);
}

.editor-main--writing .editor-ruby-tools .editor-ruby-open-button.editor-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--editor-ruby-toolbar-h);
  min-height: var(--editor-ruby-toolbar-h);
  max-height: var(--editor-ruby-toolbar-h);
  padding: 0 12px;
  line-height: 1;
}

/* ネイティブ select の余計な高さを抑え、ルビボタンと同一外寸にする */
.editor-main--writing .editor-ruby-tools select.editor-toolbar-font-select {
  margin: 0;
  box-sizing: border-box;
  height: var(--editor-ruby-toolbar-h);
  min-height: var(--editor-ruby-toolbar-h);
  max-height: var(--editor-ruby-toolbar-h);
  padding: 0 26px 0 12px;
  font-size: clamp(0.66rem, 0.32rem + 1.05vw, 0.875rem);
  line-height: var(--editor-ruby-toolbar-h);
  border: 1px solid #d8d8d8;
  border-radius: 0;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23444' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.editor-ruby-hint {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
}

.editor-ruby-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.26);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.editor-ruby-dialog-backdrop[hidden] {
  display: none !important;
}

.editor-ruby-dialog {
  width: min(560px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid #dcdcdc;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  padding: 14px;
}

.editor-ruby-dialog-title {
  margin: 0 0 10px;
  font-size: 1rem;
}

.editor-ruby-dialog-grid {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px 10px;
  align-items: center;
}

.editor-ruby-candidates {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
}

.editor-ruby-candidate-button {
  border: 1px solid #d2d2d2;
  background: #fff;
  color: #333;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.editor-ruby-candidate-button:hover {
  background: #fafafa;
}

.editor-ruby-dialog-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* 本文編集ツールバー: 左＝字サイズ→フォント→ルビ・縦中横、右＝投稿＋下書きメニュー→ページ送り */
.editor-writing-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  padding: 8px 10px;
  border: none;
  background: transparent;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 30;
  /* 横スクロールは primary 側のみ。全体に overflow-x をかけると下向きメニューがクリップされる */
  overflow: visible;
}

.editor-writing-toolbar-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.editor-writing-toolbar-primary .editor-body-font-size-controls {
  border: none;
  background: transparent;
  gap: 10px;
  flex-shrink: 0;
}

.editor-writing-toolbar-primary .editor-body-font-size-controls .font-size-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-right: none;
  background: transparent;
  min-width: 36px;
  color: #a8a8a8;
}

.editor-writing-toolbar-primary .editor-body-font-size-controls .font-size-button:not(.is-active) {
  opacity: 0.78;
}

.editor-writing-toolbar-primary .editor-body-font-size-controls .font-size-button.is-active {
  background: transparent;
  color: #a8a8a8;
  opacity: 1;
}

.editor-writing-toolbar-primary .editor-body-font-size-controls .font-size-button:hover {
  opacity: 1;
}

.editor-writing-toolbar-spacer {
  flex: 1 1 auto;
  min-width: 6px;
  height: 1px;
}

.editor-writing-toolbar-end {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 31;
  overflow: visible;
  /* 更新・ページ送りのみやや右寄せ（ツールバー左側の字サイズ等は動かさない） */
  transform: translateX(8px);
}

.editor-actions.editor-actions--publish-split {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  overflow: visible;
  justify-content: flex-end;
  flex-wrap: nowrap;
  scrollbar-gutter: auto;
}

.editor-publish-split {
  display: inline-flex;
  align-items: stretch;
  position: relative;
}

.editor-publish-split__main {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.editor-publish-split__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0 8px;
  margin: 0;
  border: 1px solid rgba(44, 29, 23, 0.38);
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  background-color: #2c1d17;
  background-image:
    var(--creator-wood-image),
    linear-gradient(180deg, rgba(44, 29, 23, 0.12) 0%, rgba(44, 29, 23, 0.24) 100%);
  background-size: auto 120%, 100% 100%;
  background-repeat: repeat-x, no-repeat;
  background-position: left center, center center;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  box-sizing: border-box;
}

.editor-publish-split__toggle:hover:not(:disabled) {
  border-color: rgba(44, 29, 23, 0.5);
  background-color: #3a2720;
}

.editor-publish-split__toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.editor-publish-split__chevron {
  display: block;
}

.editor-publish-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 11.5rem;
  padding: 4px 0;
  margin: 0;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  box-sizing: border-box;
}

.editor-publish-menu[hidden] {
  display: none !important;
}

.editor-publish-menu__item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.88rem;
  color: #222;
  cursor: pointer;
}

.editor-publish-menu__item:hover {
  background: #f5f5f5;
}

.editor-publish-menu__item--danger:hover {
  background: #fceded;
}

.editor-publish-menu__item--danger {
  color: #8b2d1b;
}

/* 本文ページ送り（アイコンのみ。表示は JS）。ツールバー内で投稿ボタンに幅を取られても潰れないようにする */
.editor-body-pager {
  display: none;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin: 0;
  flex-shrink: 0;
}

.editor-body-pager .page-nav-button {
  flex-shrink: 0;
}

.editor-count {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.82rem;
  color: #666;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.editor-count-sep {
  color: #b0b0b0;
}

.editor-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(6px, 1.4vw, 10px);
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.editor-body-field {
  gap: 8px;
  margin-bottom: 0;
}

.editor-body-field > .editor-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.editor-writing-viewport.paged-reader-viewport {
  position: relative;
  /* max-content 本文で flex 子の min-width:auto から親が横に膨らむと、ページ分割の計測幅が画面より大きくなり横スクロールが増える */
  max-width: 100%;
  min-width: 0;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  overflow-x: clip;
  background: #fff;
  cursor: text;
  -webkit-tap-highlight-color: transparent;
}

/* 作品情報の開閉にかかわらず本文スタックの縦は折りたたみ時と同じ（開いた分はページ下へスクロールで収める） */
.home-page.home-page--editor .editor-writing-stack.reader-stack {
  height: min(72vh, calc(100dvh - 250px));
  min-height: 360px;
  min-width: 0;
  max-width: 100%;
}

.editor-writing-paper.reader-paper {
  position: relative;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #ececec;
  background: rgb(248,243,236);
  padding: var(--reader-paper-padding-y) var(--reader-paper-padding-x);
  overflow: hidden;
  overflow-x: clip;
  /* リフロー範囲を紙面内に限定し、毎打鍵のレイアウト計算コストを抑える */
  contain: layout style paint;
  isolation: isolate;
}

.editor-body-render.reader-paper-flow {
  display: block;
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "MS PMincho", serif;
  font-size: var(--reader-font-size);
  line-height: var(--reader-line-height);
  letter-spacing: normal;
  white-space: pre-wrap;
  overflow: hidden;
  line-break: strict;
  word-break: normal;
  color: #1a1a1a;
  column-gap: 0;
  column-fill: auto;
  transition: none;
  pointer-events: none;
  /* スクロール同期の translate をGPU合成レイヤーへ昇格し、スクロールブリップを防ぐ */
  will-change: transform;
}

/* 表示レイヤー（#editor-body-render）は紙幅に固定。max-content は計測用 #editor-body-measure-flow のみ */
.editor-writing-viewport #editor-body-render.editor-body-render.reader-paper-flow:not(.editor-body-render--horizontal) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.editor-writing-viewport #editor-body-measure-flow.editor-body-render.reader-paper-flow:not(.editor-body-render--horizontal) {
  width: max-content;
  min-width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: 0;
}

/* 横書きは script.js の reader と同様に幅いっぱい・折り返し優先 */
.editor-writing-viewport .editor-body-render.reader-paper-flow.editor-body-render--horizontal {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 100%;
  margin-left: 0;
  margin-right: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.editor-body-render.is-empty {
  color: #999;
}

.editor-body-field #editor-body.editor-body-paper-input {
  position: absolute;
  inset: var(--reader-paper-padding-y) var(--reader-paper-padding-x);
  z-index: 2;
  display: block;
  box-sizing: border-box;
  width: calc(100% - (var(--reader-paper-padding-x) * 2));
  height: calc(100% - (var(--reader-paper-padding-y) * 2));
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  resize: none;
  outline: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "MS PMincho", serif;
  font-size: var(--reader-font-size);
  line-height: var(--reader-line-height);
  letter-spacing: normal;
  white-space: pre-wrap;
  overflow: hidden;
  overflow-x: clip;
  overflow-y: clip;
  line-break: strict;
  word-break: normal;
  color: transparent;
  caret-color: transparent;
  box-shadow: none;
  scrollbar-width: thin;
}

.editor-body-field #editor-body.editor-body-paper-input:focus {
  border: none;
  box-shadow: none;
}

.editor-body-field #editor-body.editor-body-paper-input.editor-body-paper-input--horizontal {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.editor-body-field #editor-body.editor-body-paper-input::placeholder {
  color: transparent;
}

.editor-body-field #editor-body.editor-body-paper-input::selection {
  background: rgba(90, 120, 170, 0.24);
  color: transparent;
}

.editor-body-caret-marker {
  display: none;
}

.editor-writing-paper {
  position: relative;
}

.editor-body-caret {
  position: absolute;
  left: 0;
  top: 0;
  /* 幅・高さは JS で動的に設定する（縦書き内は横棒、横書き内は縦棒） */
  width: 0;
  height: 0;
  background: #111;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  /* 点滅アニメーションと位置更新を合成レイヤーで処理してメインスレッドのペイントを省く */
  will-change: opacity, left, top;
}

/* 縦書き本文中: 横棒キャレット（行の文字幅ぶん） */
.editor-body-caret.editor-body-caret--horizontal {
  background: #111;
}

/* 英単語(横書き)内: 縦棒キャレット。アルファベット間に表示 */
.editor-body-caret.editor-body-caret--vertical {
  background: #111;
}

.editor-body-caret.is-active {
  opacity: 1;
  animation: editorBodyCaretBlink 1s steps(1, end) infinite;
}

@keyframes editorBodyCaretBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.editor-body-text-run {
  display: inline;
}

.editor-body-placeholder {
  color: #999;
}

.editor-button {
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #111;
  padding: 0.78em clamp(8px, 1.8vw, 16px);
  font: inherit;
  cursor: pointer;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  font-size: clamp(0.66rem, 0.32rem + 1.05vw, 0.875rem);
  line-height: 1.35;
  box-sizing: border-box;
}

.editor-button:hover:not(:disabled):not(.editor-button--wood-submit) {
  background: #fafafa;
  border-color: #c4c4c4;
}

.editor-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.editor-button-secondary {
  border-color: #d8d8d8;
  background: #fff;
  color: #111;
}

.editor-button-ghost {
  border-color: #d8d8d8;
  background: #fff;
  color: #555;
}

.editor-button-ghost:hover:not(:disabled) {
  border-color: #c4c4c4;
  background: #fafafa;
  color: #333;
}

/* ???????????: creator ???????????????????? */
.editor-button.editor-button--wood-submit {
  border: 1px solid rgba(44, 29, 23, 0.38);
  border-radius: 0;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  background-color: #2c1d17;
  background-image:
    var(--creator-wood-image),
    linear-gradient(180deg, rgba(44, 29, 23, 0.12) 0%, rgba(44, 29, 23, 0.24) 100%);
  background-size: auto 120%, 100% 100%;
  background-repeat: repeat-x, no-repeat;
  background-position: left center, center center;
}

.editor-button.editor-button--wood-submit:hover:not(:disabled) {
  border-color: rgba(44, 29, 23, 0.5);
  background-color: #3a2720;
}

.editor-button.editor-button--wood-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.editor-preview {
  border: 1px solid #ececec;
  background: #fff;
  padding: 16px;
}

.editor-main--writing .editor-preview {
  width: 100%;
  box-sizing: border-box;
}

.editor-main--writing .editor-preview--hidden-surface {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.editor-preview-header {
  margin-bottom: 12px;
}

.editor-preview-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
}

.editor-preview-author {
  margin: 0;
  font-size: 0.88rem;
  color: #666;
}

.editor-preview-pager {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-preview-pager .page-nav-button.page-nav-button--icon {
  flex-shrink: 0;
}

.editor-preview-hint {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: #777;
  opacity: 0.9;
}

.editor-preview-viewport {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.editor-preview-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  background: transparent;
  z-index: 5;
  pointer-events: auto;
}

.editor-preview-hit-next {
  left: 0;
}

.editor-preview-hit-prev {
  right: 0;
}

.editor-preview-paper {
  position: relative;
  z-index: 1;
  height: 62vh;
  min-height: 420px;
  padding: 28px 20px;
}

/* editor ?????: 1??E????????????????E???E???E?EC???????E?E*/
.editor-preview-paper #preview-flow {
  margin-left: auto;
  margin-right: 0;
}

@media (max-width: 900px) {
  /* ???????E: grid ??E min-width:auto ?E???E????????????E???E?????E??E???????E????E???? MQ ????E?E*/
  .editor-page {
    max-width: 100%;
    overflow-x: hidden;
  }
  .editor-page .meta {
    padding-left: 14px;
    padding-right: 14px;
    max-width: 100%;
  }
  .editor-main {
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }
  .editor-form,
  .editor-preview {
    min-width: 0;
    max-width: 100%;
  }
  .editor-details-grid,
  .editor-main--writing .editor-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .editor-field--wide {
    grid-column: 1 / -1;
  }
  .editor-writing-toolbar {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px;
  }
  .editor-writing-toolbar-spacer {
    display: none;
  }
  .editor-writing-toolbar-primary {
    width: 100%;
    justify-content: flex-start;
  }
  .editor-writing-toolbar-end {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    transform: none;
  }
  .editor-body-pager {
    margin-left: 0;
    margin-right: 0;
  }
  .editor-input,
  .editor-textarea,
  select.editor-input {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .editor-textarea {
    min-height: 34vh;
    max-height: 48vh;
    overflow-x: hidden;
  }
  .editor-body-field #editor-body.editor-textarea {
    height: 64vh;
    min-height: 420px;
    max-height: none;
    overflow: auto;
  }
  .editor-body-field #editor-body.editor-body-paper-input {
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }
  .editor-textarea-summary {
    min-height: 5.8em;
    max-height: 11em;
  }
  .editor-actions {
    flex-wrap: nowrap;
    max-width: 100%;
  }
  .editor-button {
    min-width: 0;
    max-width: 100%;
    padding: 0.74em clamp(6px, 1.5vw, 12px);
    font-size: clamp(0.64rem, 0.28rem + 1.35vw, 0.84rem);
  }
  .editor-main--writing .editor-ruby-tools {
    --editor-ruby-toolbar-h: 2.4rem;
  }
  .editor-main--writing .editor-ruby-tools .editor-ruby-open-button.editor-button {
    padding: 0 clamp(6px, 1.5vw, 12px);
  }
  .editor-main--writing .editor-ruby-tools select.editor-toolbar-font-select {
    padding: 0 26px 0 clamp(6px, 1.5vw, 12px);
    font-size: clamp(0.64rem, 0.28rem + 1.35vw, 0.84rem);
    line-height: var(--editor-ruby-toolbar-h);
  }
  .editor-preview-paper {
    height: 52vh;
    min-height: 340px;
    max-height: 58vh;
  }
}

/* ??Eviewport ?????????E???????????E??EevTools ??E?? PC ?????????E????E*/
@media (max-width: 900px) and (hover: none) and (pointer: coarse) {
  .editor-preview-paper #preview-flow {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    column-count: 2;
    column-gap: 1em;
    column-fill: auto;
    /* ???????????????????????E????E?????E*/
    padding: 0 0.35em;
  }
}

@media (max-width: 600px) {
  /* スマホ編集: 本文を画面の残り幅・高さまで伸ばす（PCは 72vh / dvh のまま） */
  .home-page.home-page--editor {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 100dvh;
  }

  .home-page.home-page--editor > .home-header.home-header--editor {
    flex-shrink: 0;
  }

  .home-page.home-page--editor > .editor-page {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .home-page.home-page--editor .editor-page > .meta.editor-meta {
    flex-shrink: 0;
  }

  .home-page.home-page--editor .editor-page > main.editor-main--writing {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .home-page.home-page--editor .editor-main--writing .editor-form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .home-page.home-page--editor .editor-main--writing .editor-work-fields-card,
  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar {
    flex-shrink: 0;
  }

  .home-page.home-page--editor .editor-main--writing .editor-body-field.editor-field {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    gap: 6px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-viewport.paged-reader-viewport {
    grid-row: 1;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    /* 読書ページ .paged-reader-section と同型の左右余白（本文のみ） */
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  /* ページ数: 紙の右上（パディング内）— 縦書き本文と被らない */
  .home-page.home-page--editor .editor-writing-paper .editor-body-page-indicator.reader-page-indicator {
    top: 5px;
    right: 7px;
    left: auto;
    z-index: 6;
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
  }

  .home-page.home-page--editor .editor-main--writing .editor-body-field .editor-count {
    grid-row: 2;
    flex-shrink: 0;
    margin-top: 0;
  }

  /* 本文紙: PC 同型の約2倍高（はみ出しは .editor-page の縦スクロールで吸収） */
  .home-page.home-page--editor .editor-writing-stack.reader-stack {
    flex: 0 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 560px;
    height: min(144vh, calc((100dvh - 250px) * 2));
    max-height: min(144vh, calc((100dvh - 250px) * 2));
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-paper.reader-paper {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
  }

  .editor-meta .description {
    max-width: 42em;
    line-height: 1.65;
  }

  .editor-main {
    padding: 14px 14px 36px;
    gap: 14px;
  }

  .editor-form,
  .editor-preview {
    padding: 14px;
  }
  .editor-main--writing .editor-form {
    padding: 0;
  }
  .editor-details-grid {
    padding: 14px;
  }
  .editor-details-grid,
  .editor-main--writing .editor-details-grid {
    grid-template-columns: 1fr;
  }

  .editor-field {
    gap: 7px;
    margin-bottom: 12px;
  }

  .editor-textarea {
    padding: 12px 12px;
  }
  .editor-body-field #editor-body.editor-textarea {
    height: 58vh;
    min-height: 360px;
    padding: 22px 16px;
    font-size: var(--reader-font-size);
  }
  .editor-body-field #editor-body.editor-body-paper-input {
    height: 100%;
    min-height: 0;
    padding: 0;
    font-size: var(--reader-font-size);
  }

  .editor-count {
    justify-content: flex-start;
    margin-top: 6px;
  }

  .editor-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .editor-button {
    padding: 0.7em clamp(4px, 1.2vw, 10px);
    font-size: clamp(0.62rem, 0.22rem + 2.4vw, 0.8rem);
  }

  .editor-main--writing .editor-ruby-tools {
    --editor-ruby-toolbar-h: 2.3rem;
  }
  .editor-main--writing .editor-ruby-tools .editor-ruby-open-button.editor-button {
    padding: 0 clamp(4px, 1.2vw, 10px);
  }
  .editor-main--writing .editor-ruby-tools select.editor-toolbar-font-select {
    padding: 0 24px 0 clamp(4px, 1.2vw, 10px);
    font-size: clamp(0.62rem, 0.22rem + 2.4vw, 0.8rem);
    line-height: var(--editor-ruby-toolbar-h);
  }

  .editor-preview-paper {
    padding: 22px 16px;
  }

  /* editor スマホ: 本文・ツールバーは横幅いっぱい（タイトル行のみ左右余白） */
  .home-page.home-page--editor {
    padding-left: 0;
    padding-right: 0;
  }

  .home-page.home-page--editor .editor-page {
    width: 100%;
    max-width: 100%;
  }

  /* タイトル行: 左右をビューポート余白に揃え、細いセパレータで本文域と区切る */
  .home-page.home-page--editor .editor-page .meta.editor-meta {
    padding: 10px 14px 12px;
    border-bottom: 1px solid rgba(44, 29, 23, 0.07);
  }

  .home-page.home-page--editor .editor-main.editor-main--writing {
    width: 100%;
    max-width: 100%;
    padding: 6px 0 8px;
  }

  .home-page.home-page--editor .editor-main--writing .editor-form {
    width: 100%;
    max-width: 100%;
  }

  /* 作品情報フォーム: タイトル行と同じ 14px に揃えて余白のリズムを統一 */
  .home-page.home-page--editor .editor-main--writing .editor-details-grid {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* ツールバー: タイトル行・紙面と同じ 12px 余白で水平リズムを整える */
  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* 文字数カウント: ツールバーと揃える */
  .home-page.home-page--editor .editor-main--writing .editor-body-field .editor-count {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  .home-page.home-page--editor .editor-main--writing .editor-field-shell,
  .home-page.home-page--editor .editor-main--writing .editor-field-shell--textarea {
    padding-left: 10px;
    padding-right: 12px;
  }

  .home-page.home-page--editor .editor-main--writing .editor-label {
    margin-left: 0;
    padding-left: 0;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-primary,
  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-end {
    margin-left: 0;
    padding-left: 0;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-end {
    transform: none;
  }

  /* フォント・ルビ・縦中横は折りたたみ内（#editor-work-fields-card） */
  .home-page.home-page--editor .editor-toolbar-primary-fold-anchor {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(44, 29, 23, 0.07);
  }

  .home-page.home-page--editor .editor-toolbar-primary-fold-anchor .editor-writing-toolbar-fold-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .home-page.home-page--editor .editor-toolbar-primary-fold-anchor .editor-toolbar-font-field {
    width: 100%;
    max-width: 100%;
  }

  .home-page.home-page--editor .editor-toolbar-primary-fold-anchor .editor-toolbar-font-select {
    width: 100%;
    max-width: 100%;
  }

  .home-page.home-page--editor .editor-toolbar-primary-fold-anchor .editor-ruby-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  /* 文字サイズ・ページ送りは読書ページと同型（一段）。投稿/更新はページ送りの上 */
  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    /* 右は更新＋ページ送りの2段のため、字サイズは下端（ページ送り行）に揃える */
    align-items: flex-end;
    gap: 8px 10px;
    margin-top: 6px;
    margin-bottom: 6px;
    padding: 0 12px;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-spacer {
    display: none;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-primary {
    width: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-self: flex-end;
    gap: 6px;
    padding: 0;
    margin: 0;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-primary .editor-body-font-size-controls {
    gap: 6px;
    justify-content: flex-start;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-primary .font-size-button {
    flex: 0 0 auto;
    min-width: 0;
    width: 30px;
    height: 30px;
    padding: 0;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-primary .reader-font-size-dot--small {
    width: 5px;
    height: 5px;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-primary .reader-font-size-dot--medium {
    width: 7px;
    height: 7px;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-primary .reader-font-size-dot--large {
    width: 10px;
    height: 10px;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-end {
    width: auto;
    flex: 0 0 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    transform: none;
  }

  /* 更新スプリット: 下矢印を細くし「更新」側を広く（外寸・高さは維持） */
  .home-page.home-page--editor .editor-main--writing .editor-publish-split__toggle {
    min-width: 0;
    width: 1.05rem;
    flex: 0 0 1.05rem;
    padding: 0 1px;
  }

  .home-page.home-page--editor .editor-main--writing .editor-publish-split__chevron {
    width: 10px;
    height: 10px;
  }

  .home-page.home-page--editor .editor-main--writing .editor-publish-split__main.editor-button {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: clamp(10px, 3vw, 16px);
    padding-right: clamp(10px, 3vw, 16px);
    font-size: clamp(0.7rem, 0.28rem + 2.55vw, 0.84rem);
    letter-spacing: 0.06em;
  }

  .home-page.home-page--editor .editor-main--writing .editor-writing-toolbar-end .editor-actions {
    width: auto;
    justify-content: flex-end;
  }

  .home-page.home-page--editor .editor-main--writing .editor-body-pager {
    margin: 0;
    gap: 2px;
    justify-content: flex-end;
  }

  .home-page.home-page--editor .editor-main--writing .page-nav-button.page-nav-button--icon {
    width: 30px;
    height: 30px;
  }

  .home-page.home-page--editor .editor-main--writing .page-nav-button--icon .page-nav-icon {
    width: 17px;
    height: 17px;
  }
}

/* reader: ??E??????E?E??E*/
.reader-paper-flow .latin-diagonal-word {
  display: inline-block;
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  writing-mode: horizontal-tb;
  line-height: 1;
  vertical-align: top;
  margin-right: 10px;
  box-sizing: border-box;
  overflow: hidden;
}

.reader-paper-flow .latin-diagonal-word.latin-whole-word {
  width: max-content;
  min-width: min-content;
  max-width: none;
  overflow: visible;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  vertical-align: bottom;
  box-sizing: border-box;
  margin-right: 8px;
}

/* ????E??????????E???????????E??E5%?E?E*/
#paged-reader-viewport .reader-paper-flow .latin-diagonal-word.latin-whole-word,
.editor-writing-viewport .reader-paper-flow .latin-diagonal-word.latin-whole-word {
  font-size: 96%;
  line-height: 1.05;
}

#paged-reader-viewport .reader-paper-flow .latin-diagonal-word.latin-whole-word.latin-whole-word--compact,
.editor-writing-viewport .reader-paper-flow .latin-diagonal-word.latin-whole-word.latin-whole-word--compact {
  font-size: 88%;
  line-height: 1.05;
}

#paged-reader-viewport
  .reader-paper-flow
  .latin-diagonal-word.latin-whole-word.latin-whole-word--compact.latin-whole-word--compact-8,
.editor-writing-viewport
  .reader-paper-flow
  .latin-diagonal-word.latin-whole-word.latin-whole-word--compact.latin-whole-word--compact-8 {
  font-size: 90%;
}

#paged-reader-viewport
  .reader-paper-flow
  .latin-diagonal-word.latin-whole-word.latin-whole-word--compact.latin-whole-word--compact-9,
.editor-writing-viewport
  .reader-paper-flow
  .latin-diagonal-word.latin-whole-word.latin-whole-word--compact.latin-whole-word--compact-9 {
  font-size: 88%;
}

#paged-reader-viewport
  .reader-paper-flow
  .latin-diagonal-word.latin-whole-word.latin-whole-word--compact.latin-whole-word--compact-10,
.editor-writing-viewport
  .reader-paper-flow
  .latin-diagonal-word.latin-whole-word.latin-whole-word--compact.latin-whole-word--compact-10 {
  font-size: 86%;
}

.reader-paper-flow .latin-diagonal-word.latin-whole-word.latin-whole-word--compact {
  font-size: 88%;
}

/* 編集ページの横書きモードでは、縦書き英単語向けの余白/inline-blockを無効化 */
.editor-writing-viewport .editor-body-render.editor-body-render--horizontal .latin-diagonal-word,
.editor-writing-viewport .editor-body-render.editor-body-render--horizontal .latin-diagonal-word.latin-whole-word {
  display: inline;
  width: auto;
  min-width: 0;
  max-width: none;
  margin-right: 0;
  line-height: inherit;
  vertical-align: baseline;
  overflow: visible;
  white-space: normal;
}

/* 和文縦組み: 元号＋年・三桁＋年 などの縦中横（編集オーバーレイ・閲覧の本文フロー共通クラス） */
.reader-paper-flow .tate-chu-yoko,
#paged-reader-viewport .reader-paper-flow .tate-chu-yoko,
.editor-writing-viewport .reader-paper-flow .tate-chu-yoko {
  text-combine-upright: all;
}

.editor-writing-viewport .editor-body-render.editor-body-render--horizontal .tate-chu-yoko {
  text-combine-upright: none;
}

/* ????E?: ???E???????E?Epaged-reader ??????E??E*/
.reader-text-btn {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  color: #606060;
  cursor: pointer;
  text-decoration: none;
}

.reader-text-btn:hover {
  color: #0f0f0f;
}

.reader-description-card {
  max-width: 720px;
  margin-top: 6px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-sizing: border-box;
}

.reader-meta-fold-date {
  display: none;
}

.reader-meta.reader-meta--fold-date-only .reader-meta-fold-toggle {
  display: none;
}

.reader-meta-description {
  max-width: none;
}

.reader-meta-description .description {
  font-size: 0.84rem;
  line-height: 1.55;
  color: #4a4a4a;
}

.reader-meta-description.is-collapsed .description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.reader-meta-description-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.reader-meta-description-toggle {
  text-align: right;
}

.reader-after-reading {
  width: 100%;
}

.reader-after-reading--yt {
  padding: 0 24px 28px;
  max-width: none;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* コメント欄を作品一覧（index）と同じフォントに */
.home-page.home-page--reader .reader-after-reading--yt {
  font-family: "Playfair Display", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "MS Mincho", serif;
}

.reader-comments-teaser {
  padding-top: 8px;
}

.reader-comments-teaser-inner {
  padding: 14px 14px 12px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 10px;
  box-sizing: border-box;
}

.reader-comments-teaser-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f0f0f;
  letter-spacing: 0.01em;
}

.reader-comments-teaser-hit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.reader-comments-teaser-hit:hover .reader-comments-preview-text {
  color: #0f0f0f;
}

.reader-comments-preview {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.reader-comment-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8e8e8;
  color: #505050;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 34px;
  text-align: center;
}

.reader-comments-preview-main {
  flex: 1;
  min-width: 0;
}

.reader-comments-preview-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f0f0f;
  margin-bottom: 4px;
}

.reader-comments-preview-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #3d3d3d;
  white-space: pre-wrap;
  word-break: break-word;
}

.reader-comments-preview-empty {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #777;
}

.reader-comments-teaser-action {
  display: block;
  margin-top: 10px;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 500;
  color: #606060;
}

.reader-comments-teaser-hit:hover .reader-comments-teaser-action {
  color: #0f0f0f;
}

.reader-comments-shell {
  border-top: none;
  padding: 16px 0 0;
  margin-top: 12px;
}

.reader-comments-shell .comments-inner {
  padding: 0 2px;
  margin-left: 0;
  margin-right: auto;
  max-width: 100%;
}

/* 読書ページコメント（YouTube 風・グレー帯なし／件数ヘッダー → 一行投稿 → 一覧） */
.reader-comments-yt-inner {
  max-width: 100%;
}

.reader-comments-yt-header {
  margin: 0 0 14px;
}

.reader-comments-yt-count {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f0f0f;
  letter-spacing: 0.01em;
}

.home-page.home-page--reader .reader-comments-yt-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

.reader-comments-yt-composer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
}

.reader-comments-yt-composer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

/* author の display が [hidden] より強くなるのを避ける（初期はボタン非表示） */
.reader-comments-yt-actions[hidden] {
  display: none !important;
}

.reader-comments-yt-actions:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 0 2px;
  margin-left: 52px;
}

.reader-comments-yt-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8e8e8;
  color: #707070;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 40px;
  text-align: center;
  overflow: hidden;
}

.reader-comments-yt-avatar .reader-comments-yt-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.reader-comments-yt-line-wrap {
  flex: 1 1 140px;
  min-width: 0;
  border-bottom: 1px solid #ccc;
  transition: border-color 0.15s ease;
}

.reader-comments-yt-line-wrap:focus-within {
  border-bottom-color: #303030;
}

.home-page.home-page--reader .reader-comments-yt-line {
  width: 100%;
  border: none !important;
  margin: 0;
  padding: 10px 0 11px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.95rem;
  font-weight: 400;
  color: #0f0f0f;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.home-page.home-page--reader .reader-comments-yt-line:focus {
  background: transparent !important;
  box-shadow: none !important;
}

.home-page.home-page--reader .reader-comments-yt-line::placeholder {
  color: rgba(15, 15, 15, 0.45);
}

.home-page.home-page--reader .reader-comments-yt-cancel {
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #606060;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
}

.home-page.home-page--reader .reader-comments-yt-cancel:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.home-page.home-page--reader .reader-comments-yt-submit {
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #606060;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
}

.home-page.home-page--reader .reader-comments-yt-submit:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

.home-page.home-page--reader .reader-comments-yt-list.comments-list {
  gap: 0;
}

.home-page.home-page--reader .reader-comments-yt-item.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  margin: 0;
  border-top: 1px solid #eaeaea;
}

.home-page.home-page--reader .reader-comments-yt-item.comment-item:last-child {
  padding-bottom: 4px;
}

.home-page.home-page--reader .reader-comments-yt-item.comment-item:first-of-type {
  border-top: none;
  padding-top: 8px;
}

.home-page.home-page--reader .reader-comments-yt-item-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8e8e8;
  color: #606060;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 34px;
  text-align: center;
  overflow: hidden;
}

.home-page.home-page--reader .reader-comments-yt-item-avatar .reader-comments-yt-item-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.reader-comments-yt-item-main {
  flex: 1;
  min-width: 0;
}

.reader-comments-yt-item-header.comment-header {
  margin-bottom: 6px;
}

.reader-comments-yt-item-body.comment-body {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.65;
  color: #222;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 600px) {
  .reader-after-reading--yt {
    padding: 0 12px 24px;
  }

  .home-page.home-page--reader .reader-comments-yt-header {
    margin-bottom: 10px;
  }

  .home-page.home-page--reader .reader-comments-yt-count {
    font-size: 0.88rem;
  }

  .home-page.home-page--reader .reader-comments-yt-form {
    margin-bottom: 12px;
  }

  .home-page.home-page--reader .reader-comments-yt-composer-row {
    gap: 7px;
  }

  .home-page.home-page--reader .reader-comments-yt-avatar {
    width: 28px;
    height: 28px;
    line-height: 28px;
    font-size: 0.72rem;
  }

  .home-page.home-page--reader .reader-comments-yt-line {
    font-size: 0.8rem;
    padding: 7px 0 8px !important;
  }

  .home-page.home-page--reader .reader-comments-yt-cancel,
  .home-page.home-page--reader .reader-comments-yt-submit {
    font-size: 0.74rem;
    padding: 5px 9px;
  }

  .home-page.home-page--reader .reader-comments-yt-actions:not([hidden]) {
    margin-left: 0;
    padding: 7px 0 2px 35px;
    box-sizing: border-box;
  }

  .home-page.home-page--reader .reader-comments-yt-item.comment-item {
    gap: 7px;
    padding: 9px 0;
  }

  .home-page.home-page--reader .reader-comments-yt-item.comment-item:first-of-type {
    padding-top: 5px;
  }

  .home-page.home-page--reader .reader-comments-yt-item-avatar {
    width: 26px;
    height: 26px;
    line-height: 26px;
    font-size: 0.68rem;
  }

  .home-page.home-page--reader .reader-comments-yt-item-header.comment-header {
    margin-bottom: 3px;
  }

  .home-page.home-page--reader .reader-comments-yt-item .comment-author {
    font-size: 0.74rem;
  }

  .home-page.home-page--reader .reader-comments-yt-item .comment-date {
    font-size: 0.66rem;
  }

  .home-page.home-page--reader .reader-comments-yt-item-body.comment-body {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .home-page.home-page--reader .reader-comment-avatar {
    width: 26px;
    height: 26px;
    line-height: 26px;
    font-size: 0.68rem;
  }

  .home-page.home-page--reader .reader-comments-preview {
    gap: 7px;
  }

  .home-page.home-page--reader .reader-comments-teaser-title {
    font-size: 0.82rem;
  }

  .home-page.home-page--reader .reader-comments-preview-name,
  .home-page.home-page--reader .reader-comments-preview-text,
  .home-page.home-page--reader .reader-comments-preview-empty {
    font-size: 0.7rem;
  }

  .home-page.home-page--reader .reader-comments-teaser-action {
    font-size: 0.7rem;
  }
}

@media (min-width: 601px) {
  .reader-comments-yt-composer-row {
    flex-wrap: nowrap;
  }
}

/* ========== ???Eindex.html ???E??E?E??????????????E?E========== */
.home-page.home-page--index {
  --shelf-frame-color: #2c1d17;
  --shelf-grain-image: url("assets/shelf-grain-frame.png");
  /* ???E?Eworks-shelf-post--left?E????? --shelf-grain-image ??? */
  --shelf-grain-post-image: url("assets/shelf-grain-post.png");
  /* ?????E??????????E???????????E*/
  --shelf-grain-post-right-image: url("assets/shelf-grain-post-right.png");
  padding-top: 0;
}

.home-page.home-page--index > .home-header.home-header--index {
  background-color: #f7f4ee;
  /* ???E???E????E????E???????????????????E?E*/
  background-image: linear-gradient(rgba(255, 253, 246, 0.42), rgba(247, 244, 238, 0.38));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center center;
  margin: 0 -20px 20px -20px;
  padding: 12px 20px;
  border-bottom: none;
  max-width: none;
  position: relative;
  z-index: 60;
}

.home-page.home-page--index > .home-header.home-header--index::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 28px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(247, 244, 238, 0) 0%,
    rgba(247, 244, 238, 0.14) 42%,
    rgba(247, 244, 238, 0) 100%
  );
}

.home-page.home-page--index .home-logo {
  font-family: "????E?????E, "Hina Mincho", "Sawarabi Mincho", "Yu Mincho", "Noto Serif JP", serif;
  position: relative;
  display: inline-block;
  padding-left: 0;
  width: 300px;
  max-width: 100%;
  height: 42px;
  line-height: 42px;
  margin-bottom: 2px;
  overflow: visible;
}

.home-page.home-page--index .home-logo-combined {
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  transform: translateY(-42%);
  pointer-events: none;
}

.home-page.home-page--index .home-logo-wordmark {
  position: absolute;
  left: 62px;
  top: 50%;
  height: 80px;
  width: auto;
  object-fit: contain;
  transform: translateY(-46%);
  pointer-events: none;
}

.home-page.home-page--index .home-logo-mark {
  position: absolute;
  left: 0;
  top: 64%;
  width: 60px;
  height: 60px;
  object-fit: contain;
  transform: translateY(-50%);
  pointer-events: none;
}

.header-band-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.header-band-bg__layer {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transition: opacity 3s ease-in-out;
}

.header-band-bg__layer.is-visible {
  opacity: 1;
}

.home-page.home-page--index > .home-header.home-header--index > :not(.header-band-bg),
.home-page.home-page--creator > .home-header.home-header--creator > :not(.header-band-bg),
.home-page.home-page--reader > .home-header.home-header--reader > :not(.header-band-bg),
.home-page.home-page--editor > .home-header.home-header--editor > :not(.header-band-bg) {
  position: relative;
  z-index: 1;
}

.home-page.home-page--index > .home-header.home-header--index::after,
.home-page.home-page--creator > .home-header.home-header--creator::after,
.home-page.home-page--reader > .home-header.home-header--reader::after,
.home-page.home-page--editor > .home-header.home-header--editor::after {
  z-index: 2;
}

.header-band {
  position: relative;
  container-type: inline-size;
  container-name: headerband;
}

/* 3?????:?? / ??:????? / ?:?????? ??????? @container ??????? */
.home-page.home-page--index .header-band,
.home-page.home-page--reader .header-band,
.home-page.home-page--editor .header-band,
.home-page.home-page--creator .home-header.home-header--index.home-header--creator .header-band {
  max-width: none;
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(120px, 2.38fr) minmax(0, 1fr);
  column-gap: clamp(6px, 1.6cqw, 20px);
  row-gap: 8px;
  align-items: center;
  align-content: center;
}

.home-page.home-page--index .header-band > .header-mobile-menu,
.home-page.home-page--reader .header-band > .header-mobile-menu,
.home-page.home-page--editor .header-band > .header-mobile-menu,
.home-page.home-page--creator .header-band > .header-mobile-menu {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
}

.home-page.home-page--index .header-band > .home-header-index-brand,
.home-page.home-page--reader .header-band > .home-header-reader-brand,
.home-page.home-page--editor .header-band > .home-header-editor-brand,
.home-page.home-page--creator .header-band > .home-header-index-brand {
  grid-column: 1;
  grid-row: 1;
  /* stretch ??1???????start + ?? % ??? shrink-to-fit ??????0?????????? */
  justify-self: stretch;
  align-self: center;
  min-width: 0;
  max-width: 100%;
  text-align: left;
  position: relative;
  z-index: 2;
}

/* ??????2?????????????????????? */
.home-page.home-page--index .header-band > .header-center-nav,
.home-page.home-page--reader .header-band > .header-center-nav,
.home-page.home-page--editor .header-band > .header-center-nav,
.home-page.home-page--creator .header-band > .header-center-nav {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  /* ?2????????? .header-center-nav ? center ????????? */
  justify-content: flex-start;
  transform: translate(-32px, 12px);
}

/* ????????????????2????????????????????????????? */
@container headerband (max-width: 1180px) {
  .home-page.home-page--index .header-band > .header-center-nav,
  .home-page.home-page--reader .header-band > .header-center-nav,
  .home-page.home-page--editor .header-band > .header-center-nav,
  .home-page.home-page--creator .header-band > .header-center-nav {
    transform: translate(-20px, 12px);
  }
}

@container headerband (max-width: 980px) {
  .home-page.home-page--index .header-band > .header-center-nav,
  .home-page.home-page--reader .header-band > .header-center-nav,
  .home-page.home-page--editor .header-band > .header-center-nav,
  .home-page.home-page--creator .header-band > .header-center-nav {
    transform: translate(-10px, 12px);
  }
}

@container headerband (max-width: 780px) {
  .home-page.home-page--index .header-band > .header-center-nav,
  .home-page.home-page--reader .header-band > .header-center-nav,
  .home-page.home-page--editor .header-band > .header-center-nav,
  .home-page.home-page--creator .header-band > .header-center-nav {
    transform: translate(-2px, 12px);
  }
}

@container headerband (max-width: 640px) {
  .home-page.home-page--index .header-band > .header-center-nav,
  .home-page.home-page--reader .header-band > .header-center-nav,
  .home-page.home-page--editor .header-band > .header-center-nav,
  .home-page.home-page--creator .header-band > .header-center-nav {
    transform: translate(0, 12px);
  }
}

.home-page.home-page--index .header-band > .home-header-index-actions,
.home-page.home-page--reader .header-band > .home-header-reader-actions,
.home-page.home-page--editor .header-band > .home-header-editor-actions,
.home-page.home-page--creator .header-band > .home-header-index-actions--creator {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  position: relative;
  z-index: 2;
}

.header-mobile-menu {
  display: none;
  position: relative;
  flex-shrink: 0;
  z-index: 2;
}

.header-center-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: center;
  gap: 8px 18px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  position: static;
  left: auto;
  top: auto;
  box-sizing: border-box;
  z-index: 1;
}

.nav-item {
  background: none;
  border: none;
  font-size: 17px;
  line-height: 1.2;
  cursor: pointer;
  color: #333;
  padding: 4px 2px;
  white-space: nowrap;
}

.nav-item:hover {
  opacity: 0.6;
}

.home-page.home-page--index .nav-item.is-active,
.home-page.home-page--index .header-dropdown-menu [data-works-feed].is-active {
  font-weight: 600;
  opacity: 1;
}

/*
 * Categories (index, desktop): hover behavior like ???? (.works-sort-label) ?
 * label does not fade (nav-item:hover uses opacity: 0.6). Keep full opacity while
 * pointer is over the tab or the Categories submenu.
 */
.home-page.home-page--index .header-nav-item-wrap--categories:hover > .nav-item,
.home-page.home-page--index .header-nav-item-wrap--categories:focus-within > .nav-item,
.home-page.home-page--reader .header-nav-item-wrap--categories:hover > .nav-item,
.home-page.home-page--reader .header-nav-item-wrap--categories:focus-within > .nav-item,
.home-page.home-page--editor .header-nav-item-wrap--categories:hover > .nav-item,
.home-page.home-page--creator .header-nav-item-wrap--categories:hover > .nav-item,
.home-page.home-page--editor .header-nav-item-wrap--categories:focus-within > .nav-item ,.home-page.home-page--creator .header-nav-item-wrap--categories:focus-within > .nav-item  {
  opacity: 1;
}

/* Categories ???????????index / reader / editor ????? */
.home-page.home-page--index .header-nav-item-wrap--categories,
.home-page.home-page--reader .header-nav-item-wrap--categories,
.home-page.home-page--editor .header-nav-item-wrap--categories ,.home-page.home-page--creator .header-nav-item-wrap--categories  {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  z-index: 20;
}

.home-page.home-page--index .header-categories-submenu,
.home-page.home-page--reader .header-categories-submenu,
.home-page.home-page--editor .header-categories-submenu ,.home-page.home-page--creator .header-categories-submenu  {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 2px);
  min-width: 220px;
  max-width: min(92vw, 320px);
  max-height: min(70vh, 420px);
  overflow: visible;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.14s ease,
    visibility 0.14s ease;
}

.home-page.home-page--index .header-nav-item-wrap--categories:hover .header-categories-submenu,
.home-page.home-page--index .header-nav-item-wrap--categories:focus-within .header-categories-submenu,
.home-page.home-page--reader .header-nav-item-wrap--categories:hover .header-categories-submenu,
.home-page.home-page--reader .header-nav-item-wrap--categories:focus-within .header-categories-submenu,
.home-page.home-page--editor .header-nav-item-wrap--categories:hover .header-categories-submenu,
.home-page.home-page--creator .header-nav-item-wrap--categories:hover .header-categories-submenu,
.home-page.home-page--editor .header-nav-item-wrap--categories:focus-within .header-categories-submenu ,.home-page.home-page--creator .header-nav-item-wrap--categories:focus-within .header-categories-submenu  {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-page.home-page--index .header-category-quick-btn,
.home-page.home-page--reader .header-category-quick-btn,
.home-page.home-page--editor .header-category-quick-btn ,.home-page.home-page--creator .header-category-quick-btn  {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 14px;
  border: none;
  background: none;
  text-align: left;
  font-size: 15px;
  line-height: 1.35;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
}

.home-page.home-page--index .header-category-quick-btn:hover,
.home-page.home-page--index .header-category-quick-btn:focus-visible,
.home-page.home-page--reader .header-category-quick-btn:hover,
.home-page.home-page--reader .header-category-quick-btn:focus-visible,
.home-page.home-page--editor .header-category-quick-btn:hover,
.home-page.home-page--creator .header-category-quick-btn:hover,
.home-page.home-page--editor .header-category-quick-btn:focus-visible ,.home-page.home-page--creator .header-category-quick-btn:focus-visible  {
  background: #f5f5f5;
  outline: none;
}

.home-page.home-page--index .header-categories-submenu-sep,
.home-page.home-page--reader .header-categories-submenu-sep,
.home-page.home-page--editor .header-categories-submenu-sep ,.home-page.home-page--creator .header-categories-submenu-sep  {
  height: 1px;
  margin: 6px 10px;
  background: rgba(0, 0, 0, 0.08);
}

.home-page.home-page--index .header-category-group,
.home-page.home-page--reader .header-category-group,
.home-page.home-page--editor .header-category-group ,.home-page.home-page--creator .header-category-group  {
  position: relative;
}

.home-page.home-page--index .header-category-group-trigger,
.home-page.home-page--reader .header-category-group-trigger,
.home-page.home-page--editor .header-category-group-trigger ,.home-page.home-page--creator .header-category-group-trigger  {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-page.home-page--index .header-category-group-chevron,
.home-page.home-page--reader .header-category-group-chevron,
.home-page.home-page--editor .header-category-group-chevron ,.home-page.home-page--creator .header-category-group-chevron  {
  flex-shrink: 0;
  font-size: 1.1em;
  line-height: 1;
  opacity: 0.55;
}

.home-page.home-page--index .header-category-group-flyout,
.home-page.home-page--reader .header-category-group-flyout,
.home-page.home-page--editor .header-category-group-flyout ,.home-page.home-page--creator .header-category-group-flyout  {
  position: absolute;
  left: calc(100% - 4px);
  top: 0;
  z-index: 2100;
  min-width: 200px;
  max-width: min(260px, calc(100vw - 24px));
  max-height: min(70vh, 380px);
  overflow-y: auto;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.14s ease,
    visibility 0.14s ease;
}

.home-page.home-page--index .header-category-group-flyout::before,
.home-page.home-page--reader .header-category-group-flyout::before,
.home-page.home-page--editor .header-category-group-flyout::before ,.home-page.home-page--creator .header-category-group-flyout::before  {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  width: 10px;
  height: 100%;
}

.home-page.home-page--index .header-category-group:hover .header-category-group-flyout,
.home-page.home-page--index .header-category-group:focus-within .header-category-group-flyout,
.home-page.home-page--reader .header-category-group:hover .header-category-group-flyout,
.home-page.home-page--reader .header-category-group:focus-within .header-category-group-flyout,
.home-page.home-page--editor .header-category-group:hover .header-category-group-flyout,
.home-page.home-page--creator .header-category-group:hover .header-category-group-flyout,
.home-page.home-page--editor .header-category-group:focus-within .header-category-group-flyout ,.home-page.home-page--creator .header-category-group:focus-within .header-category-group-flyout  {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-page.home-page--index .header-mobile-categories-flyout-inner .header-category-group-flyout,
.home-page.home-page--reader .header-mobile-categories-flyout-inner .header-category-group-flyout,
.home-page.home-page--editor .header-mobile-categories-flyout-inner .header-category-group-flyout ,.home-page.home-page--creator .header-mobile-categories-flyout-inner .header-category-group-flyout  {
  position: static;
  display: none;
  min-width: 0;
  max-width: none;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0 0 4px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: none;
}

.home-page.home-page--index .header-mobile-categories-flyout-inner .header-category-group-flyout::before,
.home-page.home-page--reader .header-mobile-categories-flyout-inner .header-category-group-flyout::before,
.home-page.home-page--editor .header-mobile-categories-flyout-inner .header-category-group-flyout::before ,.home-page.home-page--creator .header-mobile-categories-flyout-inner .header-category-group-flyout::before  {
  display: none;
}

.home-page.home-page--index .header-mobile-categories-flyout-inner .header-category-group.is-open .header-category-group-flyout,
.home-page.home-page--reader .header-mobile-categories-flyout-inner .header-category-group.is-open .header-category-group-flyout,
.home-page.home-page--editor .header-mobile-categories-flyout-inner .header-category-group.is-open .header-category-group-flyout ,.home-page.home-page--creator .header-mobile-categories-flyout-inner .header-category-group.is-open .header-category-group-flyout  {
  display: block;
}

.home-page.home-page--index .header-mobile-categories-flyout-inner .header-category-group.is-open .header-category-group-chevron,
.home-page.home-page--reader .header-mobile-categories-flyout-inner .header-category-group.is-open .header-category-group-chevron,
.home-page.home-page--editor .header-mobile-categories-flyout-inner .header-category-group.is-open .header-category-group-chevron ,.home-page.home-page--creator .header-mobile-categories-flyout-inner .header-category-group.is-open .header-category-group-chevron  {
  transform: rotate(90deg);
}

.home-page.home-page--index .header-mobile-categories-flyout-inner .header-category-group-flyout .header-category-quick-btn,
.home-page.home-page--reader .header-mobile-categories-flyout-inner .header-category-group-flyout .header-category-quick-btn,
.home-page.home-page--editor .header-mobile-categories-flyout-inner .header-category-group-flyout .header-category-quick-btn ,.home-page.home-page--creator .header-mobile-categories-flyout-inner .header-category-group-flyout .header-category-quick-btn  {
  padding-left: 22px;
  font-size: 14px;
}

/* モバイル Categories カスケード（index / reader / editor 共通・PC 帯内でも利用） */
.home-page.home-page--index .header-dropdown-cascade--categories,
.home-page.home-page--reader .header-dropdown-cascade--categories,
.home-page.home-page--editor .header-dropdown-cascade--categories ,.home-page.home-page--creator .header-dropdown-cascade--categories  {
  position: relative;
  width: 100%;
}

.home-page.home-page--index .header-dropdown-cascade-trigger,
.home-page.home-page--reader .header-dropdown-cascade-trigger,
.home-page.home-page--editor .header-dropdown-cascade-trigger ,.home-page.home-page--creator .header-dropdown-cascade-trigger  {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: none;
  background: none;
  font: inherit;
  font-size: 17px;
  line-height: 1.25;
  color: #333;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  box-sizing: border-box;
}

.home-page.home-page--index .header-dropdown-cascade-trigger:hover,
.home-page.home-page--reader .header-dropdown-cascade-trigger:hover,
.home-page.home-page--editor .header-dropdown-cascade-trigger:hover ,.home-page.home-page--creator .header-dropdown-cascade-trigger:hover  {
  background: #f5f5f5;
}

.home-page.home-page--index .header-dropdown-cascade-trigger.is-active,
.home-page.home-page--reader .header-dropdown-cascade-trigger.is-active,
.home-page.home-page--editor .header-dropdown-cascade-trigger.is-active ,.home-page.home-page--creator .header-dropdown-cascade-trigger.is-active  {
  font-weight: 600;
}

.home-page.home-page--index .header-cascade-chevron,
.home-page.home-page--reader .header-cascade-chevron,
.home-page.home-page--editor .header-cascade-chevron ,.home-page.home-page--creator .header-cascade-chevron  {
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
  opacity: 0.55;
  transition: transform 0.15s ease;
}

.home-page.home-page--index .header-dropdown-cascade--categories.is-open .header-cascade-chevron,
.home-page.home-page--reader .header-dropdown-cascade--categories.is-open .header-cascade-chevron,
.home-page.home-page--editor .header-dropdown-cascade--categories.is-open .header-cascade-chevron ,.home-page.home-page--creator .header-dropdown-cascade--categories.is-open .header-cascade-chevron  {
  transform: rotate(90deg);
}

.home-page.home-page--index .header-mobile-categories-flyout,
.home-page.home-page--reader .header-mobile-categories-flyout,
.home-page.home-page--editor .header-mobile-categories-flyout ,.home-page.home-page--creator .header-mobile-categories-flyout  {
  position: absolute;
  left: calc(100% + 4px);
  top: 0;
  z-index: 1100;
  min-width: 200px;
  max-width: min(260px, calc(100vw - 24px));
  max-height: min(72vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px 0;
  margin: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.home-page.home-page--index .header-mobile-categories-flyout-inner .header-category-quick-btn,
.home-page.home-page--reader .header-mobile-categories-flyout-inner .header-category-quick-btn,
.home-page.home-page--editor .header-mobile-categories-flyout-inner .header-category-quick-btn ,.home-page.home-page--creator .header-mobile-categories-flyout-inner .header-category-quick-btn  {
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 0;
}

.home-page.home-page--index .header-mobile-categories-flyout-inner .header-categories-submenu-sep,
.home-page.home-page--reader .header-mobile-categories-flyout-inner .header-categories-submenu-sep,
.home-page.home-page--editor .header-mobile-categories-flyout-inner .header-categories-submenu-sep ,.home-page.home-page--creator .header-mobile-categories-flyout-inner .header-categories-submenu-sep  {
  margin: 6px 10px;
}

@media (max-width: 380px) {
  .home-page.home-page--index .header-mobile-categories-flyout,
  .home-page.home-page--reader .header-mobile-categories-flyout,
  .home-page.home-page--editor .header-mobile-categories-flyout {
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 0;
    width: 100%;
    max-width: none;
  }
}

.header-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: #333;
  line-height: 0;
  user-select: none;
  border-radius: 10px;
}

.header-menu-toggle svg {
  display: block;
  flex-shrink: 0;
}

.header-menu-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

.header-dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  right: auto;
  min-width: 168px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 6px 0;
  z-index: 1000;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.header-dropdown-menu.is-open {
  display: block;
}

.home-page.home-page--index .header-dropdown-menu.is-open,
.home-page.home-page--reader .header-dropdown-menu.is-open,
.home-page.home-page--editor .header-dropdown-menu.is-open ,.home-page.home-page--creator .header-dropdown-menu.is-open  {
  overflow: visible;
}

.header-dropdown-menu div {
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9rem;
}

.header-dropdown-menu div:hover {
  background: #f5f5f5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.home-header.home-header--index .home-header-index-actions,
.home-header.home-header--reader .home-header-reader-actions,
.home-header.home-header--editor .home-header-editor-actions,
.home-header-index-actions--creator {
  position: relative;
}

/* ?????????????????????????? ? ????? */
@container headerband (max-width: 1060px) {
  .home-page.home-page--index .home-header-sort-mount {
    display: none !important;
  }
}

@container headerband (max-width: 920px) {
  .home-page.home-page--index .works-view-mode-controls {
    display: none !important;
  }
}

/* Creator: ??????????????????? */
@container headerband (max-width: 880px) {
  .home-page.home-page--creator .home-header-index-actions--creator .creator-post-button {
    display: none !important;
  }
}

@container headerband (max-width: 760px) {
  .home-page.home-page--creator .home-header-index-actions--creator .creator-mail-button {
    display: none !important;
  }
}

@container headerband (max-width: 640px) {
  .home-page.home-page--creator .home-header-index-actions--creator .creator-notice-button {
    display: none !important;
  }
}

/* ????????????????? ? ???????????????????????? */
@container headerband (max-width: 520px) {
  .home-page.home-page--index .header-band > .header-mobile-menu,
  .home-page.home-page--reader .header-band > .header-mobile-menu,
  .home-page.home-page--editor .header-band > .header-mobile-menu,
  .home-page.home-page--creator .header-band > .header-mobile-menu {
    display: block;
  }

  .home-page.home-page--index .header-band .header-menu-toggle,
  .home-page.home-page--reader .header-band .header-menu-toggle,
  .home-page.home-page--editor .header-band .header-menu-toggle,
  .home-page.home-page--creator .header-band .header-menu-toggle {
    display: flex;
  }

  .home-page.home-page--index .header-band > .home-header-index-brand,
  .home-page.home-page--reader .header-band > .home-header-reader-brand,
  .home-page.home-page--editor .header-band > .home-header-editor-brand,
  .home-page.home-page--creator .header-band > .home-header-index-brand {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .home-page.home-page--index .header-band > .home-header-index-brand .home-logo {
    margin-inline: auto;
  }

  .home-page.home-page--index .header-band > .home-header-index-brand .home-logo-combined {
    left: 50%;
    transform: translate(-50%, -42%);
  }

  .home-page.home-page--reader .header-band > .home-header-reader-brand .home-logo-reader-mark,
  .home-page.home-page--editor .header-band > .home-header-editor-brand .home-logo-editor-mark {
    margin-inline: auto;
  }

  .home-page.home-page--reader .header-band > .home-header-reader-brand .home-logo-reader-mark .home-logo-combined,
  .home-page.home-page--editor .header-band > .home-header-editor-brand .home-logo-editor-mark .home-logo-combined {
    left: 50%;
    transform: translate(-50%, -42%);
  }

  .home-page.home-page--creator .header-band > .home-header-index-brand .home-logo-link--creator {
    margin-inline: auto;
  }

  .home-page.home-page--creator .header-band > .home-header-index-brand .home-logo {
    margin-inline: auto;
  }

  .home-page.home-page--creator .header-band > .home-header-index-brand .home-logo-combined {
    left: 50%;
    transform: translate(-50%, -42%);
  }

  .home-page.home-page--index .header-band > .header-center-nav,
  .home-page.home-page--reader .header-band > .header-center-nav,
  .home-page.home-page--editor .header-band > .header-center-nav,
  .home-page.home-page--creator .header-band > .header-center-nav {
    display: none !important;
  }

  /* マイページ（creator）スマホ: 右上はプロフィールアイコンのみ（検索アイコン非表示） */
  .home-page.home-page--creator .home-header-index-actions--creator .home-header-search-slot {
    display: none !important;
  }

  /* スマホメニュー: Categories だけ button 標準スタイルが出るのを抑え、他項目と同じ見た目に */
  .home-page.home-page--index .header-dropdown-menu .header-dropdown-cascade-trigger,
  .home-page.home-page--reader .header-dropdown-menu .header-dropdown-cascade-trigger,
  .home-page.home-page--creator .header-dropdown-menu .header-dropdown-cascade-trigger {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: #333;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }

  .home-page.home-page--index .header-dropdown-menu .header-dropdown-cascade-trigger:hover,
  .home-page.home-page--reader .header-dropdown-menu .header-dropdown-cascade-trigger:hover,
  .home-page.home-page--creator .header-dropdown-menu .header-dropdown-cascade-trigger:hover {
    background: #f5f5f5;
  }

  .home-page.home-page--index .header-dropdown-menu .header-dropdown-cascade-trigger.is-active,
  .home-page.home-page--reader .header-dropdown-menu .header-dropdown-cascade-trigger.is-active,
  .home-page.home-page--creator .header-dropdown-menu .header-dropdown-cascade-trigger.is-active {
    font-weight: 600;
  }

  .home-page.home-page--index .header-dropdown-menu .header-cascade-chevron,
  .home-page.home-page--reader .header-dropdown-menu .header-cascade-chevron,
  .home-page.home-page--creator .header-dropdown-menu .header-cascade-chevron {
    display: inline-block;
    font-size: 1.15em;
    line-height: 1;
    opacity: 0.55;
    transition: transform 0.15s ease;
  }

  .home-page.home-page--index .header-dropdown-menu .header-dropdown-cascade--categories.is-open .header-cascade-chevron,
  .home-page.home-page--reader .header-dropdown-menu .header-dropdown-cascade--categories.is-open .header-cascade-chevron,
  .home-page.home-page--creator .header-dropdown-menu .header-dropdown-cascade--categories.is-open .header-cascade-chevron {
    transform: rotate(90deg);
  }

  /* スマホ: Categories サブメニューは横に出さず下に広げ、ノンフィクション等が見切れない幅に（index / reader / editor / creator） */
  .home-page.home-page--index .header-dropdown-menu.is-open,
  .home-page.home-page--reader .header-dropdown-menu.is-open,
  .home-page.home-page--editor .header-dropdown-menu.is-open,
  .home-page.home-page--creator .header-dropdown-menu.is-open {
    overflow: visible;
    min-width: min(280px, calc(100vw - 32px));
  }

  .home-page.home-page--index .header-dropdown-cascade--categories,
  .home-page.home-page--reader .header-dropdown-cascade--categories,
  .home-page.home-page--editor .header-dropdown-cascade--categories,
  .home-page.home-page--creator .header-dropdown-cascade--categories {
    overflow: visible;
  }

  .home-page.home-page--index .header-band > .header-mobile-menu,
  .home-page.home-page--reader .header-band > .header-mobile-menu,
  .home-page.home-page--editor .header-band > .header-mobile-menu,
  .home-page.home-page--creator .header-band > .header-mobile-menu {
    overflow: visible;
  }

  .home-page.home-page--index .header-mobile-categories-flyout,
  .home-page.home-page--reader .header-mobile-categories-flyout,
  .home-page.home-page--editor .header-mobile-categories-flyout,
  .home-page.home-page--creator .header-mobile-categories-flyout {
    left: 0;
    right: auto;
    top: 100%;
    margin-top: 4px;
    min-width: min(240px, calc(100vw - 32px));
    width: min(280px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(75dvh, 520px);
    overflow-x: visible;
    overflow-y: auto;
  }

  .home-page.home-page--index .header-mobile-categories-flyout-inner .header-category-group-trigger > span:first-child,
  .home-page.home-page--reader .header-mobile-categories-flyout-inner .header-category-group-trigger > span:first-child,
  .home-page.home-page--editor .header-mobile-categories-flyout-inner .header-category-group-trigger > span:first-child,
  .home-page.home-page--creator .header-mobile-categories-flyout-inner .header-category-group-trigger > span:first-child {
    flex: 0 1 auto;
    flex-shrink: 0;
    overflow: visible;
    text-overflow: clip;
  }
}

/* index only: smartphone band ? tighten chrome (padding/gradient/margins); logo & icons use base sizes */
@container headerband (max-width: 520px) {
  .home-page.home-page--index > .home-header.home-header--index {
    padding-top: 4px;
    padding-bottom: 4px;
    margin-bottom: 6px;
  }

  .home-page.home-page--index > .home-header.home-header--index::after {
    bottom: -3px;
    height: 6px;
  }

  .home-page.home-page--index .header-band {
    row-gap: 0;
    align-items: center;
    align-content: center;
  }

  .home-page.home-page--index .home-header-index-actions {
    transform: none;
    align-self: center;
  }

  .home-page.home-page--index .home-header-index-brand {
    align-self: center;
  }

  /* No height override ? base stays 42px / 64px; drop only extra gap below h1 */
  .home-page.home-page--index .home-header-index-brand .home-logo {
    margin-bottom: 0;
  }

  /* Override earlier 520px rule: centered wordmark; vertical center with full-size asset */
  .home-page.home-page--index .header-band > .home-header-index-brand .home-logo-combined {
    transform: translate(-50%, -50%);
  }
}

.home-header.home-header--index .home-header-index-brand {
  min-width: 0;
  text-align: left;
}

.home-header.home-header--index .home-header-index-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  transform: translateY(4px);
}

.home-header.home-header--index .home-header-sort-mount {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  margin-right: 4px;
}

.home-page.home-page--index .home-header-sort-mount .works-sort-controls--tabs {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  margin-left: 0;
  flex-shrink: 0;
  overflow: visible;
  outline: none;
}

.home-page.home-page--index .home-header-sort-mount .works-sort-controls--tabs.works-sort-controls--icon {
  align-items: center;
}

.home-header.home-header--index .home-header-search-slot {
  position: relative;
}

.home-page.home-page--index .home-header-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--shelf-frame-color);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1;
  font: inherit;
}

.home-page.home-page--index .home-header-icon-button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.home-page.home-page--index .home-header-icon-button:focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
}

.home-page.home-page--index .home-header-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: min(320px, calc(100vw - 40px));
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.home-page.home-page--index .home-header-search-panel .home-header-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  padding: 10px 14px 10px 12px;
  border: none;
  border-radius: 10px;
  box-sizing: border-box;
  background: #fff;
  color: #2c1d17;
  box-shadow: 0 1px 2px rgba(44, 29, 23, 0.05);
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.home-page.home-page--index .home-header-search-panel .home-header-search-field:focus-within {
  background: #fdfdfd;
  box-shadow: 0 2px 5px rgba(44, 29, 23, 0.08);
}

.home-page.home-page--index .home-header-search-panel .works-index-mobile-search-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(44, 29, 23, 0.4);
  line-height: 0;
}

.home-page.home-page--index .home-header-search-panel .works-list-search {
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #2c1d17;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.home-page.home-page--index .home-header-search-panel .works-list-search:focus {
  outline: none;
  background: transparent;
  box-shadow: none;
}

.home-page.home-page--index .home-header-search-panel .works-list-search::placeholder {
  color: rgba(44, 29, 23, 0.38);
}

.home-page.home-page--creator {
  font-family: "Playfair Display", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "MS Mincho", serif;
  padding-top: 0;
  background: #fff;
  --creator-wood-image: url("assets/shelf-grain-frame.png");
}

.home-page.home-page--creator > .home-header.home-header--creator {
  background-color: #f7f4ee;
  background-image: linear-gradient(rgba(255, 253, 246, 0.42), rgba(247, 244, 238, 0.38));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center center;
  margin: 0 -20px 20px -20px;
  padding: 12px 20px;
  border-bottom: none;
  max-width: none;
  position: relative;
  z-index: 60;
}

.home-page.home-page--creator > .home-header.home-header--creator::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 28px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(247, 244, 238, 0) 0%,
    rgba(247, 244, 238, 0.14) 42%,
    rgba(247, 244, 238, 0) 100%
  );
}

.home-page.home-page--creator .home-header--index-inner {
  max-width: none;
  width: 100%;
  margin: 0;
}

.home-page.home-page--creator .home-header-index-brand {
  min-width: 0;
  min-height: 42px;
  text-align: left;
}

.home-page.home-page--creator .home-logo {
  font-family: "????E?????E, "Hina Mincho", "Sawarabi Mincho", "Yu Mincho", "Noto Serif JP", serif;
  position: relative;
  display: inline-block;
  width: 300px;
  max-width: 100%;
  height: 42px;
  line-height: 42px;
  margin: 0 0 2px;
  overflow: visible;
}

.home-page.home-page--creator .home-logo-link--creator {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.home-page.home-page--creator .home-logo-link--creator:focus-visible {
  outline: 2px solid #666;
  outline-offset: 3px;
  border-radius: 4px;
}

.home-page.home-page--creator .home-logo-combined {
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  transform: translateY(-42%);
  pointer-events: none;
}

.home-page.home-page--creator .home-header-index-actions--creator {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  transform: translateY(4px);
}

.home-page.home-page--creator .home-header-search-slot {
  position: relative;
}

.home-page.home-page--creator .home-header-logout-menu {
  position: relative;
}

/* アイコン直下の隙間や、ドロップダウンが親より広いときの斜め移動で :hover が切れないよう透明の当たり判定を置く */
.home-page.home-page--creator .home-header-logout-menu::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: calc(100% + 52px);
  z-index: 0;
  pointer-events: auto;
}

.home-page.home-page--creator .home-header-logout-menu > a {
  position: relative;
  z-index: 1;
}

.home-page.home-page--creator .home-header-logout-menu-list {
  position: absolute;
  top: 100%;
  margin-top: 3px;
  right: 0;
  min-width: 100px;
  padding: 4px;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 40;
}

.home-page.home-page--creator .home-header-logout-menu:hover .home-header-logout-menu-list,
.home-page.home-page--creator .home-header-logout-menu:focus-within .home-header-logout-menu-list {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-page.home-page--creator .home-header-logout-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  color: #444;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.home-page.home-page--creator .home-header-logout-item:hover {
  background: #f6f6f6;
}

.home-page.home-page--creator .home-header-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--shelf-frame-color, #2c1d17);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.home-page.home-page--creator .home-header-icon-button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.home-page.home-page--creator .home-header-icon-button:focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
}

.home-page.home-page--creator .creator-post-button svg {
  width: 22px;
  height: 22px;
}
.home-page.home-page--creator .creator-post-button:hover {
  background: #fff;
  border-color: rgba(44, 29, 23, 0.5);
}

.home-page.home-page--creator .creator-post-button:focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
}

.home-page.home-page--creator .home-header-mypage-label {
  font-family: "Hina Mincho", "Sawarabi Mincho", "Yu Mincho", serif;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: rgba(44, 29, 23, 0.6);
}

.home-page.home-page--creator .works-section--creator {
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: calc(100vh - 210px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 20px 40px;
}

.home-page.home-page--creator .works-section--creator {
  display: block !important;
}

.home-page.home-page--creator .creator-auth-panel {
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 6px 0 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-family: "Hina Mincho", "Sawarabi Mincho", "Yu Mincho", "Noto Serif JP", serif;
}

.home-page.home-page--creator .creator-auth-panel:has(#creator-auth-form[hidden]) {
  display: none;
}

.home-page.home-page--creator .creator-login-title {
  margin: 0 0 10px;
  font-size: 1.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #5d5d5d;
  text-align: center;
}

.home-page.home-page--creator .creator-login-subtitle {
  margin: 0 0 16px;
  color: #646464;
  font-size: 0.78rem;
  text-align: center;
}

.home-page.home-page--creator .creator-passcode-form--login p {
  margin: 0 0 7px;
}

.home-page.home-page--creator .creator-passcode-form--login label {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 0.79rem;
  color: #666;
}

.home-page.home-page--creator .creator-password-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home-page.home-page--creator .creator-password-help {
  font-size: 0.71rem;
  color: #777;
}

.home-page.home-page--creator .creator-passcode-form--login input {
  width: 100%;
  max-width: 360px;
  font: inherit;
  font-size: 0.84rem;
  color: #111;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  padding: 8px 10px;
}

.home-page.home-page--creator .creator-passcode-form--login input:focus-visible {
  outline: 1px solid rgba(44, 29, 23, 0.28);
  outline-offset: 0;
}

.home-page.home-page--creator .creator-login-actions {
  margin-top: 10px;
  margin-bottom: 12px;
}

.home-page.home-page--creator .creator-login-button {
  display: block;
  width: 100%;
  text-align: center;
  border: 1px solid rgba(44, 29, 23, 0.38);
  border-radius: 0;
  color: #fff;
  background-color: #2c1d17;
  background-image:
    var(--creator-wood-image),
    linear-gradient(180deg, rgba(44, 29, 23, 0.12) 0%, rgba(44, 29, 23, 0.24) 100%);
  background-size: auto 120%, 100% 100%;
  background-repeat: repeat-x, no-repeat;
  background-position: left center, center center;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 9px 10px;
}

.home-page.home-page--creator .creator-login-button:hover {
  border-color: rgba(44, 29, 23, 0.5);
  background-color: #3a2720;
}

.home-page.home-page--creator .creator-signup-guide {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: #6d6d6d;
}

.home-page.home-page--creator .creator-signup-row {
  margin-top: 5px;
  margin-bottom: 7px;
  text-align: center;
}

.home-page.home-page--creator .creator-signup-link {
  font: inherit;
  font-size: 0.86rem;
  color: #666;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  cursor: pointer;
}

.home-page.home-page--creator .creator-signup-link:hover {
  color: #4e4e4e;
}

.home-page.home-page--creator #creator-auth-message {
  min-height: 1.3em;
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 0.8rem;
  color: #6a3f30;
}

.home-page.home-page--creator .works-section--creator .home-actions {
  width: 100%;
  max-width: none;
  margin: 18px 0 0;
}

.home-page.home-page--creator #creator-actions:not([hidden]) #creator-dashboard[hidden] {
  display: block;
}

.home-page.home-page--creator .creator-dashboard {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 28px;
  max-width: none;
  width: 100%;
  margin: 17px 0 0;
}

.home-page.home-page--creator .creator-profile {
  width: 260px !important;
  flex-shrink: 0;
}

.home-page.home-page--creator .creator-profile-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.home-page.home-page--creator .creator-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ccc;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.home-page.home-page--creator .creator-avatar:focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
}

.home-page.home-page--creator .creator-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-page.home-page--creator .creator-avatar-placeholder {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.9) 0 16%, transparent 18%),
    radial-gradient(circle at 50% 88%, rgba(255, 255, 255, 0.9) 0 32%, transparent 34%),
    #c8c8c8;
}

.home-header-creator-link--has-photo {
  padding: 0;
  overflow: hidden;
}

.creator-header-avatar-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.creator-avatar-cropper {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.creator-avatar-cropper__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.creator-avatar-cropper__panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 360px);
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
}

.creator-avatar-cropper__title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: #333;
}

.creator-avatar-cropper__preview-wrap {
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.creator-avatar-cropper__preview {
  width: 208px;
  height: 208px;
  border-radius: 50%;
  overflow: hidden;
  background: #f1f1f1;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  cursor: grab;
  touch-action: none;
}

.creator-avatar-cropper__preview.is-dragging {
  cursor: grabbing;
}

.creator-avatar-cropper__img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center center;
  user-select: none;
  pointer-events: none;
}

.creator-avatar-cropper__label {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 0.78rem;
  color: #555;
}

.creator-avatar-cropper__label input[type="range"] {
  width: 100%;
}

.creator-avatar-cropper__hint {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: #777;
}

.creator-avatar-cropper__actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.creator-avatar-cropper__btn {
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.creator-avatar-cropper__btn--primary {
  border-color: #3b3b3b;
  background: #3b3b3b;
  color: #fff;
}

.home-page.home-page--creator .creator-name {
  font-size: 1rem;
  margin: 0 0 6px;
}

.home-page.home-page--creator .creator-bio {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
  white-space: pre-line;
}

.home-page.home-page--creator .creator-profile-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 6px;
}

.home-page.home-page--creator .creator-profile-head .creator-name {
  margin: 0;
}

.home-page.home-page--creator .creator-profile-edit-button {
  width: 24px;
  height: 24px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.home-page.home-page--creator .creator-profile-edit-button:hover {
  border-color: #bbb;
  color: #444;
}

.home-page.home-page--creator .creator-profile-label {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  font-size: 0.76rem;
  color: #666;
  text-align: left;
}

.home-page.home-page--creator .creator-profile-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0 0 8px;
  font: inherit;
  font-size: 0.84rem;
  color: #333;
  background: #fff;
}

.home-page.home-page--creator .creator-profile-textarea {
  min-height: 74px;
  resize: vertical;
  line-height: 1.5;
}

.home-page.home-page--creator .creator-profile-editor {
  width: 100%;
  margin-top: 8px;
  text-align: left;
}

.home-page.home-page--creator .creator-profile-editor-actions {
  display: flex;
  gap: 8px;
}

.home-page.home-page--creator .creator-profile-save-button {
  margin-top: 2px;
  width: auto;
}

.home-page.home-page--creator .creator-profile-cancel-button {
  margin-top: 2px;
  width: auto;
}

.home-page.home-page--creator .creator-profile-message {
  margin: 7px 0 0;
  font-size: 0.75rem;
  color: #666;
  min-height: 1.2em;
}

.home-page.home-page--creator .creator-works {
  flex: 1;
  min-width: 0;
}

.home-page.home-page--creator .creator-dashboard-header {
  margin-bottom: 14px;
}

.home-page.home-page--creator .creator-dashboard-title {
  margin: 0 0 4px;
  width: auto;
  height: auto;
  line-height: 1.2;
  overflow: visible;
  font-size: 1.9rem;
  color: #202020;
}

.home-page.home-page--creator .creator-works h2 {
  margin-top: 0;
}

.home-page.home-page--creator .creator-works .creator-works-ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-page.home-page--creator .creator-works .creator-works-li {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 164px;
  padding: 9px 9px 8px;
  border: 1px solid #efefef;
  border-radius: 0;
  background: #fff;
  text-align: left;
}

.home-page.home-page--creator .creator-works .creator-works-tile-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding-right: 0;
}

.home-page.home-page--creator .creator-works .creator-works-tile-link:hover {
  text-decoration: none;
}

.home-page.home-page--creator .creator-works .creator-works-info {
  min-width: 0;
  text-align: left;
}

/* creator????: ?^?C?g??????????????Z?b?g */
.home-page.home-page--creator .works-title,
.home-page.home-page--creator .works-item-title,
.home-page.home-page--creator .works-card-title,
.home-page.home-page--creator .creator-works .creator-works-info strong {
  text-indent: 0 !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  display: block !important;
}

.home-page.home-page--creator .works-title::before,
.home-page.home-page--creator .works-title::after {
  content: none !important;
  display: none !important;
}

.home-page.home-page--creator .creator-works .creator-works-info strong {
  display: block;
  margin: 0 0 10px;
  font-family: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: #202020;
  line-height: 1.5;
  word-break: normal;
  overflow-wrap: break-word;
  font-kerning: normal;
  font-feature-settings: "palt" 1;
  letter-spacing: -0.01em;
  text-align: left;
  padding-left: 0;
  margin-left: 0;
  text-indent: 0;
}

/* ?^?C?g???????u???b?N?? + ?????icreator????j */
.home-page.home-page--creator .creator-works-info strong {
  display: block !important;
  width: 100%;
  text-align: left !important;
}

/* ?^?C?g???e????????icreator????j */
.home-page.home-page--creator .creator-works-info {
  text-align: left !important;
}

/* ???: ?A?C?e???P???????????icreator????j */
.home-page.home-page--creator .creator-works-item {
  text-align: left !important;
}

.home-page.home-page--creator .creator-works .creator-works-author {
  display: inline;
  font-size: 0.7rem;
  color: #777;
}

.home-page.home-page--creator .creator-works .creator-works-meta {
  margin: 2px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #727272;
}

.home-page.home-page--creator .creator-works .creator-works-meta-date {
  color: #767676;
}

.home-page.home-page--creator .creator-works .creator-works-excerpt {
  margin: 3px 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #4f4f4f;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-page.home-page--creator .creator-works .creator-works-actions {
  margin-top: 0;
  gap: 0;
}

.home-page.home-page--creator .creator-works .creator-works-actions--menu {
  position: static;
}

.home-page.home-page--creator .creator-works .creator-works-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
}

.home-page.home-page--creator .creator-works .creator-works-view-badge,
.home-page.home-page--creator .creator-works .creator-works-like-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #5e5e5e;
}

.home-page.home-page--creator .creator-works .creator-works-view-badge svg,
.home-page.home-page--creator .creator-works .creator-works-like-badge svg {
  width: 15px;
  height: 15px;
  color: #666;
}

.home-page.home-page--creator .creator-works .creator-works-menu {
  position: relative;
}

.home-page.home-page--creator .creator-works .creator-works-menu-summary {
  list-style: none;
  cursor: pointer;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  font-size: 0;
  line-height: 1.1;
  color: #555;
  user-select: none;
}

.home-page.home-page--creator .creator-works .creator-works-menu-summary svg {
  display: block;
  width: 16px;
  height: 16px;
  color: #666;
}

.home-page.home-page--creator .creator-works .creator-works-menu-summary::-webkit-details-marker {
  display: none;
}

.home-page.home-page--creator .creator-works .creator-works-menu-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 74px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  z-index: 5;
}

.home-page.home-page--creator .creator-works .creator-works-menu-item {
  display: block;
  width: 100%;
  padding: 6px 9px;
  border: 0;
  border-bottom: 1px solid #f1f1f1;
  background: #fff;
  color: #333;
  text-decoration: none;
  text-align: left;
  font-size: 0.72rem;
  line-height: 1.2;
  cursor: pointer;
}

.home-page.home-page--creator .creator-works .creator-works-menu-item:last-child {
  border-bottom: 0;
}

.home-page.home-page--creator .creator-works .creator-works-menu-item:hover {
  background: #fafafa;
}

.home-page.home-page--creator .creator-works .creator-works-menu-item--danger {
  color: #7a2f2f;
}

.home-page.home-page--creator .works-section--creator .back-link {
  display: inline-block;
  margin-top: 8px;
}

.home-page.home-page--creator #creator-current-email {
  width: min(100%, 460px);
  margin: 14px auto 0;
  font-size: 0.88rem;
  /* 本棚の下に出る「ログイン中: メールアドレス」表示は非表示にする。
   * 要素自体と JS の制御は温存しているので、後から復活させたいときは
   * この display: none を外すだけで戻せる。 */
  display: none;
}

.home-page.home-page--creator p:has(#creator-exit-mode) {
  width: min(100%, 460px);
  margin: 12px auto 0;
}

.home-page.home-page--creator .works-section--creator > .back-link {
  width: min(100%, 460px);
  margin: 8px auto 0;
}

@media (max-width: 800px) {
  .home-page.home-page--creator .creator-dashboard {
    flex-direction: column !important;
    gap: 20px;
  }

  .home-page.home-page--creator .creator-profile {
    width: 100% !important;
  }
}

.home-page.home-page--index .works-section {
  max-width: none;
  width: 100%;
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
}

/* Categories ?????????????????????? */
.home-page.home-page--index #works-list > .works-empty-message--category-tight {
  margin-top: -40px;
}

.home-page.home-page--index #works-list.works-list--shelf > .works-empty-message--category-tight {
  align-self: flex-start;
}

/* マイページ本棚: 投稿0件メッセージを下端からわずかに上へ */
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf)
  #creator-works-list.works-list--shelf > .works-empty-message--creator-own-tight {
  transform: translateY(-0.75rem);
}

/* ??E ????E????E?????E???E???? perspective / rotateX */
.home-page.home-page--index .works-section:has(.works-shelf-frame:has(#works-list.works-list--shelf)), .home-page.home-page--creator .creator-works:has(.works-shelf-frame:has(#creator-works-list.works-list--shelf)) {
  perspective: 1680px;
  perspective-origin: 50% 24%;
  padding-bottom: 24px;
}

.home-page.home-page--index .restore-static-works-wrap:empty {
  margin-bottom: 0;
}

.home-page.home-page--index .works-published-header .works-group-title {
  flex: 0 1 auto;
}

.home-page.home-page--index .works-published-header .works-sort-controls--tabs {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  margin-left: auto;
  flex-shrink: 0;
  overflow: visible;
  outline: none;
}

.home-page.home-page--index .works-sort-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 400;
  color: #888;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 2px;
  white-space: nowrap;
  user-select: none;
  outline: none;
}

.home-page.home-page--index .works-sort-label:focus-visible {
  box-shadow: 0 0 0 2px rgba(100, 100, 100, 0.35);
  border-radius: 3px;
}

.home-page.home-page--index .works-sort-label::after {
  content: "";
  display: inline-block;
  width: 0.35em;
  height: 0.35em;
  margin-left: 0.1em;
  border-right: 1.5px solid #aaa;
  border-bottom: 1.5px solid #aaa;
  transform: rotate(45deg) translateY(-0.12em);
  flex-shrink: 0;
}

.home-page.home-page--index .works-sort-tabstrip {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  left: auto;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  min-width: 9rem;
  padding: 2px 0;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

/* ????????????E???????????????E???E???? */
.home-page.home-page--index .home-header-sort-mount .works-sort-tabstrip {
  top: calc(100% + 2px);
  right: 0;
  left: auto;
}

.home-page.home-page--index .works-sort-controls--tabs:hover .works-sort-tabstrip,
.home-page.home-page--index .works-sort-controls--tabs:focus-within .works-sort-tabstrip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-page.home-page--index .works-sort-tab {
  margin: 0;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.8rem;
  color: #777;
  border: none;
  background: #fff;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.home-page.home-page--index .works-sort-tab + .works-sort-tab {
  border-top: 1px solid #ededed;
}

.home-page.home-page--index .works-sort-tab:hover:not(.is-active) {
  background: #fafafa;
  color: #555;
}

.home-page.home-page--index .works-sort-tab.is-active {
  background: #fff;
  color: #222;
  font-weight: 500;
}

.home-page.home-page--index .works-sort-tab:focus-visible {
  outline: 2px solid #666;
  outline-offset: -2px;
  position: relative;
  z-index: 1;
}

/* ???Eindex: ??????E????????E????E??????E????E??????????E*/
.home-page.home-page--index .works-list .work-card,
.home-page.home-page--creator .creator-works .works-list .work-card {
  border: none;
}

/* ???E????: ?????E???? */
.home-page.home-page--index .works-list:not(.works-list--shelf) .work-card,
.home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) .work-card {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.home-page.home-page--index .works-list:not(.works-list--shelf) .work-card:hover,
.home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) .work-card:hover {
  border: none;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 8px 16px rgba(0, 0, 0, 0.05);
  transform: translateY(-8px);
}

/* ????: ????E???E???E????E+ inset + ????? */
.home-page.home-page--index .works-list.works-list--shelf .work-card,
.home-page.home-page--creator .creator-works .works-list.works-list--shelf .work-card {
  background-image:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.02) 42%,
      rgba(255, 255, 255, 0.06) 100%
    ),
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.22) 0 10%, transparent 34%),
    linear-gradient(
      90deg,
      transparent 0 64%,
      rgba(255, 255, 255, 0.16) 74%,
      rgba(255, 255, 255, 0.065) 84%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      var(--shelf-top-color, #f2f2f2) 0 54%,
      var(--shelf-top-color, #f2f2f2) 55%,
      var(--shelf-bottom-color, #e6e6e6) 56%,
      var(--shelf-bottom-color, #e6e6e6) 100%
    ),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.065) 0%,
      rgba(255, 255, 255, 0.1) 5%,
      transparent 20%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12) 0%,
      transparent 45%,
      rgba(0, 0, 0, 0.022) 100%
    );
  box-shadow:
    inset 0 8px 10px -10px rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.26),
    inset 2px 0 4px rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.12),
    inset -1px 0 2px rgba(255, 255, 255, 0.32),
    0 1px 0 rgba(var(--shelf-frame-rgb), 0.22),
    0 2px 2px -1px rgba(var(--shelf-frame-rgb), 0.18),
    0 1px 3px rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.1),
    0 5px 11px rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.09);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.home-page.home-page--index .works-list.works-list--shelf .work-card:not(.work-card--series)::after,
.home-page.home-page--creator .creator-works .works-list.works-list--shelf .work-card:not(.work-card--series)::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.06) 0%,
    rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.14) 48%,
    rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.08) 100%
  );
}

.home-page.home-page--index .works-list.works-list--shelf .work-card:hover,
.home-page.home-page--creator .creator-works .works-list.works-list--shelf .work-card:hover {
  border: none;
  box-shadow:
    inset 0 8px 10px -10px rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.3),
    inset 2px 0 4px rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.14),
    inset -1px 0 2px rgba(255, 255, 255, 0.36),
    0 1px 0 rgba(var(--shelf-frame-rgb), 0.24),
    0 2px 2px -1px rgba(var(--shelf-frame-rgb), 0.2),
    0 2px 6px rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.11),
    0 9px 18px rgba(var(--shelf-frame-rgb, 44, 29, 23), 0.1);
  transform: translateY(-8px);
}


.home-page.home-page--index .works-list:not(.works-list--shelf),
.home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) {
  gap: 8px;
}

/* トップ / マイページ: カード一覧（本棚以外）。auto-fill で「横幅に入る列数」だけトラックを確保し、
 * 作品が少ないときは空列が残り右に余白（各列は 1fr で均等伸縮＝固定幅ではない）。
 * auto-fit だと空列が潰れて少数カードだけが横幅いっぱいに肥大化するため使わない。 */
.home-page.home-page--index #works-list.works-list:not(.works-list--shelf),
.home-page.home-page--creator .creator-works #creator-works-list.works-list:not(.works-list--shelf) {
  display: grid;
  width: 100%;
  max-width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  justify-content: start;
  box-sizing: border-box;
}

.home-page.home-page--index #works-list.works-list:not(.works-list--shelf) > .works-empty-message,
.home-page.home-page--index #works-list.works-list:not(.works-list--shelf) > .works-empty-link,
.home-page.home-page--creator .creator-works #creator-works-list.works-list:not(.works-list--shelf) > .works-empty-message,
.home-page.home-page--creator .creator-works #creator-works-list.works-list:not(.works-list--shelf) > .works-empty-link {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.home-page.home-page--index .works-list.works-list--shelf,
.home-page.home-page--creator .creator-works .works-list.works-list--shelf {
  gap: 2px;
}

/* ??E ???????E+ ??????E????Endex ???E?E??E?E*/
.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-frame-main,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-frame-main {
  --shelf-rail-h: 22px;
  --shelf-post-w: 13px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  min-height: min(48vh, 470px);
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 32%),
    linear-gradient(90deg, rgba(var(--shelf-frame-rgb), 0.04) 0%, transparent 12%, transparent 88%, rgba(var(--shelf-frame-rgb), 0.04) 100%),
    linear-gradient(180deg, rgba(var(--shelf-frame-rgb), 0.03) 0%, rgba(var(--shelf-frame-rgb), 0.02) 100%),
    linear-gradient(180deg, #fff 0%, #fff 100%);
  box-shadow:
    inset 0 0 0 1px rgba(var(--shelf-frame-rgb), 0.12),
    inset 0 10px 24px rgba(255, 255, 255, 0.28),
    inset 8px 0 16px -8px rgba(var(--shelf-frame-rgb), 0.22),
    inset -8px 0 16px -8px rgba(var(--shelf-frame-rgb), 0.22),
    inset 0 -10px 18px -16px rgba(var(--shelf-frame-rgb), 0.22),
    inset 0 0 26px rgba(var(--shelf-frame-rgb), 0.03);
}

/* ??????????E?????????????E*/
.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-frame-main::before,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-frame-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      transparent 0,
      transparent calc(var(--shelf-rail-h) - 5px),
      rgba(var(--shelf-frame-rgb), 0.44) calc(var(--shelf-rail-h) - 1px),
      rgba(var(--shelf-frame-rgb), 0.13) calc(var(--shelf-rail-h) + 2px),
      transparent calc(var(--shelf-rail-h) + 8px)
    ),
    linear-gradient(
      180deg,
      transparent 0,
      transparent calc(100% - var(--shelf-rail-h) - 8px),
      rgba(var(--shelf-frame-rgb), 0.64) calc(100% - var(--shelf-rail-h) - 1px),
      rgba(var(--shelf-frame-rgb), 0.24) calc(100% - var(--shelf-rail-h) + 4px),
      transparent calc(100% - var(--shelf-rail-h) + 10px)
    ),
    linear-gradient(90deg, rgba(var(--shelf-frame-rgb), 0.36) 0, rgba(var(--shelf-frame-rgb), 0.1) 3px, transparent 11px),
    linear-gradient(270deg, rgba(var(--shelf-frame-rgb), 0.36) 0, rgba(var(--shelf-frame-rgb), 0.1) 3px, transparent 11px),
    radial-gradient(ellipse 20% 16% at 8% 12%, rgba(var(--shelf-frame-rgb), 0.06) 0%, transparent 68%),
    radial-gradient(ellipse 20% 16% at 92% 12%, rgba(var(--shelf-frame-rgb), 0.06) 0%, transparent 68%),
    radial-gradient(ellipse 22% 18% at 8% 88%, rgba(var(--shelf-frame-rgb), 0.07) 0%, transparent 72%),
    radial-gradient(ellipse 22% 18% at 92% 88%, rgba(var(--shelf-frame-rgb), 0.07) 0%, transparent 72%);
}

/* ??????E?????E?????????E?????? */
.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-frame-main::after,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-frame-main::after {
  content: "";
  position: absolute;
  right: 0;
  top: calc(var(--shelf-rail-h) + 2px);
  bottom: calc(var(--shelf-rail-h) + 20px);
  width: 2px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  background: linear-gradient(180deg, rgba(var(--shelf-frame-rgb), 0.62) 0%, rgba(var(--shelf-frame-rgb), 0.46) 55%, rgba(var(--shelf-frame-rgb), 0.68) 100%);
  box-shadow:
    1px 0 0 rgba(255, 255, 255, 0.14),
    -1px 0 0 rgba(var(--shelf-frame-rgb), 0.24);
}

.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) #works-list.works-list--shelf,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) #creator-works-list.works-list--shelf {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 10rem;
  align-content: flex-end;
  align-items: flex-end;
  padding-left: 2px;
  padding-top: 16px;
  padding-bottom: 0;
  box-sizing: border-box;
  box-shadow:
    inset 0 14px 20px -18px rgba(var(--shelf-frame-rgb), 0.26),
    inset 0 -8px 14px -12px rgba(var(--shelf-frame-rgb), 0.2);
}

.home-page.home-page--index .works-shelf-inner-floor,
.home-page.home-page--creator .creator-works .works-shelf-inner-floor {
  display: none;
}

.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-inner-floor,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-inner-floor {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--shelf-rail-h, 22px);
  height: 20px;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(var(--shelf-frame-rgb), 0.88) 0%, rgba(var(--shelf-frame-rgb), 1) 56%, rgba(var(--shelf-frame-rgb), 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(var(--shelf-frame-rgb), 0.42),
    inset 0 6px 12px rgba(var(--shelf-frame-rgb), 0.22);
  opacity: 0.94;
}

/* ???????E????????E?????E????E??E*/
.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-inner-floor::after,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-inner-floor::after {
  content: none;
}

/* ??E ??? + ???E?????????E???E???? pointer-events: none */
.home-page.home-page--index .works-shelf-frame,
.home-page.home-page--creator .creator-works .works-shelf-frame {
  display: block;
}

.home-page.home-page--index .works-shelf-frame-main,
.home-page.home-page--creator .creator-works .works-shelf-frame-main {
  display: block;
  min-width: 0;
}

.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf),
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) {
  --shelf-frame-color: #2c1d17;
  --shelf-frame-rgb: 44, 29, 23;
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr) 13px;
  column-gap: 0;
  row-gap: 0;
  gap: 0;
  align-items: stretch;
  margin-top: 6px;
  transform: rotateX(4deg);
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 20px 16px rgba(var(--shelf-frame-rgb), 0.19));
}

.home-page.home-page--index .works-shelf-post,
.home-page.home-page--creator .creator-works .works-shelf-post {
  display: none;
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(var(--shelf-frame-rgb), 0.16),
    inset 2px 0 0 rgba(255, 255, 255, 0.03),
    inset -2px 0 0 rgba(var(--shelf-frame-rgb), 0.22);
  background-color: rgba(var(--shelf-frame-rgb), 0.82);
  background-image:
    var(--shelf-grain-post-image),
    linear-gradient(90deg, rgba(var(--shelf-frame-rgb), 0.38) 0%, rgba(var(--shelf-frame-rgb), 0.22) 42%, rgba(var(--shelf-frame-rgb), 0.4) 100%);
  /* ???E??????E????????? --shelf-grain-post-right-image ?????E*/
  background-size: auto 100%, 100% 100%;
  background-repeat: no-repeat, no-repeat;
  background-position: center center, center center;
}

.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-post,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-post {
  display: block;
  z-index: 1;
}

.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-post--left,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-post--left {
  border-radius: 4px 0 0 4px;
  box-shadow:
    inset -2px 0 5px rgba(var(--shelf-frame-rgb), 0.2),
    inset 1px 0 0 rgba(255, 255, 255, 0.04),
    inset -3px 0 12px rgba(var(--shelf-frame-rgb), 0.26),
    -1px 0 0 rgba(var(--shelf-frame-rgb), 0.35);
}

.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-post--right,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-post--right {
  border-radius: 0 4px 4px 0;
  background-image:
    var(--shelf-grain-post-right-image),
    linear-gradient(90deg, rgba(var(--shelf-frame-rgb), 0.38) 0%, rgba(var(--shelf-frame-rgb), 0.22) 42%, rgba(var(--shelf-frame-rgb), 0.4) 100%);
  box-shadow:
    inset 2px 0 5px rgba(var(--shelf-frame-rgb), 0.2),
    inset -1px 0 0 rgba(255, 255, 255, 0.04),
    inset 3px 0 12px rgba(var(--shelf-frame-rgb), 0.26),
    1px 0 0 rgba(var(--shelf-frame-rgb), 0.35);
}

.home-page.home-page--index .works-shelf-post::before,
.home-page.home-page--creator .creator-works .works-shelf-post::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(var(--shelf-frame-rgb), 0.08) 0%, transparent 40%, transparent 60%, rgba(var(--shelf-frame-rgb), 0.1) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, transparent 48%, rgba(var(--shelf-frame-rgb), 0.1) 100%);
  opacity: 0.38;
}

.home-page.home-page--index .works-shelf-post::after,
.home-page.home-page--creator .creator-works .works-shelf-post::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 90% 120% at 30% 25%, rgba(255, 255, 255, 0.03) 0%, transparent 55%),
    radial-gradient(ellipse 80% 100% at 70% 75%, rgba(var(--shelf-frame-rgb), 0.09) 0%, transparent 50%);
  opacity: 0.26;
}

/* ????E???? .works-shelf-wood?E?E*/
.home-page.home-page--index .works-shelf-wood,
.home-page.home-page--creator .creator-works .works-shelf-wood {
  display: none;
  width: 100%;
  max-width: 100%;
  height: 22px;
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  pointer-events: none;
  box-shadow:
    0 2px 6px rgba(var(--shelf-frame-rgb), 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -2px 3px rgba(var(--shelf-frame-rgb), 0.18);
  background-color: rgba(var(--shelf-frame-rgb), 0.75);
  background-image:
    var(--shelf-grain-image),
    linear-gradient(180deg, rgba(var(--shelf-frame-rgb), 0.16) 0%, rgba(var(--shelf-frame-rgb), 0.08) 44%, rgba(var(--shelf-frame-rgb), 0.18) 100%);
  background-size: auto 120%, 100% 100%;
  background-repeat: repeat-x, no-repeat;
  background-position: left center, center center;
  background-blend-mode: normal;
}

.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-wood,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-wood {
  display: block;
  border-radius: 0;
}

.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-frame-main > .works-shelf-wood:first-of-type,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-frame-main > .works-shelf-wood:first-of-type {
  flex-shrink: 0;
  margin-bottom: 10px;
  box-shadow:
    0 2px 6px rgba(var(--shelf-frame-rgb), 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 2px rgba(var(--shelf-frame-rgb), 0.16),
    inset 0 -4px 9px rgba(var(--shelf-frame-rgb), 0.25),
    inset 0 0 0 1px rgba(var(--shelf-frame-rgb), 0.28);
}

.home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-frame-main > .works-shelf-wood:last-of-type,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-frame-main > .works-shelf-wood:last-of-type {
  flex-shrink: 0;
  margin-top: 0;
  position: relative;
  z-index: 2;
  width: calc(100% + var(--shelf-post-w, 13px));
  max-width: none;
  margin-right: calc(-1 * var(--shelf-post-w, 13px));
  box-shadow:
    0 4px 10px rgba(var(--shelf-frame-rgb), 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -2px 3px rgba(var(--shelf-frame-rgb), 0.22),
    inset 0 8px 18px rgba(var(--shelf-frame-rgb), 0.4),
    inset 0 -1px 0 rgba(var(--shelf-frame-rgb), 0.5),
    inset 0 0 0 1px rgba(var(--shelf-frame-rgb), 0.46);
}

.home-page.home-page--index .works-shelf-wood::before,
.home-page.home-page--creator .creator-works .works-shelf-wood::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(var(--shelf-frame-rgb), 0.14) 0%, transparent 28%, transparent 72%, rgba(var(--shelf-frame-rgb), 0.1) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 40%, rgba(var(--shelf-frame-rgb), 0.08) 100%);
  opacity: 0.11;
}

.home-page.home-page--index .works-shelf-wood::after,
.home-page.home-page--creator .creator-works .works-shelf-wood::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 150% 240% at 16% 48%, rgba(255, 255, 255, 0.03) 0%, transparent 54%),
    radial-gradient(ellipse 130% 190% at 84% 32%, rgba(var(--shelf-frame-rgb), 0.1) 0%, transparent 50%);
  opacity: 0.09;
}

.home-page.home-page--index .work-card-actions,
.home-page.home-page--creator .creator-works .work-card-actions {
  display: none;
}

.home-page.home-page--index .works-view-mode-controls {
  margin-bottom: 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 4px;
}

.home-page.home-page--creator .creator-works .creator-works-toolbar-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.home-page.home-page--creator .creator-works .works-view-mode-controls {
  margin-bottom: 0;
  gap: 4px;
  justify-content: flex-end;
}

.home-page.home-page--creator .creator-works .works-view-mode-button,
.home-page.home-page--creator .creator-works .works-view-mode-button.is-active,
.home-page.home-page--creator .creator-works .works-view-mode-button:hover:not(.is-active) {
  background: transparent;
  border-color: transparent;
  transition: box-shadow 0.15s ease;
}

.home-page.home-page--creator .creator-works .works-view-mode-button:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.home-page.home-page--creator .creator-works .works-view-mode-button svg * {
  stroke-width: 1.35;
}

.home-page.home-page--creator .creator-works .home-header-sort-mount .works-sort-controls--tabs {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
}

.home-page.home-page--creator .creator-works .works-sort-tabstrip {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 9rem;
  padding: 2px 0;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.home-page.home-page--creator .creator-works .works-sort-controls--tabs:hover .works-sort-tabstrip,
.home-page.home-page--creator .creator-works .works-sort-controls--tabs:focus-within .works-sort-tabstrip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-page.home-page--creator .creator-works .works-sort-tab {
  margin: 0;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.8rem;
  color: #777;
  border: none;
  background: #fff;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.home-page.home-page--creator .creator-works .works-sort-tab + .works-sort-tab {
  border-top: 1px solid #ededed;
}

.home-page.home-page--creator .creator-works .works-sort-tab:hover:not(.is-active) {
  background: #fafafa;
  color: #555;
}

.home-page.home-page--creator .creator-works .works-sort-tab.is-active {
  background: #fff;
  color: #222;
  font-weight: 500;
}

.home-page.home-page--creator .creator-notice-button svg {
  width: 26.5px;
  height: 26.5px;
}

.home-page.home-page--creator .creator-works .work-card-description {
  display: none;
}

.home-page.home-page--index .works-view-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--shelf-frame-color);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.home-page.home-page--index .works-view-mode-button:hover:not(.is-active) {
  background: rgba(0, 0, 0, 0.05);
}

.home-page.home-page--index .works-view-mode-button.is-active {
  background: rgba(0, 0, 0, 0.07);
  border-color: #d8d8d8;
  color: var(--shelf-frame-color);
}

.home-page.home-page--index .works-view-mode-button:focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .home-page.home-page--index > .home-header.home-header--index {
    margin: 0 -16px 20px -16px;
    padding: 38px 16px 18px;
    background-size: 100% 100%, 650% auto;
  }

  .home-page.home-page--creator > .home-header.home-header--creator {
    margin: 0 -16px 20px -16px;
    padding: 38px 16px 18px;
    background-size: 100% 100%, 650% auto;
  }

  .home-page.home-page--creator .home-logo {
    width: 250px;
    max-width: 100%;
    height: 36px;
    line-height: 36px;
  }

  .home-page.home-page--creator .home-header-index-brand {
    min-height: 36px;
  }

  .home-page.home-page--creator .home-logo-combined {
    height: 56px;
  }

  .home-page.home-page--creator .home-header-mypage-label {
    font-size: 0.84rem;
  }

  .home-page.home-page--creator .home-header-index-actions--creator {
    gap: 2px;
  }

  .home-page.home-page--creator .creator-post-button {
    height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .home-page.home-page--creator .works-section--creator {
    min-height: calc(100vh - 198px);
    justify-content: center;
    padding: 12px 16px 32px;
  }

  .home-page.home-page--creator .creator-auth-panel {
    width: 90%;
    max-width: 360px;
    padding: 6px 0 0;
  }

  .home-page.home-page--creator .creator-login-title {
    font-size: 1.4rem;
  }

  .home-page.home-page--creator .works-section--creator .home-actions,
  .home-page.home-page--creator #creator-current-email,
  .home-page.home-page--creator p:has(#creator-exit-mode),
  .home-page.home-page--creator .works-section--creator > .back-link {
    width: 90%;
    max-width: 360px;
  }

  .home-page.home-page--creator .works-section--creator .home-actions {
    width: 100%;
    max-width: none;
  }

  .home-page.home-page--creator .creator-dashboard-title {
    font-size: 1.55rem;
  }

  .home-page.home-page--creator .creator-dashboard {
    flex-direction: column;
    gap: 1px;
  }

  .home-page.home-page--creator .creator-profile {
    width: 100%;
  }

  /* マイページ スマホ: プロフィールとヘッダー帯の間隔（ログイン後 #creator-actions 表示時のみ） */
  .home-page.home-page--creator:has(#creator-actions:not([hidden])) > .home-header.home-header--creator {
    margin: 0 -16px 12px -16px;
    padding-bottom: 12px;
  }

  .home-page.home-page--creator .works-section--creator:has(#creator-actions:not([hidden])) {
    padding-top: 9px;
  }

  .home-page.home-page--creator .works-section--creator:has(#creator-actions:not([hidden])) .home-actions {
    margin-top: 6px;
  }

  .home-page.home-page--creator .works-section--creator:has(#creator-actions:not([hidden])) .creator-dashboard {
    margin-top: 0;
  }

  /* マイページ スマホ: プロフィール文と本棚（＋その上のアイコン）の間を少し詰める */
  .home-page.home-page--creator .creator-works .creator-works-toolbar-inline {
    margin-top: 0;
    margin-bottom: 4px;
  }

  .home-page.home-page--creator .creator-works .works-shelf-frame {
    margin-top: 0;
  }

  /* マイページ スマホ: 画像左・ユーザー名＋編集ペン右、その下にプロフィール文 */
  .home-page.home-page--creator .creator-profile-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas:
      "avatar head"
      "bio bio"
      "editor editor"
      "message message";
    column-gap: 10px;
    row-gap: 6px;
    align-items: start;
  }

  .home-page.home-page--creator .creator-profile-card .creator-avatar {
    grid-area: avatar;
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    align-self: center;
  }

  .home-page.home-page--creator .creator-profile-card .creator-profile-head {
    grid-area: head;
    margin-top: 0;
    margin-bottom: 0;
    align-self: center;
    min-width: 0;
    gap: 5px;
  }

  .home-page.home-page--creator .creator-profile-card .creator-profile-head .creator-name {
    min-width: 0;
    word-break: break-word;
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .home-page.home-page--creator .creator-profile-card .creator-bio {
    grid-area: bio;
    font-size: 0.76rem;
    line-height: 1.45;
  }

  .home-page.home-page--creator .creator-profile-card .creator-profile-edit-button {
    width: 22px;
    height: 22px;
  }

  .home-page.home-page--creator .creator-profile-card .creator-profile-edit-button svg {
    width: 12px;
    height: 12px;
  }

  .home-page.home-page--creator .creator-profile-card .creator-profile-label {
    font-size: 0.7rem;
    margin-bottom: 3px;
  }

  .home-page.home-page--creator .creator-profile-card .creator-profile-input {
    font-size: 0.78rem;
    padding: 6px 8px;
    margin-bottom: 6px;
  }

  .home-page.home-page--creator .creator-profile-card .creator-profile-textarea {
    min-height: 62px;
  }

  .home-page.home-page--creator .creator-profile-card .creator-profile-editor {
    grid-area: editor;
    margin-top: 0;
  }

  .home-page.home-page--creator .creator-profile-card .creator-profile-message {
    grid-area: message;
    margin-top: 0;
    font-size: 0.68rem;
  }

  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf),
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) {
    grid-template-columns: 9px minmax(0, 1fr) 9px;
    transform: rotateX(3.2deg);
    filter: drop-shadow(0 16px 12px rgba(var(--shelf-frame-rgb), 0.14));
  }

  .home-page.home-page--index .works-shelf-frame .works-shelf-wood,
  .home-page.home-page--creator .creator-works .works-shelf-frame .works-shelf-wood {
    height: 14px;
  }

  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-frame-main,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-frame-main {
    --shelf-rail-h: 14px;
    --shelf-post-w: 9px;
    min-height: min(48vh, 420px);
    padding: 0;
  }

  /* ??????????????E?EC ?????????E?E??E?E*/
  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-inner-floor,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-inner-floor {
    background-color: rgba(var(--shelf-frame-rgb), 0.75);
    background-image:
      var(--shelf-grain-image),
      linear-gradient(180deg, rgba(var(--shelf-frame-rgb), 0.88) 0%, rgba(var(--shelf-frame-rgb), 1) 56%, rgba(var(--shelf-frame-rgb), 0.9) 100%);
    background-size: auto 120%, 100% 100%;
    background-repeat: repeat-x, no-repeat;
    background-position: center center, center center;
    /* ????????????E?????????E??????????E?E*/
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      inset 0 -1px 0 rgba(var(--shelf-frame-rgb), 0.42),
      inset 0 4px 12px rgba(var(--shelf-frame-rgb), 0.24),
      0 -10px 22px -2px rgba(var(--shelf-frame-rgb), 0.19);
  }

  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-post::before,
  .home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-post::before {
    opacity: 0.22;
  }

  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-post::after,
  .home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-post::after {
    opacity: 0.16;
  }

  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) #works-list.works-list--shelf,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) #creator-works-list.works-list--shelf {
    --shelf-mobile-wrap-line-h: 342px;
    --shelf-mobile-wrap-air: 12px;
    --shelf-mobile-wrap-board: 14px;
    --shelf-mobile-wrap-period: calc(
      var(--shelf-mobile-wrap-line-h) + var(--shelf-mobile-wrap-air) + var(--shelf-mobile-wrap-board)
    );
    padding-top: 12px;
    min-height: 8rem;
    column-gap: 2px;
    /* ??E ?????E????E??????E????E????????????????E?E*/
    row-gap: calc(var(--shelf-mobile-wrap-board) + var(--shelf-mobile-wrap-air));
    background-color: #fff;
    background-image:
      linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 30%),
      linear-gradient(90deg, rgba(var(--shelf-frame-rgb), 0.04) 0%, transparent 10%, transparent 90%, rgba(var(--shelf-frame-rgb), 0.04) 100%),
      /* ??????????E????E???E?E?????E?E*/
      linear-gradient(
        180deg,
        transparent 0%,
        transparent 74%,
        rgba(var(--shelf-frame-rgb), 0.07) 84%,
        rgba(var(--shelf-frame-rgb), 0.11) 92%,
        rgba(var(--shelf-frame-rgb), 0.08) 100%
      ),
      radial-gradient(115% 48% at 50% 100%, rgba(var(--shelf-frame-rgb), 0.14) 0%, transparent 58%);
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    /* PC ??? inset ???????????????E?????E?E*/
    box-shadow:
      inset 0 12px 18px -14px rgba(var(--shelf-frame-rgb), 0.24),
      inset 0 -12px 26px -7px rgba(var(--shelf-frame-rgb), 0.21);
  }

  /* ?E??E???????E???????E???E?????E???E?E*/
  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) #works-list.works-list--shelf > *,
  .home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) #creator-works-list.works-list--shelf > * {
    position: relative;
    z-index: 2;
  }

  /* ???E??: ??????E????????E??????E??????? padding-top ??E?????????? */
  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) #works-list.works-list--shelf::before,
  .home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) #creator-works-list.works-list--shelf::before {
    content: "";
    position: absolute;
    /* ??E??E????????? 2px ???E???????????????? */
    left: -2px;
    right: calc(-1 * var(--shelf-post-w, 9px));
    top: 12px;
    bottom: 0;
    width: auto;
    z-index: 1;
    pointer-events: none;
    background-color: rgba(var(--shelf-frame-rgb), 0.75);
    background-image:
      var(--shelf-grain-image),
      linear-gradient(180deg, rgba(var(--shelf-frame-rgb), 0.16) 0%, rgba(var(--shelf-frame-rgb), 0.08) 44%, rgba(var(--shelf-frame-rgb), 0.18) 100%);
    background-size: auto 120%, 100% 100%;
    background-repeat: repeat-x, no-repeat;
    background-position: left center, center center;
    box-shadow:
      0 2px 5px rgba(var(--shelf-frame-rgb), 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      inset 0 -1px 2px rgba(var(--shelf-frame-rgb), 0.16),
      inset 0 -3px 7px rgba(var(--shelf-frame-rgb), 0.22),
      inset 0 0 0 1px rgba(var(--shelf-frame-rgb), 0.26);
    -webkit-mask-image: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent var(--shelf-mobile-wrap-line-h),
      #000 var(--shelf-mobile-wrap-line-h),
      #000 calc(var(--shelf-mobile-wrap-line-h) + var(--shelf-mobile-wrap-board)),
      transparent calc(var(--shelf-mobile-wrap-line-h) + var(--shelf-mobile-wrap-board)),
      transparent var(--shelf-mobile-wrap-period)
    );
    -webkit-mask-size: 100% var(--shelf-mobile-wrap-period);
    -webkit-mask-repeat: repeat-y;
    mask-image: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent var(--shelf-mobile-wrap-line-h),
      #000 var(--shelf-mobile-wrap-line-h),
      #000 calc(var(--shelf-mobile-wrap-line-h) + var(--shelf-mobile-wrap-board)),
      transparent calc(var(--shelf-mobile-wrap-line-h) + var(--shelf-mobile-wrap-board)),
      transparent var(--shelf-mobile-wrap-period)
    );
    mask-size: 100% var(--shelf-mobile-wrap-period);
    mask-repeat: repeat-y;
  }

  /*
   * ?????E ?????????E??????????????????E   * ??????E? .works-shelf-post ????????E???????????E??????????E   * ??? ::before?E???????E????????E????E?????? z-index ??E???E   */
  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) #works-list.works-list--shelf::after,
  .home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) #creator-works-list.works-list--shelf::after {
    content: "";
    position: absolute;
    left: -2px;
    right: calc(-1 * var(--shelf-post-w, 9px));
    top: calc(
      12px + var(--shelf-mobile-wrap-line-h) + var(--shelf-mobile-wrap-board) + var(--shelf-mobile-wrap-air)
    );
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    /* ??????????E?????????????E??????? 9px ????E???E???? */
    background-color: transparent;
    background-image:
      var(--shelf-grain-post-image),
      linear-gradient(90deg, rgba(var(--shelf-frame-rgb), 0.32) 0%, rgba(var(--shelf-frame-rgb), 0.12) 9px, transparent 9px),
      var(--shelf-grain-post-right-image),
      linear-gradient(270deg, rgba(var(--shelf-frame-rgb), 0.32) 0%, rgba(var(--shelf-frame-rgb), 0.12) 9px, transparent 9px);
    background-size: 9px 100%, 100% 100%, 9px 100%, 100% 100%;
    background-position: left top, left top, right top, right top;
    background-repeat: repeat-y, no-repeat, repeat-y, no-repeat;
    box-shadow:
      inset 2px 0 5px rgba(var(--shelf-frame-rgb), 0.12),
      inset -2px 0 5px rgba(var(--shelf-frame-rgb), 0.12);
    -webkit-mask-image: repeating-linear-gradient(
      to bottom,
      #000 0,
      #000 var(--shelf-mobile-wrap-line-h),
      transparent var(--shelf-mobile-wrap-line-h),
      transparent var(--shelf-mobile-wrap-period)
    );
    -webkit-mask-size: 100% var(--shelf-mobile-wrap-period);
    -webkit-mask-repeat: repeat-y;
    mask-image: repeating-linear-gradient(
      to bottom,
      #000 0,
      #000 var(--shelf-mobile-wrap-line-h),
      transparent var(--shelf-mobile-wrap-line-h),
      transparent var(--shelf-mobile-wrap-period)
    );
    mask-size: 100% var(--shelf-mobile-wrap-period);
    mask-repeat: repeat-y;
  }

  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf) .works-shelf-frame-main::after,
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) .works-shelf-frame-main::after {
    width: 1px;
    bottom: calc(var(--shelf-rail-h) + 16px);
  }

}

/* Override @media (max-width: 600px) large header padding when the band is compact (index only) */
@media (max-width: 600px) {
  @container headerband (max-width: 520px) {
    .home-page.home-page--index > .home-header.home-header--index {
      padding: 4px 16px;
      margin: 0 -16px 6px -16px;
    }
  }
}

/* スマホ: index / creator 一覧カード（本棚以外）— padding 縮小・角丸・ホバー無効化 */
@media (max-width: 600px) {
  .home-page.home-page--index .works-list:not(.works-list--shelf) .work-card,
  .home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) .work-card {
    padding: 14px 16px;
    border-radius: 8px;
  }

  .home-page.home-page--index .works-list:not(.works-list--shelf) .work-card:hover,
  .home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) .work-card:hover {
    transform: none;
  }

  .home-page.home-page--index .works-list:not(.works-list--shelf) .work-card-title,
  .home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) .work-card-title {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .home-page.home-page--index .works-list:not(.works-list--shelf) .work-card-meta,
  .home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) .work-card-meta {
    margin-bottom: 8px;
    gap: 3px 10px;
  }

  .home-page.home-page--index .works-list:not(.works-list--shelf) .work-card-description,
  .home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) .work-card-description {
    font-size: 0.84rem;
    line-height: 1.65;
  }

  .home-page.home-page--index #works-list.works-list:not(.works-list--shelf) {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page.home-page--index .works-section:has(.works-shelf-frame:has(#works-list.works-list--shelf)), .home-page.home-page--creator .creator-works:has(.works-shelf-frame:has(#creator-works-list.works-list--shelf)) {
    perspective: none;
    padding-bottom: 0;
  }

  .home-page.home-page--index .works-shelf-frame:has(#works-list.works-list--shelf),
.home-page.home-page--creator .creator-works .works-shelf-frame:has(#creator-works-list.works-list--shelf) {
    transform: none;
    filter: none;
  }
}

.work-card-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.work-card-views,
.work-card-likes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.work-card-stat-icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.home-page.home-page--creator .creator-works .creator-card-menu {
  margin-left: auto;
  position: relative;
}

.home-page.home-page--creator .creator-works .creator-card-menu-summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  color: #666;
}

.home-page.home-page--creator .creator-works .creator-card-menu-summary::-webkit-details-marker {
  display: none;
}

.home-page.home-page--creator .creator-works .creator-card-menu-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  min-width: 74px;
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.home-page.home-page--creator .creator-works .creator-card-menu-item {
  border: none;
  background: transparent;
  text-align: left;
  font-size: 0.72rem;
  color: #444;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.home-page.home-page--creator .creator-works .creator-card-menu-item:hover {
  background: #f6f6f6;
}

.home-page.home-page--creator .creator-works .creator-card-menu-item--danger {
  color: #8f2b2b;
}

/* ???????????: ? ??????????????? stats ????????????????? */
.home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) .work-card--published {
  display: flex;
  flex-direction: column;
}

.home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) .work-card--published > .work-card-link {
  flex: 1 1 auto;
  min-height: 0;
}

.home-page.home-page--creator .creator-works .works-list:not(.works-list--shelf) .work-card--published > .creator-card-menu {
  align-self: flex-end;
  flex-shrink: 0;
  margin-top: 10px;
}

/* ????????: ? ??????????????????? 54?56% ???? 55%? */
.home-page.home-page--creator .creator-works .works-list--shelf .work-card--published > .creator-card-menu {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin-left: 0;
  z-index: 8;
}

.home-page.home-page--creator .creator-works .works-list--shelf .work-card--published:hover,
.home-page.home-page--creator .creator-works .works-list--shelf .work-card--published:focus-within {
  overflow: visible;
  z-index: 14;
}

@media (hover: hover) and (pointer: fine) {
  .home-page.home-page--creator .creator-works .works-list--shelf .work-card--published > .creator-card-menu {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
  }

  .home-page.home-page--creator .creator-works .works-list--shelf .work-card--published:hover > .creator-card-menu,
  .home-page.home-page--creator .creator-works .works-list--shelf .work-card--published:focus-within > .creator-card-menu {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (hover: none), (pointer: coarse) {
  .home-page.home-page--creator .creator-works .works-list--shelf .work-card--published > .creator-card-menu {
    opacity: 1;
    pointer-events: auto;
  }
}

/* reader.html: ???????????????????????????????????? */
.paged-reader-toolbar-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-nav-button.page-nav-button--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: #a8a8a8;
}

.page-nav-button.page-nav-button--icon:hover:not(:disabled) {
  border: none;
  color: #959595;
}

.page-nav-button.page-nav-button--icon:disabled {
  opacity: 0.35;
}

.page-nav-button--icon .page-nav-icon {
  display: block;
}

.paged-reader-toolbar .font-size-controls {
  border: none;
  background: transparent;
  gap: 10px;
}

.paged-reader-toolbar .font-size-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-right: none;
  background: transparent;
  min-width: 36px;
  color: #a8a8a8;
}

.paged-reader-toolbar .font-size-button:not(.is-active) {
  opacity: 0.78;
}

.paged-reader-toolbar .font-size-button.is-active {
  background: transparent;
  color: #a8a8a8;
  opacity: 1;
}

.paged-reader-toolbar .font-size-button:hover {
  opacity: 1;
}

.reader-font-size-dot {
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
}

.reader-font-size-dot--small {
  width: 5px;
  height: 5px;
}

.reader-font-size-dot--medium {
  width: 8px;
  height: 8px;
}

.reader-font-size-dot--large {
  width: 12px;
  height: 12px;
}

.reader-page-indicator.page-indicator {
  position: absolute;
  top: 8px;
  right: 12px;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: 4;
  font-size: 0.64rem;
  font-weight: 400;
  color: #a8a8a8;
  opacity: 0.52;
  pointer-events: none;
  line-height: 1.2;
  text-align: right;
  letter-spacing: 0.02em;
  transition: opacity 0.22s ease;
}

.paged-reader-viewport:hover .reader-page-indicator.page-indicator {
  opacity: 0.74;
}

@media (hover: none), (pointer: coarse) {
  .reader-page-indicator.page-indicator {
    opacity: 0.56;
  }
}

@media (max-width: 600px) {
  .page-nav-button.page-nav-button--icon {
    width: 44px;
    height: 44px;
  }

  .reader-page-indicator.page-indicator {
    font-size: 0.6rem;
    top: 5px;
    right: 10px;
  }

  /* reader スマホ: 文字サイズ・ページ送りを一段に（PCは変更なし） */
  .home-page.home-page--reader .paged-reader-toolbar {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 10px;
  }

  .home-page.home-page--reader .paged-reader-toolbar .font-size-controls {
    order: 0;
    width: auto;
    flex: 0 0 auto;
    gap: 6px;
    justify-content: flex-start;
  }

  .home-page.home-page--reader .paged-reader-toolbar .font-size-button {
    flex: 0 0 auto;
    min-width: 0;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: inherit;
  }

  .home-page.home-page--reader .paged-reader-toolbar-nav {
    flex: 0 0 auto;
    gap: 2px;
  }

  .home-page.home-page--reader .page-nav-button.page-nav-button--icon {
    width: 30px;
    height: 30px;
  }

  .home-page.home-page--reader .page-nav-button--icon .page-nav-icon {
    width: 17px;
    height: 17px;
  }

  .home-page.home-page--reader .reader-font-size-dot--small {
    width: 5px;
    height: 5px;
  }

  .home-page.home-page--reader .reader-font-size-dot--medium {
    width: 7px;
    height: 7px;
  }

  .home-page.home-page--reader .reader-font-size-dot--large {
    width: 10px;
    height: 10px;
  }

  .home-page.home-page--reader .paged-reader-toolbar .reader-writing-mode-button {
    width: auto;
    min-width: 44px;
    padding: 0 6px;
    white-space: nowrap;
    font-size: 0.68rem;
    letter-spacing: -0.02em;
  }
}

/* ?????: ???????/????reader-work-meta? */
.reader-work-meta {
  margin-top: 10px;
  max-width: 720px;
}

.reader-work-meta.reader-work-meta--inline {
  margin-top: 0;
  max-width: none;
}

.reader-work-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.reader-work-meta--inline .reader-work-meta-row {
  gap: 8px 12px;
  flex-wrap: nowrap;
}

.reader-work-author-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
}

.reader-work-author-link {
  color: inherit;
  text-decoration: none;
}

.reader-work-author-link:hover .reader-work-display-name {
  text-decoration: underline;
}

.reader-work-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ececec;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #a8a8a8;
}

.reader-work-avatar-inner {
  line-height: 1;
}

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

.reader-work-author-text {
  min-width: 0;
}

.reader-work-inline {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  transform: translateY(10px);
}

.reader-work-display-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
}

.reader-work-inline-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #a8a8a8;
  font-variant-numeric: tabular-nums;
}

.reader-work-inline-meta svg {
  width: 16px;
  height: 16px;
}

.reader-work-inline-meta .reader-heart-svg {
  width: 18px;
  height: 18px;
}

.reader-work-inline-meta--views {
  transform: translateY(2px);
}

.reader-work-inline-meta--like {
  border: none;
  margin: 0;
  padding: 2px 4px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: #a8a8a8;
  border-radius: 6px;
  transform: translateY(2px);
}

.reader-work-inline-meta--like .reader-heart-svg--outline {
  display: block;
}

.reader-work-inline-meta--like .reader-heart-svg--filled {
  display: none;
}

.reader-work-inline-meta--like.is-liked .reader-heart-svg--outline {
  display: none;
}

.reader-work-inline-meta--like.is-liked .reader-heart-svg--filled {
  display: block;
}

.reader-work-inline-meta--like:hover:not(:disabled) {
  color: #949494;
  background: rgba(0, 0, 0, 0.04);
}

.reader-work-inline-meta--like:disabled {
  cursor: default;
}

.reader-work-inline-meta--like.is-liked {
  color: #d65c7a;
}

/* :hover が .is-liked より詳細度が高いため、ホバー中もピンクを維持する */
.reader-work-inline-meta--like.is-liked:hover:not(:disabled) {
  color: #d65c7a;
  background: rgba(214, 92, 122, 0.1);
}

.reader-work-inline-meta--like.is-liked:disabled {
  opacity: 1;
}

.reader-work-inline-meta--like:focus-visible {
  outline: 2px solid #ccc;
  outline-offset: 2px;
}

.reader-work-subline {
  margin-top: 5px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #a8a8a8;
}

.reader-work-date {
  color: #a8a8a8;
}

.reader-work-meta-sep {
  color: #c8c8c8;
}

.reader-work-meta-chips {
  color: #a8a8a8;
}

.reader-work-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  color: #a8a8a8;
  margin-top: 28px;
}

.reader-work-meta--inline .reader-work-author-block { gap: 10px; }

.reader-work-meta--inline .reader-work-avatar {
  width: 30px;
  height: 30px;
}

.reader-work-meta--inline .reader-work-display-name {
  font-size: 0.84rem;
}

.reader-work-meta--inline .reader-work-inline {
  gap: 8px;
}

@media (max-width: 600px) {
  .home-page.home-page--reader .reader-meta-heading-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .home-page.home-page--reader .reader-meta-heading-row .title {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    width: 100%;
    margin-bottom: 0;
    font-size: 1.08rem;
    line-height: 1.4;
    letter-spacing: 0.02em;
  }

  .home-page.home-page--reader .reader-meta-heading-side {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transform: none;
  }

  .home-page.home-page--reader #work-info {
    flex: 1;
    min-width: 0;
  }

  .home-page.home-page--reader .reader-work-meta--inline .reader-work-meta-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 6px 8px;
  }

  .home-page.home-page--reader .reader-work-meta--inline .reader-work-author-block {
    flex: 1;
    min-width: 0;
    align-items: center;
    gap: 6px;
  }

  .home-page.home-page--reader .reader-work-meta--inline .reader-work-avatar {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
  }

  .home-page.home-page--reader .reader-work-meta--inline .reader-work-inline {
    transform: none;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
  }

  .home-page.home-page--reader .reader-work-meta--inline .reader-work-inline-meta {
    font-size: 0.68rem;
    gap: 3px;
  }

  .home-page.home-page--reader .reader-work-meta--inline .reader-work-inline-meta svg {
    width: 13px;
    height: 13px;
  }

  .home-page.home-page--reader .reader-work-meta--inline .reader-work-inline-meta .reader-heart-svg {
    width: 14px;
    height: 14px;
  }

  .home-page.home-page--reader .reader-work-meta--inline .reader-heart-wrap {
    width: 14px;
    height: 14px;
  }

  .home-page.home-page--reader .reader-work-meta--inline .reader-work-inline-meta--views,
  .home-page.home-page--reader .reader-work-meta--inline .reader-work-inline-meta--like {
    transform: translateY(1px);
  }

  .home-page.home-page--reader .reader-work-inline-meta--date {
    display: none !important;
  }

  .home-page.home-page--reader .reader-meta-fold-date {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #a8a8a8;
  }

  .home-page.home-page--reader .reader-meta-fold-date .reader-work-date {
    color: inherit;
  }

  .home-page.home-page--reader .reader-meta.reader-meta--fold-date-only .reader-meta-fold-toggle {
    display: inline-flex;
  }

  .home-page.home-page--reader .reader-meta.reader-meta--fold-date-only .reader-meta-description {
    display: none;
  }

  .home-page.home-page--reader .reader-work-meta--inline .reader-work-display-name {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.3;
    transform: translateY(1.5px);
  }
}

.reader-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.reader-stat-svg,
.reader-heart-svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@keyframes reader-heart-soft-pop {
  0% {
    transform: scale(1);
  }
  44% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}

.reader-heart-wrap.reader-heart-wrap--soft-pop {
  animation: reader-heart-soft-pop 0.44s cubic-bezier(0.25, 0.8, 0.35, 1) forwards;
  transform-origin: center center;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .reader-heart-wrap.reader-heart-wrap--soft-pop {
    animation: none;
    will-change: auto;
  }
}

.reader-heart-wrap {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reader-heart-wrap .reader-heart-svg {
  position: absolute;
  left: 0;
  top: 0;
}

.reader-stat--like {
  border: none;
  margin: 0;
  padding: 4px 6px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 6px;
  align-items: center;
}

.reader-stat--like:hover:not(:disabled) {
  color: #949494;
  background: rgba(0, 0, 0, 0.04);
}

.reader-stat--like:disabled {
  cursor: default;
}

.reader-stat--like.is-liked {
  color: #d65c7a;
}

.reader-stat--like.is-liked:disabled {
  opacity: 1;
}

.reader-stat--like:focus-visible {
  outline: 2px solid #ccc;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .reader-work-meta-row {
    align-items: flex-start;
  }
}

/* reader.html: ????????????? */
.home-page.home-page--reader {
  min-height: 100vh;
  padding: 0 20px 56px;
  font-family: "Playfair Display", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "MS Mincho", serif;
}

.home-page.home-page--reader > .home-header.home-header--reader {
  background-color: #f7f4ee;
  background-image: linear-gradient(rgba(255, 253, 246, 0.42), rgba(247, 244, 238, 0.38));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center center;
  margin: 0 -20px 10px -20px;
  padding: 12px 20px;
  border-bottom: none;
  max-width: none;
  position: relative;
  z-index: 60;
}

.home-page.home-page--reader > .home-header.home-header--reader::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 28px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(247, 244, 238, 0) 0%,
    rgba(247, 244, 238, 0.14) 42%,
    rgba(247, 244, 238, 0) 100%
  );
}

.home-page.home-page--reader .home-header--reader-inner {
  max-width: none;
  width: 100%;
  margin: 0;
}

.home-page.home-page--reader .home-header-reader-brand {
  flex: 0 0 auto;
  min-width: 0;
}

.home-header.home-header--reader .home-header-reader-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  transform: translateY(4px);
}

.home-page.home-page--reader .home-header-search-slot {
  position: relative;
}

.home-page.home-page--reader .home-header-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--shelf-frame-color, #2c1d17);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1;
  font: inherit;
}

.home-page.home-page--reader .home-header-icon-button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.home-page.home-page--reader .home-header-icon-button:focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
}

.home-page.home-page--reader .home-header-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: min(320px, calc(100vw - 40px));
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.home-page.home-page--reader .home-header-search-panel .works-list-search {
  width: 100%;
  max-width: none;
}

.home-page.home-page--reader .home-logo-reader-mark {
  position: relative;
  display: inline-block;
  width: 300px;
  max-width: 100%;
  height: 42px;
  line-height: 42px;
  margin: 0;
  overflow: visible;
}

.home-page.home-page--reader .home-logo-reader-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.home-page.home-page--reader .home-logo-reader-mark .home-logo-combined {
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  transform: translateY(-42%);
  pointer-events: none;
}

.home-page.home-page--reader .reader-page-body.page {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.home-page.home-page--reader .reader-page-body .meta {
  padding: 12px 24px 14px 10px;
  font-family: "Playfair Display", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "MS Mincho", serif;
}

.reader-meta-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.reader-meta-heading-row #work-info {
  cursor: auto;
}

.reader-meta-heading-row .reader-meta-fold-toggle {
  cursor: pointer;
}

.reader-meta-heading-row .title {
  margin-bottom: 0;
  min-width: 0;
}

.reader-meta-heading-side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  transform: translateX(-10px);
}

.reader-meta-fold-toggle {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #666;
}

.reader-meta-fold-icon {
  display: block;
  transform: rotate(0deg);
  transition: transform 0.16s ease;
}

.reader-meta:not(.is-description-folded) .reader-meta-fold-icon {
  transform: rotate(180deg);
}

.reader-meta.is-description-folded {
  padding-bottom: 10px;
}

.reader-meta.is-description-folded .reader-description-card {
  display: none;
}

/* reader: keep paper visible on first paint across displays */
.home-page.home-page--reader .reader-stack {
  height: min(72vh, calc(100dvh - 320px));
  min-height: 360px;
}

.home-page.home-page--reader .reader-meta.is-description-folded + .paged-reader-section .reader-stack {
  height: min(72vh, calc(100dvh - 250px));
}

@media (max-width: 600px) {
  /* 読書ページ本体: 左右を少し詰めて紙面を広く感じさせる */
  .home-page.home-page--reader {
    padding: 0 14px 40px;
  }

  .home-page.home-page--reader > .home-header.home-header--reader {
    margin: 0 -14px 10px -14px;
    padding: 38px 14px 16px;
    background-size: 100% 100%, 650% auto;
  }

  .home-page.home-page--reader .reader-page-body .meta {
    padding: 10px 14px 12px 4px;
  }

  /* 紙面: 読書領域を少し広く取る */
  .home-page.home-page--reader .reader-stack {
    height: min(65vh, calc(100dvh - 260px));
    min-height: 320px;
  }

  .home-page.home-page--reader .reader-meta.is-description-folded + .paged-reader-section .reader-stack {
    height: min(65vh, calc(100dvh - 210px));
  }

  .home-page.home-page--reader .home-logo-reader-mark {
    width: 250px;
    max-width: 100%;
    height: 36px;
    line-height: 36px;
  }

  .home-page.home-page--reader .home-logo-reader-mark .home-logo-combined {
    height: 56px;
  }

  /* スマホ: 帯の作品検索（虫眼鏡）は非表示（PC はそのまま） */
  .home-page.home-page--reader .home-header-search-slot {
    display: none;
  }
}

/* reader スマホ: コンパクトモードでは上下パディングを抑えて読書領域を広く */
@media (max-width: 600px) {
  @container headerband (max-width: 520px) {
    .home-page.home-page--reader > .home-header.home-header--reader {
      padding: 8px 14px 10px;
      margin: 0 -14px 8px -14px;
    }
  }
}

/* editor.html 専用・本文ペーパー外のUI（ルビなど）も一覧と同じ書体に */
#editor-ruby-dialog-backdrop {
  font-family: "Playfair Display", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "MS Mincho", serif;
}

.home-page.home-page--editor > .home-header.home-header--editor {
  background-color: #f7f4ee;
  background-image: linear-gradient(rgba(255, 253, 246, 0.42), rgba(247, 244, 238, 0.38));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center center;
  margin: 0 -20px 10px -20px;
  padding: 12px 20px;
  border-bottom: none;
  max-width: none;
  position: relative;
  z-index: 60;
}

.home-page.home-page--editor > .home-header.home-header--editor::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 28px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(247, 244, 238, 0) 0%,
    rgba(247, 244, 238, 0.14) 42%,
    rgba(247, 244, 238, 0) 100%
  );
}

/* ????????????????????? */
.home-page.home-page--index > .home-header.home-header--index,
.home-page.home-page--creator > .home-header.home-header--creator,
.home-page.home-page--reader > .home-header.home-header--reader,
.home-page.home-page--editor > .home-header.home-header--editor {
  position: sticky;
  top: 0;
}

/* ???????????????????????? */
html,
body {
  overscroll-behavior-y: none;
}

.home-page.home-page--editor .home-header--editor-inner {
  max-width: none;
  width: 100%;
  margin: 0;
}

.home-page.home-page--editor .home-header-editor-brand {
  flex: 0 0 auto;
  min-width: 0;
}

.home-header.home-header--editor .home-header-editor-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  transform: translateY(4px);
}

.home-page.home-page--editor .home-header-search-slot {
  position: relative;
}

.home-page.home-page--editor .home-header-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--shelf-frame-color, #2c1d17);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1;
  font: inherit;
}

.home-page.home-page--editor .home-header-icon-button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.home-page.home-page--editor .home-header-icon-button:focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
}

.home-page.home-page--editor .home-header-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: min(320px, calc(100vw - 40px));
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.home-page.home-page--editor .home-header-search-panel .works-list-search {
  width: 100%;
  max-width: none;
}

.home-page.home-page--editor .home-logo-editor-mark {
  position: relative;
  display: inline-block;
  width: 300px;
  max-width: 100%;
  height: 42px;
  line-height: 42px;
  margin: 0;
  overflow: visible;
}

.home-page.home-page--editor .home-logo-editor-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.home-page.home-page--editor .home-logo-editor-mark .home-logo-combined {
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  transform: translateY(-42%);
  pointer-events: none;
}

@media (max-width: 600px) {
  .home-page.home-page--editor {
    padding: 0 0 max(8px, env(safe-area-inset-bottom, 0px));
  }

  .home-page.home-page--editor > .home-header.home-header--editor {
    margin: 0 0 10px;
    padding: 38px 16px 18px;
    background-size: 100% 100%, 650% auto;
  }

  .home-page.home-page--editor .home-logo-editor-mark {
    width: 250px;
    max-width: 100%;
    height: 36px;
    line-height: 36px;
  }

  .home-page.home-page--editor .home-logo-editor-mark .home-logo-combined {
    height: 56px;
  }

  /* スマホ: 帯の作品検索（虫眼鏡）は非表示（PC はそのまま） */
  .home-page.home-page--editor .home-header-search-slot {
    display: none;
  }
}

/* editor スマホ: コンパクトモードでは上下パディングを抑えて編集領域を広く */
@media (max-width: 600px) {
  @container headerband (max-width: 520px) {
    .home-page.home-page--editor > .home-header.home-header--editor {
      padding: 8px 16px 10px;
      margin: 0 0 8px;
    }
  }
}

/* ===== シリーズカード / シリーズ詳細ビュー（ステップB/C） ===== */

.work-card-series-link {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: inherit;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.work-card-series-link:focus-visible {
  outline: 2px solid #888;
  outline-offset: 2px;
}

.work-card-series-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 8px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #6a5a3e;
  background: #f4ecdc;
  border: 1px solid #e1d4b3;
  border-radius: 999px;
  letter-spacing: 0.02em;
  align-self: flex-start;
  --work-card-series-accent: #d4b82a;
}

.work-card--series:hover {
  border-color: #b8a978;
}

.work-card--series .work-card-title {
  letter-spacing: 0.01em;
}

/* 本棚: シリーズマークは山吹色（はっきりした黄） */
.works-list--shelf .work-card--series {
  --shelf-series-mark-color: #e8a82a;
}

/* 暗い背表紙（赤茶系）ではやや明るい山吹で視認性を確保 */
.works-list--shelf .work-card--series.shelf-color--4:nth-of-type(17n + 12) {
  --shelf-series-mark-color: #f5c842;
}

/* 本棚: タイトル／作者の境（55%）にシリーズ用マーク（背表紙の厚み＝幅に合わせる） */
.works-list--shelf .work-card--series::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 55%;
  z-index: 4;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 8px;
  transform: translate(calc(-50% + 3px), -50%);
  /* 山吹ベース・ごく薄い透かし（下の文字がわずかに透ける） */
  background: color-mix(in srgb, var(--shelf-series-mark-color, #e8a82a) 88%, transparent);
  clip-path: polygon(0 0, 76% 0, 90% 40%, 93% 50%, 90% 60%, 76% 100%, 0 100%);
  pointer-events: none;
}

.works-list--shelf .work-card--series .work-card-series-badge {
  display: none;
}

/* 戻るバー（シリーズ詳細表示時のヘッダ） */
.work-series-back-bar {
  grid-column: 1 / -1;
  flex-basis: 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px 14px;
  border-bottom: 1px solid #ececec;
  margin-bottom: 4px;
}

.works-list--shelf .work-series-back-bar {
  margin-bottom: 8px;
}

.work-series-back-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #333;
  cursor: pointer;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.work-series-back-button:hover {
  border-color: #b8a978;
  background: #faf7ee;
}

.work-series-back-arrow {
  font-size: 1rem;
  line-height: 1;
}

.work-series-back-title {
  margin: 0;
  font-size: 0.95rem;
  color: #444;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 600px) {
  .work-series-back-bar {
    padding: 8px 2px 10px;
    gap: 8px;
  }
  .work-series-back-title {
    font-size: 0.88rem;
  }
}

/* creator ページのシリーズ詳細では、戻るボタンの右側に「シリーズ名を変更」を並べる */
.work-series-rename-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #5a4a2a;
  cursor: pointer;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  flex: 0 0 auto;
}

.work-series-rename-button:hover {
  border-color: #b8a978;
  background: #faf7ee;
  color: #3a2f18;
}

.work-series-rename-icon {
  font-size: 0.95rem;
  line-height: 1;
}

@media (max-width: 600px) {
  .work-series-rename-button {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .work-series-rename-label {
    /* 狭い画面ではラベルを省略してペンアイコンだけ残す */
    display: none;
  }
}

/* 戻るボタン（←）はアイコンのみ。丸い枠・背景を取り除き、ピュアなアイコンとして表示。 */
.work-series-back-button--icon-only {
  padding: 4px;
  gap: 0;
  line-height: 0;
  border: none;
  background: transparent;
  color: #555;
}

.work-series-back-button--icon-only:hover {
  border: none;
  background: transparent;
  color: #111;
}

.work-series-back-button--icon-only svg {
  display: block;
}

/* タイトルとペンアイコンを 1 セットにまとめるラッパ。 */
.work-series-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.work-series-title-wrap .work-series-back-title {
  flex: 0 1 auto;
}

/* タイトル文字と同じ高さに小さく並ぶペン。境界線なし・背景なし。 */
.work-series-rename-button--inline-top {
  padding: 0 2px;
  gap: 0;
  line-height: 0;
  border: none;
  background: transparent;
  color: #8a7a55;
  opacity: 0.75;
  margin: 0 0 0 2px;
  flex: 0 0 auto;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.work-series-rename-button--inline-top:hover {
  border: none;
  background: transparent;
  color: #3a2f18;
  opacity: 1;
}

.work-series-rename-button--inline-top svg {
  display: block;
}

/* ===== サイトフッター（トップページ index.html のみ表示） ===== */
.site-footer {
  display: none;
  padding: 20px 0;
  border-top: 1px solid rgba(44, 29, 23, 0.07);
  margin-top: 40px;
}

.home-page.home-page--index .site-footer {
  display: block;
}

.site-footer-inner {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer-copy {
  font-size: 0.72rem;
  color: #ccc;
  font-family: system-ui, -apple-system, sans-serif;
}

.site-footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-footer-link {
  font-size: 0.72rem;
  color: #ccc;
  text-decoration: none;
  font-family: system-ui, -apple-system, sans-serif;
  transition: color 0.15s ease;
}

.site-footer-link:hover {
  color: #aaa;
}

@media (max-width: 600px) {
  .site-footer {
    padding: 14px 0;
    margin-top: 28px;
  }
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
  }
  .site-footer-links {
    gap: 14px;
  }
}

.home-page.home-page--legal .site-footer {
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 600px) {
  .home-page.home-page--legal .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ===== 利用規約 / プライバシーポリシー ページ ===== */
.home-page.home-page--legal {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  background: #fff;
  padding: 0;
}

.legal-header {
  background: #f7f4ee;
  padding: 28px 20px 22px;
  border-bottom: 1px solid rgba(44, 29, 23, 0.08);
}

.legal-header-inner {
  max-width: 720px;
  margin: 0 auto;
}

.legal-header-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: #999;
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.15s ease;
  letter-spacing: 0.01em;
}

.legal-header-back:hover {
  color: #333;
}

.legal-title-ja {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 3px;
  color: #1a1208;
  font-family: "Playfair Display", "Hiragino Mincho ProN", "Yu Mincho", serif;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.legal-title-en {
  font-size: 0.78rem;
  color: #bbb;
  margin: 0;
  letter-spacing: 0.05em;
}

.legal-header-meta {
  font-size: 0.73rem;
  color: #c0b9b0;
  line-height: 1.9;
  margin-top: 12px;
}

.legal-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 20px 48px;
}

.legal-intro {
  font-size: 0.9rem;
  line-height: 1.95;
  color: #333;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid #eeebe4;
}

.legal-article {
  margin-bottom: 28px;
}

.legal-article-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a1208;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(44, 29, 23, 0.08);
  letter-spacing: 0.01em;
}

.legal-article-body {
  font-size: 0.86rem;
  line-height: 1.9;
  color: #444;
}

.legal-article-body p {
  margin: 0 0 8px;
}

.legal-article-body p:last-child {
  margin-bottom: 0;
}

.legal-article-body ol,
.legal-article-body ul {
  padding-left: 1.6em;
  margin: 4px 0 8px;
}

.legal-article-body li {
  margin-bottom: 5px;
  line-height: 1.85;
}

.legal-article-body ol ol,
.legal-article-body ul ul {
  margin-top: 3px;
}

.legal-article-subt {
  font-size: 0.84rem;
  font-weight: 600;
  color: #555;
  margin: 14px 0 6px;
}

.legal-closing {
  font-size: 0.8rem;
  color: #bbb;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(44, 29, 23, 0.07);
  text-align: right;
}

@media (max-width: 600px) {
  .legal-header {
    padding: 20px 16px 18px;
  }
  .legal-body {
    padding: 28px 16px 40px;
  }
  .legal-title-ja {
    font-size: 1.2rem;
  }
}
