.ops,
.op-form,
.op-script-detail,
.op-delivery-details {
  --op-ink: var(--ink, #322f29);
  --op-muted: var(--muted, #746f67);
  --op-line: var(--line, #e4dfd6);
  --op-paper: var(--panel, #fffefa);
  --op-accent: var(--accent, #85523c);
  --op-pale: #f4eee5;
  --op-green: #416551;
  color: var(--op-ink);
}
.op-view {
  display: grid;
  gap: 20px;
}
.op-toolbar,
.op-section-heading,
.op-counter,
.op-editor-line,
.op-row,
.op-history-row,
.op-delivery-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.op-toolbar,
.op-section-heading,
.op-counter {
  justify-content: space-between;
}
.op-tabs {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  background: #ede9e1;
  border-radius: 12px;
  gap: 3px;
}
.op-button,
.op-tab,
.op-icon-button,
.op-link,
.op-script-card,
.op-delivery-row,
.op-check {
  font: inherit;
  cursor: pointer;
  color: inherit;
}
.op-tab,
.op-button,
.op-link,
.op-photo-tag,
.op-emblem,
.op-status,
.op-history-icon,
.op-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.op-tab,
.op-button,
.op-icon-button {
  min-height: 40px;
  border-radius: 9px;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.op-tab {
  padding: 8px 16px;
  border: 0;
  background: transparent;
  color: var(--op-muted);
  font-size: 14px;
  font-weight: 550;
}
.op-tab.active {
  color: var(--op-ink);
  background: var(--op-paper);
  box-shadow: 0 1px 3px #392a1719;
}
.op-button {
  border: 1px solid var(--op-line);
  background: var(--op-paper);
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 560;
  justify-content: center;
}
.op-button:hover:not(:disabled),
.op-icon-button:hover,
.op-tab:hover:not(.active) {
  background: var(--op-pale);
}
.op-button.op-primary {
  color: white;
  border-color: var(--op-accent);
  background: var(--op-accent);
}
.op-button.op-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--op-accent) 88%, #221c16);
}
.op-button:disabled,
.op-check:disabled {
  cursor: default;
}
.op-button:disabled {
  opacity: 0.55;
}
.op-select-wrap {
  position: relative;
  max-width: 100%;
}
.op-select-wrap > svg {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.op-select {
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--op-line);
  border-radius: 9px;
  appearance: none;
  background: var(--op-paper);
  color: var(--op-ink);
  padding: 10px 36px 10px 13px;
  max-width: 100%;
  width: 100%;
  cursor: pointer;
}
.op-panel,
.op-script-card {
  border: 1px solid var(--op-line);
  border-radius: 17px;
  background: var(--op-paper);
  overflow: hidden;
}
.op-section-heading {
  padding: 23px 25px 18px;
}
.op-section-heading h2,
.op-script-card h2 {
  margin: 0;
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.op-meta,
.op-detail-meta,
.op-form-hint,
.op-empty-inline,
.op-notice {
  color: var(--op-muted);
}
.op-meta {
  font-size: 13px;
  line-height: 1.5;
}
.op-section-heading .op-meta {
  margin: 5px 0 0;
}
.op-progress-group {
  margin: 0 25px 18px;
}
.op-counter {
  font-size: 13px;
  margin-bottom: 7px;
  color: var(--op-muted);
}
.op-counter strong {
  color: var(--op-green);
}
.op-progress {
  display: block;
  width: 100%;
  height: 6px;
  appearance: none;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #eeece6;
}
.op-progress::-webkit-progress-bar {
  background: #eeece6;
}
.op-progress::-webkit-progress-value {
  background: #69866d;
  border-radius: 10px;
}
.op-progress::-moz-progress-bar {
  background: #69866d;
  border-radius: 10px;
}
.op-row,
.op-history-row,
.op-delivery-row {
  border-top: 1px solid var(--op-line);
  padding: 17px 25px;
}
.op-item-text {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.op-item-text strong {
  font-size: 15px;
  font-weight: 550;
  line-height: 1.4;
}
.op-check {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1.5px solid #c6c2b8;
  border-radius: 6px;
  background: transparent;
  padding: 0;
}
.op-check.is-checked {
  background: var(--op-green);
  border-color: var(--op-green);
  color: #fff;
}
.op-photo-tag,
.op-link,
.op-status {
  font-size: 13px;
  line-height: 1.45;
  flex-shrink: 0;
}
.op-photo-tag {
  color: var(--op-muted);
  gap: 5px;
}
.op-link {
  background: transparent;
  color: var(--op-accent);
  border: 0;
  padding: 6px 0;
}
.op-emblem,
.op-history-icon {
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--op-pale);
  color: var(--op-accent);
  flex-shrink: 0;
  width: 42px;
  height: 42px;
}
.op-emblem svg {
  width: 21px;
  height: 21px;
}
.op-history-icon {
  width: 31px;
  height: 31px;
  background: #edf1e9;
  color: var(--op-green);
}
.op-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 11px;
  padding: 35px 20px 44px;
  grid-column: 1/-1;
}
.op-empty strong {
  font-size: 17px;
}
.op-empty p,
.op-empty-inline {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  max-width: 420px;
}
.op-empty p {
  color: var(--op-muted);
}
.op-empty-inline {
  padding: 0 25px 25px;
}
.op-photo {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin: auto;
  border-radius: 10px;
}
.op-form {
  display: grid;
  gap: 18px;
}
.op-field,
.op-editor-list,
.op-editor-row {
  display: grid;
  gap: 8px;
}
.op-editor-list {
  gap: 12px;
}
.op-field-name,
.op-check-group legend {
  font-size: 14px;
  font-weight: 600;
}
.op-form :is(input:not([type='checkbox']), textarea, select),
.op-search input {
  display: block;
  min-height: 42px;
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  color: var(--op-ink);
  background: white;
  border: 1px solid var(--op-line);
  border-radius: 9px;
  padding: 9px 11px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.op-form textarea {
  resize: vertical;
}
.op-form input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--op-green);
  margin: 0;
  flex-shrink: 0;
}
.op-form > .op-button {
  justify-self: start;
}
.op-icon-button {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  border: 1px solid var(--op-line);
  background: var(--op-paper);
}
.op-check-label,
.op-delivery-step {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
}
.op-check-label {
  color: var(--op-muted);
}
.op-editor-row + .op-editor-row {
  border-top: 1px solid var(--op-line);
  padding-top: 14px;
}
.op-form-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--op-line);
}
.op-check-group {
  display: grid;
  gap: 13px;
  border: 1px solid var(--op-line);
  padding: 15px;
  border-radius: 10px;
  margin: 0;
  min-width: 0;
}
.op-check-group legend {
  padding: 0 5px;
}
.op-form-hint {
  font-size: 13px;
  margin-top: -12px;
}
.op-subheading {
  font-size: 18px;
  font-weight: 560;
}
.op-notice {
  font-size: 14px;
  margin: 0;
}
.op-delivery-row {
  text-align: left;
  width: 100%;
  background: transparent;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}
.op-delivery-row:hover,
.op-script-card:hover {
  background: #faf8f2;
}
.op-status {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 6px;
}
.op-ok {
  background: #ecf1e9;
  color: #426346;
}
.op-warn {
  background: #f8eadd;
  color: #8b5331;
}
.op-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.op-detail-meta {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.55;
}
.op-delivery-details h3 {
  font-size: 16px;
  margin: 20px 0 6px;
}
.op-delivery-details p {
  margin: 4px 0 9px;
}
.op-preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.op-completed-step {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  font-size: 15px;
}
.op-completed-step svg {
  color: var(--op-green);
  flex-shrink: 0;
}
.op-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(325px, 100%);
  color: var(--op-muted);
  position: relative;
}
.op-search svg {
  position: absolute;
  left: 12px;
  pointer-events: none;
}
.op-search input {
  padding-left: 39px;
}
.op-script-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}
.op-script-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 22px;
  min-height: 206px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.op-script-card:hover {
  border-color: #c4baac;
}
.op-script-card .op-emblem {
  margin-bottom: 16px;
}
.op-script-card h2 {
  font-size: 18px;
}
.op-script-card p {
  color: var(--op-muted);
  margin: 8px 0 18px;
  font-size: 14px;
  line-height: 1.5;
}
.op-script-open {
  margin-top: auto;
  font-size: 13px;
  font-weight: 550;
  color: var(--op-accent);
}
.op-speech,
.op-guidance {
  font-size: 16px;
  line-height: 1.65;
  margin: 13px 0;
}
.op-speech {
  padding: 14px 17px;
  background: var(--op-pale);
  border-left: 3px solid var(--op-accent);
  border-radius: 0 9px 9px 0;
}
:is(.ops, .op-form, .op-script-detail, .op-delivery-details)
  :is(button, select, input, textarea):focus-visible {
  outline: 2px solid #866247;
  outline-offset: 2px;
}
@media (max-width: 650px) {
  .op-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .op-tabs {
    align-self: start;
  }
  .op-view {
    gap: 14px;
  }
  .op-section-heading,
  .op-row,
  .op-history-row,
  .op-delivery-row {
    padding: 15px;
  }
  .op-section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .op-section-heading h2 {
    font-size: 18px;
  }
  .op-progress-group {
    margin: 0 15px 17px;
  }
  .op-empty-inline {
    padding: 0 15px 16px;
  }
  .op-search {
    flex: 1;
    min-width: 145px;
  }
  .op-tab {
    padding: 8px 12px;
  }
  .op-history-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
  }
  .op-history-row time {
    grid-column: 2;
  }
  .op-delivery-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 12px;
  }
  .op-delivery-row .op-status {
    grid-column: 2;
    justify-self: start;
  }
  .op-script-card {
    min-height: unset;
  }
}
