.cross-shell{max-width:1050px;width:100%;margin:0 auto;color:var(--ink);padding:8px 0 20px;min-width:0}
.cross-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}
.cross-eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:750;color:var(--muted);margin:0 0 8px}
.cross-title{font-size:clamp(26px,4vw,38px);font-weight:680;letter-spacing:-1px;line-height:1.15;margin:0 0 10px}
.cross-intro{color:var(--muted);font-size:14px;line-height:1.6;margin:0;max-width:600px}
.cross-setup{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:10px}
.cross-level-label{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:10px}
.cross-select{border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:9px;padding:11px 34px 11px 13px;min-height:44px;font-size:15px;max-width:100%}
.cross-button{min-height:44px;border:1px solid var(--line);border-radius:9px;padding:10px 14px;background:var(--paper);color:var(--ink);font-size:13px;line-height:1.3;touch-action:manipulation}
.cross-button:hover{border-color:var(--accent);background:var(--tint)}
.cross-primary{background:var(--accent);border-color:var(--accent);color:var(--paper);font-weight:650}
.cross-primary:hover{background:var(--accent);color:var(--paper);filter:brightness(1.07)}
.cross-description{color:var(--muted);font-size:12px;margin:0 0 20px;line-height:1.5}
.cross-layout{display:grid;grid-template-columns:minmax(0,1fr) 255px;gap:28px;align-items:start}
.cross-card{background:var(--paper);border:1px solid var(--line);border-radius:15px;padding:18px;min-width:0}
.cross-board-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;font-size:12px;color:var(--muted)}
.cross-board-header .cross-button{padding:6px 10px;min-height:36px;font-size:12px}
.cross-count{color:var(--green);font-weight:650}
.cross-timer{margin-left:auto;font-variant-numeric:tabular-nums}
.cross-board-wrap{max-width:520px;width:100%;margin:0 auto;position:relative}
.cross-board{display:grid;grid-template-columns:1fr .5fr 1fr .5fr 1fr;gap:7px;width:100%;padding:3px;touch-action:manipulation}
.cross-row{display:contents}
.cross-cell{aspect-ratio:1;border:2px dashed var(--line);border-radius:12px;padding:0;display:flex;align-items:center;justify-content:center;min-width:0;background:var(--bg);color:var(--accent);font-size:clamp(27px,3.7vw,43px);font-weight:550;font-variant-numeric:tabular-nums;line-height:1;touch-action:manipulation}
.cross-cell:hover{background:var(--tint);border-color:var(--accent)}
.cross-cell:active{transform:none}
.cross-cell.cross-given{border:2px solid var(--line);color:var(--ink);background:var(--peer);font-weight:650}
.cross-cell.cross-selected{border:2px solid var(--accent);background:var(--tint);box-shadow:0 0 0 2px var(--tint)}
.cross-cell.cross-error{color:var(--error);border-color:var(--error);background:var(--error-bg)}
.cross-cell.cross-hinted{border-color:var(--green);box-shadow:inset 0 0 0 2px var(--green-bg)}
.cross-cell:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.cross-symbol{display:flex;align-items:center;justify-content:center;min-height:35px;font-size:clamp(22px,3vw,34px);font-weight:500;color:var(--muted);line-height:1;user-select:none}
.cross-block{min-height:35px}
.cross-pause{position:absolute;inset:0;width:100%;height:100%;border:1px solid var(--line);border-radius:12px;background:var(--peer);color:var(--accent);font-size:clamp(20px,4vw,30px);font-weight:650;z-index:2;display:flex;align-items:center;justify-content:center;padding:20px}
.cross-tools{display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between;margin-top:20px}
.cross-tools .cross-button{flex:1;white-space:nowrap;padding:9px 10px}
.cross-keyboard-help{color:var(--muted);font-size:10px;text-align:center;line-height:1.5;margin:13px 0 0}
.cross-controls{min-width:0;display:flex;flex-direction:column;gap:12px}
.cross-selection{font-size:12px;color:var(--muted);line-height:1.5;margin:0;min-height:36px}
.cross-pad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.cross-digit{font-size:25px;color:var(--accent);min-height:51px;padding:8px 0;line-height:1;border-radius:9px;touch-action:manipulation}
.cross-digit:last-child{grid-column:2}
.cross-hint-button{background:var(--green-bg);border-color:var(--green-bg);color:var(--green);margin-top:4px}
.cross-hint-button:hover{background:var(--green-bg);border-color:var(--green)}
.cross-hint-text{font-size:12px;color:var(--muted);line-height:1.65;margin:0}
.cross-equations-heading{font-size:12px;letter-spacing:.4px;color:var(--muted);margin:5px 0 0;font-weight:650}
.cross-equations{list-style:none;display:grid;gap:5px;margin:0;padding:0;font-variant-numeric:tabular-nums}
.cross-equation{display:flex;align-items:center;gap:10px;font-size:13px;padding:7px 9px;border-radius:6px;background:var(--paper);border:1px solid var(--line);line-height:1.4}
.cross-equation-tag{font-size:10px;color:var(--muted);min-width:32px}
.cross-equation-correct{color:var(--green);background:var(--green-bg);border-color:var(--green-bg)}
.cross-equation-error{color:var(--error);background:var(--error-bg);border-color:var(--error)}
.cross-win{background:var(--green-bg);color:var(--green);border:1px solid var(--green);border-radius:12px;padding:18px 20px;margin-top:20px}
.cross-win h3{font-size:20px;line-height:1.4;margin:0 0 7px}
.cross-win p{font-size:13px;line-height:1.6;margin:0}
.cross-status{font-size:13px;line-height:1.6;margin:18px 0 6px;color:var(--ink)}
.cross-storage,.cross-rule{font-size:11px;color:var(--muted);line-height:1.7;margin:4px 0}
.cross-rule{max-width:730px;margin-top:12px}
@media(max-width:850px){.cross-layout{grid-template-columns:minmax(0,1fr) 220px;gap:18px}.cross-card{padding:14px}.cross-board{gap:5px}.cross-cell{font-size:clamp(25px,4vw,36px)}}
@media(max-width:650px){
  .cross-shell{padding:8px 0 18px}.cross-heading{margin-bottom:16px}.cross-title{font-size:29px}.cross-intro{font-size:12px;line-height:1.6}
  .cross-setup{gap:9px;align-items:stretch;display:grid;grid-template-columns:1fr 1fr}.cross-level-label{display:block;font-size:0}.cross-select{width:100%;padding:10px 26px 10px 10px;font-size:14px}.cross-setup>.cross-button{padding:10px 8px;font-size:13px}
  .cross-layout{display:flex;flex-direction:column;gap:17px}.cross-card{width:100%;padding:12px 10px;border-radius:12px}.cross-board-header{margin-bottom:12px;font-size:11px;gap:8px}.cross-board-header .cross-button{min-height:36px}
  .cross-board-wrap{max-width:440px}.cross-board{gap:5px;padding:3px;grid-template-columns:1fr .43fr 1fr .43fr 1fr}.cross-cell{font-size:clamp(27px,8vw,38px);border-radius:9px}.cross-symbol{min-height:27px;font-size:25px}.cross-block{min-height:27px}
  .cross-controls{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:11px 14px}.cross-selection{grid-column:1/-1;min-height:0;margin:0;text-align:center}.cross-pad{grid-column:1/-1;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.cross-digit{min-height:48px;font-size:24px;padding:9px 0}.cross-digit:last-child{grid-column:auto}
  .cross-hint-button,.cross-hint-text,.cross-controls>.cross-button,.cross-equations-heading,.cross-equations{grid-column:1/-1}.cross-hint-button{margin-top:0}.cross-equations{grid-template-columns:1fr 1fr;gap:6px}.cross-equation{padding:7px 6px;font-size:12px;gap:5px}.cross-equation-tag{min-width:26px;font-size:9px}
  .cross-tools{gap:5px;margin-top:14px}.cross-tools .cross-button{font-size:12px;min-height:44px;padding:8px 5px}.cross-keyboard-help{display:none}.cross-description{margin-bottom:14px;font-size:11px}.cross-status{font-size:12px}.cross-win{padding:15px}.cross-win h3{font-size:18px}
}
@media(max-width:360px){.cross-title{font-size:26px}.cross-card{padding:10px 7px}.cross-board{gap:4px}.cross-cell{font-size:25px;border-radius:8px}.cross-symbol{font-size:22px;min-height:24px}.cross-block{min-height:24px}.cross-equation{font-size:11px;gap:3px}.cross-digit{min-height:46px}.cross-setup{gap:7px}.cross-setup>.cross-button{font-size:12px}}
@media print{.cross-shell{display:none}}
.cross-modes{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 17px}.cross-mode{min-height:44px;padding:10px 17px;border:1px solid var(--line);border-radius:24px;color:var(--muted);background:var(--paper);font-size:13px}.cross-mode[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:var(--paper)}.cross-progress{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 20px;font-size:11px;color:var(--muted)}.cross-progress>span{padding:7px 10px;border:1px solid var(--line);border-radius:7px;background:var(--paper)}.cross-progress>span:first-child{color:var(--green)}.cross-input-tools{display:grid;grid-template-columns:1fr 1fr;gap:7px}.cross-input-tools .cross-button{font-size:11px;padding:9px 6px}.cross-input-help{font-size:11px;line-height:1.6;color:var(--muted);margin:0}.cross-cell.cross-peer:not(.cross-selected):not(.cross-error){border-color:var(--muted);background:var(--tint)}.cross-equation{padding:0;overflow:hidden}.cross-equation-button{display:flex;gap:10px;align-items:center;width:100%;min-width:0;min-height:38px;padding:7px 9px;border:0;background:transparent;border-radius:5px;color:inherit;text-align:left;font-size:13px;line-height:1.4;font-weight:400}.cross-equation-button:hover{background:var(--tint)}.cross-equation-button:disabled{opacity:1;cursor:default}.cross-equation-active{border-color:var(--green);box-shadow:inset 3px 0 0 var(--green)}.cross-equation-error.cross-equation-active{border-color:var(--error);box-shadow:inset 3px 0 0 var(--error)}.cross-tools .cross-button{flex:1 1 40%}.cross-button:disabled,.cross-mode:disabled{cursor:default;opacity:.5}
@media(max-width:650px){.cross-modes{margin-bottom:13px;gap:6px}.cross-mode{font-size:12px;padding:9px 14px}.cross-progress{font-size:10px;margin-bottom:15px;gap:5px}.cross-progress>span{padding:6px 8px}.cross-input-tools,.cross-input-help{grid-column:1/-1}.cross-input-tools .cross-button{font-size:12px}.cross-input-help{text-align:center}.cross-equation-button{padding:7px 6px;font-size:12px;gap:5px}.cross-tools .cross-button{flex:1 1 40%}}

/* Genuine arithmetic crossword networks and their format selector. */
.cross-format-shell{width:100%;min-width:0;max-width:1160px;margin:0 auto}
.cross-format-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 auto 22px;padding:14px 17px;max-width:1050px;background:var(--paper);border:1px solid var(--line);border-radius:12px}
.cross-format-label{display:flex;align-items:center;gap:12px;color:var(--ink);font-size:13px;font-weight:600}
.cross-format-select{min-height:44px;max-width:100%;font-size:14px}
.cross-format-note{font-size:12px;line-height:1.6;color:var(--muted);margin:0;flex:1 1 240px}
.cross-format-panel{min-width:0;width:100%}
.branch-shell{max-width:1120px}
.branch-layout{display:grid;grid-template-columns:minmax(0,1fr) 265px;gap:22px;align-items:start;min-width:0}
.branch-card{padding:14px;min-width:0}
.branch-pan-note{font-size:11px;line-height:1.6;color:var(--muted);margin:0 0 12px}
.branch-board-frame{position:relative;width:100%;min-width:0;background:var(--bg);border-radius:9px;overflow:hidden}
.branch-board-pan{width:100%;max-height:660px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:9px;scrollbar-gutter:stable;touch-action:pan-x pan-y}
.branch-board{--branch-cell:44px;display:grid;grid-template-columns:repeat(var(--branch-cols),var(--branch-cell));grid-template-rows:repeat(var(--branch-rows),var(--branch-cell));gap:3px;width:max-content;min-width:100%;padding:9px;touch-action:pan-x pan-y}
.branch-row{display:contents}
.branch-number{position:relative;width:44px;height:44px;min-width:44px;min-height:44px;border:2px dashed var(--line);border-radius:8px;padding:0;display:flex;align-items:center;justify-content:center;color:var(--accent);background:var(--paper);font-size:21px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1;touch-action:manipulation}
.branch-number:disabled{opacity:1;cursor:default}
.branch-number:hover{background:var(--tint);border-color:var(--accent)}
.branch-number.branch-given{color:var(--ink);border:2px solid var(--line);background:var(--peer)}
.branch-number.branch-peer{background:var(--tint);border-color:var(--muted)}
.branch-number.branch-selected{border:2px solid var(--accent);box-shadow:0 0 0 2px var(--tint);background:var(--tint)}
.branch-number.branch-hinted{border-color:var(--green);box-shadow:inset 0 0 0 2px var(--green-bg)}
.branch-number.branch-error{color:var(--error);border-color:var(--error);background:var(--error-bg)}
.branch-number.branch-shared:after{content:'';position:absolute;right:3px;top:3px;width:5px;height:5px;background:var(--green);border-radius:50%}
.branch-number:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.branch-symbol{display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:23px;line-height:1;user-select:none}
.branch-symbol-active{color:var(--green);font-weight:700}
.branch-pause{position:absolute;inset:0;z-index:3;width:100%;height:100%;border:1px solid var(--line);border-radius:9px;padding:20px;background:var(--peer);color:var(--accent);font-size:25px;font-weight:650;display:flex;align-items:center;justify-content:center}
.branch-layout .branch-controls{min-width:0;gap:11px}
.branch-equations{max-height:390px;overflow:auto;overscroll-behavior:contain;padding-right:3px}
.branch-card .cross-tools{margin-top:15px}
.branch-card .cross-tools .cross-button{flex:1 1 40%}
@media(max-width:850px){.branch-layout{grid-template-columns:minmax(0,1fr) 230px;gap:15px}.branch-card{padding:10px}}
@media(max-width:720px){.cross-format-bar{margin:0 10px 18px;padding:12px}.cross-format-label{display:block;width:100%;font-size:12px}.cross-format-select{display:block;width:100%;margin-top:7px}.cross-format-note{font-size:11px;flex-basis:100%}.branch-shell{padding:8px 10px 20px}.branch-layout{display:flex;flex-direction:column;gap:17px}.branch-card{width:100%;padding:10px}.branch-board-pan{max-height:62svh}.branch-layout .branch-controls{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:11px 13px}.branch-controls .cross-selection,.branch-controls .cross-pad,.branch-controls .cross-input-tools,.branch-controls .cross-input-help,.branch-controls .cross-hint-button,.branch-controls .cross-hint-text,.branch-controls>.cross-button,.branch-controls .cross-equations-heading,.branch-controls .cross-equations{grid-column:1/-1}.branch-controls .cross-pad{grid-template-columns:repeat(5,minmax(0,1fr))}.branch-controls .cross-digit{min-height:48px;font-size:24px}.branch-controls .cross-digit:last-child{grid-column:auto}.branch-controls .cross-equations{display:grid;grid-template-columns:1fr 1fr;max-height:300px}.branch-pause{font-size:22px}.branch-pan-note{font-size:10px;margin-bottom:10px}}
