/* Listing creation wizard (post.html): a focused layout with its own minimal header. */
body.page-post { background: #F8FAFC; min-height: 100vh; }

.post-hdr { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.post-hdr-in { max-width: 860px; margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 10px; }
.post-hdr .logo img { display: block; height: 28px; width: auto; }
.draft-status { font-size: 13px; font-weight: 600; color: #35638A; white-space: nowrap; }
.draft-status.is-bad { color: #B42318; white-space: normal; max-width: 220px; }
.post-hdr .btn-sm { white-space: nowrap; }
.btn-cancel-post { background: transparent; border: 1px solid transparent; color: var(--muted); }
.btn-cancel-post:hover { background: var(--pale-2); color: var(--ink); }

.post-main { max-width: 800px; margin: 0 auto; padding: 22px var(--gutter) 40px; outline: none; }
.post-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 20px; padding: 32px 36px; box-shadow: 0 10px 30px rgba(16, 44, 74, .05); }
.post-card[hidden], [hidden] { display: none !important; }

/* progress */
.stepper ol { display: flex; align-items: center; list-style: none; margin: 0 0 18px; padding: 0; gap: 8px; }
.stepper .st { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; position: relative; }
.stepper .st:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: #D6E5F5; margin-left: 4px; border-radius: 2px; }
.stepper .st.is-done:not(:last-child)::after { background: var(--primary); }
.st-in { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0; font: inherit; color: #64748B; font-weight: 600; font-size: 14px; white-space: nowrap; }
button.st-in { cursor: pointer; border-radius: 8px; }
button.st-in:hover .st-label { color: var(--ink); }
.st-dot { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: #fff; border: 2px solid #CBD5E1; color: #64748B; }
.st-dot .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.st.is-current .st-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.st.is-current .st-in { color: var(--ink); font-weight: 800; }
.st.is-done .st-dot { background: #D6E5F5; border-color: #D6E5F5; color: var(--primary); }
.st.is-done .st-in { color: var(--ink-2); }
.step-mobile { display: none; margin-bottom: 14px; }
.step-mobile-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13.5px; color: #64748B; font-weight: 600; }
.step-mobile-top strong { font-size: 15px; color: var(--ink); }
.step-bar { height: 5px; margin-top: 8px; border-radius: 5px; background: #E2E8F0; overflow: hidden; }
.step-bar i { display: block; height: 100%; background: var(--primary); border-radius: 5px; transition: width .25s ease; }

.step-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: #102C4A; outline: none; }
.step-sub { margin: 8px 0 22px; font-size: 15px; line-height: 1.5; color: #64748B; }
.sub-title { margin: 26px 0 12px; font-size: 17px; font-weight: 800; color: #102C4A; }

/* fields */
.field { margin-bottom: 14px; }
.field > label, .field > .lbl { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 700; color: #102C4A; }
.field .optional { font-weight: 500; color: #94A3B8; }
.post-card input[type="text"], .post-card input[type="search"], .post-card input[type="tel"], .post-card select, .post-card textarea { width: 100%; font: inherit; font-size: 16px; color: #102C4A; background: #fff; border: 1px solid #CBD5E1; border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.post-card input[type="text"], .post-card input[type="search"], .post-card input[type="tel"], .post-card select { height: 50px; padding: 0 14px; }
.post-card select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 40px; }
.post-card textarea { padding: 12px 14px; line-height: 1.5; resize: vertical; min-height: 130px; }
.post-card input:hover, .post-card select:hover, .post-card textarea:hover { border-color: #9DB8D6; }
.post-card input:focus, .post-card select:focus, .post-card textarea:focus, .num-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 93, 166, .16); }
.post-card select:disabled { background-color: #F1F5F9; color: #94A3B8; }
.field.has-error input, .field.has-error select, .field.has-error textarea, .field.has-error .num-group { border-color: #B42318; }
.field.has-error .pills { outline: 1.5px solid #B42318; outline-offset: 4px; border-radius: 12px; }
.field-err { min-height: 20px; margin-top: 5px; font-size: 13.5px; line-height: 1.4; color: #B42318; font-weight: 600; }
.hint-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 5px; }
.hint { font-size: 12.5px; line-height: 1.4; color: #64748B; }
.count { flex: none; font-size: 12.5px; color: #94A3B8; font-variant-numeric: tabular-nums; }
.note { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: #64748B; }
.note-signin { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: #F3F8FD; border: 1px solid #D6E5F5; border-radius: 12px; color: #35638A; font-weight: 600; }
.note-signin .ic { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.linkish { background: none; border: 0; padding: 4px 2px; font: inherit; font-weight: 700; font-size: 14px; color: var(--primary); cursor: pointer; border-radius: 6px; }
.linkish:hover { text-decoration: underline; }

.attr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.attr-grid .field-pills { grid-column: 1 / -1; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-opt { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; font: inherit; font-size: 15px; font-weight: 600; color: #102C4A; background: #fff; border: 1.5px solid #CBD5E1; border-radius: 999px; cursor: pointer; transition: border-color .15s, background .15s; }
.pill-opt:hover { border-color: #9DB8D6; }
.pill-opt.is-on { background: #102C4A; border-color: #102C4A; color: #fff; }
.pill-opt .sw { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); }
.pill-opt:focus-visible, .cat-top:focus-visible, .cat-leaf:focus-visible, .cat-hit:focus-visible, .ph-tile button:focus-visible, .linkish:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.num-group { display: flex; align-items: center; height: 50px; background: #fff; border: 1px solid #CBD5E1; border-radius: 12px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.num-group input { flex: 1; min-width: 0; height: 100% !important; border: 0 !important; box-shadow: none !important; font-variant-numeric: tabular-nums; }
.cur-switch { flex: none; align-self: stretch; display: flex; border-left: 1px solid #E2E8F0; background: #F1F5F9; }
.cur-opt { border: 0; background: transparent; padding: 0 14px; min-width: 56px; font: inherit; font-size: 15px; font-weight: 700; color: #64748B; cursor: pointer; }
.cur-opt:hover { color: var(--ink); }
.cur-opt.is-on { background: var(--primary); color: #fff; }
.cur-opt:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.num-unit { flex: none; align-self: stretch; display: flex; align-items: center; padding: 0 14px; font-size: 15px; font-weight: 700; color: #64748B; background: #F1F5F9; border-left: 1px solid #E2E8F0; }
.price-group input { font-size: 20px; font-weight: 700; }
.checks { display: grid; gap: 4px; margin: 4px 0 8px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; font-weight: 500; color: #102C4A; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--primary); }

/* category */
.cat-search { position: relative; }
.cat-search .cs-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #64748B; display: flex; }
.post-card .cat-search input { padding-left: 44px; }
.cat-suggest { margin-top: 8px; }
.cat-suggest ul { display: grid; gap: 6px; }
.cat-suggest-title, .cat-pick-title { margin: 6px 0; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748B; }
.cat-nomatch { font-size: 14px; color: #64748B; }
.cat-hit { width: 100%; text-align: left; padding: 12px 14px; font: inherit; font-weight: 600; font-size: 15px; color: #102C4A; background: #F3F8FD; border: 1px solid #D6E5F5; border-radius: 12px; cursor: pointer; }
.cat-hit:hover { background: #E6F0FA; }
.cat-chosen { margin: 6px 0 14px; font-size: 14px; font-weight: 600; color: #35638A; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cat-grid-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.cat-top { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 10px 14px; font: inherit; font-weight: 700; font-size: 14px; text-align: center; color: #102C4A; background: #fff; border: 1.5px solid #E2E8F0; border-radius: 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cat-top:hover { border-color: #9DB8D6; box-shadow: var(--shadow-sm); }
.cat-top.is-on { border-color: var(--primary); background: #F3F8FD; }
.ct-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--pale-2); display: grid; place-items: center; }
.ct-ic .ic { width: 26px; height: 26px; }
.cat-crumbs { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; font-size: 14px; color: #64748B; }
.cat-crumbs strong { color: var(--ink); }
.cat-sub { display: grid; gap: 8px; margin-top: 6px; }
.cat-leaf { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 16px; font: inherit; font-size: 16px; font-weight: 600; text-align: left; color: #102C4A; background: #fff; border: 1.5px solid #E2E8F0; border-radius: 14px; cursor: pointer; }
.cat-leaf:hover { border-color: #9DB8D6; background: #F8FAFC; }
.cat-leaf.is-on { border-color: var(--primary); background: #F3F8FD; }
.cat-leaf .ic { color: #64748B; }

/* photos */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; text-align: center; border: 2px dashed #B9CCE1; border-radius: 16px; background: #F8FAFC; transition: background .15s, border-color .15s; }
.dropzone.is-over { background: #E6F0FA; border-color: var(--primary); }
.dz-ic { width: 52px; height: 52px; border-radius: 50%; background: #E6F0FA; color: var(--primary); display: grid; place-items: center; }
.dz-ic .ic { width: 26px; height: 26px; }
.dz-title { font-size: 16px; font-weight: 700; color: #102C4A; }
.dz-or { font-size: 13px; color: #94A3B8; }
.ph-count { margin: 16px 0 8px; font-size: 13.5px; font-weight: 600; color: #64748B; }
.ph-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.ph-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #E9EEF4; border: 2px solid transparent; cursor: grab; }
.ph-tile.is-cover { border-color: var(--primary); }
.ph-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-badge { position: absolute; left: 6px; bottom: 6px; padding: 3px 8px; font-size: 11.5px; font-weight: 800; color: #fff; background: var(--primary); border-radius: 999px; }
.ph-tools { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; }
.ph-tools button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(16, 44, 74, .78); color: #fff; cursor: pointer; }
.ph-tools button:hover { background: #102C4A; }
.ph-cover-btn { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 32px; border: 0; border-radius: 8px; font: inherit; font-size: 12.5px; font-weight: 700; color: #102C4A; background: rgba(255, 255, 255, .94); cursor: pointer; }
.ph-tile.is-busy, .ph-tile.is-failed { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; text-align: center; cursor: default; }
.ph-tile.is-failed { background: #FEF3F2; border-color: #FDA29B; }
.ph-msg { font-size: 12.5px; font-weight: 600; color: #64748B; line-height: 1.3; }
.ph-tile.is-failed .ph-msg { color: #B42318; }
.ph-spin { width: 26px; height: 26px; border: 3px solid #C5D6E8; border-top-color: var(--primary); border-radius: 50%; animation: postspin .7s linear infinite; }
.ph-fail-actions { display: flex; gap: 8px; }
.ph-fail-actions button { padding: 6px 10px; font: inherit; font-size: 12.5px; font-weight: 700; border: 1px solid #FDA29B; border-radius: 8px; background: #fff; color: #B42318; cursor: pointer; }
.tips { margin: 16px 0 0; padding-left: 20px; list-style: disc; font-size: 14px; line-height: 1.6; color: #64748B; }
@keyframes postspin { to { transform: rotate(360deg); } }

/* preview */
.pv-sec { padding: 18px 0; border-top: 1px solid #E2E8F0; }
.pv-sec:first-of-type { border-top: 0; padding-top: 0; }
.pv-sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pv-sec-h h2 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #64748B; }
.pv-photo { position: relative; border-radius: 14px; overflow: hidden; background: #E9EEF4; aspect-ratio: 4 / 3; max-height: 360px; }
.pv-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pv-count { position: absolute; right: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(16, 44, 74, .8); color: #fff; font-size: 12.5px; font-weight: 700; }
.gal-empty.pv-nophoto { height: 200px; aspect-ratio: auto; }
.pv-title { font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.pv-desc { margin-top: 12px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.pv-desc.is-empty { color: #94A3B8; }
.pv-loc { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 15px; color: var(--ink-2); font-weight: 600; }
.pv-loc .ic { width: 18px; height: 18px; color: var(--accent); }
.pv-card-note { margin: 4px 0 10px; font-size: 13px; font-weight: 600; color: #64748B; }
.pv-card { list-style: none; padding: 0; margin: 0; max-width: 240px; pointer-events: none; }
.pv-card .fav { display: none; }
.pv-error { margin-top: 12px; }
.post-card .specs { margin-top: 4px; }

/* result */
.result { text-align: center; padding: 28px 0 8px; }
.result-ic { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: #E6F0FA; color: var(--primary); }
.result-ic .ic { width: 34px; height: 34px; stroke-width: 2; }
.result-ic.is-demo { background: #FFF6DD; color: #8A6100; }
.result .step-sub { max-width: 460px; margin: 8px auto 24px; }
.result-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.result-actions .btn { min-width: 240px; justify-content: center; }
.post-card.is-result { padding-top: 24px; }

/* resume banner */
.resume-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; padding: 14px 18px; background: #F3F8FD; border: 1px solid #D6E5F5; border-radius: 14px; }
.resume-banner div:first-child { display: flex; flex-direction: column; gap: 2px; }
.resume-banner strong { font-size: 15px; color: #102C4A; }
.resume-banner span { font-size: 13.5px; color: #35638A; }
.rb-actions { display: flex; gap: 8px; flex: none; }

/* actions */
.post-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.post-actions .btn { min-width: 140px; justify-content: center; }
.btn-primary-wide { min-width: 220px !important; position: relative; }
.btn .spinner { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: postspin .7s linear infinite; }
.btn.is-loading .btn-label { opacity: 0; position: absolute; }
.btn.is-loading .spinner { display: block; }

@media (max-width: 899px) {
  .stepper { display: none; }
  .step-mobile { display: block; }
  .attr-grid { grid-template-columns: minmax(0, 1fr); }
  .ph-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .post-hdr-in { padding: 10px var(--gutter); gap: 8px; }
  .post-hdr .btn-sm { padding: 0 12px; }
  .draft-status { display: none; }
  .post-main { padding: 14px var(--gutter) calc(96px + env(safe-area-inset-bottom)); }
  .post-card { border: 0; box-shadow: none; background: transparent; padding: 0; border-radius: 0; }
  .step-title { font-size: 23px; }
  .cat-grid-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-card { max-width: none; }
  .resume-banner { flex-direction: column; align-items: stretch; }
  /* sticky bottom bar; the main area leaves room for it, and safe areas are respected */
  .post-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 44, 74, .08); }
  .post-actions .btn { flex: 1; min-width: 0; height: 50px; }
  .post-actions .btn-secondary { flex: 0 0 auto; padding: 0 18px; }
  .btn-primary-wide { min-width: 0 !important; }
  .result-actions .btn { width: 100%; }
}
.draft-status:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .step-bar i, .ph-spin, .btn .spinner { transition: none; animation-duration: 1.6s; } }
@media (max-width: 719px) {
  .post-actions .btn { width: auto; }
  .post-actions .btn-secondary { flex: 0 0 auto; }
  .post-actions .btn:not(.btn-secondary) { flex: 1 1 0; }
}

.attr-group { grid-column: 1 / -1; margin: 12px 0 0; font-size: 15px; font-weight: 700; color: #102C4A; }
.attr-group:first-child { margin-top: 0; }
.multi { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 4px; }
