/* === 行动按钮组 === */
.action-control-panel {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: 12px;
  padding: 10px;
  background: #181818;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.ground-area {
  margin-bottom: 10px;
  padding: 8px 10px;
  background: #1a1a10;
  border: 1px dashed #5a5a30;
  border-radius: 6px;
}

.ground-area h4 {
  margin: 0 0 6px;
  color: #ccaa44;
  font-size: 14px;
}

.ground-inventory {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 0;
}

.action-buttons button {
  min-height: 48px;
  margin: 0;
  border-radius: 8px;
  font-weight: bold;
}

#findSuppliesBtn {
  color: #111;
  background: #ffaa33;
  border-color: #ffaa33;
}

#retreatBtn,
.home-primary-action {
  color: #111;
  background: #ffaa33;
  border-color: #ffaa33;
}

#evacuateBtn {
  color: #e7f3ff;
  background: #59aa7b;
  border-color: #43c767;
}

.area-select {
  margin-bottom: 14px;
}

.area-select h3 {
  margin: 0 0 10px;
  color: #ffaa33;
}

.area-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.area-return {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.area-return a {
  width: min(50%, 160px);
}

.area-return-btn {
  width: 100%;
  min-height: 46px;
  margin: 0;
  color: #fff;
  font-weight: bold;
}

.area-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 12px;
  text-align: center;
  background: #202020;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  line-height: 1.35;
}

.area-card:hover {
  border-color: #ffaa33;
  background: #282828;
}

.area-card.area-risk-low {
  background: #14261c;
  border-color: #2d7a4b;
}

.area-card.area-risk-low:hover {
  background: #193321;
  border-color: #43c767;
}

.area-card.area-risk-low .area-card-title {
  color: #70e892;
}

.area-card.area-risk-low .area-card-risk {
  background: #43c767;
  color: #07140b;
}

.area-card.area-risk-medium {
  background: #2b2113;
  border-color: #a8691f;
}

.area-card.area-risk-medium:hover {
  background: #352816;
  border-color: #ffaa33;
}

.area-card.area-risk-medium .area-card-risk {
  background: #ffaa33;
  color: #111;
}

.area-card.area-risk-high {
  background: #1a0a1e;
  border-color: #7a2a8a;
}

.area-card.area-risk-high:hover {
  background: #240e29;
  border-color: #bb44cc;
}

.area-card.area-risk-high .area-card-title {
  color: #d07de0;
}

.area-card.area-risk-high .area-card-risk {
  background: #bb44cc;
  color: #0e0312;
}

.area-card.area-risk-extreme {
  background: #2d1717;
  border-color: #8b3737;
}

.area-card.area-risk-extreme:hover {
  background: #391b1b;
  border-color: #ff6666;
}

.area-card.area-risk-extreme .area-card-title {
  color: #ff7a7a;
}

.area-card.area-risk-extreme .area-card-risk {
  background: #ff6666;
  color: #160606;
}

.area-card-title {
  color: #ffaa33;
  font-size: 17px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
}

.area-card-risk {
  min-width: 62px;
  padding: 3px 8px;
  color: #111;
  background: #ffaa33;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
}

.selected-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
  padding: 10px;
  background: #181818;
  border: 1px solid #333;
  border-radius: 8px;
  color: #bbb;
}

.selected-area strong {
  color: #ffaa33;
  font-size: 17px;
}

/* === 日志与敌人信息 === */
#adventureLog {
  max-height: none;
  margin-top: 8px;
  padding: 0;
  overflow: visible;
  color: #8f8f8f;
  background: transparent;
  font-size: 12px;
  line-height: 1.45;
}

#adventureLog:empty {
  display: none;
}

.action-log-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.action-log-record {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  line-height: inherit;
}

.action-log-record.is-active {
  background: transparent;
  border: 0;
}

.action-log-record.is-dimmed {
  opacity: 0.55;
  border: 0;
}

.action-log-entry + .action-log-entry {
  margin-top: 2px;
  padding-top: 0;
  border-top: 0;
}

.action-log-overlay {
  position: fixed;
  inset: 0;
  z-index: 2350;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,0.55);
}

.action-log-overlay.show {
  display: flex;
}

.action-log-dialog,
.action-end-dialog {
  width: min(360px, 100%);
  padding: 18px;
  color: #ddd;
  background: #202020;
  border: 1px solid #555;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  text-align: center;
}

.action-log-dialog h3,
.action-end-dialog h3 {
  margin: 0 0 12px;
  color: #ffaa33;
}

.action-log-dialog-content {
  max-height: 58vh;
  margin-bottom: 14px;
  padding: 10px;
  overflow-y: auto;
  color: #ddd;
  background: #151515;
  border: 1px solid #333;
  border-radius: 8px;
  line-height: 1.55;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}

.action-log-dialog-content .action-log-entry + .action-log-entry,
.action-end-content .action-log-entry + .action-log-entry {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #333;
}

.action-log-dialog button {
  width: 100%;
  min-height: 44px;
  margin: 0;
  color: #111;
  background: #ffaa33;
  font-weight: bold;
}

/* === 行动等待圆环 === */
.action-wait-overlay {
  position: fixed;
  inset: 0;
  z-index: 2450;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,0.55);
}

.action-wait-overlay.show {
  display: flex;
}

.action-wait-dialog {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  background: #202020;
  border: 1px solid #555;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}

.action-wait-ring {
  width: 96px;
  height: 96px;
}

.action-wait-track,
.action-wait-segment {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.action-wait-track {
  stroke: #363636;
  stroke-dasharray: 21 4;
}

.action-wait-segment {
  stroke: #fff;
  stroke-dasharray: 0 100;
  stroke-dashoffset: var(--dash-offset);
  transition-property: stroke-dasharray;
  transition-timing-function: linear;
}

.action-wait-segment.filled {
  stroke-dasharray: 21 100;
}

.log {
  background: #222;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  border-left: 3px solid #ffaa33;
}

.enemy-area {
  margin-top: 15px;
}

/* === 行动结束弹窗 === */
.action-end-overlay {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,0.55);
}

.action-end-overlay.show {
  display: flex;
}

.action-end-log {
  margin: 0 0 8px;
  padding: 0 0 8px;
  color: inherit;
  border-bottom: 1px solid #333;
  line-height: inherit;
  text-align: left;
}

.action-end-log:empty {
  margin: 0;
  padding: 0;
  border: 0;
}

.action-end-message {
  color: #ddd;
  line-height: 1.55;
  text-align: left;
}

.action-end-loot-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.action-end-value {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #444;
  color: #ffcc66;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.action-end-dialog.danger {
  border-color: #884444;
}

.action-end-dialog.danger h3 {
  color: #ff6666;
}

