/* Last layer: makes Stock and Website as rich as Home. */
.workspace > .stock, .workspace > .studio { width: 100%; max-width: none; padding: 26px max(24px, calc((100% - 1280px) / 2)) 40px; }
.area-head { position: relative; min-height: 190px; overflow: hidden; padding: 28px 38% 28px 36px; border-radius: 34px; box-shadow: 0 20px 44px rgb(30 25 90 / 22%); }
.area-head::after { position: absolute; inset: 0 0 0 auto; width: 36%; background: center 46% / cover no-repeat; content: ""; mask-image: linear-gradient(90deg, transparent, #000 38%); }
.area-head > * { position: relative; z-index: 1; }
.area-head .eyebrow { margin: 0; font-size: .86rem; letter-spacing: .01em; text-transform: none; opacity: 1; }
.area-head h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.08; }
.area-head--teal { background: linear-gradient(115deg, #04635f, #0a8a7c 60%, #f7780d 100%); }
.area-head--teal::after { background-image: url("art/quest-racks.webp"); }
.area-head--coral { background: linear-gradient(115deg, #a6223f, #c9402f 55%, #22a43c 100%); }
.area-head--coral::after { background-image: url("art/quest-live.webp"); background-position: center 12%; }

.stock-head { display: grid; align-content: center; gap: 18px; }
.stock-head__actions { justify-content: start; gap: 12px; }
.stock-head .bigbtn--count { min-height: 58px; padding: 10px 26px 14px; color: #402a00; background: linear-gradient(#ffdb62, #ffc02e); box-shadow: inset 0 -5px #d9920d, 0 8px 18px rgb(0 40 40 / 30%); font-size: 1.1rem; }

.stock-totals { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0; border: 0; background: none; box-shadow: none; }
.stock-total { --tint: #6d35d4; padding: 15px 18px 18px; border-radius: 24px; color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--tint) 88%, #fff), var(--tint)); box-shadow: inset 0 -5px rgb(0 0 0 / 16%), 0 9px 18px rgb(43 46 100 / 16%); text-align: left; }
.stock-total--ok { --tint: #087a70; }
.stock-total--low { --tint: #a35a00; }
.stock-total--out { --tint: #c73744; }
.stock-total strong, .stock-total--ok strong, .stock-total--low strong, .stock-total--out strong { color: #fff; font-size: 1.6rem; }
.stock-total span { color: #fff; font-size: .9rem; font-weight: 500; }

.stock-tools { min-width: 0; margin-top: 4px; grid-template-columns: minmax(0, 1fr); border-radius: 28px; }
.stock-tools .chips { min-width: 0; margin: 0; overflow-x: auto; scrollbar-width: thin; }
.stock-area__fixed, .stock-results { grid-template-columns: minmax(0, 1fr); }
.stock-search { position: relative; }
.stock-search svg { position: absolute; left: 15px; color: #6c5ce0; }
.stock-search input { width: 100%; min-height: 54px; padding: 10px 16px 10px 50px; border: 2px solid #dcdffa; border-radius: 18px; font-size: 1rem; }
.stock-tools .chips { align-items: stretch; }
.stock-tools .chip { flex: none; min-height: 44px; border-radius: 16px; white-space: nowrap; }
.stock-categories .chip { padding: 5px 16px 5px 6px; }
.stock-categories .chip:first-child { padding-left: 16px; }
.stock-categories .chip img { width: 40px; height: 40px; flex: none; border-radius: 12px; object-fit: cover; }
.stock-product { border: 0; border-radius: 26px; box-shadow: 0 4px 0 #dfe2f3, 0 12px 26px rgb(43 46 100 / 10%); }
.stock-product__head { padding: 13px 18px; background: linear-gradient(100deg, #e9e5ff, #fdf0f3 70%, #fff8e0); }
.stock-product__head img { width: 64px; height: 64px; flex-basis: 64px; padding: 0; border: 3px solid #fff; border-radius: 18px; box-shadow: 0 5px 12px rgb(43 46 100 / 16%); }
.stock-product__head h2 { font-size: 1.14rem; }
.stock-line { min-height: 62px; padding: 10px 18px; }
.stock-line > strong { font-size: 1.06rem; }
.stock .pill, .drawer .pill { padding: 6px 12px; font-size: .84rem; }

.drawer { border-radius: 34px 0 0 34px; background: #f3f2fd; }
.drawer-backdrop { position: fixed; z-index: 99; inset: 0; background: rgb(22 14 70 / 56%); }
.stock-drawer__head { grid-template-columns: 48px 92px minmax(0, 1fr); color: #fff; background: linear-gradient(115deg, #04635f, #0a8a7c); }
.stock-drawer__head h2 { color: #fff; font-size: 1.3rem; line-height: 1.15; }
.stock-drawer__photo { width: 92px; height: 92px; border: 4px solid #fff; border-radius: 24px; }
.stock-place-card { border-radius: 26px; }
.stock-place-card__top h3 { font-size: 1.2rem; }
.stock-place-card__top strong { font-size: 1.4rem; }
.stock-place-card__actions .bigbtn { min-height: 62px; font-size: 1.04rem; }
.bigbtn:disabled { color: #596080; background: #e1e4f2; box-shadow: inset 0 -4px #c9cee3; opacity: 1; }
.stock-saved { color: #0a6b46; font-weight: 600; }

input.switch { width: 58px; min-width: 58px; height: 34px; min-height: 34px; margin: 5px 0; padding: 0; appearance: none; border: 0; border-radius: 20px; background: radial-gradient(circle at 17px 50%, #fff 0 12px, transparent 12.6px) #8088ab; box-shadow: inset 0 2px 5px rgb(20 20 60 / 24%); cursor: pointer; }
input.switch::before, input.switch::after { display: none; }
input.switch:checked { background: radial-gradient(circle at 41px 50%, #fff 0 12px, transparent 12.6px) #14945c; }

.studio-layout, .studio-controls, .studio-section, .studio-block-list, .studio-editor { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.studio-section:not([hidden]) { display: grid; gap: 16px; }
@media (min-width: 1100px) { .studio-layout { grid-template-columns: minmax(0, 1fr) 452px; gap: 26px; } }
.studio .area-head { min-height: 170px; margin-bottom: 20px; }
.studio-tabs { gap: 10px; padding-bottom: 16px; }
.studio-tab { --c: #5346db; min-height: 54px; padding: 7px 17px 9px 8px; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: inset 0 -4px #dfe2f3, 0 6px 14px rgb(43 46 100 / 9%); }
.studio-tab svg { width: 36px; height: 36px; padding: 8px; border-radius: 12px; color: #fff; background: var(--c); }
.studio-tab:nth-child(2) { --c: #cf2585; }
.studio-tab:nth-child(3) { --c: #087a70; }
.studio-tab:nth-child(4) { --c: #bd5200; }
.studio-tab:nth-child(5) { --c: #1673c9; }
.studio-tab:nth-child(6) { --c: #11813a; }
.studio-tab.is-selected { color: #fff; background: var(--c); box-shadow: inset 0 -4px rgb(0 0 0 / 20%), 0 8px 18px rgb(43 46 100 / 24%); }
.studio-tab.is-selected svg { background: rgb(255 255 255 / 22%); }
.studio-blocks__intro { margin: 0; color: var(--ink); font-weight: 500; }
.studio-section > .btn { justify-self: start; }

.studio-block { --c: #5a4be0; grid-template-columns: 84px minmax(0, 1fr) auto auto; gap: 8px 14px; padding: 14px 16px 18px 22px; border-radius: 26px; background: #fff; box-shadow: inset 8px 0 var(--c), 0 5px 0 #d9dcf0, 0 14px 26px rgb(43 46 100 / 11%); }
.studio-block--hero { --c: #f2552c; }
.studio-block--categories { --c: #5a4be0; }
.studio-block--featured { --c: #e39b07; }
.studio-block--rows { --c: #0f8f80; }
.studio-block--about { --c: #a22ad4; }
.studio-block--contact { --c: #1673c9; }
.studio-block--banner { --c: #d62879; }
.studio-block__picture { width: 84px; height: 70px; grid-row: span 2; border-radius: 18px; background: color-mix(in srgb, var(--c) 16%, #fff); }
.studio-block__mini { background: none; padding: 11px; }
.studio-block__mini i, .studio-block__mini b { background: var(--c); }
.studio-block__mini b { opacity: .5; }
.studio-block__mini em { background: var(--c); opacity: .75; }
.studio-block__copy strong { font-size: 1.1rem; }
.studio-block__copy small { font-size: .86rem; }
.studio-block .studio-drag { display: inline-grid; width: 48px; min-height: 48px; grid-column: 4; grid-row: 1; color: #fff; background: var(--c); box-shadow: inset 0 -4px rgb(0 0 0 / 20%); }
.studio-block > .studio-switch-label { grid-column: 3; grid-row: 1; }
.studio-block > .studio-block__edit { min-width: 104px; grid-column: 2; grid-row: 2; justify-self: start; }
.studio-block > .studio-block__moves { grid-column: 3 / 5; grid-row: 2; justify-self: end; gap: 8px; }
.studio-block__moves .btn { width: 48px; min-height: 44px; }
.studio-block__editor { grid-row: 3; }
.studio-block__editor > .studio-editor { border: 0; border-radius: 22px; background: #f4f3fd; box-shadow: none; }

.studio-themes { gap: 14px; }
.studio-theme { padding: 10px 10px 14px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 2px #e1e4f5, 0 5px 0 #d9dcf0; }
.studio-theme.is-selected { border-color: transparent; background: #fff; box-shadow: inset 0 0 0 4px #5a4be0, 0 5px 0 #4334bd; }
.studio-theme:not(.is-selected) .studio-theme__check { display: none; }
.studio-theme__mini { height: 104px; border-radius: 15px; }
.studio-photo__preview img { background: #f7f3e9; object-fit: contain; }
.studio-words { border-radius: 22px; }
.studio-words summary { min-height: 60px; padding: 12px 20px; font-size: 1.06rem; }
.studio-preview { border: 8px solid #1d1755; border-radius: 34px; background: #1d1755; }
.studio-preview__tools .btn[aria-pressed="true"] { color: #2b1a6e; background: #fff; }

@media (max-width: 820px) {
  .workspace > .stock, .workspace > .studio { padding: 14px 14px 26px; }
  .area-head, .studio .area-head { min-height: 0; padding: 132px 18px 20px; border-radius: 26px; }
  .area-head::after { inset: 0 0 auto; width: auto; height: 150px; mask-image: linear-gradient(#000 55%, transparent); }
  .area-head--teal { background: linear-gradient(#0a7a70, #04635f); }
  .area-head--coral { background: linear-gradient(#b8303a, #a6223f); }
  .stock-head { display: grid; gap: 14px; }
  .stock-head__actions > * { flex: 1 1 40%; }
  .stock-head .bigbtn--count { flex-basis: 100%; }
  .stock-totals { gap: 8px; }
  .stock-total { padding: 10px 9px 13px; border-radius: 18px; }
  .stock-total strong, .stock-total--ok strong, .stock-total--low strong, .stock-total--out strong { font-size: 1.25rem; }
  .stock-total span { font-size: .78rem; }
  .stock-tools { padding: 14px; }
  .drawer { border-radius: 0; }
  .studio-block { grid-template-columns: 64px minmax(0, 1fr) auto; padding: 13px 12px 16px 20px; }
  .studio-block__picture { width: 64px; height: 60px; grid-row: 1; }
  .studio-block .studio-drag { grid-column: 3; grid-row: 1; }
  .studio-block > .studio-switch-label { grid-column: 1 / 3; grid-row: 2; justify-content: start; }
  .studio-block > .studio-block__moves { grid-column: 3; grid-row: 2; }
  .studio-block > .studio-block__edit { width: 100%; grid-column: 1 / -1; grid-row: 3; }
  .studio-block__moves .btn { width: 44px; }
  .studio-block__editor { grid-row: 4; }
  .studio-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-see { position: static; width: 100%; min-height: 54px; margin: 0 0 4px; order: -1; justify-content: center; border-radius: 18px; }
}

/* Count mission */
.mission-work { display: contents; }
.mission-counter { min-width: 76px; padding: 8px 16px; font-size: 1.2rem; text-align: center; }
.mission-number.is-empty { color: #6a62a3; }
.mission-card .mission-actions { display: grid; grid-template-columns: 1fr 1.15fr 1.7fr; gap: 8px; }
.mission-card .mission-actions > button { width: auto; grid-column: auto; grid-row: auto; text-decoration: none; min-width: 0; min-height: 54px; margin: 0; padding: 8px 6px 11px; border: 0; border-radius: 17px; font-size: .98rem; font-weight: 700; line-height: 1.1; }
.mission-card .mission-zero { display: block; color: #4a3000; background: #ffd463; box-shadow: inset 0 -4px #dda01f; }
.mission-card .mission-save { color: #fff; background: linear-gradient(#12935a, #0b7a49); box-shadow: inset 0 -5px #075733; }
.mission-card .mission-actions > button:disabled { color: #596080; background: #e1e4f2; box-shadow: inset 0 -4px #c9cee3; opacity: 1; }
.mission-choice { border-radius: 24px; }
.mission-choice__main img, .mission-choice__photo { width: 72px; height: 72px; border-radius: 18px; }
.mission-choice__main strong { font-size: 1.08rem; }
@media (min-width: 701px) {
  .stock-mission .mission-card { display: grid; width: min(1000px, 100%); min-height: 0; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); grid-template-rows: auto; align-items: stretch; gap: 28px; padding: 24px; }
  .stock-mission .mission-card__identity { display: grid; grid-column: 1; grid-row: 1; align-content: center; justify-items: center; gap: 18px; padding: 22px; border-radius: 28px; background: linear-gradient(150deg, #fff0cf, #ffe0ea 55%, #dfe3ff); text-align: center; }
  .stock-mission .mission-card__identity .mission-photo { width: min(100%, 300px); height: auto; aspect-ratio: 1; border: 6px solid #fff; border-radius: 34px; }
  .mission-work { display: grid; min-width: 0; grid-column: 2; grid-row: 1; align-content: center; gap: 10px; }
  .mission-work > * { width: auto; margin: 0; grid-column: auto; grid-row: auto; }
  .stock-mission .mission-play { padding-block: 8px 20px; }
  .stock-mission .mission-pad button { min-height: 58px; }
}

/* Phone header: every button is easy to hit, and Products keeps its Map/List switch and search */
@media (max-width: 820px) {
  .topbar .btn--icon, .topbar .btn--ghost, .segmented__btn { min-width: 44px; min-height: 44px; }
  .mission-close { width: 46px; height: 46px; }
  .app[data-area="products"] .topbar { row-gap: 10px; }
  .app[data-area="products"] .topbar__centre { display: grid; width: 100%; grid-area: auto; grid-column: 1 / -1; grid-row: 2; grid-template-columns: auto minmax(0, 1fr); gap: 8px; visibility: visible; }
  .app[data-area="products"] .topbar__centre .search { width: 100%; max-width: none; grid-area: auto; }
  .app[data-area="products"] .topbar__centre .segmented { grid-area: auto; }
  .topbar__centre .search input { min-height: 46px; }
  .topbar__centre .segmented__btn span { display: none; }
}
@media (max-width: 820px) {
  .app { grid-template-rows: auto minmax(0, 1fr) auto; }
  /* Only needed while automatic publishing is off */
  .topbar .topbar__publish:not([hidden]) { display: flex; width: 100%; min-height: 48px; justify-content: center; grid-column: 1 / -1; color: #402a00; background: linear-gradient(#ffdb62, #ffc02e); box-shadow: inset 0 -4px #d9920d; }
  .topbar .topbar__tools > .status--error, .topbar .topbar__tools > .status--live.status--pending { display: block; padding: 6px 10px; grid-column: 1 / -1; border-radius: 12px; color: #7a1020; background: #fff0f2; text-align: center; white-space: normal; }
}

.dialog { margin: auto; }
.mission-done { min-height: 100dvh; align-content: center; border-radius: 0; }
.mission-done img { width: 190px; height: 190px; border-radius: 36px; object-fit: cover; }
.mission-done .mission-save { min-height: 58px; padding: 10px 24px 14px; color: #fff; background: linear-gradient(#12935a, #0b7a49); }
.mission-done .mission-finish { min-height: 50px; padding: 10px 24px; }
.studio-fullscreen .studio-preview { border: 0; border-radius: 0; }
@media (max-width: 820px) {
  .dialog { inset: auto 0 0; width: 100%; max-width: none; margin: 0; border-radius: 28px 28px 0 0; }
  .studio-controls { display: grid; }
  .studio-fullscreen .studio-preview__label { display: none; }
  .studio-fullscreen .studio-preview__tools { justify-content: space-between; padding: 8px; }
  .studio-fullscreen .studio-preview__tools .btn { min-height: 44px; }
  .studio-fullscreen .studio-preview:not(.is-desktop) .studio-preview__frame { width: 100%; }
}

/* Login: the first thing the owner sees */
.auth { display: grid; min-height: 100dvh; align-items: center; justify-items: start; padding: 24px max(24px, 9vw); background: #2a149a url("art/hero.webp") right center / cover no-repeat; }
.auth::before, .auth::after { display: none; }
.auth__card { width: min(100%, 440px); padding: 34px; border-radius: 34px; box-shadow: 0 30px 70px rgb(10 4 60 / 45%); }
.auth__logo { display: block; width: 190px; margin-bottom: 18px; }
.auth__card input { min-height: 54px; font-size: 1.05rem; }
.auth__card button[type="submit"] { width: 100%; min-height: 58px; font-size: 1.08rem; }
@media (max-width: 820px) {
  .auth { align-items: end; justify-items: center; padding: 250px 14px 22px; background: linear-gradient(transparent 120px, #2a149a 300px), #2a149a url("art/hero.webp") right -10px top -10px / auto 330px no-repeat; }
  .auth__card { padding: 24px 20px; border-radius: 28px; }
}

/* ===== Call 3: multi-photo gallery + video controls in the node editor ===== */
.editor__gallery { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf8; }
.editor__gallery > .field__label { margin: 0 0 8px; }
.gallery-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.gthumb-edit { position: relative; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; background: var(--paper); border: 1px solid #ece6d9; box-shadow: var(--shadow-soft); }
.gthumb-edit.is-cover { border: 2px solid var(--cobalt); }
.gthumb-edit > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcover-badge { position: absolute; top: 5px; left: 5px; z-index: 2; background: var(--cobalt); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 9px; letter-spacing: .02em; }
.gthumb-tools { position: absolute; inset: auto 0 0; display: flex; justify-content: flex-end; gap: 2px; padding: 4px; background: linear-gradient(transparent, #0b1526cc); }
.gthumb-tools .btn--icon { width: 30px; min-width: 30px; height: 30px; min-height: 30px; border-radius: 9px; background: #ffffffe6; box-shadow: none; }
.gthumb-tools .btn--icon svg { width: 17px; height: 17px; }
.gadd { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 92px; height: 92px; border: 2px dashed var(--cobalt); border-radius: 12px; background: var(--cobalt-soft); color: var(--cobalt); font-weight: 700; font-size: 12px; cursor: pointer; }
.gadd:disabled { opacity: .6; }
.gadd svg { width: 26px; height: 26px; }
.editor__gallery .studio-photo__status { margin: 8px 0 0; color: var(--cobalt); font-weight: 600; }
.editor__video .video-chip { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.editor__video .video-chip:empty { display: none; }
.editor__video .video-chip img { width: 92px; height: 52px; object-fit: cover; border-radius: 9px; border: 1px solid #ece6d9; }
.editor__video .video-chip span { color: var(--green); font-weight: 700; font-size: 13px; }
.editor__video input { width: 100%; }

/* Call 3: focus-point picker (tap the part of a wide photo to keep in view) */
.focus-field .focus-preview { position: relative; aspect-ratio: 16 / 6; border-radius: 12px; overflow: hidden; background: var(--paper); margin-top: 6px; }
.focus-preview__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.focus-overlay { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.focus-cell { border: 1px solid #ffffff4d; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.focus-cell::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #ffffffcc; box-shadow: 0 1px 4px #0007; transition: transform .12s; }
.focus-cell[aria-current="true"] { background: #2340c733; }
.focus-cell[aria-current="true"]::before { width: 20px; height: 20px; background: var(--cobalt); box-shadow: 0 0 0 4px #2340c766; }
.focus-hint { color: var(--muted); font-size: 13px; margin: 0 0 4px; }
