/* Personal pages: public profile (/u/<id>), my page (/my) and account settings (/settings). */
.person {
  padding: 32px;
}
.person-head {
  display: flex;
  gap: 22px;
  align-items: center;
}
.person-head h1 {
  margin: 4px 0 2px;
  font-size: 30px;
}
.person-head h1 .tag {
  margin: 0 0 0 10px;
}
.person-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  flex: none;
}
.person-id {
  margin: 0;
  font-size: 13px;
  color: var(--fc-color-text-muted);
}
.person-bio {
  margin: 20px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 720px;
}
.person-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.person-actions .button {
  font-size: 14px;
  padding: 10px 16px;
}
.person-compact {
  padding: 24px 28px;
}
.person-compact .person-avatar {
  width: 60px;
  height: 60px;
  font-size: 23px;
}
/* Entry state chips use the shared D4 state labels (status.css). */
.entry-card .info > .state-badge {
  margin-bottom: 10px;
}
.entry-card a {
  display: block;
  height: 100%;
  padding-bottom: 18px;
}
.entry-of {
  margin: 4px 0 0;
  font-size: 13px;
}
.entry-reason {
  margin: 8px 0 0;
  font-size: 13px;
  color: #b23a4f;
}
.my-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 24px 0 8px;
}
.my-tabs a {
  flex: none;
  padding: 10px 16px;
  border-radius: var(--fc-radius-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--fc-color-text-muted);
}
.my-tabs a:hover {
  background: var(--fc-color-accent-soft);
}
.my-tabs a[aria-current='page'] {
  background: var(--fc-color-accent-soft);
  color: var(--fc-color-accent);
}
.my-tabs + .card,
.my-tabs + .my-note {
  margin-top: 18px;
}
.my-note {
  font-size: 14px;
}
.settings {
  display: grid;
  gap: 20px;
  max-width: 740px;
}
.settings-card h2 {
  margin-bottom: 6px;
}
.settings-card .person-head {
  margin-top: 20px;
}
.settings-card .field {
  margin: 20px 0;
}
.settings-card input[type='color'] {
  width: 76px;
  height: 46px;
  padding: 4px;
  cursor: pointer;
}
.settings-leave {
  border-color: #f2d3d9;
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
  font-size: 15px;
}
@media (max-width: 720px) {
  .person,
  .person-compact {
    padding: 22px 20px;
  }
  .person-head {
    flex-wrap: wrap;
    gap: 16px;
  }
  .person-head h1 {
    font-size: 24px;
  }
  .person-avatar {
    width: 60px;
    height: 60px;
    font-size: 23px;
  }
  .person-actions {
    margin-left: 0;
    width: 100%;
  }
  .person-actions .button {
    flex: 1;
    text-align: center;
  }
  .entry-card .cover {
    height: 150px;
  }
  .my-tabs a {
    padding: 9px 12px;
  }
}

/* 我的页面顶部一行：个人信息卡 1/3，审核进度 2/3 */
.my-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px;
  align-items: stretch;
}
.my-top .person {
  display: flex;
  align-items: center;
}
.my-top .person-head {
  flex-wrap: wrap;
  gap: 16px 18px;
  width: 100%;
}
.my-top .person-actions {
  margin-left: 0;
  width: 100%;
}
@media (max-width: 900px) {
  .my-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 审核进度（提出 → 作品审核 → 公开 → 投稿审核） */
.my-progress {
  padding: 18px 22px 6px;
  container-type: inline-size;
}
.my-progress-empty {
  margin: 0;
  padding: 14px 0 16px;
  border-top: 1px solid var(--fc-color-border);
  color: var(--fc-color-text-muted);
  font-size: 14px;
}
.my-progress h2 {
  margin: 0 0 6px;
  font-size: 16px;
}
.progress-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 180px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--fc-color-border);
  color: inherit;
}
.progress-row img {
  width: 56px;
  height: 56px;
  border-radius: var(--fc-radius-lg);
  object-fit: contain;
  background: var(--fc-color-surface-sunken);
}
.progress-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.progress-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-name span {
  color: var(--fc-color-text-muted);
  font-size: 12px;
}
.progress-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.progress-steps .step {
  flex: none;
  padding: 4px 10px;
  border-radius: var(--fc-radius-pill);
  white-space: nowrap;
}
/* 步骤之间的连线 */
.progress-steps .step + .step {
  position: relative;
  margin-left: 22px;
}
.progress-steps .step + .step::before {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(100% + 3px);
  width: 22px;
  height: 2px;
  background: var(--fc-color-surface-sunken);
}
.progress-steps .step-done + .step::before {
  background: var(--blue);
}
.progress-now {
  display: none;
}
.step-done {
  color: var(--fc-color-accent-hover);
  background: var(--fc-color-accent-soft);
  font-weight: 650;
}
.step-now {
  color: #8a5300;
  background: #fff1d6;
  font-weight: 650;
}
.step-fix {
  color: #8a3d00;
  background: #ffe8d6;
  font-weight: 650;
}
.step-todo {
  color: var(--fc-color-text-muted);
  background: var(--fc-color-surface-sunken);
}
.progress-link {
  color: var(--fc-color-text);
  font-size: 13px;
  white-space: nowrap;
}
.progress-row:hover .progress-link {
  text-decoration: underline;
}
/* 卡片窄的时候（手机，或并排时屏幕不够宽）只留色条 */
@container (max-width: 700px) {
  .progress-row {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px 12px;
  }
  .progress-steps {
    grid-column: 2;
    gap: 4px;
  }
  /* 整行都能点，手机上不再单独放链接 */
  .progress-link,
  .progress-steps .review-spinner {
    display: none;
  }
  /* 手机上只留色条，当前一步的文字放在名字下面 */
  .progress-steps .step {
    flex: 1;
    height: 5px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }
  .progress-steps .step + .step {
    margin-left: 0;
  }
  .progress-steps .step + .step::before {
    display: none;
  }
  .step-done {
    background: var(--blue);
  }
  .step-now {
    background: #f0b44c;
  }
  .step-fix {
    background: #e0782e;
  }
  .step-todo {
    background: var(--fc-color-surface-sunken);
  }
  .progress-row img {
    width: 52px;
    height: 52px;
    grid-row: span 2;
  }
  .progress-name .progress-now {
    display: block;
    color: #8a5300;
    font-weight: 650;
  }
  .is-fix .progress-name .progress-now {
    color: #8a3d00;
  }
}
.entry-card .info .state-badge {
  margin-bottom: 6px;
}

/* 作品の共有ページ（/w/<id>）：サイトのヘッダーとメニューのない全画面のページ（html.bare-page）。
   PC は左が画面いっぱいの 3D・写真のビューア、右が作品の情報と共有のパネル（パネルだけがスクロール）。
   スマホは 1 画面目がビューアと作品名、その下に続きを置き、共有ボタンは画面下に固定したバーに出す。 */
.bare-page .site-header {
  display: none;
}
.bare-page #app {
  max-width: none;
  margin: 0;
  padding: 0;
}
.share-work {
  --dark: #0f1322;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 440px);
  height: 100vh;
  height: 100dvh;
  background: var(--dark);
}
.share-media {
  position: relative;
  min-width: 0;
  min-height: 0;
}
.share-viewer {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: var(--dark);
  outline: none;
}
.share-viewer:fullscreen {
  width: 100vw;
  height: 100vh;
}
.share-stage {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  cursor: grab;
}
.share-stage.is-turning {
  cursor: grabbing;
}
.share-stage[hidden] {
  display: none;
}
.share-stage .showcase-canvas {
  touch-action: none;
}
.share-stage .showcase-hint {
  left: 50%;
  bottom: 124px;
  translate: -50% 0;
  white-space: nowrap;
}
.share-work:not(.has-photos) .share-stage .showcase-hint {
  bottom: 28px;
}
.share-stage.is-touched .showcase-hint {
  opacity: 0;
  transition: opacity 0.4s;
}
.share-stage .showcase-shake {
  right: 24px;
  bottom: 124px;
}
.share-work:not(.has-photos) .share-stage .showcase-shake {
  bottom: 24px;
}
.share-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid #ffffff24;
  border-radius: var(--fc-radius-pill);
  background: #0d10194d;
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.3px;
  text-decoration: none;
}
.share-logo-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--fc-radius-md);
  background: var(--fc-color-accent);
  font-size: 16px;
  line-height: 1;
}
.share-tools {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 6;
  display: flex;
  gap: 8px;
}
.share-viewer[data-at]:not([data-at='0']) .share-tool[data-act='front'],
.share-viewer:not(:has(.is-3d)) .share-tool[data-act='front'] {
  display: none;
}
.share-tool,
.share-nav {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #ffffff2e;
  border-radius: 50%;
  background: #0d10194d;
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.share-tool:hover,
.share-nav:hover {
  background: #ffffff3d;
}
.share-tool svg,
.share-nav svg {
  width: 18px;
  height: 18px;
}
.share-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  translate: 0 -50%;
}
.share-prev {
  left: 20px;
}
.share-next {
  right: 20px;
}
.share-photo {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 80px 120px;
  background: var(--dark);
  touch-action: pan-y;
  user-select: none;
}
.share-photo[hidden] {
  display: none;
}
.share-photo img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--fc-radius-md);
  object-fit: contain;
  box-shadow: 0 20px 60px #0008;
  -webkit-user-drag: none;
}
.share-viewer:fullscreen .share-photo {
  padding: 24px 24px 120px;
}
.share-photo figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
/* PC：サムネイルはビューアの下に浮かべる */
.share-thumbs {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 6;
  translate: -50% 0;
  display: flex;
  gap: 8px;
  max-width: calc(100% - 40px);
  padding: 8px;
  border: 1px solid #ffffff1f;
  border-radius: var(--fc-radius-xl);
  background: #0d101966;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  overflow-x: auto;
  scrollbar-width: none;
}
.share-thumbs::-webkit-scrollbar {
  display: none;
}
.share-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
  background: #ffffff14;
  cursor: pointer;
  opacity: 0.6;
  transition:
    opacity 0.15s,
    border-color 0.15s;
}
.share-thumb:hover,
.share-thumb[aria-selected='true'] {
  opacity: 1;
}
.share-thumb[aria-selected='true'] {
  border-color: #fff;
}
.share-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.share-thumb-3d {
  position: absolute;
  inset: auto 4px 4px auto;
  padding: 1px 6px;
  border-radius: var(--fc-radius-pill);
  background: #1c2033cc;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* PC：右のパネル */
.share-info {
  min-height: 0;
  overflow-y: auto;
  background: #fff;
  overscroll-behavior: contain;
}
.share-title {
  padding: 36px 32px 0;
}
.share-body {
  padding: 0 32px 32px;
}
.share-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.share-kind {
  padding: 3px 10px;
  border-radius: var(--fc-radius-pill);
  background: var(--fc-color-surface-sunken);
  color: var(--fc-color-text);
  font-size: 12px;
  font-weight: 700;
}
.share-date {
  color: var(--fc-color-text-muted);
  font-size: 13px;
}
.share-title h1 {
  margin: 14px 0 16px;
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
.share-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 -8px;
  padding: 6px 12px 6px 8px;
  border-radius: var(--fc-radius-pill);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}
.share-author:hover {
  background: var(--fc-color-surface-sunken);
}
.share-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.share-author strong {
  font-size: 16px;
}
.share-author .tag {
  margin-left: 6px;
}
.share-author small {
  margin-left: 4px;
  color: var(--fc-color-text-muted);
  font-size: 13px;
}
.share-contest {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--fc-color-accent-soft);
  border-radius: var(--fc-radius-xl);
  background: var(--fc-color-accent-soft);
}
.share-contest p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
}
.share-contest p a {
  color: inherit;
  font-weight: 700;
}
.share-contest .button {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.share-contest-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--fc-radius-pill);
  background: var(--fc-color-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.share-contest.is-winner {
  border-color: #f1d690;
  background: linear-gradient(135deg, #fff9e8, #fff3d1);
}
.share-contest.is-winner .share-contest-tag {
  background: linear-gradient(135deg, #d9a521, #b9800e);
}
.share-box {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line, var(--fc-color-border));
}
.share-box h2,
.share-more-head h2 {
  margin: 0;
  color: var(--fc-color-text);
  font-size: 15px;
}
.share-box h2 {
  margin-bottom: 12px;
}
.share-link {
  display: flex;
  gap: 8px;
}
.share-link input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line, var(--fc-color-border));
  border-radius: var(--fc-radius-lg);
  background: var(--fc-color-surface-sunken);
  color: var(--fc-color-text-muted);
  font-size: 14px;
  text-overflow: ellipsis;
}
.share-link .button,
.share-buttons .button,
.share-bar .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}
.share-link .button {
  height: 44px;
  flex: 0 0 auto;
}
.share-work svg,
.share-bar svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.share-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.share-buttons .button {
  height: 44px;
}
.share-x:hover {
  border-color: #111;
}
.share-line svg,
.share-bar .share-icon[aria-label^='LINE'] svg {
  color: #06c755;
}
.share-more {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line, var(--fc-color-border));
}
.share-more[hidden] {
  display: none;
}
.share-more-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.share-more-head a {
  color: var(--blue, var(--fc-color-accent));
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.share-more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.share-more-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.share-more-cover {
  aspect-ratio: 1;
  margin-bottom: 4px;
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
  background: var(--fc-color-surface-sunken);
}
.share-more-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: scale 0.25s;
}
.share-more-card:hover img {
  scale: 1.04;
}
.share-more-title {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.share-more-kind {
  color: var(--fc-color-text-muted);
  font-size: 11px;
}
.share-about {
  margin-top: 28px;
  padding: 16px 18px;
  border-radius: var(--fc-radius-xl);
  background: var(--fc-color-surface-sunken);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fc-color-text-muted);
}
.share-about strong {
  color: var(--fc-color-text);
  font-size: 14px;
}
.share-about p {
  margin: 6px 0 10px;
}
.share-about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.share-about-links a {
  color: var(--blue, var(--fc-color-accent));
  font-weight: 700;
  text-decoration: none;
}
.share-about-links a::after {
  content: ' →';
}
.share-bar {
  display: none;
}
.share-missing {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}
.share-missing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* スマホ・縦長のタブレット：1 画面目はビューア（暗い面）と作品名、その下に続き */
@media (max-width: 820px) {
  .share-work {
    display: block;
    height: auto;
    background: var(--fc-color-bg);
  }
  .share-media {
    display: flex;
    flex-direction: column;
    height: calc(
      100svh - 72px - env(safe-area-inset-bottom) - var(--title-h, 150px)
    );
    min-height: 300px;
    background: var(--dark);
  }
  .share-viewer {
    flex: 1;
    min-height: 0;
  }
  .share-logo {
    top: 12px;
    left: 12px;
    padding: 4px 12px 4px 4px;
    font-size: 13px;
  }
  .share-logo-mark {
    width: 24px;
    height: 24px;
    font-size: 15px;
  }
  .share-tools {
    top: 12px;
    right: 12px;
  }
  .share-tool,
  .share-nav {
    width: 38px;
    height: 38px;
  }
  .share-prev {
    left: 10px;
  }
  .share-next {
    right: 10px;
  }
  .share-stage .showcase-hint,
  .share-work:not(.has-photos) .share-stage .showcase-hint {
    bottom: 12px;
  }
  .share-stage .showcase-shake,
  .share-work:not(.has-photos) .share-stage .showcase-shake {
    right: 12px;
    bottom: 12px;
  }
  .share-photo {
    padding: 60px 12px 12px;
  }
  .share-thumbs {
    position: static;
    translate: none;
    flex: 0 0 auto;
    max-width: none;
    padding: 8px 12px;
    border: 0;
    border-radius: 0;
    background: var(--dark);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .share-thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--fc-radius-md);
  }
  /* 作品名は暗い面の続きとして 1 画面目の下に */
  .share-info {
    overflow: visible;
    background: none;
  }
  .share-title {
    padding: 14px 18px 18px;
    background: var(--dark);
    color: #fff;
  }
  .share-kind {
    background: #ffffff1f;
    color: var(--fc-color-accent-soft);
  }
  .share-date,
  .share-author small {
    color: var(--fc-color-text-muted);
  }
  .share-title h1 {
    margin: 10px 0 10px;
    font-size: 22px;
    color: #fff;
  }
  .share-author:hover {
    background: #ffffff14;
  }
  .share-avatar {
    width: 34px;
    height: 34px;
  }
  .share-body {
    padding: 4px 18px calc(110px + env(safe-area-inset-bottom));
  }
  /* 共有は画面下のバーで。リンクの欄とボタンの組はスマホでは出さない。 */
  .share-box {
    display: none;
  }
  .share-more {
    margin-top: 24px;
    padding-top: 0;
    border-top: 0;
  }
  .share-more-grid {
    display: flex;
    gap: 12px;
    margin: 0 -18px;
    padding: 0 18px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 18px;
    scrollbar-width: none;
  }
  .share-more-grid::-webkit-scrollbar {
    display: none;
  }
  .share-more-card {
    flex: 0 0 38%;
    scroll-snap-align: start;
  }
  .share-more-title {
    font-size: 13px;
  }
  .share-about {
    margin-top: 24px;
    background: #fff;
  }
  .share-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: flex;
    gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line, var(--fc-color-border));
    background: #ffffffeb;
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
  }
  .share-bar .button {
    flex: 1;
    height: 50px;
    margin: 0;
    font-size: 15px;
  }
  .share-bar .share-icon {
    flex: 0 0 50px;
    padding: 0;
  }
}
