:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  color: #263c34;
  background: #f6f5ef;
  font-synthesis: none;
  --green: #244f43;
  --muted: #596960;
  --line: #d8dfd7;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.65; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, input, select { min-height: 44px; }
:focus-visible { outline: 3px solid #986017; outline-offset: 3px; }
[hidden] { display: none !important; }
.page-header, main, footer { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.page-header { padding: 42px 0 24px; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .12em; }
time { font-size: .85rem; color: var(--muted); }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.35; letter-spacing: -.04em; margin: 24px 0 14px; }
.title-dot { display: inline-block; width: 12px; height: 12px; background: #c17a54; border-radius: 50%; margin-left: 12px; }
.mobile-break { display: none; }
.intro { color: var(--muted); margin: 0; }
h2 { margin: 0; font-size: 1.12rem; }
.storage-panel { border-top: 1px solid var(--line); padding: 14px 0 20px; font-size: .88rem; }
.storage-panel p { margin: 0; }
.saved { color: #345d49; }
.storage-warning, .notice { padding: 14px; border: 1px solid #b97840; border-radius: 10px; background: #fff0dc; color: #704414; }
.recovery-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.recovery-actions:has(button:not([hidden])) { margin-top: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stats > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; padding: 15px 22px; }
.stats span { font-size: .87rem; }
.stats strong { font-size: 1.9rem; font-weight: 650; line-height: 1.2; }
.stats .shopping-stat { background: #e4eee2; border-color: #c3d6c0; }
.panel { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: #fffefa; }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.step { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border: 1px solid #becdbf; border-radius: 50%; color: #4f6c59; font-size: .78rem; font-weight: 700; }
.add-fields { display: grid; grid-template-columns: minmax(160px, 1.4fr) minmax(180px, 1fr) auto auto; align-items: start; gap: 16px; }
.field { min-width: 0; }
label, .control-caption { font-size: .86rem; font-weight: 650; }
.field label { display: block; margin-bottom: 7px; }
input[type="text"], select, textarea { width: 100%; border: 1px solid #aebfb2; border-radius: 8px; color: #253d31; background: #fff; padding: 10px 12px; }
input::placeholder, textarea::placeholder { color: #67736a; opacity: 1; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--green); }
small { display: block; margin-top: 5px; font-size: .75rem; color: var(--muted); }
.muted, .help { color: var(--muted); }
.help { font-size: .83rem; line-height: 1.8; }
.add-panel > .help { margin-bottom: 0; }
.buy-option { display: flex; align-items: center; gap: 9px; min-height: 44px; cursor: pointer; }
.add-buy, .add-button { margin-top: 29px; }
.button { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 10px 16px; border: 1px solid transparent; font-weight: 650; font-size: .9rem; }
.primary { background: var(--green); color: #fff; }
.primary:hover:not(:disabled) { background: #163e31; }
.secondary { background: #fffefa; border-color: #acbaad; color: #304d3b; }
.secondary:hover { background: #edf2e9; }
.error { color: #a12f22; font-size: .87rem; margin: 10px 0 0; }
.error:empty { display: none; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); align-items: start; gap: 24px; margin-top: 24px; }
.filters { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 9px; padding: 4px; background: #f1f3ed; gap: 4px; }
.filters button { background: transparent; color: #4c6053; border: 1px solid transparent; border-radius: 6px; padding: 7px 13px; font-size: .85rem; }
.filters button[aria-pressed="true"] { background: #fff; border-color: #9faf9f; color: #203f2f; font-weight: 700; box-shadow: 0 1px 3px #244f4310; }
.list-count { color: var(--muted); font-size: .8rem; margin: 18px 0 10px; }
.item-list { padding: 0; margin: 0; list-style: none; }
.item-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px 18px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); }
.item-name { grid-column: 1 / -1; margin: 0; font-size: 1.08rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.item-name::before { content: ''; display: inline-block; width: 9px; height: 9px; margin: 0 9px 2px 0; background: #638460; border-radius: 50%; }
.level-low .item-name::before { background: #ad5b35; }
.level-week .item-name::before { background: #9a781e; }
.item-level { min-width: 0; }
.control-caption { display: block; color: var(--muted); font-size: .73rem; margin-bottom: 4px; }
.item-level select { max-width: 230px; font-size: .85rem; }
.item-card > .buy-option, .delete-button { margin-top: 23px; }
.delete-button { border: 0; background: transparent; color: #825347; border-radius: 6px; padding: 8px; font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; }
.delete-button:hover { background: #faebe4; }
.empty-state { padding: 30px 12px; text-align: center; border-top: 1px solid var(--line); }
.empty-mark { display: inline-flex; width: 44px; height: 44px; border: 1px dashed #9cb39d; border-radius: 12px; align-items: center; justify-content: center; color: #587255; font-size: 1.4rem; }
.empty-state p { margin: 10px 0 0; }
.shopping-panel { background: #edf3e9; }
.shopping-panel .section-heading { margin-bottom: 15px; }
.shopping-panel textarea { display: block; resize: vertical; min-height: 180px; margin: 8px 0 14px; font-size: .95rem; line-height: 1.9; }
.shopping-panel .button { width: 100%; }
#copy-status:empty { display: none; }
.privacy-note { max-width: 780px; padding: 34px 0 22px; color: var(--muted); }
.privacy-note h2 { color: #405848; font-size: .95rem; }
.privacy-note p { font-size: .79rem; margin: 10px 0; }
footer { padding: 22px 0 30px; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 10px 18px; background: #fff; color: var(--green); z-index: 5; }
.skip-link:focus { top: 12px; }
@media (max-width: 1000px) {
  .add-fields { grid-template-columns: 1fr 1fr; }
  .add-buy, .add-button { margin-top: 0; }
  .workspace { gap: 16px; }
  .panel { padding: 22px; }
}
@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; }
  .page-header, main, footer { width: calc(100% - 32px); }
  .page-header { padding-top: 24px; }
  .stats > div { padding: 14px; flex-direction: column; align-items: flex-start; gap: 5px; }
  .stats { gap: 8px; }
}
@media (max-width: 440px) {
  .mobile-break { display: block; }
  .add-fields { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .stats span { font-size: .75rem; }
  .header-top { align-items: flex-start; }
  .eyebrow { letter-spacing: .03em; font-size: .78rem; }
  time { font-size: .78rem; }
  .item-card { gap: 10px; }
  .item-level select { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
