:root {
  color-scheme: light;
  --canvas: #e9e5de;
  --surface: #f6f3ed;
  --surface-quiet: #eeebe4;
  --surface-deep: #e2ded6;
  --ink: #292b30;
  --muted: #686b70;
  --line: #d4cfc6;
  --accent: #71868d;
  --accent-dark: #4f666e;
  --accent-soft: #cbd5d6;
  --sage: #cbd2c6;
  --rose: #d7c6c8;
  --clay: #d8c9bc;
  --lavender: #cec9d6;
  --danger: #915f63;
  --shadow: 0 16px 42px rgba(52, 48, 43, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  word-break: keep-all;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:not(:disabled),
summary {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(79, 102, 110, 0.34);
  outline-offset: 3px;
}

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

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(95, 91, 84, 0.15);
  background: rgba(233, 229, 222, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  mix-blend-mode: multiply;
  object-fit: cover;
  transform: scale(1.35);
}

.page-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-deep);
}

.page-switch-button {
  min-width: 72px;
  padding: 8px 15px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease;
}

.page-switch-button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(52, 48, 43, 0.08);
}

.header-action,
.session-button,
.dialog-close-button,
.primary-button,
.ghost-button,
.text-button,
.plan-card-actions button,
.game-link-chip {
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 750;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.header-action {
  padding: 10px 15px;
  background: var(--accent-dark);
  color: #f7f4ee;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.session-button,
.dialog-close-button {
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-quiet);
  color: var(--ink);
  font-weight: 750;
}

.session-button:hover,
.dialog-close-button:hover {
  background: var(--surface);
}

.header-action:hover,
.primary-button:hover,
.play-button:hover {
  transform: translateY(-1px);
  background: #425a62;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 84px;
}

.page-view[hidden] {
  display: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
  margin-bottom: 22px;
}

.intro-panel,
.snapshot-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-panel {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(32px, 6vw, 66px);
  background: var(--accent-soft);
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.04em;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 6vw, 4.9rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.15;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.intro-copy,
.section-heading p,
.assignment-heading p {
  color: var(--muted);
}

.intro-copy {
  max-width: 650px;
  margin-bottom: 0;
  font-size: 1.02rem;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary-button,
.ghost-button {
  min-height: 44px;
  padding: 10px 17px;
}

.primary-button {
  background: var(--accent-dark);
  color: #f8f5ef;
}

.ghost-button {
  border-color: rgba(79, 102, 110, 0.32);
  background: rgba(246, 243, 237, 0.64);
}

.ghost-button:hover {
  background: var(--surface);
}

.snapshot-panel {
  padding: 30px;
}

.panel-heading,
.section-heading,
.section-subheading,
.dialog-heading,
.assignment-heading,
.session-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.stat-card {
  display: flex;
  min-height: 106px;
  flex-direction: column;
  justify-content: center;
  padding: 19px;
  border: 1px solid rgba(70, 68, 63, 0.1);
  border-radius: 14px;
  background: var(--sage);
}

.stat-card:nth-child(2) {
  background: var(--clay);
}

.stat-card:nth-child(3) {
  background: var(--rose);
}

.stat-card:nth-child(4) {
  background: var(--lavender);
}

.stat-card strong {
  font-size: 2rem;
  line-height: 1;
}

.stat-card span {
  margin-top: 9px;
  color: #575a5e;
  font-size: 0.86rem;
  font-weight: 700;
}

.next-plan-card {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-quiet);
}

.next-plan-card small,
.game-kicker,
.plan-date {
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.next-plan-card .text-button {
  justify-self: start;
  margin-top: 6px;
}

.content-panel {
  margin-top: 22px;
  padding: clamp(24px, 4vw, 38px);
}

.section-heading {
  align-items: flex-end;
  margin-bottom: 24px;
}

.section-heading:has(.list-controls) {
  flex-wrap: wrap;
}

.section-heading p {
  margin-bottom: 0;
}

.search-field input,
.select-field select,
.form-field input,
.form-field select,
.form-field textarea,
.assignment-row select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf9f5;
  color: var(--ink);
}

.search-field {
  width: min(260px, 100%);
}

.list-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-controls .select-field {
  width: 160px;
  min-width: 160px;
}

.select-field select {
  padding: 9px 34px 9px 12px;
}

.search-field input {
  padding: 9px 13px;
}

.game-list,
.member-grid,
.plan-list {
  display: grid;
  gap: 12px;
}

.game-card,
.member-card {
  scroll-margin-top: 92px;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #faf8f3;
}

.game-card[open],
.member-card[open] {
  border-color: #b9c4c4;
}

summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.game-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 98px;
  padding: 14px 18px;
}

.game-summary:hover,
.member-summary:hover {
  background: var(--surface-quiet);
}

.game-title-block {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.game-title {
  overflow: hidden;
  font-size: 1.13rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-title-row,
.game-rating-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.game-title-row {
  min-width: 0;
  gap: 7px 12px;
}

.game-rating-summary {
  gap: 5px;
  color: var(--muted);
}

.game-rating-summary > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--surface-quiet);
  font-size: 0.72rem;
  white-space: nowrap;
}

.game-rating-summary small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 650;
}

.game-rating-summary strong {
  color: #806d4d;
}

.game-rating-summary .game-review-count {
  background: transparent;
  font-weight: 700;
}

.game-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.toggle-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.toggle-label .when-open {
  display: none;
}

details[open] > summary .toggle-label .when-closed {
  display: none;
}

details[open] > summary .toggle-label .when-open {
  display: inline;
}

.game-body,
.member-body {
  display: grid !important;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease;
}

details.is-closed > .game-body,
details.is-closed > .member-body {
  display: none !important;
}

details[open]:not(.is-closing) > .game-body,
details[open]:not(.is-closing) > .member-body {
  grid-template-rows: 1fr;
  opacity: 1;
}

details[open].is-opening > .game-body,
details[open].is-opening > .member-body {
  grid-template-rows: 0fr;
  opacity: 0;
}

.game-body-inner,
.member-body-inner {
  min-height: 0;
  overflow: hidden;
}

.game-body-inner {
  padding: 12px 20px 20px;
}

.story-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-radius: 13px;
  background: var(--accent-soft);
}

.story-card p {
  max-width: 760px;
  margin-bottom: 7px;
  color: #4f5558;
}

.story-card a {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 750;
  text-underline-offset: 3px;
}

.text-button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-color: rgba(79, 102, 110, 0.35);
  background: rgba(246, 243, 237, 0.66);
  color: var(--accent-dark);
}

.text-button:hover {
  background: var(--surface);
}

.record-note {
  margin: 12px 0 0;
  padding: 11px 14px;
  border-left: 3px solid #a77d7f;
  border-radius: 7px;
  background: #eee3e1;
  color: #68585a;
  font-size: 0.87rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  margin-top: 18px;
}

.detail-section {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.game-review-section {
  margin-top: 18px;
}

.section-subheading {
  margin-bottom: 14px;
}

.section-subheading h3 {
  margin-bottom: 0;
}

.section-subheading span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.role-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-card,
.unplayed-chip,
.meta-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-quiet);
}

.role-card {
  padding: 8px 10px;
  font-size: 0.86rem;
  font-weight: 700;
}

.play-history {
  display: grid;
  gap: 9px;
}

.history-session {
  padding: 14px;
  border-radius: 10px;
  background: var(--surface-quiet);
}

.session-heading {
  margin-bottom: 10px;
  font-size: 0.83rem;
}

.session-heading span {
  color: var(--muted);
}

.cast-grid,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cast-chip {
  display: inline-flex;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f8f5ef;
  font-size: 0.78rem;
}

.cast-chip span {
  color: var(--muted);
}

.unplayed-area,
.unplayed-games {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.unplayed-area p,
.unplayed-games p {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.81rem;
  font-weight: 700;
}

.unplayed-chip,
.meta-pill {
  padding: 5px 8px;
  color: #5e6165;
  font-size: 0.77rem;
}

.empty-state,
.empty-inline {
  color: var(--muted);
}

.empty-state {
  padding: 42px 24px;
  border: 1px dashed #bdb7ad;
  border-radius: 13px;
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.empty-state p {
  margin: 5px 0 16px;
}

.empty-inline {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-quiet);
  font-size: 0.86rem;
}

.member-hero {
  padding: clamp(36px, 7vw, 72px);
  background: var(--lavender);
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.member-grid {
  grid-template-columns: 1fr;
}

.member-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 16px;
}

.member-copy {
  display: grid;
  gap: 2px;
}

.member-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

.member-body-inner {
  padding: 12px 16px 16px;
}

.member-history-list {
  display: grid;
  gap: 7px;
}

.member-game-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #e9edf0;
}

.member-game-row strong {
  font-size: 0.88rem;
}

.member-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.game-link-chip {
  padding: 7px 9px;
  border-color: var(--line);
  background: var(--surface-quiet);
  font-size: 0.78rem;
}

.game-link-chip:hover {
  background: var(--accent-soft);
}

.plan-hero,
.review-hero {
  background: var(--sage);
}

.review-hero {
  background: var(--rose);
}

.page-hero {
  display: flex;
  width: 100%;
  height: 390px;
  min-height: 390px;
  margin-top: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(32px, 6vw, 66px);
}

.count-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-deep);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.plan-card {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.25fr);
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf8f3;
}

.plan-card h3 {
  margin: 5px 0;
  font-size: 1.2rem;
}

.plan-note {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.plan-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.plan-card-actions button {
  padding: 7px 10px;
  border-color: var(--line);
  background: var(--surface-quiet);
  font-size: 0.8rem;
}

.plan-card-actions .play-button {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #f8f5ef;
}

.plan-card-actions .delete-button {
  color: var(--danger);
}

.plan-assignments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.plan-assignment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--surface-quiet);
  font-size: 0.82rem;
}

.plan-assignment span {
  color: var(--muted);
}

.plan-dialog,
.login-dialog,
.review-dialog,
.record-dialog {
  width: min(760px, calc(100% - 30px));
  max-height: min(850px, calc(100dvh - 30px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(30, 29, 27, 0.28);
}

.plan-dialog::backdrop,
.login-dialog::backdrop,
.review-dialog::backdrop,
.record-dialog::backdrop {
  background: rgba(37, 36, 34, 0.52);
}

.plan-dialog form,
.login-dialog form,
.review-dialog form,
.record-dialog form {
  padding: 28px;
}

.login-dialog {
  width: min(480px, calc(100% - 30px));
}

.review-dialog {
  width: min(650px, calc(100% - 30px));
}

.dialog-copy {
  margin: -10px 0 20px;
  color: var(--muted);
}

.dialog-heading {
  margin-bottom: 22px;
}

.dialog-heading h2 {
  margin-bottom: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #51545a;
  font-size: 0.86rem;
  font-weight: 750;
}

.form-field[hidden] {
  display: none;
}

.form-field small {
  color: var(--muted);
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea,
.assignment-row select {
  padding: 9px 11px;
}

.form-field textarea {
  resize: vertical;
}

.rating-field {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.rating-field legend {
  margin-bottom: 8px;
  color: #51545a;
  font-size: 0.86rem;
  font-weight: 750;
}

.rating-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rating-inputs label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.rating-inputs input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-quiet);
  color: var(--ink);
}

.spoiler-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-quiet);
  cursor: pointer;
}

.spoiler-option input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--accent-dark);
}

.spoiler-option span {
  display: grid;
  gap: 2px;
}

.spoiler-option small,
.spoiler-hidden {
  color: var(--muted);
}

.review-list,
.review-group,
.review-cards {
  display: grid;
  gap: 12px;
}

.review-group {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf8f3;
}

.review-group-heading,
.review-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.review-group-heading h3,
.review-card p {
  margin-bottom: 0;
}

.review-group-summary {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.review-count {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.review-average-grid,
.review-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-average-grid {
  gap: 5px;
}

.review-average-grid span,
.review-score {
  display: grid;
  gap: 2px;
}

.review-average-grid span {
  min-width: 74px;
  padding: 5px 7px;
  border-radius: 7px;
  background: var(--surface-quiet);
  text-align: center;
}

.review-average-grid small,
.review-score small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.review-average-grid strong,
.review-score strong {
  color: #806d4d;
  font-size: 0.82rem;
}

.review-score-grid {
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--surface);
}

.review-score {
  padding: 8px 10px;
  text-align: center;
}

.review-score + .review-score {
  border-left: 1px solid var(--line);
}

.review-spoiler-badge {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--rose);
  color: var(--danger);
  font-size: 0.7rem;
  font-weight: 800;
}

.spoiler-hidden {
  font-style: italic;
}

.review-card {
  padding: 14px;
  border-radius: 10px;
  background: var(--surface-quiet);
}

.review-card-heading {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.8rem;
}

.review-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.review-card-meta,
.reaction-buttons {
  display: inline-flex;
  align-items: center;
}

.review-card-meta {
  flex-wrap: wrap;
  gap: 8px;
}

.reaction-buttons {
  gap: 2px;
}

.reaction-button,
.reaction-count {
  display: inline-flex;
  min-width: 42px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
}

.reaction-button {
  transition: background-color 160ms ease, color 160ms ease;
}

.reaction-button:hover {
  background: var(--surface-deep);
  color: var(--ink);
}

.reaction-button.is-active[data-reaction="like"] {
  background: #dce7e1;
  color: #4d685b;
}

.reaction-button.is-active[data-reaction="dislike"] {
  background: #eee3e1;
  color: #865f59;
}

.reaction-button:disabled {
  opacity: 0.55;
}

.reaction-button svg,
.reaction-count svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.reaction-button[data-reaction="dislike"] svg,
.reaction-count[data-reaction="dislike"] svg {
  transform: rotate(180deg);
}

.review-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.review-comments {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.review-comments summary {
  width: fit-content;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.review-comments-body,
.review-comment-list {
  display: grid;
  gap: 8px;
}

.review-comments-body {
  padding-top: 10px;
}

.review-comment {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--surface);
}

.review-comment-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.review-comment-author,
.review-comment-spoiler,
.review-comment-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.review-comment-actions .icon-action {
  width: 32px;
  height: 32px;
  margin: -8px -8px -8px 0;
}

.review-comment p,
.review-comment-empty,
.review-comments-hidden,
.review-comment-message {
  margin: 0;
}

.review-comment > .reaction-buttons {
  margin-top: 6px;
}

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

.review-comment-fields {
  display: grid;
  gap: 8px;
}

.review-comment-spoiler {
  width: fit-content;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
}

.review-comment-spoiler input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.review-comment-spoiler input:disabled {
  cursor: not-allowed;
}

.review-comment-spoiler small {
  padding-left: 7px;
  border-left: 1px solid var(--line);
}

.review-comment-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf9f5;
  color: var(--ink);
}

.review-comment-empty,
.review-comments-hidden {
  color: var(--muted);
  font-size: 0.8rem;
}

.review-comments-hidden {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.review-comment-message {
  grid-column: 1 / -1;
  min-height: 0;
  color: var(--danger);
  font-size: 0.8rem;
}

.record-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.icon-action {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease;
}

.icon-action:hover {
  background: var(--surface-deep);
  color: var(--ink);
}

.icon-action.is-danger:hover {
  background: #eee3e1;
  color: var(--danger);
}

.icon-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.assignment-heading {
  align-items: flex-start;
  margin: 12px 0;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.assignment-heading h3 {
  margin-bottom: 2px;
}

.assignment-heading p {
  margin-bottom: 0;
  font-size: 0.82rem;
}

.assignment-list {
  display: grid;
  gap: 7px;
}

.assignment-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 9px;
  background: var(--surface-quiet);
}

.assignment-role strong {
  font-size: 0.88rem;
}

.form-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 0.85rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: min(390px, calc(100% - 44px));
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--accent-dark);
  color: #f8f5ef;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: var(--danger);
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .page-switch {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .page-switch-button {
    min-width: 0;
  }

  main {
    width: min(100% - 24px, 680px);
    padding-top: 24px;
  }

  .hero-layout,
  .detail-grid,
  .plan-card {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: 310px;
  }

  .page-hero {
    height: 310px;
    min-height: 310px;
  }

}

@media (max-width: 560px) {
  .topbar {
    min-height: 0;
    gap: 9px;
    padding: 10px 12px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-action,
  .session-button {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .page-switch {
    width: 100%;
  }

  .page-switch-button {
    padding: 7px 4px;
    font-size: 0.82rem;
  }

  main {
    width: min(100% - 16px, 520px);
    padding: 16px 0 58px;
  }

  .intro-panel,
  .snapshot-panel,
  .content-panel {
    border-radius: 16px;
  }

  .intro-panel,
  .snapshot-panel,
  .content-panel,
  .member-hero {
    padding: 22px;
  }

  h1 {
    font-size: 2.65rem;
  }

  .section-heading,
  .story-card {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .list-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .list-controls .select-field {
    width: 100%;
    min-width: 0;
  }

  .game-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px;
    min-height: 82px;
    padding: 10px 12px;
  }

  .game-title {
    font-size: 0.98rem;
  }

  .game-summary-meta span:last-child {
    display: none;
  }

  .game-body-inner {
    padding: 10px;
  }

  .story-card,
  .detail-section {
    padding: 16px;
  }

  .member-summary {
    padding: 10px 12px;
  }

  .member-game-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .plan-assignments,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .assignment-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .plan-dialog form,
  .login-dialog form,
  .review-dialog form,
  .record-dialog form {
    padding: 20px;
  }

  .review-group-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-group-summary,
  .review-average-grid {
    width: 100%;
  }

  .review-group-summary {
    justify-items: stretch;
  }

  .review-comment-form {
    grid-template-columns: 1fr;
  }

  .review-comment-form .primary-button {
    justify-self: end;
  }
}

@media (pointer: coarse) {
  .reaction-button {
    min-height: 44px;
  }

  .icon-action {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
