@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=Onest:wght@400;500;600&display=swap");

/* Roam components. Every colour comes from tokens.css; no literal colours here. */
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
.rm-muted { color: var(--ink-muted); }
.rm-icon { display: block; flex: 0 0 auto; }
:where(button, a):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Button */
.rm-btn { font: 600 16px/20px var(--font-sans); border: 0; border-radius: var(--radius-pill); padding: 16px var(--space-6); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); cursor: pointer; }
.rm-btn-primary { background: var(--blue); color: var(--on-blue); }
.rm-btn-dark { background: var(--ink); color: var(--ink-inverse); }
.rm-btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.rm-btn-soft { background: var(--surface-raised); color: var(--ink); }
.rm-btn-block { width: 100%; }
.rm-btn:disabled { opacity: .4; cursor: default; }

/* IconButton */
.rm-iconbtn { width: 44px; height: 44px; border-radius: var(--radius-pill); border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rm-iconbtn-soft { background: var(--surface-raised); color: var(--ink); }
.rm-iconbtn-ghost { background: transparent; color: var(--ink); }
.rm-iconbtn-dark { background: var(--ink); color: var(--ink-inverse); }
.rm-iconbtn-primary { background: var(--blue); color: var(--on-blue); }

/* ActionPill */
.rm-pill { display: inline-flex; align-items: center; gap: var(--space-3); padding: 6px var(--space-5) 6px 6px; border: 0; border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--ink); cursor: pointer; font: 600 16px/20px var(--font-sans); }
.rm-pill-icon { width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--bg); display: inline-flex; align-items: center; justify-content: center; }

/* Chip */
.rm-chip { display: inline-flex; align-items: center; gap: var(--space-1); border-radius: var(--radius-pill); padding: 5px 12px; font: 600 12px/16px var(--font-numeric); }
.rm-chip-yellow { background: var(--yellow); color: var(--on-yellow); }
.rm-chip-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.rm-chip-dark { background: var(--ink); color: var(--ink-inverse); }

/* Tag */
.rm-tag { display: inline-flex; align-items: center; border-radius: var(--radius-pill); padding: 6px 12px; font: 500 11px/14px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; }
.rm-tag-soft { background: var(--surface-raised); color: var(--ink-muted); }
.rm-tag-outline { background: transparent; color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.rm-tag-on-violet { background: var(--violet-soft); color: var(--on-violet); }

/* StarBadge */
.rm-star { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.rm-star svg { position: absolute; inset: 0; }
.rm-star-fill { fill: var(--on-sheet); }
.rm-star-glyph { position: relative; color: var(--sheet); font: 800 20px/1 var(--font-numeric); }

/* Toggle */
.rm-toggle { width: 48px; height: 28px; border-radius: var(--radius-pill); border: 2px solid var(--ink); background: transparent; position: relative; cursor: pointer; padding: 0; flex: 0 0 auto; }
.rm-toggle-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: var(--radius-pill); background: var(--ink); transition: transform .18s ease; }
.rm-toggle.is-on { background: var(--ink); }
.rm-toggle.is-on .rm-toggle-knob { transform: translateX(20px); background: var(--bg); }

/* PageDots */
.rm-dots { display: flex; gap: 6px; justify-content: center; }
.rm-dot { width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--line); transition: width .2s ease; }
.rm-dot.is-active { width: 18px; background: var(--blue); }

/* ShapeArt */
.rm-art { display: block; }
.rm-art .f-blue { fill: var(--blue); } .rm-art .f-cream { fill: var(--cream); } .rm-art .f-ink { fill: var(--on-yellow); }
.rm-art .f-pink { fill: var(--pink); } .rm-art .f-red { fill: var(--red); } .rm-art .f-yellow { fill: var(--yellow); }
.rm-art .s-ink { stroke: var(--on-yellow); stroke-width: 3; } .rm-art .s-red { stroke: var(--red); stroke-width: 3; }

/* PlanCard */
.rm-plan { flex-shrink: 0; position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: var(--space-6); min-height: 200px; display: flex; flex-direction: column; color: var(--on-yellow); }
.rm-plan-yellow { background: var(--yellow); } .rm-plan-pink { background: var(--pink); } .rm-plan-cream { background: var(--cream); }
.rm-plan-glass {
  color: var(--glass-ink);
  background:
    linear-gradient(215deg, transparent 0%, transparent 40%, var(--plan-ga, var(--glass-tint-a)) 72%, var(--plan-gb, var(--glass-tint-b)) 100%),
    var(--glass-fill);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
}
.rm-plan.rm-plan-glass, .rm-plan.rm-plan-glass.is-pressable { color: var(--glass-ink); }
/* Glass gradient pairs: all from system colours, darkened in the dark theme */
.rm-plan-glass-ocean { --plan-ga: var(--glass-tint-blue); --plan-gb: var(--glass-tint-a); }
.rm-plan-glass-sunset { --plan-ga: var(--glass-tint-yellow); --plan-gb: var(--glass-tint-red); }
.rm-plan-glass-bloom { --plan-ga: var(--glass-tint-b); --plan-gb: var(--glass-tint-blue); }
/* Default composition when the card has an illustration: emblem on the right edge, text column on the left */
.rm-plan.has-image .rm-plan-amount { position: relative; padding-top: var(--space-2); }
.rm-plan.has-image .rm-plan-amount .rm-plan-illo { position: absolute; top: calc(50% + 4px); right: -86px; width: 196px; height: 196px; transform: translateY(-50%) rotate(-10deg); }
.rm-plan.has-image .rm-plan-meta { max-width: 64%; flex-direction: column; gap: var(--space-2); }
.rm-plan.has-image .rm-plan-val { white-space: nowrap; }
.rm-plan.has-image .rm-plan-meta > span[style] { text-align: left !important; }
.rm-plan.has-image .rm-plan-meta > span:last-child .caption { font-size: 11px; line-height: 14px; }
.rm-plan.has-image .rm-plan-meta > span:last-child .rm-plan-val { font-size: 13px; line-height: 16px; font-weight: 600; }
.rm-plan-glass .rm-plan-mark i { border-color: var(--glass-ink); }
.rm-plan-glass .rm-plan-mark i:first-child { background: var(--glass-ink); }
.rm-plan-art { position: absolute; top: 0; left: 0; width: 70%; height: 60%; }
.rm-plan-top { position: relative; display: flex; justify-content: flex-end; }
.rm-plan-mark { display: inline-flex; } .rm-plan-mark i { width: 22px; height: 22px; border-radius: var(--radius-pill); border: 2px solid var(--on-yellow); display: block; }
.rm-plan-mark i:first-child { background: var(--on-yellow); margin-right: -8px; }
.rm-plan-amount { position: relative; margin-top: auto; padding-top: var(--space-8); }
.rm-plan-unit { font-size: 28px; }
.rm-plan-meta { position: relative; display: flex; justify-content: space-between; margin-top: var(--space-3); }
.rm-plan-meta .caption { opacity: .75; }
.rm-plan-val { font: 700 16px/20px var(--font-numeric); }

/* PromoBanner */
.rm-banner { display: flex; align-items: stretch; justify-content: space-between; border-radius: var(--radius-lg); background: var(--blue); color: var(--on-blue); text-decoration: none; overflow: hidden; min-height: 96px; }
.rm-banner-text { padding: var(--space-5) var(--space-6); display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.rm-banner-title { font: 600 18px/22px var(--font-sans); }
.rm-banner-sub { font: 400 13px/18px var(--font-sans); opacity: .9; }
.rm-banner-art { width: 110px; flex: 0 0 110px; height: auto; }

/* ListItem, SettingRow */
.rm-item, .rm-setting { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); }
.rm-setting { background: var(--surface-raised); }
.rm-item-tile { width: 44px; height: 44px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font: 700 14px/1 var(--font-numeric); }
.rm-tile-blue { background: var(--blue); color: var(--on-blue); } .rm-tile-yellow { background: var(--yellow); color: var(--on-yellow); }
.rm-tile-pink { background: var(--pink); color: var(--on-yellow); } .rm-tile-ink { background: var(--ink); color: var(--ink-inverse); }
.rm-tile-placeholder { background: var(--line); color: var(--ink-muted); }
.rm-item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rm-item-value { font-family: var(--font-numeric); white-space: nowrap; }

/* AmountDisplay */
.rm-amount { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; }
.rm-amount-label { font: 500 14px/18px var(--font-sans); color: var(--ink-muted); }
.rm-amount-value { color: var(--ink); }
.rm-amount-value.is-empty { color: var(--line); }
.rm-amount-suffix { font-size: 28px; }

/* Keypad */
.rm-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); background: var(--sheet); color: var(--on-sheet); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: var(--space-6) var(--space-5) var(--space-4); }
.rm-key { height: 56px; border: 0; background: transparent; color: var(--on-sheet); border-radius: var(--radius-md); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.rm-key:active { background: var(--surface-raised); }

/* AppHeader, TopBar */
.rm-appheader { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; color: var(--ink); }
.rm-appheader-title { margin: 0; text-align: center; font: 600 18px/22px var(--font-sans); }
.rm-topbar { display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
.rm-wordmark { display: inline-flex; align-items: center; gap: 6px; font: 700 20px/1 var(--font-sans); letter-spacing: -0.03em; }

/* TabBar */
.rm-tabbar { position: relative; display: flex; justify-content: space-around; align-items: center; height: 68px; background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; color: var(--ink-muted); }
.rm-tab { position: relative; background: none; border: 0; color: inherit; width: 56px; height: 48px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rm-tab.is-active { color: var(--ink); }
.rm-tab-badge { position: absolute; top: 10px; right: 16px; width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--red); }
.rm-fab { width: 60px; height: 60px; margin-top: -40px; border-radius: var(--radius-pill); border: 6px solid var(--bg); box-sizing: content-box; background: var(--blue); color: var(--on-blue); box-shadow: var(--shadow-fab); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* HeroCard */
.rm-hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--violet); color: var(--on-violet); min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; }
.rm-hero-media { position: absolute; inset: 0 0 46% 0; }
.rm-hero-center .rm-hero-media { inset: 46% 0 0 0; }
.rm-hero-media > svg, .rm-hero-media > img { width: 100%; height: 100%; object-fit: cover; }
.rm-hero-copy { position: relative; padding: var(--space-6); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.rm-hero-title { margin: 0; text-wrap: balance; }
.rm-hero-text { margin: 0; font: 400 13px/18px var(--font-sans); max-width: 34ch; }
.rm-hero-center { justify-content: flex-start; } .rm-hero-center .rm-hero-copy { align-items: center; text-align: center; }

/* IconSegment */
.rm-seg { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.rm-seg-item { width: 48px; height: 48px; border-radius: var(--radius-md); border: 0; background: var(--surface-raised); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rm-seg-item.is-on { background: var(--ink); color: var(--ink-inverse); }

/* PackageOption */
.rm-pack { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-3) var(--space-4) var(--space-4); border-radius: var(--radius-md); border: 0; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; min-width: 96px; text-align: left; }
.rm-pack.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
.rm-pack-off { font: 500 10px/12px var(--font-sans); padding: 3px 8px; border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--ink-muted); }
.rm-pack-off.is-blank { background: transparent; }
.rm-pack-unit { font-size: 15px; font-weight: 600; }
.rm-pack-price { color: var(--ink-muted); }

/* FeatureCard */
.rm-feature { border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; color: var(--on-yellow); min-height: 360px; }
.rm-feature-pink { background: var(--pink-hot); } .rm-feature-yellow { background: var(--yellow); } .rm-feature-cream { background: var(--cream); }
.rm-feature-art { flex: 1 1 auto; min-height: 180px; display: flex; align-items: center; justify-content: center; }
.rm-feature-art > svg { width: 100%; height: 100%; }
.rm-feature-copy { padding: var(--space-6); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.rm-feature-title { margin: 0; font: 600 20px/24px var(--font-sans); }
.rm-feature-text { margin: 0; font: 400 13px/18px var(--font-sans); }

/* FaqItem */
.rm-faq { position: relative; background: var(--sheet); color: var(--on-sheet); border-radius: var(--radius-lg); padding: var(--space-6); padding-right: 64px; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.rm-faq-star { position: absolute; top: -12px; right: -6px; }
.rm-faq-q { background: none; border: 0; padding: 0; text-align: left; color: inherit; font: 600 20px/24px var(--font-sans); cursor: pointer; }
.rm-faq-a { margin: 0; font: 400 14px/21px var(--font-sans); }
.rm-faq-toggle { background: none; border: 0; padding: 0; color: var(--blue); font: 600 14px/18px var(--font-sans); cursor: pointer; }



/* Pressable surfaces (PlanCard, ListItem with onClick or href) */
.is-pressable { cursor: pointer; text-align: left; font: inherit; border: 0; width: 100%; text-decoration: none; color: inherit; -webkit-appearance: none; appearance: none; }
.is-pressable:active { transform: scale(.985); }
.rm-plan.is-pressable { color: var(--on-yellow); }
.rm-plan-amount, .rm-plan-meta > span > span { display: block; }
.rm-plan-top { justify-content: space-between; align-items: center; }
.rm-item.is-pressable { background: var(--surface); color: var(--ink); }
.rm-item-chev { color: var(--ink-muted); flex: 0 0 auto; }
.rm-item-status { margin-top: 4px; display: flex; }

/* Status chip tones */
.rm-chip-active { background: var(--ok-soft); color: var(--ok-ink); }
.rm-chip-pending { background: var(--warn-soft); color: var(--warn-ink); }
.rm-chip-expired { background: var(--surface-raised); color: var(--ink-muted); }
.rm-plan .rm-chip-active, .rm-plan .rm-chip-pending, .rm-plan .rm-chip-expired { box-shadow: inset 0 0 0 1px var(--on-yellow); }

/* IconSegment labels */
.rm-seg-item.has-label { width: auto; min-width: 88px; height: auto; flex-direction: column; gap: 6px; padding: 12px 14px; }
.rm-seg-label { font: 600 12px/16px var(--font-sans); }

/* PackageOption head, days */
.rm-pack-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rm-pack-badge { font: 600 10px/12px var(--font-sans); padding: 3px 8px; border-radius: var(--radius-pill); background: var(--ink); color: var(--ink-inverse); }
.rm-pack-days { color: var(--ink-muted); margin-top: -4px; }
.rm-pack-price { color: var(--ink); font-family: var(--font-numeric); }

/* TextField */
.rm-field { display: flex; flex-direction: column; gap: 6px; }
.rm-field-label { font: 500 13px/16px var(--font-sans); color: var(--ink-muted); }
.rm-field-box { display: flex; align-items: center; gap: var(--space-2); background: var(--surface-raised); border-radius: var(--radius-pill); padding: 0 var(--space-4); height: 52px; color: var(--ink-muted); box-shadow: inset 0 0 0 1.5px transparent; }
.rm-field-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); }
.has-error .rm-field-box { box-shadow: inset 0 0 0 1.5px var(--warn-ink); }
.rm-field-input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 16px/20px var(--font-sans); }
.rm-field-input::placeholder { color: var(--ink-muted); }
.rm-field-clear { border: 0; background: var(--line); color: var(--ink); width: 24px; height: 24px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.rm-field-msg { color: var(--ink-muted); padding-left: var(--space-4); display: flex; gap: 6px; align-items: center; }
.rm-field-msg.is-error { color: var(--warn-ink); }

/* SectionHeader */
.rm-section { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); color: var(--ink); }
.rm-section-title { margin: 0; }
.rm-section-action { background: none; border: 0; padding: 4px 0; font: 600 14px/18px var(--font-sans); color: var(--ink-muted); text-decoration: none; cursor: pointer; }

/* PaymentOption */
.rm-payopt { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-4); border: 0; border-radius: var(--radius-md); background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; text-align: left; font: inherit; }
.rm-payopt.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
.rm-radio { width: 22px; height: 22px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 2px var(--line); flex: 0 0 auto; }
.rm-payopt.is-on .rm-radio { box-shadow: inset 0 0 0 7px var(--ink); }

/* OrderSummary */
.rm-summary { background: var(--surface); color: var(--ink); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.rm-summary-row { display: flex; justify-content: space-between; gap: var(--space-3); font: 400 15px/20px var(--font-sans); }
.rm-summary-val { font-family: var(--font-numeric); font-weight: 700; text-align: right; }
.rm-summary-total { border-top: 1px solid var(--line); padding-top: var(--space-3); font-weight: 600; font-size: 17px; }
.rm-summary-note { display: flex; gap: 6px; align-items: center; }

/* CompatibilityCheck */
.rm-compat { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink); }
.rm-compat-btn { border: 0; background: var(--ink); color: var(--ink-inverse); border-radius: var(--radius-pill); padding: 8px 16px; font: 600 14px/18px var(--font-sans); cursor: pointer; flex: 0 0 auto; }

/* Spinner, ProgressState */
.rm-spinner { width: 40px; height: 40px; border-radius: var(--radius-pill); border: 4px solid var(--line); border-top-color: var(--blue); animation: rm-spin .8s linear infinite; flex: 0 0 auto; display: inline-block; }
.rm-spinner.is-small { width: 22px; height: 22px; border-width: 3px; }
@keyframes rm-spin { to { transform: rotate(360deg); } }
.rm-progress { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-8) var(--space-5); color: var(--ink); }
.rm-progress-text { margin: 0; font: 400 14px/20px var(--font-sans); color: var(--ink-muted); max-width: 32ch; }

/* EmptyState */
.rm-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-6) var(--space-5); background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); }
.rm-empty-art { width: 100%; max-width: 260px; height: 120px; border-radius: var(--radius-md); background: var(--yellow); overflow: hidden; }
.rm-empty-art > svg { width: 100%; height: 100%; }
.rm-empty-title { margin: var(--space-2) 0 0; }
.rm-empty-text { margin: 0 0 var(--space-2); font: 400 14px/20px var(--font-sans); color: var(--ink-muted); max-width: 30ch; }

/* Toast */
.rm-toast { display: inline-flex; align-items: center; gap: var(--space-3); padding: 10px 10px 10px 12px; border-radius: var(--radius-pill); background: var(--ink); color: var(--ink-inverse); font: 500 14px/18px var(--font-sans); max-width: 100%; }
.rm-toast-icon { width: 26px; height: 26px; border-radius: var(--radius-pill); background: var(--ok-soft); color: var(--ok-ink); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.rm-toast-msg { flex: 1 1 auto; min-width: 0; }
.rm-toast-action { border: 0; background: transparent; color: var(--ink-inverse); font: 700 14px/18px var(--font-sans); text-decoration: underline; cursor: pointer; padding: 4px 8px; }

/* BottomSheet */
.rm-sheetwrap { position: fixed; inset: 0; display: flex; align-items: flex-end; z-index: 50; }
.rm-sheetwrap.is-inline { position: relative; inset: auto; min-height: 100%; }
.rm-sheetwrap.has-scrim { background: var(--scrim); }
.rm-sheet { width: 100%; background: var(--sheet); color: var(--on-sheet); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 10px var(--space-5) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.rm-sheet-handle { width: 40px; height: 5px; border-radius: var(--radius-pill); background: var(--on-sheet); opacity: .2; align-self: center; }
.rm-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.rm-sheet-title { margin: 0; font: 600 20px/26px var(--font-sans); }
.rm-sheet-close { border: 0; width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--on-sheet); color: var(--sheet); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rm-sheet-body { display: flex; flex-direction: column; gap: var(--space-3); }

/* TopBar with actions */
.rm-topbar-right { display: flex; align-items: center; gap: var(--space-2); }
.rm-topbar-chip { border: 0; background: none; padding: 0; cursor: pointer; }
.rm-topbar-action { position: relative; display: inline-flex; }
.rm-topbar-badge { top: 8px; right: 9px; }

/* SegmentedTabs */
.rm-tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--surface-raised); }
.rm-tabs-item { flex: 1 1 0; min-width: 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-muted); font: 600 14px/18px var(--font-sans); padding: 10px 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.rm-tabs-item.is-on { background: var(--ink); color: var(--ink-inverse); }
.rm-tabs-count { font: 700 11px/14px var(--font-numeric); padding: 1px 6px; border-radius: var(--radius-pill); background: var(--line); color: var(--ink); }
.rm-tabs-item.is-on .rm-tabs-count { background: var(--ink-inverse); color: var(--ink); }

/* Illustration */
.rm-illo { display: block; object-fit: contain; flex: 0 0 auto; user-select: none; }
.rm-plan-illo { position: absolute; top: -10px; right: -8px; }
.rm-tile-image { background: var(--surface-raised); overflow: hidden; }
.rm-tile-flag { border-radius: var(--radius-pill); overflow: hidden; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); }
.rm-tile-flag img { width: 44px; height: 44px; display: block; border-radius: var(--radius-pill); }
.rm-empty-art { display: flex; align-items: center; justify-content: center; }

@media (prefers-reduced-motion: reduce) { .rm-toggle-knob, .rm-dot { transition: none; } .rm-spinner { animation-duration: 2.4s; } .is-pressable:active { transform: none; } }

/* Plan card with usage bar */
.rm-plan.has-usage { gap: 0; }
.rm-plan.has-usage .rm-plan-top { justify-content: space-between; align-items: center; max-width: 64%; }
.rm-plan-name { font: 600 14px/18px var(--font-sans); opacity: .8; white-space: nowrap; }
.rm-plan.has-usage .rm-plan-amount { margin-top: var(--space-2); padding-top: 0; }
.rm-plan.has-image.has-usage .rm-plan-amount .rm-plan-illo { top: calc(50% - 10px); }
.rm-plan-foot { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-3); margin-top: auto; padding-top: var(--space-3); }
.rm-plan-used { font: 600 14px/18px var(--font-sans); opacity: .8; }
.rm-plan-exp { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.rm-plan-exp .caption { font-size: 11px; line-height: 14px; opacity: .75; }
.rm-plan-exp .rm-plan-val { font-size: 13px; line-height: 16px; font-weight: 600; }
/* Tab bar: one icon colour, round FAB */
.rm-tab { color: var(--ink); }
.rm-tab.is-active::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: var(--radius-pill); background: currentColor; }
.rm-fab { padding: 0; flex-shrink: 0; }
.rm-topbar-right { margin-left: auto; }

/* Plan card: corner layouts */
.rm-plan-corners .rm-pc-row { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.rm-plan-corners .rm-pc-bottom { margin-top: auto; align-items: flex-end; }
.rm-pc-name { font: 600 15px/20px var(--font-sans); }
.rm-pc-fact { display: flex; flex-direction: column; gap: 4px; }
.rm-pc-bottom .rm-pc-fact:last-child { align-items: flex-end; text-align: right; }
.rm-plan-corners-alt .rm-pc-row:first-of-type .rm-pc-fact:last-child { align-items: flex-end; text-align: right; }
.rm-plan-corners-alt .rm-pc-row:first-of-type .rm-pc-fact:first-child { align-items: flex-start; text-align: left; }
.rm-pc-cap { font: 500 11px/14px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.rm-pc-val { font: 600 15px/20px var(--font-sans); }
.rm-pc-amount { display: block; }
.rm-plan.has-image .rm-pc-illo { position: absolute; z-index: 0; width: 136px; height: 136px; top: -30px; right: -30px; transform: rotate(-10deg); }
.rm-plan-corners-alt.has-image .rm-pc-illo { top: auto; bottom: -22px; right: -40px; width: 188px; height: 188px; }

/* Plan card: orbit layout (art bottom-left, text right) */
.rm-plan-glass.rm-plan-orbit { background: linear-gradient(35deg, transparent 0%, transparent 40%, var(--plan-ga, var(--glass-tint-a)) 72%, var(--plan-gb, var(--glass-tint-b)) 100%), var(--glass-fill); }
.rm-plan-orbit .rm-pc-row { justify-content: flex-end; text-align: right; }
.rm-plan-orbit .rm-pc-fact { align-items: flex-end; text-align: right; }
.rm-plan-orbit .rm-pc-mid { margin-top: auto; }
.rm-plan-orbit .rm-pc-bottom { margin-top: var(--space-3); }
.rm-plan-orbit.has-image .rm-pc-illo { top: auto; right: auto; bottom: -96px; left: -84px; width: 280px; height: 280px; transform: rotate(6deg); }
.rm-pc-stack { display: flex; flex-direction: column; align-items: flex-start; }
.rm-plan-corners-alt .rm-pc-stack .rm-pc-name { margin-top: 4px; font-weight: 400; }
.rm-plan-corners-alt .rm-pc-val { font-weight: 400; }
.rm-plan-corners-alt .rm-pc-bottom .rm-pc-fact:last-child { align-items: flex-start; text-align: left; }

/* Plan card: tag layout (Figma 01 · Home) */
.rm-plan.rm-plan-tagged { min-height: 201px; padding: 19px 27px 16px; }
.rm-pt-illo { position: absolute; top: -11px; right: -5px; width: 156px; height: 152px; pointer-events: none; }
.rm-pt-chip { position: relative; display: flex; }
.rm-pt-amount { position: relative; display: block; margin: 24px 0 0 -3px; }
.rm-pt-chip .rm-chip { padding: 1.5px 9.5px; }
.rm-pt-foot { position: relative; display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; }
.rm-pt-plan { font: 400 16px/22px var(--font-numeric); padding-bottom: 13px; margin-left: -2px; }
.rm-pt-exp { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 3px; }
.rm-pt-exp .caption { font-size: 11px; line-height: 14px; }
.rm-pt-val { font: 400 12px/16px var(--font-numeric); }
