/* Secondary surfaces share the semantic palette and controls in style.css. */
.fh-domain-tools { margin-bottom:24px; }
.fh-toolbar-caption { flex:1; }
.fh-domain-tools:has(#w-public-link) .movies-toolbar { display:grid; grid-template-columns:1fr auto auto; gap:8px; }
.fh-domain-tools:has(#w-public-link) .seg { grid-column:1/-1; }
.fh-domain-tools:has(#w-public-link) .seg-btn { flex:1; padding-inline:8px; }
.fh-domain-tools #w-public-link { grid-column:2; }
.fh-domain-tools:has(#btn-search) .movies-toolbar { justify-content:flex-end; }
.fh-field-hint { color:var(--text-2); font-size:14px; line-height:1.5; }
.fh-domain-tools label,.fh-inline-editor label { display:block; font-size:14px; font-weight:600; margin-bottom:6px; }
.fh-inline-editor,.movie-form,#note-form,#rem-form { padding:20px; border:1px solid var(--line); background:var(--surface); border-radius:var(--radius-panel,18px); margin:16px 0; }
.fh-inline-editor[hidden],.movie-form[hidden],#note-form[hidden],#rem-form[hidden] { display:none; }
.fh-row-actions { display:flex; gap:8px 20px; align-items:center; flex-wrap:wrap; font-size:14px; }
.fh-row-actions .fh-home-link-button { display:inline-flex; align-items:center; }
.fh-domain-tools .fh-home-upload { position:relative; }
.fh-domain-tools .fh-home-upload input[type="file"] { position:absolute; inset:0 auto auto 0; box-sizing:border-box; width:1px; min-width:0; max-width:1px; height:1px; min-height:0; max-height:1px; padding:0; margin:0; border:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.fh-doc-upload { padding:16px 18px; margin:0 0 12px; border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:14px; background:var(--surface); line-height:1.5; overflow-wrap:anywhere; }
.fh-doc-upload strong { display:flex; align-items:flex-start; gap:10px; margin-bottom:8px; }
.fh-doc-upload strong > span { display:flex; flex-shrink:0; color:var(--accent); margin-top:2px; }
.fh-doc-upload-detail { margin:4px 0 0; font-size:14px; color:var(--text-2); }
.fh-doc-upload-actions { display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-top:12px; }
.fh-doc-upload-actions .btn-primary { width:auto; min-height:44px; }
.fh-doc-upload[data-upload-state="error"] { border-left-color:var(--danger); }
.fh-doc-upload[data-upload-state="error"] strong > span { color:var(--danger); }
.fh-doc-upload[data-upload-state="ready"] { border-left-color:var(--success,var(--accent)); }
.fh-document-list { display:grid; border:1px solid var(--line); border-radius:var(--radius-panel); background:var(--surface); padding:0 18px; }
.fh-document-row { display:grid; grid-template-columns:48px minmax(0,1fr) auto; grid-template-areas:"type main actions" "links links links"; align-items:center; column-gap:14px; min-width:0; padding:14px 0; border-bottom:1px solid var(--line); }
.fh-document-row:last-child { border-bottom:0; }
.fh-document-type { grid-area:type; display:grid; place-items:center; width:46px; height:50px; border:1px solid var(--line); border-radius:12px; background:var(--surface-muted); color:var(--accent); font-size:11px; font-weight:750; letter-spacing:.04em; overflow:hidden; }
.fh-document-open { grid-area:main; display:flex; flex-direction:column; justify-content:center; min-width:0; min-height:52px; padding:4px 0; border:0; background:transparent; color:var(--ink); text-align:left; font:inherit; cursor:pointer; }
.fh-document-title { display:-webkit-box; max-width:100%; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow-wrap:break-word; word-break:normal; line-height:1.35; font-size:16px; font-weight:600; }
.fh-document-meta,.fh-document-detail { display:block; max-width:100%; overflow:hidden; margin-top:4px; color:var(--ink-muted); font-size:13px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.fh-document-menu { display:none; grid-area:actions; min-width:44px; }
.fh-document-menu span { letter-spacing:2px; transform:translateY(-2px); }
.fh-document-desktop-actions { grid-area:actions; display:flex; align-items:center; gap:16px; white-space:nowrap; }
.fh-doc-links { grid-area:links; display:flex; gap:6px; flex-wrap:wrap; align-items:center; min-width:0; margin-top:8px; padding-left:62px; }
.fh-doc-link-chip { display:inline-flex; align-items:center; max-width:100%; min-height:44px; gap:2px; padding-left:10px; border-radius:var(--r-pill); background:var(--accent-soft); font-size:12px; }
.fh-doc-link-open { min-width:0; min-height:44px; overflow:hidden; padding:4px 2px; border:0; background:none; color:inherit; text-overflow:ellipsis; white-space:nowrap; font:inherit; cursor:pointer; }
.fh-doc-link-remove { width:44px; min-width:44px; height:44px; padding:0; border:0; background:none; color:var(--text-2); cursor:pointer; }
.fh-profile-summary { display:flex; align-items:center; gap:16px; padding:8px 0 28px; }
.fh-profile-summary h2 { font-size:22px; margin:4px 0 0; overflow-wrap:anywhere; }
.fh-profile-summary > div:nth-child(2) { flex:1; min-width:0; }
.fh-profile-avatar { display:grid; place-items:center; width:52px; height:52px; border-radius:18px; background:var(--accent-soft); color:var(--accent); flex-shrink:0; }
.fh-text-danger { min-height:44px; border:0; background:transparent; color:var(--danger); padding:8px; font:inherit; }
.fh-settings-sections { max-width:800px; display:flex; flex-direction:column; gap:12px; }
.fh-settings-section { border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.fh-settings-section summary { cursor:pointer; padding:18px 20px; position:relative; list-style:none; }
.fh-settings-section summary::-webkit-details-marker { display:none; }
.fh-settings-section summary::after { content:'›'; position:absolute; right:20px; top:24px; font-size:22px; color:var(--text-2); transform:rotate(90deg); }
.fh-settings-section[open] summary::after { transform:rotate(-90deg); }
.fh-settings-section summary strong { display:block; font-size:16px; padding-right:24px; }
.fh-settings-section summary span { display:block; color:var(--text-2); font-size:13px; margin-top:5px; padding-right:24px; }
.fh-settings-body { padding:0 20px 20px; }
.fh-settings-body > label { display:block; margin:12px 0 6px; }
.fh-settings-body p { font-size:14px; line-height:1.55; }
.fh-settings-body input[type=checkbox] { flex-shrink:0; }
.fh-settings-body > label:has(input[type=checkbox]) { display:flex; gap:10px; align-items:center; min-height:44px; font-size:14px; }
.fh-settings-body .btn-primary { width:auto; max-width:100%; }
.wish-no-image { display:flex; align-items:center; height:64px; color:var(--accent); }
.wish-img { margin-top:38px; }
.wish-no-image + .wish-title,.wish-img + .wish-title { padding-right:0; min-height:0; }
.wish-card .wish-meta { margin-top:auto; }
.wish-card .f-edit { position:absolute; right:94px; top:8px; }
.wish-details { color:var(--text-2); font-size:14px; overflow-wrap:anywhere; }
.fh-wish-editor { display:grid; gap:16px; }
.fh-wish-editor input { margin:0; }
.wish-card .wish-public-toggle { background:transparent; font-size:13px; border-color:transparent; }
.fh-note-card .list-title-text { white-space:normal !important; overflow:visible !important; overflow-wrap:anywhere; }
.fh-note-card { min-width:0; }
.fh-movie-card { margin-bottom:14px; }
.fh-media-symbol { width:48px; height:58px; display:grid; place-items:center; flex-shrink:0; border:1px solid var(--line); border-radius:12px; color:var(--accent); background:var(--surface-muted); }
.fh-movie-card .movie-info { min-width:100px; }
.fh-movie-card .movie-row { gap:12px; align-items:center; }
.fh-reminder-list { display:grid; border:1px solid var(--line); border-radius:18px; background:var(--surface); overflow:hidden; }
.fh-reminder-list .rem-tile { border:0; border-bottom:1px solid var(--line); border-radius:0; padding:16px 100px 16px 20px; gap:5px; }
.fh-reminder-list .rem-tile:last-child { border-bottom:0; }
.fh-reminder-list .rem-time { font-size:18px; padding-right:0; }
.fh-reminder-list .rem-date { font-size:13px; }
.rem-open { text-align:left; border:0; background:transparent; color:var(--text); padding:6px 0; min-height:44px; font:inherit; font-weight:600; }
.rem-author { color:var(--text-2); font-size:13px; }
.fh-history-list { padding:0 20px; background:var(--surface); border:1px solid var(--line); border-radius:18px; }
.fh-history-row { padding:18px 0; border-bottom:1px solid var(--line); }
.fh-history-row:last-child { border-bottom:0; }
.fh-link-card { padding:18px 0; border-bottom:1px solid var(--line); }
#links-list { padding:0 20px; background:var(--surface); border:1px solid var(--line); border-radius:18px; }
#links-list > .glass-card:only-child { padding:24px 0; border:0; margin:0; }
#links-add { margin-bottom:16px; }
.fh-link-card:last-child { border-bottom:0; }
.fh-inbox-entry { padding:20px; background:var(--surface); border:1px solid var(--line); border-radius:18px; margin-bottom:16px; }
.fh-inbox-entry .inbox-content { font-size:17px; line-height:1.55; overflow-wrap:anywhere; }
.fh-inbox-entry .inbox-resolve-row { gap:6px !important; }
.fh-inbox-entry .inbox-resolve-row .btn-primary { min-width:0 !important; width:auto; flex:0 1 auto !important; padding:8px 12px; background:var(--surface-muted) !important; color:var(--text) !important; border:1px solid var(--line) !important; }
.meal-chip { min-height:44px; transition:background-color 120ms ease,color 120ms ease,border-color 120ms ease; }
.meal-ing-chip button { min-height:44px; min-width:44px; }
.meal-list-row { min-height:56px; }
.fh-meal-dialog { max-width:560px !important; text-align:left; }
.fh-meal-dialog h2 { font-size:22px; margin:0; }
.fh-meal-dialog .meal-label { font-size:14px; }
.fh-sub-card { display:flex; gap:8px; flex-direction:column; width:100%; text-align:left; }
.fh-sub-card strong { font-size:17px; }
.fh-sub-card small { line-height:1.6; color:var(--text-2); }
.fh-sub-upcoming-row { display:flex; gap:12px; justify-content:space-between; align-items:center; border-top:1px solid var(--line); padding:12px 0; }
.fh-sub-upcoming-row span { min-width:0; overflow-wrap:anywhere; }
.fh-sub-upcoming-row time { white-space:nowrap; font-size:14px; color:var(--text-2); }
.fh-sub-total { font-size:26px; letter-spacing:-.03em; font-weight:650; }
.fh-sub-total small { display:block; font-size:14px; font-weight:400; letter-spacing:normal; color:var(--text-2); margin-top:6px; }
@media (min-width:1000px) { #movies-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; } .fh-movie-card { margin:0; align-self:start; } }
@media (max-width:480px) { .fh-inline-editor,.movie-form,#note-form,#rem-form { padding:16px; } .fh-settings-body { padding-inline:16px; } .fh-settings-section summary { padding-inline:16px; } .fh-movie-card .movie-info { min-width:80px; } .fh-movie-card .card-icons { margin-left:auto; } .fh-profile-summary { gap:12px; } }
@media (max-width:700px) {
  .fh-domain-tools:has(#documents-search) .movies-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; }
  .fh-domain-tools:has(#documents-search) .fh-toolbar-caption { min-width:0; }
  .fh-document-list { padding:0 14px; }
  .fh-document-row { grid-template-columns:44px minmax(0,1fr) 44px; grid-template-areas:"type main actions" "links links links"; column-gap:10px; padding:12px 0; }
  .fh-document-type { width:42px; height:46px; }
  .fh-document-menu { display:inline-flex; }
  .fh-document-desktop-actions { display:none; }
  .fh-document-detail { display:none; }
  .fh-doc-links { padding-left:54px; margin-top:6px; }
  #documents-content { padding-bottom:calc(72px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion:reduce) { .meal-chip { transition:none; } }
/* HUB-107: small family collections, using the existing shell tokens. */
.fh-collection-list, .fh-collection-form { display: grid; gap: 12px; }
.fh-collection-list { padding: 12px 0; }
.fh-collection-list > button { text-align: left; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; }
.fh-collection-actions, .fh-collection-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fh-collection-row { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.fh-collection-row > a { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--ink); padding: 12px 0; }
.fh-collection-actions button, .fh-collection-row button, .fh-add-collection, .fh-collection-form button { min-height: 44px; }
.fh-add-collection { font-size: 12px; max-width: 100%; white-space: normal; }
/* The collection action sits below the existing check/title/actions row.
   Flex wrapping still allowed the action to shrink titles to zero on phones. */
.fh-list-row:has(> .fh-add-collection) { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; }
.fh-list-row:has(> .fh-add-collection) > .fh-row-main { width: auto; }
.fh-list-row:has(> .fh-add-collection) > .fh-add-collection { grid-column: 2 / -1; justify-self: start; text-align: left; }
.wish-surprise-settings { border-top:1px solid var(--line); margin-top:24px; padding-top:16px; display:grid; gap:12px; }
.wish-surprise-settings p { color:var(--text-2); margin:0; line-height:1.5; }
.wish-surprise-settings label { display:grid; gap:8px; }
.wish-surprise-settings input[type=datetime-local] { width:100%; min-width:0; min-height:44px; }
.wish-surprise-settings .wish-surprise-switch { display:flex; align-items:center; min-height:44px; }
.wish-surprise-switch input { width:22px; height:22px; }
.wish-surprise-actions { display:flex; gap:8px; flex-wrap:wrap; }
.wish-surprise-actions button { min-height:44px; flex:1 1 160px; }
.wish-surprise-settings .wish-surprise-error { color:var(--danger); }
.wish-reservation-badge { padding:4px 8px; border-radius:var(--r-pill); background:var(--surface-muted); font-size:12px; }
