.order-special-entry-modal { z-index: 3220; padding: 18px; }
.order-special-entry-modal.hidden { display: none; }
.order-special-entry-modal.is-child-rule-modal { z-index: 3240; }
.order-special-entry-modal.is-owner-rule-modal { z-index: 3260; }
.order-special-entry-modal[inert] { pointer-events: none; }
.order-special-entry-card { display: flex; flex-direction: column; width: min(620px, 100%); max-height: calc(100dvh - 36px); overflow: hidden; border: 1px solid #b5cadb; border-radius: 10px; background: #fff; color: #294359; box-shadow: 0 22px 65px #18334940; }
.order-special-entry-modal.is-rule-list .order-special-entry-card { width: min(1180px, 100%); }
.order-special-entry-modal.is-rule-editor .order-special-entry-card { width: min(920px, 100%); }
.order-special-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; padding: 17px 21px; border-bottom: 1px solid #d3dfe8; }
.order-special-entry-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.order-special-entry-head p { margin: 4px 0 0; color: #6b8193; font-size: 12px; }
.order-special-entry-close { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #708394; font: 24px/1 Arial, sans-serif; cursor: pointer; }
.order-special-entry-close:hover { background: #edf6fc; }
.order-special-entry-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 21px; }
.order-special-entry-prompt { margin: 0 0 12px; color: #6b8193; font-size: 13px; }
.order-special-entry-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.order-special-entry-choices > button { display: grid; align-content: center; gap: 7px; min-height: 116px; padding: 18px; border: 1px solid #d3dfe8; border-radius: 8px; background: #fff; color: #294359; text-align: left; font-family: inherit; cursor: pointer; }
.order-special-entry-choices > button:hover:not(:disabled) { border-color: #2c668f; background: #edf6fc; }
.order-special-entry-choices strong { font-size: 16px; font-weight: 700; }
.order-special-entry-choices small { color: #6b8193; font-size: 12px; line-height: 1.5; }
.order-special-entry-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.order-special-entry-category-gap { grid-column: 1 / -1; height: 20px; }
.order-special-entry-categories button { display: grid; align-content: center; gap: 4px; min-width: 0; min-height: 70px; padding: 12px 15px; border: 1px solid #d3dfe8; border-radius: 6px; background: #fff; color: #294359; text-align: left; font-family: inherit; cursor: pointer; }
.order-special-entry-categories button:hover:not(:disabled) { border-color: #2c668f; background: #edf6fc; }
.order-special-entry-categories strong { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.order-special-entry-count { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 21px; height: 21px; box-sizing: border-box; padding: 0 5px; border: 1px solid #b73838; border-radius: 999px; background: #c84747; color: #fff; font: 700 12px/1 Arial, sans-serif; }
.order-special-entry-categories small { color: #6b8193; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.order-special-entry-owners > button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 90px; padding: 15px; }
.order-special-entry-owner-name { display: grid; gap: 5px; min-width: 0; }
.order-special-entry-owner-name strong { display: block; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.order-special-entry-owner-end { display: flex; flex-shrink: 0; align-items: center; gap: 9px; color: #6b8193; font-size: 20px; }
.order-special-entry-selected-owner { flex: 1; min-width: 0; color: #294359; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.order-special-entry-foot { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 21px; border-top: 1px solid #d3dfe8; background: #f6f9fb; }
.order-special-entry-foot > span { min-width: 0; color: #6b8193; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.order-special-entry-foot > span.is-error { color: #b44444; }
.order-special-entry-modal button:disabled { opacity: .48; cursor: not-allowed; }
.order-special-entry-modal button:focus-visible, .order-special-entry-modal select:focus-visible { outline: 2px solid #2c668f; outline-offset: 3px; }
.order-special-entry-back { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; }
.order-special-entry-back button, .order-special-entry-empty button { padding: 4px 0; border: 0; background: transparent; color: #2c668f; font: inherit; font-size: 12px; cursor: pointer; }
.order-special-entry-target { display: flex; align-items: flex-end; gap: 12px; }
.order-special-entry-target label { flex: 1; min-width: 0; }
.order-special-entry-target label > span { display: block; margin-bottom: 7px; color: #6b8193; font-size: 12px; }
.order-special-entry-target select { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #d3dfe8; border-radius: 5px; background: #fff; color: #294359; font: inherit; font-size: 13px; }
.order-special-entry-target > button { flex-shrink: 0; }
.order-special-entry-scope { margin: 14px 0; padding: 9px 11px; border-radius: 5px; background: #edf6fc; color: #526f85; font-size: 12px; line-height: 1.6; }
.order-special-entry-empty { padding: 22px 4px; color: #6b8193; text-align: center; font-size: 13px; line-height: 1.7; }
.order-special-entry-empty button { display: block; margin: 7px auto 0; }
.order-special-entry-save { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; }
.order-special-entry-modal .spec-event-form { padding: 0; }
@media(max-width: 640px) {
  .order-special-entry-modal { padding: 10px; }
  .order-special-entry-card { max-height: calc(100dvh - 20px); }
  .order-special-entry-head, .order-special-entry-body { padding: 16px; }
  .order-special-entry-foot { padding: 12px 16px; }
  .order-special-entry-choices { gap: 9px; }
  .order-special-entry-choices > button { padding: 13px; }
  .order-special-entry-choices strong { font-size: 14px; }
  .order-special-entry-choices small { font-size: 12px; }
  .order-special-entry-categories button { padding: 11px; }
  .order-special-entry-target { flex-wrap: wrap; }
  .order-special-entry-target label { flex-basis: 100%; }
  .order-special-entry-target > button { margin-left: auto; }
}
@media(max-width: 440px) {
  .order-special-entry-owners { grid-template-columns: minmax(0, 1fr); }
}
