:root {
      --bg: #f6efe4;
      --panel: #fffdf9;
      --line: rgba(30, 37, 42, 0.12);
      --text: #182126;
      --muted: #62707a;
      --accent: #0f6a58;
      --accent-soft: #dff1eb;
      --warn: #8a5218;
      --warn-soft: #f7e7cf;
      --danger: #8e3030;
      --danger-soft: #f8ddda;
      --shadow: 0 16px 40px rgba(24, 33, 38, 0.08);
      --radius: 24px;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      color: var(--text);
      font-family: Bahnschrift, "Segoe UI", sans-serif;
      background:
        radial-gradient(circle at top left, rgba(15, 106, 88, 0.12), transparent 30%),
        radial-gradient(circle at top right, rgba(138, 82, 24, 0.12), transparent 28%),
        linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
    }

    .shell {
      width: min(1200px, calc(100vw - 28px));
      margin: 18px auto 40px;
    }

    .toast-host {
      position: fixed;
      top: 18px;
      left: 50%;
      transform: translateX(-50%);
      width: min(960px, calc(100vw - 24px));
      display: grid;
      gap: 10px;
      z-index: 1200;
      pointer-events: none;
    }

    .toast {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 16px 18px;
      border: 1px solid rgba(30, 37, 42, 0.12);
      border-radius: 22px;
      background:
        linear-gradient(135deg, rgba(223, 241, 235, 0.92), rgba(255, 253, 249, 0.98) 42%),
        rgba(255, 253, 249, 0.98);
      box-shadow: 0 18px 38px rgba(24, 33, 38, 0.12);
      color: var(--accent);
      opacity: 0;
      transform: translateY(-16px) scale(0.98);
      transition: opacity 220ms ease, transform 220ms ease, box-shadow 220ms ease;
      pointer-events: auto;
      overflow: hidden;
      backdrop-filter: blur(12px);
    }

    .toast.visible {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    .toast.hiding {
      opacity: 0;
      transform: translateY(-10px) scale(0.985);
    }

    .toast.warn {
      background:
        linear-gradient(135deg, rgba(247, 231, 207, 0.96), rgba(255, 253, 249, 0.98) 42%),
        rgba(255, 253, 249, 0.98);
      color: var(--warn);
    }

    .toast.error {
      background:
        linear-gradient(135deg, rgba(248, 221, 218, 0.96), rgba(255, 253, 249, 0.98) 42%),
        rgba(255, 253, 249, 0.98);
      color: var(--danger);
    }

    .toast::before {
      content: "";
      position: absolute;
      inset: 0 auto 0 0;
      width: 5px;
      background: currentColor;
      opacity: 0.85;
    }

    .toast::after {
      content: "";
      position: absolute;
      inset: auto 0 0 0;
      height: 2px;
      background: linear-gradient(90deg, currentColor, transparent 85%);
      opacity: 0.22;
    }

    .toast-message {
      flex: 1 1 auto;
      font-weight: 700;
      line-height: 1.45;
    }

    .toast-close {
      flex: 0 0 auto;
      padding: 8px 12px;
      border-radius: 999px;
      border: 0;
      background: rgba(24, 33, 38, 0.08);
      color: inherit;
      font: inherit;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      cursor: pointer;
      transition: background 160ms ease, transform 160ms ease;
    }

    .toast-close:hover,
    .toast-close:focus-visible {
      background: rgba(24, 33, 38, 0.14);
      transform: translateY(-1px);
    }

    .hero,
    .card {
      background: rgba(255, 253, 249, 0.96);
      border: 1px solid var(--line);
      border-radius: 28px;
      box-shadow: var(--shadow);
    }

    .hero {
      padding: 28px 30px;
      margin-bottom: 18px;
    }

    .release-banner {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      margin-top: 16px;
    }

    .release-pill,
    .release-copy {
      display: inline-flex;
      align-items: center;
      min-height: 36px;
      padding: 9px 14px;
      border-radius: 999px;
      border: 1px solid rgba(30, 37, 42, 0.12);
      background: rgba(255, 253, 249, 0.82);
      box-shadow: 0 10px 22px rgba(24, 33, 38, 0.07);
    }

    .release-pill {
      background: linear-gradient(135deg, rgba(15, 106, 88, 0.14), rgba(255, 253, 249, 0.96));
      color: var(--accent);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .release-copy {
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(15, 106, 88, 0.08);
      color: var(--accent);
      font-size: 13px;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    h1 {
      margin: 14px 0 8px;
      font-size: clamp(32px, 5vw, 52px);
      line-height: 0.95;
      letter-spacing: -0.04em;
    }

    .lead {
      margin: 0;
      max-width: 760px;
      color: var(--muted);
      font-size: 16px;
      line-height: 1.55;
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: 18px;
    }

    .card {
      grid-column: span 12;
      padding: 22px;
    }

    .card.half { grid-column: span 6; }
    .card.narrow { grid-column: span 4; }
    .card.wide { grid-column: span 8; }

    h2 {
      margin: 0 0 8px;
      font-size: 24px;
      letter-spacing: -0.03em;
    }

    p {
      margin: 0 0 16px;
      color: var(--muted);
      line-height: 1.5;
    }

    .card > p,
    .freeze-panel p {
      display: none;
    }

    .summary {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
    }

    .chips {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 10px 14px;
      border-radius: 999px;
      background: rgba(15, 106, 88, 0.08);
      color: var(--accent);
      font-weight: 700;
      font-size: 14px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .full {
      grid-column: 1 / -1;
    }

    label {
      display: block;
      margin-bottom: 7px;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #42515b;
    }

    input,
    select,
    textarea {
      width: 100%;
      border: 1px solid rgba(24, 33, 38, 0.16);
      border-radius: 16px;
      background: var(--panel);
      color: var(--text);
      font: inherit;
      padding: 13px 14px;
    }

    textarea {
      min-height: 220px;
      resize: vertical;
      font-family: "Cascadia Mono", Consolas, monospace;
      font-size: 13px;
      line-height: 1.5;
    }

    input:focus,
    select:focus,
    textarea:focus {
      outline: none;
      border-color: rgba(15, 106, 88, 0.48);
      box-shadow: 0 0 0 4px rgba(15, 106, 88, 0.12);
    }

    .actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 18px;
    }

    .actions-tight {
      margin-top: 0;
    }

    .grid-top-16 {
      margin-top: 16px;
    }

    .card-flat {
      box-shadow: none;
    }

    .admin-tool {
      padding: 18px 20px;
    }

    .admin-tool > summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      cursor: pointer;
      list-style: none;
      font-size: 22px;
      font-weight: 700;
      letter-spacing: -0.03em;
    }

    .admin-tool > summary::-webkit-details-marker {
      display: none;
    }

    .admin-tool > summary::after {
      content: "Show";
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 72px;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(15, 106, 88, 0.08);
      color: var(--accent);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .admin-tool[open] > summary::after {
      content: "Hide";
    }

    .admin-tool-body {
      margin-top: 16px;
    }

    .field-note {
      margin-top: 8px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }

    .workflow-intro,
    .workflow-summary {
      margin-top: 16px;
      padding: 16px 18px;
      border: 1px solid rgba(15, 106, 88, 0.12);
      border-radius: 20px;
      background:
        linear-gradient(135deg, rgba(223, 241, 235, 0.52), rgba(255, 253, 249, 0.96) 48%),
        rgba(255, 253, 249, 0.96);
    }

    .workflow-intro {
      display: grid;
      gap: 6px;
      margin-bottom: 2px;
    }

    .workflow-step {
      color: var(--accent);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .workflow-copy {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
    }

    .workflow-summary-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
    }

    .workflow-summary-head strong {
      color: var(--text);
      font-size: 15px;
    }

    .workflow-summary-head span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
      text-align: right;
    }

    .workflow-summary-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-top: 14px;
    }

    .workflow-summary-item {
      padding: 12px 14px;
      border: 1px solid rgba(24, 33, 38, 0.08);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.78);
    }

    .workflow-summary-item span {
      display: block;
      color: #52606a;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .workflow-summary-item strong {
      display: block;
      margin-top: 7px;
      color: var(--text);
      font-size: 14px;
      line-height: 1.45;
      word-break: break-word;
    }

    .page-deepsearch .workflow-intro,
    .page-deepsearch .workflow-summary {
      display: none;
    }

    button,
    .download-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 0;
      border-radius: 999px;
      padding: 12px 18px;
      font: inherit;
      font-weight: 700;
      cursor: pointer;
      text-decoration: none;
      color: white;
      background: linear-gradient(135deg, #0f6a58, #15846d);
      box-shadow: 0 10px 18px rgba(15, 106, 88, 0.18);
    }

    button.secondary,
    .download-link.secondary {
      color: var(--text);
      background: linear-gradient(135deg, #efe4d1, #f7efe2);
      box-shadow: 0 10px 18px rgba(24, 33, 38, 0.08);
    }

    button[disabled] {
      cursor: default;
      opacity: 0.45;
      box-shadow: none;
    }

    .table-inline-field {
      display: inline-flex;
      flex-direction: column;
      gap: 6px;
      min-width: 108px;
      margin-left: 10px;
    }

    .table-inline-field-label {
      color: #52606a;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      line-height: 1.2;
    }

    .table-inline-field-input {
      width: 108px;
      min-width: 108px;
      padding: 10px 12px;
    }

    .table-inline-field-note {
      color: #6a7781;
      font-size: 11px;
      line-height: 1.25;
      max-width: 148px;
    }

    .status {
      min-height: 48px;
      padding: 13px 15px;
      border-radius: 18px;
      background: rgba(15, 106, 88, 0.08);
      color: var(--accent);
      font-weight: 700;
      line-height: 1.45;
    }

    .status.warn {
      background: var(--warn-soft);
      color: var(--warn);
    }

    .status.error {
      background: var(--danger-soft);
      color: var(--danger);
    }

    .meta {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin: 14px 0 0;
      color: var(--muted);
      font-size: 14px;
    }

    .progress-card {
      margin-top: 16px;
      padding: 14px 16px;
      border-radius: 18px;
      border: 1px solid var(--line);
      background: rgba(15, 106, 88, 0.05);
    }

    .progress-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      margin-bottom: 10px;
      font-size: 14px;
      color: var(--muted);
    }

    .progress-head strong {
      color: var(--text);
    }

    .progress-track {
      position: relative;
      width: 100%;
      height: 12px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(24, 33, 38, 0.09);
    }

    .progress-bar {
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(90deg, #0f6a58, #22a07e);
      transition: width 0.35s ease;
    }

    .progress-track.indeterminate .progress-bar {
      width: 34%;
      animation: indeterminate-slide 1.35s ease-in-out infinite;
    }

    .progress-note {
      margin-top: 10px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    @keyframes indeterminate-slide {
      0% { transform: translateX(-120%); }
      100% { transform: translateX(320%); }
    }

    .table-wrap {
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 20px;
      background: white;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 900px;
      font-size: 14px;
    }

    th,
    td {
      padding: 11px 12px;
      border-bottom: 1px solid rgba(24, 33, 38, 0.08);
      text-align: left;
      vertical-align: top;
    }

    th {
      background: #f7f1e7;
      font-size: 12px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #52606a;
      position: sticky;
      top: 0;
    }

    .empty {
      padding: 18px;
      color: var(--muted);
    }

    .notes {
      margin-top: 14px;
      padding-left: 18px;
      color: var(--muted);
    }

    .notes li + li {
      margin-top: 8px;
    }

    .compact-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .page-switch {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .page-tab {
      color: var(--text);
      background: linear-gradient(135deg, #efe4d1, #f7efe2);
      box-shadow: 0 10px 18px rgba(24, 33, 38, 0.08);
    }

    .page-tab.active {
      color: white;
      background: linear-gradient(135deg, #0f6a58, #15846d);
      box-shadow: 0 10px 18px rgba(15, 106, 88, 0.18);
    }

    .compact-actions button,
    .compact-actions a {
      padding: 8px 12px;
      font-size: 13px;
      box-shadow: none;
    }

    .hidden {
      display: none !important;
    }

    .freeze-mask {
      position: fixed;
      right: 18px;
      bottom: 18px;
      z-index: 60;
      display: flex;
      align-items: flex-end;
      justify-content: flex-end;
      padding: 0;
      background: transparent;
      backdrop-filter: none;
      pointer-events: none;
    }

    .freeze-panel {
      width: min(360px, calc(100vw - 32px));
      padding: 16px 18px;
      border: 1px solid rgba(24, 33, 38, 0.1);
      border-radius: 20px;
      background: rgba(255, 253, 249, 0.96);
      box-shadow: 0 16px 34px rgba(24, 33, 38, 0.12);
      text-align: left;
    }

    .freeze-panel strong {
      display: block;
      margin-bottom: 8px;
      font-size: 22px;
      letter-spacing: -0.03em;
    }

    .freeze-panel p {
      margin-bottom: 10px;
    }

    .freeze-job {
      color: var(--muted);
      font-size: 13px;
      word-break: break-word;
    }

    .confirm-mask {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: rgba(24, 33, 38, 0.34);
    }

    .confirm-panel {
      width: min(420px, calc(100vw - 32px));
      padding: 22px 22px 18px;
      border: 1px solid rgba(24, 33, 38, 0.1);
      border-radius: 22px;
      background: rgba(255, 253, 249, 0.98);
      box-shadow: 0 22px 40px rgba(24, 33, 38, 0.16);
    }

    .confirm-panel strong {
      display: block;
      margin-bottom: 10px;
      font-size: 22px;
      letter-spacing: -0.03em;
    }

    .confirm-panel p {
      margin: 0;
      color: var(--muted);
    }

    .confirm-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 18px;
    }

    .space-top-18 {
      margin-top: 18px;
    }

    details {
      border: 1px solid var(--line);
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.8);
      padding: 16px 18px;
    }

    details summary {
      cursor: pointer;
      font-weight: 700;
      color: var(--text);
    }

    @media (max-width: 980px) {
      .toast-host {
        width: calc(100vw - 20px);
      }

      .card.half,
      .card.narrow,
      .card.wide {
        grid-column: span 12;
      }

      .summary {
        align-items: flex-start;
      }

      .workflow-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 720px) {
      .toast-host {
        top: 14px;
      }

      .toast {
        align-items: flex-start;
      }

      .shell {
        width: min(100vw - 16px, 1200px);
        margin: 10px auto 24px;
      }

      .hero,
      .card {
        padding: 18px;
      }

      .form-grid {
        grid-template-columns: 1fr;
      }

      .summary,
      .actions {
        flex-direction: column;
        align-items: stretch;
      }

      .workflow-summary-head {
        flex-direction: column;
      }

      .workflow-summary-head span {
        text-align: left;
      }

      .workflow-summary-grid {
        grid-template-columns: 1fr;
      }

      .chips,
      .meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      .chip {
        width: 100%;
        justify-content: space-between;
      }

      input,
      select,
      textarea,
      button,
      .download-link {
        min-height: 48px;
        font-size: 16px;
      }

      textarea {
        min-height: 180px;
      }

      .actions button,
      .actions .download-link,
      .compact-actions button,
      .compact-actions a {
        width: 100%;
      }

      .compact-actions {
        flex-direction: column;
        align-items: stretch;
      }

      table {
        min-width: 720px;
        font-size: 13px;
      }
    }

    @media (max-width: 520px) {
      .shell {
        width: min(100vw - 10px, 1200px);
        margin: 8px auto 18px;
      }

      .hero,
      .card {
        padding: 16px;
        border-radius: 22px;
      }

      h2 {
        font-size: 21px;
      }

      .chips,
      .meta {
        grid-template-columns: 1fr;
      }
    }
