* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: #F6F3EC;
  color: #1C1915;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 12px 24px;
}
.top h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}
.last {
  margin-top: 16px;
  background: #FFFCF7;
  border: 1px solid #E4DDD0;
  border-radius: 12px;
  padding: 12px 14px;
}
.last-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.label { font-size: 14px; font-weight: 700; }
.last-text {
  margin: 10px 0 0;
  max-height: 88px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: #5C564C;
}
.copy-all-wrap { margin-top: 14px; }
.hint {
  margin: 8px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: #C45A12;
}
.btn {
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  font-family: inherit;
}
.btn.primary {
  width: 100%;
  min-height: 48px;
  background: #FF8A3D;
  color: #1C1915;
}
.btn.ghost {
  min-height: 40px;
  padding: 0 14px;
  background: #FFF1E4;
  color: #C45A12;
}
.btn.tiny {
  min-height: 40px;
  padding: 0 12px;
  background: #FF8A3D;
  color: #1C1915;
  flex: 0 0 auto;
}
.sections { margin-top: 14px; }
.section {
  background: #FFFCF7;
  border: 1px solid #E4DDD0;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.section-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 4px;
}
.section-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.chev {
  width: 18px;
  color: #8E877A;
  transition: transform 0.15s ease;
}
.section.open .chev { transform: rotate(90deg); }
.section-body {
  display: none;
  margin: 0;
  padding: 0 14px 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: #3A342C;
}
.section.open .section-body { display: block; }

.ad-slot { margin: 0 0 8px; }
.ad-banner {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: #2B241C;
  color: #FFF6EA;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.ad-tag {
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #FF8A3D;
  color: #1C1915;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.ad-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ad-copy strong {
  font-size: 15px;
  line-height: 1.2;
}
.ad-copy em {
  font-style: normal;
  font-size: 12px;
  color: #E7D3BC;
  line-height: 1.3;
}
.ad-banner .mp-icon { color: #FF8A3D; font-size: 22px; }
.ad-sheet {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #FFFCF7;
  border: 1px solid #E4DDD0;
}
.ad-sheet[hidden] { display: none; }
.ad-sheet p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #3A342C;
}
.hole-game { margin-top: 0; }
.hole-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hole-hud > :nth-child(2) { text-align: center; }
.hole-hud > :last-child { justify-self: end; }
.hole-hud .btn { min-height: 36px; }
.hole-hud .btn:disabled { opacity: .48; cursor: default; }
.hole-stats { min-height: 36px; }
.hole-field { position: relative; overflow: hidden; border-radius: 8px; }
#hole-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: pointer;
}
.hole-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: rgba(12, 19, 23, .42);
  color: #fff5e5;
  text-align: center;
  pointer-events: none;
}
.hole-overlay[hidden] { display: none; }
.hole-overlay h2 { margin: 0; font-size: 20px; }
.hole-overlay .btn {
  width: auto;
  min-width: 132px;
  padding-inline: 14px;
  pointer-events: auto;
}
.hole-template { margin-top: 12px; }
.hole-template summary { cursor: pointer; padding-block: 8px; }
