.audience-options { border:0; margin:0; padding:0; min-width:0; }
.audience-options legend { margin-bottom:14px; font-weight:650; }
.audience-option { display:flex !important; align-items:flex-start; gap:12px; padding:10px 0; cursor:pointer; }
.audience-option input, .audience-members input { width:18px; min-height:18px; height:18px; margin:3px 0 0; accent-color:#328650; flex:none; }
.audience-option strong { display:block; font-size:.95rem; font-weight:600; }
.audience-option small { display:block; margin-top:4px; color:var(--muted); font-size:.8rem; font-weight:400; }
.audience-members { max-height:240px; overflow:auto; padding:8px 2px; }
.audience-members .check { display:flex; gap:10px; align-items:center; padding:7px 0; }
.access-dialog { width:min(440px, calc(100% - 32px)); max-height:85dvh; overflow:auto; padding:26px; border:0; border-radius:18px; background:#fff; color:var(--ink); box-shadow:0 20px 80px #152a3033; }
.access-dialog::backdrop { background:#17232155; }
.access-dialog h2 { margin:0 0 14px; font-size:1.2rem; }
.access-dialog p { line-height:1.6; }
.access-title { color:var(--muted); overflow-wrap:anywhere; }
.access-error { color:#b4232d; }
.dialog-actions { display:flex; gap:10px; margin-top:18px; }
.dialog-actions > .button { flex:1; justify-content:center; }
.dialog-actions .danger-button { background:#e6323d; color:white; border:0; }
.content-menu.sharing-menu { position:relative; flex:0 0 42px; margin-left:auto; z-index:4; }
.sharing-menu > summary { display:grid; place-items:center; width:42px; height:42px; padding:8px; border:0; border-radius:50%; background:#f5f6f5; cursor:pointer; list-style:none; }
.sharing-menu summary::-webkit-details-marker, .message-options summary::-webkit-details-marker { display:none; }
.sharing-menu svg, .content-action svg, .chat-input-row svg, .message-options summary svg { width:20px; height:20px; flex:none; }
.sharing-menu .content-menu-panel { position:absolute; top:100%; width:260px; max-width:calc(100vw - 32px); right:0; left:auto; padding:8px; border:1px solid #edf0ed; border-radius:14px; background:white; box-shadow:0 10px 35px #20342826; }
.sharing-menu .content-action { display:flex; align-items:center; justify-content:flex-start; gap:12px; width:100%; min-height:46px; padding:10px; border:0; border-radius:8px; background:transparent; font-size:.88rem; font-weight:500; text-align:left; }
.sharing-menu .content-action:hover { background:#f0f6f2; }
.sharing-menu .action-danger { margin-top:6px; border-top:1px solid #eee; border-radius:0; color:#df2f3a; }
.room-detail { display:flex; flex-direction:column; height:calc(100dvh - 140px); min-height:420px; max-height:1000px; padding:0 !important; background:#fff; overflow:visible; }
.chat-header { position:relative; z-index:3; display:flex; align-items:center; flex:none; gap:12px; min-height:76px; padding:12px 18px; border-bottom:1px solid #eef0ee; background:white; border-radius:14px 14px 0 0; }
.chat-header .record-tool { border:0; background:transparent; width:38px; min-width:38px; }
.chat-avatar { display:grid; place-items:center; width:42px; height:42px; flex:none; border-radius:50%; background:#e6f1e9; color:var(--green); overflow:hidden; }
.chat-avatar img { width:100%; height:100%; object-fit:cover; }
.chat-avatar svg { width:24px; height:24px; }
.chat-heading { display:block; flex:1; min-width:0; padding:0; background:transparent; text-align:left; cursor:pointer; color:var(--ink); }
.chat-heading strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:1rem; }
.chat-heading small { display:block; margin-top:3px; color:var(--muted); font-size:.78rem; }
.chat-header .sharing-menu > summary { background:transparent; }
.chat-cover-tools { display:flex; align-items:center; gap:8px; padding:5px 10px; font-size:.85rem; }
.chat-cover-tools span { flex:1; }
.chat-search { padding:8px 18px; border-bottom:1px solid #eee; }
.chat-search .room-detail-search { width:100%; }
.chat-search .room-detail-search label { width:auto; flex:1; }
.chat-timeline { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:12px 24px 20px; }
.chat-timeline .search-status:empty { display:none; }
.chat-timeline .message-day { justify-content:center; gap:0; margin:14px 0; font-size:.72rem; font-weight:500; text-transform:none; letter-spacing:0; color:#7a827e; }
.chat-timeline .message-day::before, .chat-timeline .message-day::after { display:none; }
.chat-timeline .message-row { display:flex; align-items:flex-start; gap:9px; padding:5px 0 9px; }
.chat-timeline .message-row > .avatar { width:30px; height:30px; min-width:30px; margin:23px 0 0 !important; font-size:.7rem; }
.chat-timeline .message-main { max-width:78%; min-width:0; }
.chat-timeline .message:not(.mine) .message-main { display:flex; flex-direction:column; align-items:flex-start; margin-right:auto; }
.chat-timeline .message-heading { gap:8px; padding:0 8px; }
.chat-timeline .message-heading strong { color:var(--muted); font-size:.73rem; font-weight:500; }
.chat-timeline .message-heading time { color:#8b938e; font-size:.65rem; }
.chat-timeline .message-list .message:not(.mine) .message-bubble { margin-top:4px; padding:10px 14px; border-radius:17px 17px 17px 4px; background:#f0f1f2; }
.chat-timeline .message-list .message.mine .message-bubble { margin-top:4px; padding:10px 14px; border-radius:17px 17px 4px 17px; background:#d3ebd8; }
.chat-timeline .message.mine .message-row { justify-content:flex-end; }
.chat-timeline .message.mine .message-row > .avatar { display:none; }
.chat-timeline .message.mine .message-main { display:flex; flex-direction:column; align-items:flex-end; margin-left:auto; text-align:right; }
.chat-timeline .message.mine .message-heading strong { display:none; }
.chat-timeline .message .message-photo { width:auto; max-width:100%; max-height:350px; object-fit:contain; margin:6px 0 0; }
.chat-timeline .reaction-bar { padding:3px 5px 0; gap:3px; }
.chat-timeline .reaction-button { min-height:26px; padding:3px 5px; font-size:.74rem; background:transparent; border:0; box-shadow:none; }
.chat-timeline .reaction-button.is-active { background:#e7f3e9; border-radius:12px; }
.message .content-menu.message-options { position:relative; flex:0 0 28px; }
.message .content-menu.message-options > summary { display:grid; place-items:center; width:28px; height:26px; min-height:26px; padding:3px; border:0; background:transparent; color:var(--muted); list-style:none; cursor:pointer; }
.message-options .content-menu-panel { position:absolute; z-index:2; top:auto; bottom:100%; right:0; left:auto; min-width:120px; width:max-content; padding:8px; display:flex; gap:6px; background:white; }
.message:not(.mine) .message-options .content-menu-panel { right:0; left:auto; }
.room-detail > .pinned-messages { flex:none; margin:0; padding:8px 18px; border-radius:0; max-height:100px; overflow:auto; font-size:.8rem; }
.room-detail > .pinned-messages h3 { display:none; }
.room-detail .chat-composer { position:relative; z-index:6; flex:none; margin:0; border:0; border-top:1px solid #f0f1ef; border-radius:0 0 14px 14px; padding:12px 16px; overflow:visible; max-height:none; background:white; }
.chat-composer > .form { display:block; margin:0; padding:0; }
.chat-composer [data-chat-extras]:not([hidden]) { position:absolute; z-index:12; right:auto; bottom:calc(100% + 8px); left:8px; display:flex; min-height:0; padding:5px 8px; border:1px solid #d3dfd5; border-radius:14px; background:#fff; box-shadow:0 8px 24px #152a302b; }
.chat-composer [data-chat-extras]:not([hidden])::after, .chat-composer .message-compose-panel:not([hidden])::after, .chat-composer .poll-composer-panel:not([hidden])::after { position:absolute; bottom:-7px; width:12px; height:12px; border-right:1px solid #d3dfd5; border-bottom:1px solid #d3dfd5; background:#fff; content:""; transform:rotate(45deg); }
.chat-composer [data-chat-extras]:not([hidden])::after { right:auto; left:18px; }
.chat-composer .message-compose-panel:not([hidden]), .chat-composer .poll-composer-panel:not([hidden]) { position:absolute; z-index:12; right:8px; bottom:calc(100% + 8px); left:8px; display:grid; gap:10px; width:auto; max-width:none; max-height:min(54dvh,420px); margin:0; padding:14px 14px 12px; overflow:auto; overscroll-behavior:contain; border:1px solid #d3dfd5; border-radius:14px; background:#fff; box-shadow:0 8px 24px #152a302b; }
.chat-composer .message-compose-panel:not([hidden])::after, .chat-composer .poll-composer-panel:not([hidden])::after { right:auto; left:18px; }
.chat-composer .mention-compose-panel:not([hidden]) { right:auto; left:8px; width:min(280px,calc(100vw - 32px)); padding:8px 12px; }
.chat-composer .mention-compose-panel:not([hidden])::after { right:auto; left:20px; }
.chat-composer .compose-panel-close { position:sticky; top:0; z-index:3; justify-self:end; align-self:start; width:27px; height:27px; margin:-7px -7px -30px auto; padding:0; border:0; border-radius:50%; background:#edf3ee; color:var(--green-dark); font:inherit; font-size:1.1rem; line-height:1; cursor:pointer; }
.chat-composer .compose-panel-close:hover { background:#dcebe0; }
.chat-composer .compose-panel-close:focus-visible { outline:2px solid var(--green); outline-offset:2px; }
.chat-composer .emoji-compose-panel:not([hidden]) { display:flex; flex-wrap:wrap; align-content:flex-start; padding-top:46px; }
.chat-composer .mention-options { display:grid; grid-auto-rows:minmax(28px,auto); gap:0; max-height:min(140px,calc(var(--chat-viewport-height,100dvh) - 170px)); padding:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.chat-composer .mention-options label { display:flex; align-items:center; gap:7px; min-width:0; min-height:28px; padding:2px 0; border:0; border-radius:0; background:transparent; color:var(--ink); font-size:.86rem; }
.chat-composer .mention-options label:hover { background:#f4f8f4; }
.chat-composer .mention-options input { width:15px; height:15px; flex:none; margin:0; accent-color:var(--green); }
.chat-composer .mention-options span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-input-row { display:flex; align-items:center; gap:8px; }
.chat-input-row textarea { flex:1; min-width:0; width:100%; height:44px; min-height:44px; max-height:120px; padding:12px 15px; border:0; border-radius:24px; background:#f1f2f4; resize:none; font-size:.9rem; line-height:20px; }
.chat-input-row .chat-add, .chat-input-row .message-submit { display:grid; place-items:center; flex:none; width:38px; min-width:38px; height:38px; min-height:38px; padding:8px; border:0; border-radius:50%; background:#33864f; color:white; cursor:pointer; }
.chat-input-row .message-tool-button { flex:none; border:0; }
.chat-composer [data-chat-extras] .message-tool-button { width:42px; height:42px; min-height:42px; padding:0; border:0; border-radius:50%; background:transparent; box-shadow:none; }
.chat-composer [data-chat-extras] .message-tool-button:hover, .chat-composer [data-chat-extras] .message-tool-button:focus-visible { border:0; background:var(--soft-green); box-shadow:none; outline:2px solid var(--green); outline-offset:1px; }
.chat-composer [data-chat-extras] { border:0; background:transparent; padding:8px 0 0; }
.chat-composer [hidden], .audience-options [hidden], .room-detail > [hidden] { display:none !important; }
.room-library { grid-template-columns:1fr !important; gap:3px !important; }
.room-library .room-card { display:flex; flex-direction:row; align-items:center; padding:14px 12px; gap:14px; border:0; border-radius:12px; box-shadow:none; }
.room-library .room-card:hover { background:#eef6f0; }
.room-library .library-card-image { width:54px; height:54px; min-height:54px; flex:none; border-radius:50%; }
.room-library .room-summary { padding:0; }
.room-preview { display:block; max-width:100%; margin-top:5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.83rem; color:var(--muted); font-weight:400; }
.room-preview-time { flex:none; margin-left:auto; color:var(--muted); font-size:.7rem; font-weight:400; }
.room-library .room-title { display:flex; gap:6px; align-items:center; }
.room-library .room-summary { min-width:0; }
.room-library .room-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media(max-width:760px) {
  body:has(.conversation-open) { padding-bottom:0; background:white; }
  html:has(.conversation-open), body:has(.conversation-open) { overflow:hidden; overscroll-behavior:none; }
  .conversation-open .topbar, .conversation-open .sidebar, .conversation-open .mobile-bottom-nav, body:has(.conversation-open) > .public-footer { display:none; }
  .conversation-open .layout { display:block; padding:0; margin:0; }
  .conversation-open .content { display:block; }
  .conversation-open .room-detail { position:fixed; z-index:30; top:var(--chat-viewport-top,0px); right:0; bottom:auto; left:0; width:auto; height:var(--chat-viewport-height,100dvh); min-height:0; max-height:none; margin:0; border:0; border-radius:0; box-shadow:none; }
  .chat-header { min-height:68px; padding:8px 10px; gap:8px; border-radius:0; }
  .chat-timeline { min-height:0; padding:6px 12px 16px; -webkit-overflow-scrolling:touch; }
  .chat-timeline .message-main { max-width:83%; }
  .room-detail .chat-composer { padding:9px 10px calc(9px + env(safe-area-inset-bottom)); border-radius:0; }
  .chat-composer .message-compose-panel:not([hidden]), .chat-composer .poll-composer-panel:not([hidden]) { max-height:min(52dvh,calc(var(--chat-viewport-height,100dvh) - 170px),360px); }
  .chat-composer [data-chat-extras] .message-tool-button { width:44px; height:44px; min-height:44px; }
  body:has(.conversation-open) .chat-composer input:not([type="checkbox"]):not([type="radio"]), body:has(.conversation-open) .chat-composer textarea, body:has(.conversation-open) .chat-composer select { font-size:16px !important; }
  .chat-input-row { gap:5px; }
  .chat-input-row .chat-add, .chat-input-row .message-submit { width:44px; min-width:44px; height:44px; min-height:44px; }
  .chat-input-row .message-tool-button { width:44px; height:44px; min-height:44px; }
}

/* One compact family menu and one calm navigation pattern across sections. */
.topbar { position:relative; }
.topbar .brand-mark { display:grid; place-items:center; font-size:1.55rem; }
.topbar .brand h1 { font-size:1.1rem; }
.account-menu > summary { width:42px; height:42px; border:0; border-radius:50%; background:var(--soft-green); font-size:1.8rem; line-height:1; }
.account-menu-panel { z-index:30; width:min(320px,calc(100vw - 28px)); max-height:min(78dvh,640px); overflow:auto; border-radius:14px; }
.account-menu-title { padding:4px 4px 8px; border-bottom:1px solid var(--line); }
.account-family-switcher { margin:0; }
.account-family-switcher label { display:grid; gap:6px; font-size:.85rem; font-weight:700; }
.account-family-switcher select { min-height:42px; }
.account-family-switcher .button { min-height:40px; }
.account-menu-links { display:grid; grid-template-columns:1fr 1fr; gap:5px; padding:6px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.account-menu-links button { min-height:40px; padding:8px; border-radius:8px; background:#f3f6f3; text-align:left; cursor:pointer; font:inherit; font-size:.87rem; }
.account-menu-links button:hover { background:var(--soft-green); }
.account-menu-links span { color:var(--green-dark); }
.mobile-bottom-nav button:last-child > span { font-size:1.6rem; line-height:.8; }
.record-back { display:grid; place-items:center; flex:none; width:42px; min-width:42px; height:42px; min-height:42px; margin:0; padding:0; border:0; border-radius:50%; background:var(--soft-green); color:var(--green-dark); text-decoration:none; cursor:pointer; }
.record-back .record-icon { width:20px; height:20px; }
.record-back > span { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.record-back:hover { background:var(--soft-green); }
.record-back:focus-visible { outline:3px solid var(--green); outline-offset:2px; }
.detail-header { display:flex; align-items:center; gap:14px; margin:0 0 14px; }
.detail-header .record-hero { flex:1; grid-template-columns:60px minmax(0,1fr); gap:12px; min-height:60px; padding:0; border:0; background:transparent; }
.detail-header .record-hero-image { width:60px; height:60px; border-radius:50%; }
.detail-header .record-hero-image .record-icon { width:25px; height:25px; }
.detail-header .record-hero-copy .photo-eyebrow { margin:0 0 2px; font-size:.68rem; }
.detail-header .record-hero-copy h2 { margin:0; color:var(--ink); font-size:1.15rem; line-height:1.25; }
.detail-header .record-hero-copy p:not(.photo-eyebrow):not(.field-note), .detail-header .record-hero-copy .field-note { display:none; }
.chat-header .record-back { width:40px; min-width:40px; height:40px; }
@media(max-width:700px) {
  body:has(.record-open) { padding-bottom:0; }
  .record-open .mobile-bottom-nav { display:none; }
  .topbar { min-height:60px; padding:8px 12px; }
  .topbar .topbar-actions { display:flex; margin-left:auto; }
  .account-menu-panel { position:fixed; top:64px; right:12px; }
  .topbar .brand-mark { width:34px; height:34px; }
  .topbar .brand h1 { font-size:1rem; }
  .detail-header { align-items:flex-start; gap:8px; }
  .detail-header .record-back { width:40px; min-width:40px; height:40px; justify-content:center; padding:0; font-size:0; }
  .detail-header .record-back > span { display:none; }
  .detail-header .record-hero { grid-template-columns:48px minmax(0,1fr); gap:10px; min-height:48px; }
  .detail-header .record-hero-image { width:48px; height:48px; }
  .detail-header .record-hero-copy h2 { font-size:1.05rem; }
}

/* The family menu is the root; each destination is its own branch page. */
.layout { display:block; grid-template-columns:minmax(0,1fr); }
.sidebar, .mobile-bottom-nav { display:none !important; }
.layout .content { width:100%; }
.branch-page-heading { display:flex; align-items:center; gap:12px; max-width:1120px; margin:0 auto 12px; }
.branch-page-heading h2 { margin:0; color:var(--ink); font-size:1.8rem; }
.library-header > .branch-back { margin-top:2px; }
.family-menu-page { width:min(100%,640px); margin:0 auto; padding:24px; }
.family-menu-heading { margin-bottom:18px; }
.family-menu-heading .library-eyebrow { margin:0 0 4px; }
.family-menu-heading h2 { margin:0; font-size:1.65rem; }
.family-menu-heading > p:last-child { margin:6px 0 0; color:var(--muted); }
.family-menu-branches { display:grid; }
.family-menu-branch { display:grid; grid-template-columns:38px minmax(0,1fr) 22px; align-items:center; gap:10px; min-height:54px; padding:7px 5px; border:0; border-bottom:1px solid #e9ece8; border-radius:0; background:transparent; color:var(--ink); text-align:left; font:inherit; font-weight:700; cursor:pointer; }
.family-menu-branch:first-child { border-top:1px solid #e9ece8; }
.family-menu-branch:hover, .family-menu-branch:focus-visible { border-radius:8px; background:var(--soft-green); outline:none; }
.family-menu-icon { display:grid; place-items:center; width:34px; height:34px; border-radius:8px; background:#f1f5f1; color:var(--green-dark); }
.family-menu-icon .record-icon { width:20px; height:20px; }
.family-menu-chevron { color:#85918a; font-size:1.45rem; font-weight:400; text-align:right; }
@media(max-width:700px) {
  body { padding-bottom:0; }
  .layout { padding:12px 12px 24px; }
  .family-menu-page { padding:18px; }
  .family-menu-branch { min-height:52px; }
  .branch-page-heading { margin-bottom:10px; }
  .branch-page-heading h2 { font-size:1.45rem; }
}

/* Compact message rows; keep sender avatars level with the sender name. */
.chat-timeline .message-list .message { margin-top:12px; }
.chat-timeline .message-list .message.is-grouped { margin-top:3px; }
.chat-timeline .message-list .message-day + .message { margin-top:3px; }
.chat-timeline .message-row { gap:8px; padding:0; }
.chat-timeline .message-row > .avatar { margin:0 !important; }
.chat-timeline .message.is-grouped .message-row > .avatar { visibility:hidden; }
.chat-timeline .message.is-grouped .message-heading { display:none; }
.chat-timeline .message-main { max-width:min(840px,86%); }
.chat-timeline .message-bubble-row, .chat-timeline .message-photo-row { display:flex; align-items:flex-end; gap:5px; width:max-content; max-width:100%; }
.chat-timeline .message-list .message .message-bubble { min-width:0; max-width:min(760px,100%); margin-top:2px; padding:8px 10px; }
.chat-timeline .message .message-photo { margin-top:3px; }
.chat-timeline .message.is-grouped .message-bubble, .chat-timeline .message.is-grouped .message-photo { margin-top:0; }
.chat-timeline .message-photo-row .message-photo { max-width:100%; border:0; box-shadow:none; }
.chat-timeline .message-photo-row.has-reactions .message-photo { max-width:calc(100% - 34px); }
.chat-timeline .message-reaction-pill { display:inline-flex; flex:0 0 auto; align-items:center; gap:3px; min-height:22px; padding:2px 5px; border:1px solid #e0e5e1; border-radius:12px; background:#fff; color:#58645d; font-size:.68rem; line-height:1; white-space:nowrap; }
.chat-timeline .reaction-bar.message-actions { display:flex; justify-content:flex-end; width:100%; min-height:22px; margin-top:1px; padding:0; gap:3px; }
.chat-timeline .reaction-bar.message-actions .message-options { flex:0 0 28px; }
.chat-timeline .message.is-group-followed:not(.show-actions) .message-actions { display:none; }
.chat-timeline .message-options > summary { position:relative; }
.chat-timeline .message-options > summary::after { position:absolute; inset:-7px; content:""; }
.chat-timeline .message-options > summary svg { width:17px; height:17px; }
.chat-timeline .message-options .content-menu-panel { flex-wrap:wrap; max-width:calc(100vw - 32px); }
.chat-timeline .message-options .content-menu-panel .reaction-button { min-width:40px; min-height:40px; justify-content:center; }
.chat-timeline .message-time-detail { align-self:flex-start; margin-top:2px; padding:2px 8px; color:var(--muted); font-size:.68rem; }
.chat-timeline .message.mine .message-time-detail { align-self:flex-end; text-align:right; }
.chat-timeline .message-time-detail[hidden] { display:none; }
.chat-timeline .message:focus-visible { outline:2px solid var(--green); outline-offset:3px; border-radius:5px; }
@media(max-width:560px) {
  .chat-timeline .message-row { gap:7px; padding:0 2px; }
  .chat-timeline .message:not(.mine) .message-main { max-width:min(86%,calc(100% - 38px)); }
  .chat-timeline .message.mine .message-main { max-width:90%; }
  .chat-timeline .message-list .message .message-bubble { padding:7px 9px; }
}

/* Constrain intrinsic image and unbroken-text widths at every flex boundary. */
.room-detail, .chat-timeline, .chat-timeline .message-list, .chat-timeline .message,
.chat-timeline .message-row, .chat-timeline .message-main { min-width:0; max-width:100%; }
.chat-timeline { overflow-x:hidden; }
.chat-timeline .message-main { width:86%; max-width:840px; }
.chat-timeline .message-bubble-row, .chat-timeline .message-photo-row { width:fit-content; max-width:100%; min-width:0; }
.chat-timeline .message-bubble-row .message-bubble { flex:0 1 auto; min-width:0; overflow-wrap:anywhere; }
.chat-timeline .message-bubble p, .chat-timeline .message-poll, .chat-timeline .mention-label,
.room-detail .pinned-messages { overflow-wrap:anywhere; word-break:normal; }
.chat-timeline .message-list .message .message-photo { display:block; width:auto; height:auto; min-width:0; max-width:100%; max-height:350px; object-fit:contain; border:1px solid #cdd8d0; box-sizing:border-box; }
.chat-timeline .message-photo-row .message-photo { flex:0 1 auto; }
.chat-timeline .message-photo-row.has-reactions .message-photo { max-width:calc(100% - 44px); }
.chat-timeline .message-reaction-pill { flex-shrink:0; }
.chat-timeline .message-heading { flex-wrap:wrap; }
.chat-timeline .message-poll, .chat-timeline .message-inline-editor { width:100%; min-width:0; }
.notification-setting { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; min-width:0; }
.notification-areas .notification-setting { border-top:1px solid var(--line); }
.notification-toggle { display:block; position:relative; flex:0 0 46px; width:46px; height:28px; min-height:28px; padding:3px; border:0; border-radius:20px; background:#929c95; cursor:pointer; }
.notification-toggle > span { display:block; width:22px; height:22px; border-radius:50%; background:#fff; transition:transform .15s; box-shadow:0 1px 3px #0002; }
.notification-toggle[aria-checked="true"] { background:#328650; }
.notification-toggle[aria-checked="true"] > span { transform:translateX(18px); }
.notification-toggle:focus-visible { outline:3px solid var(--green); outline-offset:4px; }
.notification-toggle:disabled { opacity:.55; cursor:wait; }
@media(max-width:560px) {
  .chat-timeline .message:not(.mine) .message-main { width:calc(100% - 37px); max-width:calc(100% - 37px); }
  .chat-timeline .message.mine .message-main { width:90%; max-width:90%; }
}
.topbar { gap:10px; }
.topbar .brand { flex:1; min-width:0; }
.topbar .brand > div:last-child { min-width:0; }
.topbar .brand p { max-width:none !important; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topbar .topbar-actions { display:flex !important; flex:none; }
.topbar .header-home { width:44px; height:44px; min-width:44px; padding:10px; border:0; border-radius:7px; background:var(--green-dark); color:white; }
.topbar .header-home .record-icon { width:24px; height:24px; }
.topbar .account-menu > summary { display:grid; place-items:center; width:44px; height:44px; padding:10px; background:transparent; border:0; border-radius:7px; color:var(--ink); list-style:none; }
.topbar .account-menu > summary .record-icon { width:26px; height:26px; stroke-width:1.5; }
.topbar .account-menu > summary::-webkit-details-marker { display:none; }
.library-header.compact-library-header { flex-wrap:nowrap; gap:8px; }
.compact-library-header > div:first-child { flex:1; min-width:0; }
.library-actions { display:flex; flex:none; align-items:center; gap:0; margin-top:16px; }
.library-actions .record-tool { width:44px; min-width:44px; height:44px; min-height:44px; padding:10px; border:0; background:transparent; color:var(--ink); }
.library-actions .record-icon { width:23px; height:23px; }
.library-actions .record-tool:hover, .topbar .account-menu > summary:hover { background:var(--soft-green); }
.library-toolbar.compact-library-toolbar { display:block; margin:0; }
.compact-library-toolbar:has(.library-search:not([hidden])), .compact-library-toolbar:has(.library-create[open]) { margin-bottom:14px; }
.compact-library-toolbar .library-search:not([hidden]) { display:flex; flex-direction:row; align-items:center; gap:6px; margin:0 0 12px; }
.compact-library-toolbar .library-search[hidden] { display:none !important; }
.compact-library-toolbar .library-search .record-tool { flex:none; width:44px; min-width:44px; height:44px; padding:10px; border:0; background:transparent; }
.compact-library-toolbar .library-search input { width:100%; }
.compact-library-toolbar .library-search .profile-link { flex:none; width:auto; white-space:nowrap; }
.compact-library-toolbar .library-create.compact-library-create { display:block; }
.compact-library-toolbar .compact-library-create:not([open]) { display:none; }
.compact-library-toolbar .compact-library-create { padding:0; border:0; background:transparent; }
.compact-library-toolbar .compact-library-create > summary { display:none !important; }
.compact-library-toolbar .compact-library-create .form { width:100%; max-width:650px; margin-top:8px; }
.password-field { position:relative; display:block; width:100%; min-width:0; }
.password-field input { width:100%; min-height:46px; padding-right:50px; }
.password-field input::-ms-reveal, .password-field input::-ms-clear { display:none; }
.password-visibility { position:absolute; right:3px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:44px; height:44px; padding:10px; border:0; border-radius:8px; background:transparent; color:var(--muted); cursor:pointer; }
.password-visibility:hover { color:var(--green-dark); background:var(--soft-green); }
.password-visibility:focus-visible { outline:2px solid var(--green); outline-offset:-2px; }
.password-visibility svg { display:block; width:21px; height:21px; pointer-events:none; }
.library-actions .record-tool:focus-visible, .header-home:focus-visible, .account-menu > summary:focus-visible { outline:3px solid var(--green); outline-offset:2px; }
@media(max-width:560px) {
  .topbar { gap:7px; }
  .topbar .brand { gap:8px; }
  .topbar .brand-mark { width:30px !important; height:30px !important; font-size:1.2rem; flex:none; }
  .library-header.compact-library-header { align-items:flex-start; }
  .compact-library-toolbar .library-search label { flex:1; min-width:0; }
}

/* Photobook selection, export and image gestures. */
.photo-download-choice { display:flex; align-items:center; gap:8px; padding:10px; min-height:44px; cursor:pointer; background:#eef5ef; font-size:.85rem; }
.photo-download-choice input { width:22px; height:22px; flex-shrink:0; accent-color:#24784a; }
.photo-download-choice span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.photo-tile:has([data-download-photo]:checked) { outline:3px solid #24784a; outline-offset:2px; }
.photo-download-bar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:14px; margin:12px 0; border-radius:12px; background:#eef5ef; }
.photo-download-bar p { width:100%; margin:0; font-size:.85rem; }
.photo-download-dialog { width:min(92vw,520px); max-height:85dvh; overflow:auto; border:0; border-radius:14px; padding:22px; }
.photo-download-dialog::backdrop { background:#08130ecc; }
.photo-download-dialog h2 { margin-top:0; }
.photo-download-actions { display:flex; flex-wrap:wrap; gap:10px; }
.photo-download-actions [hidden] { display:none; }
.viewer-image-frame { display:flex; align-items:center; justify-content:center; overflow:hidden; min-width:0; height:min(62dvh,680px); touch-action:none; }
.viewer-image-frame [data-viewer-image] { transform-origin:center; touch-action:none; user-select:none; -webkit-user-select:none; }
.viewer-zoom { min-width:44px; min-height:44px; border:0; border-radius:8px; color:white; background:#ffffff1c; cursor:pointer; font:inherit; }
.viewer-zoom:disabled { opacity:.4; }
@media(max-width:560px) {
  .viewer-image-frame { width:100%; height:65dvh; }
  .viewer-image-frame [data-viewer-image] { width:100%; height:100%; max-height:100%; object-fit:contain; }
  .photo-download-bar { gap:8px; padding:10px; }
}
@media(orientation:landscape) and (max-width:900px) { .viewer-image-frame { height:65dvh; } }

/* Photo books: compact controls around an edge-to-edge, scrollable gallery. */
html:has(.onskeskyen-open), body:has(.onskeskyen-open) { overflow:hidden; }
body:has(.onskeskyen-open) { padding-bottom:0; }
body:has(.onskeskyen-open) > .public-footer { display:none; }
.app.onskeskyen-open { display:flex; flex-direction:column; height:100dvh; min-height:0; }
.onskeskyen-open .topbar { flex:none; }
.onskeskyen-open .layout { display:block; flex:1; min-height:0; width:100%; max-width:none; padding:0; margin:0; }
.onskeskyen-open .content { height:100%; min-height:0; min-width:0; padding:0; }
.onskeskyen-frame { display:block; width:100%; height:100%; border:0; background:#fff; }
html:has(.photobook-open), body:has(.photobook-open) { overflow:hidden; }
body:has(.photobook-open) { padding-bottom:0; }
body:has(.photobook-open) > .public-footer { display:none; }
.app.photobook-open { display:flex; flex-direction:column; height:100dvh; min-height:0; }
.photobook-open .topbar { flex:none; }
.photobook-open .layout { flex:1; min-height:0; width:100%; padding-top:12px; padding-bottom:12px; }
.photobook-open .content { height:100%; min-height:0; }
.photo-library.photo-book-detail { display:flex; flex-direction:column; height:100%; min-height:0; max-width:none; padding:0; background:#fff; }
.photo-book-heading { display:flex; align-items:center; flex:none; gap:10px; padding:12px 12px 6px; }
.photo-book-heading > div { min-width:0; }
.photo-book-heading h2 { margin:0; font-size:1rem; overflow-wrap:anywhere; }
.photo-book-heading .photo-eyebrow { margin:0 0 2px; color:var(--green-dark); font-size:.65rem; font-weight:750; letter-spacing:.12em; }
.photo-book-heading small { font-size:.75rem; color:var(--muted); }
.photo-book-cover { display:grid; place-items:center; flex:none; width:48px; height:48px; overflow:hidden; border-radius:50%; background:var(--soft-green); color:var(--green-dark); }
.photo-book-cover img { width:100%; height:100%; object-fit:cover; }
.photo-book-detail .photo-record-toolbar { flex:none; flex-wrap:nowrap; gap:7px; margin:0; padding:6px 12px 10px; }
.photo-book-detail .record-tool, .photo-book-detail .sharing-menu > summary { width:44px; min-width:44px; height:44px; min-height:44px; border:1px solid #c9d6cd; border-radius:7px; background:#fff; }
.photo-book-detail .sharing-menu > summary { display:grid; place-items:center; padding:0; }
.photo-book-detail .record-tool[aria-pressed="true"] { background:#dcefe5; color:#18744b; border-color:#18744b; }
.photo-book-detail .record-tool:disabled { opacity:.35; cursor:default; }
.photo-book-detail > .photo-upload, .photo-book-detail > .book-settings { flex:none; width:calc(100% - 24px); max-height:42dvh; overflow:auto; margin:0 12px 10px !important; }
.photo-archive-notice { flex:none; margin:0; padding:6px 12px 10px; font-size:.8rem; color:var(--muted); }
.photo-gallery-scroll { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; }
.photo-book-detail .photo-grid { grid-template-columns:repeat(auto-fill,minmax(125px,1fr)); gap:2px; }
.photo-book-detail .photo-grid > .empty { grid-column:1/-1; padding:24px; }
.photo-book-detail .photo-grid-tile { display:block; position:relative; aspect-ratio:1; border:0; border-radius:0; overflow:hidden; outline:0; background:#e9eee9; }
.photo-book-detail .photo-open { display:block; width:100%; height:100%; padding:0; border-radius:0; }
.photo-book-detail .photo-open img { display:block; width:100%; height:100%; aspect-ratio:1; object-fit:cover; }
.photo-book-detail .photo-open img:not(.is-loaded) { opacity:0; }
.photo-load-retry { position:absolute; z-index:3; left:50%; top:50%; transform:translate(-50%,-50%); padding:8px 10px; border-radius:6px; background:#fff; color:var(--green-dark); cursor:pointer; white-space:nowrap; }
.photo-load-retry[hidden] { display:none; }
.photo-book-detail .photo-download-choice { position:absolute; inset:0; z-index:1; display:block; padding:0; margin:0; background:transparent; cursor:pointer; }
.photo-book-detail .photo-download-choice input { position:absolute; opacity:0; inset:0; width:100%; height:100%; margin:0; cursor:pointer; }
.photo-choice-mark { position:absolute; right:7px; bottom:7px; display:grid; place-items:center; width:25px; height:25px; border:2px solid white; border-radius:50%; background:#20392e55; color:transparent; pointer-events:none; }
.photo-choice-mark .record-icon { width:16px; height:16px; }
.photo-grid-tile.is-selected .photo-choice-mark { background:#178dbf; color:white; }
.photo-book-detail .photo-grid-tile.is-selected::after { content:''; position:absolute; inset:0; border:3px solid #178dbf; pointer-events:none; z-index:2; }
.photo-download-choice:has(input:focus-visible) { outline:3px solid #ffcf5a; outline-offset:-4px; }
.photo-blocked-label { position:absolute; bottom:5px; left:5px; font-size:.7rem; padding:2px 5px; color:#fff; background:#333a; }
.photo-book-bottom { flex:none; padding:8px 10px max(8px,env(safe-area-inset-bottom)); border-top:1px solid #d9e0da; background:#fff; }
.photo-bottom-search, .photo-selection-actions { display:flex; align-items:center; gap:7px; margin:0; }
.photo-bottom-search label { flex:1; min-width:0; }
.photo-bottom-search input { width:100%; min-height:44px; border-radius:6px; background:#f4f5f3; font-size:16px; }
.photo-selection-actions strong { font-size:.75rem; color:var(--muted); white-space:nowrap; }
.photo-selection-actions .record-toolbar-spacer { min-width:0; }
.viewer-photo-tools { display:flex; align-items:flex-start; gap:8px; flex-wrap:wrap; }
.viewer-photo-tools .record-tool { color:var(--green-dark); }
.viewer-photo-tools [aria-pressed="true"] { background:#dcefe5; }
.viewer-photo-edit { flex:1; min-width:180px; padding:0; background:transparent; }
.viewer-photo-edit .form { color:var(--ink); background:white; padding:12px; border-radius:8px; }
@media(max-width:560px) {
  .photobook-open .layout { display:block; padding:0; margin:0; }
  .photo-library.photo-book-detail { border:0; border-radius:0; box-shadow:none; }
  .photo-book-detail .photo-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .photo-selection-actions { gap:5px; }
  .photo-selection-actions strong { font-size:.7rem; }
  .photo-selection-actions .record-tool { min-width:40px; width:40px; height:44px; }
}
.wishlist-detail .wishlist-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; border:0; }
.wishlist-detail .wishlist-product-card { display:flex; flex-direction:column; min-width:0; gap:0; padding:0; border:1px solid var(--line); border-radius:12px; background:var(--paper,#fffdf8); overflow:hidden; }
.wishlist-detail .wishlist-product-card[hidden], .wishlist-detail [hidden] { display:none !important; }
.wishlist-card-open { display:flex; flex-direction:column; width:100%; padding:0; border:0; background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer; flex:1; }
.wishlist-card-open:hover .wishlist-card-photo img { transform:scale(1.035); }
.wishlist-card-open:focus-visible { outline:3px solid var(--green); outline-offset:-3px; }
.wishlist-card-photo { display:block; position:relative; width:100%; aspect-ratio:1; background:#f1efe8; overflow:hidden; }
.wishlist-card-photo img { display:block; width:100%; height:100%; object-fit:contain; transition:transform .2s; }
.wishlist-image-fallback { display:grid; place-items:center; width:100%; height:100%; background:linear-gradient(145deg,#e9eee4,#f4eddf); color:#809782; }
.wishlist-image-fallback .record-icon { width:56px; height:56px; stroke-width:1.3; }
.wishlist-priority-badge { display:inline-flex; padding:5px 9px; border-radius:20px; background:#fff4d5; color:#77591a; font-size:.75rem; font-weight:750; }
.wishlist-card-photo .wishlist-priority-badge { position:absolute; top:10px; left:10px; }
.wishlist-product-card .wishlist-item-copy { display:flex; flex-direction:column; width:100%; padding:13px 14px 0; gap:6px; }
.wishlist-item-copy strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.35; overflow-wrap:anywhere; }
.wishlist-card-note { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:var(--muted); font-size:.84rem; line-height:1.4; }
.wishlist-price { color:var(--green-dark); font-size:1rem; font-weight:750; margin-top:auto; padding-top:5px; }
.wishlist-card-action { width:100%; padding:12px 14px 14px; }
.wishlist-card-action > * { width:100%; white-space:normal; text-align:center; }
.wishlist-card-action .wishlist-status-button:not(.is-reserved) { background:var(--green-dark); color:#fff; border-color:var(--green-dark); }
.wishlist-product-card.is-received .wishlist-item-copy strong { text-decoration:line-through; color:var(--muted); }
.wishlist-product-card.is-received .wishlist-card-photo { opacity:.65; }
.wishlist-filters { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 16px; }
.wishlist-filters button { border:1px solid var(--line); border-radius:20px; background:#fffdf8; color:var(--green-dark); padding:8px 13px; font:inherit; font-size:.85rem; cursor:pointer; }
.wishlist-filters button.is-active { background:var(--green-dark); border-color:var(--green-dark); color:white; }
.wishlist-dialog { width:min(560px,calc(100vw - 28px)); max-height:calc(100dvh - 32px); padding:20px; border:1px solid var(--line); border-radius:14px; background:#fffdf8; color:var(--ink); overflow:auto; box-shadow:0 20px 70px #182d3540; }
.wishlist-dialog::backdrop { background:#182d3570; }
.wishlist-dialog header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.wishlist-dialog h3 { margin:0; font-size:1.25rem; overflow-wrap:anywhere; }
.wishlist-dialog-close { flex:none; width:34px; height:34px; border:1px solid var(--line); border-radius:50%; font-size:25px; cursor:pointer; background:#fff; color:var(--green-dark); }
.wishlist-detail-image { display:block; width:100%; max-height:340px; object-fit:contain; border-radius:8px; background:#f1efe8; margin:0 0 14px; }
.wishlist-detail-note { white-space:pre-wrap; overflow-wrap:anywhere; color:var(--muted); }
.wishlist-dialog .wishlist-buy-link { display:inline-flex; margin:0 8px 14px 0; color:#fff; text-decoration:none; }
.wishlist-dialog-action { margin-top:14px; }
.wishlist-edit-section { margin-top:18px; border-top:1px solid var(--line); padding-top:14px; }
.wishlist-edit-section > summary { color:var(--green-dark); font-weight:700; cursor:pointer; margin-bottom:12px; }
.wishlist-item-edit { display:grid; gap:12px; }
.wishlist-link-row { display:flex; gap:7px; margin-top:5px; }
.wishlist-link-row input { min-width:0; flex:1; }
.wishlist-link-row .button { flex:none; width:auto !important; min-width:64px; padding:8px 12px; }
[data-wishlist-import-status] { display:block; line-height:1.45; font-weight:400; color:var(--muted); margin-top:6px; }
.wishlist-extra-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; align-items:end; }
.wishlist-priority-check { padding-bottom:12px; font-size:.92rem; }
.wishlist-import-image { width:120px; height:120px; object-fit:contain; border-radius:8px; background:#f1efe8; }
@media(min-width:1150px) { .wishlist-detail .wishlist-card-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:700px) {
  .wishlist-detail .wishlist-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .wishlist-product-card .wishlist-item-copy { flex-basis:auto; padding:10px 10px 0; font-size:.94rem; }
  .wishlist-card-action { padding:10px; }
  .wishlist-card-action > * { font-size:.76rem; min-height:38px; padding:6px 5px; }
  .wishlist-card-photo .wishlist-priority-badge { top:7px; left:7px; padding:4px 7px; font-size:.68rem; }
  .wishlist-extra-fields { gap:10px; }
  .wishlist-dialog { padding:16px; }
}
