/* わいわいタウン（waiwai.town）— B案・浮世絵ポップ（実装仕様 P2 §10） */

:root {
  --washi: #F3E8D5;
  --washi-card: #FBF5EA;
  --sumi: #1E1B18;
  --sumi-sub: #5A534B;
  --shu: #C8382E;
  --ai: #22406B;
  --kin: #C39A4B;
  --line: rgba(30, 27, 24, 0.18);
  --max: 1120px;
  --pad: 16px;
  --font-mincho: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--sumi);
  font-family: var(--font-sans);
  line-height: 1.65;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(195, 154, 75, 0.12), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(34, 64, 107, 0.08), transparent 45%),
    linear-gradient(180deg, #f7efe0 0%, var(--washi) 40%, #ebe0cc 100%);
  min-height: 100vh;
}

a {
  color: var(--ai);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--shu);
}

.inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ----- Header ----- */
.site-header {
  background: rgba(251, 245, 234, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 12px var(--pad);
}

.logo {
  display: block;
  line-height: 0;
  text-decoration: none;
}

.logo-with-badge {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.3rem;
}

.badge-beta {
  display: inline-block;
  line-height: 1.2;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.1em 0.45em;
  border-radius: 999px;
  background: var(--shu);
  color: var(--washi);
  white-space: nowrap;
}

.logo-lockup {
  display: block;
  height: 58px;
  width: auto;
}

/* タスクL：狭幅でもサイト名入りロゴ(logo-lockup)を出す。markへの出し分けは廃止し、高さだけ縮める */
@media (max-width: 767px) {
  .logo-lockup {
    height: 40px;
  }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  flex: 1;
}

/* ----- ナビ：PC=常時横並び／モバイル=ハンバーガー（タスクM。JS禁止のためdetails/summaryのみ） ----- */
.nav-desktop,
.header-actions-desktop {
  display: flex;
  align-items: center;
}

.header-actions-desktop {
  margin-left: auto;
}

.nav-toggle {
  display: none;
}

@media (max-width: 767px) {
  .nav-desktop,
  .header-actions-desktop {
    display: none;
  }

  .header-inner {
    position: relative;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    list-style: none;
  }

  .nav-toggle-btn::-webkit-details-marker {
    display: none;
  }

  .hamburger-icon,
  .hamburger-icon::before,
  .hamburger-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--sumi);
    border-radius: 1px;
  }

  .hamburger-icon {
    position: relative;
  }

  .hamburger-icon::before,
  .hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
  }

  .hamburger-icon::before {
    top: -7px;
  }

  .hamburger-icon::after {
    top: 7px;
  }

  .nav-dropdown {
    position: absolute;
    top: 100%;
    right: var(--pad);
    left: var(--pad);
    margin-top: 8px;
    background: var(--washi-card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(30, 27, 24, 0.18);
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-dropdown .nav {
    flex-direction: column;
    gap: 0.2rem;
  }

  .nav-dropdown .nav-link {
    padding: 0.6rem 0.2rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .nav-dropdown .header-actions {
    margin-left: 0;
  }
}

.nav-link {
  color: var(--sumi-sub);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--sumi);
  border-bottom-color: var(--shu);
}

.header-actions {
  margin-left: auto;
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 0.55em 1.1em;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--washi-card);
  color: var(--sumi);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
}

.btn:hover {
  border-color: var(--sumi-sub);
  color: var(--sumi);
}

.btn-primary {
  background: var(--shu);
  border-color: var(--shu);
  color: #fff;
}

.btn-primary:hover {
  background: #a82e26;
  border-color: #a82e26;
  color: #fff;
}

.btn-login {
  font-size: 0.85rem;
}

/* Discord公式ブラープル。ロゴ画像は使わない・色とテキストのみ（タスクN） */
.btn-discord {
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
  font-size: 0.85rem;
}

.btn-discord:hover {
  background: #4752c4;
  border-color: #4752c4;
  color: #fff;
}

.btn.is-disabled,
.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ----- Hero ----- */
.hero {
  position: relative;
  margin-bottom: 2rem;
  background: var(--ai);
}

.hero-media {
  line-height: 0;
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: right center;
}

.hero-copy {
  background: var(--washi-card);
  border: 1px solid var(--line);
  margin: 0 var(--pad);
  margin-top: -1px;
  padding: 1.25rem 1.25rem 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-mincho);
  font-size: 1.45rem;
  margin: 0 0 0.4em;
  color: var(--sumi);
  line-height: 1.35;
}

.hero-tagline {
  margin: 0 0 1rem;
  color: var(--sumi-sub);
  font-size: 0.98rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
}

/* 640px 以上：ヒーローに文字を重ねる（左 1/3 の余白） */
@media (min-width: 640px) {
  .hero {
    max-width: var(--max);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
  }

  .hero-media img {
    max-height: none;
  }

  .hero-copy {
    position: absolute;
    left: var(--pad);
    top: 50%;
    transform: translateY(-50%);
    width: min(340px, 36%);
    margin: 0;
    background: rgba(251, 245, 234, 0.92);
    box-shadow: 0 4px 20px rgba(30, 27, 24, 0.12);
  }

  .hero-title {
    font-size: 1.55rem;
  }
}

@media (min-width: 1024px) {
  .hero-copy {
    width: min(380px, 34%);
    padding: 1.6rem 1.5rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }
}

/* ----- Sections ----- */
.main {
  padding-bottom: 3rem;
}

.section {
  /* margin-left/right は指定しない（罠：shorthandで0にすると .inner の
     margin: 0 auto を上書きし、`.inner.section` を持つページだけ中央寄せが崩れる） */
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-mincho);
  font-size: 1.25rem;
  margin: 0 0 0.85rem;
  color: var(--ai);
  border-left: 4px solid var(--shu);
  padding-left: 0.6rem;
  line-height: 1.35;
}

.count {
  color: var(--sumi-sub);
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}

.empty {
  color: var(--sumi-sub);
  background: var(--washi-card);
  border: 1px dashed var(--line);
  padding: 1rem 1.1rem;
  border-radius: 4px;
}

.empty-note {
  color: var(--sumi-sub);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.pre-wrap {
  white-space: pre-wrap;
}

/* ----- Cards ----- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--washi-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-color: rgba(200, 56, 46, 0.35);
  box-shadow: 0 4px 14px rgba(30, 27, 24, 0.08);
}

.card-link {
  display: block;
  padding: 1rem;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: var(--sumi);
  color: var(--washi);
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  letter-spacing: 0;
}

.card-title {
  font-family: var(--font-mincho);
  font-size: 1.02rem;
  margin: 0 0 0.35rem;
  line-height: 1.35;
  color: var(--sumi);
}

.card-tagline {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  color: var(--sumi-sub);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----- Badges ----- */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: #f0e6d4;
  color: var(--sumi-sub);
  line-height: 1.4;
}

.badge-ip {
  background: rgba(34, 64, 107, 0.1);
  border-color: rgba(34, 64, 107, 0.25);
  color: var(--ai);
}

.badge-kind {
  background: rgba(200, 56, 46, 0.08);
  border-color: rgba(200, 56, 46, 0.22);
  color: var(--shu);
  font-weight: 700;
}

.badge-genre {
  background: transparent;
}

.badge-platform {
  background: rgba(195, 154, 75, 0.15);
  border-color: rgba(195, 154, 75, 0.4);
  color: #6b5428;
}

.badge-soon {
  background: rgba(90, 83, 75, 0.1);
  border-color: var(--line);
  color: var(--sumi-sub);
}

/* ----- Chips ----- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.chip-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sumi-sub);
  margin-right: 0.25rem;
  min-width: 4.5em;
}

.chip {
  display: inline-block;
  font-size: 0.82rem;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--washi-card);
  color: var(--sumi-sub);
  text-decoration: none;
}

.chip:hover {
  border-color: var(--ai);
  color: var(--ai);
}

.chip.is-active {
  background: var(--ai);
  border-color: var(--ai);
  color: #fff;
  font-weight: 600;
}

/* ----- Banzuke board ----- */
.banzuke-board {
  background: linear-gradient(145deg, #fbf5ea 0%, #f0e4cc 100%);
  border: 2px solid var(--kin);
  border-radius: 6px;
  padding: 1.1rem 1.15rem 1.25rem;
  margin: 1.5rem 0;
  box-shadow: inset 0 0 0 1px rgba(195, 154, 75, 0.25);
}

.banzuke-board .section-title {
  border-left-color: var(--kin);
  color: var(--sumi);
}

.banzuke-row {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: 0.6rem 0.85rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.banzuke-row:last-of-type {
  border-bottom: none;
}

.rank-no {
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--shu);
  text-align: center;
  line-height: 1;
}

.banzuke-name {
  font-family: var(--font-mincho);
  font-weight: 600;
  color: var(--sumi);
  text-decoration: none;
  display: block;
  margin-bottom: 0.25rem;
}

.banzuke-name:hover {
  color: var(--shu);
}

.banzuke-score {
  font-size: 0.82rem;
  color: var(--sumi-sub);
  white-space: nowrap;
  text-align: right;
}

.banzuke-more {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  text-align: right;
}

/* ----- Detail ----- */
.detail-header {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.detail-icon {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  background: var(--sumi);
  color: var(--washi);
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 var(--shu);
}

.detail-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 2px 2px 0 var(--shu);
}

.detail-tagline {
  margin: 0 0 0.6rem;
  color: var(--sumi-sub);
}

.description {
  background: var(--washi-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  line-height: 1.75;
}

.link-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--ai);
  color: rgba(251, 245, 234, 0.92);
  padding: 2rem 0 2.5rem;
  margin-top: 2rem;
}

.site-footer a {
  color: #f0d9a0;
}

.site-footer a:hover {
  color: #fff;
}

.notice-unofficial {
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 0.85rem;
  opacity: 0.95;
}

.footer-links {
  font-size: 0.88rem;
  margin: 0 0 0.5rem;
}

.footer-copy {
  font-size: 0.8rem;
  margin: 0;
  opacity: 0.75;
}

/* body 内の notice は地色用 */
body .notice-unofficial {
  /* footer 以外 */
}

.about .notice-unofficial,
.main .notice-unofficial {
  color: var(--sumi-sub);
  background: var(--washi-card);
  border-left: 3px solid var(--ai);
  padding: 0.75rem 1rem;
}

/* ----- P3 forms ----- */
.form { max-width: 40rem; }
.form-field { display: block; margin-bottom: 1rem; }
.form-field > span,
.form-field > legend { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.form-field input[type="text"],
.form-field input[type="url"],
.form-field textarea,
.form-field select {
  width: 100%;
  max-width: 100%;
  padding: 0.5em 0.65em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--washi-card);
  font: inherit;
  color: var(--sumi);
}
.form-radio { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 1rem; margin-bottom: 0.35rem; }
.form-row.link-row { display: grid; grid-template-columns: 8rem 1fr 7rem; gap: 0.4rem; margin-bottom: 0.4rem; }
@media (max-width: 640px) {
  .form-row.link-row { grid-template-columns: 1fr; }
}
.form-errors {
  background: rgba(200, 56, 46, 0.08);
  border: 1px solid rgba(200, 56, 46, 0.35);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: var(--shu);
}
.form-notice {
  background: rgba(34, 64, 107, 0.08);
  border: 1px solid rgba(34, 64, 107, 0.25);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.inline-form { display: inline; }
.login-user { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.login-name { font-size: 0.88rem; font-weight: 600; }
.badge-holder {
  font-size: 0.72rem;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  background: rgba(195, 154, 75, 0.2);
  border: 1px solid rgba(195, 154, 75, 0.5);
  color: #6b5428;
  font-weight: 700;
}
.my-list, .admin-list { list-style: none; padding: 0; margin: 0; }
.my-item, .admin-item {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0.5rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line);
}
.my-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.my-delete-link {
  margin-left: 0.9rem;
  padding-left: 0.9rem;
  border-left: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--sumi-sub);
}
.my-delete-link:hover {
  color: var(--shu);
}
.admin-apply-body { white-space: pre-wrap; }
.admin-note-input { width: 100%; max-width: 16rem; padding: 0.3em 0.5em; border: 1px solid var(--line); border-radius: 4px; background: var(--washi-card); font: inherit; }
.simple-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 1rem; }
.simple-table th, .simple-table td { border: 1px solid var(--line); padding: 0.4rem 0.55rem; text-align: left; }
.simple-table th { background: rgba(30, 27, 24, 0.04); }
.code-block {
  background: var(--washi-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
}
.muted { color: var(--sumi-sub); font-size: 0.92rem; }

.agent-request-text {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--washi-card);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--sumi);
  resize: vertical;
  margin: 0.5rem 0;
}

/* ----- サイト内プレイ（P3.7）----- */
.badge-play {
  background: rgba(200, 56, 46, 0.12);
  border-color: rgba(200, 56, 46, 0.35);
  color: var(--shu);
  font-weight: 700;
}

.card-detail-link {
  display: block;
  padding: 0 1rem 0.85rem;
  font-size: 0.82rem;
  color: var(--sumi-sub);
  text-decoration: none;
}

.card-detail-link:hover {
  color: var(--ai);
}

.btn-play {
  margin-bottom: 0.5rem;
}

.play-body {
  margin: 0;
  background: var(--sumi);
}

.play-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.75rem;
  background: var(--sumi);
  color: var(--washi);
  z-index: 10;
  font-size: 0.85rem;
}

.play-back {
  color: var(--washi);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.play-back:hover {
  color: var(--kin);
}

.play-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-host {
  margin-left: auto;
  color: rgba(243, 232, 213, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-report {
  color: var(--washi);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.play-report:hover {
  color: var(--kin);
}

.play-frame {
  position: fixed;
  top: 44px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100% - 44px);
  border: 0;
}

@media (max-width: 480px) {
  .play-host {
    display: none;
  }
}
#new-key { font-size: 0.95rem; word-break: break-all; user-select: all; }

/* ----- レビュー・改善希望（P4）----- */
.review-summary { font-weight: 700; margin-bottom: 0.75rem; }
.stars { color: var(--kin); letter-spacing: 0.05em; }
.star-input { border: 0; padding: 0; margin: 0 0 1rem; }
.star-input legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.star-input label {
  display: inline-flex; align-items: center; gap: 0.25rem;
  margin-right: 0.9rem; margin-bottom: 0.35rem; font-size: 0.95rem;
}
.form-note {
  color: var(--sumi-sub);
  background: var(--washi-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
}
.review-list, .feedback-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.review-item, .feedback-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.review-body, .feedback-body { margin: 0.35rem 0; }
.review-meta, .feedback-meta { color: var(--sumi-sub); font-size: 0.85rem; }
.report-link { margin-left: 0.5rem; }

/* ----- ヘッダー極細化（P3.5§7-4）----- */
.header-inner {
  padding: 6px var(--pad);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-actions .btn-login,
.header-actions .btn-discord {
  font-size: 0.78rem;
  padding: 0.4em 0.75em;
}

.login-user {
  gap: 0.3rem;
}

.login-name {
  font-size: 0.8rem;
}

.badge-holder {
  font-size: 0.65rem;
}

/* ----- タイル壁（トップ・P3.5§7）----- */
.tile-wall-wrap {
  padding-top: 1.75rem;
}

.tile-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  /* タスクU：行の高さは各タイルの aspect-ratio（1:1）から決まる＝固定pxをやめて正方形化 */
  grid-auto-rows: auto;
  grid-auto-flow: dense; /* タスクQ1：大タイル(2×2)が中間位置に来ても穴を詰める */
  gap: 7px;
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1; /* タスクU：タイルを正方形に統一（サムネは object-fit: cover で中央クロップ） */
  border-radius: 14px;
  overflow: hidden;
  background: var(--sumi);
  text-decoration: none;
  color: var(--washi);
  box-shadow: 0 2px 8px rgba(30, 27, 24, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tile:hover {
  box-shadow: 0 4px 14px rgba(30, 27, 24, 0.28);
  transform: scale(1.045);
  z-index: 2;
}

.tile-lg {
  grid-column: span 2;
  grid-row: span 2;
}

.tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 2.4rem;
  color: #fff;
}

.tile-lg .tile-fallback {
  font-size: 3.6rem;
}

.tile-c0 { background: #C8382E; }
.tile-c1 { background: #22406B; }
.tile-c2 { background: #C39A4B; }
.tile-c3 { background: #5A534B; }
.tile-c4 { background: #7A3E9D; }
.tile-c5 { background: #1E7A5C; }
.tile-c6 { background: #B5541F; }
.tile-c7 { background: #2E7DA6; }

.tile-fire {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

.tile-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.35rem 0.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-register {
  background: var(--washi-card);
  border: 2px dashed var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.tile-register .tile-name {
  position: static;
  background: none;
  color: var(--sumi-sub);
  font-size: 0.85rem;
  padding: 0;
  white-space: normal;
  text-align: center;
}

.tile-register-icon {
  font-size: 1.8rem;
  color: var(--sumi-sub);
  line-height: 1;
}

/* ----- サムネイル関連の小物（P3.5）----- */
.form-help {
  color: var(--sumi-sub);
  font-size: 0.82rem;
  margin: 0.3rem 0 0;
}

.thumb-preview {
  display: block;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  object-fit: cover;
}

/* タスクV：フォームエラー再表示時のtmpサムネプレビュー（アップロード済みを視覚的に示す） */
.thumb-tmp-preview {
  display: block;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  border: 2px solid var(--accent, #2e7da6);
  object-fit: cover;
}

.play-title {
  color: var(--washi);
  text-decoration: none;
}

.play-title:hover {
  color: var(--kin);
}
