.cloud-workspace { --cloud-blue:#0a98bd; --cloud-ink:#08577a; }
#cloud-cookbooks-section { background:none; border:0; border-radius:0; padding:0; box-shadow:none; }
#cloud-cookbooks-section > .cloud-workspace-box { background:var(--portal-surface,#fff); border:1px solid #d5e8ed; border-radius:20px; padding:clamp(1rem,3vw,2rem); box-shadow:var(--portal-shadow,0 4px 20px #08577a0a); }
#cloud-cookbooks-section > .cloud-workspace-content { margin-top:1.5rem; }
.cloud-workspace-content > .cloud-book { padding:0; border:0; border-radius:0; background:none; }
#cloud-cookbooks-status:empty { display:none; }
.cloud-workspace .cloud-library-back { display:inline-flex; align-items:center; gap:.65rem; min-height:44px; padding:.55rem .95rem; border:1px solid #c6e5ed; border-radius:999px; background:#f2fafc; color:#08577a; font-size:.9rem; font-weight:600; text-decoration:none; }
.cloud-workspace .cloud-library-back:hover:not(:disabled) { background:#e1f3f8; border-color:#93c9d8; color:#08577a; }
.cloud-workspace .cloud-library-back:focus-visible { outline:3px solid #f59e0b; outline-offset:3px; }
.cloud-library-header { display:flex; align-items:center; justify-content:space-between; gap:1.5rem; flex-wrap:wrap; padding:1rem 0; }
.cloud-eyebrow { color:var(--cloud-ink); font-size:.8rem; letter-spacing:.08em; text-transform:uppercase; font-weight:700; }
.cloud-workspace .card { border:1px solid #d5e8ed; border-top:5px solid var(--cloud-blue); border-radius:1rem; box-shadow:0 4px 20px #08577a0a; }
.cloud-workspace .card h4 { font-family:Fraunces,serif; font-size:1.35rem; overflow-wrap:anywhere; }
.cloud-book { background:#fff; border:1px solid #d5e8ed; border-radius:1rem; padding:clamp(1rem,3vw,2rem); }
.cloud-badge { background:#e1f3f8; color:var(--cloud-ink); }
.cloud-workspace-nav { display:flex; gap:.6rem; flex-wrap:wrap; border-bottom:1px solid #d5e8ed; padding:1rem 0; }
.cloud-chapter { border:1px solid #d5e8ed; border-radius:.75rem; padding:1rem; }
.cloud-chapter-heading { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.cloud-chapter-heading h4 { flex:1; margin:0; overflow-wrap:anywhere; }
#cloud-cookbooks-chapters .cloud-chapter-heading h4 { min-width:0; }
#cloud-cookbooks-chapters .cloud-chapter-toggle { display:flex; align-items:center; gap:.65rem; width:100%; min-height:44px; border:0; border-radius:.35rem; padding:.25rem .35rem; background:transparent; color:var(--cloud-ink); font:inherit; text-align:left; }
#cloud-cookbooks-chapters .cloud-chapter-toggle:hover:not(:disabled) { background:#f2fafc; }
#cloud-cookbooks-chapters .cloud-chapter-name { min-width:0; overflow-wrap:anywhere; }
#cloud-cookbooks-chapters .cloud-chapter-count { flex-shrink:0; color:#52666c; font:400 .8rem system-ui,sans-serif; }
#cloud-cookbooks-chapters .cloud-chapter-chevron { flex-shrink:0; width:.5rem; height:.5rem; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(-45deg); margin-right:.15rem; }
#cloud-cookbooks-chapters .cloud-chapter-toggle[aria-expanded="true"] .cloud-chapter-chevron { transform:rotate(45deg); }
#cloud-cookbooks-chapters [hidden] { display:none !important; }
#cloud-cookbooks-panel-recipes .cloud-chapter-toolbar { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:.75rem 1rem; }
#cloud-cookbooks-panel-recipes .cloud-chapter-toolbar > label { margin:0; }
#cloud-cookbooks-panel-recipes .cloud-chapter-toggles { display:flex; flex-wrap:wrap; gap:.4rem; }
.cloud-recipe-actions { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1rem; }
.cloud-book-details { max-width:48rem; overflow-wrap:anywhere; }
.cloud-author-cover { display:block; max-height:210px; max-width:100%; border-radius:.5rem; margin:0 0 1rem; }
.cloud-author-photo { display:block; width:100%; max-width:480px; aspect-ratio:4/3; object-fit:cover; border-radius:.5rem; }
.cloud-workspace summary { overflow-wrap:anywhere; }
.cloud-workspace button:focus-visible { outline:3px solid #ff6331; outline-offset:3px; }
.cloud-workspace [hidden], #cloud-author-modal [hidden] { display:none !important; }
.cloud-cover-strip { display:flex; gap:.75rem; overflow-x:auto; padding:.3rem .2rem 1rem; scroll-snap-type:x proximity; }
.cloud-cover-choice { flex:0 0 160px; cursor:pointer; scroll-snap-align:start; position:relative; }
.cloud-cover-choice input { position:absolute; width:1px; height:1px; opacity:0; }
.cloud-cover-card { display:flex; flex-direction:column; gap:.4rem; height:100%; padding:.5rem; border:3px solid #d5e8ed; border-radius:.65rem; font-size:.85rem; }
.cloud-cover-card img { width:100%; aspect-ratio:3675/2775; object-fit:contain; }
.cloud-cover-choice input:checked + .cloud-cover-card { border-color:#0a98bd; background:#e1f3f8; box-shadow:0 0 0 1px #08577a; }
.cloud-cover-choice input:focus-visible + .cloud-cover-card { outline:3px solid #ff6331; outline-offset:2px; }
.cloud-cover-preview { position:relative; width:100%; aspect-ratio:3675/2775; margin-bottom:.75rem; }
.cloud-cover-preview img { display:block; width:100%; height:100%; object-fit:contain; }
.cloud-cover-preview .cloud-cover-overlay { position:absolute; inset:0; }
.cloud-tag-list { display:flex; flex-wrap:wrap; gap:.4rem; }
.cloud-tag { display:inline-block; padding:.3rem .7rem; border-radius:999px; font-size:.85rem; overflow-wrap:anywhere; }
.cloud-tag-button { background:none; border:0; border-radius:999px; padding:0; text-align:left; }
.cloud-tag-button:focus-visible, .cloud-copy-choice:focus-visible { outline:3px solid #ff6331; outline-offset:2px; }
.cloud-copy-results { display:grid; gap:.5rem; max-height:260px; overflow-y:auto; padding:.25rem; }
.cloud-copy-choice { display:flex; flex-direction:column; text-align:left; background:#fff; border:1px solid #d5e8ed; border-radius:.5rem; padding:.75rem; overflow-wrap:anywhere; }
.cloud-copy-choice[aria-pressed=true] { border-color:#0a98bd; background:#e1f3f8; }
.cloud-copy-text { white-space:pre-wrap; overflow-wrap:anywhere; max-height:320px; overflow-y:auto; }
#cloud-recipe-editor [hidden] { display:none !important; }
.cloud-book-cover { width:260px; max-width:100%; }
.cloud-book-cover:empty { display:none; }
.cloud-book-cover .cloud-cover-preview { border:1px solid #d5e8ed; border-radius:.4rem; overflow:hidden; margin-bottom:0; }
.cloud-book-custom-cover { display:block; max-width:100%; max-height:190px; object-fit:contain; border-radius:.4rem; }
.cloud-recipe-overview { display:grid; grid-template-columns:minmax(0,1fr) 200px; gap:1.5rem; align-items:start; }
.cloud-recipe-ingredients { min-width:0; overflow-wrap:anywhere; }
.cloud-recipe-photo { padding-top:1rem; width:200px; max-width:100%; }
.cloud-recipe-photo-frame { aspect-ratio:4/3; border:1px solid #d5e8ed; border-radius:.65rem; overflow:hidden; background:#f0f7f9; }
.cloud-recipe-photo-frame img { width:100%; height:100%; object-fit:contain; display:block; }
.cloud-photo-placeholder { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.5rem; height:100%; color:#08577a; text-align:center; }
.cloud-photo-placeholder i { font-size:2rem; opacity:.65; }
.cloud-backup-import-mode [data-backup-render-only], #cloud-backup-import-modal [hidden] { display:none !important; }
@media(max-width:575px) { .cloud-recipe-overview { grid-template-columns:minmax(0,1fr); gap:.5rem; } .cloud-recipe-photo { padding-top:0; margin-bottom:.5rem; } }
@media(max-width:575px) { .cloud-workspace-nav .btn { flex:1 1 100%; } .cloud-chapter-heading h4 { flex-basis:100%; } }
/* Book images live beside their content; historical versions are not a gallery. */
.cloud-inline-image { margin: .75rem 0; max-width: 220px; }
.cloud-inline-image img { display:block; max-width:100%; max-height:260px; object-fit:contain; border:1px solid #dce5e8; }
.cloud-inline-image img.cloud-frame-rounded { border-radius:18px; }
.cloud-inline-image img.cloud-frame-circle { width:180px; height:180px; object-fit:cover; border-radius:50%; }
.cloud-inline-image figcaption { margin-top:.35rem; }
.cloud-custom-cover-pair { display:flex; gap:12px; max-width:340px; }
.cloud-custom-cover-pair .cloud-inline-image { width:50%; margin:0; }
.cloud-front-section { margin-bottom:1rem; }
.cloud-custom-card { padding:1rem; margin:1rem 0; border:1px solid #dce5e8; border-radius:12px; background:#fafcfd; }
.cloud-design-image-card { border:1px solid #dce5e8; border-radius:12px; padding:1rem; margin:.75rem 0; }
.cloud-design-thumb { display:block; max-width:190px; max-height:230px; object-fit:contain; margin-bottom:.5rem; border:1px solid #dce5e8; }
.cloud-designer-tools { display:flex; flex-wrap:wrap; gap:.75rem; align-items:end; }
.cloud-design-control { display:flex; flex-direction:column; gap:.25rem; flex:1 1 160px; min-width:0; }
.cloud-design-control textarea { min-height:5rem; }
.cloud-design-control input[type=color] { width:100%; min-height:2.4rem; }
.cloud-image-designer { padding:1rem; border:2px solid #0a98bd; border-radius:12px; margin:1rem 0; background:#f6fafb; }
.cloud-design-canvas { display:block; width:min(100%, 430px); height:auto; margin:1rem auto; touch-action:none; background:white; border:1px solid #a7b8bf; box-shadow:0 4px 18px #08577a20; }
.cloud-design-canvas:focus-visible { outline:3px solid #0a98bd; outline-offset:3px; }
.cloud-page-design { padding:.75rem; border-left:3px solid #0a98bd; }
#cloud-author-modal [hidden] { display:none !important; }
@media (max-width:575px) { .cloud-designer-tools { gap:.5rem; } .cloud-design-control { flex-basis:130px; } .cloud-image-designer { padding:.6rem; } }
/* Native dialog top layer keeps image editing above the existing Book details modal. */
.cloud-image-dialog { box-sizing:border-box; width:min(940px, calc(100vw - 24px)); max-height:calc(100dvh - 32px); margin:auto; padding:1.25rem; border:2px solid #0a98bd; border-radius:12px; overflow:auto; overscroll-behavior:contain; color:#172e38; background:#f6fafb; }
.cloud-image-dialog::backdrop { background:rgba(0,0,0,.65); }
.cloud-image-dialog.cloud-image-designer { margin:auto; }
.cloud-image-dropzone { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; padding:.85rem; margin:.75rem 0; border:2px dashed #a7c9d3; border-radius:10px; background:#f5fbfd; }
.cloud-image-dropzone.cloud-image-dragover { border-color:#0a98bd; border-style:solid; background:#ddf5fb; color:#07627a; box-shadow:0 0 0 3px rgba(10,152,189,.22); }
.cloud-crop-dialog { background:#17252d; color:#fff; }
.cloud-crop-stage { position:relative; margin:1rem auto 2rem; overflow:hidden; background:#000; touch-action:none; }
.cloud-crop-stage canvas { display:block; width:100%; height:auto; }
.cloud-crop-box { position:absolute; box-sizing:border-box; border:2px dashed #00ffff; background:rgba(0,0,0,.08); box-shadow:0 0 0 150vmax rgba(0,0,0,.4); cursor:move; touch-action:none; }
.cloud-crop-box:focus-visible { outline:2px solid white; outline-offset:-5px; }
.cloud-crop-resize, .cloud-crop-max { position:absolute; border:0; background:#00ffff; padding:8px; display:flex; align-items:center; justify-content:center; touch-action:none; }
.cloud-crop-resize { width:44px; height:44px; right:0; bottom:0; border-radius:50% 0 0 0; cursor:nwse-resize; }
.cloud-crop-max { width:44px; height:30px; top:0; left:50%; transform:translateX(-50%); border-radius:0 0 22px 22px; cursor:pointer; padding:5px; }
.cloud-crop-resize img, .cloud-crop-max img { width:100%; height:100%; object-fit:contain; pointer-events:none; }
.cloud-crop-controls, .cloud-crop-footer { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:1rem; margin-top:.75rem; }
.cloud-crop-controls .cloud-design-control { max-width:300px; }
.cloud-crop-controls .btn { color:white; border-color:#a7b8bf; }
.cloud-crop-accept, .cloud-crop-cancel { width:44px; height:44px; border:0; border-radius:50%; color:white; font-size:1.4rem; }
.cloud-crop-accept { background:#2ecc71; } .cloud-crop-cancel { background:#e74c3c; }
.cloud-crop-dialog button:focus-visible { outline:3px solid white; outline-offset:3px; }
.cloud-crop-dialog button:disabled { opacity:.4; }
/* Font files already used by mobile/PDF; scoped family names avoid changing portal typography. */
@font-face { font-family:CloudPreviewRoboto; src:url('/fonts/Roboto-Regular.ttf') format('truetype'); font-display:swap; }
@font-face { font-family:CloudPreviewRoboto; src:url('/fonts/Roboto-Bold.ttf') format('truetype'); font-weight:700; font-display:swap; }
@font-face { font-family:CloudPreviewRobotoMono; src:url('/fonts/RobotoMono-Regular.ttf') format('truetype'); font-display:swap; }
@font-face { font-family:CloudPreviewPlayfairDisplay; src:url('/cloudCookbookAssets/PlayfairDisplay-VariableFont_wght.ttf') format('truetype'); font-weight:100 900; font-display:swap; }
@font-face { font-family:CloudPreviewSkia; src:url('/cloudCookbookAssets/Skia.ttf') format('truetype'); font-display:swap; }
@font-face { font-family:CloudPreviewLilitaOne; src:url('/covers/fonts/LilitaOne-Regular.ttf') format('truetype'); font-display:swap; }
@font-face { font-family:CloudPreviewAbrilFatface; src:url('/covers/fonts/AbrilFatface-Regular.ttf') format('truetype'); font-display:swap; }
@font-face { font-family:CloudPreviewLuckiestGuy; src:url('/covers/fonts/LuckiestGuy-Regular.ttf') format('truetype'); font-display:swap; }
/* Adapted from recipeView.css book-page-design-preview-*; keep proportions in sync. */
.cloud-page-design .book-page-design-preview-box { --preface-original-photo-width:40%; --preface-text-width:62.222%; border:1px solid #ddd; border-radius:6px; padding:18px 14px; margin:12px auto 0; background:#fff; text-align:center; max-width:450px; }
.cloud-page-design .book-page-design-preview-title { color:#000; font-size:1.15rem; font-weight:700; margin-bottom:12px; }
.cloud-page-design .book-page-design-preview-photo { display:block; width:92px; height:122px; object-fit:cover; margin:0 auto 12px; border:1px solid #bbb; }
.cloud-page-design .book-page-design-preview-photo.preface { width:var(--preface-original-photo-width); height:auto; aspect-ratio:4/3; }
.cloud-page-design .book-page-design-preview-photo.frame-rounded { border-radius:12px; }
.cloud-page-design .book-page-design-preview-photo.frame-circle { width:96px; height:96px; border-radius:50%; }
.cloud-page-design .book-page-design-preview-photo.preface-text-width { width:var(--preface-text-width); }
.cloud-page-design .book-page-design-preview-photo.preface-width100 { width:100%; }
.cloud-page-design .book-page-design-preview-text { color:#333; font-size:.82rem; line-height:1.35; margin:0 auto; max-width:19rem; text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; }
.cloud-page-design .book-page-design-preview-text.preface { width:var(--preface-text-width); max-width:none; }
.cloud-custom-cover-editors { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.cloud-custom-cover-editors .cloud-design-image-card { min-width:0; margin:0; }
.cloud-custom-cover-editors .cloud-design-thumb { max-width:100%; }
.cloud-spine-editor { padding:1rem; border:1px solid #d5e8ed; border-radius:12px; background:#f6fafb; }
.cloud-spine-layout { display:flex; align-items:center; gap:1.5rem; }
.cloud-spine-layout > .cloud-designer-tools { flex:1; }
.cloud-spine-sample { position:relative; flex:0 0 50px; height:240px; border:1px solid #bbb; overflow:hidden; box-shadow:3px 3px 7px #0002; }
.cloud-spine-sample span { position:absolute; left:50%; top:50%; white-space:nowrap; transform:translate(-50%,-50%) rotate(90deg); line-height:1.1; }
.cloud-spine-sample.cloud-spine-coil { background:repeating-linear-gradient(0deg,transparent 0 7px,#333 8px 11px,transparent 12px 18px),linear-gradient(90deg,#aaa,#eee 35%,#999 45%,#fafafa 60%,#999) !important; border-radius:12px; }
.cloud-cover-3d { display:block; width:100%; height:min(800px, calc(100vw + 180px)); min-height:420px; border:1px solid #d5e8ed; border-radius:12px; background:white; }
#cloud-pdf-status { display:inline; }
@media(max-width:575px) { .cloud-custom-cover-editors { grid-template-columns:1fr; } .cloud-spine-layout { gap:.75rem; } }
/* Canvas-first image composition: only the selected layer's styling is shown. */
.cloud-designer-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; margin:.5rem 0; }
.cloud-designer-layout { display:grid; grid-template-columns:minmax(0,1fr) 250px; gap:1.25rem; align-items:start; }
.cloud-designer-stage { min-width:0; text-align:center; }
.cloud-designer-stage .cloud-design-canvas { cursor:move; margin:.5rem auto; }
.cloud-designer-sidebar { display:grid; gap:.8rem; }
.cloud-layer-properties { display:grid; gap:.8rem; padding:.8rem; border:1px solid #d5e8ed; border-radius:.6rem; background:white; }
.cloud-layer-properties .cloud-design-control, .cloud-designer-sidebar > .cloud-design-control { flex:none; }
.cloud-layer-properties input[type=color], .cloud-designer-background input[type=color] { width:64px; cursor:pointer; }
.cloud-designer-background { border-top:1px solid #d5e8ed; padding-top:.8rem; }
.cloud-designer-background > label { margin:.75rem 0; }
.cloud-spine-controls { display:grid; grid-template-columns:minmax(0,1fr); gap:.8rem; flex:1; align-items:start; }
.cloud-spine-controls .cloud-design-control { flex:none; }
.cloud-spine-controls > .cloud-design-control > .cloud-design-control:first-child { order:2; flex-direction:row; align-items:center; margin-top:.35rem; }
.cloud-spine-controls input[type=color] { cursor:pointer; }
@media(min-width:768px) { .cloud-spine-controls { grid-template-columns:repeat(2,minmax(0,1fr)); } .cloud-spine-controls > label:first-child { grid-column:1/-1; } }
@media(max-width:650px) { .cloud-designer-layout { grid-template-columns:1fr; } .cloud-designer-sidebar { grid-template-columns:1fr; } }
/* One back/spine/front spread for both custom artwork and split template artwork. */
.cloud-cover-spread { display:flex; align-items:stretch; width:100%; border:1px solid #d5e8ed; overflow:hidden; border-radius:.35rem; background:white; }
.cloud-cover-face { position:relative; flex:1 1 0; min-width:0; aspect-ratio:1837.5/2775; overflow:hidden; }
.cloud-cover-face img { position:absolute; inset:0; width:100%; height:100%; display:block; object-fit:fill; }
.cloud-cover-face img.cloud-cover-split { width:200%; max-width:none; }
.cloud-cover-front img.cloud-cover-split { left:-100%; }
.cloud-spread-spine { position:relative; flex:0 0 4%; overflow:hidden; }
.cloud-spread-spine span { position:absolute; top:50%; left:50%; white-space:nowrap; transform:translate(-50%,-50%) rotate(90deg); line-height:1; }

/* Print review follows the mobile confirmation; checkout stays in one dialog. */
.cloud-print-review-icon { font-size: 2.6rem; margin: .5rem 0 1rem; }
.cloud-print-review-list { max-width: 360px; margin: 1.5rem auto; line-height: 1.4; }
.cloud-print-steps { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: 0; list-style: none; color: #64748b; font-size: .9rem; }
.cloud-print-steps [aria-current="step"] { color: #08577a; font-weight: 800; }
.cloud-print-price { padding: 1.25rem; background: #f2fafc; border: 1px solid #c6e5ed; border-radius: .75rem; }
.cloud-print-address { white-space: pre-line; }
.cloud-print-modal [hidden] { display: none !important; }
.cloud-print-modal .modal-footer { gap: .5rem; }
.cloud-print-modal .modal-body { overscroll-behavior: contain; }
.cloud-preview-estimate { padding: 1rem; border: 1px solid #c6e5ed; border-radius: .75rem; background: #f2fafc; }
.cloud-readiness-bg { fill: none; stroke: #e9ecef; stroke-width: 6; }
.cloud-readiness-value { fill: none; stroke: #0a98bd; stroke-width: 6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.cloud-readiness-ring text { font-size: 12px; font-weight: bold; fill: #212529; }
.cloud-order-cover { width: 100px; flex: 0 0 100px; }
.cloud-order-cover img { max-width: 100%; max-height: 155px; border-radius: .25rem; }

/* Compact cloud workspace, using the mobile cookbook's cyan accents. */
.cloud-book-hero { display:flex; align-items:center; gap:1.5rem; }
.cloud-book-hero .cloud-book-cover { flex:0 0 200px; width:200px; }
.cloud-book-heading { min-width:0; overflow-wrap:anywhere; }
.cloud-workspace-nav { margin-bottom:1rem; }
.cloud-workspace-nav .cloud-preview-cta { margin-left:auto; background:#087b96; border-color:#087b96; color:#fff; font-weight:700; padding:.65rem 1rem; box-shadow:0 3px 10px rgba(8,87,122,.18); }
.cloud-workspace-nav .cloud-preview-cta:hover, .cloud-workspace-nav .cloud-preview-cta.active { background:#08577a; border-color:#08577a; color:#fff; }
.cloud-workspace-nav .cloud-preview-cta:focus-visible { outline:3px solid #f59e0b; outline-offset:3px; }
.cloud-book > [id^=cloud-cookbooks-panel] { scroll-margin-top:1rem; }
.cloud-book-details { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem 1.5rem; max-width:none; margin-top:1.5rem; }
.cloud-book-details .cloud-front-section { margin:0; min-width:0; }
.cloud-book-details .cloud-front-section p { margin-bottom:.25rem; }
.cloud-book-details .cloud-front-section h5 { margin-top:0 !important; color:#08577a; }
.cloud-book-details .cloud-front-section:empty { display:none; }
.cloud-front-prose, .cloud-book-details > section:not(.cloud-front-section) { grid-column:1/-1; border-top:1px solid #d5e8ed; padding-top:1rem; }
.cloud-front-prose .cloud-inline-image { float:right; margin:0 0 1rem 1rem; }
.cloud-preview-hub { border:1px solid #d5e8ed; border-radius:.85rem; padding:clamp(1rem,3vw,1.5rem); background:#fff; }
.cloud-preview-heading, .cloud-preview-order { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.cloud-preview-empty { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; padding:1.2rem; border:1px solid #b9dfe8; border-radius:.75rem; background:#f2fafc; color:#08577a; }
.cloud-preview-empty > i { font-size:1.8rem; }
.cloud-preview-empty > div { flex:1 1 220px; }
.cloud-preview-empty p { margin-top:.3rem; color:#536974; }
.cloud-preview-hub [hidden] { display:none !important; }
.cloud-preview-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.cloud-preview-action { display:flex; align-items:center; gap:1rem; padding:1.15rem; border:1px solid #93c9d8; border-radius:.65rem; color:#08577a; background:#f3fbfd; text-align:left; font-weight:600; }
.cloud-preview-action > i:first-child { font-size:1.8rem; }
.cloud-preview-action > i:last-child { margin-left:auto; }
.cloud-preview-action small { display:block; font-weight:400; color:#536974; margin-top:.2rem; }
.cloud-preview-action:hover:not(:disabled) { border-color:#08577a; background:#e1f3f8; }
.cloud-preview-action:disabled { opacity:.55; cursor:default; }
.cloud-preview-hub .cloud-preview-estimate { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,.65fr); align-items:start; gap:1.5rem; }
.cloud-readiness-summary { display:flex; align-items:start; gap:.75rem; }
.cloud-readiness-summary svg { flex:0 0 72px; }
.cloud-readiness-summary details { margin-top:1.4rem; }
.cloud-readiness-summary li { margin:.35rem 0; }
#cloud-pdf-panel .cloud-preview-preparation-note { display:flex; align-items:flex-start; gap:.55rem; padding:.6rem .75rem; background:#f4f8fa; border-left:2px solid #d5e8ed; border-radius:.35rem; line-height:1.5; }
#cloud-pdf-panel .cloud-preview-preparation-note > i { flex:0 0 auto; margin-top:.2rem; color:#6c8790; }
.cloud-preview-modal [hidden] { display:none !important; }
.cloud-preview-refresh { display:inline; padding:0; margin:0; border:0; border-radius:0; background:none; box-shadow:none; color:#08577a; font:inherit; text-decoration:underline; text-underline-offset:.15em; cursor:pointer; }
.cloud-preview-refresh:hover:not(:disabled) { color:#0a98bd; }
.cloud-preview-refresh:focus-visible { outline:3px solid #f59e0b; outline-offset:3px; }
.cloud-preview-refresh:disabled { opacity:.6; cursor:default; }
.cloud-preview-modal .modal-content { height:92vh; height:92dvh; overflow:hidden; }
.cloud-viewer-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; padding:.75rem 1rem; border-bottom:1px solid #d5e8ed; }
.cloud-viewer-toolbar p { flex:1 1 240px; color:#536974; }
.cloud-viewer-stage { flex:1 1 auto; min-height:0; padding:0; background:#edf4f6; display:flex; }
.cloud-viewer-stage iframe { display:block; width:100%; height:100%; min-height:0; border:0; border-radius:0; background:#fff; }
.cloud-preview-modal button:focus-visible, .cloud-form-nav button:focus-visible { outline:3px solid #ff6331; outline-offset:2px; }
.cloud-form-nav { position:sticky; top:-1rem; z-index:2; display:flex; flex-wrap:wrap; gap:.5rem; background:#fff; padding:1rem 0; margin-top:-1rem; margin-bottom:1rem; border-bottom:1px solid #d5e8ed; }
.cloud-form-nav [aria-pressed=true] { background:#08577a; border-color:#08577a; color:#fff; }
.cloud-form-basics, .cloud-recipe-basics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 1rem; }
.cloud-form-basics > :first-child, .cloud-field-wide { grid-column:1/-1; }
.cloud-settings-form .cloud-cover-preview { max-width:360px; margin:0 auto .75rem; }
.cloud-settings-form .cloud-cover-choice { flex-basis:130px; }
.cloud-settings-form .cloud-page-design { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.8fr); gap:1rem; align-items:start; }
.cloud-page-design > h4 { grid-column:1/-1; margin-bottom:0; }
.cloud-page-design-controls, .cloud-page-design-sample { min-width:0; }
.cloud-page-design .book-page-design-preview-box { margin-top:0; }
.cloud-page-design .cloud-design-image-card { margin-top:0; padding:.75rem; }
.cloud-page-design .cloud-design-thumb { max-height:140px; }
.cloud-page-design .cloud-design-control { flex-basis:140px; }
.cloud-recipe-edit-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; align-items:start; }
.cloud-recipe-edit-columns > div { min-width:0; }
.cloud-recipe-edit-columns > div > section { height:100%; }
@media(max-width:767px) {
  .cloud-book-hero { gap:1rem; align-items:start; }
  .cloud-book-hero .cloud-book-cover { flex-basis:140px; width:140px; }
  .cloud-book-details { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cloud-preview-hub .cloud-preview-estimate, .cloud-recipe-edit-columns, .cloud-settings-form .cloud-page-design { grid-template-columns:minmax(0,1fr); }
  .cloud-preview-modal .modal-content { height:100vh; height:100dvh; }
  .cloud-page-design-sample { max-width:360px; width:100%; margin:auto; }
}
@media(max-width:575px) {
  .cloud-book-hero { flex-direction:column; }
  .cloud-book-hero .cloud-book-cover { flex-basis:auto; width:160px; }
  .cloud-workspace-nav { gap:.4rem; }
  .cloud-workspace-nav .btn { flex:1 1 auto; font-size:.85rem; padding:.6rem; }
  .cloud-preview-actions { grid-template-columns:minmax(0,1fr); gap:.6rem; }
  .cloud-preview-action { padding:.85rem; }
  .cloud-preview-order .btn { width:100%; }
  .cloud-form-nav { top:-1rem; }
  .cloud-form-nav .btn { flex:1 1 40%; }
  .cloud-form-basics, .cloud-recipe-basics { grid-template-columns:minmax(0,1fr); }
  .cloud-front-prose .cloud-inline-image { float:none; margin:.75rem 0; }
}

/* A quiet visit hint, independent of print readiness or required fields. */
.cloud-step-marker { display:inline-flex; align-items:center; margin-left:.5rem; vertical-align:middle; }
.cloud-step-dot { width:.65rem; height:.65rem; border-radius:50%; background:#f59e0b; box-shadow:0 0 0 2px #fff; animation:cloud-step-hint 1.7s ease-out infinite; }
.cloud-step-pending { box-shadow:0 0 0 2px #f59e0b44; }
@keyframes cloud-step-hint { 0%,100% { box-shadow:0 0 0 2px #fff,0 0 0 3px #f59e0b55; } 65% { box-shadow:0 0 0 2px #fff,0 0 0 8px #f59e0b00; } }
@media(prefers-reduced-motion:reduce) { .cloud-step-dot { animation:none; } }
.cloud-check-row, .cloud-design-control.cloud-check-row { display:flex; flex-direction:row; align-items:flex-start; gap:.6rem; flex:0 0 100%; min-width:0; cursor:pointer; }
.cloud-check-row > .form-check-input { flex:0 0 1em; float:none; margin:.25em 0 0; }
.cloud-check-row > .form-label, .cloud-check-row > .form-check-label { margin:0; flex:1; cursor:pointer; }
.cloud-check-stack { display:grid; gap:.75rem; }
.cloud-chapter-opener-design { padding:1rem; border:1px solid #d5e8ed; border-radius:.6rem; background:#f6fafb; }
.cloud-chapter-opener-design > legend { float:none; width:auto; padding:0 .3rem; }
/* Recipe styling stays inside Book details; all controls share its Save/Cancel. */
.cloud-recipe-design { margin:1.25rem 0; padding:1.25rem; border:1px solid #d5e8ed; border-radius:.75rem; background:#f6fafb; }
.cloud-recipe-design-summary { display:flex; align-items:center; justify-content:space-between; gap:1rem; min-height:44px; color:#173e50; font-size:1.1rem; font-weight:600; cursor:pointer; list-style:none; }
.cloud-recipe-design-summary::-webkit-details-marker { display:none; }
.cloud-recipe-design-summary::after { content:''; flex:0 0 .5rem; height:.5rem; margin-right:.25rem; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(-45deg); }
.cloud-recipe-design[open] > .cloud-recipe-design-summary::after { transform:rotate(45deg); }
.cloud-recipe-design-summary:hover { color:#08577a; }
.cloud-recipe-design-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; margin:1rem 0; }
.cloud-recipe-design-header p { flex:1 1 240px; }
.cloud-recipe-design-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:1.5rem; align-items:start; }
.cloud-recipe-design-controls, .cloud-recipe-design-sample { min-width:0; }
.cloud-recipe-design-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:.6rem; min-width:0; padding:.8rem 0; margin:0; border:0; border-top:1px solid #d5e8ed; }
.cloud-recipe-design-row > legend, .cloud-recipe-design-print > legend { float:none; width:auto; font-size:.9rem; font-weight:600; margin:0 0 .4rem; padding:0; }
.cloud-recipe-design-row > legend { grid-column:1/-1; }
.cloud-recipe-design-field { display:flex; flex-direction:column; gap:.3rem; min-width:0; font-size:.8rem; color:#405b68; }
.cloud-recipe-design-field .form-select, .cloud-recipe-design-field .form-control { min-width:0; font-size:.85rem; min-height:44px; }
.cloud-recipe-design-color { display:flex; gap:.35rem; }
.cloud-recipe-design-color .form-control-color { flex:0 0 40px; width:40px; padding:.25rem; cursor:pointer; }
.cloud-recipe-design-color input[type=text] { width:100%; padding:.4rem; font-family:monospace; }
.cloud-recipe-design-sample { margin:0; padding:1rem; background:#eaf2f4; border-radius:.6rem; }
.cloud-recipe-design-eyebrow { margin-bottom:.75rem; font-size:.65rem; font-weight:700; letter-spacing:.12em; color:#496570; }
.cloud-recipe-design-paper { padding:1.75rem 1.25rem; background:#fff; border:1px solid #dce4e6; box-shadow:0 3px 12px #173e5010; overflow-wrap:anywhere; font-size:.85rem; line-height:1.5; }
.cloud-recipe-design-recipe-title { font-size:1.3rem; font-weight:700; text-align:center; border-block-width:1px; padding:.6rem 0; margin-bottom:1.25rem; }
.cloud-recipe-design-heading { font-size:.95rem; font-weight:700; margin:.9rem 0 .4rem; }
.cloud-recipe-design-paper ul, .cloud-recipe-design-paper ol { padding-left:1.3rem; margin:0 0 .75rem; }
.cloud-recipe-design-paper li { margin-bottom:.3rem; }
.cloud-recipe-design-note { margin-top:1.25rem; font-size:.8rem; }
.cloud-recipe-design-sample figcaption { margin:.75rem 0; }
.cloud-recipe-design-print { display:grid; gap:.6rem; min-width:0; margin:1rem 0 .5rem; padding-top:1rem; border:0; border-top:1px solid #d5e8ed; }
.cloud-recipe-design :is(summary,button,input,select):focus-visible { outline:3px solid #0a98bd; outline-offset:2px; }
@media(max-width:991px) {
  .cloud-recipe-design { padding:1rem; }
  .cloud-recipe-design-layout { grid-template-columns:minmax(0,1fr); gap:1rem; }
  .cloud-recipe-design-sample { width:100%; max-width:400px; margin:auto; }
}
@media(max-width:420px) {
  .cloud-recipe-design-row { grid-template-columns:minmax(0,1fr); }
}
.cloud-opener-design-row { padding:.75rem 0; border-top:1px solid #d5e8ed; }
.cloud-opener-design-row .cloud-design-control:last-child { flex:0 0 110px; }

.cloud-opener-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.8fr); gap:1rem; align-items:start; }
.cloud-opener-preview { border:1px solid #ddd; border-radius:6px; padding:22px 14px; background:#fff; text-align:center; overflow-wrap:anywhere; }
.cloud-opener-preview-number { font-size:.85rem; margin-bottom:.6rem; }
.cloud-opener-preview-title { font-size:1.4rem; font-weight:700; margin-bottom:.9rem; }
.cloud-opener-preview-intro { font-size:.85rem; line-height:1.5; }
.cloud-tag-dots { display:inline-flex; align-items:center; flex-wrap:wrap; gap:.4rem; margin-left:.6rem; vertical-align:middle; }
.cloud-tag-dot { display:inline-block; flex:0 0 .7rem; width:.7rem; height:.7rem; padding:0; border-radius:50%; box-shadow:0 0 0 1px #0002; }
.cloud-tag-dot:focus-visible { outline:2px solid #08577a; outline-offset:3px; }
.cloud-copy-multiple { max-height:340px; }
.cloud-copy-multiple .cloud-copy-choice { flex-direction:row; align-items:center; gap:.75rem; cursor:pointer; }
.cloud-copy-choice.is-selected { border-color:#0a98bd; background:#e1f3f8; }
.cloud-copy-unavailable:empty { display:none; }
.cloud-copy-choice:focus-within { outline:2px solid #0a98bd; outline-offset:1px; }
.cloud-copy-choice .form-check-input { flex:0 0 1.1rem; margin:0; }
.cloud-copy-caption { display:flex; flex-direction:column; gap:.2rem; min-width:0; flex:1; }
.cloud-copy-choice .cloud-tag-dots { max-width:25%; margin:0; }
.cloud-copy-selection { display:flex; flex-wrap:wrap; gap:.4rem; max-height:100px; overflow:auto; margin:.5rem 0; padding:.25rem; }
.cloud-copy-selection .btn { max-width:100%; overflow-wrap:anywhere; }
.cloud-copy-filters { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:1rem; }
@media(max-width:575px) { .cloud-copy-filters { grid-template-columns:minmax(0,1fr); gap:0; } }
@media(max-width:767px) { .cloud-opener-layout { grid-template-columns:minmax(0,1fr); } }

.cloud-tag-filter-pills { display:flex; flex-wrap:wrap; gap:.5rem; max-height:180px; overflow:auto; padding:.3rem; margin-bottom:.4rem; }
.cloud-tag-filter-pill { opacity:.5; transition:opacity .15s; }
.cloud-tag-filter-pill:hover, .cloud-tag-filter-pill:focus-visible, .cloud-tag-filter-pill[aria-pressed=true] { opacity:1; }
/* Selected tags brighten without an outer ring; keyboard focus stays visible. */
.cloud-copy-choice:has(input:disabled):not(.is-selected) { opacity:.6; cursor:default; }
.cloud-drawer-readout { max-width:52rem; }
@media(prefers-reduced-motion:reduce) { .cloud-tag-filter-pill { transition:none; } }

/* Recipe rows remain scannable; reading and editing have their own dialogs. */
.cloud-recipe-row { display:flex; align-items:center; gap:1rem; padding:.85rem 1rem; border:1px solid #dce5e8; border-radius:.65rem; margin:.55rem 0; background:#fff; }
.cloud-recipe-row-title { flex:1; min-width:0; overflow-wrap:anywhere; }
.cloud-recipe-row-actions { display:flex; gap:.4rem; flex-wrap:wrap; justify-content:flex-end; flex-shrink:0; }
.cloud-recipe-row-actions .btn { min-height:34px; }
.cloud-recipe-row.is-selectable { display:grid; grid-template-columns:1.1rem minmax(0,1fr) auto; }
.cloud-recipe-row.is-selectable > .form-check-input { margin:0; }
.cloud-recipe-row.is-selected { background:#edf8fb; }
@media(max-width:767px) {
  .cloud-recipe-row.is-selectable { grid-template-columns:1.1rem minmax(0,1fr); }
  .cloud-recipe-row.is-selectable .cloud-recipe-row-actions { grid-column:2; }
}
.cloud-recipe-view-photo { float:right; width:40%; max-width:320px; margin:0 0 1rem 1.5rem; }
.cloud-recipe-view-photo img { width:100%; height:auto; border-radius:.7rem; }
#cloud-recipe-view-body { line-height:1.65; }
#cloud-recipe-view-body li { margin-bottom:.5rem; }
.cloud-drawer-readout::after { content:''; display:block; clear:both; }
.cloud-recipe-edit-intro { display:grid; grid-template-columns:minmax(0,1fr) 240px; gap:1.5rem; align-items:start; }
.cloud-recipe-edit-intro:has(> .cloud-recipe-basics:only-child) { grid-template-columns:1fr; }
.cloud-recipe-edit-photo { padding:.85rem; background:#f4f8fa; border-radius:.75rem; }
.cloud-recipe-photo-edit-actions { display:flex; gap:.4rem; flex-wrap:wrap; margin-top:.6rem; }
.cloud-recipe-photo-edit-actions .cloud-image-dropzone { width:100%; }
.cloud-recipe-edit-section { margin:1.25rem 0; }
.cloud-recipe-edit-entry { padding:.85rem; margin:.6rem 0; border:1px solid #dce5e8; border-radius:.65rem; background:#fff; }
.cloud-recipe-entry-actions { display:flex; justify-content:flex-end; gap:.35rem; padding-top:.25rem; }
.cloud-recipe-entry-actions .btn { padding:.1rem .55rem; }
.cloud-recipe-edit-entry .cloud-recipe-edit-section { margin:.5rem 0; }
.cloud-recipe-optional { padding:.85rem 0; border-top:1px solid #dce5e8; }
#cloud-recipe-editor .modal-body { background:#fbfcfd; }
#cloud-recipe-editor .form-label { font-size:.875rem; font-weight:600; margin-bottom:.3rem; }
#cloud-recipe-editor .cloud-tag-list { max-height:180px; overflow:auto; }
@media (max-width: 767px) {
  .cloud-recipe-row { align-items:flex-start; flex-wrap:wrap; gap:.6rem; }
  .cloud-recipe-row-title { flex-basis:100%; }
  .cloud-recipe-row-actions { margin-left:auto; }
  .cloud-recipe-edit-intro { grid-template-columns:minmax(0,1fr); }
  .cloud-recipe-edit-photo { max-width:320px; width:100%; }
  .cloud-recipe-view-photo { float:none; width:100%; margin:0 0 1rem; }
}

.cloud-add-recipe-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; padding:.5rem 0 1rem; }
.cloud-add-recipe-choice { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1rem; min-height:150px; padding:1.5rem; border-radius:.8rem; font-weight:600; white-space:normal; }
.cloud-add-recipe-choice i { font-size:1.8rem; }
.cloud-add-recipe-choices-three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.cloud-recipe-code-input { max-width:12rem; font-size:1.4rem; font-weight:600; letter-spacing:.2em; text-transform:uppercase; }
@media (max-width:575px) { .cloud-add-recipe-choices { grid-template-columns:minmax(0,1fr); } .cloud-add-recipe-choice { min-height:110px; } }

/* Compact recipe fields: room for the ingredient, short amount/unit controls. */
#cloud-recipe-editor .cloud-ingredient-fields { display:grid; grid-template-columns:minmax(0,1fr) 4.5rem 4.5rem; gap:.5rem; }
#cloud-recipe-editor .cloud-ingredient-fields > div { min-width:0; margin-bottom:0 !important; }
#cloud-recipe-editor .cloud-ingredient-entry, #cloud-recipe-editor .cloud-step-entry { padding:.6rem; margin:.45rem 0; }
#cloud-recipe-editor .cloud-ingredient-entry .form-label, #cloud-recipe-editor .cloud-step-entry .form-label { font-size:.8rem; margin-bottom:.2rem; }
#cloud-recipe-editor .cloud-ingredient-fields .form-control, #cloud-recipe-editor .cloud-step-entry textarea { font-size:.875rem; padding:.3rem .45rem; }
#cloud-recipe-editor .cloud-step-entry textarea { min-height:3.7rem; resize:vertical; }
#cloud-recipe-editor .cloud-step-entry > .mb-2 { margin-bottom:.2rem !important; }
#cloud-recipe-editor .cloud-ingredient-entry { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.2rem .4rem; align-items:start; }
#cloud-recipe-editor .cloud-ingredient-entry > .cloud-ingredient-fields, #cloud-recipe-editor .cloud-ingredient-entry > .alert { grid-column:1 / -1; }
#cloud-recipe-editor .cloud-ingredient-entry > details { font-size:.8rem; margin-top:.3rem !important; min-width:0; }
#cloud-recipe-editor .cloud-ingredient-entry > details[open] { grid-column:1 / -1; }
#cloud-recipe-editor .cloud-ingredient-entry > .cloud-recipe-entry-actions { justify-self:end; grid-column:2; }
.cloud-subscriber-advisory, .cloud-bw-notice { display:flex; align-items:center; gap:.85rem; padding:1rem; border-radius:.7rem; margin-top:1rem; }
.cloud-subscriber-advisory { background:#edf8fa; border:1px solid #b9dfe6; color:#08577a; }
.cloud-subscriber-advisory > i { font-size:1.5rem; }
.cloud-subscriber-advisory > div { flex:1; }
.cloud-subscriber-advisory .btn { flex-shrink:0; }
.cloud-preview-savings { background:#edf8fa; border-left:3px solid #0a98bd; padding:.65rem .8rem; border-radius:.3rem; margin:.6rem 0; font-size:.875rem; color:#08577a; }
.cloud-bw-notice { background:#fff8e8; border:1px solid #e7cb8c; color:#614b18; align-items:flex-start; }
.cloud-bw-notice > i { font-size:1.3rem; margin-top:.15rem; }
@media (max-width:575px) {
  .cloud-subscriber-advisory { flex-wrap:wrap; }
  .cloud-subscriber-advisory .btn { margin-left:2.35rem; }
  #cloud-recipe-editor .cloud-ingredient-fields { grid-template-columns:minmax(0,1fr) 3.6rem 3.6rem; gap:.35rem; }
  /* Keep mobile fields readable and avoid automatic zoom when focusing them. */
  #cloud-recipe-editor .cloud-ingredient-fields .form-control, #cloud-recipe-editor .cloud-step-entry textarea { font-size:1rem; }
}

.cloud-preview-order { margin-top:1rem; }
.cloud-preview-order-actions { display:flex; align-items:center; gap:.65rem; flex-wrap:wrap; }
/* Web Portal only: make the final ordering step easy to find. */
.portal-page .cloud-preview-order { padding:1.15rem 1.25rem; border:2px solid #75c8d8; border-radius:.8rem; background:#dff5f9; box-shadow:0 4px 14px rgba(8,87,122,.1); }
.portal-page .cloud-preview-order > span { color:#07516c !important; font-size:1rem; font-weight:700; }
.portal-page .cloud-preview-order #cloud-pdf-print { font-weight:700; padding:.7rem 1.15rem; }
.portal-page .cloud-preview-order #cloud-pdf-print:not(:disabled) { background-color:#086e89 !important; }
.portal-page .cloud-preview-order #cloud-pdf-print:not(:disabled):hover { background-color:#07516c !important; }
.portal-page .cloud-preview-order .btn:focus-visible { outline:3px solid #f59e0b; outline-offset:3px; }
@media (max-width:575px) {
  .portal-page .cloud-preview-order-actions { width:100%; }
}
.cloud-pdf-subscribe { border:0; padding:0; background:transparent; color:#08577a; font:inherit; text-decoration:underline; cursor:pointer; }

/* Shared across the portal and isolated mobile sharing dialog. */
.cloud-sharing .modal-body { overflow-wrap: anywhere; }
.cloud-sharing-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid #e5e7eb; }
.cloud-sharing-row > div:first-child { min-width: 0; flex: 1 1 12rem; }
.cloud-sharing-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cloud-sharing [hidden] { display: none !important; }
.cloud-owner-subscription { margin-top: 1rem; }
.cloud-invitation { max-width: 44rem; margin: 1.5rem auto; }

/* Capture guidance and custom scan questions share the surrounding modal style. */
.cloud-recipe-intake [hidden] { display:none!important; }
.cloud-camera-help { font-size:1.1rem; line-height:1.5; }
.cloud-recipe-intake video { display:block; width:100%; max-height:55vh; background:#172e38; }
.cloud-intake-dialog { padding:0; width:min(500px,calc(100vw - 1rem)); border:1px solid #0003; border-radius:.5rem; background:#fff; }
.cloud-intake-dialog .modal-title { margin:0; }
.cloud-intake-dialog .modal-header { gap:1rem; }
.cloud-intake-dialog .modal-body p:last-child { margin-bottom:0; }

/* Native notices can open outside .modal, so do not depend on its Bootstrap variables. */
.cloud-notice-dialog { width:min(500px,calc(100vw - 2rem)); max-height:calc(100vh - 2rem); max-height:calc(100dvh - 2rem); margin:auto; }
.cloud-notice-dialog > .modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:1rem; border-bottom:1px solid #dee2e6; }
.cloud-notice-dialog .modal-title { flex:1; min-width:0; line-height:1.5; overflow-wrap:anywhere; }
.cloud-notice-dialog > .modal-header .btn-close { flex:0 0 auto; padding:.5rem; margin:0 0 0 auto; }
.cloud-notice-dialog > .modal-body { padding:1rem; overflow-wrap:anywhere; }
.cloud-notice-dialog > .modal-footer { display:flex; justify-content:flex-end; gap:.5rem; padding:.75rem 1rem; border-top:1px solid #dee2e6; }
.cloud-notice-dialog > .modal-footer > * { margin:0; }

/* Collection links stay collapsed until explicitly expanded. */
.cloud-collection [hidden] { display:none !important; }
.cloud-collection-heading { display:flex; align-items:center; gap:.2rem; }
.cloud-collection-heading strong { min-width:0; overflow-wrap:anywhere; }
.cloud-collection-toggle, .cloud-collection-copy {
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto;
  width:32px; min-height:32px; padding:4px; margin:0; border:0; border-radius:4px;
  color:inherit; background:transparent; box-shadow:none; font:inherit; cursor:pointer;
}
.cloud-collection-toggle:hover, .cloud-collection-copy:hover { background:rgba(8,87,122,.08); }
.cloud-collection-toggle:focus-visible, .cloud-collection-copy:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.cloud-collection-details { margin-top:.25rem; }
.cloud-collection-link-row { display:flex; align-items:center; gap:.25rem; }
.cloud-collection-link-row .form-control { flex:1 1 0; min-width:0; width:0; margin:0; }

.cloud-contribution-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }

/* Portal-only compact ingredient editor. Mobile does not create these elements. */
#cloud-recipe-editor .portal-ingredients { --ingredient-columns:minmax(0,1fr) 4.25rem 4.25rem 6.5rem; container:portal-ingredients / inline-size; }
#cloud-recipe-editor .portal-ingredient-headings,
#cloud-recipe-editor .portal-ingredient-main { display:grid; grid-template-columns:var(--ingredient-columns); align-items:center; gap:.4rem; }
#cloud-recipe-editor .portal-ingredient-headings { padding:0 .55rem .3rem; color:#526975; font-size:.75rem; font-weight:600; }
#cloud-recipe-editor .portal-ingredient-row { min-width:0; margin:0 0 .45rem; padding:.5rem .55rem; border:1px solid #dce5e8; border-radius:.6rem; background:#fff; }
#cloud-recipe-editor .portal-ingredient-row:focus-within { border-color:#0a98bd; box-shadow:0 0 0 2px rgba(10,152,189,.1); }
#cloud-recipe-editor .portal-ingredient-main > div,
#cloud-recipe-editor .portal-ingredient-note-row > div { min-width:0; margin-bottom:0 !important; }
#cloud-recipe-editor .portal-ingredients .form-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#cloud-recipe-editor .portal-ingredients .form-control { min-width:0; font-size:.875rem; padding:.3rem .45rem; border-color:#cddae0; }
#cloud-recipe-editor .portal-ingredients .form-control:focus { border-color:#0a98bd; box-shadow:0 0 0 2px rgba(10,152,189,.14); }
#cloud-recipe-editor .portal-ingredient-actions { display:flex; gap:.15rem; justify-content:flex-end; }
#cloud-recipe-editor .portal-ingredient-actions .btn { display:inline-flex; align-items:center; justify-content:center; flex:0 0 2rem; width:2rem; min-height:2rem; padding:.15rem; border-color:transparent; border-radius:.35rem; box-shadow:none; font-size:1rem; line-height:1; }
#cloud-recipe-editor .portal-ingredient-actions .btn-outline-secondary { color:#526975; }
#cloud-recipe-editor .portal-ingredient-actions .btn-outline-secondary:hover:not(:disabled) { color:#08577a; background:#e8f5f9; }
#cloud-recipe-editor .portal-ingredient-actions .btn:focus-visible,
#cloud-recipe-editor .portal-ingredient-notes > summary:focus-visible { outline:2px solid #0a98bd; outline-offset:2px; }
#cloud-recipe-editor .portal-ingredient-notes { min-width:0; margin-top:.25rem; font-size:.8rem; }
#cloud-recipe-editor .portal-ingredient-notes > summary { display:flex; align-items:baseline; gap:.4rem; min-width:0; padding:.15rem 0; color:#08577a; border-radius:.2rem; cursor:pointer; list-style:none; }
#cloud-recipe-editor .portal-ingredient-notes > summary::-webkit-details-marker { display:none; }
#cloud-recipe-editor .portal-ingredient-notes > summary::before { content:'›'; flex-shrink:0; font-weight:600; }
#cloud-recipe-editor .portal-ingredient-notes[open] > summary::before { transform:rotate(90deg); }
#cloud-recipe-editor .portal-ingredient-note-count { flex-shrink:0; font-weight:600; }
#cloud-recipe-editor .portal-ingredient-note-preview { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:#6b7c85; }
#cloud-recipe-editor .portal-ingredient-notes[open] .portal-ingredient-note-preview { display:none; }
#cloud-recipe-editor .portal-ingredient-note-rows { padding-top:.15rem; }
#cloud-recipe-editor .portal-ingredient-note-row { display:grid; grid-template-columns:minmax(0,1fr) 6.5rem; gap:.4rem; align-items:start; margin:.3rem 0; }
#cloud-recipe-editor .portal-ingredient-note-row textarea { min-height:2rem; max-height:180px; resize:vertical; background:#f7fafb; }
#cloud-recipe-editor .portal-ingredient-add-note { color:#08577a; padding:.2rem 0; font-size:.8rem; text-decoration:none; }
#cloud-recipe-editor .portal-ingredient-add-note:hover { text-decoration:underline; }
#cloud-recipe-editor .portal-ingredient-row > .alert { margin:.4rem 0 0; }
/* Reflow according to the editor column, including narrow desktop split views. */
@container portal-ingredients (max-width:400px) {
  #cloud-recipe-editor .portal-ingredient-headings { display:none; }
  #cloud-recipe-editor .portal-ingredient-main { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 6.5rem; align-items:end; }
  #cloud-recipe-editor .portal-ingredient-main > div:first-child { grid-column:1 / -1; }
  #cloud-recipe-editor .portal-ingredient-main .form-label { position:static; width:auto; height:auto; margin:0 0 .15rem; overflow:visible; clip:auto; white-space:normal; font-size:.75rem; color:#526975; }
}
@media (max-width:575px) {
  #cloud-recipe-editor .portal-ingredients .form-control { font-size:1rem; }
}

.cloud-recipe-print [hidden] { display:none !important; }
.cloud-recipe-print iframe { width:100%; height:60vh; min-height:250px; border:1px solid #dce5e8; border-radius:.5rem; }
.cloud-recipe-print .cloud-check-row { align-items:flex-start; }

/* Portal recipe reader: clear ingredient / method columns, with a single modal
   for both reading and shopping (no competing Bootstrap focus traps). */
#cloud-recipe-view-modal .modal-dialog { max-width:1000px; }
#cloud-recipe-view-modal .modal-content { border:0; border-radius:1rem; overflow:hidden; }
#cloud-recipe-view-modal .modal-header { align-items:flex-start; padding:1.4rem 1.75rem; background:#edf8fa; border-bottom:1px solid #d4e9ee; }
#cloud-recipe-view-title { font-family:Fraunces,Georgia,serif; font-size:1.8rem; line-height:1.25; color:#08577a; overflow-wrap:anywhere; }
#cloud-recipe-view-modal .btn-close { flex-shrink:0; margin-top:.15rem; }
#cloud-recipe-view-body { padding:1.75rem; background:#fff; }
#cloud-recipe-view-modal .modal-footer { background:#f7fafb; gap:.4rem; }
#cloud-recipe-view-modal .cloud-recipe-readout { max-width:none; overflow-wrap:anywhere; }
#cloud-recipe-view-modal .cloud-recipe-overview { display:flex; gap:1.5rem; align-items:flex-start; margin-bottom:1.5rem; }
#cloud-recipe-view-modal .cloud-recipe-intro { flex:1; min-width:0; }
#cloud-recipe-view-modal .cloud-recipe-view-photo { float:none; flex:0 0 36%; width:36%; margin:0; }
#cloud-recipe-view-modal .cloud-recipe-view-photo img { display:block; max-height:320px; object-fit:contain; background:#f5f8f9; }
#cloud-recipe-view-modal .cloud-recipe-byline { color:#52656b; margin-bottom:.6rem; }
#cloud-recipe-view-modal .cloud-recipe-servings { display:inline-block; padding:.3rem .8rem; background:#edf8fa; border-radius:2rem; font-weight:600; color:#08577a; }
#cloud-recipe-view-modal .cloud-recipe-personal-note { white-space:pre-wrap; }
#cloud-recipe-view-modal .cloud-recipe-reading-columns { display:grid; grid-template-columns:minmax(0, .85fr) minmax(0, 1.3fr); gap:2rem; align-items:start; }
#cloud-recipe-view-modal h3 { font-family:Fraunces,Georgia,serif; font-size:1.35rem; color:#08577a; margin:0 0 1rem; }
#cloud-recipe-view-modal .cloud-recipe-ingredients { padding:1.25rem; border:1px solid #d4e9ee; border-radius:.85rem; background:#f4fafb; }
#cloud-recipe-view-modal .cloud-recipe-section-heading { display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-bottom:.7rem; }
#cloud-recipe-view-modal .cloud-recipe-section-heading h3 { margin:0; }
#cloud-recipe-view-modal .cloud-recipe-cart { border:1px solid #b5dbe5; border-radius:50%; width:44px; height:44px; flex-shrink:0; background:white; color:#08577a; font-size:1.15rem; }
#cloud-recipe-view-modal .cloud-recipe-cart:hover { background:#def2f7; }
#cloud-recipe-view-modal .cloud-recipe-cart:focus-visible { outline:3px solid #0a98bd; outline-offset:3px; }
#cloud-recipe-view-modal .cloud-recipe-cart:disabled { opacity:.4; }
#cloud-recipe-view-modal .cloud-recipe-ingredients ul { list-style:none; padding:0; margin:0; }
#cloud-recipe-view-modal .cloud-recipe-ingredients li { padding:.65rem 0; border-bottom:1px solid #deecef; margin:0; white-space:pre-wrap; }
#cloud-recipe-view-modal .cloud-recipe-ingredients li:last-child { border-bottom:0; padding-bottom:0; }
#cloud-recipe-view-modal .cloud-recipe-amount { font-weight:600; }
#cloud-recipe-view-modal .cloud-recipe-instructions ol { padding-left:1.7rem; }
#cloud-recipe-view-modal .cloud-recipe-instructions li { padding-left:.4rem; margin-bottom:1.2rem; }
#cloud-recipe-view-modal .cloud-recipe-instructions li::marker { color:#08577a; font-weight:700; }
#cloud-recipe-view-modal .cloud-recipe-step, #cloud-recipe-view-modal .cloud-recipe-notes p { white-space:pre-wrap; }
#cloud-recipe-view-modal .cloud-recipe-notes { border-top:1px solid #dce5e8; padding-top:1rem; margin-top:1.5rem; }
#cloud-recipe-view-modal.cloud-recipe-shopping-open .modal-footer > :not([data-bs-dismiss]) { display:none; }
#cloud-recipe-view-modal [hidden] { display:none!important; }
#cloud-recipe-view-modal .cloud-recipe-shopping { max-width:36rem; margin:auto; }
#cloud-recipe-view-modal .cloud-recipe-shopping .d-grid { max-width:340px!important; }
#cloud-recipe-view-modal .cloud-recipe-shopping .btn { min-height:48px; padding:.7rem 1rem; border-radius:.7rem; }
#cloud-recipe-view-modal .addIngredientsToInstacartBtn { display:flex; align-items:center; justify-content:center; background:#003d29; border-color:#003d29; color:#faf1e5; }
#cloud-recipe-view-modal .addIngredientsToInstacartBtn:hover { background:#07553c; }
#cloud-recipe-view-modal .instacart-icon { height:20px; width:auto; }
@media(max-width:767px) {
  #cloud-recipe-view-modal .cloud-recipe-reading-columns { grid-template-columns:minmax(0,1fr); gap:1.5rem; }
  #cloud-recipe-view-modal .cloud-recipe-overview { flex-direction:column; }
  #cloud-recipe-view-modal .cloud-recipe-view-photo { width:100%; max-width:360px; flex:auto; align-self:center; }
  #cloud-recipe-view-modal .modal-header, #cloud-recipe-view-body { padding:1.1rem; }
  #cloud-recipe-view-title { font-size:1.5rem; }
}
@media(max-width:575px) { #cloud-recipe-view-modal .modal-content { border-radius:0; } }
