/* 226 Galleries: shared look. Every color, font and the button shape come from CSS custom properties.
   The values here are the 226 default theme; public/app/theme.js overrides them from each gallery's theme data.
   226 brand rules: brand palette only, no rounded modules, pill buttons (unless a client theme says square). */
:root {
  /* 226 brand palette (for 226's own screens and the default theme) */
  --emerald: #023B2C; --gold: #E5BA21; --gold-2: #E2A60E; --sand: #F7F4F0; --moon: #F7F7F7;
  --ink: #1D2120; --copper: #BA601C; --hunter: #3F6C49; --french-blue: #B7E2D6; --caribbean: #D0F4E9; --rich-ink: #04281E;

  /* theme (226 default) */
  --bg: #FFFFFF; --surface: #F7F7F7; --text: #1D2120; --muted: #5C625F;
  --accent: #023B2C; --accent-text: #F7F7F7; --accent-hi: #F7F7F7; --line: #E6E6E3; --viewer-bg: #FFFFFF;
  --font-heading: 'Gilda Display', Georgia, serif;
  --font-body: 'PT Serif', Georgia, serif;
  --font-eyebrow: 'Montserrat', system-ui, sans-serif;
  --heading-case: uppercase; --heading-track: -0.03em;
  --btn-radius: 999px; --gap: 5px; --logo-h: 40px;

  --danger: var(--copper);
  --shadow: 0 18px 50px rgba(0,0,0,.18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* type roles */
.eyebrow { font-family: var(--font-eyebrow); font-size: 11px; font-weight: 700; letter-spacing: .10em; text-transform: uppercase; margin: 0; }
.display { font-family: var(--font-heading); font-weight: 400; text-transform: var(--heading-case); letter-spacing: var(--heading-track); line-height: 1.05; margin: 0; }
.muted { color: var(--muted); }

/* buttons: shape from the theme (pill by default) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid currentColor; background: transparent; color: var(--text);
  border-radius: var(--btn-radius); padding: 9px 20px; font-family: var(--font-body); font-size: 15px; line-height: 1.2; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn.text { border-color: transparent; color: var(--muted); padding-left: 10px; padding-right: 10px; }
.btn.text:hover { color: var(--text); }
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn.big { padding: 13px 28px; font-size: 16px; }
.btn.danger { color: var(--danger); }
.btn.icon { padding: 8px; }
.linkish { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font-family: var(--font-body); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* fields: square */
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.flabel { font-family: var(--font-eyebrow); font-size: 10.5px; font-weight: 700; letter-spacing: .10em; text-transform: uppercase; }
input[type=text], input[type=email], input[type=search], select, textarea {
  background: var(--bg); border: 1px solid color-mix(in srgb, var(--text) 28%, transparent); border-radius: 0; padding: 11px 12px; color: var(--text); width: 100%; min-width: 0; font-family: var(--font-body); font-size: 16px; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--text) 45%, transparent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; text-align: left; cursor: pointer; font-size: 14px; line-height: 1.4; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.hint { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.err { color: var(--danger); font-size: 14px; margin: 6px 0 0; }

/* dialogs: the page's own colors, square */
.modal { position: fixed; inset: 0; background: rgba(10,12,11,.5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 90; }
.dialog { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 0; box-shadow: var(--shadow); padding: 28px 30px 24px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; }
.dialog.wide { max-width: 720px; }
.dialog h2 { margin: 6px 0 12px; font-family: var(--font-heading); font-weight: 400; font-size: 28px; line-height: 1.12; letter-spacing: var(--heading-track); text-transform: var(--heading-case); }
.dialog p { margin: 0 0 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.dialog .stack { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 560px) { .dialog { padding: 22px 18px 18px; } .dialog h2 { font-size: 24px; } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 0; box-shadow: var(--shadow);
  font-family: var(--font-body); font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 100; max-width: min(580px, calc(100vw - 32px)); display: flex; gap: 14px; align-items: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; font-family: var(--font-body); }

/* menus */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--bg); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 6px; z-index: 70; text-align: left; }
.menu button, .menu a { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; cursor: pointer; font-family: var(--font-body); font-size: 15px; color: var(--text); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface); }
.menu .sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu .who { padding: 8px 12px 6px; font-size: 13px; color: var(--muted); }

.spinner { width: 16px; height: 16px; border: 2px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 226's own simple pages (privacy, unsubscribe, team home) */
.page { max-width: 640px; margin: 0 auto; padding: 56px 24px 64px; }
.page-logo { display: inline-block; margin-bottom: 48px; }
.page-logo img { height: 34px; width: auto; display: block; }
.page h1 { font-family: var(--font-heading); font-weight: 400; text-transform: var(--heading-case); letter-spacing: var(--heading-track); font-size: clamp(30px, 6vw, 44px); line-height: 1.08; margin: 10px 0 28px; }
.page p { margin: 0 0 18px; }
.page .foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
