.mountain-gacha { --mountain-ink: #692542; font-size: 18px; line-height: 1.5; }
.mountain-gacha *, .mountain-gacha *::before, .mountain-gacha *::after { box-sizing: border-box; }
.mountain-gacha button { cursor: pointer; touch-action: manipulation; }
.mountain-gacha button:disabled { cursor: default; }
.mountain-gacha button:focus-visible { outline: 3px solid #a71265; outline-offset: 3px; }
.mountain-gacha .gacha-heading { flex-wrap: wrap; }
.mountain-gacha .gacha-heading-name { flex: 1 1 250px; }
.mountain-gacha .gacha-points-badge { white-space: normal; overflow-wrap: anywhere; }
.mountain-cost-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.mountain-history-button {
  --gacha-button-color: var(--wk-button-history);
  --gacha-button-hover-color: var(--wk-button-history-hover);
  --gacha-button-foreground: #fff;
  --gacha-button-border-color: var(--wk-button-history);
  --gacha-button-edge: var(--wk-button-history-edge);
  --gacha-button-font-size: 18px;
  --gacha-button-min-height: 46px;
  --gacha-button-inline-padding: 8px;
  --gacha-button-text: none;
}
.mountain-history-share { grid-column: 1 / -1; min-width: 0; overflow-wrap: anywhere; }
.mountain-gacha .gacha-collection-modal { --gacha-title-display: inline-flex; --gacha-title-align: center; --gacha-title-white-space: nowrap; --gacha-title-gap: 6px; }
.mountain-record-points { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 8px; color: #555; font-size: 16px; font-weight: 900; line-height: 1.4; }
.mountain-record-points b { font: inherit; white-space: nowrap; }
.mountain-return { font-size: 16px; color: #903b64; white-space: nowrap; }
.mountain-status { text-align: center; margin: 14px 0; overflow-wrap: anywhere; }
.mountain-status:empty { display: none; }
.mountain-results { margin: 24px 0 14px; min-width: 0; }
.mountain-results:empty { display: none; }
.mountain-results.drawing { opacity: .5; }
.mountain-result-image { display: block; width: 100%; max-width: 480px; height: auto; margin: 0 auto; object-fit: contain; }
.mountain-card-points { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-family: Arial, sans-serif; font-variant-numeric: tabular-nums; }
.mountain-card-label { display: inline-flex; align-items: center; gap: .25em; min-width: 0; font-size: inherit; font-weight: 700; text-align: left; white-space: nowrap; }
.mountain-card-rank { line-height: 1; }
.mountain-card-name { font-size: .94em; line-height: 1; }
.mountain-card-value { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.mountain-card-points strong { font-size: inherit; font-weight: 700; letter-spacing: -.02em; }
.mountain-card-unit { font-size: 17px; font-weight: 600; letter-spacing: .05em; }
/* Only the mountain collection has explanatory card backs. Shared modal chrome stays unchanged. */
.mountain-collection-hint { margin: 18px 10px 0; color: #c91538; font-size: 18px; font-weight: 400; line-height: 1.5; text-align: center; }
.mountain-collection-hint span { display: inline-block; max-width: 100%; }
.mountain-collection-jump { position: sticky; top: 24px; height: 0; z-index: 100020; display: flex; justify-content: flex-end; pointer-events: none; }
.mountain-collection-jump[hidden] { display: none; }
.mountain-collection-jump button { pointer-events: auto; min-height: 44px; padding: 8px 14px; border: 2px solid #fff; border-radius: 24px; background: #008d46; color: #fff; box-shadow: 0 2px 8px #0003; font-size: 16px; font-weight: 700; }
.mountain-card-guide { min-height: 1.5em; margin: 12px 0 0; color: #fff; font-size: 16px; font-weight: 400; line-height: 1.5; text-align: center; }
.mountain-card-zoom { position: fixed; inset: 0; z-index: 100100; display: grid; place-items: center; padding: 16px; background: #142030a3; overscroll-behavior: contain; }
.mountain-card-zoom[hidden] { display: none; }
.mountain-card-zoom-panel { width: min(400px, 100%); max-height: calc(100dvh - 32px); padding: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.mountain-card-zoom-controls { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.mountain-card-zoom-controls button { min-height: 44px; padding: 8px 16px; border: 2px solid #fff; border-radius: 24px; background: #fff; color: #333; font: 700 16px/1.4 "Meiryo", sans-serif; }
.mountain-collection-grid .gacha-collection-item:hover { transform: none; box-shadow: none; }
.mountain-collection-card { position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; padding: 0; border: 0; border-radius: 6%; background: transparent; color: #25292b; box-shadow: none; perspective: 1400px; font-family: "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif; text-align: left; }
.mountain-card-turner { display: block; position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .4s ease; }
.mountain-collection-card[aria-pressed="true"] .mountain-card-turner { transform: rotateY(180deg); }
.mountain-card-front, .mountain-card-back { position: absolute; display: block; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mountain-card-back { transform: rotateY(180deg); }
.mountain-card-back-frame { display: block; width: 100%; height: 100%; object-fit: fill; }
.mountain-card-back-paper { position: absolute; top: var(--mountain-card-header-height); left: 4%; right: 4%; bottom: 4%; border-radius: 0 0 4px 4px; background: #fffdf9; }
.mountain-card-back-header { position: absolute; display: block; top: 0; left: 0; width: 100%; aspect-ratio: 1000 / 202; overflow: hidden; }
.mountain-card-back-header .mountain-result-image { width: 100%; height: auto; }
.mountain-card-back-content { position: absolute; display: grid; grid-template-rows: 84px minmax(0, 1fr); gap: 16px; inset: 0 8% 5%; padding-top: 24.5%; font-size: 17px; font-weight: 400; line-height: 2; word-break: normal; overflow-wrap: normal; line-break: strict; }
.mountain-ruby-word { display: inline-block; white-space: nowrap; }
.mountain-card-back-content ruby { ruby-align: center; ruby-position: over; }
.mountain-card-back-content rt { font-size: 12px; font-weight: 400; line-height: 1; letter-spacing: 0; }
.mountain-card-back-content rp { display: none; }
.mountain-card-section { display: flex; min-height: 0; flex-direction: column; gap: 8px; }
.mountain-card-section-label { flex: 0 0 auto; padding-bottom: 5px; border-bottom: 1px solid #d5c6c6; color: #92313d; font-size: 16px; font-weight: 700; letter-spacing: .08em; }
.mountain-card-trivia { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; text-align: start; cursor: inherit; }
.mountain-card-location { font-weight: 700; }
@media screen and (max-width: 480px) {
  .mountain-gacha .gacha-collection-modal { --gacha-title-gap: 4px; }
  .mountain-gacha .gacha-collection-header h2.gacha-collection-title { letter-spacing: 0; }
  .mountain-gacha .gacha-collection-title::before,
  .mountain-gacha .gacha-collection-title::after { content: "🍀"; margin: 0; font-size: 15px; flex: 0 0 auto; }
  .mountain-card-back-content { grid-template-rows: 78px minmax(0, 1fr); gap: 14px; font-size: 16px; }
  .mountain-card-section { gap: 6px; }
  .mountain-card-section-label { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .mountain-card-turner { transition: none; }
}
