/* Shared UI values from design/DESIGN.md. Load before page styles in every document,
   including iframe documents. Local --ink/--accent names remain compatibility aliases;
   --jys-color-brand is the brand green, --jys-color-text is the body text colour. */
:root {
  --jys-color-brand: #20382f;
  --jys-color-text: #1c1917;
  --jys-color-muted: #6f6a62;
  --jys-color-muted-secondary: #736e66;
  --jys-color-nav: #57534e;
  --jys-color-border: #ede8df;
  --jys-color-border-soft: #f2eee6;
  --jys-color-field-border: #dfd9ce;
  --jys-color-disabled-border: #c9c3b8;
  --jys-color-paper: #f5f2ec;
  --jys-color-card: #fbf9f5;
  --jys-color-page: #e7e2d9;
  --jys-color-surface: #fff;
  --jys-color-valid: #4c5b3c;
  --jys-color-invalid: #a0443b;
  --jys-color-accent: #e8701c;
  --jys-color-accent-soft: #fbe4d2;

  --jys-font-heading: 'Noto Serif TC', 'Songti TC', serif;
  --jys-font-body: 'Noto Sans TC', 'PingFang TC', sans-serif;
  --jys-font-numeric: ui-monospace, monospace;

  --jys-radius-control: 8px;
  --jys-radius-card: 12px;
  --jys-radius-tag: 5px;
  --jys-radius-dialog: 14px;
  --jys-radius-segment: 9px;
  --jys-radius-interior-card: 10px;
  --jys-radius-tooltip: 4px;
  --jys-radius-meter: 2px;
  --jys-radius-progress: 3px;
  --jys-radius-hint: 20px;
  --jys-radius-pill: 999px;
  --jys-control-min-height: 44px;

  /* Interaction states keep their existing meanings and contrast. */
  --jys-state-focus: var(--jys-color-brand);
  --jys-state-selected-bg: var(--jys-color-brand);
  --jys-state-selected-text: var(--jys-color-surface);
  --jys-state-error: var(--jys-color-invalid);
  --jys-state-valid: var(--jys-color-valid);
  --jys-state-disabled-border: var(--jys-color-disabled-border);
  --jys-editor-action-bg: var(--jys-color-brand);
  --jys-editor-action-text: var(--jys-color-surface);
  --jys-editor-action-label: var(--jys-color-brand);

  /* Existing interaction feedback and translucent surfaces. Values remain exact. */
  --jys-color-control-text: #4a453e;
  --jys-color-control-muted: #65685e;
  --jys-color-destructive-muted: #80685e;
  --jys-color-border-inset: #e7e1d6;
  --jys-color-category-selected: #efede4;
  --jys-color-scrollbar: #cbc5b9;
  --jys-editor-surface: #f4f2ee;
  --jys-editor-interior-bg: #f5f3ee;
  --jys-editor-interior-border: #e2ded4;
  --jys-editor-interior-text: #363a34;
  --jys-editor-interior-hover: #9da99b;
  --jys-editor-interior-selected: #344c41;
  --jys-editor-control-glass: #e7e9e036;
  --jys-overlay-surface-40: #ffffff66;
  --jys-overlay-surface-50: #ffffff80;
  --jys-overlay-surface-70: #ffffffb3;
  --jys-overlay-surface-78: #ffffffc7;
  --jys-overlay-surface-86: #ffffffdb;
  --jys-overlay-surface-93: #ffffffed;
  --jys-overlay-surface-94: #fffffff0;
  --jys-overlay-paper-91: #f5f2ece8;
  --jys-overlay-paper-93: #f5f2eced;
  --jys-overlay-paper-95: #f5f2ecf2;
  --jys-overlay-text-14: #1c191724;
  --jys-overlay-text-22: #1c191738;
  --jys-overlay-text-40: #1c191766;
  --jys-overlay-text-50: #1c191780;
  --jys-overlay-text-91: #1c1917e8;
  --jys-overlay-brand-10: #20382f1a;
  --jys-overlay-brand-13: #20382f21;
  --jys-overlay-brand-15: #20382f26;
  --jys-overlay-brand-22: #20382f38;
  --jys-overlay-brand-25: #20382f40;
  --jys-overlay-brand-28: #20382f47;
  --jys-overlay-brand-30: #20382f4d;
  --jys-overlay-brand-33: #20382f55;
  --jys-overlay-accent-30: #e8701c4d;
  --jys-overlay-error-35: #a0443b59;
  --jys-overlay-black-13: #0002;
  --jys-booking-callout-border: #9aa995;
  --jys-booking-notification-border: #d6ddd2;
  --jys-booking-pending-border: #b9c6b4;
  --jys-booking-cancel-border: #c68c83;
  --jys-booking-cancel-bg: #faf0ee;
  --jys-map-hover-land: #d7e2ca;
  --jys-map-hover-border: #58704d;
  --jys-map-selected-land: #cedcbd;
  --jys-map-selected-border: #405d38;
  --jys-map-caption-text: #53664d;
  --jys-map-caption-hover: #fffdf8;
  --jys-color-plan-label: #3a3631;

  /* Existing page-specific values are retained, rather than silently redesigning
     admin/privacy pages or changing approved typefaces and component geometry. */
  --jys-color-muted-legacy: #8a857c;
  --jys-font-booking: -apple-system, BlinkMacSystemFont, 'Noto Sans TC', 'PingFang TC', sans-serif;
  --jys-font-tour: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --jys-booking-paper: #f7f6f2;
  --jys-booking-text: #302f2b;
  --jys-booking-muted: #706e67;
  --jys-booking-border: #dddcd5;
  --jys-booking-action: #435f50;
  --jys-booking-action-hover: #344d40;
  --jys-booking-error: #a43d32;
  --jys-booking-surface-soft: #edf1eb;
  --jys-booking-focus: #a88c50;
  --jys-booking-radius-control: 7px;
  --jys-booking-radius-badge: 100px;
  --jys-privacy-danger: #993b31;
  --jys-privacy-danger-hover: #7e3028;
  --jys-privacy-warning-bg: #fcf3f0;
  --jys-tour-paper: #f7f5f0;
}

/* The line view uses orange fills with dark text; rendering keeps the green UI. */
:root[data-quality=line] {
  --jys-editor-action-bg: var(--jys-color-accent);
  --jys-editor-action-text: var(--jys-color-text);
  --jys-editor-action-label: var(--jys-color-text);
}
