/* DPP v1d content pages — align with index.html / shop.html stone + orange theme */

:root {
  --surface: rgba(41, 37, 36, 0.82);
  --surface-2: #292524;
  --border: #44403c;
  --border-soft: #57534e;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --accent: #ea580c;
  --accent-hover: #f97316;
  --accent-soft: #fb923c;
  --accent-text: #fdba74;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

body.v1d {
  margin: 0;
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #1c1917;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body.v1d a {
  color: var(--accent-text);
  text-decoration: none;
}

body.v1d a:hover {
  color: #fed7aa;
}

body.v1d .page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 14px 28px;
}

@media (min-width: 768px) {
  body.v1d .page {
    padding-left: 48px;
    padding-right: 48px;
  }
}

body.v1d .dpp-compact-header {
  margin-bottom: 0 !important;
  border-bottom-color: transparent;
  background: #1c1917;
}

body.v1d .main-content {
  margin-top: 0;
}

body.v1d .title-card {
  margin-top: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 18px;
}

body.v1d .title-card h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.v1d .title-card > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

body.v1d .card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 18px;
  margin-top: 14px;
}

body.v1d h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
}

body.v1d h3 {
  margin: 0 0 8px;
  color: #fafaf9;
  font-size: 1rem;
  font-weight: 700;
}

body.v1d p {
  margin: 6px 0;
  color: #d6d3d1;
  line-height: 1.65;
}

body.v1d .muted {
  color: var(--muted);
  font-size: 0.88rem;
}

body.v1d .foot-note {
  margin: 24px 0 8px;
  text-align: center;
  color: #57534e;
  font-size: 0.82rem;
  padding-top: 20px;
  border-top: 1px solid #292524;
}

body.v1d .foot-note a {
  color: var(--accent-soft);
}

body.v1d .foot-note a:hover {
  text-decoration: underline;
}

body.v1d .foot-note p {
  margin: 0;
}

body.v1d .foot-powered {
  margin-top: 8px;
  color: #57534e;
}

body.v1d .foot-powered a {
  color: #78716c;
}

body.v1d .btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 28px rgba(124, 45, 18, 0.35);
  transition: background 0.2s, border-color 0.2s;
}

body.v1d .btn:hover {
  background: var(--accent-hover);
}

body.v1d .btn.secondary {
  color: #e7e5e4;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  box-shadow: none;
}

body.v1d .btn.secondary:hover {
  border-color: var(--accent-soft);
}

body.v1d .pill {
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 6px;
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-text);
  background: rgba(124, 45, 18, 0.35);
}

body.v1d .warn {
  margin-top: 10px;
  border-left: 3px solid var(--accent-soft);
  padding-left: 10px;
  color: #fed7aa;
}

body.v1d .rule-list {
  margin: 0;
  padding-left: 18px;
  color: #d6d3d1;
}

body.v1d .rule-list li {
  margin: 6px 0;
}

body.v1d .grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 900px) {
  body.v1d .grid-2 {
    grid-template-columns: 1.2fr 1fr;
  }
}

body.v1d .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.v1d .score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

body.v1d .score-table th,
body.v1d .score-table td {
  border-bottom: 1px solid rgba(68, 64, 60, 0.65);
  padding: 8px 6px;
  text-align: left;
}

body.v1d .score-table th {
  color: var(--muted);
  font-weight: 700;
}

body.v1d .score-table td {
  color: #e7e5e4;
}

/* 玩法說明：遊戲類型分頁 */
body.v1d .guide-type-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

body.v1d .guide-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: #e7e5e4;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

body.v1d .guide-tab:hover {
  border-color: var(--accent-soft);
  color: var(--accent-text);
}

body.v1d .guide-tab.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(124, 45, 18, 0.35);
}

body.v1d .guide-tab--soon {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  font-weight: 600;
}

/* 附近地圖 */
body.v1d .nearby-toolbar {
  margin-top: 12px;
}

body.v1d .nearby-toolbar-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

body.v1d .nearby-title {
  margin: 0;
  font-size: clamp(1.25rem, 5vw, 1.45rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

body.v1d .nearby-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.v1d .nearby-status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

body.v1d .nearby-map {
  margin-top: 10px;
  min-height: 300px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  background: var(--surface-2);
}

/* Google Maps InfoWindow — 移除新版 API 預留 header 造成的頂部空白 */
.gm-style .gm-style-iw-c:has(.nearby-iw) {
  padding: 0 !important;
}

.gm-style .gm-style-iw-c:has(.nearby-iw) .gm-style-iw-ch {
  padding-top: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
}

.gm-style .gm-style-iw-c:has(.nearby-iw) .gm-style-iw-chr {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  height: auto !important;
  z-index: 1;
}

.gm-style .gm-style-iw-c:has(.nearby-iw) .gm-style-iw-d {
  overflow: hidden !important;
  max-height: none !important;
}

.nearby-iw {
  max-width: 220px;
  padding: 10px 32px 10px 12px;
  line-height: 1.45;
  color: #1c1917;
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nearby-iw strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  color: #0c0a09;
}

.nearby-iw span {
  display: block;
  font-size: 13px;
  color: #57534e;
}

body.v1d .nearby-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.v1d .nearby-list-scroll {
  max-height: 48vh;
  overflow-y: auto;
}

body.v1d .nearby-list .row {
  padding: 12px 0;
  border-bottom: 1px dashed rgba(68, 64, 60, 0.65);
}

body.v1d .nearby-list .row:last-child {
  border-bottom: none;
}

body.v1d .nearby-list .name {
  font-weight: 700;
  color: #fafaf9;
}

body.v1d .nearby-list .addr {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 4px;
}

body.v1d .row-addr-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
}

body.v1d .row-addr-line .addr {
  flex: 1;
  margin-top: 0;
  min-width: 0;
}

body.v1d .row-addr-btns {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 6px;
}

body.v1d .nearby-focus-map-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  min-height: 0;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(124, 45, 18, 0.28);
  color: var(--accent-text);
  cursor: pointer;
  font-family: inherit;
}

body.v1d .nearby-focus-map-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

body.v1d .nearby-focus-map-btn:not(:disabled):hover {
  border-color: var(--accent-soft);
  background: rgba(124, 45, 18, 0.45);
}

body.v1d .nearby-fallback {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
}

@media (min-width: 768px) {
  body.v1d .nearby-toolbar-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
