/* Shared brand tokens and component styles. Responsive layouts follow below. */

@font-face { font-family:Seed;src:url('fonts/LINESeedSansTH-Regular.woff2') format('woff2');font-weight:400;font-display:swap }

@font-face { font-family:Seed;src:url('fonts/LINESeedSansTH-Bold.woff2') format('woff2');font-weight:700;font-display:swap }

:root {
  --ink: #0F1B2D;
  --muted: #5A6578;
  --line: #E2E8F0;
  --bg: #F5F7FB;
  --orange: #2F5BFF;
  --cream: #E8EEF9;
  --radius: 12px;
  --focus: #2F5BFF;
  --control-border: #D5DCE8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 system-ui,-apple-system,"Tahoma",sans-serif;
  font-family: Seed,system-ui,Tahoma,sans-serif;
}

button,input,textarea,select {
  font: inherit;
}

button {
  cursor: pointer;
  transition: background .18s,transform .18s;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

button:focus-visible,a:focus-visible,input:focus-visible {
  outline: 3px solid #2F5BFF80;
  outline-offset: 3px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 234px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 34px 23px;
  display: flex;
  flex-direction: column;
}

.brand {
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 38px 0 13px;
}

.accent {
  color: var(--orange);
  margin: 0 0 9px;
}

.nav {
  text-align: left;
  border: 0;
  background: none;
  padding: 13px 15px;
  border-radius: 9px;
  color: #71776f;
  margin-bottom: 6px;
  min-height: 44px;
}

.nav.active {
  background: #F5E9E1;
  color: var(--orange);
  font-weight: 700;
}

.sidebottom {
  margin-top: auto;
}

.localdot {
  font-size: 12px;
  color: #4e7458;
}

.sidebottom p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}

.textbutton {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 9px 4px;
  font-size: 13px;
  min-height: 44px;
}

.sidebottom button {
  display: block;
}

main {
  margin-left: 234px;
  padding: 0 44px;
  max-width: 1600px;
}

header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.crumb span {
  color: var(--muted);
  margin-left: 8px;
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 38px 0 29px;
  gap: 20px;
}

h1 {
  font-size: clamp(26px,2.7vw,39px);
  line-height: 1.3;
  letter-spacing: 0;
  margin: 0 0 12px;
}

h1 span {
  color: var(--orange);
}

.muted {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}

.primary,.secondary,.dark {
  border: 0;
  border-radius: 8px;
  padding: 11px 17px;
  font-weight: 600;
  font-size: 13px;
  white-space: normal;
  min-height: 44px;
}

.primary {
  background: var(--orange);
  color: white;
}

.primary:hover {
  background: #2448D6;
}

.secondary {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.dark {
  background: var(--ink);
  color: #fff;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3,1fr) 1.3fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 23px 0;
}

.summary>div {
  padding: 0 25px;
  border-right: 1px solid var(--line);
}

.summary span {
  color: var(--muted);
  font-size: 12px;
}

.summary strong {
  display: block;
  font-size: 32px;
  line-height: 1.3;
  font-weight: 650;
  margin-top: 6px;
}

.summary small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 9px;
}

.summary .summaryhint {
  border: 0;
  position: relative;
  font-size: 12px;
  color: var(--muted);
  align-self: center;
}

.summaryhint b {
  font-size: 15px;
  color: var(--ink);
}

.summaryhint .arrow {
  position: absolute;
  right: 25px;
  top: 0;
  font-size: 28px;
  color: var(--orange);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  gap: 23px;
  flex-wrap: wrap;
}

.tab {
  padding: 15px 0;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  min-height: 44px;
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--orange);
  font-weight: 700;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search input {
  border: 0;
  background: none;
  padding: 10px 0;
  max-width: 200px;
  font-size: 12px;
  outline-offset: 0;
}

.batch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  gap: 12px;
  font-size: 12px;
}

.batch>div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.batch input,input[type=checkbox] {
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 20px;
  padding-bottom: 35px;
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.cardimage {
  height: 230px;
  background: #f0eee6;
  display: block;
  width: 100%;
  object-fit: contain;
}

.cardcheck {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #fff;
  border-radius: 5px;
  padding: 10px;
  line-height: 1;
}

.status {
  position: absolute;
  right: 12px;
  top: 14px;
  background: #fff;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 10px;
  color: #557559;
}

.status.draft {
  color: #b16f33;
}

.cardbody {
  padding: 17px;
}

.cardmeta {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.card h3 {
  font-size: 15px;
  margin: 7px 0;
}

.price {
  font-size: 20px;
  font-weight: 700;
}

.cardactions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-top: 12px;
}

.cardactions button {
  background: none;
  border: 0;
  padding: 3px 0;
  font-size: 13px;
  color: var(--muted);
  min-height: 44px;
}

.cardactions .previewbutton {
  color: var(--orange);
  font-weight: 600;
}

.empty {
  grid-column: 1/-1;
  text-align: center;
  background: white;
  border: 1px dashed #d7d8ce;
  border-radius: 14px;
  padding: 52px 20px;
}

.emptyicon {
  font-size: 32px;
  color: var(--orange);
  background: #F5E9E1;
  width: 70px;
  height: 70px;
  line-height: 70px;
  border-radius: 20px;
  margin: 0 auto 18px;
}

.empty h2 {
  font-size: 20px;
  margin: 0 0 7px;
}

.empty p {
  color: var(--muted);
  font-size: 13px;
  max-width: 440px;
  margin: 0 auto 22px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 16px;
}

footer span:last-child {
  margin-left: auto;
}

dialog {
  border: 0;
  border-radius: 17px;
  padding: 0;
  width: min(840px,94vw);
  max-height: min(90dvh,100dvh - 24px);
  color: var(--ink);
  box-shadow: 0 30px 100px #0003;
  overflow: auto;
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: #20282080;
  backdrop-filter: blur(3px);
}

.dialoghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
  gap: 12px;
}

h2 {
  font-size: 21px;
  margin: 0;
}

.close {
  border: 0;
  background: #f2f3ed;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(260px,300px);
  grid-template-areas: "main preview";
  align-items: start;
  min-height: 0;
}
.editor-main {
  grid-area: main;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 22px 18px 22px 25px;
  min-width: 0;
}
.editor-photos {
  min-width: 0;
}
.editor-photos .sectiontitle {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 15px;
}
.editor-preview {
  grid-area: preview;
  position: sticky;
  top: 72px;
  align-self: start;
  padding: 18px 20px 22px;
  border-top: 0;
  border-left: 1px solid var(--line);
  background: var(--bg);
  max-height: calc(100vh - 120px);
  overflow: auto;
}
.editorbody {
  /* legacy alias kept empty for old selectors */
}


.photo-actions {
  display: grid;
  gap: 8px;
}

.photo-actions #takePhoto {
  width: 100%;
  min-height: 48px;
}

.photo-actions .filepick {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}

.photo-actions .filepick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-actions .hint {
  margin: 0;
  text-align: center;
}

.photoguidebox {
  margin: 8px 0;
  border: 0;
  padding: 0;
}

.photoguidebox > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  list-style: none;
}

.photoguidebox > summary::-webkit-details-marker { display: none; }

.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 210px;
  border: 1px dashed #d9d5c9;
  border-radius: 12px;
  background: var(--bg);
  font-size: 30px;
  color: var(--orange);
  cursor: pointer;
}

.upload b {
  font-size: 14px;
  color: var(--ink);
}

.upload span {
  font-size: 10px;
  color: var(--muted);
  padding: 10px;
}

.upload input {
  width: 100%;
  font-size: 11px;
  padding: 10px;
  color: var(--muted);
}

.fields label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 13px;
}

.fields input,.fields textarea,.fields select {
  display: block;
  width: 100%;
  border: 1px solid #dfe1d8;
  border-radius: 7px;
  background: #fff;
  padding: 10px;
  margin-top: 5px;
  font-size: 16px;
  color: var(--ink);
}

.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hint {
  font-size: 13px;
  color: #60695f;
  font-weight: 400;
  line-height: 1.7;
}

.photolist {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(112px,1fr));
  gap: 10px;
  margin-top: 12px;
}

.photoframehint {
  margin: 8px 0 0;
}

.cropstage {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 12px;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
}

.cropframe {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  overflow: hidden;
  background: #111;
  border: 2px solid #fff;
  border-radius: 8px;
  touch-action: none;
  box-sizing: border-box;
}

.cropframe.portrait {
  aspect-ratio: 4 / 5;
}

.cropframe img,
#shootVideo {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  max-height: none;
  transform: none;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

#shootVideo {
  background: #000;
}

.cropmask {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  pointer-events: none;
}

.croprow {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 650px) {
  .croprow {
    opacity: 0.85;
  }
}

.croprow input[type=range] {
  width: 100%;
}

.cropbody,
.shootbody {
  padding: 0 16px 8px;
}

.thumb {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.thumbmedia {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f2f1eb;
}

.thumb img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #f2f1eb;
}

.thumbbadge {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 1;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(39,45,40,.88);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  pointer-events: none;
}

.thumbbadge.thumbnum {
  background: rgba(39,45,40,.55);
  font-weight: 600;
}

.thumbremove {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 1;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 1px 4px #00000022;
}

.thumbbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.thumbbar button[data-left] {
  background: none;
  border: 0;
  font-size: 17px;
  padding: 0;
  color: var(--muted);
  min-width: 36px;
  min-height: 36px;
  flex: 0 0 auto;
}

.thumb .cropbutton {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.thumb button:disabled {
  opacity: .35;
}

.dialogfoot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 25px;
  border-top: 1px solid var(--line);
  background: white;
  position: sticky;
  bottom: 0;
  z-index: 8;
  flex-wrap: wrap;
  padding-bottom: calc(18px + env(safe-area-inset-bottom,0px));
}

.danger {
  background: none;
  border: 0;
  color: #b35141;
  margin-right: auto;
  font-size: 12px;
}

.guidebody {
  padding: 12px 26px 24px;
  font-size: 13px;
  color: var(--muted);
}

.guidebody b {
  color: var(--ink);
}

#previewBody {
  padding: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  background: var(--bg);
}

#previewBody img {
  width: min(320px,100%);
  height: auto;
  align-self: start;
  border-radius: 7px;
}

#previewBody pre {
  white-space: pre-wrap;
  width: 100%;
  font: inherit;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

#toast {
  position: fixed;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  max-width: 90vw;
  z-index: 100;
  display: none;
  top: calc(16px + env(safe-area-inset-top,0px));
  right: auto;
  margin: 0;
  border: 0;
}

.accent,.cardactions .previewbutton {
  color: var(--orange);
}

.missing {
  font-size: 12px;
  color: #9b4d25;
  margin: 7px 0;
  overflow-wrap: anywhere;
}

.card h3,.cardmeta span {
  overflow-wrap: anywhere;
}

.thumb .hint {
  font-size: 11px;
}

.batch>label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.batch.has-selection {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

#selectionInfo:not(:empty) {
  padding: 12px 15px;
  background: #fff2df;
  border: 1px solid #ead4b0;
  border-radius: 8px;
  font-size: 13px;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

#taskProgress {
  position: fixed;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
  padding: 12px 20px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 30px #0002;
  font-size: 14px;
  pointer-events: none;
  top: calc(70px + env(safe-area-inset-top,0px));
  right: auto;
  margin: 0;
  max-width: 90vw;
}

/* editor-preview layout defined with editor-layout */


.editor-preview .eyebrow {
  margin: 14px 0;
}

#livePreview {
  background: var(--bg);
  padding: 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

#livePreview img {
  width: min(280px,100%);
  height: auto;
}

.previewfigure {
  margin: 0;
  width: min(320px,100%);
}

#previewBody .previewfigure img {
  width: 100%;
  display: block;
}

.previewfigure figcaption {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  grid-template-columns: 1fr 1fr;
}

.previewfigure button {
  flex: 1;
  min-height: 44px;
}

.dialogfoot button {
  min-height: 44px;
}

#offlineStatus {
  color: #446147;
  font-size: 12px;
}

.brand-symbol {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 12px;
}

.localdot,.status,#offlineStatus {
  color: #3F6948;
}

.status.draft,.missing {
  color: #98600A;
}

.card h3,.primary,.secondary,.dark,.summary strong {
  font-weight: 700;
}

.introactions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.resume {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.importbody,.reviewbody {
  padding: 20px 25px;
}

.importbody>p,.reviewbody>p {
  font-size: 14px;
  color: var(--muted);
}

.filelabel {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.filelabel input {
  max-width: 100%;
  font-size: 14px;
}

.importtools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.importgrid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 12px;
}

.importphoto {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--bg);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.importphoto input {
  position: absolute;
  left: 15px;
  top: 15px;
}

.importphoto img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  background: white;
}

.importphoto span {
  font-size: 11px;
  overflow-wrap: anywhere;
  padding-right: 30px;
}

.importphoto button {
  position: absolute;
  bottom: 0;
  right: 0;
  min-height: 44px;
  min-width: 44px;
  background: none;
  border: 0;
  font-size: 22px;
}

.groupgrid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
}

.importgroup {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
}

.importgroup>div {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.importgroup img {
  width: 65px;
  height: 70px;
  object-fit: contain;
  background: var(--bg);
}

#importError {
  white-space: pre-wrap;
}

.reviewrow {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
  padding: 15px;
}

.reviewphoto img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: var(--bg);
}

.reviewphoto p {
  font-size: 12px;
  margin: 6px 0;
  overflow-wrap: anywhere;
}

.bulkstyle {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  padding: 18px;
  background: var(--bg);
  border-radius: 10px;
}

.bulkstyle label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
}

.bulkstyle select {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: white;
}

.inspectgrid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

.inspectcard {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.inspectcard h3 {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.inspectphotos {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 5px;
}

.inspectphotos img {
  width: 100%;
  height: auto;
}

.inspectphotos img:first-child {
  grid-column: 1/-1;
}

.inspectcard pre {
  font-family: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.reviewbody input,.reviewbody textarea {
  font-size: 16px;
}

.batch.has-selection>div {
  flex: 1;
  justify-content: flex-end;
}

#inspector,#importer,#reviewer {
  width: min(1100px,94vw);
}

dialog.appscreen {
  width: min(1100px,96vw);
  max-height: min(94dvh,100dvh - 16px);
}

.flowsteps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  align-items: center;
}

.flowstep {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #7a8478;
  padding: 4px 0;
}

.flowstep.done {
  color: #3d6b3d;
}

.flowstep.active {
  color: var(--accent, #2F5BFF);
}

.flowstep:not(:last-child)::after {
  content: "→";
  margin-left: 8px;
  font-weight: 500;
  color: #b0b7ae;
}

.flowback {
  margin-right: auto;
  min-height: 40px;
}

.setbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.setbar label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.setbar p {
  flex-basis: 100%;
  font-size: 13px;
  margin: 0;
  color: #60695f;
  overflow-wrap: anywhere;
}

.setbar select,.guidebody input:not([type=checkbox]),.guidebody select {
  font: inherit;
  padding: 10px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  max-width: 100%;
}

.guidebody>label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.templatefield {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #e5e5dd;
  flex-wrap: wrap;
}

.templateSample {
  max-width: 240px;
  margin: 14px auto;
}

.templateSample img {
  width: 100%;
}


.samplephoto { gap: 0; padding: 0; overflow: hidden; }
.sample-media {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 110px;
  background: #eae8e1;
  color: var(--muted);
  font-size: 12px;
}
.sample-meta {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
}
.sample-cover .sample-media { position: absolute; inset: 0; }
.sample-cover { position: relative; justify-content: end; }
.sample-cover .sample-meta {
  position: relative;
  z-index: 1;
  background: linear-gradient(transparent, rgba(20,24,22,.78));
  color: #fff;
}
.sample-stack .sample-media {
  flex: 0 1 auto;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  align-self: center;
}
.sample-stack.portrait .sample-media {
  aspect-ratio: 4/5;
}
.sample-band .sample-media { min-height: 150px; }
.sample-band .sample-meta { padding: 10px 14px; }
.samplebrand { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 11px; opacity: .9; }
.samplebrand img { max-height: 18px; width: auto; }

.samplephoto {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 12px;
  padding: 18px;
  background: #f4eee4;
}

.samplephoto>span:first-child {
  flex: 1;
  display: grid;
  place-items: center;
  background: #eae8e1;
  min-height: 100px;
}

.samplephoto.dark {
  background: #242b27;
  color: white;
}

.samplephoto.white {
  background: white;
  border: 1px solid #ddd;
}

.intro h1 {
  max-width: 700px;
}

.setbar #deleteSet {
  color: #b35141;
}

.setbar button:disabled {
  opacity: .45;
}

#setError {
  color: #a63024;
}

#setCaption {
  white-space: pre-wrap;
  font: 14px/1.7 Seed,system-ui,sans-serif;
  overflow-wrap: anywhere;
}

label[hidden] {
  display: none!important;
}

.poststeps {
  padding: 14px 20px;
  background: #f4eee4;
  font-size: 14px;
  line-height: 1.45;
}

.poststeps p {
  margin: 0 0 6px;
}

.poststeps #shareHint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.postactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.photoguide {
  padding: 14px;
  background: #f4eee4;
  border-radius: 10px;
  margin: 14px 0;
  font-size: 13px;
}

.photoguide p {
  margin: 8px 0;
}

.livecaption {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 14px;
  text-align: left;
}


.salesdefaults {
  border: 1px solid var(--control-border);
  border-radius: 10px;
  padding: 14px;
  margin: 18px 0;
}

.salesdefaults label {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.guidebody textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 10px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  resize: vertical;
}

.templatefield>label {
  font-size: 13px;
  display: flex;
  gap: 6px;
  align-items: center;
}

#shopError {
  color: #a63024;
}

.poststeps button:disabled {
  opacity: .45;
}

#postStatus,#shareHint {
  font-size: 13px;
  overflow-wrap: anywhere;
}

pre {
  overflow-wrap: anywhere;
}

.openimage {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.templatefield input[type=checkbox] {
  width: 18px;
  height: 18px;
}


.logopreview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  background: repeating-conic-gradient(#eee 0% 25%,#fff 0% 50%) 50%/16px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 10px 0;
  color: #60695f;
  font-size: 13px;
}

.logopreview img {
  max-width: 180px;
  max-height: 90px;
  object-fit: contain;
  padding: 10px;
}

.samplebrand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.samplebrand img {
  max-width: 60px;
  max-height: 24px;
  object-fit: contain;
}

.checklabel {
  display: flex!important;
  align-items: center;
  gap: 10px;
}

.checklabel input {
  width: 18px;
  height: 18px;
}

.customsetting {
  padding: 14px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  margin: 12px 0;
  background: #faf8f3;
}

.customsetting>label {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.customsetting input:not([type=checkbox]),.customsetting select {
  width: 100%;
  box-sizing: border-box;
}

.customactions {
  display: flex;
  gap: 12px;
}

.customsetting input[type=checkbox] {
  width: 18px;
  height: 18px;
}

.customsetting label:has(input[type=checkbox]) {
  display: flex;
  align-items: center;
}

#customFieldError {
  font-size: 13px;
  color: #a63024;
}

#productCustomFields>label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

[hidden] {
  display: none!important;
}

button,a,input,select,textarea,summary {
  touch-action: manipulation;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.fields label,.guidebody>label,.salesdefaults label,.sectionbody label {
  font-size: 14px;
}

.guidebody input:not([type=checkbox]),.guidebody select,.guidebody textarea,.bulkstyle select,.search input,.filelabel input,.setbar select,.upload input {
  font-size: 16px;
}

.guidebody>label,.filelabel,.sectionbody,.template-controls,.importbody {
  min-width: 0;
  max-width: 100%;
}

.guidebody>label>select,.guidebody>label>input:not([type=checkbox]),input[type=file] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.filelabel {
  display: flex;
}

.templatefield>label,.checklabel,.customsetting label:has(input[type=checkbox]) {
  min-height: 44px;
  font-size: 14px;
}

.cardmeta,.status,.summary span,.upload span,.importphoto span {
  font-size: 12px;
  letter-spacing: 0;
}

.dialoghead>div,.dialoghead h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.storemenu summary {
  cursor: pointer;
  font-size: 14px;
  min-height: 44px;
  padding: 10px 0;
}

.storemenu-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.accountbody .accountactions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.accountbody label {
  display: grid;
  gap: 6px;
  margin: 12px 0 8px;
}

#accountError:not(:empty) {
  color: #a33;
  margin-top: 10px;
}

.applang {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 8px;
}

.applang select {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
}



.previewlabel {
  margin: 14px 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
  text-transform: none;
}

.template-preview .previewlabel:first-of-type {
  margin-top: 4px;
}

.brandactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin: 8px 0 12px;
}

.templatefield-fixed {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.templatefield-fixed .hint {
  font-weight: 400;
  margin: 0;
}

.fieldnote {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.fielddest {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.5;
}
.fielddest::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: currentColor;
  opacity: 0.85;
}
.fielddest-caption {
  background: #f3f1eb;
  border-color: #e4e0d6;
  color: #6f746c;
}
.fielddest-image {
  background: #f7efe8;
  border-color: #ead9cc;
  color: #9a5a3c;
}
.fielddest-always {
  background: #efece4;
  border-color: #ddd8cc;
  color: #5f655e;
}
.fields label .fielddest:first-of-type {
  margin-left: 8px;
}

.editor-preview .previewlabel {
  margin-top: 0;
}

#editBrandFromEditor {
  margin-top: 10px;
}


.cornerpick {
  margin: 12px 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.cornerpick > legend {
  padding: 0;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.corneropts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.corneropt {
  display: grid;
  gap: 6px;
  margin: 0 !important;
  cursor: pointer;
  font-weight: 400 !important;
  justify-items: center;
  text-align: center;
}
.corneropt input {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}
.cornercard {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  max-width: 72px;
  margin: 0 auto;
  border: 2px solid var(--control-border);
  border-radius: 10px;
  background: #f3f0e8;
  position: relative;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.corneropt:hover .cornercard { border-color: #c5cbc0; }
.corneropt input:checked + .cornercard {
  border-color: var(--orange);
  background: #fff8f4;
  box-shadow: 0 0 0 1px var(--orange);
}
.corneropt:has(input:focus-visible) .cornercard {
  outline: 3px solid #2F5BFF80;
  outline-offset: 2px;
}
.c-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
}
.c-tl { top: 8px; left: 8px; }
.c-tr { top: 8px; right: 8px; }
.c-bl { bottom: 8px; left: 8px; }
.c-br { bottom: 8px; right: 8px; }
.cornername {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
@media (max-width: 560px) {
  .corneropts { gap: 6px; }
  .cornername { font-size: 11px; }
}


.layoutpick {
  margin: 12px 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.layoutpick > legend {
  padding: 0;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.layoutopts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.layoutopt {
  display: block;
  margin: 0 !important;
  cursor: pointer;
  font-weight: 400 !important;
}
.layoutopt input {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
  appearance: none;
}
.layoutcard {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 2px solid var(--control-border);
  border-radius: 12px;
  background: #fff;
  transition: border-color .15s, background .15s;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}
.layoutopt:hover .layoutcard { border-color: #c5cbc0; }
.layoutopt input:checked + .layoutcard {
  border-color: var(--orange);
  background: #f3f6ff;
  box-shadow: none;
}
.layoutopt:has(input:focus-visible) .layoutcard {
  outline: 3px solid #2F5BFF80;
  outline-offset: 2px;
}
.layoutname {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.layoutdesc {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.3;
}
.layoutthumb {
  display: grid;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #ebe7df;
  border: 1px solid #e0ddd4;
  position: relative;
}
.lt-photo {
  display: block;
  background:
    linear-gradient(135deg, #d8d2c6 25%, transparent 25%) -6px 0 / 12px 12px,
    linear-gradient(225deg, #d8d2c6 25%, transparent 25%) -6px 0 / 12px 12px,
    linear-gradient(45deg, #d8d2c6 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(315deg, #d8d2c6 25%, #cfc8ba 25%) 0 0 / 12px 12px;
  background-color: #cfc8ba;
  min-height: 0;
}
.layout-catalog { background: #fff; display: block; position: relative; }
.layout-catalog .lt-photo { position: absolute; inset: 0 0 22% 0; width: auto; height: auto; border-radius: 0; }
.layout-catalog .lt-catmeta { position: absolute; left: 8px; bottom: 8px; display: grid; gap: 3px; width: 42%; }
.layout-catalog .lt-catmeta i { display: block; height: 3px; background: #c8c4bc; border-radius: 2px; }
.layout-catalog .lt-catmeta .lt-price { width: 70%; height: 6px; background: #222; }
.layout-catalog .lt-catbrand { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 22px; border-radius: 3px; background: #d9d4cb; }
.layout-shop { display: block; position: relative; background: #ddd; }
.layout-shop .lt-photo { position: absolute; inset: 0 0 28% 0; }
.layout-shop .lt-shopbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 28%;
  background: #0F1B2D; padding: 5px 6px; display: grid; gap: 3px;
  grid-template-columns: 1fr auto; grid-template-rows: auto auto;
}
.layout-shop .lt-shopname { grid-column: 1; height: 4px; width: 70%; background: rgba(255,255,255,.55); border-radius: 2px; }
.layout-shop .lt-shopprice { grid-column: 2; height: 7px; width: 22px; background: #F0C14B; border-radius: 2px; align-self: start; }
.layout-shop .lt-shopfoot { grid-column: 1 / -1; height: 3px; width: 100%; background: rgba(255,255,255,.2); border-radius: 2px; margin-top: 2px; }
.fields .layoutpick { margin-bottom: 13px; }
.fields .layoutpick > legend { font-size: 12px; font-weight: 600; }
.bulkstyle .layoutpick { flex: 1 1 100%; width: 100%; margin: 4px 0 0; }
@media (max-width: 560px) {
  .layoutopts { gap: 6px; }
  .layoutcard { padding: 6px; }
  .layoutname { font-size: 12px; }
  .layoutdesc { font-size: 10px; }
}


.fieldmatrix .templatefield-fixed {
  display: block;
  grid-column: 1 / -1;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #faf8f3;
}

.fieldmatrix {
  display: grid;
  gap: 0;
  margin: 8px 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.fieldhead, .templatefield {
  display: grid;
  grid-template-columns: minmax(7.5rem,1.4fr) repeat(3, minmax(0,1fr));
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
}
.fieldhead {
  background: #f3f0e8;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.templatefield {
  justify-content: initial;
  flex-wrap: nowrap;
  border-bottom: 1px solid #e5e5dd;
  margin: 0;
}
.templatefield:last-child { border-bottom: 0; }
.templatefield > label, .templatefield .fieldnote {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}
.templatefield > label:first-child {
  flex-basis: auto;
  font-size: 13px;
}
.fieldnote { justify-content: center; text-align: center; }
.previewsummary {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-line;
}
.preview-toggle {
  display: none;
}
.setfoot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}
.setfoot > .primary {
  margin-left: auto;
}
.savetemplate {
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0;
}
.savetemplate > summary {
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.savetemplatebody {
  padding: 0 12px 12px;
  display: grid;
  gap: 8px;
}
@media (max-width: 650px) {
  .fieldhead, .templatefield {
    grid-template-columns: 1fr 1fr;
  }
  .fieldhead span:nth-child(n+3),
  .templatefield > :nth-child(n+3) {
    /* keep all 4 on 2x2 */
  }
  .fieldhead {
    display: none;
  }
  .templatefield {
    grid-template-columns: 1fr 1fr;
  }
  .templatefield > label:first-child {
    grid-column: 1 / -1;
  }
  .setfoot > .primary {
    margin-left: 0;
    width: 100%;
  }
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 280px;
  grid-template-areas: "controls preview";
  align-items: start;
}
.template-controls { grid-area: controls; }
.template-preview { grid-area: preview; }

#setDialog {
  width: min(1040px,94vw);
}
#editor {
  width: min(1100px,96vw);
  max-height: min(920px,94vh);
}

.template-controls {
  min-width: 0;
  font-size: 14px;
}

.template-preview {
  position: sticky;
  top: 90px;
  padding: 20px;
  min-width: 0;
  background: var(--bg);
  border-left: 1px solid var(--line);
  border-radius: 0 0 0 12px;
}

.template-preview h3,.sectiontitle {
  font-size: 16px;
  margin: 10px 0;
}

.settingssection {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.settingssection>summary {
  padding: 12px 14px;
  min-height: 48px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.sectionbody {
  padding: 0 14px 14px;
}

.sectionbody>label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.sectionbody .twocol>label {
  display: grid;
  gap: 6px;
}

.sectionbody>p {
  margin: 10px 0;
}

.postingfoot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.postingfoot .postactions,
.postingfoot .postnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.postingfoot #shootNext {
  justify-self: start;
  width: auto;
  min-height: 40px;
  padding: 8px 4px;
}


.previewfigure .openimage {
  grid-column: 1/-1;
}

@media(min-width:1400px) {

  .grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }

}

@media(max-width:1050px) {

  .sidebar {
    width: 190px;
    padding: 26px 16px;
  }

  main {
    margin-left: 190px;
    padding: 0 24px;
  }

  .grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .summary>div {
    padding: 0 16px;
  }

  .summaryhint {
    display: none;
  }

  .summary {
    grid-template-columns: repeat(3,1fr);
  }

}

@media(max-width:700px) {

  .sidebar {
    position: static;
    width: auto;
    padding: 12px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    align-items: start;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .brand {
    font-size: 22px;
  }

  .sidebar>.eyebrow,.nav,.sidebottom p,.localdot {
    display: none;
  }

  .sidebottom {
    margin: 0;
    display: block;
    gap: 6px 12px;
    flex-wrap: wrap;
    width: auto;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    margin-left: auto;
  }

  .sidebottom button {
    font-size: 14px;
    min-height: 44px;
    text-align: left;
  }

  #install {
    display: none;
  }

  main {
    margin: 0;
    padding: 0 18px;
  }

  header {
    height: 52px;
  }

  .intro {
    display: block;
    padding: 18px 0;
  }

  .intro .primary {
    margin-top: 12px;
    width: 100%;
  }

  h1 {
    font-size: 25px;
    margin-bottom: 8px;
  }

  .muted {
    font-size: 12px;
  }

  .summary {
    padding: 12px 0;
  }

  .summary>div {
    padding: 0 12px;
  }

  .summary span {
    font-size: 12px;
  }

  .summary strong {
    font-size: 23px;
  }

  .toolbar {
    display: block;
    margin-top: 8px;
  }

  .tabs {
    justify-content: space-between;
  }

  .search {
    border-top: 1px solid var(--line);
  }

  .search input {
    max-width: none;
    width: 100%;
  }

  .batch {
    flex-wrap: wrap;
    padding: 9px 0;
  }

  .batch>div {
    width: 100%;
  }

  .batch button {
    flex: 1;
    font-size: 12px;
    padding: 10px;
  }

  .grid {
    gap: 10px;
  }

  .cardimage {
    height: 165px;
  }

  .cardbody {
    padding: 12px;
  }

  .card h3 {
    font-size: 13px;
  }

  .cardactions button {
    font-size: 14px;
    text-align: left;
    min-height: 44px;
  }

  .status {
    font-size: 10px;
    right: 8px;
    top: 12px;
  }

  .cardcheck {
    left: 8px;
  }

  .editor-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "preview" "main";
  }
  .editor-main {
    grid-template-columns: 1fr;
    padding: 16px 18px 18px;
    gap: 16px;
  }
  .editor-photos {
    order: -1;
  }
  .editor-preview {
    position: sticky;
    top: 0;
    z-index: 6;
    padding: 12px 18px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
    overflow: hidden;
    box-shadow: 0 10px 24px #00000014;
  }
  .preview-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 14px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
  }
  .editor-preview:not(.preview-expanded) > :not(.preview-toggle):not(#draftHint) {
    display: none;
  }
  .editor-preview.preview-expanded,
  .template-preview.preview-expanded {
    max-height: 60vh;
    overflow: auto;
  }
  .editor-preview.preview-expanded #liveCaption,
  .editor-preview.preview-expanded .previewlabel[data-i18n="preview.caption"],
  .template-preview.preview-expanded #setCaption,
  .template-preview.preview-expanded .previewlabel:last-of-type {
    display: block;
  }
  #livePreview img {
    width: min(140px,100%);
  }

  .upload {
    min-height: 150px;
  }

  .dialoghead {
    padding: 18px;
  }

  .dialogfoot {
    padding: 15px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom,0px));
  }

  .empty {
    padding: 35px 14px;
  }

  footer span:nth-child(2) {
    display: none;
  }

  .sidebottom #install {
    display: block;
  }

  .sidebottom #offlineStatus {
    display: none;
    width: 100%;
    margin: 0;
    font-size: 11px;
  }

  .intro .eyebrow {
    display: none;
  }

  .cardmeta {
    font-size: 11px;
  }

  .cardactions {
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
  }


  .dialogfoot .danger {
    flex: 1 1 100%;
    width: 100%;
    margin-right: 0;
    text-align: left;
  }

  .dialogfoot .primary,.dialogfoot .secondary {
    flex: 1 1 calc(50% - 6px);
    white-space: normal;
    line-height: 1.35;
    text-align: center;
  }

  #editor .dialogfoot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #editor .dialogfoot .danger {
    width: auto;
    flex: none;
    margin-bottom: 2px;
  }

  #editor .dialogfoot .primary,
  #editor .dialogfoot .secondary {
    flex: none;
    width: 100%;
    min-height: 48px;
    padding: 13px 16px;
    font-size: 15px;
    line-height: 1.35;
  }

  .fields .hint {
    font-size: 13px;
  }

  .introactions {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .intro .introactions .primary {
    margin-top: 0;
  }

  .introactions>button {
    width: 100%;
  }

  .importbody,.reviewbody {
    padding: 15px;
  }

  .importgrid {
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px;
  }

  .importphoto img {
    height: 100px;
  }

  .groupgrid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .reviewrow {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .reviewphoto img {
    height: 100px;
    width: 100px;
    flex-shrink: 0;
  }

  .reviewrow .twocol {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .inspectgrid {
    grid-template-columns: 1fr;
  }

  .bulkstyle {
    padding: 12px;
    gap: 8px;
  }

  .resume button {
    width: 100%;
  }

  .importtools>button {
    flex: 1;
    white-space: normal;
  }

  .storemenu summary {
    padding: 10px;
    font-size: 13px;
  }

  .storemenu[open]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9;
    background: transparent;
  }

  .storemenu[open] .storemenu-actions {
    position: absolute;
    right: 0;
    top: 48px;
    width: 220px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 24px #0002;
    z-index: 10;
  }

  .introactions .primary {
    grid-column: 1/-1;
  }

  .template-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "preview" "controls";
  }

  .template-preview {
    position: sticky;
    top: 0;
    z-index: 6;
    padding: 12px 18px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
    overflow: hidden;
    box-shadow: 0 10px 24px #00000014;
    background: var(--bg);
  }
  .template-preview h3 {
    margin: 0;
    padding-right: 118px;
  }
  .template-preview > .hint {
    display: none;
  }
  .template-preview .previewsummary {
    margin: 8px 0 0;
  }
  .template-preview:not(.preview-expanded) > :not(h3):not(.preview-toggle):not(.previewsummary) {
    display: none;
  }
  .template-preview #setCaption,
  .template-preview .previewlabel:last-of-type {
    display: none;
  }
  .template-preview .templateSample {
    max-width: 150px;
    margin: 6px auto 8px;
  }
  .template-preview.preview-expanded #setCaption,
  .template-preview.preview-expanded .previewlabel:last-of-type {
    display: block;
  }

  .reviewphoto {
    display: flex;
    gap: 12px;
    align-items: center;
  }

  .reviewphoto p {
    font-size: 14px;
  }

  .fields label,.templatefield>label {
    font-size: 14px;
  }

  #setDialog {
    width: 96vw;
  }

}

@media(max-width:650px) {

  dialog.appscreen {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0;
  }

  dialog.appscreen::backdrop {
    background: #fff;
  }

  .setbar {
    align-items: stretch;
  }

  .setbar label {
    width: 100%;
    flex-wrap: wrap;
  }

  .setbar select {
    width: 100%;
  }

  .setbar button {
    flex: 1 1 40%;
  }

  .templatefield {
    font-size: 13px;
  }

  .poststeps {
    padding: 16px;
  }

  .postactions button {
    width: 100%;
    min-height: 48px;
  }

  .templatefield>label:first-child {
    flex-basis: 100%;
  }

  .dialogfoot>button:not(.danger) {
    flex: 1 1 calc(50% - 6px);
    min-height: 44px;
  }

  #editor .dialogfoot > button:not(.danger) {
    flex: none;
  }

  .previewfigure figcaption {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .previewfigure button {
    min-height: 44px;
  }

  .setbar>details {
    flex-basis: 100%;
  }

}

@media(max-width:480px) {

  .grid {
    grid-template-columns: 1fr;
  }

  .cardimage {
    height: 240px;
  }

  .cardbody {
    padding: 16px;
  }

  .card h3 {
    font-size: 16px;
  }

  .cardmeta,.status {
    font-size: 13px;
  }

  .twocol {
    grid-template-columns: 1fr;
  }

  .tabs {
    gap: 12px;
  }

  .tab {
    font-size: 13px;
  }

  .setbar {
    padding: 14px;
  }

  .postingfoot {
    gap: 8px;
  }

  .postingfoot .postactions,
  .postingfoot .postnav {
    gap: 8px;
  }

  .postingfoot button {
    font-size: 13px;
    padding: 10px 8px;
  }

  .poststeps {
    padding: 12px 14px;
  }

}

@media(max-width:370px) {

  .grid {
    grid-template-columns: 1fr;
  }

  .introactions {
    grid-template-columns: 1fr;
  }

}

@media(prefers-reduced-motion:reduce) {

  * {
    transition: none!important;
  }

}

#confirmDialog{max-width:min(420px,92vw)}
#confirmDialog #confirmMessage{margin:0;color:var(--ink);font-size:15px;line-height:1.55;white-space:pre-wrap}
#confirmDialog .dialogfoot{justify-content:flex-end;gap:10px}
#confirmDialog .danger{margin-right:0;background:#b35141;color:#fff;border:0;border-radius:10px;padding:10px 16px;font-size:14px;font-weight:700}
#confirmDialog .danger:hover{background:#9a4335}



.editormode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 8px;
}
.editormodeopt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ink, #272d28) 16%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper, #faf8f3) 80%, #fff);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.editormodeopt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.editormodeopt:has(input:checked) {
  border-color: var(--accent, #b75732);
  background: color-mix(in srgb, var(--accent, #b75732) 12%, #fff);
  color: var(--ink, #272d28);
}
.editormodeopt span {
  padding: 10px 12px;
  text-align: center;
}
#editorModeHint {
  margin: 0 0 12px;
}

.shopnudge{margin:0 0 12px;padding:10px 12px;background:rgba(15,27,45,.06);border-radius:10px;font-size:14px}
.shopnudge .textbutton{margin-left:6px}
.welcomeactions{display:flex;flex-direction:column;gap:10px;margin-top:16px}

.v1-advanced{display:none!important}
.shootreviewbody{display:flex;justify-content:center;padding:12px}
.shootreviewbody img{max-width:100%;max-height:55vh;border-radius:8px}
.shootreviewfoot{display:flex;flex-wrap:wrap;gap:8px;justify-content:stretch}
.shootreviewfoot button{flex:1;min-width:7rem}
.previewlook{
  margin:0;
  padding:0;
  background:rgba(15,27,45,.04);
  border-top:1px solid var(--line);
}
.previewlook>summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:44px;
  padding:10px 16px;
  font-size:14px;
  font-weight:700;
  color:var(--ink);
  user-select:none;
}
.previewlook>summary::-webkit-details-marker{display:none}
.previewlook>summary::after{
  content:"";
  width:10px;height:10px;
  border-right:2px solid var(--muted);
  border-bottom:2px solid var(--muted);
  transform:rotate(45deg);
  transition:transform .15s;
  flex:0 0 auto;
  margin-top:-4px;
}
.previewlook[open]>summary::after{transform:rotate(-135deg);margin-top:4px}
.previewlook-body{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:0 16px 14px;
}
.previewlook-body>label{display:grid;gap:6px;margin:0;font-size:12px;font-weight:600;color:var(--muted);letter-spacing:.01em}
.previewlook-body>label select{
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:44px;
  margin:0;
  padding:10px 40px 10px 12px;
  font:inherit;
  font-size:15px;
  font-weight:700;
  color:var(--ink);
  line-height:1.2;
  border:1px solid var(--control-border);
  border-radius:10px;
  background-color:#fff;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1.5 1.75L6 6.25L10.5 1.75' stroke='%235A6578' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:12px 8px;
  appearance:none;
  -webkit-appearance:none;
  box-shadow:none;
}
.previewlook-body>label select:focus-visible{
  outline:3px solid #2F5BFF80;
  outline-offset:2px;
  border-color:var(--orange);
}
.previewlook-body .layoutpick,
.previewlook-body #previewApplyLook{grid-column:1/-1}
.previewlook-body .layoutpick{margin:0}
.previewlook-body .layoutpick>legend{margin-bottom:8px;font-size:12px;font-weight:600;color:var(--muted)}
.previewlook-body .layoutpick.compact{display:flex;flex-wrap:wrap;gap:12px}
.previewlook-body .layoutpick.compact .layoutopt{display:grid;justify-items:center;gap:6px;width:64px;font-size:12px;text-align:center;color:var(--muted)}
.previewlook-body .layoutpick.compact .layoutopt:has(input:checked){color:var(--ink);font-weight:700}
.previewlook-body .layoutpick.compact .layoutcard{
  width:56px;
  height:56px;
  padding:0;
  border-radius:10px;
  box-sizing:border-box;
  overflow:hidden;
}
.previewlook-body .layoutpick.compact .layoutopt input:checked + .layoutcard{
  border-color:var(--orange);
  background:#fff;
}
.previewlook-body #previewApplyLook{min-height:44px;border-radius:10px}

/* Preview: image gets the middle; look stays collapsed; slim docked actions (not overlay sticky)
   Only when [open] — author display:flex otherwise overrides UA dialog:not([open]){display:none}
   and the closed preview sheet paints on top of home (seen on TestFlight / WKWebView). */
#preview.appscreen[open]{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:0;
}
#preview.appscreen:not([open]){display:none}
#preview .dialoghead,
#preview .poststeps,
#preview .previewlook,
#preview .postingfoot{flex-shrink:0}
#preview #previewBody{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding:12px 16px 16px;
  align-content:start;
}
#preview .postingfoot{
  position:relative;
  bottom:auto;
  gap:8px;
  padding:10px 14px;
  padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));
}
#preview .postingfoot .postactions,
#preview .postingfoot .postnav{gap:8px}
#preview .postingfoot button{min-height:44px;padding:10px 8px}
#preview .postingfoot #shootNext{min-height:36px;padding:4px;justify-self:center}

.v1-hide-setbar{display:none!important}
.v1-more{margin-top:8px}
.v1-more summary{cursor:pointer;color:inherit;opacity:.75;font-size:14px}
.v1-more .textbutton{display:block;width:100%;text-align:left;margin-top:6px}
