/* 規約: 指で使う前提 (的 44px 以上) ・ 高コントラスト ・ 本文 16px 以上 */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* 隠しは何より強く効かせる (display を持つ class に負けない) */
[hidden] { display: none !important; }

body {
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 18px;
  background: #f4f3f8;
  color: #1e1b30;
}

.view {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* 上の帯 */
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #4a3f7a;
  color: #fff;
  padding: max(env(safe-area-inset-top), 10px) 16px 10px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.bar h1 { font-size: 20px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.btn-bar {
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  font-size: 17px;
  font-family: inherit;
  border: 2px solid #fff;
  border-radius: 8px;
  background: transparent;
  color: #fff;
}
.btn-bar:active { background: rgba(255, 255, 255, 0.25); }

/* 画面の中身 */
.pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}

/* 本文欄。 画面のほとんどを占める */
.body-box {
  flex: 1;
  min-height: 45vh;
  width: 100%;
  padding: 12px;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.7;
  color: inherit;
  background: #fff;
  border: 2px solid #cfcadd;
  border-radius: 10px;
  resize: none;
}
.body-box:focus { outline: 3px solid #4a3f7a; outline-offset: -3px; }
.body-box[readonly] { background: #faf9fd; }

/* ボタン */
.btn-main {
  min-height: 56px;
  font-size: 20px;
  font-family: inherit;
  font-weight: bold;
  background: #4a3f7a;
  color: #fff;
  border: none;
  border-radius: 8px;
}
.btn-main:active { background: #362c5c; }
.btn-danger {
  min-height: 48px;
  font-size: 17px;
  font-family: inherit;
  background: transparent;
  color: #b3261e;
  border: 2px solid #b3261e;
  border-radius: 8px;
}
.btn-danger:active { background: #fbe9e7; }
.btn-sub {
  min-height: 48px;
  font-size: 17px;
  font-family: inherit;
  background: #fff;
  color: #1e1b30;
  border: 2px solid #cfcadd;
  border-radius: 8px;
}
.btn-sub:active { background: #eceaf3; }

/* 一覧 */
.list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.row {
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #d8d4e6;
  border-radius: 10px;
}
.row:active { background: #eceaf3; }
.row-date { font-size: 14px; font-weight: bold; color: #4a3f7a; }
.row-head { font-size: 17px; line-height: 1.4; }
.empty { padding: 48px 0; text-align: center; color: #55506f; }

/* 見た日 */
.field { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.field input {
  min-height: 44px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 17px;
  color: inherit;
  background: #fff;
  border: 2px solid #cfcadd;
  border-radius: 8px;
}

/* 一言 */
.note {
  padding: 8px;
  text-align: center;
  font-weight: bold;
  color: #362c5c;
  background: #e7e3f4;
  border-radius: 8px;
}
.lead { font-size: 16px; color: #43406a; }

/* 消す前の確かめ */
.confirm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 2px solid #b3261e;
  border-radius: 10px;
}
.confirm p { font-size: 16px; }
