/* Compact ticket view: preserve native controls and all booking actions. */
.ticket-cast-profile{padding:3px 0;line-height:1.4}
.ticket-cast-profile .cast-profile-link{font-size:12px;font-weight:600}
.ticket-dialog {
  width: 853px;
  max-width: calc(100vw - 12px);
  height: auto;
  max-height: calc(100dvh - 16px);
  inset: 8px 6px 8px auto;
  margin: auto 0;
  border: 1px solid #9aa4af;
  border-radius: 0;
  background: #f5f5f5;
  color: #222;
  font-family: "MS PGothic", "ＭＳ Ｐゴシック", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 12px;
}
.ticket-dialog .dialog-head { min-height: 32px; padding: 4px 8px; background: #191919; color: #fff; border-bottom: 1px solid #000; }
.ticket-dialog .dialog-head h2 { color: #fff; font-size: 14px; font-weight: 700; }
.ticket-dialog .dialog-close { width: 24px; height: 24px; border: 1px solid #a9b3bf; border-radius: 2px; background: #f8f9fb; color: #222; font-size: 18px; line-height: 20px; }
.ticket-dialog .dialog-body { padding: 6px; }
.ticket-dialog .dialog-body > .alert { margin: 0 0 4px; padding: 4px 6px; border-radius: 1px; font-size: 11px; line-height: 1.3; }
.ticket-dialog .dialog-body > .alert small { font-size: 10px; line-height: 1.3; }
.ticket-dialog .dialog-actions { padding: 5px 7px; gap: 5px; background: #e8edf4; border-top: 1px solid #9eacbb; }
.ticket-dialog .btn { min-height: 25px; padding: 3px 8px; border: 1px solid #8c9bab; border-radius: 2px; background: #f5f5f5; color: #222; font-family: inherit; font-size: 12px; line-height: 17px; box-shadow: none; }
.ticket-dialog .btn.primary { background: #3472b8; border-color: #2f6195; color: #fff; }
.ticket-dialog .btn.danger { color: #a02020; }
.ticket-dialog .field { min-width: 0; }
.ticket-dialog .form-grid { gap: 5px; }
.ticket-dialog .field label { margin: 0; color: #222; font-size: 12px; font-weight: normal; line-height: 1.3; }
.ticket-dialog input:not([type=checkbox]), .ticket-dialog select, .ticket-dialog textarea {
  width: 100%; min-width: 0; min-height: 0; height: 21px; box-sizing: border-box;
  padding: 1px 4px; border: 1px solid #a4a8af; border-radius: 1px; background: #fff; color: #111;
  font-family: inherit; font-size: 12px; line-height: 17px; box-shadow: none;
}
.ticket-dialog select { height: 19px; padding: 0 2px; }
.ticket-dialog textarea { height: 48px; resize: vertical; }
.ticket-dialog .field small, .ticket-dialog .small-note { font-size: 10px; line-height: 1.4; color: #565e68; }
.ticket-dialog .field small { margin: 0; }
.ticket-dialog .dialog-body > .small-note { margin: 3px 0 5px; font-size: 10px; }
.ticket-dialog .ticket-summary { margin: 0 0 5px; padding: 5px 7px; border: 1px solid #b9afcd; border-radius: 0; background: #ddd6eb; }
.ticket-dialog .ticket-summary > .small-note { margin: 3px 0 0; font-size: 10px; line-height: 1.4; }
.ticket-dialog .ticket-summary [data-reception-sync] { margin-bottom: 2px; font-size: 10px; color: #5d526b; }
.ticket-dialog .ticket-time { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 2px; }
.ticket-dialog .ticket-time > span, .ticket-dialog .ticket-time small { margin: 0; color: #30273b; font-size: 11px; }
.ticket-dialog .ticket-time strong { margin: 0; font-size: 13px; line-height: 1.5; }
.ticket-dialog .ticket-time strong span { font-size: 12px; }
.ticket-dialog .ticket-ok { margin: 2px 0 0; font-size: 10px; line-height: 1.4; color: #304b37; }
.ticket-dialog .ticket-alert { margin-top: 3px; padding: 3px 5px; border-radius: 1px; font-size: 11px; line-height: 1.5; }
.ticket-dialog .reception-notes { margin-top: 3px; padding-top: 3px; }
.ticket-dialog .reception-notes[open] { max-height: 80px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.ticket-dialog .reception-notes summary { position: sticky; top: -3px; z-index: 1; background: #ddd6eb; font-size: 11px; line-height: 1.3; }
.ticket-dialog .reception-notes p { display: inline-block; width: calc(50% - 8px); margin: 2px 8px 2px 0; vertical-align: top; font-size: 10px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-dialog .reception-notes p > strong { margin-right: 4px; color: #3b3049; }
.ticket-dialog .reception-notes p > strong::after { content: "："; }
.ticket-dialog .reception-notes p > br { display: none; }
.ticket-dialog .ticket-jump { grid-template-columns: repeat(7,minmax(0,1fr)); padding: 0; gap: 3px; }
.ticket-dialog .ticket-jump .btn { min-height: 25px; padding: 2px 4px; font-size: 11px; }
.ticket-dialog .ticket-group { padding: 0; border: 1px solid #9baabc; border-radius: 0; background: #f7f8fa; }
.ticket-dialog .ticket-group > header { margin: 0; min-height: 27px; padding: 5px 7px; box-sizing: border-box; border-bottom: 1px solid #839fc4; background: #96baef; }
.ticket-dialog .ticket-group > header h3 { font-size: 12px; font-weight: 700; line-height: 16px; color: #12243c; }
.ticket-dialog .ticket-group > header p { margin: 1px 0 0; color: #253c57; font-size: 10px; }
.ticket-dialog .ticket-group > .form-grid { padding: 5px; gap: 4px; }
.ticket-dialog .ticket-group .field:not(details) { display: grid; grid-template-columns: 74px minmax(0,1fr); align-items: center; gap: 3px; }
.ticket-dialog .ticket-group .field > small { grid-column: 2; }
.ticket-dialog .ticket-group .field[hidden] { display: none; }
.ticket-dialog .ticket-group .field.full { grid-column: 1/-1; }
.ticket-dialog .mind-ticket-basics { background: #ddd6eb; border-color: #aaa0bb; }
.ticket-dialog .mind-ticket-basics > header { display: none; }
.ticket-dialog .mind-ticket-basics > .form-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px 6px; }
.ticket-dialog .mind-ticket-basics .field:not(details) { grid-template-columns: 58px minmax(0,1fr); }
.ticket-dialog .mind-ticket-basics .field.full:has(#f-destination) { grid-column: span 2; }
.ticket-dialog .mind-ticket-basics .field > small { font-size: 9px; }
.ticket-dialog .mind-ticket-basics .ticket-time-adjust { display: flex; flex-direction: row; justify-content: flex-end; align-items: center; gap: 6px; margin: 0; }
.ticket-dialog .ticket-time-adjust > span { font-size: 10px; color: #51455e; }
.ticket-dialog .ticket-time-adjust .actions { gap: 3px; }
.ticket-dialog .ticket-time-adjust .btn { min-height: 21px; height: 21px; padding: 0 6px; line-height: 19px; font-size: 10px; }
.ticket-dialog .mind-ticket-columns { display: grid; grid-template-columns: minmax(0,300fr) minmax(0,240fr) minmax(0,300fr); gap: 5px; align-items: stretch; }
.ticket-dialog .mind-ticket-columns > .ticket-group.field.full { grid-column: auto; }
.ticket-dialog .mind-ticket-columns .form-grid { grid-template-columns: minmax(0,1fr); }
.ticket-dialog #section-ticket-payment .field:not(details) { grid-template-columns: 115px minmax(0,1fr); }
.ticket-dialog #section-ticket-payment .field:has(input[type=number]) label { font-size: 11px; }
.ticket-dialog #section-ticket-payment input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
.ticket-dialog .ticket-group .ticket-new-customer { display: flex; align-items: flex-start; flex-direction: column; gap: 2px; }
.ticket-dialog #ticket-customer-count { display: block; margin: 0; }
.ticket-dialog #section-ticket-customer .field:has(#ticket-customer-search) { grid-template-columns: 54px minmax(0,1fr); }
.ticket-dialog #section-ticket-customer .field:has(#f-pointUsed) { grid-template-columns: minmax(0,1fr) 72px; padding-top: 4px; border-top: 1px solid #ccd3dd; }
.ticket-dialog #section-ticket-customer .field:has(#f-pointUsed) > small { grid-column: 1/-1; }
.ticket-dialog #f-pointUsed { text-align: right; font-variant-numeric: tabular-nums; }
.ticket-dialog #ticket-customer-contact { display: block; max-height: 108px; overflow: auto; overscroll-behavior: contain; padding: 4px; border: 1px solid #c4cedb; background: #fff; font-size: 11px; line-height: 1.4; }
.ticket-dialog #ticket-customer-contact[hidden] { display: none; }
.ticket-dialog #ticket-customer-contact dl { margin: 0; }
.ticket-dialog #ticket-customer-contact dl > div { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 4px; }
.ticket-dialog #ticket-customer-contact dt { color: #47576a; }
.ticket-dialog #ticket-customer-contact dd { margin: 0; overflow-wrap: anywhere; }
.ticket-dialog .ticket-customer-phone { display: block; font-variant-numeric: tabular-nums; }
.ticket-dialog .mind-ticket-additions > .form-grid { grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; }
.ticket-dialog .mind-ticket-additions .ticket-choice.field.full { grid-column: auto; margin: 0; border: 1px solid #a9b5c3; border-radius: 1px; background: #fff; }
.ticket-dialog .ticket-choice > summary { margin: 0; padding: 4px 5px; font-size: 11px; line-height: 1.3; color: #1c3550; }
.ticket-dialog .ticket-choice-count { margin-left: 5px; padding: 0 3px; border: 1px solid #b6c5d8; border-radius: 1px; background: #e9eff8; font-size: 10px; }
.ticket-dialog .ticket-choice-summary { margin: 3px 0 0; font-size: 10px; color: #384b5e; }
.ticket-dialog .ticket-choice > summary > small { font-size: 9px; color: #68727e; }
.ticket-dialog .ticket-choice-filter { padding: 5px 5px 0; gap: 2px; }
.ticket-dialog .ticket-choice-filter > label { font-size: 10px; }
.ticket-dialog .ticket-choice-list { margin: 5px; max-height: 200px; }
.ticket-dialog .ticket-choice-list legend { font-size: 10px; }
.ticket-dialog .ticket-choice-list .check-label { min-height: 25px; padding: 4px!important; gap: 5px; font-size: 11px; line-height: 1.4; }
.ticket-dialog .ticket-choice > .small-note { padding: 0 5px 5px; font-size: 9px; }
.ticket-dialog .mind-ticket-transport > .form-grid { grid-template-columns: minmax(0,1fr) minmax(0,2fr); }
.ticket-dialog .mind-ticket-transport .mind-ticket-dispatch.field.full { display: flex; flex-wrap: wrap; justify-content: flex-end; grid-column: 2; gap: 5px; }
.ticket-dialog .ticket-group .ticket-signal-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 0; }
.ticket-dialog .ticket-group .ticket-signal-actions small { flex-basis: 100%; }
.ticket-dialog .ticket-group .ticket-status-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; border: 0; border-radius: 0; }
.ticket-dialog .ticket-status-actions > span { font-size: 11px; color: #444; }
.ticket-dialog .ticket-status-actions > small { width: auto; }
.ticket-dialog .mind-ticket-notes > .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.ticket-dialog .mind-ticket-notes .field:has(textarea) { grid-column: auto; }
.ticket-dialog .ticket-footer-total { max-width: 62%; font-size: 11px; line-height: 1.4; color: #1b3653; }
.ticket-dialog [id^="section-ticket-"] { scroll-margin-top: 40px; }
@media (max-width: 700px) {
  .ticket-dialog { width: calc(100vw - 8px); max-width: none; inset: 4px; max-height: calc(100dvh - 8px); }
  .ticket-dialog .mind-ticket-basics > .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ticket-dialog .mind-ticket-columns { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .ticket-dialog .mind-ticket-columns > #section-ticket-payment { grid-column: 1/-1; }
  .ticket-dialog #section-ticket-payment > .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ticket-dialog .mind-ticket-additions > .form-grid { grid-template-columns: minmax(0,1fr); }
  .ticket-dialog .ticket-footer-total { max-width: none; flex-basis: 100%; }
}
@media (max-width: 440px) {
  .ticket-dialog .reception-notes p { width: 100%; margin-right: 0; }
  .ticket-dialog .ticket-jump { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .ticket-dialog .mind-ticket-columns { grid-template-columns: minmax(0,1fr); }
  .ticket-dialog #section-ticket-payment > .form-grid { grid-template-columns: minmax(0,1fr); }
  .ticket-dialog .mind-ticket-transport > .form-grid, .ticket-dialog .mind-ticket-notes > .form-grid { grid-template-columns: minmax(0,1fr); }
  .ticket-dialog .mind-ticket-transport .mind-ticket-dispatch.field.full { grid-column: 1; justify-content: flex-start; }
  .ticket-dialog .ticket-group .field:not(details) { grid-template-columns: 68px minmax(0,1fr); }
}

.ticket-dialog .ticket-group .field.ticket-new-customer{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.ticket-dialog .ticket-group .field.ticket-new-customer .btn{max-width:100%;white-space:normal}
.ticket-dialog .ticket-group .field.ticket-signal-actions,.ticket-dialog .ticket-group .field.ticket-status-actions{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}
.ticket-dialog .ticket-group .field.ticket-signal-actions>small,.ticket-dialog .ticket-group .field.ticket-status-actions>small{flex-basis:100%}

/* Floating receipt leaves the timetable interactive. No modal backdrop. */
.ticket-dialog.ticket-floating[open]{position:fixed;inset:auto 12px 12px auto;margin:0;width:760px;max-width:calc(100vw - 16px);height:min(560px,60dvh);max-height:calc(100dvh - 16px);min-height:220px;overflow:hidden;z-index:40;display:flex;flex-direction:column;border:1px solid #65778b;border-radius:4px;box-shadow:0 8px 28px #172b4540}
.ticket-floating>.dialog-head{flex:none;position:relative;cursor:move;touch-action:none;user-select:none;padding:4px 6px;min-height:31px}
.ticket-floating>.dialog-head h2{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.dialog-window-actions{display:flex;align-items:center;gap:4px;flex:none}
.ticket-floating .dialog-window-actions>button{width:25px;height:23px;min-height:23px;padding:0;border:1px solid #9eabb9;background:#f4f6f8;border-radius:2px;font-size:16px;color:#182c44;line-height:19px;cursor:pointer}
.ticket-floating>form{flex:1;min-height:0;display:flex;flex-direction:column}
.ticket-floating .dialog-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:6px}
.ticket-floating .dialog-actions{flex:none;position:relative;padding:5px 7px}
.ticket-floating.ticket-wide[open]{width:1000px;height:calc(100dvh - 32px)}
.ticket-floating.ticket-minimized[open]{width:390px;height:33px!important;min-height:33px;max-height:33px}
.ticket-floating.ticket-minimized>form{display:none}
.ticket-floating .mind-ticket-basics>.form-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.ticket-floating .mind-ticket-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.ticket-floating .mind-ticket-columns>#section-ticket-payment{grid-column:1/-1}
.ticket-floating #section-ticket-payment>.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ticket-floating.ticket-wide .mind-ticket-columns{grid-template-columns:minmax(0,300fr) minmax(0,240fr) minmax(0,300fr)}
.ticket-floating.ticket-wide .mind-ticket-columns>#section-ticket-payment{grid-column:auto}
.ticket-floating.ticket-wide #section-ticket-payment>.form-grid{grid-template-columns:1fr}
.ticket-keyboard-hint{margin:0!important;color:#556578;font-size:10px;line-height:1.5}
.ticket-neighbors-section{border:1px solid #b5c7b8;background:#f3f8f3;padding:5px 6px;margin:0}
.ticket-neighbors-section>summary{font-size:11px;font-weight:600;cursor:pointer}
.ticket-neighbor-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px}
.ticket-neighbor-grid>div{min-width:0;border:1px solid #cfdbd1;padding:4px;overflow-wrap:anywhere}
.ticket-neighbor-grid strong{font-size:11px}.ticket-neighbor-grid p{margin:3px 0;font-size:11px;line-height:1.5}
.ticket-rest-note{padding:4px;background:#fff1d5;white-space:pre-wrap;font-size:11px}
#ticket-neighbor-peek{border:1px solid #7595b9;background:#edf4fd;padding:6px;margin-top:6px;font-size:11px}
#ticket-neighbor-peek[hidden]{display:none}#ticket-neighbor-peek p{margin:0 0 5px;line-height:1.5}#ticket-neighbor-peek small{display:block;margin-top:4px}
@media(max-width:600px){.ticket-floating .mind-ticket-basics>.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ticket-floating .mind-ticket-columns{grid-template-columns:1fr}.ticket-floating #section-ticket-payment>.form-grid{grid-template-columns:1fr}.ticket-floating .mind-ticket-additions>.form-grid{grid-template-columns:1fr}}
@media(max-width:700px){.ticket-dialog.ticket-floating[open]:not(.ticket-wide):not(.ticket-minimized){height:42dvh;min-height:200px}}

.ticket-dialog .mind-ticket-transport .mind-ticket-dispatch.field.full{flex-direction:row}

/* The search boxes of a ticket: cast and place (2026-11-16). What was found is a row of its own under the box; it is
   empty, and takes no room, until something is typed. */
.ticket-search-results { display: grid; gap: 4px; }
.ticket-search-results:empty { display: none; }
.ticket-dialog .ticket-group .field.ticket-search-results { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 4px; }
.ticket-dialog .ticket-group .field.ticket-search-results:empty { display: none; }
#dialog.ticket-dialog .mind-ticket-basics .field.ticket-search-results { grid-column: 1/-1; grid-template-columns: minmax(0,1fr); }
#dialog.ticket-dialog .mind-ticket-basics .field.ticket-search-results:empty { display: none; }
#dialog.ticket-dialog .mind-ticket-basics .field:has(#ticket-place-search) { grid-column: span 5; grid-template-columns: 62px minmax(0,1fr); }
.ticket-search-list { display: grid; gap: 3px; max-height: 216px; overflow: auto; overscroll-behavior: contain; }
#dialog.ticket-dialog .mind-ticket-basics .ticket-search-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
.ticket-search-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 8px; width: 100%; min-width: 0; padding: 4px 8px; border: 1px solid #c4cedb; border-radius: 4px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ticket-search-row:hover, .ticket-search-row:focus-visible { border-color: #1f5f8b; background: #eef5fb; outline: none; }
.ticket-search-row.chosen { border-color: #1f5f8b; box-shadow: inset 3px 0 0 #1f5f8b; }
.ticket-search-row:disabled { cursor: not-allowed; opacity: .6; background: #f3f4f6; }
.ticket-search-row strong { font-size: 12px; }
.ticket-search-row small, .ticket-dialog .field .ticket-search-row small { color: #4b5563; font-size: 10px; }
.ticket-search-row.place small { flex: 1 1 100%; }
.ticket-search-row .ticket-search-note, .ticket-dialog .field .ticket-search-row .ticket-search-note { color: #7a4b00; }
.ticket-search-tag { padding: 0 6px; border-radius: 999px; background: #e5e7eb; color: #374151; font-size: 10px; line-height: 1.7; white-space: normal; }
.ticket-search-tag.on { background: #dcf3e4; color: #14532d; }
.ticket-search-tag.stop { background: #fde2e2; color: #8a1c1c; }
.ticket-search-none, .ticket-search-more { margin: 0; color: #4b5563; font-size: 11px; }
.ticket-search-add { justify-self: start; }
.ticket-place-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 10px; padding: 7px; border: 1px solid #9baabc; background: #f8fafc; }
.ticket-place-form h4 { grid-column: 1 / -1; margin: 0; font-size: 12px; }
.ticket-place-form label, .ticket-dialog .field .ticket-place-form label { display: grid; gap: 2px; font-size: 11px; color: #374151; }
.ticket-place-form label input, .ticket-place-form label select { width: 100%; min-width: 0; box-sizing: border-box; }
.ticket-place-form .ticket-place-error { grid-column: 1 / -1; margin: 0; color: #b42318; font-size: 12px; }
.ticket-place-form .ticket-place-error:empty { display: none; }
.ticket-place-form .actions { grid-column: 1 / -1; display: flex; gap: 6px; }
#dialog #entry-hint .entry-hint-note { flex: 1 1 100%; color: #7a4b00; }
@media (max-width: 700px) {
 #dialog.ticket-dialog .mind-ticket-basics .field:has(#ticket-place-search) { grid-column: 1/-1; }
 #dialog.ticket-dialog .mind-ticket-basics .ticket-search-list { grid-template-columns: minmax(0,1fr); }
 .ticket-place-form { grid-template-columns: minmax(0,1fr); }
}

/* ---- A ticket without scrolling (the owner's request of 2026-11-16) ----
   Every item, its order in the page and its behaviour stay as they were. What changes is where the room goes:
   - a note that explains a field is shown over the form while that field has the focus, and takes no room of its own
     (nothing moves when the focus moves, so a button is never pushed away between pressing and releasing);
   - the place is one line; an addition is one line while it is closed; the two notes at the top share a line;
   - the history and the cautions take what is left of the window's height and scroll inside their own frame;
   - a ticket that is not saved yet shows the Signal part as one line (nothing can be sent before it is saved).
   The narrow layouts (700px and below) keep their stacked form. */
#dialog.ticket-dialog .ticket-topline{display:flex;flex-wrap:wrap;align-items:stretch;gap:2px 5px;margin:0 0 3px}
#dialog.ticket-dialog .ticket-topline>.reception-hold-controls{position:relative;flex:0 1 auto;min-width:0;margin:0;padding:1px 7px}
#dialog.ticket-dialog .ticket-topline>.reception-hold-controls .hold-control-buttons{margin:0}
#dialog.ticket-dialog .ticket-topline>.reception-hold-controls>small{display:none;position:absolute;z-index:8;top:calc(100% + 1px);left:0;flex:none;width:max-content;max-width:min(520px,90vw);padding:2px 6px;border:1px solid #c8b560;border-radius:2px;background:#fffbe3;color:#3b3400;font-size:10px;line-height:14px;box-shadow:0 2px 6px rgba(0,0,0,.2);pointer-events:none;white-space:normal}
#dialog.ticket-dialog .ticket-topline>.reception-hold-controls:hover>small,#dialog.ticket-dialog .ticket-topline>.reception-hold-controls:focus-within>small{display:block}
#dialog.ticket-dialog .ticket-topline>.reception-hold-controls:empty{display:none}
#dialog.ticket-dialog .ticket-topline>.booking-staff-history{flex:1 1 250px;min-width:0;margin:0;padding:1px 7px;border-radius:0;align-items:center}
#dialog.ticket-dialog .ticket-topline>.booking-staff-history .small-note{margin:0;font-size:10px;line-height:1.3}
#dialog.ticket-dialog .dialog-actions>.ticket-keyboard-hint{flex:1 1 180px;min-width:0;margin:0!important;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#556578;font-size:9px;line-height:12px}
#dialog.ticket-dialog .ticket-footer-total{flex:0 1 auto}

/* Notes under a field: over the form, only while the field has the focus. */
#dialog.ticket-dialog .mind-ticket-basics .field,#dialog.ticket-dialog #section-ticket-customer .field,#dialog.ticket-dialog #section-ticket-payment .field{position:relative}
#dialog.ticket-dialog .mind-ticket-basics .field>small,
#dialog.ticket-dialog #section-ticket-customer .field:has(#ticket-customer-search)>small,
#dialog.ticket-dialog #section-ticket-customer .ticket-new-customer>small,
#dialog.ticket-dialog #section-ticket-payment .field:has(#f-pointUsed)>small{display:none;position:absolute;z-index:8;top:calc(100% + 1px);left:0;width:max-content;max-width:min(340px,80vw);margin:0;padding:2px 6px;border:1px solid #c8b560;border-radius:2px;background:#fffbe3;color:#3b3400;font-size:10px;line-height:14px;box-shadow:0 2px 6px rgba(0,0,0,.2);pointer-events:none;white-space:normal}
#dialog.ticket-dialog .mind-ticket-basics .field:focus-within>small,
#dialog.ticket-dialog #section-ticket-customer .field:has(#ticket-customer-search):focus-within>small,
#dialog.ticket-dialog #section-ticket-customer .ticket-new-customer:focus-within>small,
#dialog.ticket-dialog #section-ticket-payment .field:has(#f-pointUsed):focus-within>small{display:block}

/* Additions: one line each while closed (title, what is chosen, how many there are to choose from). */
#dialog.ticket-dialog .ticket-choice>summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 6px;padding:2px 5px;list-style:none}
#dialog.ticket-dialog .ticket-choice>summary::-webkit-details-marker{display:none}
#dialog.ticket-dialog .ticket-choice>summary::before{content:"▸";flex:none;width:9px;color:#33506e;font-size:10px}
#dialog.ticket-dialog .ticket-choice[open]>summary::before{content:"▾"}
#dialog.ticket-dialog .ticket-choice>summary>.ticket-choice-title{flex:none}
#dialog.ticket-dialog .ticket-choice>summary>.ticket-choice-summary{flex:1 1 40px;min-width:0;margin:0;overflow-wrap:anywhere}
#dialog.ticket-dialog .ticket-choice>summary>small{flex:none;margin-left:auto}
/* Nothing chosen: the count already says so, and the line stays one line. */
#dialog.ticket-dialog .ticket-choice:not(:has(input:checked))>summary>.ticket-choice-summary{display:none}
/* One item more than once (a ten-minute extension three times): a chosen item carries 「− ×n ＋」 at the end of its
   line. Nothing runs over: the name shrinks and wraps first, and where even that is too narrow the three go to a
   line of their own, pushed to the right. */
#dialog.ticket-dialog .ticket-choice-list .ticket-choice-row{display:flex;flex-wrap:wrap;align-items:center;gap:0 4px;min-width:0;border-radius:3px}
#dialog.ticket-dialog .ticket-choice-list .ticket-choice-row[hidden]{display:none}
#dialog.ticket-dialog .ticket-choice-list .ticket-choice-row:hover{background:#edf3e6}
#dialog.ticket-dialog .ticket-choice-list .ticket-choice-row>.check-label{flex:1 1 110px;min-width:0}
#dialog.ticket-dialog .ticket-choice-times{display:inline-flex;flex:none;align-items:center;gap:2px;margin-left:auto;padding-right:3px}
#dialog.ticket-dialog .ticket-choice-times[hidden]{display:none}
#dialog.ticket-dialog .ticket-choice-times>.btn{flex:none;width:22px;min-width:22px;height:22px;min-height:22px;padding:0;line-height:20px;font-size:13px}
#dialog.ticket-dialog .ticket-choice-times-count{flex:none;min-width:26px;text-align:center;font-size:11px;font-weight:650;font-variant-numeric:tabular-nums}
/* On a narrow screen the two buttons are pressed with a finger: larger, and still 32 + 26 + 32 beside a name of 110. */
@media(max-width:700px){#dialog.ticket-dialog .ticket-choice-times>.btn{width:32px;min-width:32px;height:32px;min-height:32px;font-size:15px}}
#dialog.ticket-dialog #ticket-customer-intake .ticket-customer-ng-banner{margin:0 0 2px;padding:3px 6px}
#dialog.ticket-dialog #ticket-customer-intake .ticket-customer-ng-banner>strong{line-height:15px}
/* A chosen member: phone on a line of its own, class and store side by side; the memo is two lines high and can be pulled taller. */
#dialog.ticket-dialog #ticket-customer-contact dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 8px}
#dialog.ticket-dialog #ticket-customer-contact dl>div:first-child{grid-column:1/-1}
#dialog.ticket-dialog #ticket-customer-contact dl>div{grid-template-columns:auto minmax(0,1fr)}
#dialog.ticket-dialog #ticket-customer-intake .tcu-notes{gap:2px;margin-top:3px;padding:3px 5px}
#dialog.ticket-dialog #ticket-customer-intake .tcu-notes textarea{height:38px;min-height:34px}
#dialog.ticket-dialog #ticket-customer-intake .tcu-actions{margin-top:2px}
#dialog.ticket-dialog #ticket-customer-count:empty{display:none}
#dialog.ticket-dialog .mind-ticket-secondary textarea{height:30px}
#dialog.ticket-dialog .dialog-body{padding:4px 6px}
#dialog.ticket-dialog .ticket-summary{padding:2px 6px;margin-bottom:3px}
#dialog.ticket-dialog .ticket-neighbors-section:not([open]){height:20px;padding:1px 5px}
#dialog.ticket-dialog .mind-ticket-basics>.form-grid{padding:3px 5px;row-gap:3px}
/* A little less air inside each group: headings 20px high, 3px between the lines. */
#dialog.ticket-dialog .ticket-group>header{min-height:20px;padding:1px 5px}
#dialog.ticket-dialog .mind-ticket-columns .ticket-group>.form-grid,#dialog.ticket-dialog .mind-ticket-secondary .ticket-group>.form-grid{padding:3px 4px;gap:3px}
#dialog.ticket-dialog .ticket-summary{row-gap:1px}
#dialog.ticket-dialog .ticket-topline .btn{min-height:20px;height:20px}
#dialog.ticket-dialog #ticket-signal-content>header>h3{padding:0}

@media(min-width:701px){
 /* The line of the status carries the time of the last check at its right end. */
 #dialog.ticket-dialog .ticket-summary{grid-template-columns:auto minmax(0,1fr) auto}
 #dialog.ticket-dialog .ticket-summary>[data-reception-sync]{grid-column:3;grid-row:1;align-self:center;white-space:nowrap}
 #dialog.ticket-dialog .ticket-summary>.booking-status{grid-column:1;grid-row:1}
 #dialog.ticket-dialog .ticket-summary>.ticket-time{grid-column:2;grid-row:1}
 /* The place in one line: category, room, search, building and address. What the search finds, how to enter the
    building and the cast's cautions follow as lines of their own. */
 #dialog.ticket-dialog .mind-ticket-basics .field:has(#f-locationId){grid-column:span 3}
 #dialog.ticket-dialog .mind-ticket-basics .field:has(#ticket-place-search){grid-column:span 3}
 #dialog.ticket-dialog .mind-ticket-basics .field.full:has(#f-destination){grid-column:span 4}
 #dialog.ticket-dialog .mind-ticket-basics .field.ticket-search-results,#dialog.ticket-dialog .mind-ticket-basics .field.entry-hint,#dialog.ticket-dialog .mind-ticket-basics .field.ticket-cast-restrictions{order:1}
 /* The window is a column; the three columns of the ticket take what is left of its height. */
 /* Only the form of a ticket itself (it is the one that holds the three columns): a member's form opened from a ticket keeps its own grid. */
 #dialog.ticket-dialog .dialog-body:has(>.form-grid>.mind-ticket-columns){display:flex;flex-direction:column}
 #dialog.ticket-dialog .dialog-body:has(>.form-grid>.mind-ticket-columns)>*{flex:none}
 #dialog.ticket-dialog .dialog-body>.form-grid:has(>.mind-ticket-columns){display:flex;flex:1 0 auto;flex-direction:column;gap:5px}
 #dialog.ticket-dialog .dialog-body>.form-grid:has(>.mind-ticket-columns)>*{flex:none}
 /* The member has the left column to itself (it grows when a member is chosen); history and cautions follow the cast
    in the middle column; the additions follow the account. The first row is as high as the cast's part and no higher
    (its maximum is a fixed size, so what the taller account needs goes to the second row). */
 #dialog.ticket-dialog .dialog-body>.form-grid>.mind-ticket-columns{flex:1 0 auto;grid-template-columns:minmax(0,290fr) minmax(0,286fr) minmax(0,290fr);grid-template-areas:"customer cast payment" "customer context payment" "customer context additions";grid-template-rows:minmax(min-content,0px) auto minmax(0,1fr)}
 #dialog.ticket-dialog #ticket-context-content>.ticket-context-columns{grid-template-columns:minmax(0,1fr)}
 #dialog.ticket-dialog #ticket-context-content .ticket-history-panel{border-right:0;border-bottom:1px solid #b5c0cc}
 /* History and cautions: the frame is as tall as the columns leave it; what is inside scrolls. */
 #dialog.ticket-dialog .mind-ticket-columns>#section-ticket-context{position:relative;align-self:stretch;min-height:112px;max-height:none;overflow:hidden}
 #dialog.ticket-dialog .mind-ticket-columns>#section-ticket-context>#ticket-context-content{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain}
 /* Not saved yet: nothing can be sent, so the Signal part is its heading and that sentence. */
 #dialog.ticket-dialog .dialog-body:has(.reception-hold-controls) #ticket-signal-content{display:flex;flex-wrap:wrap;align-items:center}
 #dialog.ticket-dialog .dialog-body:has(.reception-hold-controls) #ticket-signal-content>header{flex:none;min-height:0;padding:2px 6px;border-bottom:0;background:transparent}
 #dialog.ticket-dialog .dialog-body:has(.reception-hold-controls) #ticket-signal-content>header>.btn{display:none}
 #dialog.ticket-dialog .dialog-body:has(.reception-hold-controls) #ticket-signal-content>.ticket-signal-warning{flex:1 1 200px;padding:2px 7px;background:transparent}
 #dialog.ticket-dialog .dialog-body:has(.reception-hold-controls) #ticket-signal-content>.ticket-signal-actions,#dialog.ticket-dialog .dialog-body:has(.reception-hold-controls) #ticket-signal-content>.ticket-signal-note{display:none}
}
/* A low window (a laptop of 768 lines with the browser's bars): the window comes closer to the edges, its head and
   foot are lower, and the two small groups under the columns do without their headings (each field has its label). */
@media(min-width:701px) and (max-height:700px){
 #dialog.ticket-dialog.ticket-floating[open]:not(.ticket-wide):not(.ticket-minimized){inset:4px 12px auto auto;height:calc(100dvh - 8px);max-height:calc(100dvh - 8px)}
 #dialog.ticket-dialog.ticket-floating.ticket-wide[open]:not(.ticket-minimized){height:calc(100dvh - 8px);max-height:calc(100dvh - 8px)}
 #dialog.ticket-dialog.ticket-floating>.dialog-head{min-height:26px;padding:2px 6px}
 #dialog.ticket-dialog.ticket-floating .dialog-actions{padding:3px 7px}
 #dialog.ticket-dialog .mind-ticket-secondary>.ticket-group>header{display:none}
 #dialog.ticket-dialog .dialog-body>.form-grid:has(>.mind-ticket-columns){gap:4px}
}
/* The check before saving ("伝票の内容を確認"): the same lines, in three columns that are read downwards, ten to a column. */
@media(min-width:701px){
 #dialog.ticket-dialog #editor[data-mode="confirm"] .review-table{display:block;width:100%}
 #dialog.ticket-dialog #editor[data-mode="confirm"] .review-table>tbody{display:grid;grid-auto-flow:column;grid-template-rows:repeat(10,auto);grid-auto-columns:minmax(0,1fr);gap:0 10px}
 #dialog.ticket-dialog #editor[data-mode="confirm"] .review-table tr{display:grid;grid-template-columns:118px minmax(0,1fr);border-bottom:1px solid #e2e6ea}
 #dialog.ticket-dialog #editor[data-mode="confirm"] .review-table th,#dialog.ticket-dialog #editor[data-mode="confirm"] .review-table td{padding:3px 6px;border:0;font-size:12px;line-height:16px;text-align:left;overflow-wrap:anywhere}
 #dialog.ticket-dialog #editor[data-mode="confirm"] .review-table th{width:auto;color:#4d5b54}
}
