      :root {
        --gd: #1a3a1f;
        --gm: #2d6a35;
        --gl: #e8f5e9;
        --gb: #a5d6a7;
        --bl: #e3f2fd;
        --bb: #90caf9;
        --bt: #1565c0;
        --tx: #1a1a1a;
        --tm: #5f6368;
        --br: #e0e0e0;
        --bg: #f5f5f5;
        --sf: #ffffff;
        --r: 12px;
        --rs: 8px;
      }
      * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
      }
      input[type=text], input[type=number], input[type=date], input[type=time], input[type=email], input[type=tel], input[type=url], input[type=password], select, textarea {
        background: #f8f9f8 !important;
        border: 1px solid #c8d8c8 !important;
      }
      input:focus, select:focus, textarea:focus {
        background: #fff !important;
        border-color: var(--gm) !important;
        outline: none;
      }
      html,
      body {
        height: 100%;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 16px;
        color: var(--tx);
        background: var(--bg);
      }

      #auth-screen {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 500;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: 100vh;
        overflow-y: auto;
        padding: 32px 24px 40px;
        background: var(--gd);
      }
      #auth-screen.visible {
        display: flex;
      }

      #app {
        display: none;
        flex-direction: column;
        height: 100vh;
        max-width: 600px;
        margin: 0 auto;
        background: var(--sf);
      }
      #app.visible {
        display: flex;
      }

      .topbar {
        background: var(--gd);
        color: #fff;
        padding: 8px 12px 8px;
        padding-top: max(8px, env(safe-area-inset-top));
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
      }
      .topbar h1 {
        font-size: 16px;
        font-weight: 700;
        white-space: nowrap;
        letter-spacing: -0.3px;
      }
      .topbar .gname {
        font-size: 12px;
        background: rgba(255, 255, 255, 0.15);
        padding: 3px 10px;
        border-radius: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 130px;
      }
      .topbar .lbtn {
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.7);
        font-size: 13px;
        cursor: pointer;
        padding: 4px 8px;
      }
      .topbar .acct-btn {
        background: none;
        border: 1px solid rgba(255,255,255,0.35);
        color: rgba(255,255,255,0.85);
        font-size: 13px;
        cursor: pointer;
        padding: 3px 10px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        gap: 5px;
        line-height: 1;
      }
      .topbar .acct-btn svg {
        width: 15px; height: 15px;
        stroke: currentColor; stroke-width: 2;
        fill: none; stroke-linecap: round; stroke-linejoin: round;
        flex-shrink: 0;
      }
      #billing-banner {
        display: none;
        background: #7b3800;
        color: #fff;
        font-size: 13px;
        font-weight: 500;
        padding: 9px 16px;
        text-align: center;
        cursor: pointer;
        flex-shrink: 0;
      }
      #billing-banner.visible { display: block; }
      #app { overflow: hidden; }
      .bill-tabs {
        display: flex;
        border-bottom: 1px solid var(--br);
        margin-bottom: 16px;
        flex-shrink: 0;
      }
      .bill-tabs button {
        flex: 1; padding: 10px;
        background: none; border: none;
        border-bottom: 2.5px solid transparent;
        font-size: 14px; font-weight: 500;
        color: var(--tm); cursor: pointer;
        font-family: inherit;
        transition: all 0.15s;
      }
      .bill-tabs button.active { color: var(--gm); border-bottom-color: var(--gm); }
      .bill-panel { display: none; }
      .bill-panel.active { display: block; }
      .sub-stat-card {
        background: var(--gl); border: 1px solid var(--gb);
        border-radius: var(--rs); padding: 14px; margin-bottom: 14px;
      }
      .sub-stat-row { display: flex; justify-content: space-between; align-items: center; }
      .sub-stat-lbl {
        font-size: 11px; font-weight: 700; text-transform: uppercase;
        letter-spacing: .5px; color: var(--tm);
      }
      .spill {
        font-size: 11px; font-weight: 700; padding: 2px 10px;
        border-radius: 20px; text-transform: uppercase; letter-spacing: .4px;
      }
      .spill-active  { background: var(--gm); color: #fff; }
      .spill-trial   { background: #1565c0; color: #fff; }
      .spill-cancel  { background: #e65100; color: #fff; }
      .spill-pastdue { background: #c62828; color: #fff; }
      .spill-none    { background: #e0e0e0; color: #555; }
      #card-el-sub, #card-el-upd {
        padding: 11px 12px;
        border: 1px solid var(--br);
        border-radius: var(--rs);
        background: var(--sf);
        margin-bottom: 10px;
      }
      .berr { font-size: 13px; color: #c62828; margin-bottom: 8px; min-height: 18px; }
      .bok  { font-size: 13px; color: var(--gm); margin-bottom: 8px; min-height: 18px; }
      .bbtn {
        width: 100%; padding: 13px; border: none; border-radius: var(--rs);
        font-size: 15px; font-weight: 700; cursor: pointer;
        font-family: inherit; margin-bottom: 10px; transition: opacity .15s;
      }
      .bbtn:disabled { opacity: .55; cursor: default; }
      .bbtn-primary   { background: var(--gd); color: #fff; }
      .bbtn-secondary { background: var(--gl); color: var(--gm); border: 1px solid var(--gb); }
      .bbtn-danger    { background: #fff3f3; color: #c62828; border: 1px solid #f5c6c6; }
      .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--sf);
        border-top: 1px solid var(--br);
        display: flex;
        z-index: 100;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
      }
      .side-nav { display: none; }
      #more-picker {
        width: 100%;
      }
      #tab-more .vi { padding-bottom: 80px; }
      #tab-more-help.active { overflow-y: auto; }
      #tab-more-help .vi { padding-bottom: 140px; }
      #setup-picker, #tools-picker {
        width: 100%;
      }
      #tab-tools.active { overflow: hidden; }
      #tab-setup.active { overflow-y: auto; }
      #tab-tools .vi { overflow: hidden; padding-bottom: 0; }
      #tab-setup .vi { padding-bottom: 80px; }
      #new-type-picker {
        position: absolute;
        top: 50%;
        left: 24px;
        transform: translateY(-60%);
        width: calc(100% - 48px);
        max-width: 800px;
      }
      #tab-new.active, #tab-fertilizer-picker.active { overflow: hidden; }
      #tab-new .vi { overflow: hidden; padding-bottom: 0; }
      #tab-new.active.scrollable { overflow-y: auto; }
      #tab-new.active.scrollable .vi { overflow: visible; padding-bottom: 100px; }
      .app-body { display: contents; }
      .bottom-nav button {
        flex: 1;
        background: none;
        border: none;
        padding: 12px 4px 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        color: var(--tm);
        cursor: pointer;
        font-family: inherit;
        min-height: 60px;
      }
      .bottom-nav button.active {
        color: var(--gm);
      }
      .bottom-nav button svg {
        width: 26px;
        height: 26px;
        stroke-width: 1.75;
      }
      .nav {
        display: none;
      }
      .nav button {
        flex: 1;
        padding: 12px 0;
        font-size: 13px;
        font-weight: 400;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--tm);
        border-bottom: 2.5px solid transparent;
        transition: all 0.15s;
      }
      .nav button.active {
        color: var(--gm);
        border-bottom-color: var(--gm);
        font-weight: 600;
      }
      .view {
        display: none;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
        overscroll-behavior-y: none;
      }
      .view.active {
        display: block;
      }
      .vi {
        padding: 12px 12px 80px;
      }

      .acard {
        background: #fff;
        border-radius: 16px;
        padding: 16px;
        width: 100%;
        max-width: 360px;
      }
      .atabs {
        display: flex;
        margin-bottom: 20px;
        border: 1px solid var(--br);
        border-radius: var(--rs);
        overflow: hidden;
      }
      .atabs button {
        flex: 1;
        padding: 9px;
        font-size: 13px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--tm);
      }
      .atabs button.active {
        background: var(--gd);
        color: #fff;
        font-weight: 600;
      }
      .af {
        margin-bottom: 8px;
      }
      .af label {
        display: block;
        font-size: 12px;
        color: var(--tm);
        margin-bottom: 4px;
        font-weight: 500;
      }
      .af input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid var(--br);
        border-radius: var(--rs);
        font-size: 15px;
      }
      .asub {
        width: 100%;
        background: var(--gd);
        color: #fff;
        border: none;
        padding: 13px;
        border-radius: var(--rs);
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        margin-top: 4px;
      }
      .aerr {
        color: #c62828;
        font-size: 13px;
        margin-top: 8px;
        text-align: center;
        min-height: 20px;
      }
      #auth-screen h1 {
        color: #fff;
        font-size: 26px;
        font-weight: 700;
        margin-bottom: 6px;
        letter-spacing: -0.5px;
      }
      #auth-screen p {
        color: rgba(255, 255, 255, 0.6);
        font-size: 14px;
        margin-bottom: 32px;
      }

      .app-card {
        background: var(--sf);
        border: 1px solid var(--br);
        border-radius: var(--r);
        margin-bottom: 10px;
        overflow: hidden;
      }
      .ach {
        padding: 10px 14px 8px;
        background: var(--gl);
        border-bottom: 1px solid var(--gb);
        cursor: pointer;
        user-select: none;
      }
      .acht {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 4px;
      }
      .adate {
        font-weight: 700;
        font-size: 15px;
        color: #1b5e20;
      }
      .badge {
        font-size: 11px;
        font-weight: 600;
        padding: 2px 8px;
        border-radius: 20px;
      }
      .bg {
        background: #1b5e20;
        color: #e8f5e9;
      }
      .bb {
        background: #1565c0;
        color: #e3f2fd;
      }
      .ameta {
        font-size: 12px;
        color: #388e3c;
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
      }
      .abody {
        display: grid;
        grid-template-columns: 1fr 1px 1fr;
      }
      .app-card.collapsed .abody,
      .app-card.collapsed .afoot {
        display: none;
      }
      .ach {
        cursor: pointer;
        user-select: none;
      }
      .asum {
        font-size: 12px;
        color: var(--tm);
        margin-top: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .asec {
        padding: 10px 12px;
      }
      .slabel {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--tm);
        margin-bottom: 6px;
      }
      .dvv {
        background: var(--br);
      }
      .ilist {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 4px;
      }
      .ilist li {
        font-size: 13px;
        display: flex;
        align-items: flex-start;
        gap: 7px;
        line-height: 1.4;
      }
      .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        flex-shrink: 0;
        margin-top: 4px;
      }
      .dg {
        background: #43a047;
      }
      .db {
        background: #2196f3;
      }
      .idet {
        font-size: 11px;
        color: var(--tm);
      }
      .afoot {
        border-top: 1px solid var(--br);
        padding: 7px 14px;
        font-size: 12px;
        color: var(--tm);
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
      }
      .delbtn {
        background: none;
        border: none;
        color: #ef5350;
        font-size: 12px;
        cursor: pointer;
        padding: 2px 6px;
      }
      .empty {
        text-align: center;
        padding: 60px 20px;
        color: var(--tm);
      }

      .fsec {
        background: var(--sf);
        border: 1px solid var(--br);
        border-radius: var(--r);
        padding: 14px;
        margin-bottom: 10px;
      }
      .fsec h3 {
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--br);
        color: var(--tm);
        text-transform: uppercase;
        letter-spacing: 0.05em;
      }
      .field {
        margin-bottom: 10px;
      }
      .field:last-child {
        margin-bottom: 0;
      }
      .field label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: var(--tm);
        margin-bottom: 4px;
      }
      .field input,
      .field select,
      .field textarea {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid var(--br);
        border-radius: var(--rs);
        font-size: 15px;
        color: var(--tx);
        background: var(--sf);
        -webkit-appearance: none;
      }
      .field select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 32px;
      }
      .field textarea {
        resize: vertical;
        min-height: 60px;
      }
      .field input:focus,
      .field select:focus,
      .field textarea:focus {
        outline: none;
        border-color: var(--gm);
        box-shadow: 0 0 0 3px rgba(45, 106, 53, 0.1);
      }
      .fr2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
      }
      .fr3 {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
      }

      .info-box {
        background: #f0f7f0;
        border: 1px solid var(--gb);
        border-radius: var(--rs);
        padding: 10px 12px;
        margin-top: 8px;
        font-size: 13px;
        color: #2d6a35;
      }
      .info-box .ib-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 3px;
      }
      .info-box .ib-row:last-child {
        margin-bottom: 0;
      }

      .tlist {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 8px;
      }
      .tag {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        border-radius: 20px;
        padding: 5px 10px;
        font-size: 13px;
      }
      .tg {
        background: var(--gl);
        border: 1px solid var(--gb);
        color: #1b5e20;
      }
      .tb {
        background: var(--bl);
        border: 1px solid var(--bb);
        color: var(--bt);
      }
      .trm {
        cursor: pointer;
        font-size: 16px;
        line-height: 1;
        opacity: 0.6;
        flex-shrink: 0;
      }

      .arow {
        display: flex;
        gap: 6px;
        margin-top: 8px;
      }
      .arow select,
      .arow input {
        flex: 1;
        padding: 9px 10px;
        border: 1px solid var(--br);
        border-radius: var(--rs);
        font-size: 14px;
        color: var(--tx);
        background: var(--sf);
        min-width: 0;
        -webkit-appearance: none;
      }
      .arow select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 8px center;
        padding-right: 24px;
      }
      .arow button {
        padding: 9px 14px;
        background: var(--gl);
        border: 1px solid var(--gb);
        border-radius: var(--rs);
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
        color: var(--gm);
        white-space: nowrap;
        flex-shrink: 0;
      }

      .ac-wrap {
        position: relative;
      }
      .ac-list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border: 1px solid var(--br);
        border-radius: var(--rs);
        z-index: 50;
        max-height: 180px;
        overflow-y: auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      }
      .ac-list.drop-up {
        top: auto;
        bottom: 100%;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
      }
      .ac-item {
        padding: 10px 12px;
        font-size: 14px;
        cursor: pointer;
        border-bottom: 1px solid var(--br);
      }
      .ac-item:last-child {
        border-bottom: none;
      }
      .ac-item:hover {
        background: var(--gl);
      }

      .modal {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1100;
        align-items: flex-end;
        justify-content: center;
      }
      .modal.open {
        display: flex;
      }
      .msheet {
        background: var(--sf);
        border-radius: 16px 16px 0 0;
        padding: 20px;
        width: 100%;
        max-width: 600px;
        max-height: 85vh;
        overflow-y: auto;
      }
      .msheet h3 {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 16px;
      }
      @media (min-width: 600px) {
        .modal {
          align-items: center;
        }
        .msheet {
          border-radius: 16px;
          max-width: 480px;
          width: 90%;
        }
      }
      .macts {
        display: flex;
        gap: 8px;
        margin-top: 16px;
      }
      .bcancel {
        flex: 1;
        padding: 12px;
        border: 1px solid var(--br);
        border-radius: var(--rs);
        background: none;
        cursor: pointer;
        font-size: 15px;
        color: var(--tx);
      }
      .bconfirm {
        flex: 2;
        padding: 12px;
        background: var(--gm);
        color: #fff;
        border: none;
        border-radius: var(--rs);
        cursor: pointer;
        font-size: 15px;
        font-weight: 600;
      }
      .subbtn {
        width: 100%;
        background: var(--gd);
        color: #fff;
        border: none;
        padding: 15px;
        border-radius: var(--rs);
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        letter-spacing: -0.2px;
      }
      .subbtn:active {
        opacity: 0.85;
      }

      .sfarm {
        border: 1px solid var(--br);
        border-radius: var(--rs);
        margin-bottom: 10px;
        overflow: hidden;
      }
      .sfarmh {
        background: var(--gl);
        padding: 10px 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      .sfarmh span {
        font-weight: 700;
        font-size: 14px;
        color: #1b5e20;
      }
      .sfarmh button {
        background: none;
        border: none;
        color: #ef5350;
        font-size: 12px;
        cursor: pointer;
      }
      .sfarmb {
        padding: 10px 12px;
      }
      .sfarm-meta { font-size: 12px; color: var(--tm); margin-left: 8px; font-weight: 400; }
      .bsort-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; color: var(--tm); }
      .bsort-lbl { font-weight: 600; }
      .bsort-seg { display: inline-flex; border: 1px solid var(--gb); border-radius: var(--rs); overflow: hidden; }
      .bsort-btn { background: #fff; border: none; border-right: 1px solid var(--gb); cursor: pointer; font-size: 12px; font-weight: 600; color: var(--tm); padding: 5px 11px; }
      .bsort-btn:last-child { border-right: none; }
      .bsort-btn.on { background: var(--gm); color: #fff; }
      .brow { display: grid; grid-template-columns: minmax(110px,1.4fr) 104px 72px 46px auto; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 0.5px solid #eee; font-size: 13px; }
      .brow:last-child { border-bottom: none; }
      .brow:hover { background: #fafdfb; }
      .brow-child { padding-left: 14px; border-left: 3px solid var(--gm); }
      .brow-name { font-weight: 600; color: var(--tx); min-width: 130px; }
      .brow-acres { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--tx); text-align: right; min-width: 60px; }
      .brow-space { color: var(--tm); font-size: 12px; min-width: 40px; }
      .brow-acts { margin-left: auto; display: flex; align-items: center; gap: 2px; }
      .brow-acts button { background: none; border: none; cursor: pointer; padding: 4px 7px; border-radius: 6px; font-size: 12px; font-weight: 600; }
      .brow-acts button:hover { background: #f1f1f1; }
      .ba-edit { color: var(--bt); } .ba-var { color: var(--gm); } .ba-ret { color: var(--tm); }
      .ba-del { color: #ef5350; font-size: 15px; }
      .ctag { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; justify-self: start; }
      .ctag-apple { background: #fdeaea; color: #c0392b; }
      .ctag-blueberry { background: #e3f2fd; color: #1565c0; }
      .ctag-stone { background: #fff3e0; color: #e65100; }
      .ctag-pear { background: #e0f2f1; color: #00695c; }
      .ctag-grape { background: #f3e5f5; color: #6a1b9a; }
      .ctag-field { background: #efebe9; color: #6d4c41; }
      .ctag-other { background: #f1f1f1; color: var(--tm); }
      @media (max-width: 640px) {
        .brow {
          grid-template-columns: max-content 1fr max-content;
          grid-template-areas: "name name acres" "ctag space acts";
          gap: 6px 10px; padding: 11px 4px;
        }
        .brow-name { grid-area: name; }
        .brow-acres { grid-area: acres; justify-self: end; }
        .ctag { grid-area: ctag; }
        .brow-space { grid-area: space; justify-self: start; align-self: center; }
        .brow-acts { grid-area: acts; justify-self: end; margin-left: 0; opacity: 1; }
      }
      /* retired blocks keep the old compact pill */
      .bchip { display: inline-flex; align-items: center; gap: 5px; background: #f5f5f5; border: 1px solid var(--br); border-radius: 20px; padding: 4px 10px; font-size: 12px; margin: 3px; }
      .bchip button { background: none; border: none; color: var(--gm); cursor: pointer; font-size: 12px; line-height: 1; }

      .mix-bar {
        display: flex;
        gap: 6px;
        margin-bottom: 8px;
        align-items: center;
      }
      .mix-bar select {
        flex: 1;
        min-width: 0;
        padding: 8px 10px;
        border: 1px solid var(--br);
        border-radius: var(--rs);
        font-size: 14px;
        color: var(--tx);
        background: var(--sf);
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 8px center;
        padding-right: 24px;
      }
      .mix-bar button {
        padding: 8px 12px;
        font-size: 13px;
        font-weight: 600;
        border-radius: var(--rs);
        cursor: pointer;
        white-space: nowrap;
        flex-shrink: 0;
      }
      .btn-load {
        background: var(--bl);
        border: 1px solid var(--bb);
        color: var(--bt);
      }
      .btn-save {
        background: var(--gl);
        border: 1px solid var(--gb);
        color: var(--gm);
      }

      .spinner {
        display: inline-block;
        width: 18px;
        height: 18px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top-color: #fff;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
      }
      @keyframes spin {
        to {
          transform: rotate(360deg);
        }
      }
      .loverlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(255, 255, 255, 0.8);
        z-index: 300;
        align-items: center;
        justify-content: center;
      }
      .loverlay.show {
        display: flex;
      }
      .toast {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: #323232;
        color: #fff;
        padding: 10px 20px;
        border-radius: 20px;
        font-size: 14px;
        z-index: 400;
        opacity: 0;
        transition: opacity 0.2s;
        pointer-events: none;
        white-space: nowrap;
      }
      .toast.show {
        opacity: 1;
      }


      .rcard {
        background: var(--sf);
        border: 1px solid var(--br);
        border-radius: 12px;
        padding: 24px;
        max-width: 480px;
        margin: 0 auto;
      }
      #tab-usage .rcard {
        max-width: none;
        margin: 0;
      }

      .app-card {
        transition: transform 0.15s ease, box-shadow 0.15s ease;
      }
      .app-card:hover {
        transform: translateY(-1px);
      }
      #tab-usage .rcard {
        max-width: none;
        margin: 0;
      }
      .rcard h2 {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 4px;
      }
      .rcard p {
        font-size: 13px;
        color: var(--tm);
        margin-bottom: 20px;
        line-height: 1.5;
      }
      .rpresets {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 18px;
      }
      .rpreset {
        padding: 6px 12px;
        background: var(--gl);
        border: 1px solid var(--gb);
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        color: var(--gm);
        cursor: pointer;
        white-space: nowrap;
      }
      .rpreset:hover {
        background: var(--gb);
      }
      .rbtn {
        flex: 1;
        background: var(--gd);
        color: #fff;
        border: none;
        padding: 13px;
        border-radius: var(--rs);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
      }
      .rbtn:hover {
        background: var(--gm);
      }
      .rbtn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
      }
      .rbtn2 {
        background: #1565c0;
      }
      .rbtn2:hover {
        background: #1976d2;
      }
      .rmsg {
        font-size: 13px;
        text-align: center;
        margin-top: 12px;
        color: var(--tm);
        min-height: 18px;
      }
      .rmsg.err {
        color: #c62828;
      }
      @media (min-width: 768px) {
        html, body { font-size: 16px; }

        #app {
          max-width: none;
          flex-direction: column;
          height: 100vh;
          overflow: hidden;
        }

        .app-body {
          display: flex;
          flex-direction: row;
          flex: 1;
          min-height: 0;
          overflow: hidden;
          height: 0;
        }

        .bottom-nav {
          display: none;
        }

        .side-nav {
          display: flex;
          flex-direction: column;
          width: 180px;
          flex-shrink: 0;
          background: var(--gd);
          padding: 12px 8px;
          gap: 2px;
          overflow-y: auto;
        }

        .side-nav button {
          display: flex;
          align-items: center;
          gap: 8px;
          padding: 7px 12px;
          background: none;
          border: none;
          border-radius: 8px;
          color: rgba(255,255,255,0.7);
          font-size: 13px;
          font-family: inherit;
          cursor: pointer;
          text-align: left;
          width: 100%;
          transition: background 0.15s, color 0.15s;
        }

        .side-nav button svg {
          width: 18px;
          height: 18px;
          stroke: currentColor;
          stroke-width: 1.75;
          fill: none;
          stroke-linecap: round;
          stroke-linejoin: round;
          flex-shrink: 0;
        }

        .side-nav button:hover {
          background: rgba(255,255,255,0.1);
          color: #fff;
        }

        .side-nav button.active {
          background: rgba(255,255,255,0.15);
          color: #fff;
          font-weight: 600;
        }

        .side-nav .side-divider {
          height: 1px;
          background: rgba(255,255,255,0.12);
          margin: 6px 4px;
        }

        .side-nav .side-section-label {
          font-size: 10px;
          letter-spacing: 0.1em;
          text-transform: uppercase;
          color: rgba(255,255,255,0.35);
          padding: 8px 14px 4px;
        }

        .nav-popup {
          bottom: auto;
          left: 188px !important;
          transform: none !important;
          top: auto;
        }

        .view {
          flex: 1;
          min-width: 0;
        }
        .view.active {
          display: block;
          overflow-y: auto;
          height: 100%;
        }

        .vi {
          padding: 20px 28px 40px;
          max-width: 800px;
          margin: 0;
        }

        #tab-new .vi {
          display: grid;
          grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
          gap: 16px;
          align-items: start;
          max-width: 800px;
          margin: 0;
        }
        #tab-new .vi .fsec:first-child {
          grid-column: 1 / -1;
        }
        #tab-new .vi .subbtn {
          grid-column: 1 / -1;
        }
        #tab-new .vi #edit-banner {
          grid-column: 1 / -1;
        }
        .abody {
          grid-template-columns: 1fr 1px 2fr;
        }
        .topbar .gname {
          max-width: 200px;
        }
      }

      .nav-popup-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 90;
      }
      .nav-popup-overlay.open {
        display: block;
      }
      .nav-popup {
        position: fixed;
        bottom: calc(76px + max(16px, env(safe-area-inset-bottom)));
        background: var(--sf);
        border: 1px solid var(--br);
        border-radius: 12px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
        z-index: 91;
        min-width: 180px;
        max-width: calc(100vw - 16px);
        overflow: hidden;
      }
      .nav-popup button {
        display: block;
        width: 100%;
        padding: 14px 18px;
        background: none;
        border: none;
        border-bottom: 1px solid var(--br);
        font-size: 15px;
        font-family: inherit;
        color: var(--tx);
        text-align: left;
        cursor: pointer;
      }
      .nav-popup button:last-child {
        border-bottom: none;
      }
      .nav-popup button:active {
        background: var(--gl);
      }


/* Setup badge */
.setup-badge {
  display: inline-block;
  background: #ff6b6b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: middle;
}
.setup-badge.complete {
  background: #51cf66;
}


/* Setup nudge banner */
.setup-nudge-banner {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 16px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.setup-nudge-banner .nudge-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.setup-nudge-banner .nudge-content {
  flex: 1;
}
.setup-nudge-banner .nudge-title {
  font-weight: 600;
  color: #1565c0;
  margin-bottom: 2px;
}
.setup-nudge-banner .nudge-message {
  color: #666;
  font-size: 12px;
}
.setup-nudge-banner .nudge-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.setup-nudge-banner button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.setup-nudge-banner .nudge-action {
  background: #1565c0;
  color: #fff;
}
.setup-nudge-banner .nudge-dismiss {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
}


/* === Grazing visibility (operation_mode = 'grazing') === */
.grazing-only { display: none !important; }
body.mode-grazing .grazing-only { display: flex !important; }

/* ─── Log filter bar (chip-based redesign) ─────────────────────────── */
.lf-bar {
  padding: 8px 12px;
  border-bottom: 1px solid var(--br);
  background: var(--sf);
  position: relative;
}
.lf-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
@media (min-width: 768px) {
  .lf-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .lf-row::-webkit-scrollbar { display: none; }
}
.lf-chips {
  display: contents;
}
.lf-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid var(--br);
  border-radius: 20px;
  font-size: 13px;
  background: var(--sf);
  color: var(--tx);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.lf-pill-date {
  max-width: 180px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6z' fill='%235f6368'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
}
.lf-pill-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lf-pill-filters.has-active {
  background: var(--gl);
  border-color: var(--gb);
  color: var(--gd);
  font-weight: 600;
}
.lf-count {
  background: var(--gm);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.4;
}
.lf-caret { font-size: 10px; color: var(--tm); }
.lf-pill-filters.has-active .lf-caret { color: var(--gd); }
/* .lf-chips replaced above with display: contents */
.lf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--gb);
  border-radius: 20px;
  background: var(--gl);
  color: var(--gd);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.lf-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,.08);
  color: var(--gd);
  font-size: 12px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  padding: 0;
  line-height: 1;
}
.lf-chip-x:hover { background: rgba(0,0,0,.18); }
.lf-chip-rei { border-color: #f5b5b5; background: #fff0f0; color: #c62828; }
.lf-chip-rei .lf-chip-x { color: #c62828; }
.lf-chip-phi { border-color: #f5cc88; background: #fff5e6; color: #e65100; }
.lf-chip-phi .lf-chip-x { color: #e65100; }
.lf-custom-dates {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.lf-custom-dates input {
  flex: 1;
  padding: 5px 10px;
  border: 1px solid var(--br);
  border-radius: 20px;
  font-size: 12px;
  background: var(--sf);
  color: var(--tx);
  font-family: inherit;
}
.lf-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 999;
}
.lf-drawer {
  position: absolute;
  top: 100%;
  left: 8px;
  right: 8px;
  z-index: 1000;
  background: var(--sf);
  border: 1px solid var(--br);
  border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
.lf-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--br);
}
.lf-drawer-clear {
  background: none;
  border: none;
  color: var(--gm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
}
.lf-drawer-body {
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--tm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.lf-field select {
  padding: 9px 10px;
  border: 1px solid var(--br);
  border-radius: var(--rs);
  font-size: 14px;
  background: var(--sf);
  color: var(--tx);
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.lf-toggles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.lf-toggle {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: var(--rs);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: var(--sf);
}
.lf-toggle-rei { border: 1px solid #c62828; color: #c62828; }
.lf-toggle-rei.active { background: #c62828; color: #fff; }
.lf-toggle-phi { border: 1px solid #e65100; color: #e65100; }
.lf-toggle-phi.active { background: #e65100; color: #fff; }
.lf-drawer-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--br);
}
.lf-drawer-done {
  width: 100%;
  padding: 10px;
  background: var(--gd);
  color: #fff;
  border: none;
  border-radius: var(--rs);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* Info hint primitive: clickable ⓘ icon next to a label that toggles
   an inline hint block. Hint content lives in a sibling .hint-content
   element referenced by data-target. See showHint() in app.js. */
.info-hint {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--tm, #777);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 16px;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
  transition: background 0.15s;
  font-family: serif;
  font-style: italic;
}
.info-hint::before { content: "i"; }
.info-hint:hover, .info-hint.active { background: var(--gm, #2e7d32); }
.hint-content {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--gl, #f0f6f0);
  border-left: 3px solid var(--gm, #2e7d32);
  border-radius: 4px;
  font-size: 12px;
  color: var(--tx, #333);
  line-height: 1.45;
}
.hint-content[hidden] { display: none; }
.hint-content a { color: var(--gm, #2e7d32); font-weight: 600; }

/* Field highlight pulse — used when deep-linking to a specific field
   (e.g. "Add strip width" link from the log card warning). */
@keyframes fieldPulse {
  0%   { box-shadow: 0 0 0 0 rgba(178, 106, 0, 0.0); border-color: var(--gb, #c8e0c8); }
  20%  { box-shadow: 0 0 0 4px rgba(178, 106, 0, 0.25); border-color: #b26a00; }
  100% { box-shadow: 0 0 0 0 rgba(178, 106, 0, 0.0); border-color: var(--gb, #c8e0c8); }
}
.field-pulse {
  animation: fieldPulse 1.4s ease-out infinite;
  border-color: #b26a00 !important;
}

/* ===== Shared editable product-chip list (Phase 1) ===== */
#pest-tags { display:flex; flex-direction:column; gap:6px; align-items:flex-start; }
#pest-tags .pl-chip { max-width: 100%; }
#config-products-list { display:flex; flex-wrap:wrap; gap:6px; }
.pl-chip { display:inline-flex; flex-wrap:wrap; align-items:center;
  gap:4px 8px;     /* 4px row-gap when content wraps, 8px column-gap */
  max-width:100%;
  background:var(--bl); border:1px solid var(--bb); color:var(--bt);
  border-radius:14px; padding:6px 12px; font-size:13px; }
.pl-chip-name { font-weight:600; white-space:nowrap; }
.pl-chip-rate { opacity:.75; cursor:pointer; padding-bottom:1px;
  /* No nowrap -- allow rate+cause text to break to a new line when narrow. */
  word-break: break-word; }
.pl-chip-rate:hover { opacity:1; }
.pl-chip-rm { cursor:pointer; font-size:16px; line-height:1; opacity:.6; flex-shrink:0; }
.pl-chip-rm:hover { opacity:1; }
.pl-basis { font-size:11px; font-weight:600; padding:2px 6px; border-radius:4px;
  border:1px solid var(--gb); background:var(--gm); color:#fff; cursor:pointer; white-space:nowrap; }
.pl-editing { background:#fff; border-color:var(--gb); }
.pl-rate-in { width:58px; padding:3px 6px; border:1px solid var(--br); border-radius:6px; font-size:13px; }
.pl-unit-in { padding:3px 4px; border:1px solid var(--br); border-radius:6px; font-size:12px;
  background:var(--sf); -webkit-appearance:none; }
.pl-ok { background:var(--gm); color:#fff; border:none; border-radius:6px; padding:3px 8px; font-size:13px; cursor:pointer; }

/* Customize Products: stack chips instead of wrapping (cleaner inline edit) */
#config-products-list { flex-direction:column; align-items:stretch; }
#config-products-list .pl-chip { justify-content:flex-start; }


/* === Shared product modal integration: legacy form additions === */

/* New "Add product" button (replaces inline search + Add buttons) */
.btn-add-product {
  width: 100%;
  padding: 11px 16px;
  background: var(--gm);
  color: #fff;
  border: none;
  border-radius: var(--rs);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.btn-add-product:hover { filter: brightness(1.08); }

/* Pesticide chips become clickable for editing via the modal */
.pl-chip-clickable { cursor: pointer; }
.pl-chip-clickable:hover { filter: brightness(0.97); }
.pl-chip-clickable .pl-chip-rate { cursor: pointer; }


/* Hide the in-page wizard/legacy toggle (Settings tab toggle remains). */
#spray-tile-switch-label, #spray-tile-switch-link {
  display: none !important;
}


/* Block Coloring toggle (Settings) — self-contained, no wizard.js dependency */
#pref-block-color {
  display: flex; gap: 0; border: 1px solid var(--gb);
  border-radius: var(--rs); overflow: hidden;
}
#pref-block-color .pref-mode-btn {
  flex: 1; padding: 10px 12px; font-size: 14px; font-family: inherit;
  font-weight: 600; background: #fff; color: var(--tm); border: none;
  border-right: 1px solid var(--gb); cursor: pointer;
}
#pref-block-color .pref-mode-btn:last-child { border-right: none; }
#pref-block-color .pref-mode-btn:hover { background: var(--gl); }
#pref-block-color .pref-mode-btn.active { background: var(--gm); color: #fff; }


      /* ── Log card rebuild (v2) ─────────────────────────────────────────── */
      .app-card .lc-head { padding:12px 16px; display:flex; align-items:flex-start; justify-content:space-between; gap:10px; cursor:pointer; user-select:none; }
      .app-card:not(.collapsed) .lc-head { border-bottom:1px solid var(--br); }
      .app-card .lc-main { min-width:0; flex:1; }
      .app-card .lc-d { font-size:16px; font-weight:700; }
      .app-card .lc-meta { font-size:12.5px; color:var(--tm); margin-top:4px; line-height:1.5; }
      .app-card .lc-summ { font-size:12.5px; color:var(--tm); margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
      .app-card .lc-summ b { color:var(--tx); font-weight:600; }
      .app-card .lc-restrip { font-size:11.5px; color:#c62828; font-weight:600; margin-top:4px; }
      .app-card .lc-restrip.ok { color:#4e7a48; }
      .app-card .lc-hicons { display:flex; align-items:center; gap:9px; flex:0 0 auto; }
      .app-card .lc-dot { width:9px; height:9px; border-radius:50%; display:inline-block; }
      .app-card .lc-rail { display:flex; gap:18px; flex-wrap:wrap; padding:9px 16px; border-bottom:1px solid var(--br); font-size:12.5px; }
      .app-card .lc-rail .re { color:#c62828; font-weight:600; }
      .app-card .lc-rail .hv { color:var(--tm); }
      .app-card .lc-body { padding:13px 16px; background:var(--sf); }
      .app-card .lc-cols { display:grid; grid-template-columns:1fr 1fr; gap:22px; }
      .app-card .lc-cols .lc-colr { border-left:1px solid var(--br); padding-left:22px; }
      .app-card .lc-sec { font-size:11px; font-weight:700; color:#93a096; letter-spacing:.05em; text-transform:uppercase; }
      .app-card .lc-sechead { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:8px; gap:8px; }
      .app-card .lc-sechead .tot { font-size:12px; color:var(--tm); font-weight:400; }
      .app-card .lc-sechead .tot b { color:var(--tx); font-weight:700; }
      .app-card .lc-farmhdr { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#888; margin:8px 0 4px; }
      .app-card .lc-blocks { display:flex; flex-direction:column; gap:8px; }
      .app-card .lc-blkwrap { display:flex; flex-direction:column; }
      .app-card .lc-blk { display:flex; align-items:center; gap:10px; font-size:13.5px; }
      .app-card .lc-blk .bn { flex:1; min-width:0; }
      .app-card .lc-blk .bn b { font-weight:700; }
      .app-card .lc-blk .bn .sub { color:var(--tm); }
      .app-card .lc-blk .ac { font-size:12px; color:#bf6010; white-space:nowrap; }
      .app-card .lc-rowlink { font-size:12px; color:#0b7a8a; text-decoration:none; white-space:nowrap; font-weight:600; }
      .app-card .lc-prods { display:flex; flex-direction:column; gap:9px; }
      .app-card .lc-prod .pmain { display:flex; align-items:baseline; gap:10px; font-size:13.5px; }
      .app-card .lc-prod .pn { flex:1; min-width:0; }
      .app-card .lc-prod .pn b { font-weight:700; }
      .app-card .lc-prod .pn .ai { color:var(--tm); }
      .app-card .lc-prod .pn .epa { color:#93a096; font-variant-numeric:tabular-nums; }
      .app-card .lc-prod .rate { font-size:13px; font-weight:700; white-space:nowrap; }
      .app-card .lc-prod .rei { font-size:11.5px; color:#93a096; white-space:nowrap; }
      .app-card .lc-foot { display:flex; gap:8px; align-items:center; padding:9px 16px; border-top:1px solid var(--br); background:#fafbfa; }
      .app-card .lc-foot button { font:inherit; font-size:13px; padding:6px 13px; border:1px solid var(--br); background:var(--sf); border-radius:8px; cursor:pointer; color:#1b5e20; }
      .app-card .lc-foot button.del { color:#c62828; margin-left:auto; }
      .app-card.collapsed .lc-expanded { display:none; }
      .app-card:not(.collapsed) .lc-collapsed { display:none; }
      .app-card.lc-alert { border-width:2px; }
      @media (max-width:640px) {
        .app-card .lc-cols { grid-template-columns:1fr; gap:16px; }
        .app-card .lc-cols .lc-colr { border-left:none; padding-left:0; border-top:1px solid var(--br); padding-top:14px; }
        .app-card .lc-summ { white-space:normal; }
        .app-card .lc-blk { flex-wrap:wrap; gap:4px 8px; }
        .app-card .lc-blk .bn { flex:1 1 100%; }
      }



      /* Log feed width — match approved card mockup (760px) */
      #log-list { max-width: 760px; }



      /* Log card tune v3 — widen feed, compact rows, bound block width */
      #log-list { max-width: 960px; }
      .app-card .lc-cols { gap: 18px; }
      .app-card .lc-cols .lc-colr { padding-left: 18px; }
      .app-card .lc-blk { max-width: 460px; }
      .app-card .lc-blocks { gap: 6px; }
      .app-card .lc-prods { gap: 7px; }
      .app-card .lc-prod .pmain { line-height: 1.3; }



      /* Log card bullets v4 — green block dots, blue product dots, old product text */
      .app-card .lc-blk { gap: 8px; }
      .app-card .lc-bdot { width:6px; height:6px; border-radius:50%; background:#43a047; flex-shrink:0; }
      .app-card .lc-plist { list-style:none; display:flex; flex-direction:column; gap:9px; margin:0; padding:0; }
      .app-card .lc-pli { display:flex; align-items:flex-start; gap:8px; font-size:13.5px; line-height:1.4; }
      .app-card .lc-pdot { width:6px; height:6px; border-radius:50%; background:#2196f3; flex-shrink:0; margin-top:6px; }
      .app-card .lc-pbody { min-width:0; }
      .app-card .lc-prate { font-size:12.5px; color:var(--tm); }
      .app-card .lc-psub { font-size:11px; color:#888; margin-top:1px; }



      /* Log card align v5 — right-align product rates + two-column totals */
      .app-card .lc-pli { align-items: flex-start; }
      .app-card .lc-pbody { flex: 1; min-width: 0; }
      .app-card .lc-prate { font-size: 12.5px; color: var(--tm); white-space: nowrap; flex-shrink: 0; margin-left: 8px; }
      .app-card .lc-tot { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--tm); }
      .app-card .lc-tot-v { white-space: nowrap; text-align: right; flex-shrink: 0; }



      /* Log card mobile v6 — keep block rows single-line (acres inline-right, no wrap) */
      @media (max-width: 640px) {
        .app-card .lc-blk { flex-wrap: nowrap; gap: 8px; }
        .app-card .lc-blk .bn { flex: 1 1 auto; }
        .app-card .lc-blk .ac { flex-shrink: 0; }
      }



      /* Log card compact v7 — tighten vertical rhythm, no data removed */
      .app-card .lc-body { padding: 11px 15px; }
      .app-card .lc-rail { padding: 7px 16px; }
      .app-card .lc-blocks { gap: 5px; }
      .app-card .lc-plist { gap: 7px; }
      .app-card .lc-pli { line-height: 1.3; }
      .app-card .lc-psub { margin-top: 0; }
      .app-card .lc-tot { line-height: 1.35; }
      @media (max-width: 640px) {
        .app-card .lc-cols { gap: 12px; }
        .app-card .lc-plist { gap: 6px; }
        .app-card .lc-meta { line-height: 1.4; }
      }



      /* Log card rail v8 — keep rail items whole (stack cleanly, no mid-phrase wrap) */
      .app-card .lc-rail .re, .app-card .lc-rail .hv { white-space: nowrap; }
      @media (max-width: 640px) { .app-card .lc-rail { gap: 4px 14px; } }

