/* One control language, and one heading scale, on every screen (2026-11-03). Headings are at the end of the file.
   The audit of nine screens found five primary-button variants, secondary corners from 4 to 11px and
   fields from 12 to 22px with three border colours. This sheet loads last on the notebook, plate and
   class pages and pins every ordinary control to the metrics ui_controls.css already defines:
   role-based heights (40px ordinary, 36px choices, 44px primary/touch), 6px corners (--control-radius), 13px/500 (primary 14px/500), control-border on paper,
   action-green text, ink in fields. Selectors carry `html body` and the screen's id only to outrank the
   older per-screen rules; they add no new design.
   Deliberate exceptions, left alone: the rail (48px circles), work tabs (underline, 0 radius), the sidebar
   create pill (＋ 新規レシピ／＋ 新規クラス), dish/record cards that happen to be buttons, chips in dense
   filter rows (36px), the dish-name field in the workbench (22px, no border) and the overview numerals.
   Dense ingredient rows keep 36px fields and 40px row actions so the table does not grow. */
/* Fields: ink text, control-border, 6px, 13px and up; single-line fields reach 44px. */
/* The note's ingredient name reads as text, its amount field's frame is drawn on the group with the candidate arrow, and
   steps are a hairline list (2026-11-11), so those fields are left out here (theme.css and recipe_workspace.css style them); :where() keeps this rule's weight unchanged. */
html body:is(.notebook-page,.plate-page,.classes-page) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):where(:not([data-hero-ingredient-name],[data-hero-amount])),textarea:where(:not([data-step-text])),select){color:var(--ink);border-color:var(--control-border);border-radius:var(--control-radius)}
html body:is(.notebook-page,.plate-page,.classes-page) :is(#cooking-note-form :is(input,textarea),#discovery-workspace .discovery-entry-search input){font-size:14px}
html body #discovery-workspace .discovery-entry-search input{min-height:44px;border-radius:var(--control-radius)}
/* Route switch (料理／プレート／ブックマーク) and the 自分のノートへ buttons share the ordinary corner and weight. */
html body .workspace-navigation .notebook-routes a{border-radius:var(--control-radius);font-weight:500}
/* The 自分のノートへ buttons are fixed at the source (task_workspace.css, same metrics). */
/* 出会う */
html body #discovery-workspace :is(.discovery-text-action,.discovery-more-themes,.assembly-home-shortcuts button,.discovery-daily-reactions button){border-radius:var(--control-radius);color:var(--action);font-weight:500;font-size:13px}
html body #discovery-workspace .discovery-daily-choices button{border-radius:var(--control-radius)}
html body #discovery-workspace .discovery-entry-search button{min-height:44px;border-radius:var(--control-radius);font:500 14px/1.5 var(--font-sans)}
/* 組み立てる and 比べて変える share #recipe-analysis-dialog, whose base rule gave every button ink text and a rule border. */
html body #recipe-analysis-dialog button{color:var(--action);border-color:var(--control-border);font-weight:500;font-size:13px}
/* Compact workbench controls keep their own shape (2026-11-04): the round remove mark, pill chips (追加候補, candidates,
   suggestions) and text links. This rule had made them 44px boxes with the control radius. :where() keeps the exclusion
   from raising this rule above the specific ones below (.iwb-draft-btn's white text). */
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button:where(:not(.iwb-side-close,.iwb-measure-grams,.iwb-aim-remove,.iwb-pick-alert-btn,.iwb-pick-remove,.iwb-tray-toggle,.iwb-pick-bar-adopt,.iwb-aim-chip-add,.iwb-kind-guess,.iwb-name,.iwb-panel-tabs button,.iwb-panel-picks button,.iwb-link,.iwb-add-custom,.iwb-accept-all,.iwb-row-candidates button,.iwb-row-tag-prep button,.iwb-custom-goal button,.iwb-suggest button,.iwb-suggest-field button,.iwb-dish-proposed button,.iwb-row small button)),html body #recipe-analysis-dialog .iwb-header-actions button{min-height:var(--control-height);padding-block:var(--control-padding-block);border-radius:var(--control-radius);color:var(--action);border-color:var(--control-border);font-weight:500;font-size:13px}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) :is(.iwb-form p button,.iwb-footer button,.iwb-dish-name>button){font-size:13px}
/* 完成イメージ's 生成 button is a primary too (2026-11-10: the broad .iwb button rule above had turned its text
   the same green as its fill). */
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button.iwb-draft-btn,html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button.fi-generate,html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-savebar button[data-ready="true"],html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .lab-primary{min-height:44px;border-radius:var(--control-radius);border-color:var(--action);background:var(--action);color:var(--paper);font-weight:500;font-size:14px;filter:none}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button.iwb-draft-btn:hover:not(:disabled),html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button.fi-generate:hover:not(:disabled),html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-savebar button[data-ready="true"]:hover:not(:disabled),html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .lab-primary:hover:not(:disabled){background:var(--accent-ink);border-color:var(--accent-ink);filter:none}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-tabs button{border-radius:var(--control-radius);font-size:13px;border:0}
/* The empty start's 追加 is filled with the action colour, so it takes the paper text of a primary button. */
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb-empty-start button[data-iwb-add]{color:var(--paper)}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb-empty-start button[data-iwb-add]:hover:not(:disabled){background:var(--accent-ink);border-color:var(--accent-ink);color:var(--paper);filter:none}
/* A picked 次の一手 (選択中, 2026-11-04): pressed, not primary. */
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button.iwb-option-toggle.is-on{border-color:var(--action);background:var(--lab-accent-soft);color:var(--action);font-weight:600}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button.iwb-tab{border:0;border-bottom:3px solid transparent;border-radius:0;font-size:14px}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button.iwb-tab[aria-selected=true]{border-bottom-color:var(--action);font-weight:600}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-side-tabs button{border-radius:var(--control-radius)}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-row-actions button{min-height:40px;padding:8px 10px;border:0;border-radius:var(--control-radius)}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-row-actions .iwb-row-remove{color:var(--warning-ink)}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-measure-grams{min-height:0;padding:0;border:0;background:none;font-size:12px;color:var(--lab-soft)}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-link{display:inline-flex;align-items:center;min-height:32px;padding:4px 8px;margin:-4px -8px;border:0;border-radius:var(--control-radius);font-size:13px;background:none}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-name,html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-row .iwb-name{min-height:32px;padding:4px 6px;margin:-4px -6px;border:0;border-radius:var(--control-radius);background:none;color:var(--ink);font-weight:600;font-size:14px}
/* An ingredient name opens its panel (2026-11-05): only an underline and the panel icon on hover (no fill, so it does not
   read as a field); the one whose panel is open keeps a green fill. */
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-name{display:inline-flex;align-items:center;gap:4px;cursor:pointer}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-name:hover{background:none;text-decoration:underline;text-underline-offset:3px}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-name[aria-expanded="true"]{color:var(--lab-accent,var(--action))}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-name[aria-expanded="true"]{background:var(--lab-accent-soft)}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb dd>button{min-height:36px;padding:4px 8px;border:0;border-radius:var(--control-radius);font-size:inherit;font-weight:inherit}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb :is(input:where(:not([type=checkbox],[type=radio])),select,textarea){min-height:44px;border-radius:var(--control-radius);border-color:var(--control-border);font-size:13px}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb :is(.iwb-row :is(input,select),.iwb-amount input){min-height:36px;padding-top:4px;padding-bottom:4px}
/* With a mouse the ingredient rows run compact (2026-11-05, user: save height); touch keeps the 36px fields. */
@media (hover:hover) and (pointer:fine){html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb :is(.iwb-row :is(input,select),.iwb-amount input,.iwb-add input,.iwb-add button){min-height:30px;padding-top:2px;padding-bottom:2px}}
@media (hover:hover) and (pointer:fine){html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb :is(.iwb-aim-assess-actions button:not(.iwb-link)){min-height:32px;padding-top:3px;padding-bottom:3px}}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb #iwb-overview-servings{min-height:36px;font-size:18px}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-dish-name input{min-height:0;border:0;border-radius:0;font-size:22px}
html body :is(#recipe-lab,.recipe-lab) :is(.lab-browser-heading,.lab-browser-filters) :is(button[type],button:not([type])),html body :is(#recipe-lab,.recipe-lab) :is(button.lab-small,.lab-start-sources button,.lab-start-browser>button){min-height:var(--control-height);padding-block:var(--control-padding-block);border-radius:var(--control-radius);color:var(--action);font-weight:500;font-size:13px}
html body :is(#recipe-lab,.recipe-lab) :is(.lab-browser-filters,.lab-ingredient-filter,.lab-browser) :is(input,select){min-height:44px;font-size:14px}
/* 相性を見る: the token change already gives its buttons 6px corners. */
/* 記録する home and プレート home */
html body :is(#notebook-home,#plate-home) button{font-weight:500}
html body :is(#notebook-home,#plate-home) :is(.notebook-home-section-heading button,.notebook-home-actions button,main>button,.plate-more){color:var(--action)}
html body :is(#notebook-home,#plate-home) :is(.notebook-home-actions button:first-child,.notebook-home-start button:first-child,.plate-home-empty button){color:var(--paper);font-size:14px}
html body #notebook-home .notebook-record-recipe{min-height:32px;padding:4px 0;margin:-4px 0}
/* Recipe page: sidebar search, sort chips, memo controls. The theme link and trash menu keep their !important borders. */
html body .workspace-sidebar .workspace-search-field input.search{font-size:13px;border-color:var(--control-border);border-radius:var(--control-radius)}
html body .workspace-sort-panel button{border-radius:var(--control-radius);font-size:13px}
html body .workspace-sidebar .workspace-sidebar-heading .workspace-theme-manage{font-size:13px;font-weight:500;padding-inline:6px}
html body .cooking-notes>button,html body .cooking-notes .ui-button--primary{min-height:44px}
html body .recipe-trash-entry>.recipe-trash-more{color:var(--ink-soft)}
html body .recipe-trash-footer .ui-button{font-weight:500}
/* Phones: fields at 16px stop iOS zooming; nothing else changes. */
@media(max-width:600px){html body:is(.notebook-page,.plate-page,.classes-page) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]),textarea,select),html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb :is(input,select,textarea){font-size:16px}}
/* ---- Headings (2026-11-03) ----
   Three steps on every working screen: page title 400 26px (24px on phones), section 500 18px, sub-section 500 15px,
   fine labels 500 14px, all with zero tracking (the old .01em tracking on sans headings is dropped). Discovery keeps its
   documented editorial scale (dish 30 / section 24 / card 17) but its two page titles join the 26px row and its two oversized
   section heads (28/30px, weight 500) return to the 24px/400 section size. The 12px もう一問 eyebrow keeps its tracking. */
html body:is(.notebook-page,.plate-page,.classes-page) :is(h1,h2,h3,h4){letter-spacing:0}
html body .step-knowledge-quiz h3{letter-spacing:.04em}
html body #discovery-workspace :is(.assembly-home-top h1,.discovery-pick h1.discovery-pick-heading){font:400 26px/1.5 var(--font-sans)}
html body #discovery-workspace :is(#home-saved-title,#home-week-title){font:400 24px/1.5 var(--font-sans)}
html body #feature-body .feature-title,html body.classes-page #class-content>h2{font:400 26px/1.5 var(--font-sans)}
html body .workspace-sidebar-heading h2{font:500 15px/1.5 var(--font-sans)}
html body :is(.cooking-notes>h2,.recipe-content-editor>h2){font:500 18px/1.5 var(--font-sans)}
html body .recipe-content-editor :is(.ingredient-section-heading h3,.process-editor>h3,.ingredient-app-entry h3){font:500 15px/1.5 var(--font-sans)}
html body #recipe-brief-summary h3{font:500 14px/1.5 var(--font-sans)}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) :is(.iwb .iwb-history-panel h3,.iwb-history-panel h3,.iwb .iwb-decision-heading h4){font:500 18px/1.5 var(--font-sans)}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb :is(.iwb-composition-panel h4,.iwb-process-block h4,h4.iwb-block-title.iwb-block-title){font:500 15px/1.5 var(--font-sans)}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb .iwb-knowledge h4{font:500 14px/1.5 var(--font-sans)}
html body :is(#recipe-lab,.recipe-lab) :is(.lab-browser-heading h3,h3.lab-h){font:500 18px/1.5 var(--font-sans)}
html body :is(#recipe-lab,.recipe-lab) h4.lab-workbench-lead.lab-workbench-lead{font:500 14px/1.5 var(--font-sans)}
@media(max-width:700px){html body #discovery-workspace :is(.assembly-home-top h1,.discovery-pick h1.discovery-pick-heading),html body #feature-body .feature-title,html body.classes-page #class-content>h2{font-size:24px}}
/* 料理の種類 is a chip beside the dish name, not a form field (2026-11-05). */
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb select.iwb-kind-select{min-height:30px;padding:2px 26px 2px 8px;font-size:13px;background-color:var(--lab-paper)}
/* The proposal button is the main action only when pressing would help now (2026-11-05). */
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button.iwb-draft-btn.is-quiet,html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button.iwb-draft-btn.is-quiet:hover:not(:disabled){background:var(--paper,#fff);border:1px solid var(--control-border);color:var(--action);filter:none}


/* Shared action density, 2026-11-06. Scope by role: never size content cards as buttons. */
html body :is(.settings-sheet,.ref-sheet,.recipe-intake,.intake-source-summary,.plate-action-dialog) button,
html body :is(#notebook-home,#plate-home) :is(.notebook-home-actions,.notebook-home-start,.notebook-home-tools,.notebook-home-section-heading,.plate-home-heading) button,
html body :is(.class-actions,.class-form,.class-drafts,.class-confirm,.class-head) button,
html body .plate-page-actions button,
html body.plate-page :is(.workspace-head,.new-plate-actions,.meal-heading,.meal-actions,.meal-dish-fields,.meal-structure form,.plate-account-storage,.expert-panel-actions,.dish-dialog-header,.dish-dialog-footer) button,
html body #pairing-workspace :is(.pairing-heading,.pairing-actions,.pairing-filters) button{
 box-sizing:border-box;min-height:var(--control-height);height:auto;padding-block:var(--control-padding-block);line-height:1.5;
}
html body #discovery-workspace :is(.discovery-pagination,.discovery-actions,.discovery-entry-actions) button,
html body #discovery-workspace :is(.discovery-text-action,.discovery-more-themes){
 min-height:var(--control-height);height:auto;padding-block:var(--control-padding-block);font-size:14px;line-height:1.5;
}
html body #discovery-workspace :is(.discovery-daily-reactions,.discovery-daily-choices,.discovery-region-level) button,
html body #recipe-analysis-dialog :is(.iwb-tabs,.iwb-side-tabs,.lab-start-sources,.lab-ingredient-filter) button{
 min-height:var(--control-height-compact);height:auto;padding-block:var(--control-padding-compact);line-height:1.5;
}
html body #recipe-analysis-dialog .iwb-header-actions button,
html body #recipe-analysis-dialog .iwb-form p button{height:auto;min-height:var(--control-height);padding-block:var(--control-padding-block)}
/* Commit/create actions keep a little more visual weight; long labels can grow. */
html body :is(.settings-sheet,.ref-sheet,.recipe-intake,.plate-action-dialog,.class-actions,.class-form,.new-plate-actions) :is(button.primary,.save-btn,button[type=submit],.lab-primary),
html body :is(#notebook-home,#plate-home) :is(.notebook-home-actions button:first-child,.notebook-home-start button:first-child,.plate-home-empty button:first-child){min-height:var(--control-height-primary)}
@media(max-width:700px),(any-pointer:coarse){
 html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb :is(.iwb-row-actions button,.iwb-link,.iwb-name,dd>button){min-height:44px}
}

html body #discovery-workspace .discovery-daily-date .discovery-text-action{min-height:var(--control-height);padding-block:var(--control-padding-block)}

/* Ingredient adoption is a primary action, not the surrounding green-on-paper tools. */
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button[data-iwb-add]{
 min-height:var(--control-height-primary);background:var(--action);border-color:var(--action);color:var(--paper);
}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb button[data-iwb-add]:hover:not(:disabled){background:var(--accent-ink)}

/* 組み立てる empty start (2026-11-13): the other ways to start and 自分のノートへ read as links, not as a row of buttons. */
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb.iwb-empty-start .iwb-heading button:is([data-iwb-leave],.iwb-start-actions button:not([data-lab-workbench-blank])){display:inline-flex;align-items:center;min-height:44px;padding:0;border:0;border-radius:0;background:none;color:var(--action);font-size:14px;font-weight:500;text-decoration:underline;text-underline-offset:4px}
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb.iwb-empty-start .iwb-heading button:is([data-iwb-leave],.iwb-start-actions button):hover{background:none;text-decoration-thickness:2px}
html body #recipe-analysis-dialog:has(.iwb-empty-start) .analysis-header button[data-analysis-close]{padding-inline:0;border:0;background:none;color:var(--action);font-size:14px;text-decoration:underline;text-underline-offset:4px}
html body #recipe-analysis-dialog:has(.iwb-empty-start) .analysis-header button[data-analysis-close]:hover{background:none;text-decoration-thickness:2px}
/* The dish name became a one-line textarea (f0e098db); on the empty start it keeps the bordered field. */
html body #recipe-analysis-dialog :is(#recipe-lab,.recipe-lab) .iwb.iwb-empty-start .iwb-dish-name :is(input,textarea)[data-iwb-text="title"]{min-height:44px;padding:10px 12px;border:1px solid var(--control-border);border-radius:var(--control-radius);background:var(--paper);font-size:16px;line-height:1.5}

