
    :root {
      --ink: #111111;
      --text: #111111;
      --muted: #6B6258;
      --line: #E7DCCB;
      --bg: #FBF6EE;
      --white: #ffffff;
      --amber: #E39B2B;
      --amber-down: #c8881e;
      --navy: #111111;
      --safe-bottom: env(safe-area-inset-bottom, 0px);
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: "Inter Tight", Inter, "Segoe UI", system-ui, sans-serif;
      font-size: 16px;
      background: var(--bg);
      color: var(--text);
      min-height: 100dvh;
      line-height: 1.5;
      -webkit-tap-highlight-color: transparent;
    }
    .wrap { max-width: none; width: 100%; margin: 0; padding-bottom: calc(36px + var(--safe-bottom)); }
    main { max-width: 1100px; margin-left: auto; margin-right: auto; }
    header {
      background: var(--white);
      color: var(--ink);
      padding: 12px 16px;
      border-bottom: 1px solid var(--line);
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px 16px;
    }
    .brand { display: flex; align-items: center; }
    .switches { display: flex; border: 1px solid var(--ink); }
    .switch {
      appearance: none;
      border: none;
      border-right: 1px solid var(--ink);
      background: var(--white);
      color: var(--ink);
      font-family: inherit;
      font-size: 0.9375rem;
      font-weight: 600;
      min-height: 44px;
      padding: 8px 14px;
      border-radius: 0;
      cursor: pointer;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .switch:last-child { border-right: none; }
    .switch.active, .switch.on { background: var(--ink); color: var(--white); }
    .head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
    #search { font-size: 1.25rem; min-height: 56px; }
    header .logo-full { height: 40px; width: auto; display: block; }
    header .logo-small { height: 28px; width: auto; display: none; }
    @media (max-width: 420px) {
      header .logo-full { display: none; }
      header .logo-small { display: block; }
    }
        .ghost {
      appearance: none;
      border: 1px solid var(--ink);
      background: var(--white);
      color: var(--ink);
      font-family: inherit;
      font-size: 0.875rem;
      font-weight: 600;
      line-height: 1.2;
      min-height: 36px;
      padding: 6px 12px;
      border-radius: 0;
      cursor: pointer;
    }
    .ghost:hover { background: var(--bg); }
    a.ghost { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
    .ghost.solid { background: var(--ink); color: var(--white); border-color: var(--ink); }
    .ghost.solid:hover { background: #333333; }
    .who { font-size: 0.875rem; color: var(--ink); }
    main { padding: 16px 16px 0; }
    .panel {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 0;
      padding: 20px 16px;
      margin-bottom: 12px;
    }
    #loginScreen h2,
    .dlg h2,
    .empty h2 {
      color: var(--ink);
      font-size: 1.25rem;
      font-weight: 600;
      letter-spacing: 0;
      line-height: 1.3;
    }
    #loginScreen h2 { margin-bottom: 8px; }
    .login-note { font-size: 0.9375rem; color: #333333; margin: 0; }
    #loginScreen .login-note + .seg,
    #loginScreen .seg,
    #loginScreen form,
    #loginScreen #browseBtn,
    #loginScreen #backBrowse,
    #loginScreen .login-note,
    #loginScreen .acct-block,
    #loginScreen .role-list { margin-top: 16px; }
    #loginScreen h2 + .login-note { margin-top: 0; }
    .seg { display: flex; gap: 8px; }
    .seg button { flex: 1; }
    #authForm { display: flex; flex-direction: column; gap: 0; }
    #authForm label.field { margin-bottom: 6px; }
    #authForm input { margin: 0 0 12px; }
    #authForm #authErr { margin: 0 0 12px; }
    #authForm #authSubmit { margin: 4px 0 0; }
    #nameWrap { margin: 0; }
    .tabs {
      display: flex;
      gap: 0;
      margin-bottom: 12px;
      border: 1px solid var(--ink);
    }
    .tabs button {
      flex: 1;
      appearance: none;
      border: none;
      border-right: 1px solid var(--ink);
      background: var(--white);
      color: var(--ink);
      font-family: inherit;
      font-size: 0.9375rem;
      font-weight: 600;
      min-height: 44px;
      padding: 10px 8px;
      border-radius: 0;
      cursor: pointer;
    }
    .tabs button:last-child { border-right: none; }
    .tabs button.active { background: var(--ink); color: var(--white); }
    .tabs button:hover { background: var(--bg); }
    .tabs button.active:hover { background: #333333; color: var(--white); }
    label.field,
    .site-label,
    .k {
      display: block;
      font-size: 0.875rem;
      font-weight: 600;
      letter-spacing: 0;
      text-transform: none;
      color: var(--ink);
      margin-bottom: 6px;
    }
    .site-label { margin-top: 16px; margin-bottom: 8px; }
    .facts .k,
    .k {
      font-size: 0.8125rem;
      font-weight: 600;
      color: var(--muted);
      margin-bottom: 2px;
    }
    .search-wrap { position: relative; }
    input[type="search"],
    input[type="text"],
    input[type="date"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    input[type="number"] {
      width: 100%;
      appearance: none;
      border: 1px solid #E0D5C6;
      background: var(--white);
      color: var(--text);
      font-family: inherit;
      font-size: 1rem;
      line-height: 1.4;
      min-height: 44px;
      padding: 10px 12px;
      border-radius: 0;
      outline: none;
    }
    input[type="search"] { padding-right: 44px; }
    input:focus { border-color: var(--ink); }
    input::placeholder { color: #8C8174; opacity: 1; }
    .clear-btn {
      position: absolute;
      right: 6px;
      top: 50%;
      transform: translateY(-50%);
      appearance: none;
      border: none;
      background: transparent;
      color: var(--ink);
      width: 32px;
      height: 32px;
      border-radius: 0;
      cursor: pointer;
      font-size: 1.25rem;
      line-height: 1;
      display: none;
      align-items: center;
      justify-content: center;
    }
    .clear-btn.visible { display: flex; }
    .meta {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      font-size: 0.875rem;
      margin: 14px 0 0;
      color: var(--muted);
    }
    .meta strong { color: var(--ink); font-weight: 600; }
    .card {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 0;
      padding: 16px;
      margin-bottom: 12px;
      cursor: default;
    }
    .card:hover { border-color: var(--ink); }
    .card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
    .card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
    .quick-add { min-height: 44px; min-width: 44px; padding: 10px 14px; border: 0; border-radius: 10px; background: #1f589f; color: #fff; font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; white-space: nowrap; touch-action: manipulation; }
    .quick-add:hover { background: #2770ca; }
    .quick-add.done { background: #1e7d46; }
    .name { font-size: 1rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; }
    .pn {
      margin-top: 2px;
      font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
      font-size: 0.875rem;
      color: var(--ink);
      font-weight: 500;
    }
    .tag {
      flex-shrink: 0;
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: none;
      letter-spacing: 0;
      background: var(--bg);
      color: var(--ink);
      border: 1px solid var(--line);
      padding: 4px 8px;
      border-radius: 0;
    }
    .tag.warn,
    .tag.mock { background: var(--white); border-color: var(--ink); color: var(--ink); }
    .facts {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px 16px;
      margin-top: 14px;
      font-size: 0.9375rem;
    }
    .facts.brief { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .missing { color: var(--muted); font-style: normal; }
    .detail {
      display: grid;
      grid-template-rows: 0fr;
      margin-top: 0;
      padding-top: 0;
      border-top: 1px solid transparent;
      font-size: 0.9375rem;
      transition: grid-template-rows 0.45s ease, margin-top 0.45s ease, padding-top 0.45s ease, border-color 0.45s ease;
    }
    .detail-inner { overflow: hidden; min-height: 0; }
    .card:hover .detail {
      grid-template-rows: 1fr;
      margin-top: 14px;
      padding-top: 14px;
      border-top-color: var(--line);
    }
    .detail .btn { margin-top: 16px; }
    .detail p { margin-top: 12px; }
    .hint { margin-top: 10px; font-size: 0.8125rem; text-align: left; color: var(--muted); }
    .empty { text-align: left; padding: 8px 0; }
    .empty h2 { font-size: 1rem; margin-bottom: 6px; }
    .empty p { font-size: 0.9375rem; color: #333333; }
    .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .form-grid .span2 { grid-column: 1 / -1; }
    .btn {
      appearance: none;
      border: 1px solid var(--amber);
      background: var(--amber);
      color: #111111;
      font-family: inherit;
      font-size: 1rem;
      font-weight: 600;
      line-height: 1.2;
      min-height: 44px;
      padding: 12px 14px;
      border-radius: 0;
      cursor: pointer;
      width: 100%;
    }
    .btn:hover { background: var(--amber-down); border-color: var(--amber-down); }
    .btn.secondary {
      background: var(--white);
      color: var(--ink);
      border: 1px solid var(--ink);
    }
    .btn.secondary:hover { background: var(--bg); color: var(--ink); }
    .seg .btn {
      background: var(--ink);
      color: var(--white);
      border-color: var(--ink);
    }
    .seg .btn.secondary {
      background: var(--white);
      color: var(--ink);
      border-color: var(--ink);
    }
    .seg .btn:hover { background: #333333; border-color: #333333; color: var(--white); }
    .seg .btn.secondary:hover { background: var(--bg); color: var(--ink); border-color: var(--ink); }
    .check {
      display: flex;
      gap: 10px;
      align-items: flex-start;
      font-size: 0.9375rem;
      margin: 14px 0;
    }
    .check input { width: 18px; height: 18px; margin-top: 3px; accent-color: #111111; flex: none; }
    .total-bar {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 12px;
      background: var(--white);
      color: var(--ink);
      border: 1px solid var(--ink);
      border-radius: 0;
      padding: 16px;
      margin: 0 0 12px;
    }
    .total-bar > div:last-child { text-align: right; }
    .total-bar .amt { font-size: 1.35rem; font-weight: 600; color: var(--ink); }
    .total-bar .sub { font-size: 0.8125rem; color: var(--muted); margin-top: 2px; }
    .bill-card { cursor: default; }
    .rules { font-size: 0.9375rem; }
    .rules > strong { display: block; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
    .rules li, .help-list li { margin: 8px 0 8px 1.15em; }
    .acct-block { margin-top: 20px; }
    .demo-acct {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      padding: 12px 0;
      border-top: 1px solid var(--line);
      font-size: 0.9375rem;
    }
    .mini {
      appearance: none;
      border: 1px solid var(--ink);
      background: var(--white);
      color: var(--ink);
      font-family: inherit;
      font-size: 0.875rem;
      font-weight: 600;
      border-radius: 0;
      min-height: 36px;
      padding: 6px 12px;
      cursor: pointer;
      flex: none;
    }
    .mini:hover { background: var(--bg); }
    .err { color: #b00020; font-size: 0.9375rem; font-weight: 600; margin: 0 0 8px; }
    .order-notice { border: 2px solid var(--ink); padding: 12px 14px; margin: 0 0 12px; background: var(--white); }
    .order-notice strong { display: block; margin-bottom: 4px; }
    .site-row { display: flex; flex-wrap: wrap; gap: 8px; }
    .site-btn {
      appearance: none;
      border: 1px solid var(--ink);
      background: var(--white);
      color: var(--ink);
      font-family: inherit;
      font-size: 0.875rem;
      font-weight: 600;
      min-height: 36px;
      padding: 6px 12px;
      border-radius: 0;
      cursor: pointer;
    }
    .site-btn.active { background: var(--ink); color: var(--white); }
    .site-btn:hover { background: var(--bg); }
    .site-btn.active:hover { background: #333333; color: var(--white); }
    .site-btn { position: relative; }
    .site-btn[data-tip]:hover::after,
    .site-btn[data-tip]:focus-visible::after {
      content: attr(data-tip);
      position: absolute;
      left: 0;
      bottom: calc(100% + 6px);
      z-index: 9;
      background: var(--ink);
      color: var(--white);
      font-size: 0.75rem;
      font-weight: 600;
      line-height: 1.3;
      padding: 6px 8px;
      white-space: nowrap;
      pointer-events: none;
    }

    .seek {
      width: min(560px, 100%);
      margin: 0 auto;
    }
    .seek input[type="search"] {
      width: 100%;
      min-height: 56px;
      font-size: 1.125rem;
      background: #fff;
      border: 1px solid #E0D5C6;
      border-bottom: 2px solid #111111;
      border-radius: 0;
      box-shadow: none;
      padding-right: 12px;
    }
    details summary {
      cursor: pointer;
      font-weight: 600;
      color: var(--ink);
      font-size: 0.9375rem;
    }
    details p, details li { font-size: 0.9375rem; margin-top: 8px; }
    details ul { margin-left: 1.15em; }
    .role-list { font-size: 0.9375rem; color: #222222; margin: 16px 0 0; padding-left: 1.15em; }
    .role-list li { margin: 6px 0; }
    footer {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 16px;
      justify-content: center;
      align-items: center;
      font-size: 0.75rem;
      color: #6B6258;
      padding: 14px 16px 18px;
      border-top: 1px solid #E7DCCB;
    }
    footer .fn { color: #222; font-weight: 600; }
    footer a { color: #222; }
    dialog {
      border: 1px solid var(--ink);
      border-radius: 0;
      padding: 0;
      width: min(520px, calc(100% - 32px));
      max-height: min(90dvh, 760px);
      background: var(--white);
      color: var(--text);
      box-shadow: none;
    }
    dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
    .dlg { padding: 20px 16px; overflow: auto; max-height: min(90dvh, 760px); }
    .dlg h2 { font-size: 1.15rem; }
    .dlg .sub { font-size: 0.9375rem; margin: 6px 0 16px; color: #333333; }
    .dlg-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
    .x {
      appearance: none;
      border: 1px solid var(--ink);
      background: var(--white);
      color: var(--ink);
      width: 36px;
      height: 36px;
      border-radius: 0;
      cursor: pointer;
      font-size: 1.1rem;
      font-weight: 600;
      line-height: 1;
      flex: none;
    }
    .x:hover { background: var(--bg); }
    .callout {
      background: var(--bg);
      border: 1px solid var(--line);
      border-radius: 0;
      padding: 12px;
      font-size: 0.875rem;
      margin: 12px 0;
    }
    .order-line {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      padding: 12px 0;
      border-top: 1px solid var(--line);
      font-size: 0.9375rem;
    }
    .qty {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-top: 8px;
    }
    .qty button {
      width: 36px;
      height: 36px;
      border-radius: 0;
      border: 1px solid var(--ink);
      background: var(--white);
      color: var(--ink);
      font-family: inherit;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
    }
    .qty button:hover { background: var(--bg); }
    .request-block {
      background: var(--bg);
      border: 1px solid var(--line);
      border-radius: 0;
      padding: 12px;
      margin-top: 12px;
    }
    .help-list { margin: 0; padding-left: 1.15em; font-size: 0.9375rem; }
    button:focus-visible,
    input:focus-visible,
    summary:focus-visible {
      outline: 2px solid #111111;
      outline-offset: 2px;
    }
    @media (max-width: 420px) {
      .facts, .facts.brief { grid-template-columns: 1fr; }
      .form-grid { grid-template-columns: 1fr; }
      .form-grid .span2 { grid-column: auto; }
    }


    #viewParts {
      min-height: calc(100dvh - 120px);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 24px 16px 88px;
    }
    #viewParts.has-results {
      justify-content: flex-start;
      padding-top: 10vh;
    }
    #viewParts #results,
    #viewParts .meta { width: 100%; }
    #viewParts > section.panel { display: none; }

    .barry {
      position: fixed;
      right: 16px;
      bottom: 16px;
      z-index: 30;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 8px;
    }
    .barry-btn {
      width: 64px;
      height: 64px;
      padding: 0;
      border-radius: 50%;
      border: 2px solid #111111;
      background: #ffffff;
      overflow: hidden;
      cursor: pointer;
      box-shadow: none;
    }
    .barry-btn img,
    .barry-head img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .barry-panel {
      display: none;
      width: min(320px, calc(100vw - 32px));
      max-height: min(420px, calc(100dvh - 110px));
      background: #ffffff;
      border: 1px solid #E7DCCB;
      border-radius: 16px;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
      flex-direction: column;
      overflow: hidden;
    }
    .barry.open .barry-panel { display: flex; }
    .barry-head {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      border-bottom: 1px solid #E7DCCB;
      font-weight: 600;
    }
    .barry-head img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
    .barry-head span { flex: 1; }
    .barry-x {
      appearance: none;
      width: 32px;
      height: 32px;
      border: 1px solid #111111;
      background: #ffffff;
      color: #111111;
      border-radius: 0;
      cursor: pointer;
      font-size: 1.1rem;
      font-weight: 600;
      line-height: 1;
    }
    .barry-log {
      overflow: auto;
      padding: 10px 12px;
      font-size: 0.875rem;
      line-height: 1.4;
      min-height: 72px;
    }
    .barry-log p { margin: 0 0 8px; white-space: pre-wrap; }
    .barry-log .me { color: #6B6258; }
    .barry-form { display: flex; border-top: 1px solid #E7DCCB; }
    .barry-form input { border: none; border-radius: 0; min-height: 44px; box-shadow: none; }
    .barry-form input:focus { outline: none; }

    .btn,
    .ghost,
    .mini,
    .site-btn,
    .x,
    .qty button {
      box-shadow: 0 1px 2px rgba(17, 17, 17, 0.08);
      transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    }
    .btn:hover,
    .ghost:hover,
    .mini:hover,
    .site-btn:hover,
    .x:hover,
    .qty button:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 14px rgba(17, 17, 17, 0.1);
    }
    .btn.secondary,
    .seg .btn,
    .ghost,
    .mini,
    .site-btn,
    .x,
    .qty button {
      background-color: var(--white);
      border-color: var(--ink);
    }
    .seg .btn:not(.secondary),
    .ghost.solid {
      background-color: var(--ink);
      color: var(--white);
      border-color: var(--ink);
    }
    .btn:not(.secondary) {
      background-color: #E39B2B;
      border-color: #E39B2B;
      color: #111111;
    }
    .seg .btn:not(.secondary) {
      background-color: var(--ink);
      border-color: var(--ink);
      color: var(--white);
    }
    .btn:not(.secondary):hover {
      background-color: var(--amber-down);
      border-color: var(--amber-down);
    }
    .seg .btn:not(.secondary):hover,
    .ghost.solid:hover {
      background-color: #333333;
      border-color: #333333;
      color: var(--white);
    }
    button:disabled,
    button:disabled:hover {
      transform: none;
      box-shadow: none;
    }

.seg{display:flex;gap:8px}
#loginScreen{max-width:520px;margin:24px auto;padding:0 16px}
select{width:100%;padding:10px;margin:0 0 12px;font:inherit}
.err.ok{color:#1d6b2f}
