:root {
  --ink: #2f2a24;
  --ink-soft: #5a5147;
  --sage: #7d9b86;
  --sun: #f2b572;
  --rose: #d9877b;
  --sky: #7fb0c5;
  --cream: #f7f2ea;
  --card: rgba(255, 255, 255, 0.88);
  --shadow: 0 20px 42px rgba(35, 28, 18, 0.2);
  --font-display: "Gabriola", "Segoe Print", "Comic Sans MS", cursive;
  --font-body: "Malgun Gothic", "Trebuchet MS", "Verdana", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(120deg, #f8f2e7 0%, #e6f0e5 45%, #f9e8d7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 10% 20%, rgba(242, 181, 114, 0.25), transparent 40%),
    radial-gradient(circle at 90% 30%, rgba(127, 176, 197, 0.2), transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(217, 135, 123, 0.2), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.title-block h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 36px);
  margin: 2px 0 2px;
}

.kicker {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 12px;
}

.subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.meta-block {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.meta-pill {
  background: url("image/processed/pill_gray.png") center/cover no-repeat;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 600;
  text-align: center;
  font-size: 12px;
}

.status-row {
  margin-bottom: 14px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.board-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.board-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 18px;
}

.board-frame {
  position: relative;
  width: min(70vw, 900px);
  height: min(35vw, 450px);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.board {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  background: linear-gradient(
      145deg,
      rgba(255, 250, 240, 0.75),
      rgba(242, 232, 216, 0.55),
      rgba(229, 213, 193, 0.45)
    ),
    url("image/board_base.jpg") center/cover no-repeat;
  background-blend-mode: soft-light;
  border: 6px solid rgba(125, 155, 134, 0.25);
  overflow: visible;
  isolation: isolate;
  transform-origin: center;
  transition: transform 0.3s ease;
  will-change: transform;
}

.board.zooming {
  transform: translate(var(--zoom-x, 0px), var(--zoom-y, 0px)) scale(var(--zoom-scale, 1));
}

.board.stepping {
  transition: transform 0.12s steps(1, end);
}

.board::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 22px;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: var(--grid-size, 52px) var(--grid-size, 52px);
  opacity: 0.35;
  z-index: 0;
}

.board::after {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 22px;
  border: 2px dashed rgba(125, 155, 134, 0.35);
  box-shadow: 0 0 0 10px rgba(125, 155, 134, 0.08);
  z-index: 0;
}

.space {
  position: absolute;
  width: var(--cell-size, 52px);
  height: var(--cell-size, 52px);
  border-radius: var(--space-radius, 16px);
  background: var(--card);
  border: 1px solid rgba(47, 42, 36, 0.08);
  display: grid;
  place-items: center;
  padding: calc(var(--cell-size, 52px) * 0.12);
  text-align: center;
  font-size: 11px;
  color: var(--ink-soft);
  z-index: 2;
  overflow: visible;
}

.space.has-token {
  z-index: 6;
}

.space::before {
  content: "";
  position: absolute;
  inset: 8%;
  background-image: var(--tile-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.88;
  filter: drop-shadow(0 6px 8px rgba(35, 28, 18, 0.18));
  pointer-events: none;
  z-index: 0;
}

.space.start {
  background: rgba(242, 181, 114, 0.9);
  color: #2b1f16;
  font-weight: 700;
}

.space.finish {
  background: rgba(127, 176, 197, 0.85);
  color: #1b2b33;
  font-weight: 700;
}

.space .space-label {
  display: none;
}

.space .tokens {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  z-index: 20;
  pointer-events: none;
}

.space .tokens .token {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.space .tokens .token.active {
  z-index: 3;
}

.space.daily {
  background: rgba(255, 238, 206, 0.9);
}

.space.choice {
  background: rgba(208, 235, 232, 0.9);
}

.space.opportunity {
  background: rgba(225, 238, 211, 0.9);
}

.space.crisis {
  background: rgba(244, 215, 206, 0.9);
}

.space.relationship {
  background: rgba(235, 216, 230, 0.9);
}

.space.festival {
  background: rgba(240, 226, 185, 0.9);
}

.space.fate {
  background: rgba(214, 225, 245, 0.9);
}

.space.back {
  background: rgba(243, 208, 186, 0.92);
}

.space.rest {
  background: rgba(215, 233, 213, 0.92);
}

.space.marriage {
  background: #e53935;
  font-weight: 700;
  color: #ffffff;
}

.token {
  width: var(--token-size, 18px);
  height: var(--token-size, 18px);
  border-radius: 0;
  border: none;
  opacity: 1;
  background-color: transparent;
  background-image: var(--token-image);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: none;
  filter: none;
  position: relative;
  animation: pop 0.45s ease;
}

.token.use-image,
.token.use-image.style-0,
.token.use-image.style-1,
.token.use-image.style-2,
.token.use-image.style-3 {
  border: none;
  border-radius: 0;
  clip-path: none;
  background-image: var(--token-image);
}

.token.active {
  box-shadow: none;
}

.token.finished {
  box-shadow: none;
}

.token.style-0 {
  border-radius: 50%;
  background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.65), transparent 45%);
}

.token.style-1 {
  border-radius: 6px;
  border-style: dashed;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent 60%);
}

.token.style-2 {
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.45), transparent 60%);
}

.token.style-3 {
  border-radius: 0;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 70%);
}

.board-center {
  position: absolute;
  display: grid;
  gap: 16px;
  place-items: center;
  z-index: 3;
}

.effect-layer {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 60;
}

.move-hold-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: transparent;
  cursor: pointer;
}

.dice-card,
.project-card {
  background: var(--card);
  padding: 14px 18px;
  border-radius: 18px;
  text-align: center;
  box-shadow: var(--shadow);
  min-width: 180px;
}

.project-card-header {
  padding: 10px 12px;
}

.dice-card {
  border: 2px solid rgba(var(--player-accent-rgb, 242, 181, 114), 0.6);
  background: linear-gradient(
    135deg,
    rgba(var(--player-accent-rgb, 242, 181, 114), 0.22),
    rgba(255, 255, 255, 0.98)
  );
  transform: translate(var(--drag-x, 0px), var(--drag-y, 0px));
  cursor: grab;
  touch-action: none;
}

.dice-card.dragging {
  cursor: grabbing;
  user-select: none;
}

.dice-title,
.project-title {
  font-weight: 600;
  color: var(--ink-soft);
}

.dice-card .dice-title {
  color: var(--player-accent, var(--ink-soft));
}

.dice-player {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.dice-card .dice-player {
  color: var(--player-accent, var(--ink));
}

.dice-value {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
  line-height: 1;
  text-shadow: 0 6px 14px rgba(35, 28, 18, 0.2);
  position: relative;
  z-index: 2;
}

.dice-value::before {
  content: "";
  position: absolute;
  inset: 22%;
  background-image: url("image/processed/roulette_ring.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: -1;
}

.dice-card.rolling {
  box-shadow: 0 18px 34px rgba(var(--player-accent-rgb, 242, 181, 114), 0.45);
}

.roulette {
  position: relative;
  width: 118px;
  height: 118px;
  margin: 10px auto 6px;
}

.roulette-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: url("image/processed/roulette_wheel.png") center/cover no-repeat;
  border: none;
  box-shadow: 0 12px 24px rgba(35, 28, 18, 0.2);
  transform: rotate(0turn);
}

.roulette-wheel::after {
  content: none;
}

.roulette-wheel.spinning {
  animation: roulette-spin 1.2s cubic-bezier(0.18, 0.78, 0.22, 1) forwards;
}

.roulette-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: url("image/processed/roulette_pointer.png") center/contain no-repeat;
  filter: drop-shadow(0 4px 6px rgba(35, 28, 18, 0.3));
  z-index: 2;
}

.roulette .dice-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
  z-index: 2;
}

.phase-hint {
  margin-top: 6px;
  color: #1f2a2f;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: url("image/processed/pill_teal.png") center/cover no-repeat;
  box-shadow: 0 8px 16px rgba(35, 28, 18, 0.16);
}

.project-bar {
  display: none;
}

.project-desc {
  font-size: 16px;
  letter-spacing: 4px;
  color: #d96555;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 22px;
}

.project-heart {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(35, 28, 18, 0.25));
}

.primary-btn {
  border: none;
  background: linear-gradient(135deg, #f2b572, #e8957d);
  color: #2b1f16;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(242, 181, 114, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(242, 181, 114, 0.4);
}

.primary-btn.small {
  padding: 8px 12px;
  font-size: 13px;
}

.primary-btn.wide {
  width: 100%;
}

.save-btn {
  align-self: center;
}

.save-btn.is-hidden {
  display: none;
}

.action-panel {
  background: transparent;
  border-radius: 22px;
  padding: 22px;
  box-shadow: none;
}

.action-panel.hidden {
  display: none;
}

.action-head h3 {
  margin: 0;
  font-size: 18px;
}

.action-head p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

.action-buttons {
  --action-gap: 10px;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--action-gap);
  margin-top: 14px;
  overflow: visible;
  padding: 0 2px 6px;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 4;
  align-items: flex-start;
}

.action-button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  width: 180px;
  position: relative;
  z-index: 4;
  display: block;
  aspect-ratio: 1792 / 2400;
  height: 241px;
  min-height: 200px;
}

.action-button.is-flipped {
  z-index: 10;
  transform: scale(1.5);
  transform-origin: center center;
  position: relative;
}

.action-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.action-button:focus-visible {
  outline: 2px solid rgba(242, 181, 114, 0.7);
  outline-offset: 4px;
}

.action-card-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 26px rgba(35, 28, 18, 0.16);
}

.action-card-front,
.action-card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s ease;
}

.action-card-front {
  z-index: 2;
}

.action-card-back {
  z-index: 1;
  padding: 40% 22% 16%;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.action-card-front.hidden,
.action-card-back.hidden {
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.action-card-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  z-index: 0;
}

.action-card-front .action-card-bg-image {
  object-fit: cover;
}

.action-card-back .action-card-bg-image {
  transform: scale(1.5);
}

.action-card-front .action-card-bg-image {
  object-fit: cover;
}

.action-label {
  font-weight: 700;
  font-size: 15px;
  position: absolute;
  left: 12%;
  right: 12%;
  top: 68%;
  height: 10%;
  margin: 0;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  color: #4a3316;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
  z-index: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.action-story {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.action-effect-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

.action-effect-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.action-effect-chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(47, 42, 36, 0.12);
  color: var(--ink);
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.action-effect-list.action-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  padding-right: 0;
}

.action-card-back .result-section {
  gap: 4px;
  align-items: center;
}

.action-card-back .result-section-title {
  display: none;
}

.action-button.has-target .action-card-back .result-section-title {
  display: block;
  font-size: 8px;
  line-height: 1.3;
  margin-bottom: 2px;
}

.action-card-back .result-chips {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.action-card-back .result-chip {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  box-sizing: border-box;
}

.action-card-back .result-label {
  font-size: 4.1px;
  display: inline;
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.action-card-back .result-value {
  font-size: 4.9px;
  font-weight: 700;
  display: inline;
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.action-card-back .result-chip::before {
  content: none;
}

.action-card-back .action-story,
.action-card-back .action-effect-title {
  position: relative;
  z-index: 1;
  display: block;
}

.action-card-back .action-story {
  font-size: 9.7px;
  color: var(--ink-soft);
  line-height: 1.35;
  margin-bottom: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.action-card-back .action-effect-title {
  font-size: 10.8px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 2px;
  flex-shrink: 0;
}

.action-card-back .action-effect-list {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow-wrap: break-word;
  box-sizing: border-box;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.action-button.is-flipped .action-card-back .action-story,
.action-button.is-flipped .action-card-back .action-effect-title,
.action-button.is-flipped .action-card-back .action-effect-list,
.action-button.is-flipped .action-card-back .result-chip,
.action-button.is-flipped .action-card-back .result-label,
.action-button.is-flipped .action-card-back .result-value {
  transform: none;
}

.action-button.is-flipped .action-effect-list.action-results {
  gap: 0;
  max-height: none;
  overflow: hidden;
  padding-right: 0;
}

.action-button.is-flipped .result-chips {
  gap: 0;
}

.action-button.is-flipped .result-section-title {
  display: none;
}

.action-button.is-flipped .result-label {
  font-size: 10px;
  line-height: 1.1;
}

.action-button.is-flipped .result-value {
  font-size: 11px;
  line-height: 1.1;
}

.action-button.is-flipped .result-chip {
  padding: 0;
  border-radius: 0;
  line-height: 1;
}

.action-card {
  width: min(96vw, 1100px);
  padding: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 242, 234, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.action-card .action-head {
  text-align: center;
}

.action-helper {
  margin-top: 12px;
}

.action-helper-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.action-helper select {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(47, 42, 36, 0.15);
}

.side-panel {
  display: grid;
  gap: 16px;
}

.players {
  display: grid;
  gap: 12px;
}

.players.compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.player-card {
  background: var(--card);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.player-card.current {
  border-color: var(--player-accent, rgba(242, 181, 114, 0.8));
  box-shadow: 0 16px 28px rgba(var(--player-accent-rgb, 242, 181, 114), 0.35);
  background: linear-gradient(
    135deg,
    rgba(var(--player-accent-rgb, 242, 181, 114), 0.35),
    rgba(255, 255, 255, 0.95)
  );
  transform: translateY(-2px);
}

.player-card.bankrupt {
  border-color: rgba(217, 135, 123, 0.7);
  background: linear-gradient(135deg, rgba(217, 135, 123, 0.25), rgba(255, 255, 255, 0.95));
}

.player-card.gameover {
  border-color: rgba(178, 70, 70, 0.55);
  background: linear-gradient(135deg, rgba(178, 70, 70, 0.18), rgba(255, 255, 255, 0.92));
  opacity: 0.88;
}

.players.compact .player-card {
  padding: 8px 10px;
  border-radius: 14px;
  height: 190px;
}

.players.compact .player-header {
  margin-bottom: 6px;
}

.players.compact .player-name {
  font-size: 13px;
}

.players.compact .player-role {
  font-size: 11px;
}

.players.compact .player-avatar {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.players.compact .stat-row {
  margin: 4px 0;
  gap: 6px;
}

.players.compact .stat-label {
  width: 40px;
  font-size: 11px;
}

.players.compact .stat-bar {
  height: 6px;
}

.players.compact .stat-value {
  width: 72px;
  font-size: 11px;
}

.players.compact .player-meta {
  gap: 4px;
}

.players.compact .player-meta-btn {
  font-size: 9px;
  padding: 3px 4px;
}

.players.compact .asset-section {
  margin-top: 6px;
  padding-top: 4px;
  gap: 4px;
}

.players.compact .asset-header,
.players.compact .asset-item,
.players.compact .asset-empty {
  font-size: 10px;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.player-identity {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(47, 42, 36, 0.12);
  box-shadow: 0 6px 12px rgba(35, 28, 18, 0.18);
}

.player-name {
  font-weight: 700;
}

.player-role {
  font-size: 12px;
  color: var(--ink-soft);
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.asset-section {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(47, 42, 36, 0.15);
  display: grid;
  gap: 6px;
}

.asset-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

.asset-list {
  display: grid;
  gap: 4px;
}

.asset-item {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  align-items: center;
}

.asset-info {
  display: grid;
  gap: 2px;
}

.asset-name {
  font-weight: 600;
}

.asset-meta {
  font-size: 10px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.asset-price {
  color: var(--ink-soft);
  white-space: nowrap;
}

.asset-empty {
  font-size: 11px;
  color: var(--ink-soft);
}

.player-actions {
  margin-top: auto;
  padding-top: 8px;
}

.asset-button {
  width: 100%;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(47, 42, 36, 0.15);
  background: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.asset-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(35, 28, 18, 0.12);
}

.asset-button:focus-visible {
  outline: 2px solid rgba(242, 181, 114, 0.65);
  outline-offset: 3px;
}

.stat-label {
  width: 48px;
  font-size: 12px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-label::before {
  content: "";
  width: 12px;
  height: 12px;
  background-image: var(--stat-icon);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex: 0 0 auto;
}

.stat-label[data-key="money"] {
  --stat-icon: url("image/processed/icon_money.png");
}

.stat-label[data-key="happiness"] {
  --stat-icon: url("image/processed/icon_happiness.png");
}

.stat-label[data-key="health"] {
  --stat-icon: url("image/processed/icon_health.png");
}

.stat-label[data-key="growth"] {
  --stat-icon: url("image/processed/icon_growth.png");
}

.stat-label[data-key="reputation"] {
  --stat-icon: url("image/processed/icon_reputation.png");
}

.stat-bar {
  flex: 1;
  height: 8px;
  background: rgba(47, 42, 36, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7d9b86, #f2b572);
}

.stat-value {
  font-size: 12px;
  width: 88px;
  text-align: right;
  color: var(--ink-soft);
}

.log-panel {
  background: var(--card);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  max-height: min(35vw, 450px);
  overflow: auto;
}

.log-title {
  font-weight: 700;
  margin-bottom: 8px;
}

#log-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(33, 28, 20, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}

#result-modal {
  z-index: 260;
}

#start-modal {
  z-index: 280;
  background: url("image/processed/%EC%B2%AB%20%ED%99%94%EB%A9%B4.jpg") center/cover no-repeat;
  padding: 0;
}

#start-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(33, 28, 20, 0.32);
  pointer-events: none;
}

.modal.show {
  display: flex;
}

.modal-card {
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  width: min(90vw, 720px);
  animation: rise 0.35s ease;
  transform: translate(var(--drag-x, 0px), var(--drag-y, 0px));
  cursor: grab;
}

.start-card {
  width: min(90vw, 460px);
  text-align: center;
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
}

.start-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.start-note {
  min-height: 18px;
  font-size: 12px;
  color: var(--ink-soft);
}

.modal-card.dragging {
  cursor: grabbing;
  user-select: none;
}

.modal-card h2 {
  margin-top: 0;
}

.modal-subtitle {
  color: var(--ink-soft);
  margin-top: 4px;
}

.primary-btn.outline {
  background: transparent;
  border: 1px solid rgba(47, 42, 36, 0.2);
  color: var(--ink);
}

.marriage-card,
.job-card,
.career-card {
  width: min(92vw, 640px);
  display: grid;
  gap: 12px;
}

.marriage-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid rgba(47, 42, 36, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.filter-btn.active {
  background: linear-gradient(135deg, #f2b572, #7d9b86);
  border-color: transparent;
  color: #1f1a14;
}

.marriage-list,
.job-list {
  display: grid;
  gap: 10px;
  max-height: min(55vh, 360px);
  overflow: auto;
  padding-right: 4px;
}

.marriage-option,
.job-option {
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(47, 42, 36, 0.08);
  display: grid;
  gap: 6px;
}

.marriage-name,
.job-name {
  font-weight: 700;
}

.marriage-desc {
  font-size: 12px;
  color: var(--ink-soft);
}

.marriage-traits,
.marriage-penalties,
.job-pay {
  font-size: 12px;
  color: var(--ink-soft);
}

.job-requirement {
  font-size: 12px;
  color: var(--ink-soft);
}

.job-option.locked {
  opacity: 0.65;
}

.job-select.disabled,
.job-select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.marriage-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.job-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.career-body {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(47, 42, 36, 0.08);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.career-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.career-label {
  color: var(--ink-soft);
  font-weight: 600;
}

.career-value {
  font-weight: 700;
}

.career-note {
  font-size: 12px;
  color: var(--ink-soft);
}

.career-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.marriage-page,
.job-page {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}

.marriage-select,
.job-select {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  background: rgba(125, 155, 134, 0.22);
  cursor: pointer;
  width: fit-content;
}

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

.player-meta {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: nowrap;
  align-items: center;
}

.player-meta-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(47, 42, 36, 0.12);
  background: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.player-meta-btn.meta-marriage {
  background: rgba(242, 181, 114, 0.18);
  border-color: rgba(242, 181, 114, 0.45);
}

.player-meta-btn.meta-job {
  background: rgba(110, 166, 214, 0.18);
  border-color: rgba(110, 166, 214, 0.45);
}

.player-meta-btn.meta-asset {
  background: rgba(125, 155, 134, 0.18);
  border-color: rgba(125, 155, 134, 0.4);
}

.player-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(47, 42, 36, 0.12);
  color: var(--ink);
}

.player-tag.danger {
  background: rgba(226, 83, 83, 0.15);
  border-color: rgba(226, 83, 83, 0.45);
  color: #b43c3c;
}

.player-tag.warning {
  background: rgba(245, 178, 84, 0.18);
  border-color: rgba(245, 178, 84, 0.55);
  color: #b66a18;
}

.player-tag.accent {
  background: rgba(242, 181, 114, 0.2);
  border-color: rgba(242, 181, 114, 0.5);
}

.player-tag.info {
  background: rgba(110, 166, 214, 0.2);
  border-color: rgba(110, 166, 214, 0.45);
}

.player-tag.muted {
  background: rgba(47, 42, 36, 0.08);
  border-color: rgba(47, 42, 36, 0.18);
  color: var(--ink-soft);
}

.info-card {
  width: min(90vw, 520px);
  display: grid;
  gap: 12px;
}

.info-body {
  display: grid;
  gap: 8px;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  padding-right: 4px;
}

.info-section {
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(47, 42, 36, 0.08);
  display: grid;
  gap: 6px;
}

.info-section-title {
  font-weight: 700;
  font-size: 12px;
}

.info-list {
  display: grid;
  gap: 4px;
}

.info-item {
  font-size: 12px;
  color: var(--ink);
}

.info-item.muted {
  color: var(--ink-soft);
}

.asset-card {
  width: min(90vw, 520px);
  display: grid;
  gap: 12px;
}

.asset-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.asset-modal-list {
  display: grid;
  gap: 6px;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  padding-right: 4px;
}

.trade-offer-card {
  width: min(88vw, 420px);
  display: grid;
  gap: 12px;
  text-align: center;
}

.trade-offer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.setup-card .setup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.setup-player {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 10px;
}

.setup-player label {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
}

.setup-player label:first-of-type {
  margin-top: 0;
}

.setup-player input,
.setup-player select {
  width: 100%;
  padding: 8px 10px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid rgba(47, 42, 36, 0.15);
  font-family: var(--font-body);
}

.char-desc {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-soft);
  min-height: 32px;
}

.char-portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 12px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(47, 42, 36, 0.12);
  box-shadow: 0 10px 18px rgba(35, 28, 18, 0.14);
}

.mode-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mode-label {
  font-weight: 700;
}

.mode-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mode-btn {
  border: 1px solid rgba(47, 42, 36, 0.2);
  background: rgba(255, 255, 255, 0.7);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.mode-btn.active {
  background: linear-gradient(135deg, #7d9b86, #f2b572);
  color: #1f1a14;
  border-color: transparent;
}

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

.event-category {
  background: rgba(47, 42, 36, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.event-description {
  color: var(--ink-soft);
  line-height: 1.5;
}

.event-choices {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.event-choice {
  border: 1px solid rgba(47, 42, 36, 0.12);
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-choice:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(35, 28, 18, 0.1);
}

.event-choice:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.event-result {
  background: rgba(127, 176, 197, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  display: grid;
  gap: 10px;
}

.result-card {
  width: min(90vw, 520px);
}

.result-story {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.result-effects {
  display: grid;
  gap: 10px;
}

.result-section {
  display: grid;
  gap: 8px;
}

.result-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

.result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-chip {
  display: grid;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(47, 42, 36, 0.08);
  min-width: 110px;
  box-shadow: 0 12px 22px rgba(35, 28, 18, 0.12);
  position: relative;
  padding-left: 42px;
  min-height: 44px;
}

.result-chip::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 18px;
  height: 18px;
  background-image: var(--chip-icon);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.95;
}

.result-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

.result-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  animation: count-pop 1.1s ease;
}

.result-chip.money .result-value {
  color: #c0741b;
}

.result-chip.happiness .result-value {
  color: #d96555;
}

.result-chip.health .result-value {
  color: #4a7d5d;
}

.result-chip.growth .result-value {
  color: #4f7ea3;
}

.result-chip.reputation .result-value {
  color: #7f5a96;
}

.result-chip.project .result-value {
  color: #2f6f90;
}

.result-chip.dice .result-value {
  color: #5b6cc3;
}

.result-chip.empty .result-value {
  color: #7a7267;
}

.result-chip.empty {
  padding-left: 12px;
}

.result-chip.empty::before {
  content: none;
}

.roll-result {
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 800;
  color: #2b1f16;
  padding: 16px 24px;
  border-radius: 26px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98), rgba(242, 181, 114, 0.3));
  box-shadow: 0 24px 40px rgba(35, 28, 18, 0.25);
  text-shadow: 0 12px 20px rgba(35, 28, 18, 0.25);
  animation: roll-pop 1.1s ease both;
}

.effect-burst {
  position: absolute;
  min-width: 240px;
  padding: 14px 18px;
  border-radius: 20px;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.95), rgba(242, 181, 114, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 40px rgba(35, 28, 18, 0.2);
  animation: burst 2s ease both;
}

.effect-burst::before,
.effect-burst::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(242, 181, 114, 0.6));
  animation: sparkle 1.4s ease both;
}

.effect-burst::before {
  top: -8px;
  left: 18px;
}

.effect-burst::after {
  bottom: -10px;
  right: 24px;
}

.effect-title {
  font-weight: 700;
  font-size: 14px;
}

.effect-lines {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.effect-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.effect-role {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(47, 42, 36, 0.08);
}

.effect-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.effect-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 18px rgba(35, 28, 18, 0.12);
  color: var(--ink);
}

.effect-chip::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 0;
  background-color: var(--chip-color, #7d9b86);
  background-image: var(--chip-icon);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 0 8px var(--chip-color, #7d9b86);
}

.effect-chip.money {
  --chip-color: #f2b572;
}

.effect-chip.happiness {
  --chip-color: #f29f8f;
}

.effect-chip.health {
  --chip-color: #7d9b86;
}

.effect-chip.growth {
  --chip-color: #7fb0c5;
}

.effect-chip.reputation {
  --chip-color: #c7a4d9;
}

.effect-chip.project {
  --chip-color: #5aa7c8;
}

.effect-chip.empty {
  --chip-color: #b9b2a7;
  opacity: 0.7;
}

.effect-chip.money,
.result-chip.money {
  --chip-icon: url("image/processed/icon_money.png");
}

.effect-chip.happiness,
.result-chip.happiness {
  --chip-icon: url("image/processed/icon_happiness.png");
}

.effect-chip.health,
.result-chip.health {
  --chip-icon: url("image/processed/icon_health.png");
}

.effect-chip.growth,
.result-chip.growth {
  --chip-icon: url("image/processed/icon_growth.png");
}

.effect-chip.reputation,
.result-chip.reputation {
  --chip-icon: url("image/processed/icon_reputation.png");
}

.effect-chip.project,
.result-chip.project {
  --chip-icon: url("image/processed/icon_laurel.png");
}

.effect-chip.dice,
.result-chip.dice {
  --chip-icon: url("image/processed/roulette_wheel.png");
}

.action-card-back .result-chip {
  padding-left: 0;
}

.action-card-back .result-chip::before {
  content: none;
}

.action-button.is-flipped .result-chip {
  padding-left: 0;
}

.action-button.is-flipped .result-chip::before {
  content: none;
}

.end-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.end-section-title {
  font-weight: 700;
  margin-bottom: 8px;
}

#final-ranking {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

#final-titles {
  margin: 0;
  padding-left: 0;
  color: var(--ink-soft);
  list-style: none;
}

.ranking-item,
.title-item {
  position: relative;
  padding-left: 32px;
}

.ranking-item::before,
.title-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.95;
}

.ranking-item::before {
  background-image: url("image/processed/icon_ribbon.png");
}

.title-item::before {
  background-image: url("image/processed/icon_laurel.png");
}

.final-reviews {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  max-height: 260px;
  overflow: auto;
  padding-right: 6px;
}

.review-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 42, 36, 0.08);
}

.review-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.review-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.trade-card {
  width: min(92vw, 720px);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 242, 234, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.trade-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.trade-tab {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(47, 42, 36, 0.08);
  color: var(--ink);
}

.trade-tab.active {
  background: rgba(125, 155, 134, 0.3);
  box-shadow: inset 0 0 0 1px rgba(125, 155, 134, 0.4);
}

.setup-card,
.event-card,
.result-card,
.trade-card,
.end-card {
  background-image: url("image/processed/frame_modal.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(255, 255, 255, 0.9);
  background-blend-mode: screen;
}

.trade-market {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  max-height: 360px;
  overflow: auto;
}

.market-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(47, 42, 36, 0.08);
}

.market-name {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.asset-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 6px rgba(35, 28, 18, 0.2));
}

.asset-item .asset-icon {
  width: 28px;
  height: 28px;
}

.market-meta {
  font-size: 12px;
  color: var(--ink-soft);
  display: grid;
  gap: 4px;
}

.market-holding {
  font-size: 11px;
  color: var(--ink-soft);
  display: grid;
  gap: 2px;
}

.market-profit.gain {
  color: #1b7f53;
  font-weight: 700;
}

.market-profit.loss {
  color: #c23a3a;
  font-weight: 700;
}

.market-actions {
  display: grid;
  gap: 6px;
}

.market-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.market-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(125, 155, 134, 0.2);
}

.market-btn.sell {
  background: rgba(242, 181, 114, 0.25);
}

.market-btn.player {
  background: rgba(127, 176, 197, 0.25);
}

.market-select {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(47, 42, 36, 0.15);
  font-size: 12px;
}

.trade-summary {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.asset-meta {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--ink-soft);
}

.asset-profit.gain {
  color: #1b7f53;
  font-weight: 700;
}

.asset-profit.loss {
  color: #c23a3a;
  font-weight: 700;
}

.auction-card {
  width: min(92vw, 520px);
  padding: 20px;
}

.auction-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  margin-top: 10px;
}

.auction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(47, 42, 36, 0.08);
}

.auction-name {
  font-weight: 700;
}

.auction-price {
  font-size: 12px;
  color: var(--ink-soft);
}

.auction-sell {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(242, 181, 114, 0.25);
}

.auction-empty {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  padding: 12px;
}

.result-card.alert {
  background-image: none;
  background: linear-gradient(180deg, rgba(255, 90, 90, 0.2), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(255, 90, 90, 0.4);
}

.result-card.system {
  background-image: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(233, 244, 255, 0.9));
  border: 1px solid rgba(114, 149, 185, 0.35);
}

.hidden {
  display: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes roll-pop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(0.96);
  }
}

@keyframes roulette-spin {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(var(--spin-turn, 3turn));
  }
}

@keyframes burst {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
  }
  55% {
    opacity: 1;
    transform: translateY(-4px) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translateY(-24px) scale(0.98);
  }
}

@keyframes sparkle {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.4);
  }
}

@keyframes count-pop {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.92);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


@keyframes action-results-reveal {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1000px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .board-frame {
    width: min(92vw, 820px);
    height: min(46vw, 420px);
  }

  .players.compact {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 600px) {
  .board-frame {
    width: min(96vw, 520px);
    height: min(48vw, 260px);
  }

  .roulette {
    width: 98px;
    height: 98px;
  }

  .effect-burst {
    min-width: 200px;
  }
}


