/* ==========================================================================
   LiftLog — Material Design 3
   https://m3.material.io/

   シード色（ユーザー指定）
     背景 #FFEFB3 … CREAM パレットの T94
     文字 #013E37 … TEAL  パレットの T22
   この2色から M3 のトーナルパレットを生成し、ライト/ダークで役割を反転させている。
     ライト: surface = CREAM,  on-surface = TEAL
     ダーク: surface = TEAL,   on-surface = CREAM
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. デザイントークン
   -------------------------------------------------------------------------- */
:root {
  /* --- Reference: tonal palettes ------------------------------------- */
  --md-ref-teal-0:   #000100;  --md-ref-teal-10:  #00201C;  --md-ref-teal-12:  #002520;
  --md-ref-teal-15:  #002C26;  --md-ref-teal-17:  #00302A;  --md-ref-teal-20:  #003831;
  --md-ref-teal-22:  #013E37;  --md-ref-teal-24:  #05413A;  --md-ref-teal-25:  #08433C;
  --md-ref-teal-30:  #184F47;  --md-ref-teal-35:  #265B53;  --md-ref-teal-40:  #32675F;
  --md-ref-teal-50:  #4C8078;  --md-ref-teal-60:  #659B91;  --md-ref-teal-70:  #7FB5AC;
  --md-ref-teal-80:  #9AD1C7;  --md-ref-teal-90:  #B5EEE3;  --md-ref-teal-100: #FFFFFF;

  --md-ref-cream-0:  #010000;  --md-ref-cream-10: #211B00;  --md-ref-cream-20: #373100;
  --md-ref-cream-30: #4F4713;  --md-ref-cream-35: #5C531F;  --md-ref-cream-40: #695F2A;
  --md-ref-cream-50: #837741;  --md-ref-cream-60: #9D9159;  --md-ref-cream-70: #B9AB72;
  --md-ref-cream-75: #C7B97F;  --md-ref-cream-80: #D5C68C;  --md-ref-cream-85: #E4D49A;
  --md-ref-cream-88: #ECDDA2;  --md-ref-cream-90: #F2E2A7;  --md-ref-cream-92: #F8E8AC;
  --md-ref-cream-94: #FFEFB3;  --md-ref-cream-96: #FFF3CD;  --md-ref-cream-98: #FFF9E8;
  --md-ref-cream-100:#FFFFFF;

  /* --- System: color roles（ライト） ---------------------------------- */
  --md-sys-color-primary:              var(--md-ref-teal-22);
  --md-sys-color-on-primary:           var(--md-ref-cream-94);
  --md-sys-color-primary-container:    var(--md-ref-cream-80);
  --md-sys-color-on-primary-container: var(--md-ref-teal-15);
  --md-sys-color-secondary:            var(--md-ref-teal-35);
  --md-sys-color-on-secondary:         var(--md-ref-cream-96);
  --md-sys-color-secondary-container:  var(--md-ref-cream-85);
  --md-sys-color-on-secondary-container: var(--md-ref-teal-17);
  --md-sys-color-tertiary:             var(--md-ref-cream-35);
  --md-sys-color-on-tertiary:          var(--md-ref-cream-98);
  --md-sys-color-tertiary-container:   var(--md-ref-cream-88);
  --md-sys-color-on-tertiary-container: var(--md-ref-cream-10);

  --md-sys-color-error:                #BA1A1A;
  --md-sys-color-on-error:             #FFFFFF;
  --md-sys-color-error-container:      #FFDAD6;
  --md-sys-color-on-error-container:   #410002;

  --md-sys-color-surface:              var(--md-ref-cream-94);
  --md-sys-color-on-surface:           var(--md-ref-teal-22);
  --md-sys-color-surface-variant:      var(--md-ref-cream-90);
  --md-sys-color-on-surface-variant:   var(--md-ref-teal-35);
  --md-sys-color-surface-dim:          var(--md-ref-cream-88);
  --md-sys-color-surface-bright:       var(--md-ref-cream-98);
  --md-sys-color-surface-container-lowest:  var(--md-ref-cream-98);
  --md-sys-color-surface-container-low:     var(--md-ref-cream-96);
  --md-sys-color-surface-container:         var(--md-ref-cream-92);
  --md-sys-color-surface-container-high:    var(--md-ref-cream-90);
  --md-sys-color-surface-container-highest: var(--md-ref-cream-88);

  --md-sys-color-outline:              var(--md-ref-cream-50);
  --md-sys-color-outline-variant:      var(--md-ref-cream-80);
  --md-sys-color-inverse-surface:      var(--md-ref-teal-22);
  --md-sys-color-inverse-on-surface:   var(--md-ref-cream-94);
  --md-sys-color-inverse-primary:      var(--md-ref-teal-80);
  --md-sys-color-scrim:                #000000;
  --md-sys-color-shadow:               #000000;

  /* 状態レイヤーの不透明度（M3規定値） */
  --md-sys-state-hover-opacity:    0.08;
  --md-sys-state-focus-opacity:    0.10;
  --md-sys-state-pressed-opacity:  0.10;
  --md-sys-state-dragged-opacity:  0.16;
  --md-sys-state-disabled-content: 0.38;
  --md-sys-state-disabled-container: 0.12;

  /* --- System: shape ------------------------------------------------- */
  --md-sys-shape-corner-none:        0px;
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small:       8px;
  --md-sys-shape-corner-medium:     12px;
  --md-sys-shape-corner-large:      16px;
  --md-sys-shape-corner-extra-large:28px;
  --md-sys-shape-corner-full:     9999px;

  /* --- System: elevation --------------------------------------------- */
  --md-sys-elevation-0: none;
  --md-sys-elevation-1: 0 1px 2px 0 rgb(0 0 0 / .30), 0 1px 3px 1px rgb(0 0 0 / .15);
  --md-sys-elevation-2: 0 1px 2px 0 rgb(0 0 0 / .30), 0 2px 6px 2px rgb(0 0 0 / .15);
  --md-sys-elevation-3: 0 1px 3px 0 rgb(0 0 0 / .30), 0 4px 8px 3px rgb(0 0 0 / .15);
  --md-sys-elevation-4: 0 2px 3px 0 rgb(0 0 0 / .30), 0 6px 10px 4px rgb(0 0 0 / .15);
  --md-sys-elevation-5: 0 4px 4px 0 rgb(0 0 0 / .30), 0 8px 12px 6px rgb(0 0 0 / .15);

  /* --- System: motion ------------------------------------------------ */
  --md-sys-motion-easing-standard:            cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-easing-emphasized:          cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
  --md-sys-motion-duration-short4:  200ms;
  --md-sys-motion-duration-medium2: 300ms;
  --md-sys-motion-duration-long2:   500ms;

  /* --- System: typography -------------------------------------------- */
  --md-sys-typescale-brand: "Roboto", "Noto Sans JP", -apple-system, BlinkMacSystemFont,
                            "Hiragino Sans", "Yu Gothic", sans-serif;
  --md-sys-typescale-plain: var(--md-sys-typescale-brand);

  /* --- レイアウト ------------------------------------------------------ */
  --ll-nav-height: 80px;      /* M3 Navigation bar = 80dp */
  --ll-bar-height: 64px;      /* M3 Top app bar (small) = 64dp */
  --ll-gutter: 16px;

  color-scheme: light;
}

/* --- ダーク: ユーザー指定どおり背景(#FFEFB3)と文字(#013E37)を入れ替える ---
   data-theme="light" / "dark" は手動選択、"system"（既定）は OS 設定に追従する。 */
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"], :root:not([data-theme]) { color-scheme: dark; }
}

:root[data-theme="dark"] {
  --md-sys-color-primary:              var(--md-ref-cream-94);
  --md-sys-color-on-primary:           var(--md-ref-teal-22);
  --md-sys-color-primary-container:    var(--md-ref-teal-30);
  --md-sys-color-on-primary-container: var(--md-ref-cream-90);
  --md-sys-color-secondary:            var(--md-ref-cream-85);
  --md-sys-color-on-secondary:         var(--md-ref-teal-20);
  --md-sys-color-secondary-container:  var(--md-ref-teal-35);
  --md-sys-color-on-secondary-container: var(--md-ref-cream-90);
  --md-sys-color-tertiary:             var(--md-ref-cream-80);
  --md-sys-color-on-tertiary:          var(--md-ref-cream-20);
  --md-sys-color-tertiary-container:   var(--md-ref-cream-30);
  --md-sys-color-on-tertiary-container: var(--md-ref-cream-90);

  --md-sys-color-error:                #FFB4AB;
  --md-sys-color-on-error:             #690005;
  --md-sys-color-error-container:      #93000A;
  --md-sys-color-on-error-container:   #FFDAD6;

  --md-sys-color-surface:              var(--md-ref-teal-22);
  --md-sys-color-on-surface:           var(--md-ref-cream-94);
  --md-sys-color-surface-variant:      var(--md-ref-teal-30);
  --md-sys-color-on-surface-variant:   var(--md-ref-cream-80);
  --md-sys-color-surface-dim:          var(--md-ref-teal-12);
  --md-sys-color-surface-bright:       var(--md-ref-teal-35);
  --md-sys-color-surface-container-lowest:  var(--md-ref-teal-10);
  --md-sys-color-surface-container-low:     var(--md-ref-teal-17);
  --md-sys-color-surface-container:         var(--md-ref-teal-24);
  --md-sys-color-surface-container-high:    var(--md-ref-teal-30);
  --md-sys-color-surface-container-highest: var(--md-ref-teal-35);

  --md-sys-color-outline:              var(--md-ref-teal-50);
  --md-sys-color-outline-variant:      var(--md-ref-teal-30);
  --md-sys-color-inverse-surface:      var(--md-ref-cream-94);
  --md-sys-color-inverse-on-surface:   var(--md-ref-teal-22);
  --md-sys-color-inverse-primary:      var(--md-ref-teal-30);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"], :root:not([data-theme]) {
    --md-sys-color-primary:              var(--md-ref-cream-94);
    --md-sys-color-on-primary:           var(--md-ref-teal-22);
    --md-sys-color-primary-container:    var(--md-ref-teal-30);
    --md-sys-color-on-primary-container: var(--md-ref-cream-90);
    --md-sys-color-secondary:            var(--md-ref-cream-85);
    --md-sys-color-on-secondary:         var(--md-ref-teal-20);
    --md-sys-color-secondary-container:  var(--md-ref-teal-35);
    --md-sys-color-on-secondary-container: var(--md-ref-cream-90);
    --md-sys-color-tertiary:             var(--md-ref-cream-80);
    --md-sys-color-on-tertiary:          var(--md-ref-cream-20);
    --md-sys-color-tertiary-container:   var(--md-ref-cream-30);
    --md-sys-color-on-tertiary-container: var(--md-ref-cream-90);

    --md-sys-color-error:                #FFB4AB;
    --md-sys-color-on-error:             #690005;
    --md-sys-color-error-container:      #93000A;
    --md-sys-color-on-error-container:   #FFDAD6;

    --md-sys-color-surface:              var(--md-ref-teal-22);
    --md-sys-color-on-surface:           var(--md-ref-cream-94);
    --md-sys-color-surface-variant:      var(--md-ref-teal-30);
    --md-sys-color-on-surface-variant:   var(--md-ref-cream-80);
    --md-sys-color-surface-dim:          var(--md-ref-teal-12);
    --md-sys-color-surface-bright:       var(--md-ref-teal-35);
    --md-sys-color-surface-container-lowest:  var(--md-ref-teal-10);
    --md-sys-color-surface-container-low:     var(--md-ref-teal-17);
    --md-sys-color-surface-container:         var(--md-ref-teal-24);
    --md-sys-color-surface-container-high:    var(--md-ref-teal-30);
    --md-sys-color-surface-container-highest: var(--md-ref-teal-35);

    --md-sys-color-outline:              var(--md-ref-teal-50);
    --md-sys-color-outline-variant:      var(--md-ref-teal-30);
    --md-sys-color-inverse-surface:      var(--md-ref-cream-94);
    --md-sys-color-inverse-on-surface:   var(--md-ref-teal-22);
    --md-sys-color-inverse-primary:      var(--md-ref-teal-30);
  }
}

/* --------------------------------------------------------------------------
   2. ベース
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }
body {
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: var(--md-sys-typescale-plain);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  transition: background-color var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}
button, input, select, textarea { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; fill: currentColor; }
.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 20px; height: 20px; }
.icon--lg { width: 28px; height: 28px; }

/* --------------------------------------------------------------------------
   3. タイプスケール（M3）
   -------------------------------------------------------------------------- */
.md-display-large  { font-size: 57px; line-height: 64px; font-weight: 400; letter-spacing: -.25px; }
.md-display-medium { font-size: 45px; line-height: 52px; font-weight: 400; }
.md-display-small  { font-size: 36px; line-height: 44px; font-weight: 400; }
.md-headline-large { font-size: 32px; line-height: 40px; font-weight: 400; }
.md-headline-medium{ font-size: 28px; line-height: 36px; font-weight: 400; }
.md-headline-small { font-size: 24px; line-height: 32px; font-weight: 400; }
.md-title-large    { font-size: 22px; line-height: 28px; font-weight: 400; }
.md-title-medium   { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: .15px; }
.md-title-small    { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px; }
.md-body-large     { font-size: 16px; line-height: 24px; font-weight: 400; letter-spacing: .5px; }
.md-body-medium    { font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: .25px; }
.md-body-small     { font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: .4px; }
.md-label-large    { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px; }
.md-label-medium   { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .5px; }
.md-label-small    { font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .5px; }

body { font-size: 14px; line-height: 20px; letter-spacing: .25px; }
.on-surface-variant { color: var(--md-sys-color-on-surface-variant); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* --------------------------------------------------------------------------
   4. 状態レイヤー（M3: hover 8% / focus 10% / pressed 10%）
   -------------------------------------------------------------------------- */
.md-state { position: relative; overflow: hidden; isolation: isolate; }
.md-state::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: currentColor; opacity: 0;
  transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
@media (hover: hover) {
  .md-state:hover::after { opacity: var(--md-sys-state-hover-opacity); }
}
.md-state:focus-visible::after { opacity: var(--md-sys-state-focus-opacity); }
.md-state:active::after       { opacity: var(--md-sys-state-pressed-opacity); }
:focus-visible { outline: 3px solid var(--md-sys-color-secondary); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   5. レイアウト: Top app bar / Navigation bar
   -------------------------------------------------------------------------- */
.md-top-app-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 4px;
  height: var(--ll-bar-height); padding: 0 4px 0 16px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
              box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
/* スクロール時は surface-container に持ち上がる（M3 の on-scroll 挙動） */
.md-top-app-bar.is-scrolled {
  background: var(--md-sys-color-surface-container);
  box-shadow: var(--md-sys-elevation-2);
}
.md-top-app-bar__headline {
  flex: 1; min-width: 0;
  font-size: 22px; line-height: 28px; font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.md-top-app-bar__leading { display: flex; align-items: center; color: var(--md-sys-color-primary); margin-right: 12px; }

.md-navigation-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around; align-items: flex-start;
  height: calc(var(--ll-nav-height) + env(safe-area-inset-bottom));
  padding: 12px 8px env(safe-area-inset-bottom);
  background: var(--md-sys-color-surface-container);
  border-top: 1px solid transparent;
}
.md-navigation-bar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding-top: 0; color: var(--md-sys-color-on-surface-variant);
  min-width: 0;
}
.md-navigation-bar__indicator {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 32px; border-radius: var(--md-sys-shape-corner-full);
  background: transparent; position: relative; overflow: hidden;
  transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.md-navigation-bar__label {
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.md-navigation-bar__item.is-active { color: var(--md-sys-color-on-secondary-container); }
.md-navigation-bar__item.is-active .md-navigation-bar__indicator {
  background: var(--md-sys-color-secondary-container);
}
.md-navigation-bar__item.is-active .md-navigation-bar__label { font-weight: 700; }

.md-pane {
  padding: 8px var(--ll-gutter);
  padding-bottom: calc(var(--ll-nav-height) + 48px + env(safe-area-inset-bottom));
  max-width: 720px; margin: 0 auto;
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.md-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 24px; border: none; cursor: pointer;
  border-radius: var(--md-sys-shape-corner-full);
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px;
  background: transparent; color: var(--md-sys-color-primary);
  transition: box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.md-button:disabled {
  cursor: not-allowed; box-shadow: none;
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
}
.md-button:disabled::after { opacity: 0 !important; }
.md-button .icon { width: 18px; height: 18px; margin-left: -8px; }

.md-button--filled  { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.md-button--filled:disabled  { background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); }
.md-button--tonal   { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.md-button--tonal:disabled   { background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); }
.md-button--elevated{ background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-primary); box-shadow: var(--md-sys-elevation-1); }
.md-button--outlined{ border: 1px solid var(--md-sys-color-outline); }
.md-button--outlined:disabled { border-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); }
.md-button--text    { padding: 0 12px; }
.md-button--danger  { color: var(--md-sys-color-error); }
.md-button--danger.md-button--outlined { border-color: color-mix(in srgb, var(--md-sys-color-error) 50%, transparent); }
.md-button--block   { display: flex; width: 100%; }
.md-button--compact { padding: 0 12px; white-space: nowrap; }
.md-button--tall    { height: 56px; font-size: 16px; }

.md-icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: none; background: transparent; cursor: pointer;
  border-radius: var(--md-sys-shape-corner-full); color: var(--md-sys-color-on-surface-variant);
}
.md-icon-button--filled { background: var(--md-sys-color-surface-container-highest); }

/* FAB / Extended FAB */
.md-fab-extended {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 72px; padding: 0 24px; border: none; cursor: pointer;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: var(--md-sys-elevation-3);
  font-size: 18px; line-height: 24px; font-weight: 500; letter-spacing: .1px;
  transition: box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.md-fab-extended:active { box-shadow: var(--md-sys-elevation-1); }
.md-fab-extended__sub {
  display: block; font-size: 12px; line-height: 16px; font-weight: 400;
  letter-spacing: .4px; opacity: .78; margin-top: 2px;
}
.md-fab-extended--tertiary { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }

/* Segmented button（M3 の連結ボタン） */
.md-segmented { display: inline-flex; width: 100%; }
.md-segmented__item {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 12px; cursor: pointer;
  border: 1px solid var(--md-sys-color-outline); border-right-width: 0;
  background: transparent; color: var(--md-sys-color-on-surface);
  font-size: 14px; font-weight: 500; letter-spacing: .1px;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.md-segmented__item:first-child { border-radius: var(--md-sys-shape-corner-full) 0 0 var(--md-sys-shape-corner-full); }
.md-segmented__item:last-child  { border-radius: 0 var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-full) 0; border-right-width: 1px; }
.md-segmented__item.is-selected { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.md-segmented__item:disabled { color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); cursor: not-allowed; }

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */
.md-card {
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 16px; margin-bottom: 12px;
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
}
.md-card--filled   { background: var(--md-sys-color-surface-container-highest); }
.md-card--elevated { background: var(--md-sys-color-surface-container-low); box-shadow: var(--md-sys-elevation-1); }
.md-card--outlined { background: var(--md-sys-color-surface); border: 1px solid var(--md-sys-color-outline-variant); }
.md-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.md-card__title  { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: .15px; }
.md-card__subhead{ font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--md-sys-color-on-surface-variant); }

.md-section-header {
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px;
  color: var(--md-sys-color-on-surface-variant);
  padding: 20px 4px 8px;
}

/* --------------------------------------------------------------------------
   8. Chips
   -------------------------------------------------------------------------- */
.md-chip-set { display: flex; flex-wrap: wrap; gap: 8px; }
.md-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 16px; cursor: pointer;
  border-radius: var(--md-sys-shape-corner-small);
  border: 1px solid var(--md-sys-color-outline-variant);
  background: transparent; color: var(--md-sys-color-on-surface-variant);
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px;
  white-space: nowrap; flex: none;
}
.md-chip .icon { width: 18px; height: 18px; margin-left: -6px; }
.md-chip.is-selected {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: transparent;
}
.md-chip--assist { color: var(--md-sys-color-on-surface); }
.md-chip--suggestion { border-style: dashed; }
.md-chip--static { cursor: default; }
.md-chip--tonal { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border-color: transparent; cursor: default; }
.md-chip--error { background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); border-color: transparent; cursor: default; }
.md-chip--peek {
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  border-color: transparent; cursor: default;
}

/* --------------------------------------------------------------------------
   9. Text fields（M3 Outlined）
   -------------------------------------------------------------------------- */
.md-field { position: relative; margin-bottom: 20px; }
.md-field__input {
  width: 100%; height: 56px; padding: 16px; background: transparent;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-extra-small);
  font-size: 16px; line-height: 24px; letter-spacing: .5px; outline: none;
  transition: border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
textarea.md-field__input { height: auto; min-height: 80px; resize: vertical; }
.md-field__input:focus { border-width: 2px; border-color: var(--md-sys-color-primary); padding: 15px; }
.md-field__label {
  position: absolute; top: -8px; left: 12px; padding: 0 4px;
  background: var(--md-sys-color-surface);
  font-size: 12px; line-height: 16px; letter-spacing: .4px;
  color: var(--md-sys-color-on-surface-variant);
}
.md-field__input:focus + .md-field__label { color: var(--md-sys-color-primary); }
.md-field__support {
  display: block; padding: 4px 16px 0;
  font-size: 12px; line-height: 16px; letter-spacing: .4px;
  color: var(--md-sys-color-on-surface-variant);
}
/* カード上に置く入力欄はラベル背景をカード色に合わせる */
.md-card .md-field__label,
.md-card--elevated .md-field__label { background: var(--md-sys-color-surface-container-low); }
.md-card--filled .md-field__label { background: var(--md-sys-color-surface-container-highest); }

.md-field--compact .md-field__input {
  height: 48px; padding: 0 8px; text-align: center;
  font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums;
  border-radius: var(--md-sys-shape-corner-small);
}
.md-field--compact .md-field__input:focus { padding: 0 7px; }

/* 数値ステッパー */
.md-stepper { display: flex; align-items: stretch; gap: 8px; }
.md-stepper__btn {
  width: 56px; flex: none; cursor: pointer;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent; color: var(--md-sys-color-on-surface);
  display: flex; align-items: center; justify-content: center;
}
.md-stepper__value {
  /* flex アイテムの既定 min-width:auto だと number input の固有幅で縮まないため 0 を明示 */
  flex: 1 1 0; min-width: 0; width: 100%;
  height: 56px; text-align: center; background: transparent;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-extra-small);
  font-size: 24px; line-height: 32px; font-weight: 500;
  font-variant-numeric: tabular-nums; outline: none;
}
.md-stepper__value:focus { border-width: 2px; border-color: var(--md-sys-color-primary); }

/* --------------------------------------------------------------------------
   10. Lists
   -------------------------------------------------------------------------- */
.md-list { display: flex; flex-direction: column; }
.md-list-item {
  display: flex; align-items: center; gap: 16px;
  min-height: 72px; padding: 12px 16px; cursor: pointer;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container-low);
  margin-bottom: 8px;
}
.md-list-item--static { cursor: default; }
.md-list-item.is-selected {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
.md-list-item__leading {
  width: 40px; height: 40px; flex: none; border-radius: var(--md-sys-shape-corner-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
}
.md-list-item.is-selected .md-list-item__leading {
  background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary);
}
.md-list-item__content { flex: 1; min-width: 0; }
.md-list-item__headline {
  font-size: 16px; line-height: 24px; letter-spacing: .15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.md-list-item__supporting {
  font-size: 14px; line-height: 20px; letter-spacing: .25px;
  color: var(--md-sys-color-on-surface-variant);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
.md-list-item.is-selected .md-list-item__supporting { color: inherit; opacity: .8; }
.md-list-item__trailing { flex: none; text-align: right; color: var(--md-sys-color-on-surface-variant); }

.md-divider { height: 1px; background: var(--md-sys-color-outline-variant); border: 0; margin: 16px 0; }

/* --------------------------------------------------------------------------
   11. Progress indicators
   -------------------------------------------------------------------------- */
.md-circular-progress { position: relative; width: 132px; height: 132px; flex: none; }
.md-circular-progress svg { transform: rotate(-90deg); }
.md-circular-progress__track { stroke: var(--md-sys-color-surface-container-highest); }
.md-circular-progress__indicator {
  stroke: var(--md-sys-color-primary); stroke-linecap: round;
  transition: stroke-dasharray var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-emphasized);
}
.md-circular-progress__indicator--tertiary { stroke: var(--md-sys-color-tertiary); }
.md-circular-progress__label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.md-circular-progress__value { font-size: 32px; line-height: 40px; font-weight: 400; font-variant-numeric: tabular-nums; }
.md-circular-progress__value sup { font-size: 14px; font-weight: 500; top: -.55em; }
.md-circular-progress__caption { font-size: 12px; line-height: 16px; letter-spacing: .5px; font-weight: 500; color: var(--md-sys-color-on-surface-variant); }

.md-linear-progress {
  height: 4px; border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface-container-highest); overflow: hidden;
}
.md-linear-progress__indicator {
  height: 100%; border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary);
  transition: width var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-emphasized);
}
.md-linear-progress__indicator--tertiary { background: var(--md-sys-color-tertiary); }

/* --------------------------------------------------------------------------
   12. Switch（M3）
   -------------------------------------------------------------------------- */
.md-switch { display: inline-flex; align-items: center; cursor: pointer; }
.md-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.md-switch__track {
  width: 52px; height: 32px; border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface-container-highest);
  border: 2px solid var(--md-sys-color-outline);
  position: relative;
  transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
              border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.md-switch__thumb {
  position: absolute; top: 50%; left: 6px; width: 16px; height: 16px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-outline); transform: translate(0, -50%);
  transition: transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized),
              width var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized),
              height var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized),
              background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.md-switch input:checked + .md-switch__track {
  background: var(--md-sys-color-primary); border-color: var(--md-sys-color-primary);
}
.md-switch input:checked + .md-switch__track .md-switch__thumb {
  width: 24px; height: 24px; left: 2px;
  transform: translate(22px, -50%); background: var(--md-sys-color-on-primary);
}

/* --------------------------------------------------------------------------
   13. Dialog / Bottom sheet
   -------------------------------------------------------------------------- */
.md-scrim {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  background: color-mix(in srgb, var(--md-sys-color-scrim) 32%, transparent);
}
.md-sheet {
  position: relative; width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
  border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large) 0 0;
  padding: 12px 24px calc(32px + env(safe-area-inset-bottom));
  box-shadow: var(--md-sys-elevation-3);
  animation: md-sheet-in var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized-decelerate);
}
.md-sheet__handle {
  width: 32px; height: 4px; margin: 0 auto 16px;
  border-radius: var(--md-sys-shape-corner-full);
  background: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 40%, transparent);
}
.md-sheet__close { position: absolute; top: 8px; right: 8px; }
@media (min-width: 640px) {
  .md-scrim { align-items: center; }
  .md-sheet { border-radius: var(--md-sys-shape-corner-extra-large); max-height: 80vh; }
}
@keyframes md-sheet-in { from { transform: translateY(24px); opacity: 0; } }

.md-dialog__headline {
  font-size: 24px; line-height: 32px; font-weight: 400;
  color: var(--md-sys-color-on-surface); margin: 0 0 16px; padding-right: 40px;
}
.md-dialog__body { font-size: 14px; line-height: 20px; letter-spacing: .25px; color: var(--md-sys-color-on-surface-variant); }
.md-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }

/* --------------------------------------------------------------------------
   14. Snackbar
   -------------------------------------------------------------------------- */
.md-snackbar-host {
  position: fixed; left: 0; right: 0; z-index: 200;
  bottom: calc(var(--ll-nav-height) + 16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0 16px; pointer-events: none;
}
.md-snackbar {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 14px 16px; max-width: 560px; width: 100%;
  border-radius: var(--md-sys-shape-corner-extra-small);
  background: var(--md-sys-color-inverse-surface);
  color: var(--md-sys-color-inverse-on-surface);
  box-shadow: var(--md-sys-elevation-3);
  font-size: 14px; line-height: 20px; letter-spacing: .25px;
  animation: md-snackbar-in var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized-decelerate);
  transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.md-snackbar__icon { color: var(--md-sys-color-inverse-primary); }
.md-snackbar--error .md-snackbar__icon { color: var(--md-sys-color-error); }
@keyframes md-snackbar-in { from { transform: translateY(16px); opacity: 0; } }

/* --------------------------------------------------------------------------
   15. ローディング / 空状態
   -------------------------------------------------------------------------- */
.md-loading {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: color-mix(in srgb, var(--md-sys-color-scrim) 24%, transparent);
}
.md-loading__spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
  border-top-color: var(--md-sys-color-primary);
  animation: md-spin 900ms linear infinite;
}
@keyframes md-spin { to { transform: rotate(360deg); } }

.md-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; padding: 48px 24px; color: var(--md-sys-color-on-surface-variant);
}
.md-empty .icon { width: 40px; height: 40px; opacity: .5; }

/* --------------------------------------------------------------------------
   16. アプリ固有のコンポジション
   -------------------------------------------------------------------------- */
.ll-row { display: flex; gap: 12px; }
.ll-row--between { justify-content: space-between; align-items: center; }
.ll-row--between > .md-label-large { white-space: nowrap; }
.ll-row--center { align-items: center; }
.ll-grow { flex: 1; min-width: 0; }
.ll-stack { display: flex; flex-direction: column; gap: 8px; }

/* 統計タイル */
.ll-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ll-stat {
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 16px 8px; text-align: center;
}
.ll-stat__value { font-size: 22px; line-height: 28px; font-variant-numeric: tabular-nums; }
.ll-stat__value small { font-size: 12px; font-weight: 500; margin-left: 1px; }
.ll-stat__label { font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .5px; color: var(--md-sys-color-on-surface-variant); margin-top: 2px; }

/* 重量提案カード */
.ll-suggestion { border-left: 4px solid var(--md-sys-color-primary); }
.ll-suggestion--hold    { border-left-color: var(--md-sys-color-secondary); }
.ll-suggestion--addreps { border-left-color: var(--md-sys-color-tertiary); }
.ll-suggestion--deload  { border-left-color: var(--md-sys-color-error); }
.ll-suggestion--none    { border-left-color: var(--md-sys-color-outline-variant); }
.ll-suggestion__weight { font-size: 45px; line-height: 52px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.ll-suggestion__weight span { font-size: 16px; font-weight: 500; letter-spacing: .15px; }
.ll-suggestion__delta { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px; }
.ll-suggestion__delta--up   { color: var(--md-sys-color-primary); }
.ll-suggestion__delta--down { color: var(--md-sys-color-error); }
.ll-suggestion__reason {
  background: var(--md-sys-color-surface-container-highest);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 12px 16px; font-size: 14px; line-height: 22px; letter-spacing: .25px;
  color: var(--md-sys-color-on-surface-variant);
}

/* セット入力グリッド */
.ll-set-head, .ll-set-row {
  display: grid; grid-template-columns: 40px 1fr 1fr 1fr 40px; gap: 8px; align-items: center;
}
.ll-set-head { margin-bottom: 4px; }
.ll-set-head span {
  font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .5px;
  text-align: center; color: var(--md-sys-color-on-surface-variant);
}
.ll-set-row { margin-bottom: 8px; }
.ll-set-row__no {
  width: 40px; height: 40px; border-radius: var(--md-sys-shape-corner-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px; font-weight: 500;
}
.ll-set-row--warmup .ll-set-row__no {
  background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container);
}

/* タイマー */
.ll-timer { font-size: 36px; line-height: 44px; font-variant-numeric: tabular-nums; color: var(--md-sys-color-primary); }

/* 横棒リスト */
.ll-bars { display: flex; flex-direction: column; gap: 12px; }
.ll-bars__row { display: grid; grid-template-columns: 76px 1fr 64px; gap: 12px; align-items: center; }
.ll-bars__label {
  font-size: 14px; letter-spacing: .25px; color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ll-bars__value { text-align: right; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* カレンダー */
.ll-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ll-calendar__dow {
  text-align: center; font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .5px;
  color: var(--md-sys-color-on-surface-variant); padding-bottom: 4px;
}
.ll-calendar__day {
  aspect-ratio: 1; border-radius: var(--md-sys-shape-corner-small);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-variant-numeric: tabular-nums;
  background: var(--md-sys-color-surface-container);
  color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 60%, transparent);
  border: 2px solid transparent;
}
.ll-calendar__day--l1 { background: color-mix(in srgb, var(--md-sys-color-primary) 22%, var(--md-sys-color-surface-container)); color: var(--md-sys-color-on-surface); }
.ll-calendar__day--l2 { background: color-mix(in srgb, var(--md-sys-color-primary) 46%, var(--md-sys-color-surface-container)); color: var(--md-sys-color-on-surface); }
.ll-calendar__day--l3 { background: color-mix(in srgb, var(--md-sys-color-primary) 72%, var(--md-sys-color-surface-container)); color: var(--md-sys-color-on-primary); }
.ll-calendar__day--l4 { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); font-weight: 500; }
.ll-calendar__day--today { border-color: var(--md-sys-color-tertiary); }
.ll-calendar__day--open { cursor: pointer; position: relative; overflow: hidden; }
.ll-calendar__legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 12px; }
.ll-calendar__legend .ll-calendar__day { width: 14px; height: 14px; aspect-ratio: auto; border-radius: 3px; }

/* 画面下部に固定するアクション */
.ll-sticky-actions {
  position: sticky; z-index: 20;
  bottom: calc(var(--ll-nav-height) + env(safe-area-inset-bottom));
  padding: 16px 0 8px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--md-sys-color-surface) 0%, transparent) 0%,
    var(--md-sys-color-surface) 24%,
    var(--md-sys-color-surface) 100%);
}
.ll-sticky-actions .md-button + .md-button { margin-top: 8px; }

/* ログイン画面 */
.ll-login { max-width: 420px; margin: 24px auto 0; text-align: center; }
.ll-login__mark {
  width: 64px; height: 64px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
.ll-login form { text-align: left; }
.ll-login #surname { text-align: center; letter-spacing: .12em; font-size: 20px; }
.ll-login .md-section-header { text-align: left; }
.ll-login__divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0;
  color: var(--md-sys-color-on-surface-variant); font-size: 12px; letter-spacing: .5px;
}
.ll-login__divider::before, .ll-login__divider::after {
  content: ""; flex: 1; height: 1px; background: var(--md-sys-color-outline-variant);
}
.ll-pin {
  text-align: center; font-size: 28px; letter-spacing: .5em; text-indent: .5em;
  font-variant-numeric: tabular-nums;
}

/* 覗き見モードの案内 */
.ll-peek-banner {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px; margin-bottom: 12px;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
}
.ll-peek-banner__icon { flex: none; opacity: .9; }
.ll-peek-notice {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; margin-bottom: 12px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px; line-height: 20px;
}
.ll-login .md-chip-set { justify-content: center; }

/* 休憩タイマー */
.ll-rest {
  position: sticky; top: calc(var(--ll-bar-height) + 8px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; margin-bottom: 12px;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-surface-container-high);
  border: 2px solid transparent;
  transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
              border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.ll-rest--running { border-color: var(--md-sys-color-primary); }
.ll-rest--done {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-color: var(--md-sys-color-primary);
  animation: ll-rest-pulse 1.2s ease-in-out infinite;
}
@keyframes ll-rest-pulse { 50% { opacity: .72; } }
.ll-rest__main { min-width: 0; }
.ll-rest__clock {
  font-size: 32px; line-height: 40px; font-variant-numeric: tabular-nums; letter-spacing: -.5px;
}
.ll-rest--running .ll-rest__clock { color: var(--md-sys-color-primary); }
.ll-rest--done .ll-rest__clock { color: var(--md-sys-color-on-primary-container); }
.ll-rest__controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.ll-rest__minutes { display: flex; align-items: center; gap: 2px; }
.ll-rest__minutes .md-icon-button { width: 36px; height: 36px; }
.ll-rest__min { min-width: 44px; text-align: center; font-size: 18px; font-weight: 500; }
.ll-rest__min small { font-size: 11px; font-weight: 400; margin-left: 1px; }

/* 今回のプラン（セットごとの重量×レップ） */
.ll-plan { display: flex; flex-direction: column; gap: 6px; }
.ll-plan__row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--md-sys-shape-corner-small);
  background: var(--md-sys-color-surface-container);
}
.ll-plan__no {
  width: 24px; height: 24px; flex: none; border-radius: var(--md-sys-shape-corner-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px; font-weight: 500;
}
.ll-plan__weight { font-size: 18px; font-weight: 500; min-width: 64px; }
.ll-plan__weight small { font-size: 11px; font-weight: 400; margin-left: 1px; }
.ll-plan__reps {
  width: 56px; height: 36px; text-align: center; background: transparent;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-extra-small);
  font-size: 16px; font-weight: 500; outline: none;
}
.ll-plan__reps:focus { border-width: 2px; border-color: var(--md-sys-color-primary); }
.ll-plan__unit { white-space: nowrap; flex: none; }
.ll-plan__prev {
  margin-left: auto; min-width: 0; text-align: right;
  color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------------------------------------------------------------------
   入力中（スマホでキーボードが出ているとき）
   貼り付いている要素が入力欄を覆わないように外す。
   --------------------------------------------------------------------- */
body.is-typing .ll-sticky-actions,
body.is-typing .md-navigation-bar { display: none; }

/* 休憩タイマーは貼り付きをやめて、その場に置く */
body.is-typing .ll-rest { position: static; }

/* ブラウザが自動で画面を送るときに、上下の貼り付き要素の分だけ余白を見てもらう */
.md-field__input,
.ll-plan__reps,
.md-stepper__value {
  scroll-margin-top: 96px;
  scroll-margin-bottom: 140px;
}

/* 動きを減らす設定の尊重 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
