/* A working list for Custom; the guided lesson cards keep their own layout. */
body.learning-course:not([data-path-art]) .learning-tracks button strong { white-space: normal; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
body.custom-workspace .start-menu { padding: 26px 30px 35px; background: #fffaf2ed; }
body.custom-workspace .menu-head { margin-bottom: 20px; }
body.custom-workspace .menu-head h2 { font-size: clamp(1.9rem, 3.8vw, 3.1rem); }
body.custom-workspace #deck-picker { display: block; }
body.custom-workspace #start-menu-copy { display: none; }
body.custom-workspace #menu-tabs { justify-content: flex-start; gap: 0; border-bottom: 1px solid #c8ccc8; padding-bottom: 0; margin: 12px 0 24px; }
body.custom-workspace #menu-tabs .menu-tab { flex: 0 1 auto; padding: 12px 18px; background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: #4d6270; box-shadow: none; font: 600 .88rem/1.3 var(--ui); }
body.custom-workspace #menu-tabs .menu-tab.is-current { color: #112d50; border-bottom-color: #b64335; }
body.custom-workspace #menu-tabs .menu-tab::after { display: none; }
.custom-builder, .custom-history { color: #112d50; text-align: left; font: 14px/1.5 var(--ui); }
.custom-builder *, .custom-history * { box-sizing: border-box; }
.custom-builder h3, .custom-history h3 { margin: 0 0 5px; font: 700 1.45rem/1.3 Georgia, serif; }
.custom-intro p, .custom-history > p { margin: 0 0 22px; color: #506371; }
.custom-tools { display: flex; gap: 22px; align-items: flex-end; margin: 0 0 20px; }
.custom-search { flex: 1; }
.custom-search, .custom-game-label, .custom-name-label { display: grid; gap: 7px; font-size: .8rem; font-weight: 600; }
.custom-builder input[type=search], .custom-builder input[type=text], .custom-builder select, .custom-history input {
  width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; color: #112d50; background: #fffef9; border: 1px solid #9ca9ae; border-radius: 4px; font: 400 .9rem/1.4 var(--ui);
}
.custom-builder button, .custom-history button {
  min-height: 40px; padding: 8px 12px; border: 1px solid #a5b1b8; border-radius: 4px; color: #112d50; background: #fffdf5; box-shadow: none; font: 600 .8rem/1.4 var(--ui); cursor: pointer;
}
.custom-builder button:disabled { opacity: .5; cursor: default; }
.custom-builder button:not(:disabled):hover, .custom-history button:hover { background: #eeeade; border-color: #112d50; }
.custom-builder :is(button,input,select):focus-visible, .custom-history :is(button,input):focus-visible { outline: 3px solid #315f80; outline-offset: 3px; }
.custom-selection-mode { display: flex; gap: 6px; }
.custom-selection-mode button { min-height: 44px; white-space: nowrap; }
.custom-selection-mode button[aria-pressed=true] { background: #f5d8cc; border-color: #ac4537; color: #762c22; }
.custom-layout { display: grid; grid-template-columns: minmax(0,1fr) 285px; gap: 28px; align-items: start; }
.custom-catalog { min-width: 0; }
.custom-list-actions { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding-bottom: 12px; }
.custom-result-count { margin: 0 auto 0 0; color: #506371; font-size: .8rem; }
.custom-list-actions button { min-height: 36px; padding: 4px 0; border: 0; background: none; text-decoration: underline; font-weight: 400; }
.custom-item-list { border-top: 2px solid #112d50; border-bottom: 1px solid #aab3b5; }
.custom-item { display: grid; grid-template-columns: 22px minmax(65px, .8fr) minmax(85px, 1fr) minmax(0, 1.8fr); align-items: center; gap: 13px; min-height: 60px; padding: 10px 12px; border-bottom: 1px solid #dddcd3; background: #fffef76b; cursor: pointer; }
.custom-item:nth-child(even) { background: #edece340; }
.custom-item:hover { background: #eeeade; }
.custom-item.is-selected { background: #f9e2d9; }
.custom-item input, .custom-five-heading input { width: 19px; height: 19px; margin: 0; accent-color: #b04736; }
.custom-item-face { font: 500 1.5rem/1.5 var(--jp-serif); overflow-wrap: anywhere; }
.custom-item-reading { color: #304c62; overflow-wrap: anywhere; font-size: .85rem; }
.custom-item-meaning { color: #506371; overflow-wrap: anywhere; font-size: .81rem; }
.custom-five { margin: 0 0 16px; }
.custom-five:last-child { margin-bottom: 0; }
.custom-five-heading { display: flex; align-items: center; gap: 13px; padding: 11px 12px; color: #112d50; background: #e0e7e9; cursor: pointer; }
.custom-five-heading span { margin-left: auto; font-size: .75rem; color: #506371; }
.custom-selection { position: sticky; top: 20px; padding: 22px; border: 1px solid #b9c1c0; border-top: 3px solid #112d50; background: #fffdf7; }
.custom-selected-items { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 15px 0 8px; max-height: 190px; overflow: auto; }
.custom-selected-items p { margin: 0; color: #506371; font-size: .85rem; }
.custom-selected-items button { padding: 5px 8px; background: #f9e2d9; border-color: #d9a494; min-height: 34px; max-width: 100%; overflow-wrap: anywhere; }
.custom-builder .custom-clear { padding: 6px 0; background: none; border: 0; text-decoration: underline; font-weight: 400; }
.custom-game-label, .custom-name-label { margin-top: 17px; }
.custom-builder .custom-start { width: 100%; margin-top: 22px; min-height: 48px; color: #fff; border-color: #943d30; background: #a64032; font-size: .95rem; }
.custom-builder .custom-start:not(:disabled):hover { background: #823127; }
.custom-save { margin-top: 9px; width: 100%; }
.custom-save-feedback { min-height: 18px; margin: 6px 0; font-size: .78rem; color: #326652; }
.custom-builder .custom-history-link { margin-top: 14px; padding: 14px 0 0; border: 0; border-top: 1px solid #dddcd3; background: none; border-radius: 0; width: 100%; text-align: left; }
.custom-list-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 16px; font-size: .8rem; }
.custom-list-pager[hidden] { display: none; }
.custom-empty { padding: 25px 12px; color: #506371; }
.custom-history-row { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 23px 0; border-top: 1px solid #cbd0cb; }
.custom-history-copy { min-width: 0; }
.custom-history-copy h4 { margin: 0 0 5px; font: 700 1.15rem/1.3 Georgia,serif; overflow-wrap: anywhere; }
.custom-history-copy p { margin: 3px 0; color: #506371; font-size: .8rem; }
.custom-history-preview { overflow-wrap: anywhere; }
.custom-history-actions { display: flex; flex-wrap: wrap; gap: 7px; flex-shrink: 0; }
.custom-history-actions .custom-use { background: #e0e7e9; border-color: #697f8e; }
.custom-mobile-bar { display: none; }
@media(max-width:1000px) {
  .custom-layout { grid-template-columns: minmax(0,1fr) 240px; gap: 18px; }
  .custom-item { grid-template-columns: 20px minmax(60px,.7fr) minmax(0,1fr); gap: 10px; }
  .custom-item-meaning { grid-column: 3; }
  .custom-item input, .custom-item-face { grid-row: 1 / 3; }
}
@media(max-width:760px) {
  body.custom-workspace .start-menu { padding: 18px 12px 28px; }
  body.custom-workspace #menu-tabs .menu-tab { padding: 11px 7px; font-size: .76rem; }
  .custom-tools { flex-direction: column; align-items: stretch; gap: 14px; }
  .custom-layout { display: flex; flex-direction: column; }
  .custom-mobile-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 7px; padding: 10px 0; margin-bottom: 10px; background: #fffaf2; border-bottom: 1px solid #b9c1c0; }
  .custom-mobile-bar > span { margin-right: auto; font-size: .76rem; }
  .custom-mobile-bar button { min-height: 44px; padding: 7px; font-size: .72rem; }
  .custom-builder .custom-mobile-start { background: #a64032; color: #fff; border-color: #a64032; }
  .custom-selection { display: none; position: static; order: -1; width: 100%; padding: 16px; }
  .custom-summary-open .custom-selection { display: block; }
  .custom-catalog { width: 100%; }
  .custom-selected-items { max-height: 100px; }
  .custom-history-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .custom-history-actions { flex-shrink: 1; }
  .custom-item { padding: 9px 6px; }
}
