/* Shared EdwFoto appearance. Layout and feature behaviour stay in their own files. */
:root, :root[data-theme=light] {
  color-scheme: light;
  --paper: #f7f7f7;
  --card: #ffffff;
  --ink: #171717;
  --muted: #686868;
  --line: #dedede;
  --accent: #80634f;
  --soft: #efefef;
  --danger: #a33d32;
  --shadow: 0 8px 28px #00000004;
  --header-surface: #f7f7f7f2;
  --error-surface: #fff5f3;
  --error-line: #e3beb8;
  --error-ink: #a33d32;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --paper: #101010;
  --card: #191919;
  --ink: #f5f5f5;
  --muted: #b0b0b0;
  --line: #333333;
  --accent: #c4a58a;
  --soft: #242424;
  --danger: #e7a498;
  --shadow: none;
  --header-surface: #101010f2;
  --error-surface: #2a1d1b;
  --error-line: #68423b;
  --error-ink: #edb0a4;
}
:root[data-theme] { background: var(--paper); }
/* Older pages defined colours on body; inherit one palette on every route. */
:root[data-theme] body {
  --paper: inherit; --card: inherit; --ink: inherit; --muted: inherit;
  --line: inherit; --accent: inherit; --soft: inherit; --danger: inherit; --shadow: inherit;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
:root[data-theme] ::selection { background: var(--ink); color: var(--paper); }
:root[data-theme] .studio-header { background: var(--header-surface); }
:root[data-theme] :is(.panel,.post-card,.booking-card,.stat,.empty,.upload-item) {
  background: var(--card); border-color: var(--line); color: var(--ink);
}
:root[data-theme] :is(.input,.search,textarea,select,.country-code) {
  background: var(--card); color: var(--ink); border-color: var(--line);
  box-shadow: none;
}
:root[data-theme] :is(.input,.search,textarea,select,.country-code):focus {
  border-color: var(--accent); outline: 2px solid var(--soft); outline-offset: 1px;
  box-shadow: none;
}
:root[data-theme] :is(input,textarea)::placeholder { color: var(--muted); opacity: 1; }
:root[data-theme] .input[readonly] { background: var(--soft); color: var(--muted); }
:root[data-theme] .btn {
  background: var(--card); border-color: var(--line); color: var(--ink); box-shadow: none;
}
:root[data-theme] .btn:hover { background: var(--soft); border-color: var(--muted); }
:root[data-theme] :is(.btn.primary,.account-profile-follow .follow-button:not(.is-following)) {
  background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: none;
}
:root[data-theme] :is(.btn.primary,.account-profile-follow .follow-button:not(.is-following)):hover { opacity: .86; }
:root[data-theme] .btn.quiet { background: transparent; }
:root[data-theme] .btn.danger { color: var(--danger); border-color: var(--error-line); }
:root[data-theme] :is(.account-profile-follow .is-following,.drop-zone,.badge,.badge.published,.badge.new) {
  background: var(--soft); border-color: var(--line); color: var(--ink);
}
:root[data-theme] :is(.badge.new,.tiny-label,.form-kicker,.comment-delete,.account-arrow,.steps li>span) { color: var(--accent); }
:root[data-theme] .drop-zone.dragging { border-color: var(--accent); background: var(--soft); }
:root[data-theme] .avatar { background: var(--soft); color: var(--ink); }
:root[data-theme] .progress-track { background: var(--soft); }
:root[data-theme] .progress-track>span { background: var(--ink); }
:root[data-theme] .upload-meta strong { color: var(--ink); }
:root[data-theme] .account-row:hover { background: var(--soft); border-color: var(--muted); }
:root[data-theme] :is(.notice,.notice.ok,.notice.warn,.job-row) {
  background: var(--soft); border-color: var(--line); color: var(--ink);
}
:root[data-theme] :is(.notice.error,.badge.blocked,.error) {
  background: var(--error-surface); border-color: var(--error-line); color: var(--error-ink);
}
:root[data-theme] :is(.help,.panel-description,.intro p,.post-copy p,.post-date,.post-row-copy small,.footer-note,.viewer-caption,.danger-zone p) { color: var(--muted); }
:root[data-theme] :is(.form-field label,.field-label,.label) { color: var(--ink); }
:root[data-theme] .social-button { color: var(--muted); }
:root[data-theme] :is(.social-button.liked,.bookmark-button.is-saved) { color: var(--accent); }
:root[data-theme] .category-chip { background: transparent; color: var(--muted); border-color: var(--line); }
:root[data-theme] .category-chip.selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }
:root[data-theme] .notification-row.unread { border-left-color: var(--accent); }
:root[data-theme] :is(.consent input,.profile-bio-visibility input,.choice input) { accent-color: var(--ink); }
:root[data-theme] .toggle input { background: var(--line); }
:root[data-theme] .toggle input:checked { background: var(--ink); }
:root[data-theme] .toggle input::after { background: var(--card); }
:root[data-theme] .danger-zone { border-color: var(--line); }
:root[data-theme] .guide-dark { background: var(--card); color: var(--ink); border-color: var(--line); }
:root[data-theme] .guide-dark :is(.tiny-label,.steps li>span) { color: var(--accent); }
:root[data-theme] .guide-dark .steps p { color: var(--muted); }
:root[data-theme] :is(.photo-viewer,.photo-dialog,.zoom-stage) { background: #101010; color: #f5f5f5; }
/* Fit the complete photograph between the viewer controls. Intrinsic image
   dimensions must not enlarge the grid track beyond the visible stage. */
:root #photoDialog[open] {
  display: flex; flex-direction: column;
  height: min(96svh,1100px);
  max-height: calc(100svh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
:root #photoDialog > :is(.modal-head,.viewer-footer) { flex: 0 0 auto; }
:root #photoDialog .viewer-stage {
  flex: 1 1 0; min-width: 0; min-height: 0; height: auto;
  grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr);
}
:root #viewerImage {
  display: block; width: 100%; height: 100%; min-width: 0; min-height: 0;
  max-width: 100%; max-height: 100%; object-fit: contain;
}
:root[data-theme] :is(.modal,.photo-dialog)::backdrop { background: #000000b8; }
:root[data-theme] .viewer-control { background: #101010aa; }
:root[data-theme] .viewer-caption { color: #b0b0b0; }
:root[data-theme] .carousel-frame { background: var(--soft); }
:root[data-theme] .carousel-counter { background: #101010c9; color: #ffffff; }
:root[data-theme] .carousel-arrow { background: #fffffff2; border-color: #ffffff70; color: #171717; }
:root[data-theme] .locked-photo-overlay { background: #00000066; color: #ffffff; }
:root[data-theme] .locked-photo-overlay>span:last-child { color: #eeeeee; }
:root[data-theme] .theme-preview { background: #fafafa; border-color: #dedede; }
:root[data-theme] .theme-preview i { background: #171717; }
:root[data-theme] .theme-preview b { background: #e4e4e4; }
:root[data-theme] .theme-preview b:last-child { background: #80634f; }
:root[data-theme] .dark-preview { background: #101010; border-color: #333333; }
:root[data-theme] .dark-preview i { background: #f5f5f5; }
:root[data-theme] .dark-preview b { background: #333333; }
:root[data-theme] .dark-preview b:last-child { background: #c4a58a; }
:root[data-theme] .system-preview { background: linear-gradient(90deg,#fafafa 50%,#101010 50%); }

/* A readable type scale, with existing desktop columns and phone layouts. */
:root:not([data-text-size=large]) .intro p { font-size: 14px; line-height: 1.8; }
:root:not([data-text-size=large]) :is(.help,.panel-description,.text-small,details p,.setting-row p) { font-size: 12px; line-height: 1.8; }
:root:not([data-text-size=large]) :is(.form-field label,.field-label,.label) { font-size: 13px; line-height: 1.5; }
:root:not([data-text-size=large]) :is(.form-field .input,.form-field select,.form-field textarea) { font-size: 14px; }
:root:not([data-text-size=large]) .btn { font-size: 13px; min-height: 44px; }
:root:not([data-text-size=large]) .btn.small { font-size: 12px; min-height: 36px; }
:root .tiny-label { font-size: 10px; letter-spacing: 1.7px; }
:root .panel h2 { line-height: 1.25; letter-spacing: -.6px; }
:root .form-field { margin-bottom: 22px; }
:root .input,:root .search { line-height: 1.5; }
@media(min-width:1101px) {
  :root .header-nav a { font-size: 12px; }
  :root .brand small { font-size: 8px; }
}
@media(min-width:701px) {
  :root:not(.edwfoto-app) #postFeed .post-author { font-size: 14px; }
  :root:not(.edwfoto-app) #postFeed .post-date { font-size: 11px; }
  :root:not(.edwfoto-app) #postFeed .post-copy h2 { font-size: 18px; line-height: 1.45; letter-spacing: -.3px; }
  :root:not(.edwfoto-app):not([data-text-size=large]) #postFeed .post-copy p { font-size: 14px; line-height: 1.8; }
  :root:not(.edwfoto-app) #postFeed .post-bottom .image-count { font-size: 11px; }
  :root:not(.edwfoto-app) #postFeed .social-button { font-size: 13px; }
  :root:not(.edwfoto-app) #postFeed .admin-shortcuts .btn { font-size: 12px; min-height: 36px; }
  :root:not(.edwfoto-app) .person-copy strong { font-size: 12px; }
  :root:not(.edwfoto-app) .person-copy small { font-size: 10px; }
}
@media(max-width:700px) {
  :root :is(.form-field .input,.form-field select,.form-field textarea,.search) { font-size: 16px; }
  :root:not([data-text-size=large]) .intro p { font-size: 13px; }
}

/* Auth uses the same palette while keeping its PC photograph and app form. */
:root[data-theme] .page { background: var(--paper); box-shadow: var(--shadow); }
:root[data-theme] .right { background: var(--paper); border-color: var(--line); }
:root[data-theme] :is(.title h1,.label,.register-button,.login-button) { color: var(--ink); }
:root[data-theme] :is(.right-topline,.right-topline span,.login-subtitle,.register-text,.footer,.divider,.eye-button,.zoom-hint) { color: var(--muted); }
:root[data-theme] .language { background: var(--card); border-color: var(--line); }
:root[data-theme] .lang-button { color: var(--muted); }
:root[data-theme] .lang-button.active { background: var(--ink); color: var(--paper); box-shadow: none; }
:root[data-theme] .login-submit { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: none; }
:root[data-theme] .login-submit::after { color: inherit; }
:root[data-theme] .login-submit:hover { transform: none; box-shadow: none; opacity: .86; }
:root[data-theme] .google { background: var(--card); color: var(--ink); border-color: var(--line); }
:root[data-theme] .google:hover { background: var(--soft); border-color: var(--muted); }
:root[data-theme] .forgot-button { color: var(--accent); text-decoration-color: var(--accent); }
:root[data-theme] .success { background: var(--soft); color: var(--ink); border-color: var(--line); }
:root[data-theme] .form-kicker::before { background: var(--accent); }
:root[data-theme] .left {
  background: linear-gradient(135deg,#0e0b0c30,#11090bc4),url("../background/background1.png") center/cover no-repeat;
}
:root[data-theme] .left::before { border-color: #ffffff26; }
:root[data-theme] .left::after { background: linear-gradient(0deg,#130c0f70,transparent 43%); }
:root[data-theme=light] .photo-area img { filter: drop-shadow(0 12px 20px #00000020); }
:root[data-theme] :is(.left-title,.logo-caption) { color: #fffaf5; }
:root[data-theme] .left-title .hero-emphasis { color: #d5b99f; }
:root[data-theme] :is(.left-description,.photo-caption,.collection-label,.logo-caption span:last-child) { color: #e1d7d1; }
:root[data-theme] .small-title { color: #dec2aa; }
:root[data-theme] :is(.small-title,.collection-label)::before { background: #ba9277; }
:root:not([data-text-size=large]) .login-subtitle { font-size: 14px; line-height: 1.7; }
:root:not([data-text-size=large]) :is(.google,.login-submit,.register-text,.register-button,.login-button,.forgot-button) { font-size: 13px; }
:root:not([data-text-size=large]) .left-description { font-size: 13px; }
:root .input::placeholder { font-size: inherit; }
@media(min-width:901px) {
  :root:not(.edwfoto-app) body.auth-page { padding: 0; }
  :root:not(.edwfoto-app) .auth-page > .page {
    min-height: 100svh; border-radius: 0; box-shadow: none;
  }
  :root:not(.edwfoto-app) .auth-page .left { border-radius: 0; }
  :root:not(.edwfoto-app) .auth-page .left::before { content: none; }
  :root:not(.edwfoto-app) .auth-page .right { min-height: 100svh; }
  :root:not(.edwfoto-app) .left-inner {
    min-height: 720px;
  }
  :root:not(.edwfoto-app) .photo-area {
    position: absolute; top: 44%; right: 5%; transform: translateY(-50%);
    width: min(64%,calc(76svh * 1307 / 1698),calc((100svh - 210px) * 1307 / 1698),960px); aspect-ratio: 1307/1698;
  }
  /* The source PNG has transparent margins. Match its existing zoom crop so
     the photographs, rather than that padding, fill the preview. */
  :root:not(.edwfoto-app) .photo-area img {
    position: absolute; left: -17.521%; top: -7.8916%;
    width: 146.9013%; max-width: none;
  }
  :root:not(.edwfoto-app) .collection-label {
    display:block;top:108px;left:clamp(32px,3vw,64px);right:auto;
    width:max-content;max-width:calc(31% - clamp(32px,3vw,64px) - 16px);
    font-size:clamp(11px,.75vw,14px);line-height:1.6;letter-spacing:1.2px;
    white-space:normal;color:#e7dfd7;
  }
  :root:not(.edwfoto-app) .left-text { position: absolute; width: min(29%,390px); }
  :root:not(.edwfoto-app) .left-text .small-title { white-space: nowrap; }
  :root:not(.edwfoto-app) .left-title { font-size: clamp(26px,2.7vw,50px); }
  :root:not(.edwfoto-app) .photo-caption { bottom: 28px; }
}

/* App details: monochrome surfaces, restrained brown accents and touch targets. */
:root.edwfoto-app .app-header-main { min-height: 72px; }
:root.edwfoto-app .app-brand-copy strong { font-size: 12px; letter-spacing: 1.8px; }
:root.edwfoto-app .app-brand-copy small { font-size: 8px; letter-spacing: 1.2px; }
:root.edwfoto-app .app-gallery-intro h1 { font-size: 32px; line-height: 1.2; letter-spacing: -1px; }
:root.edwfoto-app .app-studio-eyebrow { font-size: 9px; letter-spacing: 1.6px; }
:root.edwfoto-app:not([data-text-size=large]) .app-gallery-intro>p { font-size: 13px; line-height: 1.8; }
:root.edwfoto-app .app-collection-line,:root.edwfoto-app .app-collection-line>span:first-child { font-size: 10px; }
:root.edwfoto-app .category-chip { border-color: transparent; }
:root.edwfoto-app .category-chip.selected { background: transparent; color: var(--ink); border-color: var(--accent); }
:root.edwfoto-app .post-card { border-radius: 16px; }
:root.edwfoto-app .post-card .post-copy h2 { font-size: 24px; line-height: 1.25; letter-spacing: -.6px; }
:root.edwfoto-app:not([data-text-size=large]) .post-card .post-copy p { font-size: 13px; line-height: 1.8; }
:root.edwfoto-app .app-album-kicker { font-size: 9px; }
:root.edwfoto-app .app-album-kicker .image-count { font-size: 10px; }
:root.edwfoto-app .post-author { font-size: 12px; }
:root.edwfoto-app .post-date { font-size: 10px; }
:root.edwfoto-app .app-post-follow .follow-button { font-size: 11px; }
:root.edwfoto-app .app-action-label { font-size: 11px; }
:root.edwfoto-app .post-bottom .social-button>span:not(.app-action-label) { font-size: 10px; }
:root.edwfoto-app .app-nav-label { font-size: 9.5px; }
:root.edwfoto-app .app-nav-item[data-app-tab=booking] .app-nav-icon { border-color: var(--ink); }
:root.edwfoto-app.app-auth-page :is(.google,.login-submit) { font-size: 14px; }
:root.edwfoto-app.app-auth-page .right { background: var(--paper); }
:root.edwfoto-app.app-booking .booking-guide .panel { background: transparent; color: var(--ink); border-color: var(--line); }
:root.edwfoto-app.app-booking .booking-guide .steps p { color: var(--muted); }
:root.edwfoto-app .studio-main .btn,:root.edwfoto-app .modal .btn { min-height: 48px; }
:root.edwfoto-app :is(.form-field .input,.form-field select,.form-field textarea,.search,.input,.country-code) { font-size: 16px; }
:root[data-text-size=large] :is(.app-gallery-intro>p,.post-card .post-copy p,.login-subtitle) { font-size: 15px; line-height: 1.9; }
@media(max-width:360px) {
  :root.edwfoto-app .app-brand-copy strong { font-size: 11px; letter-spacing: 1.3px; }
  :root.edwfoto-app .app-brand-copy small { font-size: 8px; letter-spacing: .6px; }
  :root.edwfoto-app .app-action-label { font-size: 10px; }
  :root.edwfoto-app .app-nav-label { font-size: 9px; }
}

/* Hide the page scrollbar while preserving wheel, touch and keyboard scrolling. */
html,body{scrollbar-width:none;-ms-overflow-style:none}
html::-webkit-scrollbar,body::-webkit-scrollbar{display:none;width:0;height:0}
