﻿/* shopping.css — staple category flow (sf01) + site chrome */
:root {
  --ink: #101a15;
  --muted: #3a4a42;
  --paper: #f3f7f4;
  --card: #ffffff;
  --line: #c8d6ce;
  --brand: #1a6b43;
  --brand-deep: #0f4a2e;
  --soft: #e7f3ec;
  --shadow: 0 18px 40px rgba(20, 35, 28, 0.1);
  --font-display: "Figtree", "Zen Kaku Gothic New", sans-serif;
  --font-body: "Zen Kaku Gothic New", sans-serif;
  --text-xs: 0.875rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-md: 1.125rem;
  --text-lg: 1.28rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1000px 420px at 8% -8%, #dff3e8 0%, transparent 55%),
    radial-gradient(800px 360px at 100% 0%, #fff4d6 0%, transparent 48%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* シェル先行: JS 前でもヘッダ・骨格が見える。ready で操作感を確定 */
html:not(.shopping-shell-ready) body.shopping-boot .app-body {
  opacity: 0.92;
}
html.shopping-shell-ready body.shopping-boot .app-body {
  opacity: 1;
  transition: opacity 0.12s ease-out;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  min-width: 0;
}

.brand__mark {
  border-radius: 10px;
  flex-shrink: 0;
}

.brand__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-header__free {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.page {
  padding-top: 0.85rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--brand-deep);
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.intro {
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0.25rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  color: var(--muted);
}


.auth {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 21, 0.55);
  display: none;
  place-items: end center;
  padding: 1rem;
  z-index: 5;
}

.auth.is-open,
.auth:not([hidden]) {
  display: grid;
}

.auth[hidden] {
  display: none !important;
}

.auth__card {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

#auth-step-login,
#auth-step-register,
#auth-step-forgot {
  display: grid;
  gap: 0.55rem;
}

#auth-step-login .field,
#auth-step-register .field,
#auth-step-forgot .field,
#password-change-card .field {
  margin: 0.15rem 0;
}

#password-change-card #btn-change-password {
  margin-top: 0.75rem;
}

#auth-step-login .btn + .btn,
#auth-step-register .btn + .btn,
#auth-step-forgot .btn + .btn {
  margin-top: 0.55rem;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.15rem 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}

.check-row input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.auth__links {
  margin: 0.35rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth__links .linkish {
  border: 0;
  background: none;
  color: var(--brand-deep);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.2rem;
}

.auth__brand {
  margin: 0;
  color: var(--brand);
  font-weight: 800;
  font-size: 0.8rem;
}

.auth__card h2 {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--font-display);
}

.auth__lead,
.auth__hint {
  color: var(--muted);
  font-size: 0.86rem;
}

.auth__hint {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  min-height: 1.2em;
}

.field {
  display: grid;
  gap: 0.3rem;
  margin: 0.85rem 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.field input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 0.75rem;
  font: inherit;
  font-weight: 400;
  font-size: 16px;
}


:root {
  --shadow: 0 18px 40px rgba(20, 35, 28, 0.1);
  --tab-inactive: #4a5c53;
  --tabbar-offset: 5.75rem;
  --shell-max: 40rem;
}

.app {
  max-width: min(100%, 40rem);
  margin: 0 auto;
  min-height: 720px;
}

.app-body {
  flex: 1;
  max-height: none;
  overflow: auto;
}

.settings-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
  margin-bottom: 0.65rem;
}

.settings-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1rem;
}

.settings-card p,
.settings-card ul {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.settings-card--note {
  background: #fff9eb;
  border-color: #f0dfb0;
}

.settings-card .btn {
  margin-bottom: 0.45rem;
}

a.settings-link {
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

/* 買い物終了後の静かな1行CTA（タブの上） */
.soft-cta {
  position: sticky;
  bottom: 0.35rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0.25rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(20, 40, 30, 0.06);
}

.soft-cta p {
  flex: 1;
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
}

.soft-cta__go {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.9rem;
}

.soft-cta__dismiss {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
}

.item__check {
  width: 22px;
  height: 22px;
  accent-color: var(--brand);
}

.chip-ico {
  overflow: hidden;
}

.chip-ico img,
.item-thumb {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  background: #fffdf9;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .page {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .app {
    border-radius: 18px;
  }
}

/* ----- app UI (from mock staple flow) ----- */


.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, var(--shell-max));
  margin: 0 auto;
  min-height: 720px;
  background: #f7fbf8;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(20, 35, 28, 0.1);
}

.app-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem 0.7rem;
  background: linear-gradient(180deg, #fff, #f7fbf8);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-bar__brand {
  margin: 0;
  font-size: 0.72rem;
  color: var(--brand);
  font-weight: 700;
}

.app-bar__title {
  margin: 0.1rem 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.app-body {
  flex: 1;
  padding: 0.85rem 1rem calc(var(--tabbar-offset) + env(safe-area-inset-bottom, 0px) + 1rem);
  overflow: auto;
  max-height: none;
}

.screen-lead {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.progress p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.progress__bar {
  height: 8px;
  background: #dfece5;
  border-radius: 999px;
  overflow: hidden;
}

.progress__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #3aa56d);
}

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.item-row {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
}

.item-row__actions {
  position: absolute;
  inset: 0 0 0 auto;
  width: 5.5rem;
  display: flex;
  z-index: 0;
}

.item-delete {
  flex: 1;
  border: none;
  margin: 0;
  padding: 0.5rem;
  background: #c62828;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.item-row__front,
.item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem 0.75rem;
  min-height: 4.25rem;
  position: relative;
  z-index: 1;
  transition: transform 0.18s ease;
  touch-action: pan-y;
  user-select: none;
}

/* ?????: ?????????????????? */
.item-row__front.item {
  gap: 0.55rem;
  padding: 0.28rem 0.28rem 0.28rem 0.7rem;
  min-height: 5.5rem;
}

.item-row.is-open .item-row__front {
  transform: translateX(-5.5rem);
}

.item__text {
  min-width: 0;
}

.item__name {
  margin: 0;
  font-weight: 700;
  font-size: var(--text-md, 1.125rem);
  color: var(--ink);
  line-height: 1.35;
}

.item__meta {
  margin: 0.15rem 0 0;
  font-size: var(--text-sm, 0.9375rem);
  color: var(--muted);
  font-weight: 600;
}

.chip-ico,
.item-thumb {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-deep);
  object-fit: contain;
  object-position: center;
  background: #fffdf9;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.add-form {
  margin: 0.9rem 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
}

.cat-pick,
.btn-add {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.btn-add {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
}

.add-form input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 0.75rem;
  font: inherit;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
  margin-bottom: 0.65rem;
}

.card h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1rem;
}

.card p {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.card--note {
  background: #fff9eb;
  border-color: #f0dfb0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.chips span {
  background: #f3f7f4;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.btn--done {
  background: var(--ink);
  color: #fff;
}

.btn--soft {
  background: var(--soft);
  color: var(--brand-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  margin-bottom: 0.45rem;
}

/* ----- ロータリー準拠フッター ----- */

.shop-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  width: 100%;
  padding: 0.45rem 0.5rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 env(safe-area-inset-bottom, 0px) 0 0 #fff;
  overflow: visible;
  box-sizing: border-box;
}

.shop-tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 3.6rem;
  padding: 0.35rem 0.15rem 0.4rem;
  border: none;
  background: transparent;
  color: var(--tab-inactive);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}

.shop-tabbar__item svg {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  display: block;
}

.shop-tabbar__item--active {
  color: var(--brand);
}

.shop-tabbar__item:hover {
  color: var(--brand-deep);
}

/* ----- v2: 空状態・カテゴリー・シート ----- */

.progress__bar span {
  width: 0%;
  transition: width 0.2s ease;
}

.item.is-done {
  opacity: 0.55;
}

.item.is-done .item__name {
  text-decoration: line-through;
}

.item-thumb {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  background: #fffdf9;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

/* Today list: large thumb near item card edges */
.item-row .item-thumb-frame,
.item-row .chip-ico {
  width: 5rem;
  height: 5rem;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fffdf9;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-deep);
}

.item-row .item-thumb-frame .item-thumb {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  object-position: center;
  transform: scale(1.22);
}

.empty {
  list-style: none;
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 0.92rem;
  line-height: 1.6;
}

.empty-inline {
  list-style: none;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.5rem 0;
}

.today-fab-row {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.today-fab-row__adds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.today-fab-row__adds .btn {
  width: 100%;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  font-size: 0.9rem;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn.is-dim,
.btn--primary.is-dim,
.btn--primary:disabled.is-dim {
  background: #d7e6dd;
  color: #6a7f74;
  opacity: 0.72;
  cursor: default;
  box-shadow: none;
}

.btn--file {
  display: block;
  text-align: center;
  cursor: pointer;
}

.mini-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.cat-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font: inherit;
  display: flex;
  flex-direction: column;
}

.cat-card__media {
  aspect-ratio: 5 / 4;
  height: auto;
  min-height: 8.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fffdf9;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
  padding: 0.35rem;
}

.cat-card__media img {
  width: 78%;
  max-width: 7.8rem; /* ~92px × 1.3 */
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center center;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
}

.cat-fallback {
  width: 78%;
  max-width: 7.8rem;
  aspect-ratio: 1 / 1;
  height: auto;
  display: grid;
  place-items: center;
  font-size: clamp(1.4rem, 6vw, 1.85rem);
  font-weight: 800;
  color: var(--brand-deep);
  border-radius: 12px;
  background: #eef3f0;
}

@media (min-width: 480px) {
  .cat-card__media {
    min-height: 9.5rem;
  }
  .cat-card__media img,
  .cat-fallback {
    max-width: 8.4rem;
  }
}

.cat-card__body {
  display: grid;
  gap: 0.1rem;
  padding: 0.45rem 0.65rem 0.7rem;
}

.cat-card__body strong {
  font-size: 0.92rem;
}

.cat-card__body small {
  color: var(--muted);
  font-size: 0.75rem;
}

.sheet[hidden] {
  display: none !important;
}

.sheet {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(15, 26, 21, 0.45);
  display: grid;
  align-items: end;
}

.sheet__panel {
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 0 1rem calc(var(--tabbar-offset) + 1rem);
  max-height: 78%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sheet__panel--tall {
  max-height: 88%;
}

.sheet__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0;
  padding: 0.85rem 0 0.65rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.sheet__head h3 {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.sheet__close,
.sheet__back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: #f3f7f4;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}

.sheet__back {
  font-weight: 700;
  color: var(--brand-deep);
}

.sheet__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

.sheet__lead,
.sheet__hint {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.pick-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.staple-row {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
}

.staple-row__actions {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5.5rem;
  display: flex;
  z-index: 0;
}

.staple-row__actions--right {
  right: 0;
  background: #c62828;
}

.staple-row__actions--left {
  left: 0;
  background: var(--brand);
}

.staple-delete,
.staple-photo-btn,
.staple-move-btn {
  flex: 1;
  border: none;
  margin: 0;
  padding: 0.5rem;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  background: transparent;
}

.staple-row__front {
  position: relative;
  z-index: 1;
  transition: transform 0.18s ease;
  touch-action: pan-y;
  background: var(--card);
  border-radius: 14px;
}

.staple-row.is-open-left .staple-row__front {
  transform: translateX(-5.5rem);
}

.staple-row.is-open-right .staple-row__front {
  transform: translateX(5.5rem);
}

.staple-row__front .pick-item-btn {
  width: 100%;
  margin: 0;
  border-radius: 14px;
}

.pick-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcfb;
}

.pick-item__grow {
  font-weight: 600;
}

.pick-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  background: #fffdf9;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.pick-thumb--fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--brand-deep);
}

.pick-item-btn {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pick-item-btn:hover:not(:disabled),
.pick-item-btn:active:not(:disabled) {
  border-color: var(--brand);
  background: var(--soft);
}

.pick-item-btn__name {
  font-weight: 700;
  font-size: 0.95rem;
}

.pick-item-btn__status {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

.pick-item-btn.is-added,
.pick-item-btn:disabled {
  opacity: 0.65;
  cursor: default;
  background: #f3f7f4;
}

.pick-item-btn.is-added .pick-item-btn__status,
.pick-item-btn:disabled .pick-item-btn__status {
  color: var(--muted);
}

.btn-mini-add,
.btn-mini-del {
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-mini-add {
  background: var(--brand);
  color: #fff;
}

.btn-mini-add:disabled {
  background: #c5d5cc;
  cursor: default;
}

.btn-mini-del {
  background: #fde8e6;
  color: #8a1f14;
}

.photo-block {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.photo-preview {
  height: 140px;
  border-radius: 14px;
  background: #fffdf9;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-deep);
  border: 1px solid var(--line);
}

.photo-preview.has-photo {
  color: transparent;
}

.photo-actions {
  display: grid;
  gap: 0.4rem;
}

.subhead {
  margin: 0.4rem 0 0.5rem;
  font-size: 0.9rem;
  font-family: var(--font-display);
}

.inline-add {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}

.inline-add input,
.form-stack input[type="text"],
.form-stack input[type="email"],
.app input[type="text"],
.app input[type="email"],
.app input:not([type]),
.app textarea {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 0.75rem;
  font: inherit;
  font-size: 16px; /* iOS: 16px未満だとフォーカスで拡大する */
  width: 100%;
  box-sizing: border-box;
}

.form-stack {
  display: grid;
  gap: 0.7rem;
}

.form-stack label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
}

/* 単独プレビュー（狭い画面ではシェル全幅・fixed ドック） */
@media (max-width: 900px) {
  .app {
    border-radius: 0;
    border-left: none;
    border-right: none;
    min-height: calc(100dvh - 3.75rem);
    overflow: visible;
  }

  .app-body {
    max-height: none;
  }

  .shop-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
  }

  .sheet {
    position: fixed;
    max-width: var(--shell-max);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }
}

/* 買い物アプリは下部に専用タブがあるため、サイト共通フッターは出さない（固定タブとの重なり防止） */
.site-footer {
  display: none;
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
  }
}

.item-check {
  width: 22px;
  height: 22px;
  accent-color: var(--brand);
}

/* ----- 読みやすさ（高齢利用を想定した文字サイズ・濃さ） ----- */

.brand__title {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--ink);
}

.site-header__free {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--brand-deep);
}

.app-bar__brand {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--brand-deep);
}

.app-bar__title,
.screen-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--ink);
}

.screen-lead,
.sheet__lead,
.auth__lead,
.settings-card p,
.settings-card ul,
.card p,
.progress p,
.item__meta,
.cat-card__body small,
.sheet__hint,
.empty,
.empty-inline,
.mini-list {
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 500;
  line-height: 1.6;
}

.item__name,
.pick-item-btn__name,
.cat-card__body strong,
.settings-card h3,
.card h3,
.subhead {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--ink);
}

.pick-item-btn__status {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--brand-deep);
}

.btn {
  font-size: var(--text-md);
  font-weight: 800;
  min-height: 3rem;
}

.today-fab-row__adds .btn {
  font-size: var(--text-sm);
  font-weight: 800;
  min-height: 3rem;
}

.shop-tabbar__item {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--tab-inactive);
  min-height: 3.85rem;
}

.shop-tabbar__item--active {
  color: var(--brand-deep);
}

.item.is-done {
  opacity: 0.78;
}

.item.is-done .item__name {
  color: var(--muted);
}

.chips span {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink);
}

.auth h2 {
  font-size: var(--text-lg);
  color: var(--ink);
}

.auth__brand,
.auth__hint,
.field span {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--brand-deep);
}

.sheet__head h3 {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--ink);
}

.account-status,
#account-status,
#sync-status,
#progress-text {
  font-weight: 700;
}

.app input[type="text"],
.app input[type="email"],
.app input:not([type]),
.field input,
.inline-add input,
.form-stack input[type="text"],
.form-stack input[type="email"] {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

/* ���͂��Ēǉ�: �o�^�ς݌�� */
.type-suggest {
  list-style: none;
  margin: -0.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  max-height: 14rem;
  overflow: auto;
}

.type-suggest__btn {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  padding: 0.7rem 0.8rem;
  font: inherit;
  cursor: pointer;
  min-height: 3rem;
}

.type-suggest__btn:hover,
.type-suggest__btn:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.type-suggest__name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
}

.type-suggest__meta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}


/* 次に欲しいこと（app-voice） */
.voice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0 0.7rem;
}

.voice-chip {
  min-height: 2.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.voice-chip[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

#card-app-voice textarea {
  width: 100%;
  min-height: 6.5rem;
  margin-top: 0.25rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  resize: vertical;
  background: #fff;
}

#card-app-voice .field {
  display: block;
  margin-bottom: 0.55rem;
}

#card-app-voice .field > span {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

button.soft-cta__go {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  padding: 0.35rem 0.15rem;
  min-height: 44px;
}
