/* An optional walkthrough that leaves the kitchen controls usable. */
.planner-view-head > .kitchen-tour-start { margin-left:auto; flex-shrink:0; border:1px solid #1673d3; background:#eef6ff; color:#0f5fac; cursor:pointer; }
.kitchen-tour-start:hover { background:#dceeff; }
.kitchen-tour-start:focus-visible, .kitchen-tour button:focus-visible { outline:3px solid #765b00; outline-offset:2px; }
.kitchen-tour-spotlight { position:fixed; z-index:1200; border:2px solid #d6a700; border-radius:8px; background:transparent; box-shadow:0 0 0 4px #f4c40040; pointer-events:none; }
.kitchen-tour { position:fixed; z-index:1201; box-sizing:border-box; width:min(410px,calc(100vw - 24px)); max-height:calc(100vh - 24px); overflow:auto; overscroll-behavior:contain; padding:18px; border:1px solid #a8c6e3; border-top:4px solid var(--yellow); border-radius:9px; background:#fff; color:var(--ink); box-shadow:0 8px 30px #152d4533; }
.kitchen-tour[hidden], .kitchen-tour-spotlight[hidden] { display:none; }
.kitchen-tour-progress { margin:0 0 5px; color:#0f5fac; font-size:14px; font-weight:700; line-height:1.3; }
.kitchen-tour-step-label { display:block; margin-bottom:5px; font-size:14px; font-weight:700; }
.kitchen-tour-step { width:100%; min-width:0; min-height:40px; margin-bottom:14px; padding:8px; border:1px solid #a8c6e3; border-radius:6px; background:#f5f9ff; color:var(--ink); font:inherit; font-size:14px; }
.kitchen-tour-step:focus-visible { outline:3px solid #765b00; outline-offset:2px; }
.kitchen-tour h2 { margin:0 0 8px; font-size:18px; line-height:1.3; }
.kitchen-tour h2:focus { outline:none; }
.kitchen-tour-text { margin:0; font-size:16px; line-height:1.45; }
.kitchen-tour-instructions { margin:12px 0; padding-left:24px; font-size:16px; line-height:1.5; }
.kitchen-tour-instructions li + li { margin-top:8px; }
.kitchen-tour-tip { margin:12px 0 0; padding:10px 12px; border-left:3px solid #1673d3; border-radius:4px; background:#eef6ff; font-size:14px; line-height:1.5; }
.kitchen-tour-guide { display:block; width:100%; min-height:40px; margin-top:12px; padding:8px; border:1px solid #a8c6e3; border-radius:6px; background:#f5f9ff; color:#0f5fac; font:inherit; font-size:14px; cursor:pointer; }
.kitchen-tour-guide:hover { background:#dceeff; }
.kitchen-tour-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:14px; }
.kitchen-tour-actions button { min-height:34px; padding:6px 9px; border:1px solid #c7d0d9; border-radius:6px; font-size:14px; cursor:pointer; }
.kitchen-tour-secondary { background:#fff; color:#3b4651; }
.kitchen-tour-secondary:hover:not(:disabled) { background:#f0f5f9; }
.kitchen-tour-actions .kitchen-tour-next { border-color:#1673d3; background:#1673d3; color:#fff; }
.kitchen-tour-next:hover { background:#0f63b9; }
.kitchen-tour-actions button:disabled { opacity:.45; cursor:default; }
#kitchenTourClose { margin-left:auto; }

/* Expanded reference guide follows the existing blue and yellow SAN09 theme. */
.help-dialog { position:fixed; box-sizing:border-box; width:min(980px,calc(100vw - 32px)); max-width:980px; max-height:calc(100dvh - 32px); padding:0; overflow:hidden; }
.help-dialog > .dialog-close { position:absolute; top:12px; right:12px; z-index:2; width:40px; height:40px; border:1px solid #c5d5e5; border-radius:8px; background:#fff; }
.help-dialog .help-card { box-sizing:border-box; max-height:min(88vh,calc(100dvh - 32px)); overflow:auto; overscroll-behavior:contain; padding:30px; color:var(--ink); }
.help-dialog .help-card h2 { margin-right:50px; line-height:1.2; }
.help-dialog .help-intro { margin-bottom:20px; font-size:16px; line-height:1.6; color:#34495e; }
.help-dialog .help-kicker { font-size:14px; }
.help-quickstart { padding:18px 20px; border:1px solid #b9d4ee; border-top:4px solid var(--yellow); border-radius:9px; background:#eef6ff; }
.help-dialog h3 { margin:0 0 10px; font-size:18px; line-height:1.4; }
.help-quickstart ol { margin:0; padding-left:24px; font-size:16px; line-height:1.6; }
.help-quickstart li + li { margin-top:8px; }
.help-quickstart p { margin:14px 0 0; color:#34495e; font-size:14px; line-height:1.6; }
.help-search { margin:24px 0 18px; }
.help-search label { display:block; margin-bottom:8px; font-size:16px; font-weight:700; }
.help-search-controls { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.help-search input { flex:1 1 250px; box-sizing:border-box; width:100%; min-width:0; min-height:44px; padding:10px 12px; border:1px solid #a8c6e3; border-radius:7px; color:var(--ink); background:#fff; font:inherit; font-size:16px; }
.help-search button { min-height:44px; padding:8px 12px; border:1px solid #a8c6e3; border-radius:7px; background:#eef6ff; color:#0f5fac; font:inherit; font-size:14px; cursor:pointer; }
.help-search p { margin:8px 0 0; color:#34495e; font-size:14px; line-height:1.5; }
.help-contents { margin-bottom:20px; }
.help-contents-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 14px; }
.help-contents a { display:block; padding:8px 10px; border:1px solid #d9e1e8; border-radius:6px; background:#f8fbff; color:#0f5fac; font-size:14px; line-height:1.5; text-decoration:none; }
.help-contents a:hover { background:#e7f2ff; text-decoration:underline; }
.help-dialog .help-sections summary { padding:14px 16px; font-size:16px; line-height:1.5; }
.help-dialog .help-sections summary span { align-self:flex-start; }
.help-dialog .help-sections summary::after { align-self:flex-start; padding-top:4px; }
.help-dialog .help-sections > details { scroll-margin-top:14px; }
.help-section-body { padding:2px 20px 20px; overflow-wrap:anywhere; color:#34495e; font-size:16px; line-height:1.65; }
.help-dialog .help-section-body p { margin:12px 0; color:inherit; font-size:inherit; line-height:inherit; }
.help-dialog .help-section-body ol, .help-dialog .help-section-body ul { margin:12px 0; padding:0 0 0 24px; color:inherit; font-size:inherit; line-height:inherit; }
.help-dialog .help-section-body li + li { margin-top:8px; }
.help-section-body h3 { margin-top:20px; color:var(--ink); }
.help-dialog .help-section-body .help-example { margin:16px 0 0; padding:12px 14px; border-left:3px solid #1673d3; border-radius:4px; background:#eaf3ff; font-size:16px; }
.help-dialog .help-note { font-size:16px; line-height:1.6; }
.help-table-wrap { max-width:100%; overflow-x:auto; }
.help-table { width:100%; margin:12px 0; border-collapse:collapse; font-size:14px; line-height:1.5; }
.help-table caption { padding-bottom:8px; text-align:left; font-weight:700; color:var(--ink); }
.help-table th, .help-table td { padding:10px; border:1px solid #ccd9e6; text-align:left; vertical-align:top; }
.help-table th { color:var(--ink); background:#e7f2ff; }
.help-dialog a:focus-visible, .help-dialog button:focus-visible, .help-dialog input:focus-visible, .help-dialog summary:focus-visible { outline:3px solid #765b00; outline-offset:2px; }
.help-dialog [hidden] { display:none!important; }
@media (max-width:600px) {
  .help-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
  .help-dialog .help-card { max-height:calc(100dvh - 16px); padding:22px 16px; }
  .help-dialog .help-card h2 { font-size:24px; }
  .help-quickstart { padding:14px; }
  .help-contents-links { grid-template-columns:1fr; }
  .help-dialog .help-sections summary { gap:8px; padding:12px; }
  .help-section-body { padding:0 14px 16px; }
  .help-table th, .help-table td { padding:8px 6px; }
  .kitchen-tour { padding:14px; }
}
@media print {
  .kitchen-tour-start, .kitchen-tour, .kitchen-tour-spotlight, .help-dialog { display:none!important; }
}

/* Help is visible beside the ruler in both planner views. */
.planner-help-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:6px; margin-left:auto; }
.scheme-ruler-head { flex-wrap:wrap; }
.planner-help-actions .kitchen-tour-start, .iso-controls .kitchen-tour-start { min-height:38px; padding:7px 12px; border:1px solid #1673d3; border-radius:7px; background:#eef6ff; color:#0f5fac; font:700 14px Arial; cursor:pointer; }
@media print { .planner-help-actions { display:none!important; } }

/* Shared view controls and the project introduction stay visible in both views. */
#wallTabs .planner-mode-tools{display:inline-flex;flex:0 0 auto;align-items:center;gap:6px;margin-left:auto;white-space:nowrap}
#wallTabs .planner-mode-tools .planner-view-switch{width:auto;min-width:0;margin:0;flex:0 0 auto}
.planner-help-summary{display:flex;align-items:flex-start;flex-wrap:wrap;gap:10px 14px;margin:10px 0;padding:10px 12px;border-radius:7px;background:#f1f6fa}
.planner-help-summary .kitchen-tour-start{flex:0 0 auto;min-height:38px;padding:7px 12px;border:1px solid #1673d3;border-radius:7px;background:#eef6ff;color:#0f5fac;font:700 14px Arial;cursor:pointer}
.planner-help-summary .recognize-project-hint{flex:1 1 390px;min-width:0;padding:0;margin:0;background:transparent}
@media(max-width:700px){#wallTabs .planner-mode-tools{margin-left:0}}
@media print{.planner-help-summary,.planner-mode-tools{display:none!important}}
