/* ============================================================
   パチノリ — Night Lounge design system
   ============================================================ */

:root {
  --bg: #0f0e12;
  --surface: #17151c;
  --surface-2: #201e27;
  --surface-3: #2a2833;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #f2f0ec;
  --muted: #978f84;
  --faint: #645d54;
  --gold: #e6c36b;
  --gold-deep: #c9a03f;
  --gold-soft: rgba(230, 195, 107, 0.14);
  --green: #54c08a;
  --green-soft: rgba(84, 192, 138, 0.13);
  --red: #e8806b;
  --red-soft: rgba(232, 128, 107, 0.13);
  --line-brand: #06c755;
  --radius: 20px;
  --radius-s: 13px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

button { font-family: inherit; }
[hidden] { display: none !important; }

.bgGlow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 38% at 50% -6%, rgba(233, 196, 106, 0.10), transparent 70%),
    radial-gradient(50% 32% at 85% 8%, rgba(61, 214, 140, 0.05), transparent 70%);
  z-index: 0;
}

/* ---------- top bar ---------- */

.topBar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 14, 19, 0.78);
  border-bottom: 1px solid var(--line);
}

.topBarInner {
  max-width: 470px;
  margin: 0 auto;
  padding: 12px 18px;
  padding-top: calc(12px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 8px; }

.brandMark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3.5px solid var(--gold);
  position: relative;
  flex: none;
}
.brandMark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
}

.brandName {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.topBarSession {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sessionName {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.statusChip {
  flex: none;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.statusChip.isOpen { color: var(--gold); background: var(--gold-soft); }
.statusChip.isLocked { color: var(--muted); background: rgba(255, 255, 255, 0.06); }

.workspaceTabs {
  max-width: 470px;
  margin: 0 auto;
  padding: 0 16px 10px;
  display: flex;
  align-items: start;
  gap: 11px;
}

.tabGroup {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 5px;
}

/* 記録▸終了▸清算 を1本の藍ラインで連結し「処理の流れ」を示す */
.tabGroupProcess {
  flex: 3;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(230, 195, 107, 0.45);
}

.tabGroupRef { flex: 2; }

.workspaceTab {
  appearance: none;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.06s ease;
}
.workspaceTab:active { transform: scale(0.97); }
.workspaceTab.isOn {
  color: #2a2008;
  background: linear-gradient(135deg, #f0d089, var(--gold));
  border-color: rgba(233, 196, 106, 0.72);
  box-shadow: 0 8px 18px rgba(233, 196, 106, 0.14);
}

/* ---------- shell / view ---------- */

.shell {
  position: relative;
  z-index: 1;
  max-width: 470px;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

.view { display: flex; flex-direction: column; gap: 14px; }

.mainSection {
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: calc(112px + env(safe-area-inset-top));
}

.view > * {
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.view > *:nth-child(2) { animation-delay: 0.05s; }
.view > *:nth-child(3) { animation-delay: 0.1s; }
.view > *:nth-child(4) { animation-delay: 0.15s; }
.view > *:nth-child(5) { animation-delay: 0.2s; }
.view > *:nth-child(6) { animation-delay: 0.24s; }
.view > *:nth-child(7) { animation-delay: 0.28s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- generic card ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
}

.cardHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.cardTitle {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cardLead {
  margin: 8px 0 14px;
  font-size: 13px;
  color: var(--muted);
}
.cardLead code {
  color: var(--gold);
  font-size: 12px;
}

.cardHint { font-size: 11px; color: var(--faint); font-weight: 600; }

.subTitle {
  margin: 18px 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- buttons / inputs ---------- */

.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius-s);
  font-size: 15px;
  font-weight: 800;
  padding: 14px 18px;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.06s ease, opacity 0.15s ease, filter 0.15s ease;
  letter-spacing: 0.02em;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:disabled:active { transform: none; }

.btnGold {
  background: linear-gradient(135deg, #f0d089, var(--gold) 45%, var(--gold-deep));
  color: #2a2008;
  box-shadow: 0 8px 22px rgba(233, 196, 106, 0.22);
}

.btnGhost {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
}

.btnDanger {
  background: rgba(255, 107, 91, 0.12);
  border: 1px solid rgba(255, 107, 91, 0.36);
  color: var(--red);
}

.btnLine {
  background: var(--line-brand);
  color: #fff;
  box-shadow: 0 8px 22px rgba(6, 199, 85, 0.2);
}

.linkButton {
  appearance: none;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 10px;
  margin: 6px auto 0;
  display: block;
}

.textInput {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.15s ease;
}
.textInput::placeholder { color: var(--faint); font-weight: 500; }
.textInput:focus { border-color: var(--gold); }

.fieldRow { display: flex; gap: 8px; }
.fieldRow .textInput { flex: 1; min-width: 0; }
.fieldRow .btn { flex: none; }

/* ---------- welcome / connect ---------- */

.welcome { padding: 26px 4px 6px; }

.welcomeKicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.welcomeTitle {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 900;
}

.welcomeLead { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- join ---------- */

.joinCard { text-align: left; }

.joinKicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.joinTitle { margin: 0 0 4px; font-size: 24px; font-weight: 900; }

.joinMeta { margin: 0 0 20px; font-size: 12px; color: var(--muted); }

.blockLabel {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.claimList { display: flex; flex-wrap: wrap; gap: 8px; }

.claimChip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  padding: 9px 16px 9px 9px;
  cursor: pointer;
  transition: transform 0.06s ease, border-color 0.15s ease;
}
.claimChip small {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
}
.claimChip.isMine {
  border-color: rgba(233, 196, 106, 0.58);
  background: var(--gold-soft);
}
.claimChip:disabled {
  opacity: 0.48;
  cursor: default;
}
.claimChip:active { transform: scale(0.96); }

.orDivider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
}
.orDivider::before,
.orDivider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  appearance: none;
  width: 100%;
  display: block;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  background:
    radial-gradient(120% 140% at 85% -20%, rgba(233, 196, 106, 0.16), transparent 55%),
    linear-gradient(160deg, #171d2c, #10141e 70%);
  border: 1px solid rgba(233, 196, 106, 0.22);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
  transition: transform 0.06s ease;
}
.hero:active { transform: scale(0.995); }

.heroHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.heroLabel {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.liveDot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--faint);
}
.liveDot i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}
.liveDot.isLocked i { background: var(--faint); animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.heroNet {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 12px;
  line-height: 1.1;
  transition: color 0.3s ease;
}
.heroNet.isPlus { color: var(--green); text-shadow: 0 0 34px rgba(61, 214, 140, 0.35); }
.heroNet.isMinus { color: var(--red); text-shadow: 0 0 34px rgba(255, 107, 91, 0.3); }
.heroNet.isZero { color: var(--text); }

.heroBar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 107, 91, 0.28);
  overflow: hidden;
  margin-bottom: 14px;
}
.heroBarFill {
  height: 100%;
  width: 50%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2fae74, var(--green));
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.heroMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.heroRateCaption { font-size: 12px; font-weight: 700; color: var(--muted); }
.heroRateCaption b {
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.heroExpandHint {
  font-size: 11px;
  font-weight: 700;
  color: var(--faint);
  transition: opacity 0.15s ease;
}
.hero.isExpanded .heroExpandHint { opacity: 0.45; }

.heroStats { display: none; gap: 8px; margin-top: 12px; }
.hero.isExpanded .heroStats { display: flex; }


.heroStat {
  flex: 1;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.heroStat span { font-size: 10px; font-weight: 700; color: var(--faint); letter-spacing: 0.06em; }
.heroStat b {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- me card ---------- */

.meCard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
}

.meLeft { display: flex; align-items: center; gap: 12px; min-width: 0; }

.meAvatar,
.railAvatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #10141e;
  flex: none;
}

.meText { display: flex; flex-direction: column; min-width: 0; }
.meName {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meSub {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meNet {
  font-size: 24px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.meNet.isPlus { color: var(--green); }
.meNet.isMinus { color: var(--red); }

/* ---------- member rail ---------- */

.memberRail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}
.memberRail::-webkit-scrollbar { display: none; }

.railCard {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  padding: 12px 14px;
  min-width: 108px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.06s ease;
  position: relative;
}
.railCard:active { transform: scale(0.96); }
.railCard.isMe { border-color: rgba(233, 196, 106, 0.45); }

.railTop { display: flex; align-items: center; gap: 8px; width: 100%; }
.railAvatar { width: 30px; height: 30px; font-size: 13px; }

.railCrown {
  position: absolute;
  top: -7px;
  left: 10px;
  font-size: 14px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.railName {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 76px;
}

.railNet {
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.railNet.isPlus { color: var(--green); }
.railNet.isMinus { color: var(--red); }
.railNet.isZero { color: var(--muted); }

/* ---------- record input ---------- */

.recordControlCard {
  margin-bottom: 12px;
}

.recordControlCard .cardHead {
  margin-bottom: 10px;
}

.recordLockNotice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(233, 196, 106, 0.32);
  border-radius: var(--radius-s);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.inputModeToggle {
  margin-top: 10px;
  margin-bottom: 0;
}

.inputModeBtn.isOn {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--text);
}

.inputCard {
  padding: 16px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

.inputCard .cardHead { margin-bottom: 10px; }

.targetRow {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.targetRow::-webkit-scrollbar { display: none; }

.myInvestmentSummary {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  border-radius: var(--radius-s);
  padding: 9px 12px;
  margin-bottom: 10px;
}
.myInvestmentSummary[hidden] { display: none; }
.myInvestmentText {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.myInvestmentSummary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.myInvestmentSummary span::before {
  content: '¥';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}
.myInvestmentSummary small {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.myInvestmentSummary b {
  margin-left: auto;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.myInvestmentSummary b.isPlus { color: var(--green); }
.myInvestmentSummary b.isMinus { color: var(--red); }
.myInvestmentSummary b.isZero { color: var(--text); }

.targetChip {
  appearance: none;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 14px 8px 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.06s ease;
}
.targetChip:active { transform: scale(0.95); }
.targetChip .chipAvatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #10141e;
}
.targetChip.isOn {
  border-color: var(--gold);
  color: var(--text);
  background: var(--gold-soft);
}

.kindToggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.kindBtn {
  appearance: none;
  border-radius: var(--radius-s);
  border: 1.5px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  min-height: 44px;
  padding: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
}
.kindBtn:disabled,
.quickBtn:disabled,
.heldPreset:disabled {
  opacity: 0.45;
  cursor: default;
}
.quickBtn:disabled:active { transform: none; }

.kindIcon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  background: var(--surface-3);
}

.kindBtn.kindInvest.isOn {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}
.kindBtn.kindInvest.isOn .kindIcon { background: var(--red); color: #fff; }

.kindBtn.kindRecover.isOn {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}
.kindBtn.kindRecover.isOn .kindIcon { background: var(--green); color: #08130d; }

.amountBox {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 9px 12px;
  margin-bottom: 8px;
}

.amountYen { font-size: 20px; font-weight: 800; color: var(--faint); }

.amountValue {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 36px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.05;
  text-align: right;
  outline: none;
}
.amountValue::placeholder { color: var(--faint); }
.amountValue.isEmpty { color: var(--faint); }
.amountValue:disabled { opacity: 1; -webkit-text-fill-color: var(--muted); }

.quickRow {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 52px;
  gap: 6px;
  margin-bottom: 8px;
}

.quickBtn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--gold);
  border-radius: var(--radius-s);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  min-height: 36px;
  padding: 8px 4px;
  cursor: pointer;
  transition: transform 0.06s ease;
}
.quickBtn:active { transform: scale(0.94); }
.quickClear { color: var(--muted); }
.quickMinus { color: var(--red); }
.cashQuickAddRow { grid-template-columns: repeat(3, 1fr); }
.cashResult { margin-top: 2px; }

.memoInput {
  font-size: 14px;
  margin-bottom: 10px;
  padding: 11px 12px;
}

.submitBtn {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 5;
  width: 100%;
  font-size: 16px;
  padding: 14px;
  transition: background 0.2s ease, transform 0.06s ease, opacity 0.15s ease;
}
.submitBtn.isInvest,
.submitBtn.isRecover {
  background: linear-gradient(135deg, #f0d089, var(--gold) 45%, var(--gold-deep));
  color: #2a2008;
  box-shadow: 0 8px 22px rgba(233, 196, 106, 0.22);
}

/* ---------- 持ちメダル / 玉 ---------- */

.heldCard { margin-bottom: 12px; }
.heldUnitToggle { margin-bottom: 10px; }
.heldUnitBtn.isOn {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--text);
}

.heldRateRow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.heldRateLabel { font-size: 14px; font-weight: 800; color: var(--muted); }
.heldRateYen { font-weight: 800; color: var(--muted); }
.heldRateInput {
  width: 92px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.heldRatePresets {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.heldPreset {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--gold);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.heldPreset small { color: var(--faint); font-size: 10px; font-weight: 700; }
.heldPreset.isOn {
  border-color: var(--gold);
  color: var(--text);
  background: var(--gold-soft);
}

.heldCountBox {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 9px 14px;
  margin-bottom: 8px;
}
.heldCountInput {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 34px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: right;
  outline: none;
}
.heldCountInput::placeholder { color: var(--faint); }
.heldCountUnit { font-size: 18px; font-weight: 800; color: var(--muted); }

.heldQuickRow { margin-bottom: 10px; }

.heldResult {
  background: var(--gold-soft);
  border: 1px solid rgba(233, 196, 106, 0.3);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.heldResultRow,
.heldNetRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.heldResultRow { margin-bottom: 8px; }
.heldResultLabel,
.heldNetLabel { font-size: 13px; font-weight: 700; color: var(--muted); }
.heldResultValue {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.heldNetRow {
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.heldNetLabel { font-size: 14px; color: var(--text); }
.heldNetValue {
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.heldNetValue.isPlus { color: var(--green); }
.heldNetValue.isMinus { color: var(--red); }
.heldNetValue.isZero { color: var(--text); }
.heldNote {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.5;
}

.heldCashRecoveryBtn { width: 100%; }

/* ---------- finish reports ---------- */

.finishIdentityList {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: none;
}
.finishIdentityList::-webkit-scrollbar { display: none; }

.finishIdentityChip {
  appearance: none;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 7px 12px 7px 8px;
  cursor: pointer;
}
.finishIdentityChip.isOn {
  color: var(--text);
  border-color: rgba(233, 196, 106, 0.68);
  background: var(--gold-soft);
}
.finishIdentityChip:disabled {
  opacity: 0.45;
  cursor: default;
}

.finishIdentityText {
  display: flex;
  align-items: center;
  line-height: 1.15;
}
.finishIdentityText b { font-size: 13px; font-weight: 900; }

.finishReportMark {
  margin-left: 4px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.finishList {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.finishMemberCard {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.finishMemberCard.isReadonly { opacity: 0.66; }

.finishMemberHead,
.finishMemberMain {
  display: flex;
  align-items: center;
  gap: 10px;
}
.finishMemberHead { justify-content: space-between; }
.finishMemberMain { min-width: 0; }

.finishMemberName {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.finishField {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.finishField > span:first-child {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.finishMoneyBox {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 10px 14px;
}
.finishMoneyBox > span {
  flex: none;
  font-size: 18px;
  font-weight: 900;
  color: var(--muted);
}

.finishInput {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 29px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: right;
  outline: none;
}
.finishInput::placeholder { color: var(--faint); }
.finishInput:disabled { opacity: 1; -webkit-text-fill-color: var(--muted); }

.finishUnitToggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.finishUnitButton {
  appearance: none;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.finishUnitButton.isOn {
  color: var(--text);
  border-color: var(--gold);
  background: var(--gold-soft);
}
.finishUnitButton:disabled { cursor: default; }

.finishNetBox {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: var(--gold-soft);
  border: 1px solid rgba(233, 196, 106, 0.3);
  border-radius: var(--radius-s);
  padding: 12px 14px;
}
.finishNetBox span {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.finishNetValue {
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.finishNetValue.isPlus { color: var(--green); }
.finishNetValue.isMinus { color: var(--red); }
.finishNetValue.isZero { color: var(--text); }

.finishActions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* ---------- locked banner ---------- */

.lockedBanner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--gold-soft);
  border: 1px solid rgba(233, 196, 106, 0.35);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.lockedIcon { font-size: 22px; }
.lockedBanner b { display: block; font-size: 14px; color: var(--gold); }
.lockedBanner span { font-size: 12px; color: var(--muted); }

/* ---------- settlement ---------- */

.modeChip {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  background: var(--gold-soft);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.rankList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.rankRow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.rankRow:last-child { border-bottom: 0; }

.rankBadge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  background: var(--surface-3);
  color: var(--muted);
  flex: none;
  font-variant-numeric: tabular-nums;
}
.rankBadge.r1 { background: linear-gradient(135deg, #f3d98c, var(--gold-deep)); color: #2a2008; }
.rankBadge.r2 { background: linear-gradient(135deg, #d9dee8, #9aa3b5); color: #232a38; }
.rankBadge.r3 { background: linear-gradient(135deg, #d9a06b, #a96b3c); color: #2d1a0c; }

.rankMain { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.rankName {
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.youBadge {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--gold);
  border: 1px solid rgba(233, 196, 106, 0.5);
  border-radius: 999px;
  padding: 1px 7px;
}

.rankSub { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }

.rankNums { text-align: right; display: flex; flex-direction: column; gap: 2px; }

.rankTarget {
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rankTarget.isPlus { color: var(--green); }
.rankTarget.isMinus { color: var(--red); }

.rankNet { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.rankHeld,
.rankReport {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--gold);
}
.rankHeld.isPlus { color: var(--green); }
.rankHeld.isMinus { color: var(--red); }
.rankHeld.isZero { color: var(--faint); }

.rankSettleLabel {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.rankSettle {
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rankSettle.isPlus { color: var(--green); }
.rankSettle.isMinus { color: var(--red); }
.rankSettleNone { font-size: 12px; font-weight: 800; color: var(--faint); }
.rankReportMark { color: var(--green); font-size: 11px; font-weight: 900; margin-left: 3px; }

/* ---------- transfers ---------- */

.transferList { display: flex; flex-direction: column; gap: 8px; }

.transferRow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 12px 14px;
}
.transferRow.isMine {
  border-color: rgba(233, 196, 106, 0.4);
  background: var(--gold-soft);
}

.transferRoute {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.transferParty {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
}
.transferName { min-width: 0; overflow-wrap: anywhere; }
.transferArrow { color: var(--gold); font-weight: 900; }
.transferYou {
  flex: none;
  padding: 1px 6px;
  border: 1px solid rgba(233, 196, 106, 0.46);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(233, 196, 106, 0.10);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.5;
  white-space: nowrap;
}

.transferAmount {
  align-self: flex-end;
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}

.transferEmpty {
  text-align: center;
  color: var(--faint);
  font-size: 13px;
  font-weight: 600;
  padding: 14px;
  background: var(--surface-2);
  border-radius: var(--radius-s);
}

.sharePreview {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  padding: 12px 14px;
  outline: none;
}

.shareActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.shareUrlBox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.settlementModePanel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}

.modePanelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
.modePanelHead span:last-child {
  color: var(--faint);
  font-weight: 700;
}

.modeSwitch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modeSwitchButton {
  appearance: none;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.06s ease;
}
.modeSwitchButton:active { transform: scale(0.97); }
.modeSwitchButton.isOn {
  color: var(--text);
  background: var(--gold-soft);
  border-color: var(--gold);
}
.modeSwitchButton:disabled,
.profitTiltControl select:disabled {
  opacity: 0.55;
  cursor: default;
}

.profitTiltControl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profitTiltControl span {
  flex: none;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.profitTiltControl select {
  width: min(190px, 100%);
  min-width: 0;
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
  outline: none;
}

/* ---------- machine summary ---------- */

.machineSummaryList { display: flex; flex-direction: column; gap: 8px; }

.machineTotal,
.machineRow {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 12px 14px;
}

.machineTotal {
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.045);
}
.machineTotal.isMismatch { border-color: rgba(255, 107, 91, 0.5); }
.machineTotal span {
  font-size: 11px;
  color: var(--faint);
  font-weight: 800;
  letter-spacing: 0.06em;
}
.machineTotal b,
.machineNet {
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.machineTotal .isPlus,
.machineNet.isPlus { color: var(--green); }
.machineTotal .isMinus,
.machineNet.isMinus { color: var(--red); }
.machineTotal .isZero,
.machineNet.isZero { color: var(--muted); }

.machineMain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.machineName {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.machineMeta {
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.machineEmpty {
  text-align: center;
  color: var(--faint);
  font-size: 13px;
  padding: 18px 0 8px;
  margin: 0;
}

/* ---------- history ---------- */

.historyList { display: flex; flex-direction: column; }

.historyRow {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.historyRow:last-child { border-bottom: 0; }
.historyRow.isDeleted { opacity: 0.45; }

.historyIcon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  flex: none;
  margin-top: 2px;
}
.historyIcon.isInvest { background: var(--red-soft); color: var(--red); }
.historyIcon.isRecover { background: var(--green-soft); color: var(--green); }

.historyMain { flex: 1; min-width: 0; }

.historyTitleRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.historyName { font-size: 13px; font-weight: 800; }
.historyRow.isDeleted .historyName,
.historyRow.isDeleted .historyAmount { text-decoration: line-through; }

.historyAmount {
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.historyAmount.isInvest { color: var(--red); }
.historyAmount.isRecover { color: var(--green); }

.historyMeta {
  font-size: 11px;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 2px;
}

.deletedChip {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface-3);
  border-radius: 999px;
  padding: 1px 8px;
}

.historyDelete {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  flex: none;
  margin-top: 4px;
}
.historyDelete:active { transform: scale(0.94); }

.historyEmpty {
  text-align: center;
  color: var(--faint);
  font-size: 13px;
  padding: 18px 0 8px;
}

/* ---------- result overlay ---------- */

.resultOverlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 7, 11, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.3s ease both;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.resultSheet {
  width: 100%;
  max-width: 470px;
  max-height: 88vh;
  overflow-y: auto;
  background:
    radial-gradient(110% 70% at 50% -10%, rgba(233, 196, 106, 0.16), transparent 60%),
    var(--surface);
  border: 1px solid rgba(233, 196, 106, 0.3);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 28px 22px calc(24px + env(safe-area-inset-bottom));
  animation: sheetUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sheetUp {
  from { transform: translateY(60px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.resultKicker {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.42em;
  color: var(--gold);
}

.resultTitle {
  margin: 6px 0 2px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

.resultNet {
  text-align: center;
  font-size: 44px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  margin-bottom: 18px;
}
.resultNet.isPlus { color: var(--green); }
.resultNet.isMinus { color: var(--red); }

.resultRanks {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resultRankRow {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 11px 14px;
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.resultRankName { flex: 1; font-size: 14px; font-weight: 800; min-width: 0; }

.resultRankAmount {
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.resultRankAmount.isPlus { color: var(--green); }
.resultRankAmount.isMinus { color: var(--red); }

.resultTransfers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.resultActions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- confirm ---------- */

.confirmOverlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(5, 7, 11, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease both;
}

.confirmSheet {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  animation: rise 0.25s ease both;
}
.confirmSheet h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.confirmSheet p { margin: 0 0 18px; font-size: 13px; color: var(--muted); }

.confirmActions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translate(-50%, 18px);
  z-index: 80;
  background: #20283a;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 11px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.isShow { opacity: 1; transform: translate(-50%, 0); }
.toast.isError { border-color: rgba(255, 107, 91, 0.5); color: #ffb4ab; }

/* ---------- misc ---------- */

.compliance {
  font-size: 10px;
  color: var(--faint);
  text-align: center;
  margin: 10px 12px 0;
  line-height: 1.7;
}

.footerBrand {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--faint);
  margin: 4px 0 0;
}

.legalLinks {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 10px 12px 0;
  font-size: 11px;
  font-weight: 700;
}

.legalLinks a {
  color: var(--muted);
  text-decoration: none;
}

.legalLinks a:hover {
  color: var(--text);
}

.legalBody {
  min-height: 100vh;
}

.legalShell {
  width: min(780px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.legalBack {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 0 0 14px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.legalCard {
  background: rgba(18, 22, 32, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.legalKicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legalCard h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

.legalUpdated {
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.legalCard section {
  border-top: 1px solid var(--line);
  padding: 20px 0 0;
  margin: 20px 0 0;
}

.legalCard h2 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: 0;
}

.legalCard p,
.legalCard li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.legalCard p {
  margin: 0 0 10px;
}

.legalCard ul {
  margin: 0;
  padding-left: 1.25em;
}

.legalCard code {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 1px 5px;
}

.legalLinksStandalone {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 24px;
}

@media (max-width: 560px) {
  .legalShell {
    width: min(100vw - 24px, 780px);
    padding-top: 16px;
  }

  .legalCard {
    padding: 22px 18px;
  }

  .legalCard h1 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
