
:root {
  --bg: #F5F2EC;
  --ink: #1C1C1C;
  --muted: #6B6459;
  --rule: #C8BFB0;
  --rule-soft: rgba(200, 191, 176, 0.42);
  --accent: #8B1A1A;
  --accent-soft: rgba(139, 26, 26, 0.07);
  --overlay: rgba(28, 28, 28, 0.5);
  --overlay-soft: rgba(28, 28, 28, 0.4);
  --surface: #F5F2EC;
  --surface-2: rgba(200, 191, 176, 0.08);
  --surface-3: rgba(200, 191, 176, 0.16);
  --field-bg: transparent;
  --button-bg: transparent;
  --button-hover-bg: transparent;
  --primary-bg: #1C1C1C;
  --primary-ink: #F5F2EC;
  --primary-hover-bg: #1C1C1C;
  --paper-tint: rgba(200, 191, 176, 0.08);
  --paper-tint-strong: rgba(200, 191, 176, 0.35);
  --skeleton-mid: #E8E4DC;
  --success: #2D6A4F;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #1b1610;
  --ink: #f1e3c8;
  --muted: #c8b999;
  --rule: #6b543b;
  --rule-soft: #4a3927;
  --accent: #d08a62;
  --accent-soft: rgba(208, 138, 98, 0.17);
  --overlay: rgba(27, 22, 16, 0.78);
  --overlay-soft: rgba(27, 22, 16, 0.62);
  --surface: #2a2118;
  --surface-2: #211911;
  --surface-3: #33281d;
  --field-bg: #241b13;
  --button-bg: #251c14;
  --button-hover-bg: #33281d;
  --primary-bg: #70452f;
  --primary-ink: #f1e3c8;
  --primary-hover-bg: #80533a;
  --paper-tint: rgba(241, 227, 200, 0.035);
  --paper-tint-strong: rgba(241, 227, 200, 0.085);
  --skeleton-mid: #3b2e20;
  --success: #9fc7a7;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  font-family: "Shippori Mincho", serif;
  font-size: 15px;
  font-variant-numeric: oldstyle-nums;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

button,
input,
textarea {
  font: inherit;
  font-variant-numeric: oldstyle-nums;
}

button,
.button {
  background: var(--button-bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  padding: 6px 14px;
  transition: border-color 0.1s, color 0.1s;
}

button:hover:not(:disabled),
.button:hover:not(:disabled) {
  background: var(--button-hover-bg);
  border-color: var(--ink);
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.1s;
}

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

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--ink);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .top-intro,
html[data-theme="dark"] .modal {
  border-color: var(--rule-soft);
}

html[data-theme="dark"] .section,
html[data-theme="dark"] .search-card,
html[data-theme="dark"] .topic-hero,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .submit-card,
html[data-theme="dark"] .comment-form {
  background: transparent;
}

html[data-theme="dark"] .daily-topic-card,
html[data-theme="dark"] .favorite-card,
html[data-theme="dark"] .entry-card,
html[data-theme="dark"] .comment-card,
html[data-theme="dark"] .sidebar-widget,
html[data-theme="dark"] .sidebar-login-widget,
html[data-theme="dark"] .sidebar-user-card,
html[data-theme="dark"] .lab-notice,
html[data-theme="dark"] .auth-warning,
html[data-theme="dark"] .legal-disclaimer,
html[data-theme="dark"] .game-select-item,
html[data-theme="dark"] .public-game-card,
html[data-theme="dark"] .quiz-option,
html[data-theme="dark"] .mashup-example-box {
  background: var(--surface-3);
  border-color: var(--rule-soft);
}

html[data-theme="dark"] .sidebar-widget,
html[data-theme="dark"] .sidebar-login-widget,
html[data-theme="dark"] .sidebar-user-card {
  background: var(--surface-2);
  border-color: var(--rule-soft);
}

html[data-theme="dark"] .daily-topic-card {
  background: transparent;
  border-color: var(--rule-soft);
}

html[data-theme="dark"] .current-definition,
html[data-theme="dark"] .modal-preview,
html[data-theme="dark"] .typing-target,
html[data-theme="dark"] .quiz-question,
html[data-theme="dark"] .mashup-prompt-card {
  background: var(--surface-3);
  border-color: var(--rule-soft);
}

html[data-theme="dark"] .input,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .tag-select,
html[data-theme="dark"] .action-type-select,
html[data-theme="dark"] .script-code-textarea {
  background: var(--field-bg);
  border-color: var(--rule-soft);
  border-bottom-color: var(--rule);
  color: var(--ink);
}

html[data-theme="dark"] .input:focus,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] .tag-select:focus,
html[data-theme="dark"] .action-type-select:focus {
  border-bottom-color: var(--accent);
}

html[data-theme="dark"] button,
html[data-theme="dark"] .button,
html[data-theme="dark"] .vote-button,
html[data-theme="dark"] .share-button,
html[data-theme="dark"] .report-button,
html[data-theme="dark"] .ranking-tab,
html[data-theme="dark"] .theme-option,
html[data-theme="dark"] .tsukkomi-chip,
html[data-theme="dark"] .tsukkomi-reaction-btn {
  background: var(--button-bg);
}

html[data-theme="dark"] .favorite-button,
html[data-theme="dark"] .entry-image-btn,
html[data-theme="dark"] .modal-close-button,
html[data-theme="dark"] .auth-nav-button,
html[data-theme="dark"] .auth-close,
html[data-theme="dark"] .hamburger,
html[data-theme="dark"] .mobile-menu-link,
html[data-theme="dark"] .action-sheet-item {
  background: transparent;
}

html[data-theme="dark"] button:hover:not(:disabled),
html[data-theme="dark"] .button:hover:not(:disabled),
html[data-theme="dark"] .vote-button:hover:not(:disabled),
html[data-theme="dark"] .share-button:hover,
html[data-theme="dark"] .report-button:hover {
  background: var(--button-hover-bg);
}

html[data-theme="dark"] .button.primary,
html[data-theme="dark"] button.primary,
html[data-theme="dark"] .sidebar-login-btn,
html[data-theme="dark"] .mobile-define-cta,
html[data-theme="dark"] .typing-btn,
html[data-theme="dark"] .admin-seed-button,
html[data-theme="dark"] .auth-google {
  background: var(--primary-bg);
  border-color: var(--primary-bg);
  color: var(--primary-ink);
}

html[data-theme="dark"] .button.primary:hover:not(:disabled),
html[data-theme="dark"] button.primary:hover:not(:disabled),
html[data-theme="dark"] .sidebar-login-btn:hover,
html[data-theme="dark"] .mobile-define-cta:hover,
html[data-theme="dark"] .typing-btn:hover,
html[data-theme="dark"] .auth-google:hover {
  background: var(--primary-hover-bg);
  border-color: var(--accent);
  color: var(--primary-ink);
}

html[data-theme="dark"] .favorite-button:hover,
html[data-theme="dark"] .entry-image-btn:hover,
html[data-theme="dark"] .modal-close-button:hover,
html[data-theme="dark"] .auth-nav-button:hover,
html[data-theme="dark"] .auth-close:hover,
html[data-theme="dark"] .hamburger:hover {
  background: transparent;
}

html[data-theme="dark"] #modal-content,
html[data-theme="dark"] .auth-modal,
html[data-theme="dark"] .mobile-menu,
html[data-theme="dark"] .action-sheet {
  background: var(--surface);
  border-color: var(--rule-soft);
}

html[data-theme="dark"] .top-description-lines {
  color: #d2c1a2;
}

p {
  margin: 0 0 1.5rem;
}

.app-shell {
  padding: 0;
  width: auto;
}

#menu-root {
  left: 0;
  min-height: 100vh;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 199;
}

.site-header {
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 0 0 36px;
  padding: 0 0 13px;
}

.logo {
  color: var(--ink);
  display: inline-block;
  font-family: "Shippori Mincho", serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.logo-mark {
  display: none;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-left: auto;
}

.nav-link,
.back-link {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  letter-spacing: 0.05em;
  line-height: 1.6;
  white-space: nowrap;
}

.auth-nav-button {
  background: transparent;
  border: 0;
  padding: 0;
}

.stack {
  display: grid;
  gap: 34px;
}

.section,
.search-card,
.topic-hero,
.panel,
.submit-card,
.comment-form {
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 0;
  padding: 18px 0 0;
}

.section-heading,
.modal-title {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  line-height: 1.8;
  margin: 0 0 16px;
}

#current-heading {
  color: var(--accent);
  letter-spacing: 0.1em;
}

.topic-title {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.5;
  margin: 0 0 8px;
}

.card {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.daily-topic-card,
.favorite-card,
.entry-card,
.comment-card {
  padding: 0 0 15px;
}

.daily-topic-card.is-changing {
  animation: topicSwitch 0.32s ease both;
}

.daily-topic-body {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
}

.daily-topic-title,
.topic-name {
  color: var(--ink);
  display: inline;
  font-family: "Shippori Mincho", serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.topic-origin-badge {
  border: 0.5px solid var(--accent);
  color: var(--accent);
  display: inline-block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.5;
  margin-left: 8px;
  padding: 1px 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.daily-definition,
.definition-text {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.9;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.create-topic-form {
  display: grid;
  gap: 12px;
}

.input,
input,
textarea {
  background: var(--field-bg);
  border: none;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 14px;
  line-height: 1.8;
  padding: 8px 0;
  width: 100%;
}

.input:focus,
input:focus,
textarea:focus {
  border-bottom-color: var(--ink);
  outline: none;
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.button.primary,
button.primary {
  background: var(--primary-bg);
  border-color: var(--primary-bg);
  color: var(--primary-ink);
}

.button.primary:hover:not(:disabled),
button.primary:hover:not(:disabled) {
  background: var(--primary-hover-bg);
  border-color: var(--accent);
  color: var(--primary-ink);
}

.button.ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--muted);
}

.topic-list {
  display: grid;
  gap: 0;
}

.topic-card {
  border-bottom: 0.5px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 10px 0 12px;
}

.topic-list-item {
  align-items: baseline;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.topic-list-item > span:first-child {
  min-width: 0;
}

.topic-open-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.mobile-more-row {
  border-top: 0.5px solid var(--rule);
  display: none;
  margin-top: 10px;
  padding-top: 12px;
}

.topic-card:hover {
  color: var(--accent);
}

.topic-card .topic-name {
  text-decoration: none;
}

.topic-card .topic-name:hover {
  color: var(--accent);
}

.tag-filter-row,
.topic-tag-inputs {
  align-items: baseline;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  gap: 8px 12px;
  line-height: 1.8;
  margin-top: 12px;
}

.topic-tag-inputs {
  margin-top: 0;
}

.topic-tag-label {
  flex: 0 0 auto;
}

.new-topic-tag {
  max-width: 110px;
}

.tag-select {
  background: var(--field-bg);
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  padding: 4px 24px 4px 0;
}

.tag-select:focus {
  border-bottom-color: var(--ink);
  outline: none;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
}

.topic-tag {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.topic-tag:hover {
  color: var(--accent);
}

.topic-hero-tags {
  margin-top: 10px;
}

.category-list-item .topic-name {
  margin-left: 8px;
}

.category-icon {
  color: var(--muted);
  display: inline-block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  min-width: 1.4em;
}

.category-count {
  flex-shrink: 0;
  white-space: nowrap;
}

.ranking-table-wrap {
  border-top: 1px solid var(--rule);
  overflow-x: auto;
}

.ranking-table {
  border-collapse: collapse;
  color: var(--ink);
  font-variant-numeric: oldstyle-nums;
  min-width: 520px;
  width: 100%;
}

.ranking-table th,
.ranking-table td {
  border-bottom: 0.5px solid var(--rule);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  line-height: 1.8;
  padding: 10px 8px 11px 0;
  text-align: left;
  white-space: nowrap;
}

.ranking-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
}

.ranking-table tr.is-top td {
  color: var(--accent);
}

.ranking-table tr.is-current td {
  font-weight: 700;
}

.ranking-table tr.is-top .author-link {
  color: var(--accent);
}

.ranking-table tr.is-current .author-link {
  font-weight: 700;
}

.favorite-card {
  border-bottom: 0.5px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}

.meta,
.counter-row,
.notice,
.counter {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.8;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 2px 0 0;
}

.meta span + span::before {
  content: "·";
  margin: 0 0.55em 0 0.4em;
}

.author-link {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.1s;
}

.author-link:hover {
  color: var(--accent);
}

.pill {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
  display: inline;
  font: inherit;
  min-height: 0;
  padding: 0;
}

.empty {
  border-top: 0.5px solid var(--rule);
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  line-height: 1.9;
  margin: 0;
  padding: 13px 0 2px;
}

.flash-message {
  border-top: 1px solid var(--rule);
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 1.8;
  margin: 0;
  padding: 12px 0 0;
}

.topic-hero {
  gap: 5px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.stats span + span::before {
  content: "·";
  margin: 0 0.55em 0 0.4em;
}

.current-definition {
  border-left: 3px solid var(--accent);
  display: grid;
  gap: 0;
  padding: 0 0 2px 16px;
}

.current-definition .meta {
  margin: 2px 0 14px;
}

.entry-card {
  border-bottom: 0.5px solid var(--rule);
  display: grid;
  gap: 8px;
}

.entry-head {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.rank {
  color: var(--muted);
  display: inline-block;
  font-family: "Shippori Mincho", serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.9;
  min-width: 0;
}

.entry-text {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.9;
  margin: 0;
  overflow-wrap: anywhere;
}

.favorite-button {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--rule);
  font-family: "Shippori Mincho", serif;
  font-size: 19px;
  line-height: 1.5;
  padding: 0 0 0 10px;
}

.favorite-button:hover {
  color: var(--accent);
}

.favorite-button.is-active {
  color: var(--accent);
}

.vote-row,
.share-row,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 4px 0 0;
}

.vote-button {
  background: var(--button-bg);
  border-color: var(--rule);
  color: var(--muted);
}

.vote-button:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
}

.vote-button.voted {
  border-color: var(--accent);
  color: var(--accent);
}

.vote-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.vote-button.voted:disabled {
  opacity: 1;
}

.entry-image-btn {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-left: auto;
  padding: 6px 0;
}

.entry-image-btn:hover {
  color: var(--accent);
}

.share-button {
  background: var(--button-bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--muted);
  display: inline-block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  padding: 6px 14px;
  transition: border-color 0.1s, color 0.1s;
}

.share-button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.share-icon {
  display: none;
}

.share-toggle {
  display: none;
}

.submit-card,
.comment-form {
  gap: 10px;
}

.comment-card {
  border-bottom: 0.5px solid var(--rule);
  display: grid;
  gap: 4px;
}

.comment-head {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.comment-text {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 14px;
  line-height: 1.9;
  margin: 0;
  overflow-wrap: anywhere;
}

.comment-fields {
  display: grid;
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.comment-form.is-authenticated .comment-fields {
  grid-template-columns: minmax(0, 1fr) auto;
}

.counter-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.counter.warning {
  color: var(--accent);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: var(--overlay);
  overflow: auto;
  padding: 12vh max(24px, calc((100vw - 680px) / 2 + 24px)) 48px;
}

.modal {
  background: var(--surface);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  max-width: 520px;
  padding: 18px 0 21px;
  position: relative;
  width: 100%;
}

.modal-body {
  display: grid;
  gap: 12px;
}

.modal-title {
  color: var(--accent);
  margin: 0;
}

.modal-preview {
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.9;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 0 0 0 16px;
}

.modal-mode {
  margin: 0;
}

.modal-close-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 0;
  top: -28px;
}

.modal-close-button:hover {
  color: var(--accent);
}

.onboarding-body {
  gap: 16px;
}

.onboarding-copy,
.onboarding-invite {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 15px;
  line-height: 1.9;
  margin: 0;
}

.onboarding-copy p {
  margin: 0;
}

.onboarding-topic {
  margin: 4px 0 0;
}

.onboarding-topic .topic-name {
  display: block;
  margin: 0 0 8px;
}

.onboarding-rules {
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
  border-top: 0.5px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.onboarding-rules li {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.7;
  padding-left: 14px;
  position: relative;
}

.onboarding-rules li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.post-share-summary {
  display: grid;
  gap: 10px;
}

.post-complete-card {
  background: var(--paper-tint);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}

.post-share-label {
  color: var(--muted);
  display: block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.8;
  margin-bottom: 4px;
}

.post-share-topic {
  color: var(--ink);
  display: inline-block;
  font-family: "Shippori Mincho", serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.post-share-author {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}

.post-share-actions {
  border-top: 0.5px solid var(--rule);
  padding-top: 14px;
}

.post-share-message {
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}

#modal-overlay,
.auth-modal-shell {
  align-items: center;
  background: var(--overlay);
  display: flex;
  justify-content: center;
  left: 0;
  min-height: 100vh;
  padding: 32px 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 100;
}

#modal-content,
.auth-modal {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  max-width: 90vw;
  min-width: 320px;
  padding: 32px;
  width: 360px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 4px;
}

.auth-field label,
.auth-divider,
.auth-hint,
.auth-note,
.auth-error {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.8;
}

.auth-divider,
.auth-hint,
.auth-note {
  color: var(--muted);
  letter-spacing: 0.05em;
}

.auth-note {
  display: block;
  margin-top: 2px;
}

.auth-hint {
  margin: -4px 0 0;
}

.auth-error {
  color: var(--accent);
  margin: 0;
}

.auth-warning {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 8px 10px;
  margin: -4px 0 0;
}

.auth-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.auth-google {
  background: var(--ink);
  border-color: var(--ink);
  border-radius: 0;
  color: var(--bg);
}

.auth-close {
  border: 0;
  padding-left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes topicSwitch {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  body {
    padding: 34px 18px 72px;
  }

  .site-header {
    display: block;
    margin-bottom: 30px;
    padding-bottom: 11px;
  }

  .header-nav {
    margin: 7px 0 0;
  }

  .stack {
    gap: 30px;
  }

  .field-row,
  .comment-fields,
  .topic-card,
  .favorite-card {
    grid-template-columns: 1fr;
  }

  .tag-filter-row,
  .topic-tag-inputs {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .new-topic-tag {
    max-width: none;
  }

  .entry-head {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
  }

  .button,
  .vote-button,
  .share-button {
    width: 100%;
  }

  .vote-row,
  .share-row,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topic-title {
    font-size: 25px;
  }

  .daily-topic-title,
  .topic-name {
    font-size: 20px;
  }

  .definition-text,
  .daily-definition,
  .modal-preview {
    font-size: 17px;
  }

  #modal-overlay,
  .auth-modal-shell {
    padding: 24px 0;
  }

  #modal-content,
  .auth-modal {
    min-width: 0;
    padding: 24px;
    width: min(400px, 90vw);
  }

  .auth-button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  /* 投票ボタン */
  .vote-button {
    font-size: 10px;
    padding: 4px 8px;
  }

  /* 編集・削除・通報ボタン */
  .entry-edit-btn,
  .entry-delete-btn,
  .comment-delete-btn,
  .report-button {
    font-size: 10px;
  }

  /* ヘッダーナビ */
  .header-nav {
    font-size: 10px;
    gap: 8px;
  }

  /* サイト説明文 */
  .site-description {
    font-size: 12px;
    margin: 6px 0 24px;
  }
}

/* ─── フッター ─── */
.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.05em;
  line-height: 1.8;
  margin-top: 48px;
  padding: 24px 0;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
}

/* ─── 利用規約・プライバシーポリシー ─── */
.legal-article-heading {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin: 0 0 10px;
}

.legal-body {
  color: var(--ink);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 14px;
  line-height: 1.9;
  margin: 0;
}

.legal-body p {
  margin: 0 0 0.5rem;
}

.legal-subheading {
  color: var(--ink);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin: 1.1rem 0 0.35rem;
}

.legal-body ul,
.legal-body ol {
  margin: 0 0 0.5rem;
  padding-left: 1.4em;
}

.legal-body li {
  margin: 0 0 0.15rem;
}

.legal-disclaimer {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.8;
  border: 1px solid var(--rule);
  padding: 10px 12px;
  margin: 0;
}

/* ─── 通報ボタン ─── */
.report-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1.5;
  padding: 0 0 0 8px;
}

.report-button:hover {
  color: var(--accent);
}

.entry-hidden {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.9;
  margin: 0;
}

.report-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 14px;
  color: var(--ink);
}

.report-option input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ─── 編集・削除ボタン ─── */
.entry-edit-btn,
.entry-delete-btn,
.comment-delete-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1.5;
  padding: 0 0 0 8px;
}

.entry-edit-btn {
  color: var(--muted);
}

.entry-edit-btn:hover {
  color: var(--muted);
  text-decoration: underline;
}

.entry-delete-btn {
  color: var(--accent);
}

.comment-delete-btn {
  color: var(--accent);
  flex-shrink: 0;
}

.entry-delete-btn:hover,
.comment-delete-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ─── インライン編集 ─── */
.entry-inline-edit {
  display: grid;
  gap: 4px;
  padding: 4px 0;
}

.entry-edited-badge {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.03em;
  margin-left: 6px;
}

.entry-mode-selector {
  border: 0;
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
}

.entry-mode-selector legend {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.8;
  margin: 0 0 6px;
  padding: 0;
}

.entry-mode-option {
  border: 0.5px solid var(--rule);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  gap: 2px;
  line-height: 1.6;
  padding: 8px 10px;
  position: relative;
}

.entry-mode-option input {
  accent-color: var(--accent);
  height: 1px;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 1px;
}

.entry-mode-option span {
  color: var(--ink);
}

.entry-mode-option small {
  color: var(--muted);
  font-size: 11px;
}

.entry-mode-option.is-selected,
.entry-mode-option:has(input:checked) {
  border-color: var(--accent);
}

.entry-mode-option.is-selected span,
.entry-mode-option:has(input:checked) span {
  color: var(--accent);
}

.entry-mode-badge {
  border: 0.5px solid var(--rule);
  color: var(--muted);
  display: inline-block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  padding: 1px 6px;
}

.entry-mode-badge.ogiri {
  border-color: var(--accent);
  color: var(--accent);
}

.entry-score {
  color: var(--accent);
}

/* ─── サイト説明文 ─── */
.site-description {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 32px;
  line-height: 1.7;
}

.top-intro {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 14px;
  margin: 0 0 30px;
  padding: 18px 0 20px;
}

.top-intro-kicker {
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  line-height: 1.8;
  margin: 0;
}

.top-catch {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.35;
  margin: 0;
}

.top-description-lines {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  line-height: 1.9;
}

.top-description-lines p {
  margin: 0;
}

.top-tutorial-link {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  justify-self: start;
  letter-spacing: 0.05em;
  line-height: 1.8;
  margin-top: 2px;
  min-height: 44px;
  text-decoration: none;
}

.top-tutorial-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.top-steps {
  border-top: 0.5px solid var(--rule);
  counter-reset: top-step;
  display: grid;
  gap: 0;
  list-style: none;
  margin: 2px 0 0;
  padding: 8px 0 0;
}

.top-step {
  align-items: start;
  border-bottom: 0.5px solid var(--rule);
  color: var(--ink);
  display: grid;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: auto 1fr;
  letter-spacing: 0.05em;
  line-height: 1.65;
  min-width: 0;
  padding: 8px 0;
}

.top-step-number {
  color: var(--accent);
  font-family: "Shippori Mincho", serif;
  font-size: 16px;
  font-weight: 600;
  min-width: 1.5em;
}

.top-step > span:last-child {
  line-height: 1.65;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mobile-define-cta {
  display: none;
}

.tutorial-page {
  padding-bottom: 24px;
}

.tutorial-section {
  padding-top: 18px;
}

.tutorial-example {
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  line-height: 1.9;
  margin-top: 16px;
  padding: 10px 0 10px 16px;
}

.tutorial-example p {
  margin: 4px 0 0;
}

.tutorial-example-label {
  color: var(--muted);
  display: block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  line-height: 1.8;
}

.tutorial-list {
  padding-left: 1.4em;
}

.tutorial-action-row {
  margin: 12px 0 0;
}

.mobile-top-discovery {
  display: none;
}

/* ─── ローディング ─── */
.loading {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  color: var(--muted);
  padding: 24px 0;
  text-align: center;
}

/* ─── スケルトンUI ─── */
.skeleton-list {
  padding: 8px 0;
}

.skeleton-item {
  height: 48px;
  background: linear-gradient(
    90deg,
    var(--rule) 25%,
    var(--skeleton-mid) 50%,
    var(--rule) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  margin-bottom: 8px;
  border-radius: 0;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════
   PC / モバイル アダプティブ UI
   ═══════════════════════════════════════ */

/* ─── PC (≥769px): 最大幅拡大 & 2カラムトップ ─── */
@media (min-width: 769px) {
  body {
    max-width: 780px;
  }

  .top-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
  }
}

/* ─── ハンバーガーボタン（デフォルト非表示） ─── */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0 0 0 12px;
}

/* ─── モバイル (≤768px) ─── */
@media (max-width: 768px) {
  body {
    line-height: 2.0;
    padding-bottom: 132px;
    overflow-x: hidden;
  }

  .app-shell,
  .page-wrapper {
    display: block;
    width: min(calc(100% - 24px), 720px);
    margin-inline: auto;
  }

  #sidebar-left,
  #sidebar-right,
  .left-sidebar,
  .right-sidebar {
    display: none;
  }

  #app,
  .main-column,
  .content-column {
    width: 100%;
    min-width: 0;
  }

  .top-layout,
  .top-col-left,
  .top-col-right {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .top-intro {
    gap: 12px;
    margin-bottom: 24px;
    padding-top: 14px;
  }

  .top-catch {
    font-size: 30px;
    line-height: 1.35;
  }

  .top-description-lines {
    font-size: 12px;
  }

  .top-step {
    min-height: 44px;
  }

  .mobile-top-discovery {
    border-top: 1px solid var(--rule);
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
  }

  .mobile-top-actions {
    display: grid;
    gap: 8px;
  }

  .mobile-panel-toggle,
  .mobile-panel-link {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 44px;
    text-align: left;
    width: 100%;
  }

  .mobile-panel-toggle[aria-expanded="true"] {
    border-color: var(--accent);
    color: var(--accent);
  }

  .mobile-below-fold-section {
    contain: content;
    content-visibility: auto;
    contain-intrinsic-size: 420px;
  }

  .search-card.mobile-below-fold-section,
  .mobile-below-fold-section.section {
    margin-top: 4px;
  }

  button,
  .button,
  .pill,
  .topic-open-btn,
  .nav-link,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  input,
  select,
  textarea,
  .field-row,
  .create-topic-form,
  .topic-tag-inputs {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  .field-row,
  .create-topic-form,
  .topic-tag-inputs {
    grid-template-columns: 1fr;
  }

  .mobile-more-row {
    display: block;
  }

  .mobile-define-cta {
    align-items: center;
    background: var(--ink);
    border: 1px solid var(--ink);
    color: var(--bg);
    display: flex;
    font-family: "BIZ UDPGothic", sans-serif;
    font-size: 14px;
    justify-content: center;
    letter-spacing: 0.08em;
    margin: 18px 0 12px;
    min-height: 50px;
    padding: 12px 18px;
    width: 100%;
  }

  .mobile-define-cta:hover {
    border-color: var(--accent);
    color: var(--bg);
  }

  .site-header {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 24px;
  }

  .logo {
    min-width: 0;
    white-space: nowrap;
  }

  .header-nav {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
    min-width: 0;
  }

  /* PC ナビを非表示にしてハンバーガーを表示 */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  /* モーダルをボトムシートに */
  #modal-overlay,
  .auth-modal-shell {
    align-items: flex-end;
    padding: 0;
  }

  #modal-content,
  .auth-modal {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 0;
    padding: 32px 20px 48px;
  }

  /* 編集・削除・通報ボタンを非表示（アクションシートで代替） */
  .entry-edit-btn,
  .entry-delete-btn,
  .report-button {
    display: none;
  }
}

@media (max-width: 600px) {
  .site-header .back-link[href="#top"] {
    display: none;
  }

  .site-header .logo {
    font-size: 20px;
  }
}

/* ─── モバイルメニュー ─── */
.mobile-menu-overlay {
  display: none;
  position: absolute;
  inset: 0;
  min-height: 100vh;
  background: var(--overlay-soft);
  pointer-events: auto;
  z-index: 199;
}

.mobile-menu-overlay.open {
  display: block;
}

.mobile-menu {
  position: absolute;
  top: 0;
  right: 0;
  width: 240px;
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--rule);
  padding: 32px 24px;
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
  pointer-events: auto;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.mobile-menu-link {
  color: var(--ink);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  line-height: 1.6;
}

.mobile-menu-link:hover {
  color: var(--accent);
}

.mobile-menu-close {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--rule);
  padding: 10px 0;
  cursor: pointer;
  background: none;
  width: 100%;
  text-align: center;
  letter-spacing: 0.05em;
  margin-top: 24px;
}

.mobile-menu-close:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ─── アクションシート ─── */
.action-sheet-overlay {
  display: none;
  position: absolute;
  inset: 0;
  min-height: 100vh;
  background: var(--overlay-soft);
  pointer-events: auto;
  z-index: 199;
}

.action-sheet-overlay.open {
  display: block;
}

.action-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding: 8px 16px 32px;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.2s ease;
  pointer-events: auto;
}

.action-sheet.open {
  transform: translateY(0);
}

.action-sheet-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 4px;
  border: 0;
  border-bottom: 0.5px solid var(--rule);
  background: none;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.action-sheet-item:last-child {
  border-bottom: 0;
}

.action-sheet-item.danger {
  color: var(--accent);
}

.action-sheet-item.cancel {
  color: var(--muted);
  font-size: 13px;
}

/* ═══════════════════════════════════════
   VKontakte風 3カラム PC レイアウト
   ═══════════════════════════════════════ */

/* ─── サイドバー: デフォルト非表示（モバイル）─── */
#sidebar-left,
#sidebar-right {
  display: none;
}

/* ─── 左サイドバー: ロゴ ─── */
.sidebar-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 10px 24px;
  text-decoration: none;
  color: var(--ink);
}

.sidebar-logo-mark {
  background: var(--accent);
  color: var(--bg);
  font-family: "Shippori Mincho", serif;
  font-size: 18px;
  font-weight: 600;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-family: "Shippori Mincho", serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

/* ─── 左サイドバー: ナビ ─── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 12px;
  color: var(--ink);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  line-height: 1.5;
}

.sidebar-nav-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

/* 実験的機能（β）はメインナビより一段控えめに */
.sidebar-nav-item-lab {
  color: var(--muted);
  font-size: 13px;
}

.mobile-menu-link-lab {
  color: var(--muted);
  font-size: 13px;
}

.theme-switch {
  border-top: 0.5px solid var(--rule);
  margin: 16px 0 0;
  padding: 14px 0 0;
}

.theme-switch-label {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.7;
  margin: 0 0 8px;
}

.theme-switch-options {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme-option {
  font-size: 11px;
  padding: 7px 6px;
  text-align: center;
  width: 100%;
}

.theme-option.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-switch.header {
  align-items: center;
  border-top: 0;
  display: flex;
  gap: 8px;
  margin: 0 0 0 4px;
  padding: 0;
}

.theme-switch.header .theme-switch-label {
  font-size: 10px;
  line-height: 1.5;
  margin: 0;
  white-space: nowrap;
}

.theme-switch.header .theme-switch-options {
  display: flex;
  gap: 4px;
  grid-template-columns: none;
}

.theme-switch.header .theme-option {
  min-height: 32px;
  padding: 5px 9px;
  width: auto;
}

.theme-switch.mobile {
  margin-top: 20px;
}

.theme-switch.mobile .theme-option {
  min-height: 44px;
}

@media (max-width: 768px) {
  .theme-switch.header {
    margin-left: 2px;
  }

  .theme-switch.header .theme-switch-label {
    display: none;
  }

  .theme-switch.header .theme-option {
    font-size: 11px;
    min-height: 36px;
    padding: 5px 8px;
  }
}

/* ─── 左サイドバー: 区切り・サブリンク ─── */
.sidebar-divider {
  height: 1px;
  background: var(--rule);
  margin: 14px 10px;
}

.sidebar-sub-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
}

.sidebar-sub-link {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 5px 2px;
  text-decoration: none;
  transition: color 0.1s;
}

.sidebar-sub-link:hover {
  color: var(--accent);
}

/* ─── 右サイドバー: ユーザーカード ─── */
.sidebar-user-card {
  border: 1px solid var(--rule);
  padding: 16px;
  margin-bottom: 20px;
}

.sidebar-user-name {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-link {
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  text-decoration: none;
}

.sidebar-user-link:hover {
  text-decoration: underline;
}

.sidebar-user-prompt {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.7;
  margin: 0 0 12px;
}

.sidebar-login-btn {
  width: 100%;
}

/* ─── 右サイドバー: トピックセクション ─── */
.sidebar-section {
  margin-bottom: 16px;
}

.sidebar-section-title {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  margin: 0 0 10px;
}

.sidebar-topic-list {
  display: flex;
  flex-direction: column;
}

.sidebar-topic-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 0.5px solid var(--rule);
  text-decoration: none;
  gap: 8px;
  transition: color 0.1s;
}

.sidebar-topic-row:last-child {
  border-bottom: 0;
}

.sidebar-topic-row:hover .sidebar-topic-name {
  color: var(--accent);
}

.sidebar-topic-name {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  transition: color 0.1s;
}

.sidebar-topic-meta {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  flex-shrink: 0;
}

.sidebar-all-link {
  display: block;
  margin-top: 10px;
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.sidebar-all-link:hover {
  text-decoration: underline;
}

.admin-seed-widget {
  margin-bottom: 24px;
}

.admin-seed-text {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.7;
}

.admin-seed-button {
  width: 100%;
}

.admin-seed-status {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.7;
}

.admin-alert-rank {
  color: var(--accent);
}

.admin-danger-button {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-auto-hidden-badge {
  color: var(--accent);
  font-weight: 700;
}

.admin-ban-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-ban-form .input {
  flex: 1 1 200px;
}

@media (max-width: 768px) {
  .admin-ban-form {
    flex-direction: column;
  }

  .admin-ban-form .input,
  .admin-ban-form button {
    width: 100%;
  }
}

.typing-page {
  gap: 24px;
}

.typing-game-area {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}

.typing-target {
  font-family: "Shippori Mincho", serif;
  line-height: 1.8;
  letter-spacing: 0.05em;
  border-left: 3px solid var(--accent);
  padding: 18px 20px 20px;
  margin-bottom: 24px;
  background: var(--paper-tint);
}

.typing-japanese-text {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.75;
}

.typing-romaji-guide {
  color: var(--muted);
  border-top: 1px solid var(--rule);
  font-family: ui-monospace, "BIZ UDPGothic", monospace;
  font-size: 18px;
  letter-spacing: 0.08em;
  line-height: 1.9;
  margin-top: 14px;
  overflow-wrap: anywhere;
  padding-top: 12px;
}

.typing-input {
  width: 100%;
  font-family: "Shippori Mincho", serif;
  font-size: 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--ink);
  padding: 8px 0;
  outline: none;
  color: var(--ink);
  margin-bottom: 8px;
}

.typing-input-feedback {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.8;
  margin-bottom: 18px;
  min-height: 1.8em;
  overflow-wrap: anywhere;
}

.typing-input:disabled {
  color: var(--muted);
  border-bottom-color: var(--rule);
}

.typing-status {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.typing-status strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
}

.typing-controls {
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}

.typing-btn {
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 10px 24px;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 14px;
  cursor: pointer;
  margin-right: 8px;
}

.typing-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--bg);
}

.typing-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.typing-btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 0.5px solid var(--rule);
  padding: 10px 24px;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 14px;
  cursor: pointer;
}

.typing-btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.typing-result {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  margin-top: 24px;
}

.typing-result-score {
  font-family: "Shippori Mincho", serif;
  font-size: 48px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.typing-result-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.typing-result-grid strong {
  color: var(--ink);
  font-weight: 500;
}

.typing-char-correct {
  color: var(--success);
}

.typing-char-wrong {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.typing-char-pending {
  color: var(--muted);
}

.typing-mobile-msg {
  display: none;
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  line-height: 1.8;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}

.games-page,
.mashup-page {
  gap: 24px;
}

.game-intro {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}

/* 実験的機能の注意書き（ゲームハブ・ビルダー・プレイ画面共通） */
.lab-notice {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lab-notice-title {
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.lab-notice-body {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}

.game-select-list {
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 0;
}

.game-select-item {
  border-bottom: 0.5px solid var(--rule);
  display: grid;
  gap: 6px;
  padding: 18px 0 16px;
  text-decoration: none;
}

.game-select-kicker,
.game-select-link,
.mashup-sub {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.7;
}

.game-select-title {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.game-select-body {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.8;
}

.game-select-item:hover .game-select-title,
.game-select-item:hover .game-select-link {
  color: var(--accent);
}

.game-hub-section,
.script-play-page {
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}

.game-section-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.game-section-title,
.public-game-title {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.6;
  margin: 0;
}

.public-game-list {
  border-top: 1px solid var(--rule);
  display: grid;
}

.public-game-card {
  align-items: baseline;
  border-bottom: 0.5px solid var(--rule);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 0 16px;
}

.public-game-card .game-select-link {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-align: right;
  white-space: nowrap;
}

.script-source-details {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  padding-top: 14px;
}

.script-source-details summary {
  cursor: pointer;
  margin-bottom: 10px;
}

.admin-game-list {
  border-top: 1px solid var(--rule);
  display: grid;
}

.admin-game-card {
  border-bottom: 0.5px solid var(--rule);
  display: grid;
  gap: 12px;
  padding: 14px 0 16px;
}

.admin-game-main {
  display: grid;
  gap: 10px;
}

.admin-game-script-preview {
  background: var(--paper-tint);
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.7;
  margin: 0;
  max-height: 160px;
  overflow: auto;
  padding: 8px 0 8px 12px;
  white-space: pre-wrap;
}

.admin-game-actions {
  justify-content: flex-start;
}

.mashup-prompt-panel,
.mashup-form,
.mashup-history-section {
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}

.mashup-difficulty {
  color: var(--muted);
  display: inline-block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
}

.mashup-difficulty.hard {
  color: var(--accent);
}

.mashup-prompt {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: "Shippori Mincho", serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.4;
  margin: 0 0 8px;
}

.mashup-cross {
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 16px;
  letter-spacing: 0.1em;
}

.mashup-hint-box,
.mashup-example-box {
  border-left: 3px solid var(--accent);
  margin-top: 16px;
  padding: 0 0 0 14px;
}

.mashup-hint-box p,
.mashup-example-box p {
  color: var(--ink);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  line-height: 1.9;
  margin: 0;
}

.mashup-answer-input {
  min-height: 88px;
  resize: vertical;
}

.mashup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mashup-history-head {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.mashup-history-list {
  display: grid;
}

.mashup-history-item {
  border-bottom: 0.5px solid var(--rule);
  padding: 12px 0;
}

.mashup-history-answer {
  font-family: "Shippori Mincho", serif;
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
  overflow-wrap: anywhere;
}

.script-builder-page {
  gap: 22px;
}

.builder-tabs {
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 0;
  margin-bottom: 4px;
}

.builder-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 10px 20px;
}

.builder-tab.active {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.builder-tab-panel,
.builder-code-layout {
  display: grid;
  gap: 18px;
}

.builder-block {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

.builder-block-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.builder-field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 180px);
}

.builder-field-grid label,
.sprite-builder-row label {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.7;
}

.builder-inline-input {
  align-items: baseline;
  display: flex;
  gap: 8px;
}

.sprite-builder-row,
.action-row {
  align-items: center;
  border-bottom: 0.5px solid var(--rule);
  display: flex;
  gap: 8px;
  padding: 8px 0;
}

.sprite-name-input {
  min-width: 160px;
}

.emoji-picker-wrap {
  position: relative;
}

.emoji-select-btn {
  font-size: 22px;
  min-width: 48px;
  padding: 4px 8px;
}

.emoji-picker-grid {
  background: var(--bg);
  border: 0.5px solid var(--rule);
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(8, 1fr);
  left: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 4px);
  width: 248px;
  z-index: 10;
}

.emoji-picker-item {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  min-height: 36px;
  padding: 4px;
}

.emoji-picker-item:hover {
  background: var(--paper-tint-strong);
}

.action-type-select {
  flex: 1 1 210px;
}

.script-action-target {
  flex: 0 1 150px;
}

.script-action-value {
  flex: 0 1 96px;
}

.script-action-text {
  flex: 1 1 220px;
}

.remove-sprite-btn,
.remove-action-btn {
  border: none;
  color: var(--muted);
  min-width: 36px;
  padding: 4px;
}

.generated-script-preview,
#generated-script-preview {
  background: var(--ink);
  color: var(--bg);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  max-height: 220px;
  overflow-y: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.script-code-textarea {
  font-family: "SFMono-Regular", Consolas, monospace;
  min-height: 360px;
  white-space: pre;
}

.script-cheatsheet {
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}

.cheatsheet-title {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.script-cheatsheet table {
  border-collapse: collapse;
  width: 100%;
}

.script-cheatsheet td {
  border-bottom: 0.5px solid var(--rule);
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.7;
  padding: 6px 0;
  vertical-align: top;
}

.script-cheatsheet code {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.script-builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.script-preview-panel {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

.script-game-preview {
  border: 0.5px solid var(--rule);
  min-height: 260px;
  padding: 12px;
}

.script-game-head {
  align-items: baseline;
  border-bottom: 0.5px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.script-game-stage {
  background: var(--paper-tint);
  border: 0.5px solid var(--rule);
  height: 260px;
  overflow: hidden;
  position: relative;
}

.script-game-sprite {
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--rule);
  display: flex;
  font-size: 30px;
  height: 52px;
  justify-content: center;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 52px;
}

.script-game-sprite:hover:not(:disabled) {
  border-color: var(--accent);
}

.script-game-message {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  line-height: 1.8;
  margin: 10px 0 0;
}

.tsukkomi-page {
  gap: 24px;
}

.tsukkomi-intro {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}

.tsukkomi-controls {
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}

.tsukkomi-search {
  margin-bottom: 14px;
}

.tsukkomi-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tsukkomi-chip {
  border: 0.5px solid var(--rule);
  color: var(--muted);
  min-height: 34px;
}

.tsukkomi-chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.tsukkomi-meta {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  display: flex;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  gap: 16px;
  justify-content: space-between;
  letter-spacing: 0.05em;
  padding-top: 12px;
  margin-bottom: 8px;
}

.tsukkomi-list {
  display: grid;
  gap: 0;
}

.tsukkomi-card {
  border-bottom: 0.5px solid var(--rule);
  padding: 16px 0 14px;
}

.tsukkomi-card-main {
  border: 0;
  color: var(--ink);
  display: block;
  font-family: "Shippori Mincho", serif;
  padding: 0;
  text-align: left;
  width: 100%;
}

.tsukkomi-card-main:hover:not(:disabled) {
  color: var(--ink);
}

.tsukkomi-card-head {
  align-items: baseline;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr;
  margin-bottom: 8px;
}

.tsukkomi-category-mark {
  border-left: 3px solid var(--accent);
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1;
  padding: 2px 0 2px 8px;
}

.tsukkomi-title {
  display: block;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.tsukkomi-category {
  color: var(--muted);
  display: block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
}

.tsukkomi-oneliner,
.tsukkomi-detail {
  display: block;
  overflow-wrap: anywhere;
}

.tsukkomi-oneliner {
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 6px;
}

.tsukkomi-detail {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.9;
  margin-top: 10px;
}

.tsukkomi-toggle {
  color: var(--muted);
  display: inline-block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-top: 8px;
}

.tsukkomi-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tsukkomi-reaction-btn {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-height: 34px;
  position: relative;
}

.tsukkomi-reaction-btn.is-top {
  border-color: var(--accent);
  color: var(--accent);
}

.tsukkomi-reaction-btn.is-pressed {
  border-color: var(--ink);
  color: var(--ink);
}

.tsukkomi-reaction-btn.has-reacted {
  border-color: var(--accent);
  color: var(--accent);
}

.tsukkomi-reaction-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.tsukkomi-reaction-btn.has-reacted:disabled {
  opacity: 1;
}

.tsukkomi-reaction-count {
  color: inherit;
  font-weight: 500;
}

.tsukkomi-float-plus {
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  font-weight: 500;
  position: absolute;
  right: 8px;
  top: -12px;
  animation: tsukkomiFloatUp 0.8s ease forwards;
  pointer-events: none;
}

.tsukkomi-highlight {
  background: var(--paper-tint-strong);
  color: var(--ink);
  padding: 0 2px;
}

.tsukkomi-reset-row {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

@keyframes tsukkomiFloatUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-16px);
  }
}

.daily-topic-section {
  margin-top: 0;
}

.daily-topic-card {
  display: block;
}

.daily-current-label,
.daily-prompt {
  display: block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 14px 0 8px;
}

.daily-votes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  margin: 0 0 16px;
}

.daily-definition-form {
  border-top: 0.5px solid var(--rule);
  margin-top: 16px;
  padding-top: 14px;
}

.daily-already-posted {
  border-top: 0.5px solid var(--rule);
  margin-top: 16px;
  padding-top: 14px;
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.8;
}

.daily-topic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.already-posted-card {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.8;
}

.already-posted-notice {
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 16px;
  padding: 12px 16px;
}

.already-posted-edit-link {
  width: fit-content;
}

.entry-edit-btn.is-owner-edit {
  color: var(--accent);
  font-weight: 600;
}

.entry-edit-btn.is-owner-edit:hover {
  color: var(--accent);
}

.form-error {
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.6;
}

.ranking-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  margin-bottom: 16px;
}

.ranking-tab {
  color: var(--muted);
  border: 0.5px solid var(--rule);
  padding: 6px 14px;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.1s, border-color 0.1s;
}

.ranking-tab:hover,
.ranking-tab.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.ranking-tab.is-active::before {
  content: "● ";
  font-size: 9px;
}

.ranking-note {
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  line-height: 1.7;
  margin: -4px 0 14px;
}

/* 墨色でもトップ導線は紙色と同じ紙面構造に揃える */
html[data-theme="dark"] .top-layout,
html[data-theme="dark"] .daily-topic-section,
html[data-theme="dark"] .daily-topic-card,
html[data-theme="dark"] .daily-definition-form,
html[data-theme="dark"] .daily-already-posted,
html[data-theme="dark"] .search-card,
html[data-theme="dark"] .section,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .submit-card,
html[data-theme="dark"] .comment-form,
html[data-theme="dark"] .current-definition {
  background: transparent;
  box-shadow: none;
  outline: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .typing-game-area {
    display: none;
  }

  .typing-mobile-msg {
    display: block;
  }

  .daily-topic-actions,
  .daily-definition-form .field-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ranking-tabs {
    gap: 6px;
  }

  .ranking-tab {
    flex: 1;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .game-select-item {
    min-height: 44px;
  }

  .game-section-head,
  .public-game-card {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .public-game-card .game-select-link {
    min-height: 44px;
    text-align: left;
  }

  .admin-game-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-game-actions .button {
    width: 100%;
  }

  .mashup-prompt {
    font-size: 26px;
  }

  .mashup-actions,
  .post-share-actions,
  .mashup-history-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mashup-actions .button,
  .post-share-actions .button,
  .mashup-history-head .button {
    min-height: 44px;
    width: 100%;
  }

  .builder-tabs,
  .builder-block-head,
  .sprite-builder-row,
  .action-row,
  .script-builder-actions {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .builder-tab {
    text-align: left;
  }

  .builder-field-grid {
    grid-template-columns: 1fr;
  }

  .sprite-name-input,
  .action-type-select,
  .script-action-target,
  .script-action-value,
  .script-action-text,
  .script-builder-actions .button {
    width: 100%;
  }

  .emoji-picker-grid {
    grid-template-columns: repeat(6, 1fr);
    position: static;
    width: 100%;
  }

  .script-game-stage {
    height: 220px;
  }

  .tsukkomi-category-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tsukkomi-chip,
  .tsukkomi-reaction-btn {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 44px;
  }

  .tsukkomi-reactions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .tsukkomi-reaction-btn {
    padding: 8px 4px;
  }

  .tsukkomi-title {
    font-size: 18px;
  }

  .tsukkomi-oneliner {
    font-size: 15px;
    line-height: 1.7;
  }
}

@media (min-width: 769px) {
  html[data-theme="dark"] .sidebar-logo {
    border-bottom-color: var(--rule);
    color: var(--ink);
  }

  html[data-theme="dark"] .sidebar-nav-item {
    color: #d0bea0;
  }

  html[data-theme="dark"] .sidebar-nav-item:hover {
    background: var(--paper-tint);
    border-left-color: var(--rule);
    color: var(--ink);
  }

  html[data-theme="dark"] .sidebar-nav-item.active {
    background: var(--paper-tint);
    color: var(--accent);
  }

  html[data-theme="dark"] .sidebar-widget {
    background: rgba(33, 25, 17, 0.68);
    border-color: rgba(74, 57, 39, 0.72);
  }

  html[data-theme="dark"] .sidebar-widget-title,
  html[data-theme="dark"] .sidebar-widget-item {
    border-color: var(--rule-soft);
  }

  .typing-mobile-msg {
    display: none;
  }

  .top-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .top-step {
    border-bottom: 0;
    border-right: 0.5px solid var(--rule);
    padding-right: 12px;
  }

  .top-step:last-child {
    border-right: 0;
  }
}

/* ─── PC: VK 3カラムレイアウト（前の769pxルールをすべて上書き）─── */
@media (min-width: 769px) {
  /* body リセット */
  body {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  /* 3カラムグリッド */
  .app-shell,
  .page-wrapper {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 260px;
    gap: 28px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px;
    align-items: start;
  }

  /* 左サイドバー */
  #sidebar-left,
  .left-sidebar {
    display: block;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-right: 1px solid var(--rule);
    padding-right: 8px;
  }

  /* 右サイドバー */
  #sidebar-right,
  .right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-left: 1px solid var(--rule);
    padding-left: 16px;
  }

  /* メインコンテンツ */
  #app {
    padding: 0 4px 64px;
    min-width: 0;
  }

  /* ヘッダー非表示（左サイドバーがナビを担う）*/
  .site-header {
    display: none;
  }

  /* 2カラムトップを解除 → 中央列は1カラム */
  .top-layout {
    display: block;
  }

  /* 人気トピックを中央列から非表示（右サイドバーに移動）*/
  .popular-topics-section {
    display: none;
  }

  /* ─── 左サイドバー: ロゴエリア ─── */
  .sidebar-logo {
    font-family: "Shippori Mincho", serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 2px solid var(--ink);
    padding-bottom: 12px;
    margin-bottom: 20px;
    padding-top: 4px;
    text-decoration: none;
    display: block;
  }

  /* ─── 左サイドバー: メニュー項目を border-left スタイルに ─── */
  .sidebar-nav-item {
    border-radius: 0;
    border-left: 3px solid transparent;
    transition: border-color 0.1s, background 0.1s;
    color: var(--ink);
  }

  .sidebar-nav-item:hover {
    border-left-color: var(--rule);
    background: var(--paper-tint-strong);
    color: var(--ink);
  }

  .sidebar-nav-item.active {
    border-left-color: var(--accent);
    background: transparent;
    color: var(--accent);
    font-weight: 500;
  }

  /* ─── 右サイドバー: ウィジェットブロック ─── */
  .sidebar-widget {
    border: 0.5px solid var(--rule);
    padding: 16px;
    background: var(--paper-tint);
  }

  .sidebar-widget-title {
    font-family: "BIZ UDPGothic", sans-serif;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--muted);
    border-bottom: 0.5px solid var(--rule);
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-weight: 400;
  }

  .sidebar-widget-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 0.5px solid var(--rule);
    text-decoration: none;
    gap: 8px;
    transition: color 0.1s;
  }

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

  .sidebar-widget-item:hover .sidebar-widget-item-name {
    color: var(--accent);
  }

  .sidebar-widget-item-name {
    font-family: "Shippori Mincho", serif;
    font-size: 13px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    transition: color 0.1s;
  }

  .sidebar-widget-item-meta {
    font-family: "BIZ UDPGothic", sans-serif;
    font-size: 11px;
    color: var(--muted);
    flex-shrink: 0;
  }

  /* ─── 右サイドバー: ログインウィジェット ─── */
  .sidebar-login-widget {
    border: 0.5px solid var(--rule);
    padding: 16px;
    background: var(--paper-tint);
    text-align: center;
  }

  .sidebar-login-text {
    font-family: "BIZ UDPGothic", sans-serif;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
    line-height: 1.7;
  }

  .sidebar-login-btn {
    background: var(--ink);
    color: var(--bg);
    border: none;
    padding: 8px 20px;
    font-family: "BIZ UDPGothic", sans-serif;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    letter-spacing: 0.05em;
    transition: background 0.1s;
  }

  .sidebar-login-btn:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
  }
}
    
/* ─── トピックページ: ヒントパネル（PC版のみ）─── */
@media (min-width: 769px) {
  .topic-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: start;
  }

  .hint-panel {
    position: sticky;
    top: 24px;
    border-right: 1px solid var(--rule);
    padding-right: 24px;
  }

  .hint-section {
    margin-bottom: 20px;
  }

  .hint-section-label {
    font-family: "BIZ UDPGothic", sans-serif;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 0.5px solid var(--rule);
  }

  .hint-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hint-list li {
    font-family: "BIZ UDPGothic", sans-serif;
    font-size: 12px;
    color: var(--ink);
    line-height: 1.6;
    padding-left: 12px;
    position: relative;
  }

  .hint-list li::before {
    content: "·";
    position: absolute;
    left: 0;
    color: var(--accent);
  }

  .hint-refresh {
    font-family: "BIZ UDPGothic", sans-serif;
    font-size: 11px;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .hint-refresh:hover {
    color: var(--accent);
  }

  .hint-divider {
    border-top: 0.5px solid var(--rule);
    margin-bottom: 20px;
  }
}

/* モバイルではヒントパネルを非表示 */
@media (max-width: 768px) {
  .hint-panel {
    display: none;
  }
}

/* ─── モバイル操作密度の最適化 ─── */
@media (max-width: 768px) {
  .vote-row.vote-buttons {
    display: flex;
    gap: 6px;
    grid-template-columns: none;
    margin-top: 8px;
    width: 100%;
  }

  .vote-row.vote-buttons .vote-button {
    align-items: center;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
    min-width: 0;
    padding: 6px 4px;
    text-align: center;
    width: auto;
  }

  .vote-label {
    display: block;
    font-size: 10px;
  }

  .vote-count {
    display: block;
    font-size: 13px;
    font-variant-numeric: oldstyle-nums;
    font-weight: 500;
  }

  .vote-buttons .entry-image-btn {
    flex-basis: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .entry-meta-detail {
    display: none;
  }

  .share-toggle {
    align-items: center;
    background: transparent;
    border: 0.5px solid var(--rule);
    color: var(--muted);
    display: inline-flex;
    font-family: "BIZ UDPGothic", sans-serif;
    font-size: 12px;
    justify-content: center;
    padding: 6px 12px;
    width: auto;
  }

  .share-buttons {
    display: none;
  }

  .share-buttons.open {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
  }

  .share-buttons .share-button {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }

  .current-definition .definition-text {
    font-size: 18px;
    line-height: 1.7;
  }

  .entry-text {
    font-size: 15px;
    line-height: 1.6;
  }

  button,
  .nav-link,
  .topic-open-btn,
  .author-link {
    align-items: center;
    min-height: 44px;
  }

  .nav-link,
  .topic-open-btn,
  .author-link {
    display: inline-flex;
  }
}

/* ─── クイズメーカー ─── */
.quiz-page-head {
  align-items: flex-start;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding-top: 20px;
}

.quiz-list,
.quiz-topic-results,
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-card {
  border-bottom: 0.5px solid var(--rule);
  padding: 14px 0 16px;
}

.quiz-card-title {
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.7;
  margin: 0 0 6px;
}

.quiz-create-panel {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}

.quiz-topic-choice {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
  text-align: left;
  width: 100%;
}

.quiz-topic-choice.is-selected {
  border-color: var(--accent);
  color: var(--accent);
}

.quiz-real-definition {
  border-left: 3px solid var(--accent);
  margin: 18px 0 24px;
  padding: 10px 0 10px 16px;
}

.quiz-decoy-form {
  border-top: 0.5px solid var(--rule);
  padding-top: 18px;
}

.quiz-question {
  border-left: 3px solid var(--accent);
  font-family: "Shippori Mincho", serif;
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: 24px;
  padding: 12px 20px;
}

.quiz-option {
  background: transparent;
  border: 0.5px solid var(--rule);
  color: var(--ink);
  cursor: pointer;
  display: block;
  font-family: "Shippori Mincho", serif;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 10px;
  min-height: 44px;
  padding: 14px 18px;
  text-align: left;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
  width: 100%;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--ink);
}

.quiz-option.correct {
  background: rgba(45, 106, 79, 0.06);
  border-color: var(--success);
  color: var(--success);
}

.quiz-option.incorrect {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.quiz-option:disabled {
  opacity: 1;
}

.quiz-label {
  font-family: "BIZ UDPGothic", sans-serif;
  font-weight: 500;
  margin-right: 8px;
}

.quiz-badge-hard {
  border: 0.5px solid var(--accent);
  color: var(--accent);
  display: inline-block;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-left: 8px;
  padding: 1px 6px;
  vertical-align: middle;
}

.quiz-result {
  border-top: 1px solid var(--rule);
  margin-top: 18px;
  padding-top: 18px;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-report-link {
  border: none;
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  padding: 0;
  text-decoration: underline;
}

.quiz-report-link:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .quiz-page-head {
    flex-direction: column;
    gap: 12px;
  }

  .quiz-page-head .button,
  .quiz-actions .button,
  .quiz-decoy-form .button {
    justify-content: center;
    width: 100%;
  }

  .quiz-topic-choice {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .quiz-question {
    font-size: 18px;
    line-height: 1.7;
    padding: 10px 14px;
  }

  .quiz-option {
    font-size: 15px;
    padding: 14px;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .top-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-step {
    border-bottom: 0.5px solid var(--rule);
    border-right: 0;
    padding-right: 0;
  }

  .top-step:nth-child(odd):not(:last-child) {
    border-right: 0.5px solid var(--rule);
    padding-right: 14px;
  }

  .top-step:last-child {
    border-bottom: 0;
    grid-column: 1 / -1;
  }
}

/* ─── トップページ「読み物」レイアウト ─── */
.reading-top {
  margin-top: 8px;
}

.reading-entry {
  display: block;
  border-left: 3px solid var(--rule);
  padding: 16px 20px;
  margin-bottom: 28px;
  text-decoration: none;
}

.reading-entry:last-child {
  margin-bottom: 0;
}

.reading-entry-topic {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.reading-entry-text {
  font-family: "Shippori Mincho", serif;
  font-size: 19px;
  line-height: 1.9;
  color: var(--ink);
  margin: 0 0 10px;
}

.reading-entry-author {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

a.reading-entry:hover .reading-entry-text {
  color: var(--accent);
}

.reading-entry-list {
  margin-bottom: 14px;
}

/* 「今日の一行」は特別扱い */
.today-entry {
  border-left-color: var(--accent);
  padding: 20px 24px;
  margin-bottom: 32px;
}

.today-entry .reading-entry-text {
  font-size: 24px;
  line-height: 1.8;
}

/* トップページのアクションボタン */
.reading-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.reading-action-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 10px 20px;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.reading-action-primary:hover {
  background: var(--accent);
  color: var(--bg);
}

.reading-action-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muted);
  border: 0.5px solid var(--rule);
  padding: 10px 20px;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.reading-action-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ─── 「遊んでみる」セクション ─── */
.play-item {
  display: block;
  border-bottom: 0.5px solid var(--rule);
  padding: 14px 0;
  cursor: pointer;
  text-decoration: none;
}

.play-item-title {
  font-family: "Shippori Mincho", serif;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 3px;
}

.play-item-desc {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  color: var(--muted);
}

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

/* ─── 「言葉をさがす」セクション ─── */
.category-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 12px 0;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
}

.category-link-label {
  color: var(--muted);
}

.category-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 0.5px solid var(--rule);
  padding: 4px 0;
}

.category-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.find-topic-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 16px;
}

/* ─── クイズ一覧のランダムクイズ導線 ─── */
.auto-quiz-cta {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.auto-quiz-cta .meta {
  margin: 0;
}

/* ─── モバイル ─── */
@media (max-width: 768px) {
  .today-entry .reading-entry-text {
    font-size: 20px;
  }

  .reading-entry-text {
    font-size: 17px;
  }

  .reading-actions {
    flex-direction: column;
  }

  .reading-action-primary,
  .reading-action-ghost {
    width: 100%;
    min-height: 44px;
  }

  .play-item {
    min-height: 44px;
  }

  .category-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .find-topic-lists {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .auto-quiz-cta .reading-action-primary {
    width: 100%;
    min-height: 44px;
  }
}

/* ─── 匿名投稿（ログインなし投稿）─── */
.entry-anonymous-mark {
  font-size: 10px;
  color: var(--muted);
  margin-left: 4px;
}

.anonymous-submit-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.anonymous-form-title {
  font-family: "Shippori Mincho", serif;
  font-size: 15px;
  color: var(--ink);
}

.anonymous-nickname-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.anonymous-nickname-field label {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  color: var(--muted);
}

.anonymous-nickname-field .input {
  max-width: 240px;
}

.anonymous-form-note {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
  border-top: 0.5px solid var(--rule);
  padding-top: 10px;
}

.anonymous-register-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.upgrade-benefit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upgrade-benefit-list li {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.7;
  padding-left: 14px;
  position: relative;
}

.upgrade-benefit-list li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--accent);
}

@media (max-width: 768px) {
  .anonymous-nickname-field .input {
    max-width: none;
  }

  .anonymous-submit-card .button,
  .anonymous-register-link {
    min-height: 44px;
  }

  .anonymous-register-link {
    display: inline-flex;
    align-items: center;
  }
}

/* ─── PC: トップページを3カラム構成に最適化（モバイルは変更しない）─── */
@media (min-width: 769px) {
  /* 「今日の一行」を主役として大きく見せる */
  .today-entry {
    padding: 28px 32px;
    margin-bottom: 40px;
  }

  .today-entry .reading-entry-text {
    font-size: 28px;
    line-height: 1.75;
  }

  /* 「よく読まれている定義」は2列グリッド。
     ただし中央列が狭いとき（1100px未満など）は定義文が細切れになるため自動で1列へ落とす */
  .featured-entries {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px 28px;
  }

  .featured-entries .reading-entry {
    margin-bottom: 0;
  }

  /* 「言葉をさがす」の検索窓とカテゴリを横並びにして縦幅を節約 */
  .search-section {
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }

  .search-section .search-input-area,
  .search-section .category-links {
    flex: 1;
    min-width: 0;
  }

  .search-section .category-link-row {
    margin-top: 0;
  }

  /* 「遊んでみる」はメインから外し、右サイドバーのウィジェットとして表示 */
  #app .play-section {
    display: none;
  }

  .right-sidebar .play-section {
    display: block;
    border: 0.5px solid var(--rule);
    border-top: 0.5px solid var(--rule);
    padding: 16px;
    background: var(--paper-tint);
  }

  .right-sidebar .play-section .section-heading {
    border-bottom: 0.5px solid var(--rule);
    padding-bottom: 8px;
    margin-bottom: 12px;
  }

  /* 墨色モードでは他のサイドバーウィジェットと同じ地色・罫線に揃える */
  html[data-theme="dark"] .right-sidebar .play-section {
    background: rgba(33, 25, 17, 0.68);
    border-color: rgba(74, 57, 39, 0.72);
  }

  html[data-theme="dark"] .right-sidebar .play-section .section-heading,
  html[data-theme="dark"] .right-sidebar .play-item {
    border-color: var(--rule-soft);
  }

  .right-sidebar .play-item {
    padding: 10px 0;
  }

  .right-sidebar .play-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .right-sidebar .play-item-title {
    font-size: 14px;
  }

  .right-sidebar .play-item-desc {
    font-size: 11px;
    line-height: 1.7;
  }
}

/* 第2弾シードデータ投入ボタン（主ボタンより一段控えめに） */
.admin-seed-button-secondary {
  margin-top: 12px;
}

/* ─── 一行ペディア ─── */
.pedia-section-note {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: -8px 0 14px;
}

.pedia-top {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
}

.pedia-rest-list {
  margin-top: 12px;
}

.pedia-item {
  padding: 12px 0;
}

.pedia-expand-btn {
  background: transparent;
  border: 0.5px solid var(--rule);
  color: var(--muted);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  padding: 8px 16px;
  cursor: pointer;
  margin-top: 12px;
  width: 100%;
  text-align: center;
  letter-spacing: 0.05em;
}

.pedia-expand-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.pedia-form-card {
  margin-top: 16px;
}

.pedia-form-title {
  font-family: "Shippori Mincho", serif;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
}

.pedia-form-note {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 8px;
}

/* 検索結果に添える一行ペディア1位 */
.topic-list-pedia {
  display: block;
  font-family: "Shippori Mincho", serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .pedia-expand-btn {
    min-height: 44px;
  }

  .pedia-vote-row {
    display: flex;
    gap: 6px;
    width: 100%;
  }
}

/* ─── 表示幅モード（左サイドバーで切り替え・localStorageに保存）───
   モバイルに影響させないため、幅の指定はすべてPC幅の中だけで行う */
@media (min-width: 769px) {
  .width-standard .app-shell,
  .width-standard .page-wrapper {
    max-width: 1180px;
    grid-template-columns: 200px minmax(0, 1fr) 260px;
    gap: 28px;
  }

  .width-wide .app-shell,
  .width-wide .page-wrapper {
    max-width: 1440px;
    grid-template-columns: 220px minmax(0, 1fr) 300px;
    gap: 36px;
  }

  .width-full .app-shell,
  .width-full .page-wrapper {
    max-width: none;
    width: calc(100% - 96px);
    grid-template-columns: 240px minmax(0, 1fr) 320px;
    gap: 40px;
  }
}

/* 広め・最大では、画面が十分広いときだけメインカラムの下限を確保する */
@media (min-width: 1400px) {
  .width-wide #app,
  .width-full #app {
    min-width: 560px;
  }
}

/* ─── トピックページ：ヒントの出し分け（表示幅モードに連動）───
   パネルを消したままだと .topic-layout の200px列が空くのでブロックに戻す */

/* 標準：メインを狭めないよう常に折りたたみにする */
@media (min-width: 769px) {
  .width-standard .hint-panel {
    display: none;
  }

  .width-standard .topic-layout {
    display: block;
  }

  .width-standard .topic-hint-collapsible {
    display: block;
  }
}

/* 広め・最大：画面幅が足りないうちは折りたたみ */
@media (min-width: 769px) and (max-width: 1399px) {
  .width-wide .hint-panel,
  .width-full .hint-panel {
    display: none;
  }

  .width-wide .topic-layout,
  .width-full .topic-layout {
    display: block;
  }

  .width-wide .topic-hint-collapsible,
  .width-full .topic-hint-collapsible {
    display: block;
  }
}

/* 広め・最大：1400px以上ならサイドのヒントパネルを出す */
@media (min-width: 1400px) {
  .width-wide .hint-panel,
  .width-full .hint-panel {
    display: block;
  }

  .width-wide .topic-layout,
  .width-full .topic-layout {
    display: grid;
  }

  .width-wide .topic-hint-collapsible,
  .width-full .topic-hint-collapsible {
    display: none;
  }
}

/* モバイルは従来どおりヒントを出さない（幅モードの指定はここまで届かない） */
@media (max-width: 768px) {
  .topic-hint-collapsible {
    display: none;
  }
}

/* ─── 折りたたみヒントの体裁 ─── */
.topic-hint-collapsible {
  border: 0.5px solid var(--rule);
  border-left: 3px solid var(--rule);
  margin-bottom: 16px;
}

.topic-hint-summary {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  padding: 10px 14px;
  cursor: pointer;
}

.topic-hint-summary:hover {
  color: var(--accent);
}

.topic-hint-collapsible[open] .topic-hint-summary {
  border-bottom: 0.5px solid var(--rule);
}

.topic-hint-body {
  padding: 14px 14px 4px;
}

.topic-hint-body .hint-section:last-child {
  margin-bottom: 10px;
}

/* ─── 本文の行長上限（PCのみ。広い画面で1行が伸びすぎるのを防ぐ）─── */
@media (min-width: 769px) {
  .reading-entry-text,
  .entry-text,
  .definition-text,
  .current-definition {
    max-width: 42em;
  }
}

/* 1400〜1799pxはヒント列を詰め、パネル復帰でメインが1280px時より狭くならないようにする */
@media (min-width: 1400px) and (max-width: 1799px) {
  .width-wide .topic-layout {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 24px;
  }

  .width-wide .hint-panel {
    padding-right: 16px;
  }
}

/* ─── 表示幅スイッチ（表示テーマと同じ体裁・3ボタン）─── */
.width-switch-options {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.width-switch .theme-option {
  padding: 7px 2px;
}

/* 表示幅はPCだけの設定なので、モバイル幅では出さない */
@media (max-width: 768px) {
  .width-switch {
    display: none;
  }
}
