/* Merry owns this skin. Gyro's local components still own state/visibility. */
:root {
  color-scheme: light;
  --font-body: 'DM Sans', sans-serif; --font-display: 'DM Serif Display', Georgia, serif;
  --font-mono: 'DM Sans', sans-serif;
  --bg-primary: #faf9f5; --bg-secondary: #f2efe6; --bg-card: #fffdf8; --bg-card-hover: #eeeee3;
  --text-primary: #242821; --text-secondary: #687164; --text-muted: #687164;
  --border: #dedccd; --border-light: #cbcbb9; --accent: #205d46; --accent-light: #32795b; --accent-dark: #194b38;
  --on-accent: #fffdf8; --accent-rgb: 32,93,70; --bg-primary-rgb: 250,249,245;
  --text-secondary-rgb: 104,113,100; --success: #28734d; --danger: #a53630;
  --merry-selected: #eaf0e6; --merry-gold: #8b6b34;
  --shadow-sm: none; --shadow-md: 0 8px 22px #1020100a; --shadow-lg: 0 20px 55px #10201022;
}
html[data-theme='dark'] {
  color-scheme: dark; --bg-primary: #0b1914; --bg-secondary: #1b3226; --bg-card: #11261c; --bg-card-hover: #20362a;
  --text-primary: #eeeddf; --text-secondary: #b0bca9; --text-muted: #b0bca9;
  --border: #344838; --border-light: #52654c; --accent: #d5b777; --accent-light: #ecd297; --accent-dark: #bda570;
  --on-accent: #10251b; --accent-rgb: 213,183,119; --bg-primary-rgb: 11,25,20;
  --text-secondary-rgb: 176,188,169; --success: #a6d4b3; --danger: #f0ada0;
  --merry-selected: #293c2c; --merry-gold: #d5b777;
}
[hidden] { display: none !important; }
body.merry-skin { background: var(--bg-primary); color: var(--text-primary); font: 14px/1.5 var(--font-body); }
.merry-skin button, .merry-skin input, .merry-skin select { font-family: var(--font-body); }
.merry-skin button, .merry-skin summary, .merry-skin a { touch-action: manipulation; }
.merry-skin button:focus-visible, .merry-skin input:focus-visible, .merry-skin summary:focus-visible, .merry-skin a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.merry-skip { position: fixed; top: -100px; left: 15px; z-index: 1000; padding: 12px; background: var(--bg-card); }
.merry-skip:focus { top: 10px; }
.merry-skin .header { width: min(1080px, calc(100% - 48px)); margin: auto; padding: 26px 0; background: none; border: 0; position: static; gap: 18px; }
.merry-skin .brand a { display: flex; align-items: center; gap: 10px; color: var(--text-primary); font: 32px/1 var(--font-display); text-decoration: none; white-space: nowrap; }
.merry-skin .brand span { color: var(--text-secondary); opacity: .65; }
.merry-skin .brand em { font-style: normal; color: var(--merry-gold); }
.merry-skin .wallet-container { gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.merry-network { font-size: 11px; color: var(--text-secondary); }
.merry-skin .btn-connect, .merry-skin #theme-toggle { min-height: 44px; border: 1px solid var(--border); border-radius: 9px; padding: 9px 13px; background: var(--bg-card); color: var(--text-primary); font-size: 12px; box-shadow: none; }
.merry-skin .btn-connect { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.merry-skin .main-content { max-width: 630px; width: calc(100% - 36px); padding: 0; margin: 5px auto 26px; }
.merry-nav { display: flex; align-items: center; gap: 25px; border-bottom: 1px solid var(--border); margin-bottom: 24px; font-size: 13px; }
.merry-nav > span { border-bottom: 2px solid var(--accent); padding: 14px 0; }
.merry-nav button { background: none; border: 0; padding: 14px 0; color: var(--text-secondary); }
.merry-ticket { padding: 29px; border: 1px solid var(--border); border-radius: 17px; background: var(--bg-card); }
.merry-ticket h1 { font: 42px/1.1 var(--font-display); letter-spacing: -.5px; margin: 0; }
.merry-ticket h1 i { color: var(--accent); font-weight: 400; }
.merry-subheading { margin: 10px 0 26px; font-size: 13px; color: var(--text-secondary); }
.merry-skin #asset-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 0 0 22px; background: none; border: 0; }
.merry-skin .asset-tab { min-width: 0; min-height: 48px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text-primary); padding: 9px 5px; justify-content: center; font-size: 13px; }
.merry-skin .asset-tab.active { border-color: var(--accent); color: var(--accent); background: var(--merry-selected); box-shadow: none; }
.merry-skin .asset-tab .asset-icon { display: none; }
.merry-skin #series-selector-container { padding: 0; margin: 0; border: 0; flex-wrap: wrap; gap: 10px; }
.merry-skin #strike-label { flex-basis: 100%; font-size: 12px; }
.merry-skin #strike-pills { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.merry-skin .strike-pill { min-height: 48px; border-radius: 8px; font-size: 18px; padding: 8px 5px; }
.merry-note, .merry-wallet-hint { color: var(--text-secondary); font-size: 12px; margin: 8px 0; }
.merry-skin #deposit-panel { padding: 0; background: none; border: 0; box-shadow: none; margin-top: 24px; border-radius: 0; }
.merry-skin #deposit-panel .panel-body { padding: 0; }
.merry-skin .deposit-mode-toggle { background: var(--bg-secondary); border: 0; border-radius: 9px; padding: 4px; gap: 4px; margin-bottom: 20px; }
.merry-skin .mode-btn { min-height: 44px; border: 1px solid transparent; border-radius: 6px; background: none; font-size: 12px; color: var(--text-secondary); }
.merry-skin .mode-btn.active { background: var(--bg-card); color: var(--text-primary); border-color: var(--border); box-shadow: none; }
.merry-skin .deposit-mode-toggle .mode-btn { font-family: var(--font-body); }
.merry-deposit-lock { padding: 0; margin: 0; border: 0; min-width: 0; }
.merry-skin .panel-description { font-size: 12px; max-width: none; line-height: 1.6; margin-bottom: 15px; color: var(--text-secondary); }
.merry-skin .token-selector { gap: 8px; margin-bottom: 15px; }
.merry-skin .token-btn { min-height: 40px; padding: 7px 18px; background: none; border: 1px solid var(--border); border-radius: 7px; color: var(--text-primary); }
.merry-skin .token-btn.active { background: var(--merry-selected); color: var(--accent); border-color: var(--accent); }
.merry-skin .input-group { min-width: 0; margin-bottom: 16px; }
.merry-skin .input-group label { font-size: 12px; color: var(--text-primary); }
.merry-skin .input-with-max { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 9px; min-width: 0; }
.merry-skin .input-with-max input { width: 100%; min-width: 0; font-size: 22px; padding: 15px 12px; background: none; border: 0; font-variant-numeric: tabular-nums; }
.merry-skin .btn-max { min-height: 44px; padding: 8px 12px; color: var(--accent); font-size: 11px; background: none; }
.merry-skin .input-balance { color: var(--text-secondary); font-size: 11px; }
.merry-skin .ratio-display { display: block; padding: 0 0 18px; margin: 0 0 18px; background: none; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 11px; color: var(--text-secondary); }
.merry-mix { display: block; font-size: 17px; color: var(--text-primary); margin-top: 7px; overflow-wrap: anywhere; }
.merry-skin .preview-box { background: var(--bg-secondary); border-color: var(--border); font-size: 12px; }
.merry-skin .deposit-minimum { margin: 17px 0 8px; font-size: 11px; color: var(--text-secondary); }
.merry-readiness { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 11px; color: var(--text-secondary); margin: 8px 0 12px; }
#merry-retry { border: 0; background: none; color: var(--accent); min-height: 40px; padding: 7px 0 7px 12px; font-size: 11px; }
.merry-skin #btn-confirm-deposit { width: 100%; min-height: 54px; font-size: 13px; background: var(--accent); color: var(--on-accent); border-radius: 8px; }
.merry-skin #btn-confirm-deposit:disabled { opacity: .5; cursor: not-allowed; }
.merry-eligibility { margin-top: 16px; color: var(--text-secondary); font-size: 11px; }
.merry-eligibility summary { cursor: pointer; padding: 9px 0; }
.merry-eligibility p { margin: 5px 0 10px; }
.merry-skin #merry-position { padding: 25px 29px; background: #123b2c; color: #fff9ea; border: 1px solid #49684d; border-radius: 15px; margin-bottom: 22px; }
.merry-skin #merry-position .details-header { padding: 0; border: 0; }
.merry-skin #merry-position h2 { font: 29px/1.2 var(--font-display); }
.merry-position-pair { color: #c5d4c5; font-size: 12px; margin: 10px 0 20px; }
.merry-skin #merry-position .position-card { padding: 0; background: none; border: 0; }
.merry-skin #has-position { grid-template-columns: 1fr; }
.merry-skin #merry-position .holding-label, .merry-skin #merry-position .position-label { color: #c5d4c5; }
.merry-skin #merry-position .holding-value { font-size: 22px; }
.merry-skin #merry-position .action-section { margin-top: 22px; }
.merry-skin #merry-position .action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.merry-skin #merry-position .btn-action { min-height: 46px; border-radius: 8px; font-size: 12px; }
.merry-skin #btn-withdraw { background: transparent; border: 1px solid #a4bba3; color: #fff9ea; }
.merry-skin #merry-add { background: #dcc087; color: #173120; border: 1px solid transparent; }
.merry-skin #merry-position #withdraw-panel { background: var(--bg-card); color: var(--text-primary); }
.merry-vault-details { margin-top: 24px; }
.merry-skin #app-footer { display: block; margin: 12px 0 0; padding: 0 5px; border: 0; }
.merry-learn { color: var(--text-secondary); font-size: 12px; }
.merry-learn summary { cursor: pointer; padding: 14px 0; }
.merry-learn p { margin-bottom: 13px; }
.merry-footer { display: flex; justify-content: space-between; gap: 12px; color: var(--text-secondary); font-size: 10px; padding: 18px 0; }
.merry-footer a { color: inherit; }
.merry-skin .wrong-chain-banner { flex-wrap: wrap; font-size: 12px; }
.merry-vault-pending #spot-pill, .merry-vault-pending #deposit-settlement-note, .merry-vault-pending #deposit-dual-mode .preview-box { display: none; }
@media (max-width: 650px) {
  .merry-skin .header { width: calc(100% - 32px); padding: 20px 0; align-items: flex-start; }
  .merry-skin .brand a { font-size: 27px; gap: 6px; padding-top: 8px; }
  .merry-skin .brand img { width: 22px; }
  .merry-skin .wallet-container { gap: 6px; }
  .merry-network { display: none; }
  .merry-skin #theme-toggle, .merry-skin .btn-connect { font-size: 11px; padding-inline: 10px; }
  .merry-ticket { padding: 22px 18px; }
  .merry-ticket h1 { font-size: 36px; }
  .merry-skin #merry-position { padding: 22px 18px; }
  .merry-skin .input-row { gap: 12px; }
  .merry-skin .input-with-max input { font-size: 19px; }
  .merry-skin .input-row .btn-max { padding-inline: 7px; }
  .merry-skin .wallet-info { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 370px) {
  .merry-skin .header { flex-wrap: wrap; }
  .merry-skin .wallet-container { margin-left: auto; }
  .merry-skin .input-row { flex-direction: column; }
}
