/* アトリエ（仮）— 作品が主役の「ギャラリー」デザイン。ライト／ダークは html[data-theme] で切り替える */
:root {
  --paper: #f7f3ec;
  --surface: #ffffff;
  --surface2: #efe9df;
  --ink: #1f1b16;
  --muted: #7a7064;
  --line: #e2d9cc;
  --accent: #c2410c;      /* テラコッタ */
  --accent-ink: #ffffff;
  --accent-soft: #fbe6d9;
  --indigo: #3730a3;
  --danger: #b91c1c;
  --ok: #047857;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 18px rgba(60, 40, 20, .07);
  --radius: 14px;
  --head: 64px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --paper: #14120f;
  --surface: #1d1a16;
  --surface2: #29251f;
  --ink: #f3ede4;
  --muted: #a99e90;
  --line: #36302a;
  --accent: #fb923c;
  --accent-ink: #1a0f05;
  --accent-soft: #3b2414;
  --indigo: #a5b4fc;
  --danger: #f87171;
  --ok: #34d399;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  /* X と同じ: 端末の標準の文字（iPhone は英数字が San Francisco、日本語がヒラギノ角ゴ） */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px; line-height: 1.7; letter-spacing: .01em;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; }
h1 { font-size: 24px; margin: 0 0 16px; letter-spacing: .02em; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: 14px; }
.grow { flex: 1; min-width: 0; }

/* ---------- 上のバー ---------- */
.head {
  position: sticky; top: 0; z-index: 30; height: var(--head);
  display: flex; align-items: center; gap: 18px; padding: 0 24px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 19px; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo img { width: 30px; height: 30px; }
.head-nav { display: flex; gap: 4px; }
.head-nav a { color: var(--muted); font-weight: 700; padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
.head-nav a:hover { color: var(--ink); background: var(--surface2); text-decoration: none; }
.head-nav a.on { color: var(--ink); background: var(--surface2); }
.head-search { flex: 1; max-width: 360px; margin-left: auto; }
.head-search input { border-radius: 999px; padding: 7px 14px; background: var(--surface); }
.head-tools { display: flex; gap: 6px; align-items: center; position: relative; }
.tool { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: none; background: transparent; color: var(--ink); font-size: 18px; cursor: pointer; font-family: inherit; }
.tool:hover { background: var(--surface2); text-decoration: none; }
.tool.text { width: auto; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 800; }
.dot { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.me-btn { border: none; background: none; padding: 0; cursor: pointer; }
.page { max-width: 1240px; margin: 0 auto; padding: 24px 24px 140px; }
.bottom-nav { display: none; }

@media (max-width: 920px) {
  .head-nav, .head-search { display: none; }
  .head { padding: 0 12px; gap: 8px; }
  .head-tools { margin-left: auto; }
  .head-tools .post-btn { display: none; }
  .page { padding: 16px 14px 140px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 10px; position: relative; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a.on { color: var(--ink); font-weight: 700; }
  .bottom-nav .ic { font-size: 20px; line-height: 1.25; }
  .bottom-nav .plus .ic { width: 42px; height: 30px; border-radius: 10px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 20px; }
  .player { bottom: calc(64px + env(safe-area-inset-bottom)) !important; }
}

/* ---------- 部品 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; line-height: 1.3;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 9px 16px; cursor: pointer; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--ink); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.big { padding: 13px 22px; font-size: 16px; width: 100%; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface2); }
.link-btn { background: none; border: none; color: var(--muted); font: inherit; cursor: pointer; padding: 6px 8px; border-radius: 8px; display: inline-flex; gap: 5px; align-items: center; }
.link-btn:hover { color: var(--ink); background: var(--surface2); }
.link-btn.on { color: var(--accent); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], input[type=date], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
textarea { resize: vertical; }
label.field, div.field { display: block; }
label.field > span, div.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.error { color: var(--danger); font-size: 14px; }
.notice { background: var(--surface2); border-left: 4px solid var(--indigo); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.notice.warn { border-left-color: var(--accent); background: var(--accent-soft); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; color: var(--ink); background: var(--surface); cursor: pointer; font: inherit; font-size: 14px; line-height: 1.5; }
.chip:hover { text-decoration: none; border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); max-width: 100%; overflow-x: auto; }
.seg a, .seg button { padding: 8px 16px; color: var(--muted); font: inherit; font-weight: 700; border: none; background: none; cursor: pointer; white-space: nowrap; }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg .on { background: var(--ink); color: var(--paper); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface2); flex: none; display: inline-grid; place-items: center; color: var(--muted); font-weight: 800; overflow: hidden; border: 1px solid var(--line); }
.avatar.xl { width: 112px; height: 112px; font-size: 40px; border: 4px solid var(--paper); }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); vertical-align: middle; white-space: nowrap; }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.indigo { background: color-mix(in srgb, var(--indigo) 14%, transparent); color: var(--indigo); }
.badge.r18 { background: var(--danger); color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 48px 10px; }
.loading { text-align: center; color: var(--muted); padding: 30px; }
.more { display: block; margin: 20px auto; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 28px 0 12px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }

/* ---------- 作品のタイル（石積みのように並べる） ---------- */
.masonry { columns: 4 230px; column-gap: 16px; }
.tile { break-inside: avoid; margin-bottom: 16px; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; }
.tile .thumb { position: relative; display: block; background: var(--surface2); cursor: pointer; }
.tile .thumb img { display: block; width: 100%; height: auto; }
.tile .thumb .kind { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.tile .thumb .count { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 6px; }
.tile .play-btn { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--accent); color: var(--accent-ink); font-size: 16px; cursor: pointer; box-shadow: var(--shadow); }
.tile .text-tile { padding: 22px 18px; min-height: 140px; display: flex; align-items: center; font-size: 17px; font-weight: 700; line-height: 1.6; white-space: pre-wrap; word-break: break-word; background: var(--accent-soft); color: var(--ink); }
.tile .audio-tile { aspect-ratio: 1; display: grid; place-items: center; font-size: 48px; background: linear-gradient(135deg, var(--accent-soft), var(--surface2)); }
.tile .video-tile { aspect-ratio: 16 / 9; display: grid; place-items: center; font-size: 40px; background: var(--surface2); }
.veil { aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; padding: 18px; background: repeating-linear-gradient(45deg, var(--surface2) 0 12px, var(--paper) 12px 24px); color: var(--muted); font-size: 13px; }
.veil b { display: block; color: var(--ink); font-size: 15px; }
.veil .ic { font-size: 28px; }
.tile .meta { padding: 10px 12px 12px; }
.tile .title { font-weight: 800; font-size: 14px; line-height: 1.45; margin-bottom: 6px; word-break: break-word; color: var(--ink); display: block; }
.tile .by { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tile .by a { color: var(--ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .by .likes { margin-left: auto; color: var(--muted); white-space: nowrap; }
.protect { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.protect img { -webkit-user-drag: none; }
.wm { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: #fff; opacity: .8; text-shadow: 0 0 3px rgba(0, 0, 0, .9); pointer-events: none; }

/* ---------- 作品の詳細 ---------- */
.work { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.work-media { display: flex; flex-direction: column; gap: 12px; }
.work-media .frame { position: relative; background: var(--surface2); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.work-media img, .work-media video { display: block; max-height: 82vh; width: auto; max-width: 100%; margin: 0 auto; }
.work-media img { cursor: zoom-in; }
.work-side { position: sticky; top: calc(var(--head) + 16px); }
.work-side .card + .card { margin-top: 14px; }
.work-title { font-size: 22px; font-weight: 800; line-height: 1.4; margin: 0 0 8px; }
.work-body { white-space: pre-wrap; word-break: break-word; }
.work-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.rights { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.rights div { margin: 3px 0; }
.audio-hero { display: flex; gap: 20px; align-items: center; padding: 24px; background: linear-gradient(135deg, var(--accent-soft), var(--surface2)); border-radius: var(--radius); }
.audio-hero .cover { width: 180px; height: 180px; border-radius: 12px; object-fit: cover; background: var(--surface); display: grid; place-items: center; font-size: 56px; flex: none; box-shadow: var(--shadow); }
.audio-hero .play { width: 64px; height: 64px; border-radius: 50%; border: none; background: var(--accent); color: var(--accent-ink); font-size: 22px; cursor: pointer; flex: none; }
.text-hero { padding: 40px 28px; background: var(--accent-soft); border-radius: var(--radius); font-size: 20px; font-weight: 700; white-space: pre-wrap; word-break: break-word; }
.veil-hero { padding: 70px 20px; text-align: center; border-radius: var(--radius); background: repeating-linear-gradient(45deg, var(--surface2) 0 14px, var(--paper) 14px 28px); }
.veil-hero .ic { font-size: 40px; }
@media (max-width: 920px) {
  .work { grid-template-columns: 1fr; }
  .work-side { position: static; }
  .audio-hero { flex-direction: column; text-align: center; }
}
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: none; }
.comment a.name { color: var(--ink); font-weight: 700; }
.comment p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.compose { display: flex; gap: 8px; align-items: flex-end; }

/* ---------- プロフィール ---------- */
.cover-img { height: 240px; border-radius: var(--radius); background: linear-gradient(120deg, var(--accent-soft), var(--surface2)); background-size: cover; background-position: center; }
.profile { text-align: center; margin-top: -60px; }
.profile .name { font-size: 26px; font-weight: 800; margin-top: 6px; line-height: 1.3; }
.profile .bio { max-width: 620px; margin: 10px auto; white-space: pre-wrap; word-break: break-word; }
.profile .actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.counts { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.counts a { color: var(--muted); }
.counts b { color: var(--ink); font-size: 17px; display: block; }
.links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: 14px; margin-top: 8px; }
.profile-tabs { display: flex; justify-content: center; gap: 4px; border-bottom: 1px solid var(--line); margin: 24px 0 20px; overflow-x: auto; }
.profile-tabs a { padding: 10px 16px; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; }
.profile-tabs a:hover { color: var(--ink); text-decoration: none; }
.profile-tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 700px) { .cover-img { height: 150px; } .avatar.xl { width: 88px; height: 88px; } .profile { margin-top: -46px; } .profile-tabs { justify-content: flex-start; } }
.person { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person .who { flex: 1; min-width: 0; line-height: 1.4; }
.person .who a { color: var(--ink); font-weight: 700; }
.person .bio { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.person-card { text-align: center; padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.person-card .avatar { width: 64px; height: 64px; font-size: 24px; }
.person-card .nm { font-weight: 800; color: var(--ink); }

/* ---------- ファンクラブ・ショップ・プロジェクトのカード ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.plan { border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.plan.mine { border-color: var(--accent); }
.plan .price { font-size: 26px; font-weight: 800; }
.plan .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan .desc { white-space: pre-wrap; font-size: 14px; flex: 1; }
.item { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: block; color: var(--ink); }
.item:hover { text-decoration: none; transform: translateY(-2px); transition: transform .15s; }
.item .pic { position: relative; aspect-ratio: 1; background: var(--surface2); }
.item .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item .pic .badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.item .pic .sold { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .1em; }
.item .info { padding: 10px 12px 14px; }
.item .info b { display: block; font-size: 14px; line-height: 1.4; }
.item .info .price { font-size: 17px; font-weight: 800; margin-top: 4px; }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); }
.project:hover { text-decoration: none; border-color: var(--ink); }
.project .pc { height: 120px; background: linear-gradient(120deg, color-mix(in srgb, var(--indigo) 22%, var(--surface2)), var(--accent-soft)); background-size: cover; background-position: center; }
.project .pb { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.project .pt { font-weight: 800; font-size: 16px; line-height: 1.4; }
.project .roles { display: flex; gap: 4px; flex-wrap: wrap; }
.project .foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 6px; }
.stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 24px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td, .table th { border-bottom: 1px solid var(--line); padding: 10px 6px; vertical-align: top; text-align: left; }
.dash-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.dash-links a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--ink); font-weight: 800; }
.dash-links a:hover { border-color: var(--ink); text-decoration: none; }
.dash-links small { display: block; color: var(--muted); font-weight: 400; }

/* ---------- 投稿フォーム ---------- */
.form-page { max-width: 760px; margin: 0 auto; }
.kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kinds button { font: inherit; font-weight: 700; background: var(--surface); border: 2px solid var(--line); color: var(--ink); border-radius: 12px; padding: 12px 4px; cursor: pointer; }
.kinds button.on { border-color: var(--accent); background: var(--accent-soft); }
.kinds .ic { display: block; font-size: 22px; }
.drop { display: grid; place-items: center; text-align: center; border: 2px dashed var(--line); border-radius: 12px; padding: 28px 12px; color: var(--muted); cursor: pointer; background: var(--surface); }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--ink); }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.previews .pv { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface2); aspect-ratio: 1; }
.previews .pv img, .previews .pv video { width: 100%; height: 100%; object-fit: cover; }
.previews .pv button { position: absolute; top: 4px; right: 4px; border: none; border-radius: 50%; width: 26px; height: 26px; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; }
.previews .pv .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.options label { cursor: pointer; position: relative; }
.options input { position: absolute; opacity: 0; }
.options span { display: block; height: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 9px 12px; font-weight: 700; font-size: 14px; background: var(--surface); }
.options span small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.options input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.options input:focus-visible + span { outline: 2px solid var(--accent); }
fieldset.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; background: var(--surface); }
fieldset.box legend { font-weight: 800; padding: 0 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 5px; flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } .kinds { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 通知・メッセージ ---------- */
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 10px; color: var(--ink); align-items: flex-start; }
.notif:hover { background: var(--surface2); text-decoration: none; }
.notif.unread { background: var(--accent-soft); }
.notif .ic { width: 28px; text-align: center; font-size: 20px; flex: none; }
.thread { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bubble time { display: block; font-size: 11px; opacity: .6; }
.bubble .who { font-size: 12px; font-weight: 700; opacity: .8; }

/* ---------- 音楽プレーヤー ---------- */
.player {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 40; width: min(640px, calc(100% - 20px));
  display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 14px;
  background: var(--ink); color: var(--paper); box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.player img, .player .cv { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--accent); flex: none; }
.player .info { flex: 1; min-width: 0; line-height: 1.3; }
.player .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.player .info a { color: inherit; }
.player input[type=range] { width: 100%; accent-color: var(--accent); height: 14px; }
.player .pp { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--accent); color: var(--accent-ink); cursor: pointer; font-size: 15px; flex: none; }
.player .x { background: none; border: none; color: inherit; opacity: .7; cursor: pointer; font-size: 16px; }

/* ---------- 画面の部品 ---------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: 76px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 10px; font-weight: 700; box-shadow: var(--shadow); max-width: 90%; }
.toast.err { background: var(--danger); color: #fff; }
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(20, 15, 10, .6); display: grid; place-items: center; padding: 16px; }
.modal-box { background: var(--surface); border-radius: var(--radius); padding: 22px; width: min(480px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.modal-box.viewer { background: none; width: auto; padding: 0; box-shadow: none; position: relative; }
.modal-box.viewer img { max-height: 92vh; border-radius: 6px; display: block; }
.menu { display: flex; flex-direction: column; gap: 6px; }
.menu .btn { justify-content: flex-start; }
.dropdown { position: absolute; right: 0; top: 46px; width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 50; }
.dropdown a, .dropdown button { display: flex; gap: 10px; width: 100%; padding: 9px 12px; color: var(--ink); border-radius: 8px; font: inherit; background: none; border: none; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface2); text-decoration: none; }
.dropdown hr { border: none; border-top: 1px solid var(--line); margin: 6px 0; }
.auth { max-width: 460px; margin: 24px auto; }
.hero { text-align: center; padding: 34px 10px 26px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.3; margin-bottom: 10px; }
.hero p { color: var(--muted); font-size: 16px; margin: 0 auto; max-width: 620px; }
.hero .points { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 18px 0; }
.legal { font-size: 15px; max-width: 760px; margin: 0 auto; }
.legal h2 { margin-top: 26px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line, rgba(128,128,128,.25)); }
.legal-table th { width: 32%; font-weight: 600; white-space: normal; }
footer.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0 0; }
footer.foot a { color: var(--muted); margin: 0 6px; }
@media (max-width: 480px) { #app-name { font-size: 18px; letter-spacing: .06em; } }
@media (max-width: 1180px) and (min-width: 921px) { .head-search { display: none; } .head-tools { margin-left: auto; } }
.stars { color: var(--accent); font-weight: 700; white-space: nowrap; }
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hub a { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--ink); }
.hub a:hover { border-color: var(--ink); text-decoration: none; }
.hub .ic { font-size: 28px; }
.hub b { display: block; }
.hub small { color: var(--muted); }
.composer { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.composer textarea { min-height: 52px; }
.card .stat span.small { font-size: 11px; white-space: nowrap; }

/* ---------- プロフィール（X・Instagram のように: ヘッダー画像、左にアイコン、名前は控えめ、数字は1行） ---------- */
.prof-cover { margin: -14px -14px 0; aspect-ratio: 3 / 1; max-height: 260px; background: var(--surface2) center / cover no-repeat; }
.prof-cover.empty { aspect-ratio: auto; height: 64px; background: linear-gradient(120deg, var(--accent-soft), var(--surface2)); }
.prof { max-width: 935px; margin: 0 auto; }
.prof-top { display: flex; align-items: flex-end; margin-top: -42px; margin-bottom: 8px; }
.prof .avatar.xl { width: 84px; height: 84px; font-size: 32px; border: 4px solid var(--paper); flex: none; }
.prof-name { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; margin: 0; word-break: break-word; }
.prof-handle { color: var(--muted); font-size: 14px; margin: 1px 0 0; word-break: break-all; }
.prof-bio { margin: 10px 0 4px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.prof-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; align-items: center; }
.prof-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0; font-size: 14px; }
.prof-counts { display: flex; gap: 4px 16px; flex-wrap: wrap; margin: 8px 0 2px; font-size: 14px; }
.prof-counts a { color: var(--ink); }
.prof-counts a:hover { text-decoration: none; opacity: .8; }
.prof-counts b { font-weight: 800; }
.prof-counts span { color: var(--muted); }
.prof-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; }
.prof-actions .btn { flex: 1 1 0; min-width: 0; border-radius: 999px; padding: 8px 12px; font-size: 14px; }
.prof-actions .btn.ghost { flex: 0 0 auto; }
@media (min-width: 701px) {
  .prof-cover { max-width: 935px; margin: 0 auto; border-radius: var(--radius); aspect-ratio: auto; height: 260px; max-height: none; }
  .prof-cover.empty { height: 90px; }
  .prof .avatar.xl { width: 120px; height: 120px; font-size: 44px; }
  .prof-top { margin-top: -60px; padding-left: 16px; }
}
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.chip-btn svg { width: 18px; height: 18px; color: var(--accent); }

.ptabs { position: sticky; top: var(--head); z-index: 20; display: flex; overflow-x: auto; scrollbar-width: none; background: var(--paper); border-bottom: 1px solid var(--line); margin: 10px -14px 0; padding: 0 8px; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs button { flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px; border: none; background: none; color: var(--muted); font: inherit; cursor: pointer; border-bottom: 2px solid transparent; }
.ptabs button small { font-size: 11px; white-space: nowrap; }
.ptabs button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }

.swipe { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; align-items: flex-start; overscroll-behavior-x: contain; margin: 0 -14px; transition: height .2s; }
.swipe::-webkit-scrollbar { display: none; }
.pane { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; padding: 12px 14px 24px; box-sizing: border-box; }
.empty-ic svg { width: 56px; height: 56px; stroke-width: 1.2; margin-bottom: 8px; }

/* 作品は3列の正方形（プロフィールの中だけ） */
.pane .masonry { columns: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: -12px -14px 0; }
.pane .tile { margin: 0; border-radius: 0; box-shadow: none; }
.pane .tile .thumb { aspect-ratio: 3 / 4; overflow: hidden; }
.pane .tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pane .tile .text-tile, .pane .tile .audio-tile, .pane .tile .video-tile { height: 100%; min-height: 0; aspect-ratio: auto; font-size: 13px; padding: 10px; align-items: flex-start; overflow: hidden; }
.pane .tile .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); pointer-events: none; }
.pane .tile .meta .title, .pane .tile .meta .by .avatar, .pane .tile .meta .by a { display: none; }
.pane .tile .meta .likes { pointer-events: auto; color: #fff; margin-left: 0; font-size: 12px; }
.pane .tile .wm { display: none; }
.pane .tile .play-btn { width: 34px; height: 34px; font-size: 13px; top: 6px; right: 6px; bottom: auto; }
.pane > .more { display: block; margin: 14px auto 0; }
@media (min-width: 701px) {
  .ptabs, .swipe { max-width: 935px; margin-left: auto; margin-right: auto; }
  .prof-actions .btn { flex: 0 0 auto; }
  .pane .masonry { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 700px) {
  .prof-name { font-size: 26px; }
}
.install-steps { margin: 4px 0 0; padding-left: 22px; line-height: 1.9; }

/* ---------- 線のアイコン（絵文字の代わり。js/icons.js） ---------- */
.i { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; display: inline-block; }
.tool .i { width: 24px; height: 24px; }
.menu-btn { display: none; }
.hub .ic .i { width: 26px; height: 26px; color: var(--ink); }
.veil .ic .i, .veil-hero .ic .i { width: 34px; height: 34px; }
.tile .audio-tile .i, .tile .video-tile .i { width: 40px; height: 40px; color: var(--muted); }
.link-btn.likes.on, .likes.on .i { color: var(--accent); }

/* スマホ: 上のバーは 通知・メッセージ・メニュー だけ。下のメニューはアイコンだけ */
@media (max-width: 920px) {
  .me-btn { display: none; }
  .menu-btn { display: inline-grid; }
  .bottom-nav { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .bottom-nav a { justify-content: center; height: 40px; }
  .bottom-nav .ic { display: grid; place-items: center; line-height: 1; }
  .bottom-nav .ic .i { width: 27px; height: 27px; stroke-width: 1.7; }
  .bottom-nav a.on .ic .i { stroke-width: 2.4; }
  .bottom-nav .plus .ic { width: 46px; height: 32px; border-radius: 10px; background: var(--ink); color: var(--paper); }
  .bottom-nav .plus .ic .i { width: 22px; height: 22px; stroke-width: 2.4; }
}
/* スマホ: 「もっと」などのまとめ画面は、枠のない一覧にしてすっきり見せる */
@media (max-width: 700px) {
  .hub { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
  .hub a { border: none; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 14px 4px; }
  .hub a::after { content: '›'; margin-left: auto; color: var(--muted); font-size: 22px; }
  .hub .ic .i { width: 24px; height: 24px; }
}

/* YouTube・Vimeo の埋め込み */
.frame.embed { position: relative; aspect-ratio: 16 / 9; }
.frame.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: inherit; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; }

/* ---------- ブログ ---------- */
.blog { max-width: 720px; margin: 0 auto; width: 100%; }
.blog-title { font-size: 28px; font-weight: 800; line-height: 1.4; margin: 4px 0 18px; word-break: break-word; }
.blog-body { font-size: 17px; line-height: 2; word-break: break-word; }
.blog-body h2 { font-size: 23px; font-weight: 800; line-height: 1.5; margin: 1.8em 0 .6em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.blog-body h3 { font-size: 19px; font-weight: 800; line-height: 1.5; margin: 1.5em 0 .4em; }
.blog-body p { margin: 0 0 1.1em; }
.blog-body blockquote { margin: 1.2em 0; padding: .2em 1em; border-left: 3px solid var(--line); color: var(--muted); }
.blog-body ul, .blog-body ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.blog-body figure { margin: 1.4em 0; }
.blog-body figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; cursor: default; max-height: none; }
.blog-body hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.blog-body a { text-decoration: underline; }
.blog-lock { position: relative; text-align: center; padding: 28px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 12px; justify-items: center; margin-top: 8px; }
.blog-lock .ic .i { width: 30px; height: 30px; }
.blog-fade { position: absolute; left: 0; right: 0; top: -90px; height: 90px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.work-media .blog-body img { max-height: none; }
/* 書く画面 */
.blog-edit { max-width: 760px; }
.blog-title-input { font-size: 24px !important; font-weight: 800; border: none !important; background: transparent !important; padding: 8px 0 !important; }
#title-slot .field > span { display: none; }
.blog-tools { position: sticky; top: var(--head); z-index: 15; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; margin: 6px 0 0; }
.blog-tools::-webkit-scrollbar { display: none; }
.blog-tools button { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 52px; padding: 6px 6px; border: none; background: none; color: var(--ink); font: inherit; cursor: pointer; border-radius: 8px; }
.blog-tools button:hover { background: var(--surface2); }
.blog-tools .ti { font-weight: 800; font-size: 17px; line-height: 22px; height: 22px; display: grid; place-items: center; }
.blog-tools .ti .i { width: 20px; height: 20px; }
.blog-tools small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.blog-tools [data-tool="h3"] .ti { font-size: 14px; }
.blog-tools [data-tool="paywall"] { color: var(--accent); }
.blog-editor { min-height: 50vh; outline: none; padding: 16px 2px; }
.blog-editor:empty::before, .blog-editor > p:only-child:has(br:only-child)::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; position: absolute; }
.blog-editor figure { position: relative; }
.blog-editor figure::after { content: ''; position: absolute; inset: 0; border-radius: 8px; }
.paywall-line { margin: 1.6em 0; text-align: center; color: var(--accent); font-size: 13px; font-weight: 800; border-top: 2px dashed var(--accent); padding-top: 6px; user-select: none; }
/* 一覧のタイル */
.tile .blog-tile { flex-direction: column; align-items: flex-start; gap: 6px; background: var(--surface2); }
.tile .blog-tile b { font-size: 16px; line-height: 1.5; }
.tile .blog-tile span { font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.6; }
.tile .blog-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; color: #fff; font-weight: 800; font-size: 14px; line-height: 1.4; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.pane .tile .blog-tile b { font-size: 13px; }
.pane .tile .blog-tile span { display: none; }
.pane .tile .blog-cap { font-size: 12px; padding: 14px 6px 22px; }

/* ---------- コミュニティ ---------- */
.new-thread { margin-bottom: 12px; padding: 12px 16px; }
.new-thread summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 6px; }
.new-thread summary::-webkit-details-marker { display: none; }
.threads { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.cm-thread { display: flex; flex-direction: row; gap: 10px; align-items: center; text-align: left; padding: 12px 2px; border-bottom: 1px solid var(--line); color: var(--ink); }
.cm-thread:hover { text-decoration: none; background: var(--surface2); }
.cm-thread b { display: block; line-height: 1.5; word-break: break-word; }
.replies { display: flex; flex-direction: column; margin-top: 12px; }
.reply { display: flex; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.reply-form { margin-top: 14px; }

/* 選び忘れた欄を目立たせる */
#rights-box.need { animation: need 1.6s ease; border-color: var(--accent); }
@keyframes need { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); } 100% { box-shadow: none; } }

/* ---------- タイムライン ---------- */
.home-tabs { position: sticky; top: var(--head); z-index: 12; }
.timeline { display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; border-top: 1px solid var(--line); }
.fcard { display: flex; gap: 10px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.f-av .avatar { width: 42px; height: 42px; }
.f-main { flex: 1; min-width: 0; }
.f-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 14px; }
.f-name { color: var(--ink); font-weight: 800; }
.f-head .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.f-text { margin: 4px 0 8px; white-space: pre-wrap; word-break: break-word; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.f-media { position: relative; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface2); margin-bottom: 6px; }
.f-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.f-scroll::-webkit-scrollbar { display: none; }
.f-scroll > a, .f-scroll > img { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; }
.f-scroll img, .f-video img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; }
.f-count { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.f-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; font-size: 20px; }
.f-video-blank { aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--muted); font-size: 40px; }
.f-locked .veil { aspect-ratio: 16 / 9; }
.f-audio { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 6px; background: var(--surface); }
.f-audio img, .f-audio-cover { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: var(--surface2); color: var(--muted); font-size: 24px; }
.play-round { width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--accent); color: var(--accent-ink); cursor: pointer; font-size: 15px; }
.f-article { display: block; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); color: var(--ink); margin-bottom: 6px; }
.f-article:hover { text-decoration: none; border-color: var(--ink); }
.f-article img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.f-article-text { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; }
.f-article-text .badge { align-self: flex-start; }
.f-article-text b { font-size: 16px; line-height: 1.5; }
.f-article-text span:not(.badge):not(.small) { color: var(--muted); font-size: 14px; line-height: 1.6; }
.f-actions { display: flex; gap: 18px; margin-left: -8px; }
.f-actions .link-btn { font-size: 13px; }
.f-actions .i { width: 19px; height: 19px; }

/* ---------- ファンクラブのホームページ（#/fc/…） ---------- */
body.fc-mode .head-nav, body.fc-mode .head-search { display: none; }
.fc { max-width: 960px; margin: -24px auto 0; }
.fc-hero { position: relative; border-radius: 0 0 22px 22px; overflow: hidden; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #000)); background-size: cover; background-position: center; color: #fff; }
.fc-hero.has-img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .15), rgba(0, 0, 0, .65)); }
.fc-hero-in { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 44px 18px 26px; }
.fc-hero .avatar.xl { width: 96px; height: 96px; border: 3px solid rgba(255, 255, 255, .9); }
.fc-name { font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: .02em; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.fc-artist { color: rgba(255, 255, 255, .9); font-size: 14px; }
.fc-join { margin-top: 10px; }
.fc-join .badge { background: rgba(255, 255, 255, .92); color: #1f1b16; font-size: 14px; padding: 6px 14px; }
.fc-join .btn.primary { background: #fff; color: #1f1b16; border-color: #fff; padding: 11px 34px; font-size: 16px; }
.fc-join .btn:not(.primary) { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .5); }
.fc-nav { position: sticky; top: var(--head); z-index: 12; display: flex; justify-content: center; overflow-x: auto; scrollbar-width: none; background: var(--paper); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.fc-nav::-webkit-scrollbar { display: none; }
.fc-nav a { flex: 0 0 auto; min-width: 76px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px 8px; color: var(--muted); border-bottom: 2px solid transparent; }
.fc-nav a:hover { text-decoration: none; color: var(--ink); }
.fc-nav a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }
.fc-nav .i { width: 22px; height: 22px; }
.fc-nav small { font-size: 11px; white-space: nowrap; }
.fc-body section { margin-bottom: 28px; }
.fc-intro { white-space: pre-wrap; word-break: break-word; line-height: 1.9; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.fc-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.fc-h h2 { margin: 0; }
.fc-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 28px 0 10px; }
@media (max-width: 920px) {
  .fc { margin-top: -16px; margin-left: -14px; margin-right: -14px; }
  .fc-body { padding: 0 14px; }
  .fc-nav { display: none; }
  .fc-hero { border-radius: 0; }
}
/* ホームの「いまどうしてる？」: 入力欄を広く、ボタンは下に並べる */
.composer { flex-wrap: wrap; max-width: 640px; margin-left: auto; margin-right: auto; }
.composer textarea { flex: 1 1 calc(100% - 60px); min-width: 0; }
.composer > .stack { display: flex; flex-direction: row; gap: 8px; width: 100%; justify-content: flex-end; padding-left: 50px; }
.home-tabs { max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- 会員証 ---------- */
.mcard-wrap { max-width: 420px; margin: 0 auto; }
.mcard { position: relative; overflow: hidden; border-radius: 18px; padding: 20px; color: #fff; background: linear-gradient(135deg, #1f1b16, color-mix(in srgb, var(--accent) 70%, #1f1b16)); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); aspect-ratio: 1.6; display: flex; flex-direction: column; gap: 10px; }
.mcard-shine { position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%); animation: shine 3.5s linear infinite; pointer-events: none; }
@keyframes shine { from { transform: translateX(-40%); } to { transform: translateX(40%); } }
.mcard-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mcard-top b { font-size: 16px; }
.mcard-top span { font-size: 10px; letter-spacing: .2em; opacity: .8; }
.mcard-no { font-size: 26px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.mcard-row { display: flex; gap: 10px; align-items: center; }
.mcard-row span { opacity: .8; font-size: 13px; }
.mcard-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: auto; }
.mcard-meta small { display: block; font-size: 10px; opacity: .75; }
.mcard-meta b { font-size: 13px; }
.mcard-clock { font-size: 12px; opacity: .85; font-variant-numeric: tabular-nums; text-align: right; }
.center { text-align: center; }
/* よく見られた投稿 */
.stats-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.stats-list a { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); color: var(--ink); }
.stats-list a:hover { text-decoration: none; background: var(--surface2); }

/* ---------- イベント・チケット ---------- */
.ev-list { display: flex; flex-direction: column; gap: 10px; }
.ev-card { display: flex; gap: 12px; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); }
.ev-card:hover { text-decoration: none; border-color: var(--ink); }
.ev-card img { width: 110px; object-fit: cover; flex: none; }
.ev-date { width: 76px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.ev-date b { font-size: 26px; line-height: 1; }
.ev-text { display: flex; flex-direction: column; gap: 3px; padding: 10px 10px 10px 0; min-width: 0; }
.ev-text b { line-height: 1.4; }
.ev-cover { width: 100%; max-height: 320px; object-fit: cover; border-radius: 14px; margin-top: 10px; }
.ev-facts { display: flex; flex-direction: column; gap: 6px; }
.ev-apply { margin-top: 10px; }
.ticket { position: relative; overflow: hidden; border-radius: 16px; padding: 18px; color: #fff; background: linear-gradient(135deg, #1f1b16, color-mix(in srgb, var(--accent) 65%, #1f1b16)); display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.ticket::after { content: ''; position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .18) 50%, transparent 60%); animation: shine 3.5s linear infinite; pointer-events: none; }
.ticket-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ticket-top span { font-size: 12px; opacity: .8; }
.ticket-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; opacity: .9; flex-wrap: wrap; }
.ticket-code { font-size: 32px; font-weight: 800; letter-spacing: .14em; text-align: center; font-variant-numeric: tabular-nums; padding: 6px 0; }
.ticket-used { position: absolute; top: 12px; right: -34px; transform: rotate(35deg); background: #fff; color: #1f1b16; font-weight: 800; font-size: 12px; padding: 3px 40px; }
.ticket-link { display: block; color: inherit; }
.ticket-link:hover { text-decoration: none; }
.notice.ok { border-color: #15803d; color: #15803d; }
@media (max-width: 920px) {
  .fc-nav { display: flex; justify-content: flex-start; top: var(--head); margin-bottom: 12px; }
  .fc-nav a { min-width: 64px; padding: 8px 6px 6px; }
}

/* 会員限定の動画の上に出す、見ている人の名前（すかし） */
.viewer-mark { position: absolute; z-index: 3; pointer-events: none; color: #fff; opacity: .28; font-size: 15px; font-weight: 800; text-shadow: 0 0 4px rgba(0, 0, 0, .8); transition: left 1.2s ease, top 1.2s ease; user-select: none; white-space: nowrap; }
.frame { position: relative; }

/* 新しい版のお知らせ（下のメニューの上に出す） */
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 200; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); box-shadow: 0 6px 24px rgba(0,0,0,.3); font-size: 14px; font-weight: 700; white-space: nowrap; }
@media (min-width: 921px) { .update-bar { bottom: 24px; } }

/* 下に引っぱって読み込み直す（上のバーのすぐ下に、言葉つきで出す） */
.ptr { position: fixed; left: 50%; top: calc(var(--head) + 6px); z-index: 150; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); box-shadow: 0 4px 14px rgba(0,0,0,.25); opacity: 0; transform: translate(-50%, -20px); pointer-events: none; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ptr .ptr-ic { display: inline-block; transition: transform .15s; }
.ptr.ready { color: var(--accent); border-color: var(--accent); }
.ptr.ready .ptr-ic { transform: rotate(180deg); }
.ptr.loading .ptr-ic { animation: ptrspin .8s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* 本当の情報で興味を引く印（残りわずか・NEW・締め切り間近・たった今売れました） */
.item .pic .hot-badge, .item .pic .new-badge { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; background: #e5484d; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.item .pic .new-badge { background: var(--accent); letter-spacing: .05em; }
.hot-line { color: #e5484d; font-weight: 800; font-size: 14px; margin-top: 2px; }
.urgent { color: #e5484d; font-weight: 800; }
.live-pop { position: fixed; left: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 140; display: flex; align-items: center; gap: 10px; max-width: min(320px, calc(100vw - 24px)); padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.3); opacity: 0; transform: translateY(12px); transition: opacity .35s, transform .35s; text-decoration: none; }
.live-pop.in { opacity: 1; transform: none; }
.live-pop b { display: block; font-size: 13px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.live-pop small { color: var(--muted); font-size: 11px; }
.live-pop .live-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 4px rgba(47,191,113,.2); }
@media (min-width: 921px) { .live-pop { bottom: 20px; } }

/* 運営の公式アカウントの印 */
.official-mark { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; vertical-align: middle; line-height: 1.5; }
.prof-name .official-mark { font-size: 12px; }
.badge.official { background: var(--accent); color: #fff; }

/* 翻訳ボタン */
.tr-btn { border: none; background: none; padding: 0; margin-top: 2px; color: var(--accent); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.tr-out { margin-top: 4px; padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--surface2); border-radius: 6px; font-size: 14px; white-space: pre-wrap; }

/* 画像を画面いっぱいで見る */
.img-viewer { position: fixed; inset: 0; z-index: 300; background: #000; }
.iv-scroll { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.iv-scroll::-webkit-scrollbar { display: none; }
.iv-slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; scroll-snap-align: center; }
.iv-slide img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; }
.iv-close { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.iv-count { position: absolute; top: calc(18px + env(safe-area-inset-top)); right: 16px; color: #fff; font-size: 14px; font-weight: 700; background: rgba(0,0,0,.55); padding: 3px 10px; border-radius: 999px; }
.fcard { cursor: pointer; }
.f-images img { cursor: zoom-in; }

/* ライブ配信 */
.live-stage { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; }
.live-stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.live-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; color: #fff; background: rgba(0,0,0,.55); font-size: 14px; }
.live-note[hidden] { display: none; }
.live-unmute { position: absolute; right: 10px; bottom: 10px; }
.live-unmute[hidden] { display: none; }
.badge.live-badge, .live-chip { background: #dc2626; color: #fff; border-color: #dc2626; }
.live-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.live-card { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); }
.live-card:hover { text-decoration: none; border-color: var(--ink); }
.live-thumb { position: relative; width: 96px; min-height: 96px; flex: none; background: #111; display: flex; align-items: center; justify-content: center; color: #fff; }
.live-thumb img { width: 100%; height: 100%; object-fit: cover; }
.live-on { position: absolute; left: 6px; top: 6px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.live-text { display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 10px 0; min-width: 0; }
.live-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-meter { display: flex; align-items: center; gap: 10px; }
.live-meter > span { flex: none; min-width: 9em; }
.live-meter-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.live-meter-bar i { display: block; height: 100%; width: 0; background: #16a34a; transition: width .08s linear; }
.live-unmute { font-size: 15px; padding: 10px 16px; }
.live-pinned { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.live-pinned[hidden] { display: none; }
.live-thumb.wide { width: 140px; }
.live-thumb-prev { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.live-thumb-prev[hidden] { display: none; }
.live-audio { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.live-stage.tall { aspect-ratio: 9 / 16; max-height: 75vh; margin: 0 auto; width: auto; max-width: 100%; }
.live-chat-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.live-chat-row { display: flex; gap: 8px; align-items: flex-start; }
.live-chat-body { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.live-chat-row .btn.ghost { padding: 2px 8px; }
.live-gift-row { background: var(--accent-soft); border-radius: 12px; padding: 8px; }
.live-gift-line { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.live-gift-emoji { font-size: 24px; line-height: 1; }
.live-gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.live-gift-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.live-gift-pick .live-gift-emoji { font-size: 34px; }
.live-gift-pick:disabled { opacity: .5; }
.live-gift-float { position: absolute; left: 50%; bottom: 10%; font-size: 64px; transform: translateX(-50%); animation: live-gift-up 3s ease-out forwards; pointer-events: none; z-index: 3; }
@keyframes live-gift-up { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -160px) scale(1); } }
.live-hearts-n { color: var(--muted, #888); }
.live-heart { position: absolute; bottom: 12px; font-size: 28px; pointer-events: none; z-index: 3; animation: live-heart-up 2.6s ease-out forwards; }
@keyframes live-heart-up { 0% { opacity: 0; transform: translateY(0) scale(.5); } 10% { opacity: 1; transform: translateY(-10px) scale(1.1); } 50% { transform: translate(-14px, -90px) scale(1); } 100% { opacity: 0; transform: translate(6px, -200px) scale(.9); } }
.live-gift-big { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; text-align: center; background: rgba(0, 0, 0, .45); color: #fff; pointer-events: none; animation: live-big 3.5s ease-out forwards; font-size: 18px; }
.live-gift-big-emoji { font-size: 120px; line-height: 1.1; animation: live-big-pop 1s ease-out; }
@keyframes live-big { 0% { opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes live-big-pop { 0% { transform: scale(.2) rotate(-20deg); } 60% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.live-goal { display: flex; flex-direction: column; gap: 4px; }
.live-goal-bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.live-goal-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f59e0b, #ef4444); transition: width .6s ease; }
.live-goal.done .live-goal-bar i { background: linear-gradient(90deg, #16a34a, #22c55e); }
.live-goal[hidden], .live-top[hidden] { display: none; }
.live-top { display: flex; gap: 8px; overflow-x: auto; }
.live-top-i { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface2, #f4f4f5); color: var(--ink); text-decoration: none; flex: none; line-height: 1.2; }
.live-badge-s { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 6px; margin-left: 2px; vertical-align: 1px; }
.live-b-host { background: #dc2626; color: #fff; }
.live-b-member { background: #4f46e5; color: #fff; }
.live-b-top { background: #fde68a; color: #78350f; }
.live-tools summary { cursor: pointer; }
.live-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.live-cover-label { position: absolute; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; }
.live-note.has-cover { background: #000; padding: 0; }
.coin-chip { border-radius: 999px; }
.coin-have { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.coin-have b { font-size: 22px; }
.coin-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coin-packs[hidden] { display: none; }
.coin-pack { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.coin-pack span { font-size: 13px; color: var(--muted); }
.coin-pack.pick { border: 2px solid var(--accent); background: var(--accent-soft); }
.coin-pack:disabled { opacity: .5; }
.live-gift-pick.short { opacity: .55; }
#coin-checkout { min-height: 200px; }

/* ---------- 配信の画面: 映像・コメント・入力欄を一度に見る（入力欄は画面のいちばん下） ---------- */
.live-room { max-width: 760px; margin: 0 auto; }
.live-room.is-setup { display: flex; flex-direction: column; gap: 14px; }
.live-room.is-setup .live-on-only, .live-room:not(.is-setup) .live-setup-only { display: none !important; }
.live-room.is-setup .live-bar { flex-wrap: wrap; }
#chat-wrap.live-on-flex:not([hidden]) { display: contents; }
body.live-mode .bottom-nav { display: none; }
body.live-mode .page { padding: 0; max-width: none; }
body.live-mode .live-room { display: flex; flex-direction: column; height: calc(100vh - var(--head)); height: calc(100dvh - var(--head)); overflow: hidden; }
body.live-mode .live-stage { flex: none; border-radius: 0; }
body.live-mode .live-stage.tall { aspect-ratio: 9 / 16; height: 48dvh; max-height: 48dvh; width: auto; margin: 0 auto; }
.live-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; min-width: 0; }
.live-bar-t { flex: 1; min-width: 0; line-height: 1.25; }
.live-bar-t b, .live-bar-t div { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-bar2 { padding-top: 0; gap: 10px; }
body.live-mode .live-pinned { flex: none; margin: 0 12px 6px; padding: 6px 10px; font-size: 13px; max-height: 3.6em; overflow: auto; }
.live-chat-area { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--line); }
.live-chat-area .live-goal, .live-chat-area .live-top, .live-chat-area #chat-note { flex: none; }
body.live-mode .live-chat-list { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
.live-input { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 10px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.live-input[hidden] { display: none; }
.live-input input { flex: 1; min-width: 0; border-radius: 999px; padding: 9px 14px; font-size: 16px; }
.live-ib { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 20px; line-height: 1; cursor: pointer; padding: 0; }
.live-ib[hidden] { display: none; }
.live-sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-end; justify-content: center; }
.live-sheet[hidden] { display: none; }
.live-sheet-box { background: var(--paper); width: 100%; max-width: 760px; max-height: 82dvh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }

.live-bar2 > * { white-space: nowrap; }

/* 配信の画面: 見えている範囲に合わせて固定（iPhone でキーボードが出ても映像が見えたまま） */
body.live-mode { overflow: hidden; }
body.live-mode .live-room { position: fixed; left: 0; right: 0; margin: 0 auto; top: calc(var(--vvtop, 0px) + var(--head)); height: calc(var(--vvh, 100dvh) - var(--head)); background: var(--paper); z-index: 20; }
body.live-kbd .live-room { top: var(--vvtop, 0px); height: var(--vvh, 100dvh); z-index: 40; }
body.live-kbd .live-bar, body.live-kbd .live-pinned, body.live-kbd .live-goal, body.live-kbd .live-top, body.live-kbd .live-unmute { display: none !important; }
body.live-kbd .live-stage, body.live-kbd .live-stage.tall { height: 38%; max-height: 38%; aspect-ratio: auto; width: 100%; }
.live-corner { position: absolute; top: 8px; right: 8px; z-index: 4; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }

/* 音のオン・オフ（見る人。映像の右上） */
.live-snd { border: none; font-size: 16px; padding: 4px 9px; }
/* コラボ: 参加している人を映像の左下に小さく出す */
.live-guests { position: absolute; left: 8px; bottom: 8px; z-index: 3; display: flex; gap: 6px; pointer-events: none; }
.live-guest { position: relative; width: 84px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #222; border: 2px solid rgba(255, 255, 255, .8); }
.live-guest video { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-guest.me video { transform: scaleX(-1); }
.live-guest-av { display: none; }
.live-guest.audio { width: auto; aspect-ratio: auto; display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgba(0, 0, 0, .6); border: none; }
.live-guest.audio video { position: absolute; width: 1px; height: 1px; opacity: 0; }
.live-guest.audio .live-guest-av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: #555; color: #fff; font-size: 13px; }
.live-guest.audio .live-guest-av img { width: 100%; height: 100%; object-fit: cover; }
.live-guest-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; font-size: 10px; color: #fff; background: rgba(0, 0, 0, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-guest.audio .live-guest-name { position: static; background: none; font-size: 12px; padding: 0; }
.live-collab { flex: none; display: flex; flex-direction: column; gap: 6px; }
.live-collab-row { padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; gap: 8px; }
/* コラボの枠: 横長（ふつう）・縦長 */
.live-guest:not(.audio) { width: 128px; aspect-ratio: 16 / 9; }
.live-guest.tall:not(.audio) { width: 72px; aspect-ratio: 9 / 16; }
.live-guests { align-items: flex-end; }
/* ホームの「フォロー中の人が配信中」 */
.live-now { margin-bottom: 12px; }
.live-now-title { color: #dc2626; margin-bottom: 6px; }
.live-now-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.live-now-i { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); text-decoration: none; }
.live-now-i:hover { text-decoration: none; }
.live-now-av { position: relative; padding: 3px; border-radius: 50%; border: 3px solid #dc2626; }
.live-now-av .avatar { display: grid; place-items: center; }
.live-now-tag { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); background: #dc2626; color: #fff; font-size: 10px; font-weight: 800; padding: 0 6px; border-radius: 4px; }
.live-now-name { margin-top: 6px; font-size: 12px; font-weight: 700; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-now-t { font-size: 11px; color: var(--muted); max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-now-av .avatar { width: 58px; height: 58px; font-size: 22px; }
/* 配信者がミュートしたコラボの人 */
.live-guest.hmuted::after { content: '🔇'; position: absolute; top: 3px; right: 4px; font-size: 13px; }
.live-guest.audio.hmuted::after { position: static; }
/* 配信者は参加者の枠をタップしてミュートできる */
.live-guest.tappable { pointer-events: auto; cursor: pointer; }
/* DM の画像・動画 */
.dm-attach { flex: none; padding: 8px 12px; font-size: 18px; cursor: pointer; }
.bubble .dm-media { display: block; max-width: min(260px, 100%); max-height: 320px; border-radius: 10px; margin-bottom: 4px; background: #000; }

/* ---------- グループ・通話 ---------- */
.group-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.group-row:hover { text-decoration: none; }
.group-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink, #fff); font-weight: 800; font-size: 18px; }
.group-ic.big { width: 72px; height: 72px; font-size: 30px; margin: 0 auto; border-radius: 20px; }
.dot-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.group-page { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.group-head { gap: 10px; }
.group-head b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.group-mode .bottom-nav { display: none; }
body.group-mode .page { padding-bottom: 12px; }
body.group-mode .group-page { height: calc(100dvh - var(--head) - 28px); }
.group-thread { flex: 1; min-height: 0; overflow-y: auto; }
.group-compose textarea { font-size: 16px; }
.voice-panel { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.voice-parts { display: flex; flex-wrap: wrap; gap: 8px; }
.voice-part { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface); font-size: 13px; }
.voice-audio { display: none; }
.voice-bar { position: fixed; left: 8px; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 55; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: #15803d; color: #fff; box-shadow: var(--shadow); max-width: 600px; margin: 0 auto; }
.voice-bar-t { flex: 1; min-width: 0; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-bar-t:hover { text-decoration: none; }
body.live-mode .voice-bar, body.group-mode .voice-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 921px) { .voice-bar { bottom: 16px; } }
/* 「＋ つくる・出す」: Instagram のように、まず何を出すかを大きく選ぶ */
.post-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.post-types a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; text-align: center; }
.post-types a:hover { text-decoration: none; border-color: var(--accent); }
.post-types .pt-ic { height: 34px; display: grid; place-items: center; }
.post-types .pt-ic .i { width: 28px; height: 28px; stroke-width: 1.7; }
.pt-live { font-size: 12px; font-weight: 800; color: #fff; background: #dc2626; padding: 3px 7px; border-radius: 6px; letter-spacing: .05em; }
.post-types b { font-size: 15px; }
.post-types small { font-size: 11px; color: var(--muted); }
.section-h { font-size: 15px; margin: 4px 0 10px; color: var(--muted); }

/* ---------- ストーリー ---------- */
.story-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 8px; }
.story-i { flex: none; width: 70px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); text-decoration: none; }
.story-i:hover { text-decoration: none; }
.story-av { position: relative; padding: 3px; border-radius: 50%; border: 2.5px solid transparent; }
.story-av .avatar { width: 56px; height: 56px; font-size: 22px; display: grid; place-items: center; }
.story-av.ring, .story-has.ring .avatar { border-color: var(--accent); }
.story-has.ring .avatar { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--accent); }
.story-has.seen .avatar { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--line); }
.story-av.seen { border-color: var(--line); }
.story-av.add { border-color: transparent; }
.story-plus { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 15px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--paper); }
.story-name { font-size: 11px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-view { position: fixed; inset: 0; z-index: 1000; background: #000; display: flex; align-items: center; justify-content: center; }
.story-frame { position: relative; width: 100%; max-width: 480px; height: 100%; max-height: 100dvh; color: #fff; display: flex; flex-direction: column; }
.story-bars { display: flex; gap: 3px; padding: 10px 10px 0; padding-top: calc(10px + env(safe-area-inset-top)); z-index: 3; }
.story-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.story-bars i { display: block; height: 100%; width: 0; background: #fff; }
.story-bars i.done { width: 100%; }
.story-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px; z-index: 3; }
.story-vis { background: rgba(255, 255, 255, .2); padding: 1px 8px; border-radius: 999px; }
.story-btn { background: rgba(0, 0, 0, .4); color: #fff; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.story-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.story-media img, .story-media video { width: 100%; height: 100%; object-fit: contain; }
.story-text { position: absolute; left: 12px; right: 12px; bottom: 90px; z-index: 3; text-align: center; font-size: 17px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); white-space: pre-wrap; word-break: break-word; }
.story-tap { position: absolute; top: 90px; bottom: 80px; width: 40%; z-index: 2; background: none; border: none; cursor: pointer; }
.story-tap.prev { left: 0; width: 30%; }
.story-tap.next { right: 0; width: 70%; }
.story-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.story-reply { display: flex; gap: 8px; }
.story-reply input { flex: 1; min-width: 0; background: rgba(0, 0, 0, .4); color: #fff; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; padding: 10px 14px; font-size: 16px; }
.story-reply input::placeholder { color: rgba(255, 255, 255, .7); }
.story-viewers { display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; background: rgba(0, 0, 0, .6); padding: 10px; border-radius: 12px; }
.story-prev img, .story-prev video { display: block; max-width: 100%; max-height: 50vh; border-radius: 12px; margin: 0 auto; }
.pt-story { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--accent); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 20px var(--line); }

/* ---------- 動画を画面いっぱいで見る ---------- */
.vplay { position: relative; cursor: pointer; }
.vplay video { pointer-events: none; }
.vplay-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .55); color: #fff; font-size: 28px; padding-left: 6px; cursor: pointer; }
.vplay-time { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.vv { position: fixed; inset: 0; z-index: 1000; background: #000; color: #fff; }
.vv-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.vv-mark { z-index: 2; }
.vv-ui { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: space-between; transition: opacity .25s; }
.vv.vv-hide .vv-ui { opacity: 0; }
.vv.vv-hide .vv-ui * { pointer-events: none; }
.vv-top { display: flex; align-items: center; padding: 12px; padding-top: calc(12px + env(safe-area-inset-top)); background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
.vv-round { width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .45); color: #fff; font-size: 20px; cursor: pointer; }
.vv-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .45); color: #fff; font-size: 24px; cursor: pointer; display: none; }
.vv.vv-paused .vv-center { display: block; }
.vv-bottom { padding: 0 14px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .7) 30%); }
.vv-author { display: flex; align-items: center; gap: 10px; padding-top: 30px; }
.vv-author .avatar { width: 44px; height: 44px; }
.vv-sub { color: rgba(255, 255, 255, .75); font-size: 13px; }
.vv-follow { border: none; border-radius: 999px; padding: 8px 16px; background: rgba(255, 255, 255, .22); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.vv-text { margin-top: 10px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.vv-text.open { -webkit-line-clamp: unset; max-height: 30vh; overflow-y: auto; }
.vv-actions { display: flex; gap: 8px; margin-top: 12px; }
.vv-pill { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 42px; border-radius: 999px; border: none; background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-size: 16px; cursor: pointer; }
.vv-pill.on { color: #f43f5e; }
.vv-bar { margin-top: 14px; }
.vv-track { position: relative; height: 18px; cursor: pointer; }
.vv-track::before, .vv-track i { content: ''; position: absolute; left: 0; top: 7px; height: 4px; border-radius: 2px; }
.vv-track::before { right: 0; background: rgba(255, 255, 255, .25); }
.vv-buf { background: rgba(255, 255, 255, .4); width: 0; }
.vv-pos { background: #fff; width: 0; }
.vv-controls { display: flex; align-items: center; gap: 6px; }
.vv-ctl { min-width: 40px; height: 40px; border: none; background: none; color: #fff; font: inherit; font-size: 18px; cursor: pointer; }
.vv-speed { font-size: 16px; font-weight: 700; }
.vv-time { font-size: 15px; color: rgba(255, 255, 255, .85); font-variant-numeric: tabular-nums; }
.vv-pill .i { width: 20px; height: 20px; } .vv-pill[data-save].on { color: #facc15; }

.f-video video, .tile-video { display: block; width: 100%; max-height: 520px; object-fit: cover; background: #000; pointer-events: none; }
.tile-video { aspect-ratio: 4 / 5; }

/* 著作権の設定（ふだんは閉じている） */
.rights-box summary { cursor: pointer; list-style: none; }
.rights-box summary::-webkit-details-marker { display: none; }
.rights-box summary::before { content: '▸ '; }
.rights-box[open] summary::before { content: '▾ '; }
.save-btn.on, .save-btn.on .i { color: #eab308; fill: currentColor; }

.story-plus { cursor: pointer; }
.story-av .avatar { cursor: pointer; }
.story-sel { background: rgba(0, 0, 0, .45); color: #fff; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; }
.story-btn.primary { background: var(--accent); border-color: var(--accent); font-weight: 700; }
.story-btn { white-space: nowrap; }

/* ストーリーの文字 */
.story-frame { container-type: inline-size; }
.story-ovs { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.story-ov { position: absolute; transform: translate(-50%, -50%); max-width: 90%; text-align: center; font-weight: 700; line-height: 1.25; white-space: pre-wrap; word-break: break-word; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); padding: .1em .35em; border-radius: .25em; }
.story-ov.edit { pointer-events: auto; cursor: move; touch-action: none; user-select: none; }
.story-ov.edit.on { outline: 2px dashed rgba(255, 255, 255, .9); outline-offset: 4px; }
.story-tools { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; flex-direction: column; gap: 10px; padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .75) 20%); }
.story-tools[hidden] { display: none; }
.story-tools > input[type=text] { background: rgba(0, 0, 0, .5); color: #fff; border: 1px solid rgba(255, 255, 255, .5); border-radius: 12px; padding: 10px 12px; font-size: 16px; }
.story-colors { display: flex; gap: 10px; justify-content: center; }
.story-colors button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); cursor: pointer; padding: 0; }
.story-colors button.on { box-shadow: 0 0 0 3px #fff; }
.story-fonts { display: flex; gap: 6px; overflow-x: auto; }
.story-fonts button { flex: none; background: rgba(255, 255, 255, .15); color: #fff; border: 1px solid transparent; border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
.story-fonts button.on { background: #fff; color: #111; }
.story-tools input[type=range] { accent-color: #fff; }
.story-top { position: relative; z-index: 3; }
.story-aa { font-weight: 800; }

/* ストーリーの音楽 */
.story-music { position: relative; z-index: 3; align-self: center; display: inline-flex; align-items: center; gap: 6px; margin: 4px auto 0; padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 13px; font-weight: 700; max-width: 85%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
#cs-chip { position: relative; z-index: 3; display: flex; justify-content: center; }
.story-x { background: none; border: none; color: #fff; font-size: 14px; cursor: pointer; padding: 0 2px; }
.story-music-pick { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 70%; overflow-y: auto; padding: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); background: rgba(20, 20, 20, .96); border-radius: 16px 16px 0 0; color: #fff; }
.story-music-pick[hidden] { display: none; }
.story-music-pick input[type=search] { flex: 1; min-width: 0; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 8px 12px; font-size: 16px; }
.story-song { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: rgba(255, 255, 255, .06); color: #fff; border: none; border-radius: 10px; padding: 8px; cursor: pointer; font: inherit; }
.story-song img, .story-song-c { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; display: grid; place-items: center; background: #333; }
.story-ok-box { margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: var(--surface2); }

/* ===== 広告の画像に寄せた見た目（2026-11-07）: 黒に近い背景・紫から青のグラデーションの差し色 ===== */
:root {
  --paper: #f6f6f9; --surface: #ffffff; --surface2: #efeff4; --ink: #111114; --muted: #6b6b76; --line: #e4e4ea;
  --accent: #7c3aed; --accent-ink: #ffffff; --accent-soft: #ede9fe; --indigo: #4f46e5;
  --grad: linear-gradient(90deg, #a855f7 0%, #6366f1 55%, #3b82f6 100%);
  --ring: linear-gradient(45deg, #f472b6, #a855f7 45%, #3b82f6);
}
html[data-theme="dark"] {
  --paper: #09090c; --surface: #141419; --surface2: #1d1d24; --ink: #f5f5f7; --muted: #a1a1ad; --line: #26262e;
  --accent: #a78bfa; --accent-ink: #ffffff; --accent-soft: #241d3a; --indigo: #a5b4fc;
}
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.1); }
.bottom-nav .plus .ic { background: var(--grad) !important; color: #fff !important; }
.logo img { border-radius: 8px; }
#app-name { font-weight: 700; letter-spacing: .06em; }
.play-round { background: var(--grad); color: #fff; }
/* ストーリー・配信中の輪: ピンクから紫から青 */
.story-av.ring, .live-now-av { border: none; padding: 3px; background: var(--ring); }
.story-av.ring .avatar, .live-now-av .avatar { box-shadow: 0 0 0 2.5px var(--paper); }
.story-av.seen { border-color: var(--line); }
.story-plus { background: var(--grad); }
.story-has.ring .avatar { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px #a855f7; }
/* タイムライン: 写真・動画は大きく、ボタンは右側に縦に重ねる */
.f-wrap { position: relative; margin-bottom: 6px; }
.f-wrap .f-media { margin-bottom: 0; border: none; border-radius: 16px; }
.f-side { position: absolute; right: 8px; bottom: 12px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; pointer-events: none; }
.f-side .link-btn { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; font-size: 12px; font-weight: 700; padding: 0; background: none; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); min-width: 36px; }
.f-side .link-btn .i { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.f-side .likes.on, .f-side .likes.on .i { color: #f43f5e; }
.f-side .save-btn.on, .f-side .save-btn.on .i { color: #facc15; }
.f-big .f-media .f-count { right: auto; left: 8px; }
.officialMark, .official-mark { color: #3b82f6; }
/* 写真・動画は縦長（4:5）で大きく見せる（右側のボタンが重なっても見やすいように） */
.f-big .f-scroll img, .f-big .f-video img, .f-big .f-video video { aspect-ratio: 4 / 5; height: auto; max-height: none; object-fit: cover; }
.f-big .f-scroll > a, .f-big .f-scroll > img { flex-basis: 100%; }
.f-side { gap: 12px; bottom: 14px; }
/* ストーリーの輪をはっきり */
.story-av.ring, .live-now-av { padding: 3px; }
.story-av.ring .avatar, .live-now-av .avatar { box-shadow: none; border: 3px solid var(--paper); }
/* ストーリーの輪の色はアトリエの紫→青。アイコンは丸（依頼者「アイコン丸がいい」） */
:root { --ring: linear-gradient(135deg, #a855f7, #6366f1 50%, #3b82f6); }
.story-av.seen { padding: 3px; background: var(--line); border: none; }
/* iPhone SE など幅の狭い画面: ロゴの「Atelier」と右のボタンがぶつからないように、ボタンを少し小さく・すき間を詰める */
@media (max-width: 400px) {
  .head { gap: 6px; padding: 0 8px; }
  .logo { gap: 6px; }
  .logo img { width: 28px; height: 28px; }
  #app-name { font-size: 16px; letter-spacing: .03em; }
  .head-tools { gap: 0; }
  .tool { width: 34px; height: 34px; }
  .tool .i { width: 21px; height: 21px; }
  .tool.text { padding: 0 6px; font-size: 12px; }
}
@media (max-width: 345px) { #app-name { display: none; } }
/* ホームの上のタブ: 文字だけ・選んでいるものに下線（おすすめ／画像／フォロー中／新着） */
.htabs { display: flex; background: var(--paper); border-bottom: 1px solid var(--line); margin: 0 auto 10px; padding: 0 4px; }
.htabs a, .htabs button { border: none; background: none; font: inherit; cursor: pointer; flex: 1; text-align: center; padding: 11px 4px 9px; color: var(--muted); font-weight: 700; font-size: 15px; white-space: nowrap; position: relative; }
.htabs a:hover, .htabs button:hover { text-decoration: none; color: var(--ink); }
.htabs .on { color: var(--ink); }
.htabs .on::after { content: ''; position: absolute; left: 28%; right: 28%; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
/* 「画像」タブ: ジャンルのボタン（横にスクロール）と2列のタイル */
.img-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; max-width: 640px; margin: 0 auto; }
.img-chips::-webkit-scrollbar { display: none; }
.img-chip { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--surface2); color: var(--muted); font-size: 13px; font-weight: 700; border: 1.5px solid transparent; white-space: nowrap; }
.img-chip:hover { text-decoration: none; color: var(--ink); }
.img-chip.on { color: var(--ink); border-color: var(--ink); background: transparent; }
.img-grid { columns: 2; column-gap: 10px; max-width: 640px; margin: 0 auto; }
@media (min-width: 900px) { .img-grid { columns: 3; max-width: 900px; } }
.itile { break-inside: avoid; margin-bottom: 10px; border-radius: 14px; overflow: hidden; background: var(--surface2); position: relative; }
.itile .thumb { display: block; position: relative; }
.itile .thumb img { display: block; width: 100%; height: auto; min-height: 120px; object-fit: cover; }
.itile .count { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 6px; }
.itile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: #fff; display: flex; flex-direction: column; line-height: 1.3; pointer-events: none; }
.itile-cap b { font-size: 13px; }
.itile-cap span { font-size: 11px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ホームのタブの中身: 横にスライドして切り替える */
.hswipe { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; align-items: flex-start; overscroll-behavior-x: contain; margin: 0 -14px; }
.hswipe::-webkit-scrollbar { display: none; }
.hpane { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; padding: 0 14px 16px; box-sizing: border-box; }
.hpane > .more { display: block; margin: 14px auto 0; }
/* 名作ギャラリー（まだ投稿が少ない間だけ、パブリックドメインの名作を混ぜる） */
.sample-av { font-size: 18px; }
.fcard.sample .f-name { color: var(--ink); font-weight: 800; }
.art-credit { display: inline-block; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
/* タイムラインの投稿をすばやく2回押したときのハート */
.dt-heart { position: fixed; z-index: 90; width: 0; height: 0; pointer-events: none; color: #f43f5e; }
.dt-heart .i { position: absolute; width: 84px; height: 84px; left: -42px; top: -42px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .45)); animation: dt-pop .9s ease-out forwards; }
@keyframes dt-pop { 0% { transform: scale(.2); opacity: 0; } 15% { transform: scale(1.15); opacity: 1; } 30% { transform: scale(.95); } 45% { transform: scale(1); opacity: 1; } 100% { transform: scale(1) translateY(-40px); opacity: 0; } }
.fcard { touch-action: manipulation; }
/* パソコンの広い画面: ホームの左右に欄（スマホ・タブレットでは出さない） */
.home-side { display: none; }
@media (min-width: 1100px) {
  .home-grid { display: grid; grid-template-columns: minmax(180px, 220px) minmax(0, 640px) minmax(240px, 290px); gap: 24px; justify-content: center; align-items: start; }
  .home-main { min-width: 0; }
  .home-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--head) + 16px); max-height: calc(100vh - var(--head) - 32px); overflow-y: auto; scrollbar-width: none; }
  .home-side::-webkit-scrollbar { display: none; }
  .home-bottom { display: none; }
  .home-main .hswipe { margin: 0; }
  .home-main .hpane { padding-left: 0; padding-right: 0; }
}
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.side-card h3 { margin: 0 0 10px; font-size: 15px; }
.side-card p { margin: 6px 0 12px; line-height: 1.6; }
.btn.block { display: flex; width: 100%; justify-content: center; box-sizing: border-box; }
.side-me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 14px; color: var(--ink); }
.side-me:hover { background: var(--surface2); text-decoration: none; }
.side-me .avatar { width: 48px; height: 48px; }
.side-me span { display: flex; flex-direction: column; min-width: 0; }
.side-me b, .side-me small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me small { color: var(--muted); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; color: var(--ink); font-weight: 700; font-size: 15px; }
.side-nav a:hover { background: var(--surface2); text-decoration: none; }
.side-nav .i { width: 22px; height: 22px; }
.side-post { margin-top: 4px; padding: 12px; font-size: 15px; }
.side-person { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.side-person .avatar { width: 38px; height: 38px; }
.side-person .who { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); line-height: 1.3; }
.side-person .who:hover { text-decoration: none; }
.side-person .who b, .side-person .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.side-person .who small { color: var(--muted); font-size: 12px; }
.side-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.side-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 10px; overflow: hidden; }
.side-art { padding: 0; border: none; background: var(--surface2); aspect-ratio: 1; cursor: zoom-in; }
.side-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .15s; }
.side-art:hover img { opacity: .85; }
.side-foot .foot { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 0 4px; margin: 0; font-size: 11.5px; justify-content: flex-start; border: none; }
/* パソコンでも幅が狭め（〜1200px）のとき、上のメニューが右にはみ出さないように詰める */
@media (min-width: 701px) and (max-width: 1200px) {
  .head-nav { gap: 0; }
  .head-nav a { padding: 6px 7px; font-size: 14px; }
}
