/* Category Pill Styles (Shared) */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 99px;
    /* Subtle default look */
    background: color-mix(in srgb, var(--cat-color), transparent 94%);
    border: 1px solid color-mix(in srgb, var(--cat-color), transparent 70%);
    color: var(--cat-color);
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.category-pill .material-symbols-rounded {
    font-size: 1.1em;
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* Primary (Priority) Category - Distinct Styling */
.category-pill.primary {
    /* Slightly more prominent but refined */
    padding: 8px 16px;
    font-size: 0.95rem;

    /* Stronger border and subtle background tint */
    background: color-mix(in srgb, var(--cat-color), transparent 88%);
    border: 1px solid var(--cat-color);

    /* Gentle glow only */
    box-shadow: 0 2px 12px color-mix(in srgb, var(--cat-color), transparent 85%);
}

.category-pill.primary .material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.category-pill.primary .pill-label {
    font-weight: 700;
}/* submit.css
   Extracted from src/shared/submit.html during module split. */

* {
      box-sizing: border-box
    }

    html,
    body {
      height: 100%
    }

    body {
      margin: 0;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background:
        linear-gradient(rgba(4, 15, 29, 0.48), rgba(4, 15, 29, 0.68)),
        url('/cottonwoodburly.jpg') center 38% / cover fixed no-repeat,
        var(--bg);
      color: var(--text);
      padding-top: env(safe-area-inset-top);
      -webkit-font-smoothing: antialiased;
    }

    .home-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px;
      border-radius: 10px;
      background: var(--panel-2);
      border: 1px solid var(--border);
      text-decoration: none;
      color: var(--text);
    }

    .home-btn i {
      font-size: 20px;
      line-height: 1;
    }

    .content {
      width: min(760px, calc(100% - 28px));
      padding: 18px 0 22px;
      max-width: none;
      margin: 0 auto;
    }

    .submit-form-title {
      margin: 0 0 12px;
      color: #fff;
      font-size: clamp(1.8rem, 4vw, 3rem);
      line-height: 0.98;
      font-weight: 900;
      letter-spacing: 0;
      text-shadow: 0 2px 14px rgba(2, 6, 23, 0.5);
    }

    .submit-form-content.hidden {
      display: none !important;
    }

    .submit-intro-shell {
      width: min(1180px, calc(100% - 32px));
      min-height: calc(100dvh - var(--ara-top-nav-height, 0px) - 72px);
      margin: 0 auto;
      display: grid;
      grid-template-columns: minmax(0, 1.04fr) minmax(390px, 0.84fr);
      align-items: center;
      gap: clamp(24px, 4vw, 64px);
      padding: clamp(22px, 4vh, 48px) 0;
    }

    .submit-intro-info {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: clamp(18px, 2.5vh, 28px);
    }

    .submit-intro-copy {
      max-width: 720px;
    }

    .submit-eyebrow,
    .submit-card-kicker {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin: 0 0 18px;
      color: #93c5fd;
      font-size: 0.78rem;
      font-weight: 900;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .submit-intro-copy h1 {
      max-width: 11ch;
      margin: 0;
      color: #fff;
      font-size: clamp(3rem, 5.25vw, 5.05rem);
      line-height: 0.9;
      font-weight: 900;
      letter-spacing: 0;
    }

    .submit-intro-copy p:not(.submit-eyebrow) {
      max-width: 640px;
      margin: clamp(14px, 1.8vh, 20px) 0 0;
      color: rgba(219, 234, 254, 0.9);
      font-size: clamp(1rem, 1.2vw, 1.12rem);
      line-height: 1.58;
    }

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

    .submit-reason-card {
      min-height: 142px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 12px;
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 14px;
      padding: 15px;
      background: rgba(7, 20, 38, 0.78);
      box-shadow: 0 20px 46px rgba(3, 10, 24, 0.28);
    }

    .submit-reason-card > .material-symbols-rounded {
      width: 38px;
      height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 13px;
      background: rgba(20, 184, 166, 0.16);
      color: #5eead4;
      font-size: 1.35rem;
    }

    .submit-reason-card:nth-child(2) > .material-symbols-rounded {
      background: rgba(37, 99, 235, 0.18);
      color: #93c5fd;
    }

    .submit-reason-card:nth-child(3) > .material-symbols-rounded {
      background: rgba(245, 158, 11, 0.16);
      color: #fcd34d;
    }

    .submit-reason-card h2,
    .submit-tree-types h3 {
      margin: 0;
      color: #fff;
      font-size: 1rem;
      line-height: 1.2;
      font-weight: 900;
    }

    .submit-reason-card p,
    .submit-tree-types p {
      margin: 6px 0 0;
      color: rgba(219, 234, 254, 0.78);
      font-size: 0.84rem;
      line-height: 1.36;
    }

    .submit-intro-panel {
      width: min(100%, 470px);
      justify-self: end;
    }

    .submit-intro-card {
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 16px;
      padding: clamp(22px, 3vw, 30px);
      background: rgba(15, 23, 42, 0.96);
      box-shadow: 0 28px 80px rgba(3, 10, 24, 0.5);
    }

    .submit-card-kicker {
      margin-bottom: 12px;
    }

    .submit-intro-card h2 {
      margin: 0;
      color: #fff;
      font-size: clamp(1.8rem, 2.5vw, 2.35rem);
      line-height: 1;
      font-weight: 900;
      letter-spacing: 0;
    }

    .submit-tree-types {
      display: grid;
      gap: 12px;
      margin-top: 22px;
    }

    .submit-tree-types article {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      border: 1px solid rgba(100, 116, 139, 0.58);
      border-radius: 14px;
      padding: 13px;
      background: rgba(15, 23, 42, 0.58);
    }

    .submit-tree-types .material-symbols-rounded {
      width: 42px;
      height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 13px;
      background: rgba(37, 99, 235, 0.18);
      color: #93c5fd;
      font-size: 1.35rem;
    }

    .submit-tree-types article:nth-child(2) .material-symbols-rounded {
      background: rgba(20, 184, 166, 0.16);
      color: #5eead4;
    }

    .submit-tree-types article:nth-child(3) .material-symbols-rounded {
      background: rgba(245, 158, 11, 0.16);
      color: #fcd34d;
    }

    .submit-access-note {
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
      margin-top: 18px;
      border: 1px solid rgba(250, 204, 21, 0.34);
      border-radius: 14px;
      padding: 13px;
      background: rgba(113, 63, 18, 0.22);
      color: #fef3c7;
    }

    .submit-access-note.is-ready {
      border-color: rgba(34, 197, 94, 0.38);
      background: rgba(20, 83, 45, 0.24);
      color: #dcfce7;
    }

    .submit-access-note.is-blocked {
      border-color: rgba(248, 113, 113, 0.42);
      background: rgba(127, 29, 29, 0.25);
      color: #fecaca;
    }

    .submit-access-note .material-symbols-rounded {
      color: currentColor;
      font-size: 1.55rem;
    }

    .submit-access-note p {
      margin: 0;
      font-size: 0.9rem;
      line-height: 1.45;
      font-weight: 760;
    }

    .submit-intro-actions {
      display: grid;
      gap: 12px;
      margin-top: 18px;
    }

    .submit-start-button,
    .submit-secondary-link {
      min-height: 52px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      border-radius: 13px;
      font: inherit;
      font-size: 0.96rem;
      font-weight: 900;
      text-decoration: none;
      cursor: pointer;
    }

    .submit-start-button {
      border: 1px solid rgba(96, 165, 250, 0.82);
      background: #2563eb;
      color: #fff;
      transition: transform 0.18s ease, background 0.18s ease;
    }

    .submit-start-button:hover {
      transform: translateY(-1px);
      background: #1d4ed8;
    }

    .submit-start-button:active {
      transform: translateY(0);
    }

    .submit-start-button[disabled] {
      background: rgba(51, 65, 85, 0.88);
      border-color: rgba(100, 116, 139, 0.7);
      color: rgba(226, 232, 240, 0.78);
      box-shadow: none;
    }

    .submit-secondary-link {
      border: 1px solid rgba(191, 219, 254, 0.22);
      background: rgba(7, 20, 38, 0.72);
      color: #dbeafe;
    }

    .card {
      background: rgba(15, 23, 42, 0.96);
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 16px;
      margin-bottom: 18px;
      box-shadow: 0 28px 80px rgba(3, 10, 24, 0.5);
      backdrop-filter: blur(18px);
    }

    .card .block {
      padding: clamp(14px, 2vw, 20px);
    }

    h2 {
      margin: 0;
      color: #fff;
      font-size: clamp(1.38rem, 2vw, 1.8rem);
      line-height: 1;
      font-weight: 900;
      letter-spacing: 0;
    }

    label {
      display: block;
      color: rgba(226, 232, 240, 0.94);
      font-size: 0.86rem;
      font-weight: 850;
      margin: 9px 0 5px;
    }

    .mandatory-star {
      color: var(--danger-soft);
      margin-left: 4px;
    }

    .field-note {
      font-size: 0.85rem;
      color: rgba(203, 213, 225, 0.74);
      line-height: 1.35;
      margin: 3px 0 4px;
    }

    .name-note {
      display: flex;
      align-items: flex-start;
      gap: 6px;
    }

    .name-note .material-symbols-rounded {
      flex: 0 0 auto;
      color: #fcd34d;
      font-size: 0.98rem;
      line-height: 1.15;
      margin-top: 1px;
    }

    input[type="text"],
    input[type="search"],
    input[type="number"],
    input[type="email"],
    textarea {
      width: 100%;
      min-height: 38px;
      padding: 0 14px;
      border-radius: 12px;
      border: 1px solid rgba(100, 116, 139, 0.86);
      background: rgba(15, 23, 42, 0.66);
      color: #fff;
      font-size: 0.96rem;
      font-family: inherit;
      outline: none;
      transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
    }

    textarea {
      min-height: 72px;
      padding: 9px 14px;
      line-height: 1.5;
      resize: vertical;
    }

    input::placeholder,
    textarea::placeholder {
      color: rgba(148, 163, 184, 0.88);
    }

    input:focus,
    textarea:focus {
      border-color: #60a5fa;
      background: rgba(15, 23, 42, 0.86);
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.24);
    }

    .input-with-unit {
      position: relative;
    }

    .input-with-unit .unit {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: rgba(203, 213, 225, 0.72);
      pointer-events: none;
      font-size: 0.9rem;
      font-weight: 800;
    }

    .btn-row {
      margin-top: 12px;
      display: flex;
      gap: 10px;
      justify-content: space-between;
    }

    button,
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 38px;
      padding: 9px 15px;
      border: 1px solid transparent;
      border-radius: 13px;
      cursor: pointer;
      font-family: inherit;
      font-size: 0.95rem;
      font-weight: 900;
      line-height: 1.2;
      transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    }

    .btn-primary {
      background: #2563eb;
      color: #fff;
      border-color: rgba(96, 165, 250, 0.82);
    }

    .btn-ghost {
      background: rgba(7, 20, 38, 0.72);
      color: #dbeafe;
      border-color: rgba(191, 219, 254, 0.22);
    }

    .btn-primary:hover,
    .btn-ghost:hover,
    .toggle-btn:hover,
    .category-pill:hover {
      transform: translateY(-1px);
    }

    .btn-primary:hover {
      background: #1d4ed8;
    }

    .btn-ghost:hover {
      border-color: rgba(147, 197, 253, 0.48);
      background: rgba(30, 64, 175, 0.28);
    }

    button[disabled] {
      opacity: .6;
      cursor: not-allowed;
    }

    .page {
      display: none;
    }

    .page.active {
      display: block;
    }

    .page-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(147, 197, 253, 0.14);
      margin-bottom: 11px;
    }

    .page-indicator {
      flex: 0 0 auto;
      border: 1px solid rgba(147, 197, 253, 0.24);
      border-radius: 999px;
      padding: 6px 10px;
      background: rgba(37, 99, 235, 0.13);
      color: #bfdbfe;
      font-size: 0.78rem;
      font-weight: 900;
    }

    #miniMapContainer {
      height: 300px;
      border-radius: 14px;
      border: 1px solid rgba(147, 197, 253, 0.22);
      margin-top: 14px;
      background: #000;
      box-shadow: 0 20px 48px rgba(3, 10, 24, 0.32);
      overflow: hidden;
    }

    .location-check-card {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      gap: 10px;
      align-items: center;
      margin-top: 12px;
      border: 1px solid rgba(96, 165, 250, 0.34);
      border-radius: 13px;
      padding: 11px 12px;
      background: rgba(37, 99, 235, 0.16);
      color: #dbeafe;
    }

    .location-check-card.is-warning {
      border-color: rgba(248, 113, 113, 0.5);
      background: rgba(127, 29, 29, 0.24);
      color: #fecaca;
    }

    .location-check-card .material-symbols-rounded {
      width: 38px;
      height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 11px;
      background: rgba(37, 99, 235, 0.22);
      color: #93c5fd;
      font-size: 1.35rem;
    }

    .location-check-card.is-warning .material-symbols-rounded {
      background: rgba(220, 38, 38, 0.2);
      color: #fca5a5;
    }

    .location-check-card p {
      margin: 0;
      font-size: 0.88rem;
      line-height: 1.35;
      font-weight: 850;
    }

    .location-check-card ul {
      margin: 6px 0 0;
      padding-left: 18px;
      color: rgba(219, 234, 254, 0.82);
      font-size: 0.82rem;
      line-height: 1.35;
    }

    .location-check-card.is-warning ul {
      color: #fecaca;
    }

    .location-check-card li {
      margin: 0;
    }

    #locationDisplay {
      margin-top: 9px;
      font-size: 0.9rem;
      color: rgba(219, 234, 254, 0.82);
      background: rgba(15, 23, 42, 0.58);
      border: 1px solid rgba(100, 116, 139, 0.54);
      padding: 10px 12px;
      border-radius: 11px;
      min-height: 1.5em;
    }

    #submissionError {
      display: none;
      background: rgba(127, 29, 29, 0.28);
      border: 1px solid rgba(248, 113, 113, 0.48);
      color: #fecaca;
      border-radius: 12px;
      padding: 12px 14px;
      margin: 12px 0 0;
      font-size: 0.9rem;
      text-align: center;
    }

    .history-input-panel {
      display: grid;
      gap: 13px;
    }

    .history-input-copy {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 14px;
      padding: 12px;
      background: rgba(7, 20, 38, 0.62);
    }

    .history-input-copy > .material-symbols-rounded {
      width: 42px;
      height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      background: rgba(245, 158, 11, 0.16);
      color: #fcd34d;
      font-size: 1.4rem;
    }

    .history-input-copy h3 {
      margin: 0;
      color: #fff;
      font-size: 1rem;
      line-height: 1.2;
      font-weight: 900;
    }

    .history-input-copy p {
      margin: 5px 0 0;
      color: rgba(219, 234, 254, 0.78);
      font-size: 0.85rem;
      line-height: 1.35;
    }

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

    .history-estimate-card {
      border: 1px solid rgba(245, 158, 11, 0.28);
      border-radius: 13px;
      padding: 11px 12px;
      background: rgba(245, 158, 11, 0.1);
      color: #fde68a;
      font-size: 0.88rem;
      line-height: 1.4;
      font-weight: 800;
    }

    .review-tree-preview {
      display: grid;
      gap: 11px;
      margin-bottom: 12px;
    }

    .review-hero {
      display: grid;
      grid-template-columns: 132px minmax(0, 1fr);
      gap: 14px;
      align-items: stretch;
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 14px;
      padding: 12px;
      background: rgba(7, 20, 38, 0.68);
    }

    .review-cover {
      min-height: 120px;
      border-radius: 12px;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(15, 23, 42, 0.84);
      border: 1px solid rgba(100, 116, 139, 0.48);
      color: #5eead4;
    }

    .review-cover img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
    }

    .review-cover .material-symbols-rounded {
      font-size: 2.4rem;
    }

    .review-main {
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .review-kicker {
      margin: 0 0 6px;
      color: #93c5fd;
      font-size: 0.72rem;
      font-weight: 900;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .review-main h3 {
      margin: 0;
      color: #fff;
      font-size: clamp(1.45rem, 3vw, 2.1rem);
      line-height: 1;
      font-weight: 900;
      letter-spacing: 0;
      overflow-wrap: anywhere;
    }

    .review-main > p:not(.review-kicker) {
      margin: 6px 0 0;
      color: rgba(219, 234, 254, 0.78);
      font-size: 0.95rem;
      line-height: 1.3;
    }

    .review-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-top: 12px;
    }

    .review-badges span {
      min-height: 30px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 999px;
      padding: 5px 9px;
      background: rgba(15, 23, 42, 0.66);
      color: rgba(219, 234, 254, 0.84);
      font-size: 0.78rem;
      font-weight: 850;
    }

    .review-badges .material-symbols-rounded {
      font-size: 1rem;
      color: #93c5fd;
    }

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

    .review-detail {
      min-width: 0;
      border: 1px solid rgba(100, 116, 139, 0.5);
      border-radius: 12px;
      padding: 9px 10px;
      background: rgba(15, 23, 42, 0.54);
    }

    .review-detail span,
    .review-notes span {
      display: block;
      color: rgba(147, 197, 253, 0.86);
      font-size: 0.68rem;
      line-height: 1.1;
      font-weight: 900;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .review-detail strong {
      display: block;
      margin-top: 5px;
      color: #f8fafc;
      font-size: 0.9rem;
      line-height: 1.25;
      font-weight: 850;
      overflow-wrap: anywhere;
    }

    .review-measurements .review-detail {
      border-color: rgba(94, 234, 212, 0.2);
      background: rgba(15, 118, 110, 0.13);
    }

    .review-history .review-detail {
      border-color: rgba(245, 158, 11, 0.22);
      background: rgba(146, 64, 14, 0.14);
    }

    .review-notes {
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 12px;
      padding: 10px 12px;
      background: rgba(15, 23, 42, 0.5);
    }

    .review-notes p {
      margin: 6px 0 0;
      color: rgba(226, 232, 240, 0.9);
      font-size: 0.9rem;
      line-height: 1.4;
    }

    .photo-upload-panel {
      display: grid;
      gap: 12px;
    }

    .photo-upload-copy {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 14px;
      padding: 12px;
      background: rgba(7, 20, 38, 0.62);
    }

    .photo-upload-copy > .material-symbols-rounded {
      width: 42px;
      height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      background: rgba(20, 184, 166, 0.16);
      color: #5eead4;
      font-size: 1.4rem;
    }

    .photo-upload-copy h3 {
      margin: 0;
      color: #fff;
      font-size: 1rem;
      line-height: 1.2;
      font-weight: 900;
    }

    .photo-upload-copy p {
      margin: 5px 0 0;
      color: rgba(219, 234, 254, 0.78);
      font-size: 0.85rem;
      line-height: 1.35;
    }

    .photo-drop-zone {
      width: 100%;
      min-height: 118px;
      display: grid;
      justify-items: center;
      align-content: center;
      gap: 7px;
      padding: 16px;
      border: 1px dashed rgba(147, 197, 253, 0.42);
      border-radius: 14px;
      background: rgba(15, 23, 42, 0.68);
      color: #dbeafe;
      text-align: center;
    }

    .photo-drop-zone .material-symbols-rounded {
      width: 42px;
      height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      background: rgba(37, 99, 235, 0.18);
      color: #93c5fd;
      font-size: 1.5rem;
    }

    .photo-drop-zone strong {
      font-size: 0.98rem;
      line-height: 1.2;
    }

    .photo-drop-zone small {
      max-width: 460px;
      color: rgba(203, 213, 225, 0.72);
      font-size: 0.8rem;
      line-height: 1.35;
    }

    .photo-drop-zone:hover,
    .photo-drop-zone.is-dragging {
      transform: translateY(-1px);
      border-color: rgba(94, 234, 212, 0.58);
      background: rgba(15, 118, 110, 0.18);
    }

    .photo-upload-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: rgba(203, 213, 225, 0.76);
      font-size: 0.82rem;
      line-height: 1.3;
    }

    #photoCount {
      flex: 0 0 auto;
      color: #bfdbfe;
      font-weight: 900;
    }

    #photoStatus {
      text-align: right;
    }

    .photo-preview-grid {
      display: none;
      grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
      gap: 10px;
    }

    .photo-preview-grid.has-photos {
      display: grid;
    }

    .submit-photo-thumb {
      position: relative;
      aspect-ratio: 1;
      overflow: hidden;
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 12px;
      background: rgba(7, 20, 38, 0.82);
    }

    .submit-photo-thumb img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
    }

    .submit-photo-remove {
      position: absolute;
      top: 6px;
      right: 6px;
      width: 28px;
      min-height: 28px;
      height: 28px;
      padding: 0;
      border-radius: 999px;
      border: 1px solid rgba(15, 23, 42, 0.42);
      background: rgba(15, 23, 42, 0.86);
      color: #fff;
    }

    .submit-photo-remove .material-symbols-rounded {
      font-size: 1.05rem;
    }

    .photo-duplicate-modal {
      position: fixed;
      inset: 0;
      z-index: 2200;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(2, 6, 23, 0.78);
      backdrop-filter: blur(12px);
    }

    .photo-duplicate-modal.visible {
      display: flex;
    }

    .photo-duplicate-dialog {
      width: min(720px, 100%);
      border: 1px solid rgba(147, 197, 253, 0.2);
      border-radius: 16px;
      background: rgba(15, 23, 42, 0.98);
      padding: 16px;
      color: #e5edf7;
    }

    .photo-duplicate-header {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      margin-bottom: 14px;
    }

    .photo-duplicate-header > .material-symbols-rounded {
      width: 44px;
      height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      background: rgba(245, 158, 11, 0.16);
      color: #fcd34d;
      font-size: 1.5rem;
    }

    .photo-duplicate-header h3 {
      margin: 0;
      color: #fff;
      font-size: 1.2rem;
      line-height: 1.1;
      font-weight: 900;
    }

    .photo-duplicate-header p {
      margin: 5px 0 0;
      color: rgba(203, 213, 225, 0.78);
      font-size: 0.9rem;
      line-height: 1.35;
    }

    .photo-duplicate-compare {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .photo-duplicate-compare figure {
      margin: 0;
      overflow: hidden;
      border: 1px solid rgba(100, 116, 139, 0.52);
      border-radius: 14px;
      background: rgba(7, 20, 38, 0.72);
    }

    .photo-duplicate-compare img {
      width: 100%;
      aspect-ratio: 4 / 3;
      display: block;
      object-fit: cover;
      background: rgba(2, 6, 23, 0.92);
    }

    .photo-duplicate-compare figcaption {
      padding: 8px 10px;
      color: rgba(219, 234, 254, 0.84);
      font-size: 0.78rem;
      font-weight: 900;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .photo-duplicate-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 14px;
    }

    #finalSubmitBtn {
      background: #16a34a;
      border-color: rgba(34, 197, 94, 0.82);
      color: #fff;
    }

    #finalSubmitBtn:hover {
      background: #15803d;
    }

    #loginWarning {
      background: rgba(113, 63, 18, 0.22) !important;
      border: 1px solid rgba(250, 204, 21, 0.34) !important;
      border-radius: 14px !important;
      padding: 13px !important;
      margin-bottom: 18px !important;
      color: #fef3c7;
    }

    #loginWarning .btn-primary {
      min-height: 34px;
      color: #fff !important;
    }

    .measurement-box {
      margin-top: 12px;
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 14px;
      padding: 14px;
      background: rgba(7, 20, 38, 0.72);
    }

    .measurement-box h3 {
      margin: 0 0 10px;
      color: #fff;
      font-size: 0.96rem;
      line-height: 1.2;
      font-weight: 900;
    }

    .measurement-box p {
      margin: 6px 0 0;
      color: rgba(219, 234, 254, 0.82);
      font-size: 0.9rem;
      line-height: 1.4;
    }

    .measurement-choice {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 12px;
      background: rgba(15, 23, 42, 0.58);
      padding: 11px 12px;
      border-radius: 13px;
      border: 1px solid rgba(147, 197, 253, 0.18);
    }

    .measurement-choice span {
      display: block;
      color: #f8fafc;
      font-size: 0.92rem;
      font-weight: 900;
      line-height: 1.2;
    }

    .measurement-choice p {
      margin: 3px 0 0;
      color: rgba(203, 213, 225, 0.72);
      font-size: 0.8rem;
      line-height: 1.3;
    }

    .measurement-choice-actions {
      display: flex;
      flex: 0 0 auto;
      gap: 8px;
    }

    .measurement-choice-btn {
      min-width: 74px;
      min-height: 36px;
      border-radius: 999px;
      border: 1px solid rgba(100, 116, 139, 0.7);
      background: rgba(7, 20, 38, 0.72);
      color: rgba(226, 232, 240, 0.84);
      box-shadow: none;
    }

    .measurement-choice-btn.yes.active {
      background: #16a34a;
      border-color: rgba(34, 197, 94, 0.86);
      color: #fff;
    }

    .measurement-choice-btn.no.active {
      background: #dc2626;
      border-color: rgba(248, 113, 113, 0.86);
      color: #fff;
    }

    .toggle-btn {
      min-height: 38px;
      padding: 8px 14px;
      border: 1px solid rgba(191, 219, 254, 0.22);
      border-radius: 999px;
      background: rgba(7, 20, 38, 0.72);
      color: #dbeafe;
      cursor: pointer;
    }

    .toggle-btn.active {
      background: #2563eb;
      color: #fff;
      border-color: rgba(96, 165, 250, 0.82);
      font-weight: 900;
    }

    .category-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      min-height: 38px;
      padding: 8px 14px;
      border-radius: 12px;
      font-weight: 850;
      cursor: pointer;
      background: rgba(15, 23, 42, 0.66);
      border: 1px solid rgba(148, 163, 184, 0.34);
      color: #dbeafe;
    }

    .picker-click-icon {
      margin-right: 8px;
      color: #93c5fd;
      font-size: 1.15rem;
      line-height: 1;
    }

    .category-current {
      font-size: 0.95rem;
      line-height: 1.2;
    }

    .category-none {
      opacity: 1;
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.72);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1500;
      padding: 16px;
    }

    .modal-backdrop.visible {
      display: flex;
    }

    .modal {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      width: min(500px, 100%);
      max-height: 80vh;
      padding: 16px;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
      display: flex;
      flex-direction: column;
    }

    .modal-title {
      margin: 0 0 12px;
      font-size: 1.1rem;
      color: var(--text);
    }

    .modal-body {
      color: var(--muted);
      font-size: 0.95rem;
    }

    .modal-actions {
      margin-top: 12px;
      display: flex;
      justify-content: flex-end;
      gap: 10px;
    }

    .category-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.7);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1500;
    }

    .category-overlay.open {
      display: flex;
    }

    .category-panel {
      background: var(--panel);
      border-radius: var(--radius);
      padding: 16px 16px 12px;
      width: min(520px, 92vw);
      max-height: 80vh;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
      border: 1px solid var(--border);
      display: flex;
      flex-direction: column;
    }

    .category-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 4px;
    }

    .category-panel-header h2 {
      font-size: 1.1rem;
      margin: 0;
    }

    .category-panel-intro {
      margin: 0 0 10px;
      font-size: 0.9rem;
      color: var(--muted);
    }

    .category-list {
      list-style: none;
      margin: 0;
      padding: 0;
      overflow-y: auto;
      flex: 1;
    }

    .category-option {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: var(--panel-2);
      cursor: pointer;
      margin-bottom: 8px;
      transition: all 0.12s ease;
    }

.category-option:hover {
      background: #0f2236;
      transform: translateY(-1px);
    }

    .category-option.selected {
      box-shadow: 0 0 0 1px var(--accent);
      background: #10263c;
    }

    #speciesList {
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: 50vh;
      overflow-y: auto;
      scrollbar-width: none;
      padding: 4px 0;
    }

    #speciesList::-webkit-scrollbar {
      display: none;
    }

    #speciesSearchInput {
      width: 100%;
      padding: 12px 14px;
      border-radius: 0.75rem;
      border: 1px solid var(--border);
      background: var(--panel-2);
      color: var(--text);
      font-size: 1rem;
      font-family: inherit;
      letter-spacing: 0.01em;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    #speciesSearchInput:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
    }

    #speciesSearchInput::placeholder {
      color: var(--muted);
    }

    .category-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      flex-shrink: 0;
    }

    .category-text {
      display: flex;
      flex-direction: column;
      flex: 1;
    }

    .category-check {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      flex-shrink: 0;
    }

    .category-name {
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--text);
    }

    .category-desc {
      font-size: 0.8rem;
      color: var(--muted);
      margin-top: 2px;
    }

.category-panel-footer {
      margin-top: 8px;
      display: flex;
      justify-content: flex-end;
    }

    .category-panel .btn-ghost {
      min-height: auto;
      padding: 12px 14px;
      border-radius: 10px;
      background: var(--panel-2);
      color: var(--text);
      border: 1px solid var(--border);
      box-shadow: none;
      transform: none;
    }

    .category-panel .btn-ghost:hover {
      background: var(--panel-2);
      border-color: var(--border);
      transform: none;
    }

    .category-pill.primary {
      border: 1px solid var(--cat-color);
    }

    .pill-label {
      margin-left: 6px;
    }

    .admin-badge {
      white-space: nowrap;
    }

    /* Style for the layer control */
    .leaflet-control-layers {
      background: var(--panel-2);
      border: 1px solid var(--border);
      border-radius: 8px;
    }

    .leaflet-control-layers-base label {
      color: var(--text);
    }

    /* User Profile Preview */
    .profile-preview {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px 12px;
      background: rgba(15, 23, 42, 0.58);
      border: 1px solid rgba(147, 197, 253, 0.18);
      border-radius: 14px;
      margin-bottom: 10px;
    }

    .profile-preview.hidden {
      display: none;
    }

    .avatar-circle {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: #2563eb;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
      font-size: 1.2rem;
      flex-shrink: 0;
    }

    .profile-info {
      flex: 1;
      min-width: 0;
    }

    .profile-label {
      font-size: 0.7rem;
      color: rgba(147, 197, 253, 0.9);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-weight: 900;
    }

    .profile-username {
      font-size: 0.98rem;
      font-weight: 850;
      color: #fff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .btn-small {
      min-height: 32px;
      padding: 5px 11px;
      font-size: 0.85rem;
    }

    /* Ported from fieldtools.html */
    .note {
      background: rgba(37, 99, 235, 0.13);
      border: 1px solid rgba(147, 197, 253, 0.24);
      color: #dbeafe;
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 0.9rem;
    }

    .btn-dim {
      background: rgba(7, 20, 38, 0.72);
      color: #dbeafe;
      border: 1px solid rgba(191, 219, 254, 0.22);
    }

    .badge {
      display: inline-block;
      margin-left: 8px;
      padding: 2px 8px;
      border-radius: 999px;
      background: #1b6cff;
      color: #001528;
      font-size: .75rem;
      vertical-align: middle;
    }

    .hidden {
      display: none !important;
    }

    @media (max-width: 980px) {
      body {
        background-attachment: scroll;
      }

      .submit-intro-shell {
        grid-template-columns: 1fr;
        align-items: start;
        min-height: auto;
      }

      .submit-intro-panel {
        width: 100%;
        justify-self: stretch;
      }

      .submit-intro-copy h1 {
        max-width: 12ch;
      }
    }

    @media (max-width: 760px) {
      .content {
        width: min(100% - 24px, 560px);
        padding-top: 14px;
      }

      .card .block {
        padding: 14px;
      }

      .page-title {
        align-items: flex-start;
        flex-direction: column;
      }

      .btn-row {
        flex-direction: column-reverse;
      }

      .btn-row .btn-primary,
      .btn-row .btn-ghost {
        width: 100%;
      }

      .submit-intro-shell {
        width: min(100% - 24px, 560px);
        padding: 18px 0 28px;
      }

      .submit-intro-copy h1 {
        font-size: clamp(2.55rem, 13vw, 3.6rem);
      }

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

      .submit-reason-card {
        min-height: 0;
      }

      .submit-intro-card {
        padding: 18px;
      }

      .submit-intro-card h2 {
        font-size: clamp(1.55rem, 8vw, 2rem);
      }

      .submit-tree-types article {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 12px;
      }

      .submit-tree-types .material-symbols-rounded {
        width: 38px;
        height: 38px;
      }

      .review-hero,
      .review-grid,
      .review-measurements,
      .review-history,
      .history-field-grid {
        grid-template-columns: 1fr;
      }

      .review-cover {
        min-height: 180px;
      }

      .measurement-choice {
        align-items: stretch;
        flex-direction: column;
      }

      .measurement-choice-actions {
        width: 100%;
      }

      .measurement-choice-btn {
        flex: 1;
      }

      .photo-duplicate-dialog {
        padding: 14px;
      }

      .photo-duplicate-compare {
        grid-template-columns: 1fr;
      }

      .photo-duplicate-actions {
        flex-direction: column-reverse;
      }

      .photo-duplicate-actions .btn-primary,
      .photo-duplicate-actions .btn-ghost {
        width: 100%;
      }
    }

