/* ===== Exchange ===== */
.shop-card.is-exchange {
  background: linear-gradient(160deg, rgba(74, 60, 26, .92), rgba(20, 22, 40, .95));
  border-color: rgba(245, 215, 122, .5);
}
.shop-card.is-exchange .shop-card-kicker { color: #f5d77a; }

.ex-root {
  --ex-cyan: #18e7ff;
  --ex-purple: #d64cff;
  --ex-green: #42f6a1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 16px;
  container-type: inline-size;
}

.ex-back {
  align-self: flex-start;
  color: #a9b8d8;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.ex-frame {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--frame-color) 76%, transparent);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--frame-color) 7%, transparent) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(color-mix(in srgb, var(--frame-color) 5%, transparent) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(160deg, rgba(8, 18, 43, .97), rgba(5, 8, 27, .99));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .025),
    inset 0 0 28px color-mix(in srgb, var(--frame-color) 10%, transparent),
    0 0 15px color-mix(in srgb, var(--frame-color) 17%, transparent);
}

.ex-frame::before,
.ex-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

.ex-frame::before {
  inset: 6px;
  opacity: .85;
  background:
    linear-gradient(var(--frame-color), var(--frame-color)) left top / 30px 1px no-repeat,
    linear-gradient(var(--frame-color), var(--frame-color)) left top / 1px 22px no-repeat,
    linear-gradient(var(--frame-color), var(--frame-color)) right bottom / 30px 1px no-repeat,
    linear-gradient(var(--frame-color), var(--frame-color)) right bottom / 1px 22px no-repeat;
}

.ex-frame::after {
  top: 0;
  right: 15%;
  width: 23%;
  height: 2px;
  background: var(--frame-color);
  box-shadow: 0 0 10px var(--frame-color);
}

.ex-frame-cyan { --frame-color: var(--ex-cyan); }
.ex-frame-purple { --frame-color: var(--ex-purple); }

.ex-hero {
  min-height: 126px;
  padding: 14px 20px 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 83% 58%, rgba(107, 35, 255, .28), transparent 29%),
    repeating-radial-gradient(circle at 84% 58%, transparent 0 20px, rgba(151, 67, 255, .13) 21px 22px),
    linear-gradient(150deg, rgba(38, 10, 78, .98), rgba(8, 7, 33, .99));
}

.ex-hero::after {
  top: 14px;
  right: -20px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(169, 71, 255, .23);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 17px, rgba(159, 65, 255, .12) 18px 19px);
  box-shadow: inset 0 0 40px rgba(111, 40, 255, .16);
}

.ex-eyebrow {
  position: relative;
  z-index: 3;
  display: block;
  color: #ef79ff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .28em;
  text-shadow: 0 0 10px rgba(226, 81, 255, .75);
}

.ex-hero h1 {
  position: relative;
  z-index: 3;
  margin: 2px 0 7px;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: .04em;
  text-shadow: 0 0 14px rgba(166, 99, 255, .65);
}

.ex-rate {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.ex-rate-side {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ex-rate-side b {
  font-size: clamp(23px, 7.5cqw, 34px);
  line-height: 1;
  font-weight: 950;
}

.ex-rate-side small {
  color: #9eb7e8;
  font-size: clamp(10px, 3.3cqw, 14px);
  font-weight: 900;
  letter-spacing: .04em;
}

.ex-rate-coin b,
.ex-rate-coin small {
  color: #ffe071;
  text-shadow: 0 0 13px rgba(255, 204, 60, .42);
}

.ex-rate-equals {
  color: #dce7ff;
  font-size: 20px;
  font-weight: 900;
}

.ex-rate-icon,
.ex-rate-icon img {
  width: clamp(31px, 10cqw, 43px);
  height: clamp(31px, 10cqw, 43px);
}

.ex-rate-note {
  position: relative;
  z-index: 3;
  margin-top: 8px;
  color: #c899f6;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .015em;
}

.ex-chart {
  height: 124px;
  overflow: hidden;
}

.ex-chart-head {
  position: absolute;
  z-index: 4;
  top: 11px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ex-chart-label {
  color: #46efff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  text-shadow: 0 0 10px rgba(24, 231, 255, .45);
}

.ex-chart-cur {
  color: #58f3cf;
  font-size: 18px;
  font-weight: 950;
  text-shadow: 0 0 12px rgba(66, 246, 161, .42);
}

.ex-chart-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ex-chart-grid path {
  fill: none;
  stroke: rgba(36, 195, 235, .18);
  stroke-width: 1;
  stroke-dasharray: 2 5;
}

.ex-chart-line {
  fill: none;
  stroke: #6cffbc;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ex-chart-dot {
  fill: #6cffbc;
  stroke: #d8fff0;
  stroke-width: 2;
  filter: drop-shadow(0 0 6px #42f6a1);
}

.ex-chart-range {
  position: absolute;
  z-index: 4;
  left: 16px;
  bottom: 7px;
  color: #54eaa5;
  font-size: 8px;
  font-weight: 800;
}

.ex-chart-empty {
  display: grid;
  height: 100%;
  place-items: center;
  color: #8aa3ca;
  font-size: 12px;
}

.ex-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 18px 14px;
}

.ex-card.medal_to_coin {
  background:
    radial-gradient(circle at 85% 25%, rgba(144, 45, 255, .15), transparent 34%),
    linear-gradient(160deg, rgba(17, 13, 54, .98), rgba(7, 8, 29, .99));
}

.ex-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #eff5ff;
  font-size: 17px;
}

.ex-card-currency {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ex-card-currency .cur-ic,
.ex-card-currency .cur-ic img {
  width: 31px;
  height: 31px;
}

.ex-card-currency b {
  font-size: 18px;
  font-weight: 950;
  letter-spacing: .035em;
}

.ex-direction {
  color: var(--frame-color);
  font-size: 29px;
  line-height: 1;
  text-shadow: 0 0 10px var(--frame-color);
}

.ex-balance {
  color: #91bce9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.medal_to_coin .ex-balance { color: #c99af4; }

.ex-stepper {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 8px;
  align-items: stretch;
}

.ex-step-btn,
.ex-step-amount {
  min-height: 46px;
  border: 1px solid color-mix(in srgb, var(--frame-color) 72%, transparent);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  background: linear-gradient(160deg, rgba(14, 35, 72, .96), rgba(7, 14, 42, .98));
  box-shadow: inset 0 0 13px color-mix(in srgb, var(--frame-color) 10%, transparent);
}

.ex-step-btn {
  color: var(--frame-color);
  cursor: pointer;
  font-size: 25px;
  font-weight: 500;
  text-shadow: 0 0 10px var(--frame-color);
}

.ex-step-btn:active:not(:disabled) { transform: scale(.96); }
.ex-step-btn:disabled { cursor: not-allowed; opacity: .32; }

.ex-step-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  padding: 5px 7px;
}

.ex-step-amount strong {
  overflow: hidden;
  color: #f4f7ff;
  font-size: clamp(23px, 7vw, 34px);
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  text-shadow: 0 0 12px rgba(105, 168, 255, .45);
}

.ex-step-amount span {
  color: var(--frame-color);
  font-size: 11px;
  font-weight: 950;
}

.ex-result {
  display: flex;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ex-green);
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 0 9px rgba(66, 246, 161, .32);
}

.ex-result strong { font-size: 15px; }
.ex-result-arrow { font-size: 17px; }
.ex-result-error { color: #ff8ca4; font-size: 11px; text-shadow: none; }

.ex-go {
  position: relative;
  width: 100%;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .68);
  clip-path: polygon(11px 0, calc(100% - 11px) 0, 100% 11px, 100% calc(100% - 11px), calc(100% - 11px) 100%, 11px 100%, 0 calc(100% - 11px), 0 11px);
  background: linear-gradient(100deg, #14d9f4 0%, #67b6ff 42%, #d235f3 100%);
  box-shadow: 0 0 18px rgba(58, 193, 255, .34), inset 0 0 14px rgba(255, 255, 255, .18);
  color: #06112e;
  cursor: pointer;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: .08em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}

.ex-go::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(120deg, transparent 0 28px, rgba(255, 255, 255, .07) 29px 30px);
  pointer-events: none;
}

.ex-go:active:not(:disabled) { transform: scale(.988); }
.ex-go:disabled { cursor: not-allowed; filter: grayscale(.7); opacity: .42; }

.ex-go-chevron {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-top: 2px solid rgba(255, 255, 255, .45);
  border-right: 2px solid rgba(255, 255, 255, .45);
}

.ex-go-chevron-left {
  left: 18px;
  transform: translateY(-50%) rotate(45deg);
}

.ex-go-chevron-right {
  right: 18px;
  transform: translateY(-50%) rotate(225deg);
}

.ex-note {
  margin: -2px 0 0;
  color: #7185aa;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

/* 両替確認モーダル */
.ex-confirm-modal {
  padding: 18px 16px 14px;
  border-radius: 14px;
  border-color: rgba(24, 231, 255, .72);
  background: linear-gradient(160deg, rgba(9, 25, 57, .98), rgba(13, 8, 39, .99));
  box-shadow: 0 0 28px rgba(24, 231, 255, .2), inset 0 0 22px rgba(124, 58, 237, .1);
}

.ex-confirm-modal .rm-title {
  margin: 2px 0 5px;
  font-size: 17px;
}

.ex-confirm-modal .rm-lines {
  margin: 8px 0;
  gap: 4px;
}

.ex-confirm-modal .rm-line {
  font-size: 13px;
}

/* アイコンなしの行(レート表示)では空のアイコン枠を詰める */
.ex-confirm-modal .rm-line > span:empty {
  display: none;
}

.ex-confirm-modal > .row {
  gap: 8px;
  margin-top: 9px;
}

.ex-confirm-modal > .row .btn,
.ex-confirm-modal > .row .cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .02em;
}

.ex-confirm-modal > .row .btn {
  color: #a9c7ed;
  border-color: rgba(71, 177, 255, .42);
  background: rgba(7, 20, 48, .95);
  box-shadow: inset 0 0 12px rgba(34, 211, 238, .07);
}

.ex-confirm-modal > .row .cta-btn {
  color: #06112e;
  border: 1px solid rgba(255, 255, 255, .55);
  background: linear-gradient(100deg, #18d9f4, #7db2ff 48%, #d23af0);
  box-shadow: 0 0 15px rgba(52, 192, 255, .25);
}

.ex-guest-gate {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ex-guest-gate p {
  position: relative;
  z-index: 3;
  color: #b8c1d8;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 370px) {
  .ex-hero { padding-inline: 17px; }
  .ex-rate { gap: 8px; }
  .ex-card { padding-inline: 13px; }
  .ex-stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 7px; }
  .ex-card-title { gap: 8px; }
}

@container (min-width: 640px) {
  .ex-root { gap: 15px; }
  .ex-hero { min-height: 150px; padding: 18px 28px 15px; }
  .ex-hero h1 { font-size: 27px; }
  .ex-rate-note { font-size: 10px; }
  .ex-chart { height: 154px; }
  .ex-chart-label { font-size: 13px; }
  .ex-card { padding: 19px 24px; }
  .ex-stepper { grid-template-columns: 56px minmax(0, 1fr) 56px; }
  .ex-step-btn, .ex-step-amount { min-height: 54px; }
  .ex-go { min-height: 48px; font-size: 18px; }
}
