:root {
  --green: rgb(69, 151, 130);
  --red: rgb(223, 72, 76);
  --ink: #e9ecef;
  --mute: rgba(233, 236, 239, .55);
  --line: rgba(255, 255, 255, .08);
  --glass: rgba(18, 20, 22, .82);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--ink); overflow: hidden; }
body { font-family: 'Roboto', Arial, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
#stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#price {
  font-size: 26vw; font-weight: 500; line-height: 1; white-space: nowrap; margin: 0;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em; text-align: center;
  color: var(--green); user-select: none;
}
#label {
  position: fixed; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom));
  text-align: center; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .28); pointer-events: none; transition: opacity .6s;
}
#label b { font-weight: 500; color: rgba(255, 255, 255, .42); }
#gear {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right));
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: transparent; color: rgba(255, 255, 255, .32); cursor: pointer;
  transition: opacity .6s, color .2s, background .2s, transform .5s;
}
#gear:hover, #gear:focus-visible { color: #fff; background: rgba(255, 255, 255, .08); transform: rotate(45deg); outline: none; }
body.idle #gear { opacity: 0; }
body.idle { cursor: none; }

#scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .25s; }
body.open #scrim { opacity: 1; }
#panel {
  position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(400px, calc(100vw - 24px));
  background: var(--glass); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--line); border-radius: 20px; padding: 18px 18px 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  overflow-y: auto; transform: translateX(calc(100% + 24px)); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
body.open #panel { transform: none; }
#panel header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
#panel h2 { font-size: 17px; font-weight: 500; margin: 0; letter-spacing: .01em; }
#close { border: 0; background: rgba(255,255,255,.06); color: var(--ink); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
#close:hover { background: rgba(255,255,255,.14); }
#panel section { margin-top: 16px; }
#panel h3 { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.step { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(69,151,130,.18); color: var(--green); font-size: 10px; letter-spacing: 0; }
.seg { display: flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; }
.seg button { flex: 1; min-width: 0; padding: 8px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--mute); font: 500 13px Roboto, Arial, sans-serif; cursor: pointer; transition: background .15s, color .15s; }
.seg button:hover:not(:disabled) { color: var(--ink); background: rgba(255,255,255,.05); }
.seg button.on { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.seg button:disabled { opacity: .28; cursor: not-allowed; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.grid button {
  text-align: left; padding: 9px 11px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: var(--ink); font: 500 13.5px Roboto, Arial, sans-serif; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 6px;
  transition: border-color .15s, background .15s;
}
.grid button small { font-weight: 400; font-size: 10.5px; color: var(--mute); letter-spacing: .03em; white-space: nowrap; }
.grid button small i { font-style: normal; color: var(--green); }
.grid button:hover { background: rgba(255,255,255,.07); }
.grid button.on { border-color: rgba(69,151,130,.8); background: rgba(69,151,130,.12); }
#route { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px dashed rgba(255,255,255,.08); font-size: 12.5px; color: var(--mute); line-height: 1.45; }
#route b { color: var(--ink); font-weight: 500; }
.row2 { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; }
.row2 > div { min-width: 0; }
#col button[data-v="rg"] { background-image: linear-gradient(90deg, transparent 0 0); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
#panel footer { margin-top: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#copy { border: 0; border-radius: 11px; padding: 10px 14px; background: var(--green); color: #fff; font: 500 13px Roboto, Arial, sans-serif; cursor: pointer; }
#copy:hover { filter: brightness(1.1); }
#fxinfo { font-size: 11px; color: rgba(233,236,239,.4); }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr 1fr; } #panel { top: auto; height: 82vh; bottom: 0; right: 0; left: 0; width: 100%; border-radius: 20px 20px 0 0; transform: translateY(100%); } }
