body {
  font-family: sans-serif;
  background-color: #F4FFFB;
  margin: 0;
  padding: 0;
  color: #333;
}

header {
  background: linear-gradient(135deg, #A8E6CF, #D9FFF1);
  padding: 18px 16px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

h1 {
  margin: 0;
  font-size: 24px;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 16px; /* 上だけ少し広げる */
}

.form {
  background-color: white;
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 16px; /* 少し減らす */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); /* 軽くする */
  overflow: hidden;
}

label {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: bold;
}

select,
input {
  width: 100%;
  max-width: 100%;
  display: block;
  padding: 12px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid #d9d9d9;
  box-sizing: border-box;
  font-size: 16px;
  background-color: #fff;
}

select:focus,
input:focus {
  outline: none;
  border-color: #a8c7b8;
  box-shadow: 0 0 0 3px rgba(126, 221, 193, 0.2);
}

button {
  border-radius: 999px;
  border: none;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
}

button:active {
  transform: scale(0.98);
}

h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

#summary {
  background-color: white;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  line-height: 1.6;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  background-color: white;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  line-height: 1.8;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04); /* 軽く */
  border: 1px solid rgba(0,0,0,0.03); /* ←追加 */
}

.item-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 6px;
}

.item-meta {
  font-size: 14px;
  color: #555;
}

.delete-btn {
  margin-top: 10px;
  width: auto;
  padding: 8px 12px;
  background-color: #ffe2e2;
  color: #333;
  border-radius: 10px;
  font-size: 14px;
  display: inline-block;
}

.footer-space {
  height: 24px;
}
.summary-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px;
  background-color: white; /* ←追加 */
  border-radius: 14px;
}

.summary-tag {
  background-color: white;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-expired {
  background-color: #ffd6d6;
}

.summary-soon3 {
  background-color: #ffe7b8;
}

.summary-soon7 {
  background-color: #fff6cc;
}

.app-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

header h1 {
  margin: 0;
  font-size: 22px;
  text-align: left;
}

.clear-btn {
  background-color: #f1f1f1;
  color: #666;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  width: auto;
  margin: 0;
  transition: background-color 0.2s;
}

.clear-btn:hover {
  background-color: #e5e5e5;
}

#summary {
  margin-top: 8px;
}
.summary-tags {
  padding: 10px;
}
#list {
  margin-top: 14px;
}

input, select {
  width: 100%;
  padding: 12px;
  box-sizing: border-box; /* ←これが最重要 */
}
* {
  box-sizing: border-box;
}
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}

.ocr-box {
  background-color: white;
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.ocr-status {
  margin-top: 12px;
  font-size: 14px;
  color: #4d6b63;
  font-weight: bold;
}

.ocr-result {
  margin-top: 10px;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  white-space: pre-wrap;
  background-color: #f8fffc;
  padding: 12px;
  border-radius: 12px;
}

.candidate-btn {
  background-color: #eefaf5;
  color: #2f5d50;
  padding: 8px 12px;
  border-radius: 999px;
  border: none;
  width: auto;
  margin: 4px 6px 0 0;
  display: inline-block;
  font-size: 13px;
}

.candidate-btn:hover {
  opacity: 0.9;
}

.candidate-label {
  margin-top: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #4d6b63;
  font-weight: bold;
}

.ocr-details {
  margin-top: 12px;
}

.ocr-details summary {
  cursor: pointer;
  font-size: 13px;
  color: #666;
}

.ocr-tip {
  font-size: 12px;
  color: #777;
  margin-top: 8px;
  line-height: 1.5;
}

.filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-btn {
  background-color: white;
  color: #4d6b63;
  border: 1px solid #d8eee5;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  width: auto;
  margin: 0;
}

.filter-btn:hover {
  opacity: 0.9;
}

.filter-btn.active {
  background-color: #a8c7b8;
  color: #1f4d42;
  border-color: #7EDDC1;
}

.notice-card {
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  font-size: 14px;
  background-color: #eefaf5;
  color: #2f5d50;
}

.notice-card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.notice-card.alert {
  background-color: #ffecec;
  color: #8a2f2f;
}

.notice-card.warn {
  background-color: #fff4d6;
  color: #8a6a00;
}

.notice-summary {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.notice-tag {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background-color: #f2f7f5;
  color: #4d6b63;
}

.notice-wrap {
  max-width: 480px;
  margin: 16px auto 20px;
}

.notice-card.warn {
  background-color: #fff4d6;
  color: #8a6a00;
  font-weight: 500; /* ←追加 */
}

.notice-tag:first-child {
  background-color: #ffecec;
}

.quick-capture {
  max-width: 480px;
  margin: 0 auto 20px;
}

.capture-label {
  display: block;
  background-color: #f2f7f5;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}

.capture-label input {
  display: none;
}

.preview {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

.candidate-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.candidate-btn {
  padding: 6px 10px;
  border-radius: 999px;
  background-color: #eefaf5;
  border: 1px solid #d8eee5;
  font-size: 13px;
}

.capture-main-btn {
  width: 100%;
  margin-bottom: 10px;
}

.capture-sub-btn {
  width: 100%;
  background-color: #f2f7f5;
  color: #4d6b63;
  border: 1px solid #d8eee5;
  margin-top: 0;
  margin-bottom: 10px;
}

.capture-tip {
  font-size: 12px;
  color: #777;
  margin-top: 6px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #4d6b63;
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  transition: all 0.3s;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.retry-btn {
  width: 100%;
  margin-top: 10px;
  background-color: #fff;
  border: 1px solid #ddd;
  color: #666;
}

.sub-btn {
  background-color: #f2f7f5;
  color: #4d6b63;
  border: 1px solid #d8eee5;
}

.retry-btn {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 12px;
  background-color: #fff;
  border: 1px solid #ddd;
  color: #666;
}

#customItem {
  margin-top: 8px;
}

.cat-seasoning {
  border-left: 6px solid #d8c3a5;
}

.cat-dressing {
  border-left: 6px solid #b7d7a8;
}

.cat-chilled {
  border-left: 6px solid #a8cbe8;
}

.cat-fermented {
  border-left: 6px solid #d8cfc4;
}

.cat-drink {
  border-left: 6px solid #9fd3f2;
}

.cat-retort {
  border-left: 6px solid #f4c28b;
}

.cat-other {
  border-left: 6px solid #d9d9d9;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(251, 248, 243, 0.45), rgba(251, 248, 243, 0.45)),
    url("images/bg.png") center top / 700px auto repeat;
  color: #4a4a4a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ヘッダー */
.app-header {
  margin: 0;
  padding: 14px 18px 10px;
  background: rgba(250, 246, 239, 0.42);
  backdrop-filter: blur(2px);
  border-bottom: 1px solid rgba(180, 170, 150, 0.05);
}

.header-inner {
  max-width: 760px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 251, 245, 0.38);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  opacity: 0.96;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #4a443d;
}

.brand-text p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: #8a8073;
}

.header-right-deco {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-deco-img {
  width: 92px;
  height: auto;
  display: block;
  opacity: 0.82;
  mix-blend-mode: multiply;
  filter: saturate(0.9) brightness(1.02);
}


/* 全体の横幅 */
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 28px;
}

/* カード感を足す */
.quick-capture,
.form {
  padding: 18px;
  margin-bottom: 18px;
  background: rgba(255, 252, 247, 0.72);
  border-radius: 22px;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.035),
    0 1px 2px rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(4px);
}

/* 通知 */
.notice-card {
  padding: 16px 18px;
  margin-bottom: 14px;
  background: rgba(248, 236, 210, 0.92);
  color: #8a6a0f;
  font-weight: 700;
}

/* サマリー */
.summary-box,
#summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 10px;
}

.summary-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  background: #f1f4f2;
  color: #5d6c66;
}

.summary-expired {
  background: #f7e3e3;
  color: #b46a6a;
}

.summary-soon3 {
  background: #f5edd6;
  color: #a88422;
}

.summary-soon7 {
  background: #eaf1e4;
  color: #68885d;
}

/* フォーム */
.quick-capture,
.form {
  padding: 18px;
  margin-bottom: 18px;
}

label {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  color: #3f3a35;
}

select,
input[type="text"],
input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e4ddd2;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 1rem;
  background: rgba(255, 252, 247, 0.92);
  color: #333;
  margin-bottom: 14px;
}

#customItem {
  margin-top: 6px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

button.primary {
  background: #7fae9f;
  color: #2f2f2f;
}

button.primary:hover {
  background: #6f9e90;
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
  background: #6f9e90;
}

button.secondary {
  background: #e6e1d9;
  color: #555;
}

/* リスト */
#list,
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255, 251, 246, 0.78);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.02);
}

/* カテゴリ色 */
.cat-seasoning {
  border-left: 6px solid #e6d8c9;
}

.cat-dressing {
  border-left: 6px solid #d6e8d3;
}

.cat-chilled {
  border-left: 6px solid #d6e4f2;
}

.cat-fermented {
  border-left: 6px solid #e2dbd2;
}

.cat-drink {
  border-left: 6px solid #d9eef8;
}

.cat-retort {
  border-left: 6px solid #f6e2c8;
}

.cat-other {
  border-left: 6px solid #e5e5e5;
}

h2 {
  margin-top: 0;
  color: #3f3a35;
}

@media (max-width: 600px) {
  @media (max-width: 600px) {
  .app-header {
    padding: 12px 14px 8px;
  }

  .header-inner {
    min-height: 64px;
    gap: 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .brand-icon {
    width: 44px;
    height: 44px;
  }

  .brand-text h1 {
    font-size: 1.5rem;
  }

  .brand-text p {
    font-size: 0.8rem;
    margin-top: 3px;
  }

 .header-deco-img {
  width: 120px;
  opacity: 0.85;
  mix-blend-mode: multiply;
 }  
  }
  main {
    padding: 0 14px 24px;
  }
}

#enableNotificationBtn,
#testNotificationBtn,
#logoutBtn,
.camera-btn,
.primary-btn {
  background-color: #a8c7b8;
  color: #3f3a35;
  box-shadow: 0 4px 10px rgba(120, 180, 160, 0.18);
}
 

.capture-sub-btn,
.retry-btn {
  background: rgba(255, 252, 247, 0.72);
  color: #746d63;
  border: 1px solid rgba(196, 187, 173, 0.45);
}

.auth-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.auth-box button,
#enableNotificationBtn,
#testNotificationBtn,
#logoutBtn {
  width: 100%;
  display: block;
}

/* メインボタン（カメラ） */
.capture-main-btn,
#enableNotificationBtn,
#testNotificationBtn,
#logoutBtn {
  background: #cfe3d9 !important;
  color: #4e5a54 !important;
  box-shadow: none !important;
}
.add-btn {
  background: #e7e3dd !important;
  color: #6b665f !important;
  box-shadow: none !important;
  border: none !important;
}

button.add-btn {
  background: #e7e3dd !important;
}

