* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
       background: #f4f4f6; color: #1c1c1e; }
.hidden { display: none !important; }
.view { max-width: 720px; margin: 0 auto; padding: 12px; }
.login-box { margin-top: 8vh; background: #fff; border-radius: 14px; padding: 24px;
             box-shadow: 0 2px 12px rgba(0,0,0,.08); text-align: center; }
.login-icon { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; }
.login-box label { display: block; text-align: left; margin: 12px 0; font-size: 14px; }
input { width: 100%; padding: 10px; font-size: 16px; border: 1px solid #c7c7cc;
        border-radius: 8px; margin-top: 4px; }
button { background: #b01e24; color: #fff; border: 0; border-radius: 8px;
         padding: 11px 18px; font-size: 16px; cursor: pointer; }
button.ghost { background: transparent; color: #b01e24; border: 1px solid #b01e24;
               padding: 6px 12px; font-size: 14px; }
.error { color: #b01e24; min-height: 1.2em; }
.secret { font-family: monospace; font-size: 18px; letter-spacing: 2px;
          background: #f4f4f6; padding: 8px; border-radius: 8px; word-break: break-all; }
.uri { font-size: 11px; color: #666; word-break: break-all; }
header { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
header .brand { font-weight: 700; display: flex; align-items: center; gap: 6px; }
header .brand img { width: 28px; height: 28px; border-radius: 6px; }
header #who { margin-left: auto; font-size: 13px; color: #555; }
nav#tabs { display: flex; gap: 6px; margin: 8px 0 12px; }
nav#tabs button { flex: 1; background: #e5e5ea; color: #1c1c1e; }
nav#tabs button.active { background: #b01e24; color: #fff; }
.card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px;
        box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.card h2 { font-size: 17px; margin: 2px 0 10px; }
.card h3 { font-size: 15px; margin: 14px 0 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: 6px 4px; border-bottom: 1px solid #eee; text-align: left;
         vertical-align: top; }
td.num, th.num { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bal { display: flex; align-items: baseline; gap: 8px; padding: 6px 0;
       border-bottom: 1px solid #eee; flex-wrap: wrap; }
.bal strong { font-size: 20px; margin-left: auto; }
.bal small { color: #666; width: 100%; }
.note { font-size: 12.5px; color: #666; }
.row { display: flex; align-items: center; gap: 8px; padding: 10px 2px;
       border-bottom: 1px solid #eee; text-decoration: none; color: inherit; }
.row .grow { flex: 1; display: flex; flex-direction: column; }
.row small { color: #666; }
.scroll { overflow-x: auto; }
footer { font-size: 11px; color: #999; padding: 8px 2px 20px; }
/* Phase 2-0: freshness banner, conclusion band, status editor */
.fresh { display: flex; flex-wrap: wrap; gap: 4px 14px; background: #ececf1;
         border-radius: 10px; padding: 8px 12px; margin-bottom: 12px;
         font-size: 12.5px; color: #444; }
.stale-warn { background: #f5c542; color: #4a3800; border-radius: 6px;
              padding: 0 5px; font-weight: 600; }
.stale-bad { background: #b01e24; color: #fff; border-radius: 6px;
             padding: 0 5px; font-weight: 600; }
.card.conclusion { border: 2px solid #b01e24; }
.alert { border-radius: 8px; padding: 8px 10px; font-size: 14px; margin: 6px 0; }
.alert-warn { background: #fdf3d7; color: #6b5200; }
.alert-bad { background: #fbe3e4; color: #7a1216; font-weight: 600; }
.badge { background: #f5c542; color: #4a3800; border-radius: 6px;
         padding: 0 5px; font-size: 11.5px; font-weight: 600; }
.badge-bad { background: #b01e24; color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chips button { padding: 6px 10px; font-size: 13px; border-radius: 999px;
                border: 1px solid #c7c7cc; background: #fff; color: #333; }
.chips button.active { background: #b01e24; border-color: #b01e24; color: #fff; }
.sortsel { display: block; font-size: 13px; color: #444; margin: 6px 0 10px; }
.sortsel select { padding: 6px; font-size: 14px; border-radius: 8px;
                  border: 1px solid #c7c7cc; background: #fff; }
.cash { color: #7a1216; }
.status-edit { border-top: 1px solid #eee; border-bottom: 1px solid #eee;
               padding: 10px 0; margin: 8px 0; }
.status-edit select { width: 100%; padding: 10px; font-size: 16px;
                      border: 1px solid #c7c7cc; border-radius: 8px;
                      margin: 6px 0; background: #fff; }
.status-edit button { margin-top: 4px; }
/* Phase 2-2 restaurant: sub-navigation + confirmation list */
.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.subnav button { padding: 7px 12px; font-size: 13.5px; border-radius: 999px;
                 border: 1px solid #c7c7cc; background: #fff; color: #333; }
.subnav button.active { background: #b01e24; border-color: #b01e24; color: #fff; }
.card.alert { border: 2px solid #b01e24; }
.big { font-size: 22px; font-weight: 700; }
.ok { color: #1a7a2e; font-weight: 600; }
.warn { color: #b01e24; font-weight: 600; }
.conf-items { list-style: none; padding: 0; margin: 0; }
.conf-items li { border-top: 1px solid #eee; padding: 10px 0; }
.conf-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.conf-btn { padding: 6px 10px; font-size: 13px; border-radius: 999px;
            border: 1px solid #b01e24; background: #fff; color: #b01e24; }
