@import "tailwindcss";

/* ===========================================
   Static Pages
   =========================================== */

/* Static Page Layout */
.static-page {
  @apply py-12 min-h-screen;
}

.static-page__header {
  @apply mb-10 text-center;
}

.static-page__title {
  @apply text-2xl font-bold mb-2;
  color: var(--color-text);
}

.static-page__updated {
  @apply text-sm;
  color: var(--color-text-muted);
}

.static-page__description {
  @apply mt-2;
  color: var(--color-text-muted);
}

/* 1カラムの読み物はコラム記事詳細と同じ幅に揃える（行長を読みやすい範囲に保つ） */
.static-page__content {
  @apply rounded-xl p-8 max-w-3xl mx-auto;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.static-page__section {
  @apply mb-8 last:mb-0;
}

.static-page__section h2 {
  @apply text-xl font-bold mb-4 pb-2;
  color: var(--color-text);
}

.static-page__section h3 {
  @apply text-lg font-semibold mt-4 mb-2;
  color: var(--color-text);
}

.static-page__section p {
  @apply leading-relaxed mb-3;
  color: var(--color-text-muted);
}

.static-page__section ul,
.static-page__section ol {
  @apply pl-6 mb-3 space-y-1;
  color: var(--color-text-muted);
}

.static-page__section ul {
  @apply list-disc;
}

.static-page__section ol {
  @apply list-decimal;
}

.static-page__section a {
  @apply underline;
  color: var(--color-primary);
}

.static-page__section a:hover {
  opacity: 0.8;
}

.static-page__footer {
  @apply mt-8 text-center;
}

/* Contact Methods */
.contact-methods {
  @apply grid gap-6 md:grid-cols-3 mt-6;
}

.contact-method {
  @apply rounded-lg p-6 text-center break-all;
  background: var(--color-bg-card);
}

.contact-method__icon {
  @apply text-4xl mb-3;
}

.contact-method__title {
  @apply text-lg font-semibold mb-2;
  color: var(--color-text);
}

.contact-method__description {
  @apply text-sm mb-4;
  color: var(--color-text-muted);
}

.contact-method__link {
  @apply inline-block text-emerald-400 hover:text-emerald-300 font-medium;
}

/* FAQ */
.faq-list {
  @apply space-y-3 mt-4 grid gap-2;
}

.faq-item {
  @apply rounded-lg overflow-hidden;
  background: var(--color-bg-card);
}

.faq-item__question {
  @apply px-5 py-4 cursor-pointer font-medium transition-colors;
  color: var(--color-text);
}

.faq-item__question:hover {
  background: var(--color-border);
}

.faq-item__answer {
  @apply px-5 pb-4;
  color: var(--color-text-muted);
}

.faq-item__answer p {
  @apply mb-0;
}

/* External Service Table (外部送信規律) */
.external-service-table {
  @apply overflow-x-auto mt-4;
}

.external-service-table table {
  @apply w-full text-sm border-collapse;
}

.external-service-table th,
.external-service-table td {
  @apply px-3 py-2 text-left;
  border: 1px solid var(--color-border);
}

.external-service-table th {
  @apply text-left px-3 py-2 font-semibold;
  background: var(--color-bg-card);
  color: var(--color-text);
}

.external-service-table td {
  @apply px-3 py-2;
  background: var(--color-bg-light);
  color: var(--color-text-muted);
}

.external-service-table a {
  @apply text-emerald-400 hover:text-emerald-300;
}

/* ===========================================
   Vote Section
   =========================================== */

/* Vote Status */
.vote-status {
  @apply py-3 px-4 rounded-lg;
  background: var(--color-bg-card);
}

.vote-status__message {
  @apply font-semibold text-base mb-1;
  color: var(--color-primary);
}

.vote-status__next-time {
  @apply text-sm;
  color: var(--color-text-muted);
}

/* Vote Account Picker（Java版・統合版の両方を連携しているときの投票アカウント選択） */
.vote-account-picker__options {
  @apply flex flex-col gap-2 mb-3;
}

.vote-account-picker__option {
  @apply flex items-center gap-3 rounded-lg px-3 py-2 cursor-pointer transition-colors;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
}

.vote-account-picker__option:has(.vote-account-picker__input:checked) {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}

.vote-account-picker__option:has(.vote-account-picker__input:focus-visible) {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.vote-account-picker__input {
  @apply w-4 h-4 shrink-0;
  accent-color: var(--color-primary);
}

.vote-account-picker__body {
  @apply flex flex-col items-start gap-1 min-w-0;
}

.vote-account-picker__name {
  @apply text-sm font-semibold truncate;
  color: var(--color-text);
}

/* Vote Notice */
.vote-notice {
  @apply text-sm;
  color: var(--color-text-muted);
}

/* Recent Voters */
.recent-voters {
  @apply mt-3 pt-3;
}

.recent-voters__label {
  @apply block text-sm mb-2;
  color: var(--color-text-muted);
}

.recent-voters__avatars {
  @apply flex flex-wrap gap-1.5;
}

.recent-voters__avatar {
  @apply w-8 h-8 rounded-full overflow-hidden flex items-center justify-center cursor-pointer transition-transform hover:scale-110 hover:ring-2 hover:ring-emerald-500;
  background: var(--color-bg-card);
}

.recent-voters__avatar-img {
  @apply w-full h-full object-cover;
}

.recent-voters__avatar-fallback {
  @apply text-sm;
}

/* ===========================================
   Votifier Test Section
   =========================================== */

/* Votifier Test Section */
.votifier-test-section {
  @apply mt-6 pt-6;
}

.votifier-test-section__title {
  @apply text-lg font-semibold mb-2;
  color: var(--color-text);
}

.votifier-test-section__description {
  @apply text-sm mb-4;
  color: var(--color-text-muted);
}

/* Votifier Test Result */
.votifier-test-result {
  @apply mt-4;
}

/* ===========================================
   Favorite Section
   =========================================== */

/* Favorite Button (for server cards) */
.favorite-btn {
  @apply w-8 h-8 flex items-center justify-center rounded-full transition-all cursor-pointer hover:border-yellow-500 hover:text-yellow-500;
  background: var(--color-bg-card);
  border: none;
  color: var(--color-text-muted);
}

.favorite-btn--active {
  @apply bg-yellow-500/20 border-yellow-500 text-yellow-500;
}

.favorite-btn__icon {
  @apply text-lg leading-none;
}

/* Favorite Status (for sidebar) */
.favorite-status {
  @apply flex items-center gap-2 py-3 px-4 rounded-lg mb-3;
}

.favorite-status--active {
  @apply bg-amber-50 border border-amber-200;
}

[data-theme="dark"] .favorite-status--active {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.favorite-status__icon {
  @apply text-yellow-500 text-xl;
}

.favorite-status__text {
  @apply font-medium text-sm;
  color: var(--color-text);
}

.favorite-actions {
  @apply flex flex-col gap-2 mt-3;
}

/* Favorite Star (for detail page) */
.favorite-star {
  @apply text-yellow-400 text-lg leading-none;
}

/* Server Address Entry (Dual Address Display) */
.server-address-entry {
  @apply flex flex-col gap-2;
}

.server-address-entry + .server-address-entry {
  @apply mt-3;
}

.server-address-entry__label-row {
  @apply flex items-center justify-between;
}

.server-address-entry__label {
  @apply text-sm font-medium;
  color: var(--color-text);
}

.server-address-entry__badge {
  @apply text-xs font-medium px-2 py-0.5 rounded-full;
}

.server-address-entry__badge--verified {
  @apply bg-emerald-900/50 text-emerald-400 border border-emerald-700/50;
}

.server-address-entry__badge--unverified {
  @apply bg-amber-900/40 text-amber-400 border border-amber-700/50 no-underline hover:bg-amber-900/60;
}

.server-address-entry__box {
  @apply flex flex-col gap-2;
}

.server-address-entry__code {
  @apply block px-3 py-2.5 rounded-lg font-mono text-sm text-center break-all;
  background: var(--color-bg-card);
  color: var(--color-text);
  border: none;
}

/* Verification Card - Verified Badge */
.verification-card__verified {
  @apply flex items-center gap-3 bg-emerald-900/30 border border-emerald-700/50 rounded-lg px-4 py-3;
}

.verification-card__verified-badge {
  @apply text-emerald-400 font-semibold text-base;
}

.verification-card__verified-address {
  @apply text-sm m-0;
  color: var(--color-text-muted);
}

/* Edition Address Group (Form) */
.edition-address-group {
  @apply mt-2 rounded-lg p-4 mb-3 last:mb-0 transition-colors;
  background: var(--color-bg);
}

.edition-address-group--active {
  background: var(--color-bg-light);
  box-shadow: inset 0 0 0 1px var(--color-border), var(--shadow-card);
}

.edition-address-group__header {
  @apply flex items-center gap-3 cursor-pointer select-none;
}

.edition-address-group__label {
  @apply font-medium text-sm;
  color: var(--color-text);
}

.edition-address-group__input {
  @apply mt-3 pl-7;
}

/* Verification Accordion */
.verification-methods__hint {
  @apply mb-3;
}

.verification-methods__hint-text {
  @apply text-sm leading-relaxed;
  color: var(--color-text-muted);
}

.verification-accordion {
  @apply rounded-lg overflow-hidden;
  background: var(--color-bg-card);
  border: none;
}

.verification-accordion__trigger {
  @apply flex items-center gap-2.5 px-4 py-3.5 cursor-pointer select-none list-none transition-colors;
  background: var(--color-bg-card);
}

.verification-accordion__trigger:hover {
  background: var(--color-border);
}

.verification-accordion__trigger::-webkit-details-marker {
  display: none;
}

.verification-accordion__icon {
  @apply text-lg leading-none;
}

.verification-accordion__title {
  @apply flex-1 text-sm font-semibold;
  color: var(--color-text);
}

.verification-accordion__arrow {
  @apply text-xs transition-transform duration-200;
  color: var(--color-text-muted);
}

.verification-accordion[open] > .verification-accordion__trigger .verification-accordion__arrow {
  @apply rotate-90;
}

.verification-accordion__content {
  @apply px-4 pb-4 pt-4;
  border-top: none;
  background: var(--color-bg-card);
}

.verification-accordion__content .method-steps {
  @apply list-decimal ml-5 text-sm leading-loose;
  color: var(--color-text);
}

/* Unverified Address Warning */
.unverified-warning {
  @apply rounded-lg px-5 py-4 mb-6;
  background: rgba(245, 158, 11, 0.08);
  border: none;
  border-left: 4px solid rgba(245, 158, 11, 0.6);
}

.unverified-warning__title {
  @apply font-semibold text-base m-0 mb-2;
  color: var(--color-accent);
}

.unverified-warning__list {
  @apply list-none m-0 p-0 flex flex-col gap-1;
}

.unverified-warning__item {
  @apply text-sm;
  color: var(--color-text-muted);
}

.unverified-warning__link {
  @apply underline;
  color: var(--color-accent);
}

.unverified-warning__link:hover {
  opacity: 0.8;
}

/* Status Check Paused Alert */
.status-paused-alert {
  @apply flex items-start gap-3 rounded-lg px-5 py-4 mb-6;
  background: rgba(148, 163, 184, 0.1);
  border-left: 4px solid rgba(148, 163, 184, 0.6);
}

.status-paused-alert__icon {
  @apply text-xl leading-none;
}

.status-paused-alert__content {
  @apply flex-1;
}

.status-paused-alert__title {
  @apply font-semibold text-base m-0 mb-1;
  color: var(--color-text);
}

.status-paused-alert__text {
  @apply text-sm leading-relaxed m-0 mb-3;
  color: var(--color-text-muted);
}

.status-paused-alert__action {
  @apply inline-block;
}

.status-paused-alert__note {
  @apply text-xs m-0 mt-2;
  color: var(--color-text-muted);
}

/* Community Post Blocked Label */
.feed-card--blocked {
  @apply opacity-50;
}

.community-post-blocked-label {
  @apply text-xs text-red-400 bg-red-950/50 border border-red-800/50 rounded px-2 py-1 mt-2;
}

/* ===========================================
   Admin Layout
   =========================================== */

.admin-layout {
  @apply bg-slate-50 text-slate-800 min-h-screen;
}

.admin-header {
  @apply bg-slate-800 text-white shadow;
}

.admin-header__inner {
  @apply max-w-7xl mx-auto px-6 py-3 flex items-center justify-between;
}

.admin-header__title {
  @apply text-lg font-bold m-0;
}

.admin-header__title-link {
  @apply text-white no-underline hover:text-slate-300;
}

.admin-header__nav {
  @apply flex items-center gap-4;
}

.admin-header__nav-link {
  @apply text-slate-300 no-underline text-sm hover:text-white;
}

.admin-main {
  @apply max-w-7xl mx-auto px-6 py-8;
}

.admin-flash {
  @apply px-4 py-3 rounded-lg mb-6 text-sm;
}

.admin-flash--notice {
  @apply bg-emerald-100 text-emerald-800 border border-emerald-300;
}

.admin-flash--alert {
  @apply bg-red-100 text-red-800 border border-red-300;
}

/* ===========================================
   Admin Common Components
   =========================================== */

/* Admin Page */
.admin-page {
  @apply max-w-4xl;
}

.admin-page--wide {
  @apply max-w-none;
}

.admin-page__header {
  @apply flex items-center justify-between mb-6;
}

.admin-page__title {
  @apply text-2xl font-bold text-slate-800 m-0;
}

/* Admin Table */
.admin-table {
  @apply w-full bg-white border border-slate-200 rounded-lg overflow-hidden text-sm;
}

.admin-table__th {
  @apply bg-slate-100 text-left px-4 py-3 font-semibold text-slate-600 border-b border-slate-200;
}

.admin-table__th--actions {
  @apply w-40 text-right;
}

.admin-table__row {
  @apply border-b border-slate-100 last:border-b-0 hover:bg-slate-50;
}

.admin-table__td {
  @apply px-4 py-3 text-slate-700;
}

.admin-table__td--actions {
  @apply text-right space-x-2;
}

/* Admin Buttons */
.admin-btn {
  @apply inline-block px-4 py-2 rounded-lg text-sm font-medium no-underline cursor-pointer transition-colors;
}

.admin-btn--primary {
  @apply bg-emerald-600 text-white hover:bg-emerald-700;
}

.admin-btn--secondary {
  @apply bg-slate-200 text-slate-700 hover:bg-slate-300;
}

.admin-btn--danger {
  @apply bg-red-600 text-white hover:bg-red-700;
}

.admin-btn--small {
  @apply px-3 py-1 text-xs;
}

/* Admin Form */
.admin-form {
  @apply bg-white border border-slate-200 rounded-lg p-6;
}

.admin-form__errors {
  @apply bg-red-50 border border-red-300 rounded-lg p-4 mb-6;
}

.admin-form__errors-title {
  @apply text-red-800 font-semibold text-sm mb-2;
}

.admin-form__errors-list {
  @apply list-disc pl-5 text-red-700 text-sm space-y-1;
}

.admin-form__field {
  @apply mb-4;
}

.admin-form__label {
  @apply block text-sm font-medium text-slate-700 mb-1;
}

.admin-form__input {
  @apply w-full px-3 py-2 border border-slate-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500;
}

.admin-form__actions {
  @apply flex items-center gap-3 mt-6;
}

/* Admin Empty State */
.admin-empty {
  @apply text-slate-500 text-center py-12 bg-white border border-slate-200 rounded-lg;
}

/* Admin Status Badge */
.admin-status {
  @apply inline-block px-2 py-0.5 rounded-full text-xs font-medium;
}

.admin-status--published {
  @apply bg-emerald-100 text-emerald-700;
}

.admin-status--draft {
  @apply bg-slate-100 text-slate-600;
}

/* Admin Top Columns Section */
.admin-top-columns {
  @apply mt-8 bg-white border border-slate-200 rounded-lg p-6;
}

.admin-top-columns__title {
  @apply text-lg font-bold text-slate-800 mb-1;
}

.admin-top-columns__description {
  @apply text-sm text-slate-500 mb-4;
}

/* Admin Form Extensions */
.admin-form__textarea {
  @apply resize-y;
}

.admin-form__file-input {
  @apply text-sm text-slate-600 file:mr-3 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-medium file:bg-slate-100 file:text-slate-700 hover:file:bg-slate-200;
}

.admin-form__image-preview {
  @apply mb-3;
}

.admin-form__image-preview-img {
  @apply w-48 h-auto rounded-lg border border-slate-200;
}

.admin-form__richtext {
  @apply w-full;
}

.admin-form__checkboxes {
  @apply flex flex-wrap gap-3;
}

.admin-form__checkbox-label {
  @apply flex items-center gap-1.5 text-sm text-slate-700 cursor-pointer;
}

/* ===========================================
   Admin Dashboard / User & Server Management
   =========================================== */

.admin-header__user {
  @apply text-xs text-slate-400 pl-3 border-l border-slate-600;
}

.admin-page__count {
  @apply text-sm text-slate-500;
}

.admin-page__actions {
  @apply flex items-center gap-2;
}

.admin-section__title {
  @apply text-base font-bold text-slate-600 mb-3 mt-8 first:mt-0;
}

/* 数値サマリー */
.admin-stats {
  @apply grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 mb-6;
}

.admin-stat {
  @apply flex flex-col gap-1 bg-white border border-slate-200 rounded-lg px-4 py-3 no-underline transition-colors;
}

a.admin-stat {
  @apply hover:border-emerald-400 hover:bg-emerald-50;
}

.admin-stat__label {
  @apply text-xs text-slate-500;
}

.admin-stat__value {
  @apply text-2xl font-bold text-slate-800 leading-tight;
}

.admin-stat__value--online {
  @apply text-emerald-600;
}

.admin-stat__value--warning {
  @apply text-amber-600;
}

/* カード */
.admin-card {
  @apply bg-white border border-slate-200 rounded-lg p-6 mb-6;
}

.admin-card__title {
  @apply text-lg font-bold text-slate-800 mb-1;
}

.admin-card__description {
  @apply text-sm text-slate-500 mb-4;
}

.admin-columns-2 {
  @apply grid grid-cols-1 lg:grid-cols-2 gap-6;
}

/* 簡易リスト */
.admin-list {
  @apply list-none p-0 m-0 mt-3;
}

.admin-list__item {
  @apply flex items-center justify-between gap-3 py-2 border-b border-slate-100 last:border-b-0 text-sm;
}

.admin-list__main {
  @apply flex items-center gap-2 min-w-0;
}

.admin-list__link {
  @apply text-slate-700 truncate hover:text-emerald-600;
}

.admin-list__owner {
  @apply text-xs text-slate-400 truncate;
}

.admin-list__meta {
  @apply text-xs text-slate-400 whitespace-nowrap;
}

/* 定義リスト */
.admin-detail {
  @apply m-0 mt-3;
}

.admin-detail__row {
  @apply flex flex-col sm:flex-row sm:items-baseline gap-1 sm:gap-4 py-2 border-b border-slate-100 last:border-b-0;
}

.admin-detail__label {
  @apply text-xs text-slate-500 sm:w-40 shrink-0;
}

.admin-detail__value {
  @apply text-sm text-slate-700 m-0 min-w-0;
}

/* 検索・絞り込み */
.admin-filters {
  @apply flex flex-wrap items-center gap-2 mb-4;
}

.admin-filters__search {
  @apply flex-1 min-w-56 px-3 py-2 border border-slate-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500;
}

.admin-filters__select {
  @apply px-3 py-2 border border-slate-300 rounded-lg text-sm bg-white focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500;
}

.admin-filters__clear {
  @apply text-sm text-slate-500 underline hover:text-slate-700;
}

/* テーブル拡張 */
.admin-table__th--num {
  @apply text-right;
}

.admin-table__td--num {
  @apply text-right tabular-nums;
}

.admin-pagination {
  @apply mt-6 flex justify-center;
}

/* ページ送り（Kaminari の出力：nav.pagination の中に span.first / .prev / .page / .gap / .next / .last）。
   リンクは角丸のボタン、今のページは塗りつぶし、省略（…）は文字だけ */
.pagination {
  @apply flex flex-wrap items-center justify-center gap-1.5 mt-6 mb-2 px-4;
}

.pagination > span > a,
.pagination > .page.current,
.pagination > .gap {
  @apply inline-flex items-center justify-center min-w-9 h-9 px-3 rounded-lg text-sm font-medium no-underline tabular-nums transition-colors;
}

.pagination > span > a {
  color: var(--color-text);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
}

.pagination > span > a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination > .page.current {
  @apply font-bold;
  background: var(--color-primary);
  color: #fff;
}

.pagination > .gap {
  @apply px-1;
  color: var(--color-text-muted);
}

/* スマホでは「最初」「最後」を出さず、1行に収まりやすくする */
@media (max-width: 480px) {
  .pagination > .first,
  .pagination > .last {
    display: none;
  }
}

/* ステータスバッジ拡張 */
.admin-status--online {
  @apply bg-emerald-100 text-emerald-700;
}

.admin-status--offline {
  @apply bg-slate-100 text-slate-500;
}

.admin-status--warning {
  @apply bg-amber-100 text-amber-700;
}

.admin-status--admin {
  @apply bg-indigo-100 text-indigo-700;
}

/* テキスト補助 */
.admin-text--muted {
  @apply text-slate-400;
}

.admin-text--small {
  @apply text-xs;
}

.admin-text--break {
  @apply break-all;
}

/* 横に長い表はスクロールさせる */
.admin-table-scroll {
  @apply overflow-x-auto mb-6;
}

.admin-table-scroll .admin-table {
  @apply whitespace-nowrap;
}

/* ランキング */
.admin-ranking-notes {
  @apply mt-3 list-disc pl-5 text-sm text-slate-500 space-y-1;
}

.admin-ranking__total {
  @apply font-bold text-slate-800;
}

/* 日別の棒グラフ（1系列なので凡例なし。値はホバーで表示） */
.admin-bar-chart {
  @apply relative mt-4;
}

.admin-bar-chart__max {
  @apply absolute -top-1 left-0 text-xs text-slate-400;
}

.admin-bar-chart__plot {
  @apply flex items-end h-48 pt-5 border-b border-slate-300;
  gap: 2px;
  background-image: linear-gradient(to bottom, rgb(226 232 240) 1px, transparent 1px);
  background-position: 0 1.25rem;
  background-size: 100% calc((100% - 1.25rem) / 2);
}

.admin-bar-chart__col {
  @apply relative flex flex-1 h-full items-end cursor-default;
}

.admin-bar-chart__bar {
  @apply w-full bg-emerald-500 transition-colors;
  border-radius: 4px 4px 0 0;
  min-height: 1px;
}

.admin-bar-chart__col:hover .admin-bar-chart__bar {
  @apply bg-emerald-700;
}

.admin-bar-chart__col:hover::after {
  @apply absolute bottom-full left-1/2 z-10 mb-1 -translate-x-1/2 whitespace-nowrap rounded bg-slate-800 px-2 py-1 text-xs text-white;
  content: attr(data-label);
}

.admin-bar-chart__axis {
  @apply mt-1 flex justify-between text-xs text-slate-400;
}

/* ===========================================
   Column Public Pages
   =========================================== */

/* Column List */
.column-list {
  @apply py-12 min-h-screen;
}

.column-list__container {
  @apply max-w-[1200px] mx-auto px-4;
}

.column-list__header {
  @apply mb-10 text-center;
}

.column-list__title {
  @apply text-2xl font-bold mb-2;
  color: var(--color-text);
}

.column-list__subtitle {
  @apply text-sm;
  color: var(--color-text-muted);
}

.column-list__body {
  @apply mt-8;
}

.column-list__grid {
  @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6;
}

.column-list__pagination {
  @apply mt-10 flex justify-center;
}

.column-list__footer {
  @apply mt-10 text-center;
}

.column-list__categories-link {
  @apply inline-flex items-center gap-2 text-sm font-medium no-underline transition-colors;
  color: var(--color-primary);
}

/* Column Top (Featured) Section */
.column-top {
  @apply mb-10;
}

.column-top__heading {
  @apply text-lg font-bold mb-4;
  color: var(--color-text);
}

.column-top__grid {
  @apply grid grid-cols-1 md:grid-cols-3 gap-6;
}

/* Column Card */
/* タイトルの行数が違ってもメタ情報の位置が揃うよう、縦フレックスで組む */
.column-card {
  @apply flex flex-col h-full rounded-xl overflow-hidden no-underline text-inherit transition-all hover:shadow-lg;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.column-card--featured {
  @apply ring-1 ring-emerald-700/30;
}

.column-card__image {
  @apply w-full h-44 overflow-hidden;
  background: var(--color-bg-card);
}

.column-card__image-img {
  @apply w-full h-full object-cover;
}

.column-card__image-placeholder {
  @apply w-full h-full flex items-center justify-center text-4xl;
  color: var(--color-text-muted);
}

.column-card__body {
  @apply p-4 flex flex-col flex-1;
}

.column-card__title {
  @apply text-base font-bold mb-2 line-clamp-2;
  color: var(--color-text);
}

.column-card__description {
  @apply text-sm mb-3 line-clamp-3;
  color: var(--color-text-muted);
}

/* 常にカード下端へ寄せることで、カード間でメタ情報の高さを一致させる */
.column-card__meta {
  @apply flex items-center gap-3 text-xs mt-auto;
  color: var(--color-text-muted);
}

.column-card__date {
  @apply shrink-0;
}

.column-card__categories {
  @apply flex flex-wrap gap-1.5;
}

.column-card__category-tag {
  @apply inline-block px-2 py-0.5 rounded text-xs;
  background: var(--color-bg-card);
  color: var(--color-text-muted);
}

/* Column Detail (Public Show Page) */
.column-detail {
  @apply py-12 min-h-screen;
}

.column-detail__container {
  @apply max-w-3xl mx-auto px-4;
}

.column-detail__header {
  @apply mb-8;
}

.column-detail__title {
  @apply text-2xl font-bold mb-4 leading-tight;
  color: var(--color-text);
}

.column-detail__meta {
  @apply flex flex-wrap items-center gap-4 text-sm;
}

.column-detail__date {
  color: var(--color-text-muted);
}

.column-detail__categories {
  @apply flex flex-wrap gap-2;
}

.column-detail__category-tag {
  @apply inline-block px-2.5 py-0.5 rounded text-xs;
  background: var(--color-bg-card);
  color: var(--color-text-muted);
}

.column-detail__eyecatch {
  @apply mb-8;
}

.column-detail__eyecatch-img {
  @apply w-full h-auto rounded-xl;
}

.column-detail__content {
  @apply leading-relaxed mb-10;
  color: var(--color-text-muted);
}

.column-detail__content .trix-content {
  @apply leading-relaxed;
  color: var(--color-text-muted);
}

.column-detail__content .trix-content h1 {
  @apply text-2xl font-bold mt-8 mb-4;
  color: var(--color-text);
}

.column-detail__content .trix-content h2 {
  @apply text-xl font-bold mt-6 mb-3;
  color: var(--color-text);
}

.column-detail__content .trix-content h3 {
  @apply text-lg font-semibold mt-5 mb-2;
  color: var(--color-text);
}

.column-detail__content .trix-content p {
  @apply mb-4;
}

.column-detail__content .trix-content a {
  @apply underline;
  color: var(--color-primary);
}

.column-detail__content .trix-content ul {
  @apply list-disc pl-6 mb-4 space-y-1;
}

.column-detail__content .trix-content ol {
  @apply list-decimal pl-6 mb-4 space-y-1;
}

.column-detail__content .trix-content blockquote {
  @apply pl-4 italic my-4;
  border-left: 4px solid var(--color-border);
  color: var(--color-text-muted);
}

.column-detail__content .trix-content pre {
  @apply rounded-lg p-4 overflow-x-auto text-sm my-4;
  background: var(--color-bg-card);
  color: var(--color-text);
}

.column-detail__content .trix-content code {
  @apply px-1.5 py-0.5 rounded text-sm;
  background: var(--color-bg-card);
  color: var(--color-primary);
}

.column-detail__content .trix-content img {
  @apply rounded-lg max-w-full h-auto my-4;
}

.column-detail__content .trix-content strong {
  @apply font-semibold;
  color: var(--color-text);
}

.column-detail__back {
  @apply pt-8;
}

.column-detail__back-link {
  @apply inline-flex items-center gap-1 text-sm font-medium no-underline transition-colors;
  color: var(--color-primary);
}

/* ===========================================
   Category Public Pages
   =========================================== */

/* Category List (Index) */
.category-list {
  @apply py-12 min-h-screen;
}

.category-list__container {
  @apply max-w-[1200px] mx-auto px-4;
}

.category-list__header {
  @apply mb-10 text-center;
}

.category-list__title {
  @apply text-2xl font-bold mb-2;
  color: var(--color-text);
}

.category-list__subtitle {
  @apply text-sm;
  color: var(--color-text-muted);
}

.category-list__grid {
  @apply grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4;
}

.category-list__item {
  @apply flex items-center justify-between rounded-lg px-5 py-4 no-underline text-inherit transition-all;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.category-list__item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.category-list__item-name {
  @apply font-medium;
  color: var(--color-text);
}

.category-list__item-count {
  @apply text-sm;
  color: var(--color-text-muted);
}

.category-list__footer {
  @apply mt-10 text-center;
}

.category-list__back-link {
  @apply inline-flex items-center gap-1 text-sm font-medium no-underline transition-colors;
  color: var(--color-primary);
}

/* Category Detail (Show) */
.category-detail {
  @apply py-12 min-h-screen;
}

.category-detail__container {
  @apply max-w-[1200px] mx-auto px-4;
}

.category-detail__header {
  @apply mb-10 text-center;
}

.category-detail__title {
  @apply text-2xl font-bold mb-2;
  color: var(--color-text);
}

.category-detail__subtitle {
  @apply text-sm;
  color: var(--color-text-muted);
}

.category-detail__footer {
  @apply mt-10 text-center;
}

.category-detail__back-link {
  @apply inline-flex items-center gap-1 text-sm font-medium no-underline transition-colors;
  color: var(--color-primary);
}

/* ===========================================
   Server Tabs (server detail main column)
   =========================================== */

.server-tabs__nav {
  @apply px-1.5 py-1.5 grid grid-cols-3;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 10px;
}

.server-tabs__tab {
  @apply leading-none px-2 py-3 justify-center text-sm font-medium cursor-pointer bg-transparent transition-colors no-underline inline-flex items-center;
  color: var(--color-text-muted);
  border: 0;
  border-radius: 6px;
}

.server-tabs__tab:hover {
  color: var(--color-text);
  text-decoration: none;
}

.server-tabs__tab--active {
  background: var(--color-bg-light);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.server-tabs__badge {
  @apply hidden md:inline-flex items-center justify-center ml-1.5 px-1.5 min-w-[18px] h-[18px] text-xs font-semibold rounded-full leading-none;
  background: var(--color-primary);
  color: #ffffff;
}

.server-tabs__panel {
  @apply flex flex-col gap-4;
}

[data-theme="light"] .server-tabs__nav {
  background: rgba(148, 163, 184, 0.15);
}

[data-theme="light"] .server-tabs__tab--active {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   Server Stats Chart (server detail page)
   =========================================== */

.server-stats-chart {
  @apply flex flex-col gap-5;
}

.server-stats-chart__item {
  @apply flex flex-col gap-2;
}

.server-stats-chart__label {
  @apply flex flex-wrap items-center justify-between gap-x-3 gap-y-1 text-xs font-semibold;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.server-stats-chart__legend {
  @apply flex flex-wrap items-center gap-x-3 gap-y-1 text-xs font-normal ml-auto;
  color: var(--color-text-muted);
}

.server-stats-chart__legend-chip {
  @apply inline-block align-middle w-2.5 h-2.5 rounded-sm mr-1;
}

.server-stats-chart__legend-chip--online {
  background: var(--color-primary);
}

.server-stats-chart__legend-chip--offline {
  background: rgb(239 68 68);
}

.server-stats-chart__legend-chip--unknown {
  background: rgba(148, 163, 184, 0.45);
}

.stats-card {
  @apply flex flex-col gap-4;
}

.stats-card__header {
  @apply flex items-baseline flex-wrap gap-x-3 gap-y-1;
}

.stats-card__title {
  @apply text-sm font-semibold;
  color: var(--color-text);
  margin: 0;
}

.stats-card__range {
  @apply text-xs;
  color: var(--color-text-muted);
}

.server-stats-chart__canvas {
  @apply w-full rounded-md overflow-hidden;
  background: rgba(148, 163, 184, 0.06);
  min-height: 210px;
}

.server-stats-chart__canvas--uptime {
  min-height: 76px;
  background: transparent;
}

.server-stats-chart__empty {
  @apply py-6 text-center text-xs;
  color: var(--color-text-muted);
}

.server-stats-chart__svg {
  @apply block;
}

.server-stats-chart__grid {
  stroke: rgba(148, 163, 184, 0.25);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.server-stats-chart__axis {
  font-size: 10px;
  fill: var(--color-text-muted);
}

.server-stats-chart__line {
  stroke: var(--color-primary);
  stroke-width: 2.25;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.server-stats-chart__area {
  stroke: none;
}

.server-stats-chart__grad-top {
  stop-color: var(--color-primary);
  stop-opacity: 0.55;
}

.server-stats-chart__grad-bottom {
  stop-color: var(--color-primary);
  stop-opacity: 0;
}

.server-stats-chart__point {
  fill: var(--color-primary);
}

.server-stats-chart__day-sep {
  stroke: var(--color-border);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.45;
}

.server-stats-chart__baseline {
  stroke: var(--color-border);
  stroke-width: 1;
  opacity: 0.5;
}

.server-stats-chart__peak-halo {
  fill: var(--color-primary);
  opacity: 0.22;
}

.server-stats-chart__peak-dot {
  fill: var(--color-primary);
  stroke: var(--color-bg-card);
  stroke-width: 2;
}

.server-stats-chart__peak-label {
  font-size: 11px;
  font-weight: 700;
  fill: var(--color-text);
}

.server-stats-chart__latest-dot {
  fill: var(--color-primary);
  stroke: var(--color-bg-card);
  stroke-width: 2;
}

.server-stats-chart__bar {
  shape-rendering: crispEdges;
}

.server-stats-chart__bar--online {
  fill: var(--color-primary);
}

.server-stats-chart__bar--partial {
  fill: rgb(234 179 8);
}

.server-stats-chart__bar--offline {
  fill: rgb(239 68 68);
}

.server-stats-chart__bar--unknown {
  fill: rgba(148, 163, 184, 0.35);
}

.server-stats-chart__track {
  fill: color-mix(in srgb, var(--color-text-muted) 14%, transparent);
}

.server-stats-chart__day-sep-overlay {
  stroke: var(--color-bg-card);
  stroke-opacity: 0.7;
  stroke-width: 1;
  stroke-dasharray: 2 3;
  pointer-events: none;
}

.server-stats-chart__marker-line {
  stroke: var(--color-primary);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.6;
}

.server-stats-chart__marker-dot {
  fill: var(--color-primary);
  stroke: var(--color-bg-card);
  stroke-width: 2;
}

.server-stats-chart__hover-overlay {
  cursor: crosshair;
}

.server-stats-chart__tooltip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-line;
  background: var(--color-bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  display: none;
}

[data-theme="light"] .server-stats-chart__canvas {
  background: rgba(148, 163, 184, 0.1);
}

[data-theme="light"] .server-stats-chart__canvas--uptime {
  background: transparent;
}

.server-stats-chart__vote-bar {
  fill: var(--color-primary);
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.server-stats-chart__vote-bar:hover {
  opacity: 1;
}

/* ===========================================
   Minecraft Account Link
   =========================================== */

/* 連携済みエディションの選択肢 */
.form-radio--disabled {
  @apply opacity-60 cursor-not-allowed;
}

.form-radio__note {
  @apply text-xs ml-auto;
  color: var(--color-primary);
}

/* アカウント設定の連携一覧（Java版・統合版） */
.minecraft-link-list {
  @apply flex flex-col gap-2;
}

/* 連携アカウントの名前と、Java版・統合版の見分け用タグ */
.minecraft-username-row {
  @apply flex flex-wrap items-center gap-2;
}

/* Java版の連携の再取得ボタン（カードの右端に寄せる） */
.minecraft-refresh-form {
  margin-left: auto;
}

/* 投票アカウント選択など、狭い場所に置く連携アカウントのアイコン */
.minecraft-avatar--sm {
  width: 36px;
  height: 36px;
}

.minecraft-avatar--sm .minecraft-avatar-placeholder {
  @apply text-lg;
}

/* 統合版の連携に添える、ゲーマータグ変更時の案内 */
.minecraft-link-hint {
  @apply text-xs;
  color: var(--color-text-muted);
}

/* ===========================================
   Landing Page（トップページ・運営者向けページ）
   =========================================== */

/* Hero */
.lp-hero {
  @apply text-center;
  padding: 72px 0 56px;
  background:
    radial-gradient(ellipse at top, color-mix(in srgb, var(--color-primary) 14%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-bg) 100%);
}

/* 見出しの上の小見出し。両側に細い線を引いて、ラベルっぽさを抑える */
.lp-hero__eyebrow {
  @apply inline-flex items-center gap-3 text-sm font-semibold mb-5 tracking-wider;
  color: var(--color-primary);
}

.lp-hero__eyebrow::before,
.lp-hero__eyebrow::after {
  @apply block w-8 h-px;
  content: "";
  background: currentColor;
  opacity: 0.5;
}

/* Java版 + 統合版（トップのヒーロー）
   2枚のタイルを少しずつ逆に傾け、下辺を濃くしてマイクラのブロックのような厚みを出す */
.lp-editions {
  @apply inline-flex items-center gap-3 mb-7;
}

.lp-editions__item {
  --edition-color: #ef4444;
  --edition-text: #fca5a5;
  @apply inline-flex items-center gap-2.5 rounded-lg pl-3 pr-4 py-2 text-left;
  color: var(--edition-text);
  background: color-mix(in srgb, var(--edition-color) 14%, var(--color-bg-light));
  border: 1px solid color-mix(in srgb, var(--edition-color) 40%, transparent);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--edition-color) 45%, transparent);
  transform: rotate(-3deg);
}

.lp-editions__item--bedrock {
  --edition-color: #3b82f6;
  --edition-text: #93c5fd;
  transform: rotate(3deg);
}

[data-theme="light"] .lp-editions__item--java {
  --edition-text: #dc2626;
}

[data-theme="light"] .lp-editions__item--bedrock {
  --edition-text: #2563eb;
}

.lp-editions__icon {
  font-size: var(--icon-lg);
}

.lp-editions__text {
  @apply flex flex-col leading-tight;
}

.lp-editions__text strong {
  @apply text-base font-extrabold;
}

.lp-editions__text small {
  @apply text-xs font-medium opacity-80;
}

.lp-editions__plus {
  @apply text-xl font-extrabold;
  color: var(--color-text-muted);
}

.lp-hero__title {
  @apply font-extrabold;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.3;
  color: var(--color-text);
}

.lp-hero__lead {
  @apply max-w-xl mx-auto mt-4 text-base leading-relaxed;
  color: var(--color-text-muted);
}

.lp-hero__live {
  @apply inline-flex flex-wrap items-center justify-center gap-x-1.5 mt-5 text-sm;
  color: var(--color-text-muted);
}

.lp-hero__live strong {
  @apply text-base font-bold;
  color: var(--color-text);
}

.lp-hero__live-dot {
  @apply w-2 h-2 rounded-full bg-emerald-500 animate-pulse;
}

.lp-hero__actions {
  @apply flex flex-wrap justify-center gap-3 mt-7;
}

.lp-hero__chips {
  @apply flex flex-wrap justify-center gap-2 mt-5 max-w-2xl mx-auto;
}

/* 広い画面でだけ改行する（狭い画面では自然に折り返す） */
@media (max-width: 640px) {
  .lp-br-wide {
    display: none;
  }
}

/* Chip（絞り込みの入口） */
.lp-chip {
  @apply inline-flex items-center gap-1.5 rounded-full px-3.5 py-1.5 text-sm font-medium no-underline transition-colors;
  color: var(--color-text);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
}

a.lp-chip:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.lp-chip__count {
  @apply text-xs rounded-full px-1.5;
  color: var(--color-text-muted);
  background: var(--color-bg-card);
}

/* Section */
.lp-section {
  padding: 56px 0;
}

.lp-section--tinted {
  /* フェードの行き先にも同じ色を使うので変数にする */
  --lp-section-bg: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
  background: var(--lp-section-bg);
}

/* トップの投稿：高さに上限を付けて、下を背景色へフェードさせ、その上に「投稿をもっと見る」を重ねる */
.lp-post-feed {
  @apply relative overflow-hidden;
  max-height: 760px;
}

@media (min-width: 768px) {
  .lp-post-feed {
    max-height: 620px;
  }
}

.lp-post-feed__fade {
  @apply absolute inset-x-0 bottom-0 flex items-end justify-center pb-6;
  height: 260px;
  background: linear-gradient(to bottom, transparent, var(--lp-section-bg, var(--color-bg)) 75%);
  /* フェードの上でもカードを押せるようにし、ボタンだけ受け付ける */
  pointer-events: none;
}

.lp-post-feed__more {
  pointer-events: auto;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
}

.lp-section__header {
  @apply text-center mb-8;
}

.lp-section__title {
  @apply text-2xl font-bold;
  color: var(--color-text);
}

.lp-section__lead {
  @apply mt-2 text-sm;
  color: var(--color-text-muted);
}

/* サーバー編集：アイコンの置き換え画像（左にいまの画像、右に選択欄） */
.fallback-icon-field {
  @apply flex items-center gap-4 mt-1;
}

.fallback-icon-field__preview {
  @apply flex items-center justify-center shrink-0 w-16 h-16 rounded-lg overflow-hidden text-3xl;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
}

.fallback-icon-field__preview img {
  @apply w-full h-full object-cover;
}

.fallback-icon-field__inputs {
  @apply flex flex-col gap-2 min-w-0 text-sm;
}

.fallback-icon-field__remove {
  @apply inline-flex items-center gap-1.5 cursor-pointer;
  color: var(--color-text-muted);
}

/* トップページの投稿カード（最新9件）。高さの違うカードをパズルのように隙間なく詰める（メイソンリー）。
   カードの高さは中身に合わせ、列ごとに上から詰めていく。スマホでは1列にして、縦に長くなりすぎないよう最初の4件だけ出す */
.lp-post-cards {
  @apply columns-1 md:columns-2 lg:columns-3 gap-4;
}

@media (max-width: 767px) {
  .lp-post-cards > .lp-post-card:nth-child(n + 5) {
    display: none;
  }
}

.lp-post-card {
  @apply flex flex-col gap-3 p-5 mb-4 rounded-xl no-underline transition-shadow break-inside-avoid;
  color: var(--color-text);
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.lp-post-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.lp-post-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* 主役のサーバー：アイコン＋名前 */
.lp-post-card__server {
  @apply flex items-center gap-2.5 min-w-0 pb-3;
  border-bottom: 1px solid var(--color-border);
}

.lp-post-card__server-icon {
  @apply flex items-center justify-center shrink-0 w-8 h-8 rounded-[4px] overflow-hidden text-base;
  background: var(--color-bg-card);
}

.lp-post-card__server-icon img {
  @apply w-full h-full object-cover;
}

.lp-post-card__server-name {
  @apply text-[15px] font-bold truncate;
}

.lp-post-card__author {
  @apply flex items-center gap-2 min-w-0 text-[13px];
  color: var(--color-text-muted);
}

.lp-post-card__avatar {
  @apply flex items-center justify-center shrink-0 w-6 h-6 rounded-full overflow-hidden text-sm;
  background: var(--color-bg-card);
}

.lp-post-card__avatar img {
  @apply w-full h-full object-cover;
}

.lp-post-card__author-name {
  @apply font-semibold truncate;
  color: var(--color-text);
}

.lp-post-card__text {
  @apply m-0 text-[15px] leading-relaxed whitespace-pre-wrap break-words line-clamp-4;
}

/* 画像は1枚目だけを16:9で見せ、残りは枚数で出す */
.lp-post-card__media {
  @apply relative overflow-hidden rounded-lg aspect-video;
  background: var(--color-bg-card);
}

.lp-post-card__media img {
  @apply w-full h-full object-cover;
}

.lp-post-card__more-images {
  @apply absolute right-2 bottom-2 px-2 py-0.5 rounded-full text-xs font-bold text-white;
  background: rgba(15, 23, 42, 0.7);
}

.lp-post-card__footer {
  @apply flex items-center justify-between text-xs;
  color: var(--color-text-muted);
}

.lp-post-card__likes {
  @apply inline-flex items-center gap-1 font-medium tabular-nums;
}

.lp-post-card__likes-icon {
  @apply w-4 h-4;
}

.lp-subheading {
  @apply text-lg font-bold mb-4;
  color: var(--color-text);
}

.lp-subheading:not(:first-of-type) {
  @apply mt-10;
}

/* Features（選ばれる理由・できること） */
.lp-features {
  @apply grid gap-5 md:grid-cols-3;
}

.lp-features--2col {
  @apply md:grid-cols-2 max-w-4xl mx-auto;
}

.lp-feature {
  @apply rounded-xl p-6;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.lp-feature__icon {
  @apply mb-3;
  font-size: var(--icon-2xl);
}

.lp-feature__title {
  @apply text-base font-bold mb-2;
  color: var(--color-text);
}

.lp-feature__text {
  @apply text-sm leading-relaxed;
  color: var(--color-text-muted);
}

/* Tag groups（遊び方から探す） */
.lp-tag-groups {
  @apply grid gap-6 md:grid-cols-2 max-w-4xl mx-auto;
}

.lp-tag-group__label {
  @apply text-xs font-semibold mb-2;
  color: var(--color-text-muted);
}

.lp-tag-group__tags {
  @apply flex flex-wrap gap-2;
}

/* Benefits（アカウントを作るメリット） */
/* 左に見出しとボタン、右にメリットのカード。狭い画面では縦に積む */
.lp-benefits {
  @apply grid gap-8 rounded-2xl p-6 md:p-10 items-center md:grid-cols-[minmax(0,5fr)_minmax(0,6fr)];
  background:
    radial-gradient(ellipse at top left, color-mix(in srgb, var(--color-primary) 16%, transparent) 0%, transparent 55%),
    var(--color-bg-light);
  border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
  box-shadow: var(--shadow-card);
}

.lp-benefits__eyebrow {
  @apply inline-block rounded-full px-3 py-0.5 text-xs font-semibold mb-3;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.lp-benefits__title {
  @apply text-2xl font-bold leading-snug;
  color: var(--color-text);
}

.lp-benefits__lead {
  @apply mt-3 text-sm leading-relaxed;
  color: var(--color-text-muted);
}

.lp-benefits__action {
  @apply mt-6 flex flex-col items-start gap-2;
}

.lp-benefits__note {
  @apply text-xs;
  color: var(--color-text-muted);
}

.lp-benefits__note a {
  color: var(--color-primary);
}

.lp-benefits__items {
  @apply grid gap-3 list-none p-0 m-0;
}

.lp-benefit {
  @apply flex items-start gap-4 rounded-xl p-4;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.lp-benefit__icon {
  @apply flex items-center justify-center shrink-0 w-11 h-11 rounded-lg;
  font-size: var(--icon-md);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.lp-benefit__title {
  @apply flex flex-wrap items-center gap-x-2 gap-y-1 text-sm font-bold;
  color: var(--color-text);
}

.lp-benefit__badge {
  @apply rounded-full px-2 py-px text-[11px] font-semibold;
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.lp-benefit__text {
  @apply mt-1 text-xs leading-relaxed;
  color: var(--color-text-muted);
}

/* Owner band（運営者への呼びかけ） */
.lp-owner-band {
  @apply text-white;
  padding: 48px 0;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

.lp-owner-band__inner {
  @apply flex flex-col gap-6 md:flex-row md:items-center md:justify-between;
}

.lp-owner-band__eyebrow {
  @apply text-xs font-semibold mb-1 opacity-80;
}

.lp-owner-band__title {
  @apply text-2xl font-bold;
}

.lp-owner-band__text {
  @apply text-sm mt-2 opacity-90;
}

/* 緑の帯の上では白いボタンにして埋もれないようにする */
.lp-owner-band .btn-primary {
  @apply shrink-0;
  background: #ffffff;
  color: var(--color-primary-dark);
}

.lp-owner-band .btn-primary:hover {
  background: #f0fdf4;
}

/* 運営者向けページの最後の呼びかけ
   派手な色帯は広告に見えて読み飛ばされるため、ページと同じ調子のカードにまとめ、緑はボタンだけに使う */
.lp-final-cta {
  @apply max-w-xl mx-auto text-center rounded-2xl px-6 py-10 md:px-10;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.lp-final-cta__title {
  @apply text-2xl md:text-3xl font-bold;
  color: var(--color-text);
  word-break: auto-phrase;
  text-wrap: balance;
}

.lp-final-cta__actions {
  @apply flex flex-col items-center mt-6;
}

/* CTAボタン直下の補足（費用・手間の不安を消す一言） */
.lp-cta-note {
  @apply text-xs mt-3;
  color: var(--color-text-muted);
}

/* 主ボタンと競合しない、文字だけの副導線 */
.lp-cta-sublink {
  @apply text-sm mt-2;
}

.lp-cta-sublink a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Steps（掲載までの流れ） */
.lp-steps {
  @apply grid gap-4 max-w-3xl mx-auto list-none p-0;
}

.lp-step {
  @apply flex gap-4 rounded-xl p-5;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.lp-step__number {
  @apply w-9 h-9 rounded-full flex items-center justify-center font-bold text-white shrink-0;
  background: var(--color-primary);
}

.lp-step__title {
  @apply text-base font-bold mb-1;
  color: var(--color-text);
}

.lp-step__text {
  @apply text-sm leading-relaxed;
  color: var(--color-text-muted);
}

.lp-steps__note {
  @apply text-center text-xs mt-4;
  color: var(--color-text-muted);
}

/* セクションの末尾に置く行動ボタン（掲載までの流れの直後など） */
.lp-section__actions {
  @apply flex flex-col items-center mt-8;
}

.lp-faq {
  @apply max-w-3xl mx-auto;
}

/* 日本語の見出しを単語の途中で改行させない（文節ごとに折り返す） */
.lp-phrase {
  @apply inline-block;
}

/* 見出しと導入文は文節で折り返す（auto-phrase 非対応のブラウザでは通常の折り返し） */
.lp-hero__lead,
.lp-section__lead,
.lp-section__title,
.lp-owner-band__title {
  word-break: auto-phrase;
  text-wrap: balance;
}

.lp-owner-band .btn {
  @apply justify-center text-center;
}

/* フッターのリンクは語の途中で折り返さず、狭い画面では行ごと折り返す */
.footer-nav {
  @apply flex-wrap justify-center gap-x-5 gap-y-2;
}

.footer-nav a {
  @apply whitespace-nowrap;
}

/* ===========================================
   Server Search（サーバー一覧の検索パネル）
   =========================================== */

.server-search {
  @apply flex flex-col gap-4 rounded-xl p-4 md:p-5 mb-5;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.server-search__row {
  @apply flex flex-col gap-3 md:flex-row md:items-center;
}

/* キーワード */
.server-search__keyword {
  @apply relative flex flex-1 items-center;
}

.server-search__keyword-icon {
  @apply absolute left-3 text-sm pointer-events-none opacity-60;
}

.server-search__keyword-input {
  @apply w-full rounded-lg py-2.5 pl-9 pr-3 text-sm;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.server-search__keyword-input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
}

/* エディション（セグメント切り替え） */
.server-search__editions {
  @apply flex shrink-0 rounded-lg p-1 md:inline-flex;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

/* SPでは3つを均等幅で横幅いっぱいに並べる */
.server-search__edition {
  @apply relative flex-1 md:flex-none;
}

/* ラジオボタンは隠さず重ねる（キーボード操作とフォーカスリングを維持するため） */
.server-search__edition-input {
  @apply absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0;
}

.server-search__edition-label {
  @apply block whitespace-nowrap rounded-md px-3 py-1.5 text-center text-sm font-medium transition-colors;
  color: var(--color-text-muted);
}

.server-search__edition:has(.server-search__edition-input:checked) .server-search__edition-label {
  color: var(--color-text);
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.server-search__edition-input:focus-visible + .server-search__edition-label {
  outline: 2px solid var(--color-primary);
}

/* 並び順 */
.server-search__sort {
  @apply block w-full md:w-auto;
}

.server-search__sort-select {
  @apply w-full rounded-lg px-3 py-2.5 text-sm md:w-auto;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

/* タグ（開閉式） */
.server-search__tags {
  @apply pt-3;
  border-top: 1px solid var(--color-border);
}

.server-search__tags-summary {
  @apply flex cursor-pointer list-none items-center justify-between gap-3 text-sm font-semibold;
  color: var(--color-text);
}

.server-search__tags-summary::-webkit-details-marker {
  display: none;
}

.server-search__tags-summary::after {
  content: "▾";
  @apply ml-auto transition-transform;
  color: var(--color-text-muted);
}

.server-search__tags[open] .server-search__tags-summary::after {
  transform: rotate(180deg);
}

.server-search__tags-hint {
  @apply mt-2 mb-1 text-xs;
  color: var(--color-text-muted);
}

.server-search__tag-count {
  @apply ml-1 text-xs opacity-70;
}

/* 件数と条件クリア */
.server-search__summary {
  @apply flex items-center justify-between gap-3 mb-3;
}

.server-search__count {
  @apply text-sm;
  color: var(--color-text-muted);
}

.server-search__count strong {
  @apply text-base;
  color: var(--color-text);
}

.server-search__clear {
  @apply text-sm underline;
  color: var(--color-primary);
}

/* 端の棒のツールチップがはみ出さないよう、内側に寄せる */
.admin-bar-chart__col:nth-child(-n+4):hover::after {
  @apply left-0 translate-x-0;
}

.admin-bar-chart__col:nth-last-child(-n+4):hover::after {
  @apply left-auto right-0 translate-x-0;
}

/* 1fr のままだと長い名前に押されて列が広がり、サイドバーへはみ出すため、列を中身に関係なく縮める */
.community-posts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 768px) {
  .community-posts-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.feed-card {
  @apply min-w-0;
}

/* 投稿カードの名前が長いときは「…」で省略し、オーナーバッジに重ねない */
.feed-card .user-info {
  @apply min-w-0 flex-1;
}

.feed-card .user-name {
  @apply min-w-0 truncate;
}

.feed-card .owner-badge,
.feed-card .user-avatar {
  @apply shrink-0 whitespace-nowrap;
}

/* ===========================================
   Timeline（サーバーの投稿一覧をX風の1列タイムラインで表示）
   =========================================== */

.timeline {
  @apply flex flex-col rounded-xl overflow-hidden;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.timeline-item {
  @apply block p-[22px];
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-item--blocked {
  @apply opacity-50;
}

.timeline-item__body {
  @apply flex gap-3;
}

.timeline-item__avatar {
  @apply flex items-center justify-center shrink-0 w-10 h-10 rounded-full overflow-hidden text-xl;
  background: var(--color-bg-card);
}

.timeline-item__avatar img {
  @apply w-full h-full object-cover;
}

.timeline-item__main {
  @apply flex-1 min-w-0;
}

.timeline-item__header {
  @apply flex items-center gap-1.5 min-w-0 text-sm;
}

.timeline-item__name {
  @apply font-bold min-w-0 truncate;
}

.timeline-item__header .owner-badge {
  @apply shrink-0 whitespace-nowrap;
}

.timeline-item__time {
  @apply shrink-0 whitespace-nowrap;
  color: var(--color-text-muted);
}

/* 投稿時刻のリンク。ふだんは時刻の見た目のまま、マウスを乗せると下線を出す */
.timeline-item__permalink {
  @apply no-underline;
  color: inherit;
}

.timeline-item__permalink:hover {
  @apply underline;
  color: var(--color-text);
}

.timeline-item__text {
  @apply m-0 mt-0.5 text-[15px] leading-relaxed whitespace-pre-wrap break-words;
}

/* 画像はXと同じく、枚数に応じて1枚・横2枚・左1右2・2×2に並べる */
/* メイン列は広いので、画像だけXのタイムラインと同程度の幅に抑える */
.timeline-media {
  @apply grid gap-0.5 mt-3 rounded-2xl overflow-hidden aspect-[16/9] w-full max-w-[520px];
  border: 1px solid var(--color-border);
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.timeline-media--1 {
  @apply aspect-auto;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
}

.timeline-media--1 .timeline-media__cell img {
  @apply max-h-[420px];
}

.timeline-media--2 .timeline-media__cell {
  grid-row: span 2;
}

.timeline-media--3 .timeline-media__cell:first-child {
  grid-row: span 2;
}

.timeline-media__cell {
  @apply min-h-0 overflow-hidden;
  background: var(--color-bg-card);
}

.timeline-media__cell img {
  @apply block w-full h-full object-cover;
}

a.timeline-media__cell {
  @apply block;
}

/* 投稿ごとの操作（オーナー・投稿者にだけ表示） */
.timeline-item__actions {
  @apply flex flex-wrap items-center gap-1 mt-2 -ml-2;
}

.timeline-item__actions form {
  @apply m-0;
}

.timeline-action {
  @apply inline-flex items-center px-2 py-1 rounded-full text-xs bg-transparent border-0 cursor-pointer transition-colors;
  color: var(--color-text-muted);
}

.timeline-action:hover {
  background: rgba(148, 163, 184, 0.15);
  color: var(--color-text);
}

/* 通知などから開いた投稿（?post=ID、または #community_post_ID）を、少しのあいだ色付けしてどれか分かるようにする */
.timeline-item:target,
.timeline-item--focus {
  scroll-margin-top: 5rem;
  animation: timeline-item-target 2.4s ease-out;
}

@keyframes timeline-item-target {
  0%, 40% { background: rgba(16, 185, 129, 0.14); }
  100% { background: transparent; }
}

/* いいね（♡ と数）。押すとピンクの ♥ になる */
.timeline-like {
  @apply inline-flex;
}

/* 押しやすいよう高さ32pxを確保し、ハート18px・数13pxで釣り合わせる */
.timeline-action--like {
  @apply gap-1.5 min-h-8 px-2.5 text-[13px] no-underline;
}

.timeline-like__icon {
  @apply block w-[18px] h-[18px] shrink-0 transition-transform;
}

.timeline-action--like:active .timeline-like__icon {
  @apply scale-90;
}

.timeline-like__count {
  @apply font-medium tabular-nums;
}

.timeline-action--like:hover {
  background: rgba(236, 72, 153, 0.12);
  color: #db2777;
}

.timeline-action--liked {
  color: #db2777;
}

:root:not([data-theme="light"]) .timeline-action--liked,
:root:not([data-theme="light"]) .timeline-action--like:hover {
  color: #f472b6;
}

.timeline-action--danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ページ内リンク（#community_post_1 など）で飛んだとき、固定ヘッダーの下に隠れないよう余白を取る */
html {
  scroll-padding-top: 88px;
}

/* ===========================================
   Server Announcement（概要ページの一番上に出す、オーナーの文字だけのアナウンス）
   =========================================== */

.server-announcement-area {
  @apply flex flex-col gap-2;
}

/* オーナー向けの追加・編集欄（普段は閉じておく） */
.server-announcement-editor {
  @apply rounded-xl;
}

.server-announcement-editor__toggle {
  @apply inline-flex items-center text-sm cursor-pointer select-none list-none;
  color: var(--color-text-muted);
}

.server-announcement-editor__toggle::-webkit-details-marker {
  display: none;
}

.server-announcement-editor__toggle:hover {
  color: var(--color-primary);
}

.server-announcement-editor[open] {
  @apply p-4;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.server-announcement-editor[open] .server-announcement-editor__toggle {
  @apply mb-3 font-semibold;
  color: var(--color-text);
}

.server-announcement-editor__form {
  @apply flex flex-col gap-3 m-0;
}

.server-announcement-editor__footer {
  @apply flex flex-wrap items-center justify-between gap-3;
}

.server-announcement-editor__hint {
  @apply text-xs;
  color: var(--color-text-muted);
}

.server-announcement__withdraw {
  @apply px-2 py-1 rounded-full text-xs bg-transparent border-0 cursor-pointer transition-colors;
  color: var(--color-text-muted);
}

.server-announcement__withdraw:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.server-announcement form.button_to {
  @apply m-0 shrink-0;
}

/* ===========================================
   Notification Bell（画面右上のベルと、吹き出しの通知一覧）
   =========================================== */

/* PCは「ロゴ・メニュー・ベル」、スマホは「ロゴ・ベル・ハンバーガー」の順に並べる */
.site-header .header-nav {
  order: 1;
}

.notification-bell {
  @apply relative ml-3;
  order: 2;
}

.site-header .mobile-menu-btn {
  order: 3;
}

@media (max-width: 768px) {
  .notification-bell {
    @apply ml-auto mr-1;
  }
}

.notification-bell__button {
  @apply relative inline-flex items-center justify-center w-10 h-10 rounded-full bg-transparent border-0 cursor-pointer transition-colors;
}

.notification-bell__button:hover,
.notification-bell__button[aria-expanded="true"] {
  background: rgba(148, 163, 184, 0.15);
}

.notification-bell__icon {
  @apply block w-[22px] h-[22px];
}

.notification-bell__button {
  color: var(--color-text);
}

.notification-bell__badge {
  @apply absolute -top-0.5 -right-0.5 inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full text-[11px] font-bold leading-none;
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 0 2px var(--color-bg-light);
}

/* 吹き出し：ベルの真下に、上向きの三角を付けて出す */
.notification-popover {
  @apply absolute right-0 top-full mt-3 z-50 w-[360px] max-w-[calc(100vw-32px)] rounded-xl;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.notification-popover::before {
  content: "";
  @apply absolute -top-[7px] w-3 h-3 rotate-45;
  /* スマホではベルの位置に合わせてJSで調整する */
  right: var(--arrow-right, 14px);
  background: var(--color-bg-light);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
}

.notification-popover__header {
  @apply px-4 py-3 text-sm font-bold;
  border-bottom: 1px solid var(--color-border);
}

/* 吹き出しの一番下の「すべての通知を見る」 */
.notification-popover__more {
  @apply block px-4 py-3 text-center text-sm font-semibold no-underline rounded-b-xl transition-colors;
  color: var(--color-primary);
  border-top: 1px solid var(--color-border);
}

.notification-popover__more:hover {
  background: rgba(148, 163, 184, 0.12);
}

/* すべての通知のページ */
.notifications-page {
  @apply py-8;
  min-height: calc(100vh - 200px);
}

.notifications-page .container {
  @apply max-w-2xl;
}

.notifications-page__card {
  @apply rounded-xl overflow-hidden;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

/* 通知の種類の絞り込み（チェックボックスをチップの形に）。チェックが入っている種類はラベルと同じ色にする */
.notification-filter {
  @apply mb-4;
}

.notification-filter__options {
  @apply flex flex-wrap gap-2 m-0 p-0 border-0;
}

.notification-filter__option {
  @apply relative inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-sm font-semibold cursor-pointer select-none transition-colors;
  color: var(--color-text-muted);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
}

/* チェックボックス本体は見えなくして、チップ全体で押せるようにする（キーボード操作は残す） */
.notification-filter__input {
  @apply absolute opacity-0 w-0 h-0;
}

.notification-filter__option:has(.notification-filter__input:focus-visible) {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.notification-filter__option:has(.notification-filter__input:checked)::before {
  content: "✓";
  @apply text-xs;
}

.notification-filter__count {
  @apply text-xs font-medium tabular-nums opacity-70;
}

.notification-filter__option--announcement:has(:checked) { background: rgba(16, 185, 129, 0.15); color: #059669; border-color: transparent; }
.notification-filter__option--community-post:has(:checked) { background: rgba(168, 85, 247, 0.15); color: #7e22ce; border-color: transparent; }
.notification-filter__option--like:has(:checked) { background: rgba(236, 72, 153, 0.12); color: #db2777; border-color: transparent; }
.notification-filter__option--favorite:has(:checked) { background: rgba(234, 179, 8, 0.15); color: #a16207; border-color: transparent; }
.notification-filter__option--site:has(:checked) { background: rgba(245, 158, 11, 0.15); color: #b45309; border-color: transparent; }

:root:not([data-theme="light"]) .notification-filter__option--announcement:has(:checked) { color: #34d399; }
:root:not([data-theme="light"]) .notification-filter__option--community-post:has(:checked) { color: #c084fc; }
:root:not([data-theme="light"]) .notification-filter__option--like:has(:checked) { color: #f472b6; }
:root:not([data-theme="light"]) .notification-filter__option--favorite:has(:checked) { color: #facc15; }
:root:not([data-theme="light"]) .notification-filter__option--site:has(:checked) { color: #fbbf24; }

/* ページでは吹き出しのような高さの上限を付けない */
.notifications-page .notification-list--page {
  max-height: none;
  overflow: visible;
}

.notification-list {
  @apply flex flex-col overflow-y-auto;
  /* 低い画面でも吹き出しが画面の下にはみ出さないよう、画面の高さに合わせて縮める */
  max-height: min(420px, calc(100dvh - 160px));
}

.notification-list__empty {
  @apply m-0 px-4 py-6 text-sm text-center leading-relaxed;
  color: var(--color-text-muted);
}

.notification-item {
  @apply flex items-start gap-3 px-4 py-3 no-underline transition-colors;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

.notification-item:last-child {
  border-bottom: none;
}

/* ホバーは暗くしない。白いカードの上でグレーを重ねると、ページの地色と同じになって「穴が開いた／無効」に見えるため、
   ごく薄い色にとどめ、右端の「›」と文字色で「押すと移動する」ことを伝える */
.notification-item {
  @apply relative pr-9;
}

.notification-item::after {
  content: "›";
  @apply absolute right-4 top-1/2 -translate-y-1/2 text-lg leading-none opacity-0 transition-opacity;
  color: var(--color-text-muted);
}

.notification-item:hover {
  background: rgba(15, 23, 42, 0.025);
}

.notification-item:hover::after,
.notification-item:focus-visible::after {
  opacity: 1;
}

.notification-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.notification-item--unread {
  background: rgba(16, 185, 129, 0.08);
}

/* 未読はホバーで緑を少しだけ濃くする（未読の目印は保つ） */
.notification-item--unread:hover {
  background: rgba(16, 185, 129, 0.12);
}

:root:not([data-theme="light"]) .notification-item:not(.notification-item--unread):hover {
  background: rgba(255, 255, 255, 0.04);
}

.notification-item__icon {
  @apply flex items-center justify-center shrink-0 w-8 h-8 rounded-full;
  background: rgba(148, 163, 184, 0.15);
  color: var(--color-text-muted);
}

.notification-item__icon-svg {
  @apply block w-[18px] h-[18px];
}

.notification-item__body {
  @apply flex-1 min-w-0 flex flex-col gap-0.5;
}

.notification-item__server {
  @apply text-xs font-semibold truncate;
  color: var(--color-text-muted);
}

/* 長いアナウンスでも1件が吹き出しを占めないよう、本文は3行までにする */
.notification-item__message {
  @apply text-sm leading-snug break-words line-clamp-3;
}

/* 運営からのお知らせは押しても詳細ページがないので、省略せず全文を出す */
.notification-item--site .notification-item__message {
  @apply line-clamp-none;
}

.notification-item__time {
  @apply text-xs;
  color: var(--color-text-muted);
}

.notification-item__dot {
  @apply shrink-0 w-2 h-2 mt-1.5 rounded-full;
  background: var(--color-primary);
}

/* display を指定したクラスより hidden 属性を優先させる（未読0件のバッジ・閉じた吹き出し） */
.notification-bell [hidden] {
  display: none !important;
}

/* 通知の種類ラベル（アナウンス・投稿で色を分ける） */
.notification-item__meta {
  @apply flex items-center gap-1.5 min-w-0;
}

.notification-label {
  @apply shrink-0 inline-flex items-center px-2 py-0.5 rounded-full text-[11px] font-bold leading-tight whitespace-nowrap;
}

.notification-label--announcement {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.notification-label--community-post {
  background: rgba(168, 85, 247, 0.15);
  color: #7e22ce;
}

/* ダークテーマでは文字色を明るくして読みやすくする */
:root:not([data-theme="light"]) .notification-label--announcement { color: #34d399; }
:root:not([data-theme="light"]) .notification-label--community-post { color: #c084fc; }

/* 運営からのお知らせ */
.notification-label--site {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

:root:not([data-theme="light"]) .notification-label--site { color: #fbbf24; }

/* アナウンス：ほかのカード（detail-card）と同じ地色・影にそろえたシンプルな形 */
.server-announcement {
  @apply flex flex-col gap-2 rounded-xl px-6 py-5;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.server-announcement__head {
  @apply flex items-center gap-3;
}

/* 通知の吹き出しのアイコンと同じ、緑の丸に入れたメガホン */
.server-announcement__icon {
  @apply flex items-center justify-center shrink-0 w-9 h-9 rounded-full;
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-primary);
}

.server-announcement__icon-svg {
  @apply block w-5 h-5;
}

.server-announcement__heading {
  @apply flex flex-col min-w-0;
}

.server-announcement__title {
  @apply text-sm font-bold;
  color: var(--color-text);
}

.server-announcement__date {
  @apply text-xs;
  color: var(--color-text-muted);
}

.server-announcement__text {
  @apply m-0 text-[15px] leading-relaxed whitespace-pre-wrap break-words;
  color: var(--color-text);
}

/* オーナー向けの「閉じる」は見出しの行の右端に控えめに置く */
.server-announcement__actions {
  @apply flex items-center shrink-0 ml-auto -mr-2;
}

/* タブの上に並べるオフライン表示とアナウンス */
.server-notices {
  @apply flex flex-col gap-3 mb-6;
}

/* オフライン表示：アナウンスと同じ形で、アイコンの丸だけ赤にする */
.server-announcement--offline .server-announcement__icon {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

:root:not([data-theme="light"]) .server-announcement--offline .server-announcement__icon { color: #f87171; }

.server-announcement__text--muted {
  @apply text-sm;
  color: var(--color-text-muted);
}

/* 運営が一覧・ランキングから外していることをオーナーに知らせる表示：アイコンの丸を黄色にする */
.server-announcement--hidden .server-announcement__icon {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

:root:not([data-theme="light"]) .server-announcement--hidden .server-announcement__icon { color: #fbbf24; }

.server-announcement__label {
  @apply font-semibold;
}

.server-announcement__link {
  @apply underline;
  color: var(--color-primary);
}

.server-announcement__note {
  @apply m-0 text-xs;
  color: var(--color-text-muted);
}

/* 管理画面：一覧・ランキングへの掲載の切り替え */
.admin-status--hidden {
  @apply bg-red-100 text-red-700;
}

/* 管理画面：投稿管理 */
.admin-posts__date {
  @apply whitespace-nowrap;
}

.admin-posts__content {
  @apply max-w-md;
}

.admin-posts__text {
  @apply text-sm leading-relaxed whitespace-pre-wrap break-words;
}

.admin-posts__images {
  @apply flex flex-wrap gap-1.5 mt-2;
}

.admin-posts__image {
  @apply block w-12 h-12 rounded object-cover border border-slate-200;
}

.admin-posts__actions {
  @apply flex flex-col items-end gap-1.5;
}

.admin-posts__actions form {
  @apply m-0;
}

.admin-listing-visibility__description {
  @apply m-0 mb-5 text-sm leading-relaxed text-slate-500;
}

.admin-listing-visibility__status {
  @apply flex items-center gap-2 mb-4;
}

.admin-listing-visibility__reason {
  @apply whitespace-pre-wrap break-words;
}

.admin-listing-visibility__form {
  @apply m-0;
}

.admin-listing-visibility__form .admin-form__label {
  @apply mb-2;
}

.admin-listing-visibility .admin-detail {
  @apply mb-5;
}

/* フッターのダーク／ライト切り替え */
.footer-theme {
  @apply flex justify-center mt-6 mb-2;
}

.footer-theme__toggle {
  @apply inline-flex items-center gap-2 px-4 py-2 rounded-full text-sm cursor-pointer transition-colors;
  background: var(--color-bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.footer-theme__toggle:hover {
  border-color: var(--color-primary);
}

/* ===========================================
   Community Feed Layout（全体のコミュニティページ：タイムライン＋右側のサイドバー）
   =========================================== */

.feed-layout {
  @apply grid gap-6 items-start;
  grid-template-columns: minmax(0, 1fr) 300px;
}

/* 狭い画面ではサイドバーをタイムラインの下に回す */
@media (max-width: 960px) {
  .feed-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.feed-layout__main {
  @apply min-w-0;
}

.feed-sidebar {
  @apply flex flex-col gap-4 min-w-0;
}

/* タイムラインの投稿の上に出すサーバー名 */
/* 全体のコミュニティページで、どのサーバーの投稿かを出す（小さいサーバーアイコン＋名前）。
   アイコンは下のアバターの左端にそろえ、形はサーバー一覧のアイコン（64pxに角丸8px）と同じ比率の角丸にする */
.timeline-item__server {
  @apply inline-flex items-center gap-2 max-w-full mb-2 text-[13px] font-semibold no-underline;
  color: var(--color-text);
  opacity: 0.8;
}

.timeline-item__server:hover {
  opacity: 1;
}

.timeline-item__server-icon {
  @apply flex items-center justify-center shrink-0 w-5 h-5 rounded-[3px] overflow-hidden text-[11px] leading-none;
  background: var(--color-bg-card);
}

.timeline-item__server-icon img {
  @apply w-full h-full object-cover;
}

.timeline-item__server-name {
  @apply truncate;
}

.timeline-item__server:hover {
  color: var(--color-primary);
}

.feed-sidebar__list {
  @apply flex flex-col gap-1 m-0 p-0 list-none;
}

.feed-sidebar__server {
  @apply flex items-center gap-3 -mx-2 px-2 py-1.5 rounded-lg no-underline transition-colors;
  color: var(--color-text);
}

.feed-sidebar__server:hover {
  background: rgba(148, 163, 184, 0.12);
}

/* サーバーアイコンはサーバー一覧（64pxに角丸8px）と同じ比率の角丸にする */
.feed-sidebar__server-icon {
  @apply flex items-center justify-center shrink-0 w-8 h-8 rounded-[4px] overflow-hidden text-base;
  background: var(--color-bg-card);
}

.feed-sidebar__server-icon img {
  @apply w-full h-full object-cover;
}

.feed-sidebar__server-text {
  @apply flex flex-col min-w-0;
}

.feed-sidebar__server-name {
  @apply text-sm font-semibold truncate;
}

.feed-sidebar__server-note {
  @apply text-xs;
  color: var(--color-text-muted);
}

/* 投稿が活発なサーバーは順位を付ける */
.feed-sidebar__list--ranked {
  counter-reset: feed-rank;
}

.feed-sidebar__list--ranked > li {
  @apply flex items-center gap-1;
  counter-increment: feed-rank;
}

.feed-sidebar__list--ranked > li::before {
  content: counter(feed-rank);
  @apply shrink-0 w-4 text-xs font-bold text-center;
  color: var(--color-text-muted);
}

.feed-sidebar__list--ranked .feed-sidebar__server {
  @apply flex-1 min-w-0 mx-0;
}

.feed-sidebar__steps {
  @apply m-0 mb-2 pl-5 text-sm leading-relaxed list-decimal;
  color: var(--color-text);
}

.feed-sidebar__note {
  @apply m-0 mb-3 text-xs leading-relaxed;
  color: var(--color-text-muted);
}

/* 通知アイコンの色はラベルと同じ系統にそろえる */
.notification-item__icon--announcement {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.notification-item__icon--community-post {
  background: rgba(168, 85, 247, 0.15);
  color: #7e22ce;
}

:root:not([data-theme="light"]) .notification-item__icon--announcement { color: #34d399; }
:root:not([data-theme="light"]) .notification-item__icon--community-post { color: #c084fc; }

/* いいねの通知は、いいねボタンと同じピンク */
.notification-label--like,
.notification-item__icon--like {
  background: rgba(236, 72, 153, 0.12);
  color: #db2777;
}

:root:not([data-theme="light"]) .notification-label--like,
:root:not([data-theme="light"]) .notification-item__icon--like { color: #f472b6; }

/* お気に入り登録の通知は、星の黄色 */
.notification-label--favorite,
.notification-item__icon--favorite {
  background: rgba(234, 179, 8, 0.15);
  color: #a16207;
}

:root:not([data-theme="light"]) .notification-label--favorite,
:root:not([data-theme="light"]) .notification-item__icon--favorite { color: #facc15; }

.notification-item__icon--site {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

:root:not([data-theme="light"]) .notification-item__icon--site { color: #fbbf24; }

/* ===========================================
   Vote Modal（連携アカウントが複数あるときの投票アカウント選択）
   =========================================== */

.vote-modal {
  @apply w-[min(420px,calc(100vw-32px))] m-auto p-0 rounded-2xl border-0;
  background: var(--color-bg-light);
  color: var(--color-text);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.vote-modal::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.vote-modal__form {
  @apply flex flex-col gap-3 p-6 m-0;
}

.vote-modal__title {
  @apply m-0 text-lg font-bold;
}

.vote-modal__server {
  @apply m-0 -mt-2 text-sm truncate;
  color: var(--color-text-muted);
}

.vote-modal__actions {
  @apply flex justify-end gap-2 mt-2;
}

/* 投票完了のモーダル：中央寄せで、閉じると投稿へのボタンを並べる */
.vote-done-modal__icon {
  @apply text-4xl text-center leading-none;
}

.vote-done-modal__title {
  @apply text-center;
}

.vote-done-modal__text {
  @apply m-0 text-sm text-center leading-relaxed;
  color: var(--color-text-muted);
}

.vote-done-modal__actions {
  @apply justify-center flex-wrap;
}

.vote-done-modal__owner-only {
  @apply m-0 mt-1 text-xs text-center;
  color: var(--color-text-muted);
}

/* ===========================================
   Post Composer（タイムラインの一番上に置く投稿欄）
   =========================================== */

.post-composer {
  @apply mb-4 rounded-xl p-[22px];
  background: var(--color-bg-light);
  box-shadow: var(--shadow-card);
}

.post-composer__form {
  @apply flex flex-col gap-3 m-0;
}

.post-composer__errors {
  @apply m-0 text-sm;
}

.post-composer__body {
  @apply flex gap-3;
}

.post-composer__main {
  @apply flex-1 min-w-0 flex flex-col gap-2;
}

.post-composer__input {
  @apply w-full min-h-[72px] p-0 text-[15px] leading-relaxed bg-transparent border-0 resize-y outline-none;
  color: var(--color-text);
}

.post-composer__input::placeholder {
  color: var(--color-text-muted);
}

.post-composer__toolbar {
  @apply flex items-center gap-2 pt-2;
  border-top: 1px solid var(--color-border);
}

.post-composer__attach {
  @apply inline-flex items-center justify-center w-9 h-9 -ml-2 rounded-full cursor-pointer transition-colors;
  color: var(--color-primary);
}

.post-composer__attach:hover,
.post-composer__attach:focus-within {
  background: rgba(16, 185, 129, 0.12);
}

.post-composer__attach-icon {
  @apply block w-5 h-5;
}

.post-composer__file-count {
  @apply text-xs;
  color: var(--color-text-muted);
}

.post-composer__file-count--error {
  color: #ef4444;
}

/* 残り文字数（20文字以下で黄色、0以下で赤） */
.post-composer__count {
  @apply ml-auto text-xs tabular-nums;
  color: var(--color-text-muted);
}

.post-composer__count--warning {
  color: #d97706;
}

.post-composer__count--error {
  color: #ef4444;
}

.post-composer__submit:disabled {
  @apply opacity-50 cursor-not-allowed;
}

/* 未連携の人に、投稿欄の代わりに出す連携の案内。ぼかした投稿欄の上に案内を重ねる。
   両方を同じグリッドのマスに置くので、案内のほうが高くなってもカードが伸びてはみ出さない */
.post-composer--locked {
  @apply grid overflow-hidden;
}

.post-composer__ghost,
.post-composer__overlay {
  grid-area: 1 / 1;
}

.post-composer__ghost {
  @apply select-none pointer-events-none;
  filter: blur(2px);
  opacity: 0.45;
}

.post-composer__ghost-input {
  color: var(--color-text-muted);
}

.post-composer__ghost-submit {
  @apply opacity-50;
}

.post-composer__overlay {
  @apply relative flex flex-col items-center justify-center gap-2 text-center;
}

/* コミュニティ投稿OFFのサーバーで、オーナーに出すONへの誘導カード */
.post-composer--prompt {
  @apply flex flex-col items-center gap-2 text-center;
}

.post-composer__prompt-icon {
  @apply text-3xl leading-none mb-1;
}

.post-composer__owner-only {
  @apply m-0 mt-1 text-xs;
  color: var(--color-text-muted);
}

.post-composer__link-title {
  @apply m-0 text-[15px] font-bold;
  color: var(--color-text);
  text-wrap: balance;
}

.post-composer__link-text {
  @apply m-0 mb-1 text-sm leading-relaxed;
  color: var(--color-text-muted);
  text-wrap: balance;
}

/* スマホではベルが画面の端にないため、吹き出しを画面の左右16pxの内側に固定して出す（上端はJSでベルの下に合わせる） */
@media (max-width: 768px) {
  .notification-popover {
    position: fixed;
    left: max(16px, env(safe-area-inset-left, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
    margin-top: 0;
  }
}
