.cc-free-page main {
  background: #f3efe6;
}

.cc-free-wrap {
  padding: 1.25rem 0 2.5rem;
}

.cc-free-hero {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cc-free-kicker {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a5a2b;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.cc-free-title {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 800;
  margin: 0 0 0.4rem;
  color: #2a2118;
}

.cc-free-lead {
  margin: 0;
  max-width: 52rem;
  color: #5c5348;
  font-size: 0.95rem;
  line-height: 1.55;
}

.cc-free-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cc-free-help {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.cc-free-help-item {
  background: #fffdf8;
  border: 1px solid #e4d8c4;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font-size: 0.84rem;
  color: #4d463c;
}

.cc-free-help-item kbd {
  display: inline-block;
  padding: 0 0.35rem;
  border-radius: 4px;
  border: 1px solid #cfc3b0;
  background: #f6f0e6;
  font-size: 0.75rem;
}

.cc-free-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0.85rem;
  min-height: min(78vh, 860px);
}

.cc-free-board-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.cc-free-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.cc-free-btn {
  border: 1px solid #d2c4ae;
  background: #fff;
  color: #2c241b;
  border-radius: 9px;
  padding: 0.38rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.cc-free-btn:hover {
  background: #f8f1e6;
}

.cc-free-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cc-free-btn-warn {
  color: #8a2b22;
  border-color: #e0b4ae;
}

.cc-free-btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
}

.cc-free-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #4a433a;
  margin: 0 0.15rem 0 0.35rem;
  cursor: pointer;
  user-select: none;
}

.cc-free-status {
  margin-left: auto;
  font-size: 0.78rem;
  color: #6b6256;
}

.cc-free-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #d7cbb6;
  box-shadow: 0 10px 28px rgba(70, 50, 20, 0.08);
  background:
    radial-gradient(120% 90% at 50% 20%, #6d8a6a 0%, #4f6a52 42%, #3a5240 100%);
}

#cc-free-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  cursor: grab;
  touch-action: none;
}

#cc-free-canvas:active {
  cursor: grabbing;
}

.cc-free-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cc-free-hint {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: #6a6156;
  min-height: 1.3em;
}

.cc-free-hint.is-warn {
  color: #9b2c22;
}

.cc-free-side {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
}

.cc-free-panel {
  background: #fffdf8;
  border: 1px solid #e4d8c4;
  border-radius: 14px;
  padding: 0.75rem 0.8rem;
}

.cc-free-panel-grow {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cc-free-panel-title {
  font-size: 0.82rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: #2c241b;
}

.cc-free-panel-note {
  margin: -0.15rem 0 0.55rem;
  font-size: 0.74rem;
  color: #6e6559;
}

.cc-free-selected {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.cc-free-selected img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #ddd2c0;
  background: #f4efe6;
}

.cc-free-selected-name {
  font-weight: 700;
  font-size: 0.84rem;
}

.cc-free-selected-meta {
  font-size: 0.75rem;
  color: #6b6256;
  margin-top: 0.2rem;
}

.cc-free-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cc-free-color {
  width: 46px;
  height: 52px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: #f6f0e6;
  padding: 4px;
  cursor: pointer;
}

.cc-free-color img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cc-free-color.is-selected {
  border-color: #2a2118;
  background: #efe4d0;
}

.cc-free-palette-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cc-free-palette-count {
  font-size: 0.72rem;
  color: #7a7164;
}

.cc-free-palette {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  overflow: auto;
  max-height: min(52vh, 560px);
  padding-right: 2px;
}

.cc-free-tile {
  border: 2px solid #e4d8c4;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
  cursor: pointer;
}

.cc-free-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
}

.cc-free-tile.is-selected {
  border-color: #1f6f3d;
  box-shadow: 0 0 0 2px rgba(31, 111, 61, 0.18);
}

.cc-free-tile:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.cc-free-phase {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: #2c241b;
  color: #fff8ea;
  font-size: 0.78rem;
  font-weight: 800;
}

.cc-free-phase.is-meeple {
  background: #1f6f3d;
}

.cc-free-btn-primary {
  background: #1f6f3d;
  border-color: #1f6f3d;
  color: #fff;
}

.cc-free-btn-primary:hover {
  background: #175530;
  color: #fff;
}

.cc-free-btn.is-hidden,
.cc-free-btn[hidden] {
  display: none !important;
}

.cc-free-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cc-free-balloon {
  position: absolute;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff8d6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  animation: cc-free-balloon 1.45s ease-out forwards;
  white-space: nowrap;
}

@keyframes cc-free-balloon {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.7); }
  18% { opacity: 1; transform: translate(-50%, -6px) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -56px) scale(1); }
}

.cc-free-scores {
  display: grid;
  gap: 0.4rem;
}

.cc-free-score-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.28rem 0.35rem;
  border-radius: 10px;
  background: #f6f0e6;
}

.cc-free-score-row.is-turn {
  outline: 2px solid #1f6f3d;
  background: #edf7ec;
}

.cc-free-score-row.is-flash {
  animation: cc-free-flash 0.9s ease;
}

@keyframes cc-free-flash {
  0% { background: #ffe9a8; }
  100% { background: #edf7ec; }
}

.cc-free-score-row img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.cc-free-score-meta {
  min-width: 0;
}

.cc-free-score-name {
  font-size: 0.78rem;
  font-weight: 800;
}

.cc-free-score-left {
  font-size: 0.7rem;
  color: #6e6559;
}

.cc-free-score-points {
  font-size: 1.15rem;
  font-weight: 800;
}

.cc-free-log {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 160px;
  overflow: auto;
  display: grid;
  gap: 0.35rem;
}

.cc-free-log li {
  font-size: 0.75rem;
  color: #4d463c;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  background: #f6f0e6;
}

.cc-free-log-empty {
  color: #7a7164 !important;
  background: transparent !important;
}

@media (max-width: 991px) {
  .cc-free-help {
    grid-template-columns: 1fr;
  }

  .cc-free-app {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .cc-free-canvas-wrap,
  #cc-free-canvas {
    min-height: 52vh;
    height: 52vh;
  }

  .cc-free-palette {
    max-height: 280px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .cc-free-status {
    margin-left: 0;
    width: 100%;
  }
}
