/* Display settings menu, from the display-settings skill
   (~/.claude/skills/display-settings). Every color and size is a --ds-* token
   with LifeRPG's values as defaults. To fit a page, set them on .ds-menu in
   the page's own stylesheet, mapped to its palette:

     .ds-menu { --ds-surface: var(--panel); --ds-ink: var(--text); ... }

   The defaults sit in :where() so that one plain rule overrides them in both
   themes. */
:where(.ds-menu) {
  --ds-trigger-size: 36px;
  --ds-trigger-radius: 9px;
  --ds-icon-size: 18px;
  --ds-icon-stroke: 1.5;
  --ds-offset: 15px;               /* trigger to panel */
  --ds-z: 70;
  --ds-trigger-bg: #ffffff;
  --ds-trigger-border: #e9e9ed;
  --ds-trigger-ink: var(--ds-ink-dim);
  --ds-hover: #ededf0;             /* trigger hovered or open */
  --ds-surface: #ffffff;           /* panel */
  --ds-border: #d9d9df;
  --ds-track: #ededf0;             /* segmented control background */
  --ds-selected: #ffffff;          /* chosen segment */
  --ds-ink: #1d1d1f;
  --ds-ink-dim: #626269;
  --ds-ink-faint: #6b6b73;         /* labels */
  --ds-focus: #0066cc;
  --ds-shadow: 0 8px 32px rgba(0, 0, 0, .1);
}
:where(:root[data-theme="dark"]) :where(.ds-menu) {
  --ds-trigger-bg: #1c1c1f;
  --ds-trigger-border: #2e2e33;
  --ds-hover: #28282c;
  --ds-surface: #232326;
  --ds-border: #3b3b41;
  --ds-track: #28282c;
  --ds-selected: #45454b;
  --ds-ink: #f5f5f7;
  --ds-ink-dim: #b0b0b8;
  --ds-ink-faint: #96969f;
  --ds-focus: #6aafff;
  --ds-shadow: 0 8px 32px rgba(0, 0, 0, .28);
}

/* The empty placeholder already takes the button's room, so the header
   doesn't shift when the script fills it in. */
.ds-menu { position: relative; flex: none; min-width: var(--ds-trigger-size); min-height: var(--ds-trigger-size); }
.ds-menu, .ds-menu * { box-sizing: border-box; }
.ds-menu button { margin: 0; font: inherit; -webkit-tap-highlight-color: transparent; }
.ds-menu :focus-visible { outline: 3px solid var(--ds-focus); outline-offset: 2px; }
.ds-menu svg { display: block; fill: none; stroke: currentColor; stroke-width: var(--ds-icon-stroke); stroke-linecap: round; stroke-linejoin: round; }

.ds-trigger { display: flex; align-items: center; justify-content: center; width: var(--ds-trigger-size); height: var(--ds-trigger-size); padding: 0; border: 1px solid var(--ds-trigger-border); border-radius: var(--ds-trigger-radius); background: var(--ds-trigger-bg); color: var(--ds-trigger-ink); cursor: pointer; }
.ds-trigger:hover, .ds-trigger[aria-expanded="true"] { color: var(--ds-ink); background: var(--ds-hover); }
.ds-trigger svg { width: var(--ds-icon-size); height: var(--ds-icon-size); }

.ds-panel { position: absolute; top: calc(100% + var(--ds-offset)); right: 0; z-index: var(--ds-z); width: 210px; padding: 20px; display: grid; gap: 10px; border: 1px solid var(--ds-border); border-radius: 15px; background: var(--ds-surface); box-shadow: var(--ds-shadow); color: var(--ds-ink); line-height: 1.55; text-align: left; }
.ds-panel[hidden] { display: none; }
.ds-label { font-size: 12px; font-weight: 400; color: var(--ds-ink-faint); }
.ds-label:not(:first-child) { margin-top: 6px; }

.ds-segmented { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ds-track); }
.ds-segmented button { flex: 1; min-width: 31px; min-height: 30px; padding: 6px 7px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--ds-ink-dim); font-size: 11px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.ds-segmented button:hover { color: var(--ds-ink); }
.ds-segmented button[aria-pressed="true"] { background: var(--ds-selected); color: var(--ds-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.ds-segmented svg { width: 16px; height: 16px; }

/* Optional: who made the site (data-creator-*), at the end of the panel. */
.ds-about { display: grid; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--ds-border); }
.ds-creator { display: flex; align-items: center; gap: 10px; margin: 0 -8px; padding: 6px 8px; border-radius: 9px; color: var(--ds-ink); font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.ds-creator:hover { background: var(--ds-hover); text-decoration: none; }
.ds-creator img { display: block; flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ds-creator svg { flex: none; width: 14px; height: 14px; margin-left: auto; color: var(--ds-ink-faint); }
