/* ==========================================================================
   VIEUX BUYING TRIP — UI R1（Gallery）
   docs/design/r1 の Claude Design を再現する。main.css の後に読み、旧部品を上書きする
   ========================================================================== */

html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button, input, select, textarea { font-family: inherit; color: inherit; }
.num, .tabular { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- 部品（PWA Screens のブロック） ---------- */
.ui-label {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; color: var(--t2); text-transform: uppercase;
}
.ui-hero { padding: 8px 20px 0; display: flex; flex-direction: column; gap: 6px; }
.ui-hero-title { font-size: var(--fs-hero); font-weight: 700; letter-spacing: -1px; line-height: 1.12; margin: 0; }
.ui-hero-sub { font-size: 15px; color: var(--t2); line-height: 1.55; }

.ui-sec { padding: 26px 20px 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ui-sec-title { font-size: var(--fs-section); font-weight: 700; letter-spacing: -.3px; margin: 0; }
.ui-sec-right { font-size: 14px; color: var(--t2); white-space: nowrap; background: none; border: 0; padding: 0; }
button.ui-sec-right { cursor: pointer; }

.ui-kpis { margin: 16px 16px 0; display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.ui-kpi { background: var(--s1); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; border: 0; text-align: left; }
.ui-kpi-l { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--t2); }
.ui-kpi-v { font-size: 22px; font-weight: 700; letter-spacing: -.6px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-kpi-s { font-size: 12px; color: var(--t2); }

.ui-chips { display: flex; gap: 8px; padding: 14px 16px 0; overflow-x: auto; scrollbar-width: none; }
.ui-chips::-webkit-scrollbar { display: none; }
.ui-chip {
  flex: none; height: 38px; border-radius: 19px; display: inline-flex; align-items: center; gap: 6px; padding: 0 15px;
  font-size: 15px; background: var(--s1); color: var(--ink); border: 0; cursor: pointer; font-weight: 400;
  transition: background var(--t-press), color var(--t-press), transform var(--t-press);
}
.ui-chip.on, .ui-chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.ui-chip:active { transform: scale(.97); }

.ui-seg { margin: 14px 16px 0; background: var(--s1); border-radius: 22px; padding: 4px; display: grid; gap: 4px; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.ui-seg > button {
  height: 36px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 15px;
  white-space: nowrap; background: transparent; color: var(--t2); border: 0; cursor: pointer; font-weight: 400; padding: 0 6px;
  transition: background var(--t-ui) var(--ease), color var(--t-ui), box-shadow var(--t-ui);
}
.ui-seg > button.on, .ui-seg > button[aria-selected="true"] { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.14); }

.ui-rows { margin: 0 20px; display: flex; flex-direction: column; }
.ui-row {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line);
  background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; color: inherit; font: inherit;
}
button.ui-row, a.ui-row, .ui-row[data-href] { cursor: pointer; text-decoration: none; }
.ui-row:active { background: var(--s1); }
.ui-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ui-row-meta { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--t2); }
.ui-row-t { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.ui-row-t.strike { text-decoration: line-through; color: var(--t3); }
.ui-row-t.err { color: var(--err); }
.ui-row-s { font-size: 13px; color: var(--t2); line-height: 1.45; }
.ui-row-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; max-width: 42%; text-align: right; }
.ui-row-r { font-size: 15px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.ui-row-r.t3 { color: var(--t3); } .ui-row-r.ok { color: var(--ok); } .ui-row-r.warn { color: var(--warn); } .ui-row-r.err { color: var(--err); } .ui-row-r.t2 { color: var(--t2); }
.ui-row-rs { font-size: 12px; color: var(--t2); }
.ui-row-rs.ac { color: var(--accent); }
.ui-row-act { background: none; border: 0; padding: 6px 0 6px 10px; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; }
.ui-row-act.err { color: var(--err); }

/* 行の左の印 */
.ui-lead { flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.ui-lead.n, .ui-lead.mark { width: 28px; height: 28px; border-radius: 14px; background: var(--s1); color: var(--t2); }
.ui-lead.n.cur { background: var(--accent); color: var(--on-accent); }
.ui-lead.mark.ink { color: var(--ink); } .ui-lead.mark.err { color: var(--err); } .ui-lead.mark.warn { color: var(--warn); } .ui-lead.mark.ok { color: var(--ok); } .ui-lead.mark.t3 { color: var(--t3); }
.ui-lead.thumb { width: 44px; height: 56px; border-radius: 10px; background: var(--placeholder); background-size: cover; background-position: center; overflow: hidden; }
.ui-lead.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ui-lead.pinbox { width: 28px; height: 28px; }

/* ピン（地図と一覧で共通の見た目） */
.ui-pin { display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 12px; font-weight: 700; box-shadow: 0 0 0 3px var(--card), 0 2px 6px rgba(0,0,0,.28); }
.ui-pin.shop { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--on-ink); }
.ui-pin.next { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.ui-pin.fav { width: 22px; height: 22px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 5px var(--accent), 0 0 0 2px var(--card), 0 2px 6px rgba(0,0,0,.28); }
.ui-pin.dealer { width: 17px; height: 17px; border-radius: 4px; background: var(--ink); transform: rotate(45deg); }
.ui-pin.flea { width: 20px; height: 20px; border-radius: 6px; background: var(--ink); }
.ui-pin.unv { width: 15px; height: 15px; border-radius: 50%; background: var(--t3); }
.ui-pin.carrier { width: 22px; height: 22px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 5px var(--ink), 0 0 0 2px var(--card), 0 2px 6px rgba(0,0,0,.28); }
.ui-pin.me { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--card), 0 0 0 18px rgba(127,127,127,.2); }
.ui-pin.excl { width: 15px; height: 15px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px var(--t3); }

.ui-fields { padding: 10px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.ui-field { display: flex; flex-direction: column; gap: 6px; }
.ui-field-l { font-size: 13px; font-weight: 600; color: var(--t2); padding: 0 4px; }
.ui-input-wrap { position: relative; display: flex; align-items: center; min-height: 50px; border-radius: var(--radius-input); background: var(--s1); }
.ui-input-wrap:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.ui-input-wrap input, .ui-input-wrap select, .ui-input-wrap textarea {
  flex: 1; min-width: 0; min-height: 50px; border: 0; background: transparent; padding: 0 16px; font-size: var(--fs-input); outline: none; border-radius: var(--radius-input);
}
.ui-input-wrap textarea { padding: 14px 16px; resize: vertical; line-height: 1.6; }
.ui-input-r { font-size: 13px; font-weight: 600; color: var(--t2); white-space: nowrap; padding-right: 16px; background: none; border: 0; cursor: pointer; }

.ui-btns { padding: 16px 16px 0; display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); }
.ui-btn {
  height: var(--btn); border-radius: 26px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 600; white-space: nowrap; background: var(--s1); color: var(--ink); border: 0; cursor: pointer;
  padding: 0 20px; text-decoration: none; transition: transform var(--t-press), opacity var(--t-press), background var(--t-press);
}
.ui-btn:active { transform: scale(.97); }
.ui-btn.pri { background: var(--ink); color: var(--on-ink); }
.ui-btn.dan { background: var(--err-soft); color: var(--err); }
.ui-btn:disabled, .ui-btn.dis { background: var(--s2); color: var(--t3); cursor: default; transform: none; }
.ui-btn .tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; opacity: .65; }
.ui-btn.sm { height: 42px; border-radius: 21px; font-size: 15px; padding: 0 18px; }
.ui-btn.xs { height: 36px; border-radius: 18px; font-size: 14px; padding: 0 14px; }

.ui-note { padding: 12px 20px 0; font-size: 13px; line-height: 1.7; color: var(--t2); }
.ui-quote { margin: 12px 16px 0; border-radius: 22px; background: var(--s1); padding: 16px 18px; font-size: 16px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.ui-bar { padding: 14px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.ui-bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.ui-bar-top > :first-child { color: var(--t2); } .ui-bar-top > :last-child { font-weight: 700; }
.ui-bar-track { height: 4px; border-radius: 2px; background: var(--s2); overflow: hidden; }
.ui-bar-fill { display: block; height: 100%; border-radius: 2px; background: var(--ink); width: 0; transition: width 700ms var(--ease); }
.ui-bar-fill.t3 { background: var(--t3); } .ui-bar-fill.warn { background: var(--warn); } .ui-bar-fill.err { background: var(--err); }

.ui-bars { margin: 4px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.ui-bars-row { display: grid; grid-template-columns: 96px 1fr 76px; gap: 10px; align-items: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.ui-bars-row > :first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-bars-row > :last-child { text-align: right; color: var(--t2); white-space: nowrap; }
.ui-bars-track { position: relative; height: 10px; border-radius: 5px; background: var(--s1); }
.ui-bars-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--ink); width: 0; transition: width 700ms var(--ease); }
.ui-bars-goal { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: var(--t2); }

.ui-banner {
  margin: 8px 16px 0; min-height: 44px; border-radius: 22px; display: flex; align-items: center; gap: 10px; padding: 6px 16px;
  font-size: 15px; font-weight: 600; background: var(--s1); color: var(--ink); border: 0; width: calc(100% - 32px); text-align: left;
}
.ui-banner::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: currentColor; flex: none; }
.ui-banner > .t { flex: 1; line-height: 1.4; }
.ui-banner > .s { font-size: 13px; font-weight: 500; opacity: .85; text-align: right; }
.ui-banner.offline { background: var(--s2); color: var(--ink); }
.ui-banner.pending { background: var(--warn-soft); color: var(--warn); }
.ui-banner.failed { background: var(--err-soft); color: var(--err); }
.ui-banner.sending, .ui-banner.info { background: var(--s1); color: var(--ink); }
.ui-banner.ok { background: var(--s1); color: var(--ok); }
button.ui-banner { cursor: pointer; }

.ui-big { padding: 24px 24px 0; display: flex; flex-direction: column; gap: 12px; }
.ui-big-v { font-weight: 700; line-height: 1.15; letter-spacing: -1px; font-variant-numeric: tabular-nums; font-size: 64px; overflow-wrap: anywhere; }
.ui-big-s { font-size: 18px; line-height: 1.55; color: var(--t2); }

.ui-amt { padding: 16px 20px 0; display: flex; flex-direction: column; gap: 4px; }
.ui-amt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ui-amt-cur { height: 40px; border-radius: 20px; background: var(--s1); display: inline-flex; align-items: center; padding: 0 14px; font-size: 15px; font-weight: 700; border: 0; cursor: pointer; }
.ui-amt-v { font-size: var(--fs-amount); font-weight: 700; letter-spacing: -2.5px; line-height: 1; font-variant-numeric: tabular-nums; overflow: hidden; white-space: nowrap; }
.ui-amt-v.zero { color: var(--t3); }
.ui-amt-s { text-align: right; font-size: 15px; color: var(--t2); font-variant-numeric: tabular-nums; }

.ui-keypad { padding: 14px 16px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ui-keypad button {
  height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 500;
  background: var(--s1); border: 0; color: var(--ink); cursor: pointer; transition: background var(--t-press), color var(--t-press);
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.ui-keypad button.flat { background: transparent; }
.ui-keypad button:active, .ui-keypad button.down { background: var(--ink); color: var(--on-ink); }

.ui-grid { padding: 14px 16px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ui-grid-item { display: flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.ui-grid-ph { aspect-ratio: 3 / 4; border-radius: 14px; background: var(--placeholder); background-size: cover; background-position: center; overflow: hidden; display: block; }
.ui-grid-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ui-grid-no { font-size: 11px; font-weight: 600; color: var(--t2); letter-spacing: .04em; }

.ui-tiles { padding: 6px 16px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ui-tile { height: 84px; border-radius: 20px; background: var(--s1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 600; border: 0; cursor: pointer; color: var(--ink); transition: transform var(--t-press); }
.ui-tile:active { transform: scale(.97); }
.ui-tile .k { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--t2); }

.ui-skel { margin: 12px 16px 0; border-radius: 22px; background: var(--s1); padding: 16px; display: flex; gap: 14px; }
.ui-skel::before { content: ''; width: 44px; height: 56px; border-radius: 10px; background: var(--s2); flex: none; }
.ui-skel > span { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.ui-skel > span::before, .ui-skel > span::after { content: ''; height: 12px; border-radius: 6px; background: var(--s2); }
.ui-skel > span::before { width: 55%; height: 14px; } .ui-skel > span::after { width: 85%; }

.ui-empty { margin: 12px 16px 0; border-radius: 24px; background: var(--s1); padding: 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ui-empty .lab { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--t2); }
.ui-empty .t { font-size: 19px; font-weight: 700; }
.ui-empty .s { font-size: 14px; line-height: 1.6; color: var(--t2); }
.ui-empty .ui-btn { margin-top: 6px; height: 42px; border-radius: 21px; font-size: 15px; padding: 0 18px; }

.ui-table { margin: 14px 16px 0; border-radius: 20px; background: var(--s1); overflow: hidden; }
.ui-table-r { display: grid; padding: 0 12px; min-height: 46px; align-items: center; font-size: 15px; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); grid-template-columns: var(--cols); }
.ui-table-r.head { min-height: 40px; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--t2); border-top: 0; }
.ui-table-r.hi { background: var(--s2); font-weight: 700; }

.ui-chat { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.ui-chat-m { display: flex; }
.ui-chat-m > span { max-width: 290px; border-radius: 22px; padding: 12px 16px; font-size: 15px; line-height: 1.6; background: var(--s1); white-space: pre-wrap; overflow-wrap: anywhere; }
.ui-chat-m.me { justify-content: flex-end; }
.ui-chat-m.me > span { background: var(--ink); color: var(--on-ink); }

.ui-err-line { display: flex; align-items: center; gap: 10px; margin: 8px 20px 0; font-size: 14px; color: var(--t2); }
.ui-err-line button { margin-left: auto; background: none; border: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }

/* 送信中のボタンのスピナー */
.ui-btn[aria-busy="true"]::after, .btn[aria-busy="true"]::after {
  content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: ui-spin .7s linear infinite;
}
@keyframes ui-spin { to { transform: rotate(360deg); } }

/* ---------- 旧部品を新しい見た目に ---------- */
.btn {
  height: var(--btn); min-height: var(--btn); border-radius: 26px; border: 0; padding: 0 20px; font-size: 16px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--s1); color: var(--ink);
  box-shadow: none; transition: transform var(--t-press), background var(--t-press);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink); opacity: .92; }
.btn-secondary, .btn-tag, .btn-tag-remove { background: var(--s1); color: var(--ink); border: 0; }
.btn-secondary:hover { background: var(--s2); }
.btn-danger { background: var(--err-soft); color: var(--err); border: 0; }
.btn:disabled { background: var(--s2); color: var(--t3); opacity: 1; transform: none; }
.btn-sm { height: 42px; min-height: 42px; border-radius: 21px; font-size: 15px; padding: 0 18px; }
.btn-xs { height: 34px; min-height: 34px; border-radius: 17px; font-size: 13px; padding: 0 12px; }
.btn-full { width: 100%; }
.btn-tag.active { background: var(--ink); color: var(--on-ink); }

.form-group { margin-bottom: 12px; }
.form-group > label, .form-section-label { display: block; font-size: 13px; font-weight: 600; color: var(--t2); padding: 0 4px; margin-bottom: 6px; letter-spacing: 0; text-transform: none; }
.form-section-label { padding: 18px 4px 4px; font-size: var(--fs-section); font-weight: 700; color: var(--ink); letter-spacing: -.3px; }
.form-input, select.form-input, textarea.form-input {
  width: 100%; min-height: 50px; border: 0; border-radius: var(--radius-input); background: var(--s1); color: var(--ink);
  padding: 0 16px; font-size: var(--fs-input); box-shadow: none; outline: none; -webkit-appearance: none; appearance: none;
}
textarea.form-input { padding: 14px 16px; line-height: 1.6; }
select.form-input { background-image: linear-gradient(45deg, transparent 50%, var(--t2) 50%), linear-gradient(135deg, var(--t2) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.form-input:focus { box-shadow: inset 0 0 0 2px var(--ink); border: 0; }
.form-input::placeholder { color: var(--t3); }
.form-input-sm { min-height: 42px; font-size: 16px; border-radius: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.empty-state, .loading-text { margin: 12px 0 0; border-radius: 24px; background: var(--s1); padding: 28px 22px; text-align: center; font-size: 14px; line-height: 1.6; color: var(--t2); }
.loading-text { background: none; padding: 20px; }

.detail-section { border: 0; padding: 0; margin: 0 0 4px; background: none; }
.detail-section-title { font-size: var(--fs-section); font-weight: 700; letter-spacing: -.3px; color: var(--ink); margin: 26px 0 8px; text-transform: none; }

/* ---------- 画面の外枠（下部タブ・状態バー） ---------- */
.app-tabs { position: fixed; inset: 0; }
.tab {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding-top: calc(var(--safe-top) + 10px); padding-bottom: calc(var(--tabbar) + var(--safe-bottom) + 28px);
  background: var(--bg); visibility: hidden; opacity: 0; transform: translateY(10px);
  transition: opacity 350ms var(--ease), transform 350ms var(--ease), visibility 0s linear 350ms;
}
.tab.active { visibility: visible; opacity: 1; transform: none; transition: opacity 350ms var(--ease), transform 350ms var(--ease), visibility 0s; }
body.has-status .tab { padding-top: calc(var(--safe-top) + 62px); }
.tab#tab-map { overflow: hidden; padding-bottom: 0; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 400; height: calc(var(--tabbar) - 30px + max(var(--safe-bottom), 30px));
  background: var(--bg); box-shadow: 0 -1px 0 var(--line); display: flex; padding: 0 6px max(var(--safe-bottom), 30px);
}
.tabbar-btn {
  flex: 1; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 500; color: var(--t2); background: none; border: 0; padding: 0; cursor: pointer;
}
.tabbar-btn .ic { width: 30px; height: 30px; border-radius: 26px; display: flex; align-items: center; justify-content: center; }
.tabbar-btn svg { width: 24px; height: 24px; }
.tabbar-btn.active { color: var(--ink); font-weight: 700; }
.tabbar-btn.record .ic { width: 52px; height: 52px; background: var(--ink); color: var(--on-ink); transition: transform var(--t-press); }
.tabbar-btn.record:active .ic { transform: scale(.92); }
.tabbar-btn.record .lb { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.status-bar {
  position: fixed; z-index: 450; left: 16px; right: 16px; top: calc(var(--safe-top) + 6px);
  min-height: 44px; border-radius: 22px; display: flex; align-items: center; gap: 10px; padding: 6px 16px;
  font-size: 15px; font-weight: 600; border: 0; text-align: left; cursor: pointer; background: var(--s2); color: var(--ink);
  box-shadow: 0 8px 20px -14px rgba(0,0,0,.4);
}
.status-bar::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: currentColor; flex: none; }
.status-bar .t { flex: 1; line-height: 1.4; }
.status-bar .s { font-size: 13px; font-weight: 500; opacity: .85; }
.status-bar.pending { background: var(--warn-soft); color: var(--warn); }
.status-bar.failed { background: var(--err-soft); color: var(--err); }
.status-bar.sending { background: var(--s1); color: var(--ink); }
.status-bar > #offline-indicator, .status-bar > #outbox-chip { display: none !important; }
body.screen-covering .status-bar { display: none; }

/* 旧ヘッダー・サイドバー・FAB は使わない */
.header, .sidebar, .sidebar-overlay, .quick-log-fab, .calc-fab, .exchange-rate-widget { display: none !important; }

/* ---------- 通知（トースト） ---------- */
.app-toast {
  position: fixed; z-index: 900; left: 12px; right: 12px; bottom: calc(var(--tabbar) + var(--safe-bottom) - 18px);
  min-height: 56px; border-radius: 28px; display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 20px;
  font-size: 15px; font-weight: 600; background: var(--ink); color: var(--on-ink); box-shadow: 0 12px 26px -14px rgba(0,0,0,.5);
  transform: translateY(20px); opacity: 0; pointer-events: none; transition: transform var(--t-ui) var(--ease), opacity var(--t-ui);
  max-width: 560px; margin: 0 auto; line-height: 1.4;
}
.app-toast .t { flex: 1; min-width: 0; }
.app-toast.app-toast-visible { transform: none; opacity: 1; pointer-events: auto; }
.app-toast-action { height: 40px; border-radius: 20px; padding: 0 14px; background: rgba(127,127,127,.24); color: inherit; border: 0; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; flex: none; }
body.screen-covering .app-toast { bottom: calc(var(--safe-bottom) + 108px); }
body.no-bar.screen-covering .app-toast { bottom: calc(var(--safe-bottom) + 24px); }

/* ---------- 画面（旧モーダル）：push・全画面シート・下半分のシート ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500; display: block; background: transparent; padding: 0; align-items: initial; justify-content: initial;
  visibility: hidden; pointer-events: none; opacity: 1; transition: visibility 0s linear var(--t-sheet), background var(--t-ui);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.modal-overlay.open { visibility: visible; pointer-events: auto; transition: visibility 0s, background var(--t-ui); }
.modal-overlay > .modal {
  position: absolute; inset: 0; width: auto; max-width: none; max-height: none; height: auto; margin: 0; border-radius: 0;
  background: var(--bg); color: var(--ink); box-shadow: none; display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(100%); transition: transform var(--t-ui) var(--ease);
  animation: none;
}
.modal-overlay.open > .modal { transform: none; }
/* push はタブバーの上に出さない（タブバーは見えたまま） */
.modal-overlay[data-present="push"] { bottom: calc(var(--tabbar) - 30px + max(var(--safe-bottom), 30px)); z-index: 350; }
/* 全画面シート（入力）：下から */
.modal-overlay[data-present="sheet"] > .modal { transform: translateY(100%); transition: transform var(--t-sheet) var(--ease); border-radius: 0; }
.modal-overlay[data-present="sheet"].open > .modal { transform: none; }
/* 下半分のシート（選ぶ・確かめる） */
.modal-overlay[data-present="half"].open { background: rgba(0,0,0,.32); }
.modal-overlay[data-present="half"] > .modal { top: auto; max-height: 86vh; border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; transform: translateY(100%); transition: transform var(--t-sheet) var(--ease); }
.modal-overlay[data-present="half"].open > .modal { transform: none; }
.modal-overlay[data-present="half"] > .modal::before { content: ''; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--s2); margin: 8px auto 0; flex: none; }

.modal-header {
  flex: none; height: 46px; margin-top: var(--safe-top); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 0 16px; border: 0; background: var(--bg); position: relative; font-size: 16px;
}
.modal-overlay[data-present="half"] .modal-header { margin-top: 4px; }
.modal-title { grid-column: 2; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; margin: 0; letter-spacing: 0; text-align: center; }
.modal-close {
  grid-column: 1; grid-row: 1; justify-self: start; width: auto; height: 44px; padding: 0; border: 0; background: none; color: var(--ink);
  font-size: 16px; font-weight: 500; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; border-radius: 0;
}
.modal-close svg { display: none; }
.modal-close::before { content: attr(data-label); white-space: nowrap; }
.modal-overlay[data-present="push"] .modal-close::before { content: '‹ ' attr(data-label); }
.modal-header-actions { grid-column: 3; justify-self: end; display: flex; gap: 14px; align-items: center; }
.modal-header-actions button { background: none; border: 0; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); cursor: pointer; padding: 8px 0; }
.modal-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 16px calc(28px + var(--safe-bottom)); -webkit-overflow-scrolling: touch; background: var(--bg); }
.modal-overlay[data-present="push"] .modal-body { padding-bottom: 28px; }
.modal-body.flush { padding-left: 0; padding-right: 0; }
.modal-lg, .modal-sm { max-width: none; }

/* 画面の下部バー（主ボタン） */
.bottom-bar { flex: none; padding: 10px 16px calc(max(var(--safe-bottom), 24px) + 10px); background: var(--bg); box-shadow: 0 -1px 0 var(--line); display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); }
.bottom-bar .ui-btn, .bottom-bar .btn { height: var(--btn-bar); border-radius: 27px; width: 100%; }

/* 提示モード（相手に見せる） */
.present { background: #fbfbfa; color: #0e0e0e; }

/* ---------- 起動画面 ---------- */
.splash { position: fixed; inset: 0; z-index: 2000; background: #0e0e0e; display: flex; align-items: center; justify-content: center; transition: opacity 320ms var(--ease), transform 320ms var(--ease); }
.splash svg { width: 132px; height: 132px; animation: splash-in 200ms var(--ease) both; }
.splash.done { opacity: 0; pointer-events: none; }
.splash.done svg { transform: scale(.7); transition: transform 320ms var(--ease); }
.splash .route-dot { animation: splash-route 1.2s linear infinite; }
.splash .line { transform-origin: left center; animation: splash-line 300ms var(--ease) both; }
.splash .line:nth-of-type(2) { animation-delay: 100ms; } .splash .line:nth-of-type(3) { animation-delay: 200ms; }
.splash .barcode { clip-path: inset(0 100% 0 0); animation: splash-print 500ms var(--ease) 300ms forwards; }
@keyframes splash-in { from { opacity: 0; } }
@keyframes splash-route { 0% { opacity: .2; } 50% { opacity: 1; } 100% { opacity: .2; } }
@keyframes splash-line { from { transform: scaleX(0); } }
@keyframes splash-print { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .splash svg, .splash .route-dot, .splash .line { animation: none; }
  .splash .barcode { animation: none; clip-path: none; }
}

/* ==========================================================================
   今日タブ（Hybrid）
   ========================================================================== */
.today-head { padding: 8px 20px 0; }
.today-total { margin-top: 10px; font-size: 56px; font-weight: 700; letter-spacing: -2px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.today-sub { padding-top: 6px; font-size: 15px; color: var(--t2); font-variant-numeric: tabular-nums; line-height: 1.3; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.today-sub .odo { color: var(--ink); font-weight: 700; }
.odo { display: inline-flex; align-items: flex-start; }
.odo-p { display: inline-block; }
.odo { --odo-h: 1.05em; }
.today-sub .odo { --odo-h: 1.3em; }
.ui-kpi-v .odo { --odo-h: 1.25em; }
.odo-slot { display: inline-block; overflow: hidden; height: var(--odo-h); width: .62em; text-align: center; line-height: var(--odo-h); }
.odo-col { display: block; will-change: transform; }
.odo-col > span { display: block; height: var(--odo-h); line-height: var(--odo-h); }

.ticker { display: flex; align-items: center; width: 100%; margin-top: 16px; height: 40px; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); background: none; padding: 0; overflow: hidden; cursor: pointer; color: var(--ink); }
.ticker-line { margin-top: 16px; border-top: 1px solid var(--ink); }
.ticker-run { display: flex; flex: none; white-space: nowrap; font-size: 12px; font-weight: 600; letter-spacing: .12em; animation: ticker var(--ticker) linear infinite; }
.ticker-run > span { padding-right: 40px; }
.ticker-run.paused { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-run { animation: none; } }

.today-row-head { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: baseline; }
.link-sm { background: none; border: 0; font: inherit; font-size: 13px; color: var(--t2); cursor: pointer; padding: 4px 0; }

.card-stack { position: relative; margin: 10px 16px 0; height: 372px; }
.card { position: absolute; left: 0; right: 0; top: 0; height: 340px; border-radius: 24px; transform-origin: 50% 100%; transition: transform var(--t-card) var(--ease), opacity var(--t-card); }
.card.back { background: var(--s2); z-index: 1; transform: translateY(32px) scale(.88); }
.card.mid { background: var(--s1); overflow: hidden; z-index: 2; transform: translateY(16px) scale(.94); }
.card-stack.leaving .card.mid { transform: none; }
.card-stack.leaving .card.back { transform: translateY(16px) scale(.94); }
.card.front { z-index: 3; perspective: 1400px; touch-action: pan-y; }
.card.front.gone { transform: translateX(-118%) rotate(-9deg); opacity: 0; transition: transform var(--t-card) var(--ease-out), opacity var(--t-card); }
.card-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform var(--t-flip) var(--ease); }
.card.instore .card-flip { transform: rotateY(180deg); }
.card-face { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.card-front { background: var(--s1); box-shadow: 0 14px 30px -18px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.card.instore .card-front { pointer-events: none; }
.card:not(.instore) .card-back { pointer-events: none; }
.card-photo { position: relative; height: 130px; flex: none; background: var(--placeholder); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-badge { position: absolute; left: 12px; top: 12px; height: 30px; border-radius: 15px; background: #fff; color: #0e0e0e; display: flex; align-items: center; padding: 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.card-body { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-name { font-size: 28px; font-weight: 700; letter-spacing: -.6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-st { font-size: 15px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-st .st { font-weight: 600; } .card-st .st.ok { color: var(--ok); }
.card-actions { margin: 12px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.card-actions .ui-btn { font-size: 17px; }
.card-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.card-mini .mini { height: 44px; border-radius: 22px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 500; border: 0; color: var(--ink); text-decoration: none; cursor: pointer; }
.card-back { background: var(--ink); color: var(--on-ink); transform: rotateY(180deg); padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 4px; }
.back-top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; letter-spacing: .14em; opacity: .7; }
.back-name { font-size: 34px; font-weight: 700; letter-spacing: -1px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-sub { font-size: 15px; opacity: .75; }
.back-flex { flex: 1; }
.back-shoot { height: 58px; border-radius: 29px; background: var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 700; border: 0; cursor: pointer; transition: transform var(--t-press); }
.back-shoot:active { transform: scale(.97); }
.back-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.back-mini button { height: 44px; border-radius: 22px; background: color-mix(in srgb, var(--on-ink) 14%, transparent); color: inherit; border: 0; font-size: 15px; cursor: pointer; }
.back-next { height: 44px; display: flex; align-items: center; justify-content: center; font-size: 15px; opacity: .85; background: none; border: 0; color: inherit; cursor: pointer; }
.done-card { background: var(--s1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; }
.done-t { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.done-s { font-size: 15px; color: var(--t2); }
.today-hint { padding: 8px 20px 0; margin: 0; font-size: 13px; color: var(--t2); text-align: center; min-height: 18px; }

.route-line { position: relative; margin: 26px 34px 0; height: 56px; }
.rl-track { position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--line); }
.rl-fill { position: absolute; left: 0; top: 9px; height: 2px; background: var(--ink); transition: width 500ms var(--ease); }
.rl-node { position: absolute; top: 4px; width: 12px; height: 12px; margin-left: -6px; border-radius: 6px; background: var(--bg); box-shadow: inset 0 0 0 2px var(--t3); }
.rl-node.past { background: var(--ink); box-shadow: none; }
.rl-label { position: absolute; top: 28px; font-size: 13px; white-space: nowrap; transform: translateX(-50%); color: var(--t2); max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
.rl-label.past { color: var(--t3); }
.rl-label.cur { color: var(--ink); font-weight: 700; }
.rl-pulse { position: absolute; top: 10px; width: 24px; height: 24px; border-radius: 12px; background: var(--accent); opacity: .3; transform: translate(-50%, -50%); }
.rl-cur { position: absolute; top: 2px; width: 16px; height: 16px; margin-left: -8px; border-radius: 8px; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); transition: left 500ms var(--ease); }
.lots .ui-row { min-height: 66px; animation: row-in .35s var(--ease); }
@keyframes row-in { from { transform: translateY(16px); opacity: 0; } }
.ui-bar.as-btn { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit; }
@media (prefers-reduced-motion: reduce) {
  .card, .card-flip, .card.front.gone { transition: opacity 200ms; }
  .card.front.gone { transform: none; }
  .lots .ui-row { animation: none; }
}

/* ==========================================================================
   地図タブ
   ========================================================================== */
#tab-map #map-container { position: absolute; inset: 0; }
#tab-map #map { position: absolute; inset: 0; background: var(--map); }
.map-top { position: absolute; left: 0; right: 0; top: 0; z-index: 5; padding-top: calc(var(--safe-top) + 8px); background: linear-gradient(var(--bg) 70%, transparent); padding-bottom: 8px; }
body.has-status .map-top { padding-top: calc(var(--safe-top) + 58px); }
.map-search { position: relative; margin: 0 16px; height: 50px; border-radius: var(--radius-input); background: var(--s1); display: flex; align-items: center; gap: 8px; padding: 0 14px; box-shadow: none; top: auto; left: auto; right: auto; width: auto; z-index: auto; }
.map-search:focus-within { box-shadow: inset 0 0 0 2px var(--ink); background: var(--bg); }
.map-search .search-icon { color: var(--t2); flex: none; }
.map-search .search-input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: var(--fs-input); outline: none; padding: 0; height: 48px; color: var(--ink); box-shadow: none; }
.map-search .search-input::-webkit-search-cancel-button { display: none; }
.map-search-clear { width: 30px; height: 30px; border-radius: 15px; border: 0; background: var(--s2); color: var(--t2); font-size: 16px; cursor: pointer; flex: none; }
.map-suggest { margin: 4px 16px 0; background: var(--bg); border-radius: 18px; box-shadow: var(--shadow-float); padding: 0 16px; max-height: 50vh; overflow-y: auto; }
.map-suggest .ui-rows { margin: 0; }
.map-suggest .ui-row:last-child { border-bottom: 0; }
.map-chips { padding-top: 10px; }
.map-chips .ui-chip { box-shadow: 0 1px 0 var(--line); }
.map-chips .ui-chip.active { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.map-fabs { position: absolute; right: 16px; z-index: 6; display: flex; flex-direction: column; gap: 10px; bottom: calc(var(--tabbar) + var(--safe-bottom) + var(--bottom-sheet-peek) + 6px); transition: bottom var(--t-sheet) var(--ease); }
.map-fab { width: 48px; height: 48px; border-radius: 24px; background: var(--bg); color: var(--ink); border: 0; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-float); cursor: pointer; }
.map-unavailable { position: absolute; left: 16px; right: 16px; top: 45%; text-align: center; font-size: 14px; color: var(--t2); }

#tab-map .bottom-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; background: var(--bg); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: 0 -10px 30px -18px rgba(0,0,0,.35); height: calc(100% - var(--safe-top) - 150px);
  padding-bottom: calc(var(--tabbar) + var(--safe-bottom));
  transform: translateY(calc(100% - var(--bottom-sheet-peek) - var(--tabbar) - var(--safe-bottom)));
  transition: transform var(--t-sheet) var(--ease); display: flex; flex-direction: column;
}
#tab-map .bottom-sheet.half { transform: translateY(45%); }
#tab-map .bottom-sheet.expanded { transform: translateY(0); }
#tab-map .bottom-sheet-handle { padding: 8px 0 0; cursor: grab; }
#tab-map .handle-bar { width: 36px; height: 5px; border-radius: 3px; background: var(--s2); margin: 0 auto; }
#tab-map .bottom-sheet-header { padding: 10px 20px 6px; }
#tab-map .bottom-sheet-content { flex: 1; overflow-y: auto; padding: 0 20px 20px; }

/* 一覧の行（旧 shop-list-item を新しい行に） */
.shop-list-item { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; margin: 0; cursor: pointer; }
.shop-list-item:hover { background: none; }
.shop-list-item:active { background: var(--s1); }

/* ==========================================================================
   記録（アプリ内カメラ・金額シート・経費・計算）
   ========================================================================== */
.rec { position: fixed; inset: 0; z-index: 800; background: var(--bg); color: var(--ink); transform: translateY(100%); transition: transform 400ms var(--ease); }
.rec.in { transform: none; }
.rec.dark-ui { background: #000; color: #fff; }
.rec-cam { position: absolute; inset: 0; overflow: hidden; background: #000; color: #fff; }
.rec-cam video { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: calc(100% - 196px - var(--safe-bottom)); object-fit: cover; background: #000; }
.rec-cam-ph { position: absolute; left: 0; right: 0; top: 0; height: calc(100% - 196px - var(--safe-bottom)); background: repeating-linear-gradient(135deg, #1b1b1a 0 9px, #222220 9px 10px); display: flex; align-items: center; justify-content: center; font: 12px ui-monospace, Menlo, monospace; color: rgba(255,255,255,.45); }
.rec-corner { position: absolute; width: 28px; height: 28px; border: 0 solid #fff; z-index: 2; }
.rec-corner.tl { left: 12%; top: calc(var(--safe-top) + 96px); border-left-width: 2px; border-top-width: 2px; }
.rec-corner.tr { right: 12%; top: calc(var(--safe-top) + 96px); border-right-width: 2px; border-top-width: 2px; }
.rec-corner.bl { left: 12%; bottom: calc(196px + var(--safe-bottom) + 92px); border-left-width: 2px; border-bottom-width: 2px; }
.rec-corner.br { right: 12%; bottom: calc(196px + var(--safe-bottom) + 92px); border-right-width: 2px; border-bottom-width: 2px; }
.rec-cam-hint { position: absolute; left: 20px; right: 20px; bottom: calc(196px + var(--safe-bottom) + 40px); text-align: center; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.8); margin: 0; z-index: 2; }
.rec-top { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(var(--safe-top) + 8px) 16px 0; }
.rec-round { width: 44px; height: 44px; border-radius: 22px; background: rgba(255,255,255,.16); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.rec-shop { height: 36px; border-radius: 18px; background: rgba(0,0,0,.5); color: #fff; border: 0; display: flex; align-items: center; padding: 0 14px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; cursor: pointer; }
.rec-pill { height: 36px; border-radius: 18px; background: rgba(255,255,255,.16); color: #fff; border: 0; display: flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 13px; font-weight: 600; cursor: pointer; flex: none; }
.rec-pill span { font-size: 11px; opacity: .75; white-space: nowrap; }
.rec-flash { position: absolute; inset: 0; background: #fff; opacity: 0; z-index: 6; pointer-events: none; }
.rec-ghost { position: absolute; left: 12%; right: 12%; top: calc(var(--safe-top) + 96px); bottom: calc(196px + var(--safe-bottom) + 92px); border-radius: 8px; background-size: cover; background-position: center; opacity: 0; z-index: 7; pointer-events: none; }
.rec-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: calc(196px + var(--safe-bottom)); background: #000; z-index: 4; }
.rec-modes { display: flex; justify-content: center; gap: 28px; padding-top: 14px; }
.rec-modes button { background: none; border: 0; color: rgba(255,255,255,.5); font-size: 15px; font-weight: 600; min-height: 32px; cursor: pointer; padding: 0; }
.rec-modes button.on { color: #fff; }
.rec-tray { position: absolute; left: 28px; top: 74px; width: 52px; height: 52px; border-radius: 12px; border: 0; box-shadow: 0 0 0 2px #000, 0 0 0 3px rgba(255,255,255,.5); background: #1b1b1a center / cover no-repeat; cursor: pointer; padding: 0; }
.rec-badge { position: absolute; right: -8px; top: -8px; min-width: 24px; height: 24px; border-radius: 12px; background: #fff; color: #0e0e0e; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.rec-shutter { position: absolute; left: 50%; top: 60px; margin-left: -40px; width: 80px; height: 80px; border-radius: 40px; box-shadow: inset 0 0 0 4px #fff; background: none; border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.rec-shutter span { width: 64px; height: 64px; border-radius: 32px; background: #fff; display: block; }
.rec-amount-only { position: absolute; right: 16px; top: 78px; height: 44px; display: flex; align-items: center; padding: 0 10px; font-size: 15px; font-weight: 600; background: none; border: 0; color: #fff; cursor: pointer; }

.rec-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - var(--safe-top) - 60px); background: var(--bg); color: var(--ink); border-radius: 24px 24px 0 0; z-index: 8; transform: translateY(105%); transition: transform var(--t-sheet) var(--ease); padding: 8px 16px calc(var(--safe-bottom) + 12px); display: flex; flex-direction: column; box-shadow: 0 -10px 30px rgba(0,0,0,.25); overflow-y: auto; }
.rec-sheet.open { transform: none; }
.rec-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--s2); margin: 0 auto 8px; flex: none; cursor: grab; }
.rec-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.rec-sheet-who { display: flex; flex-direction: column; min-width: 0; }
.rec-sheet-shop { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-sheet-acts { display: flex; gap: 6px; flex: none; }
.rec-chip { height: 40px; border-radius: 20px; background: var(--s1); display: flex; align-items: center; gap: 6px; padding: 0 14px; font-size: 14px; font-weight: 600; border: 0; color: var(--ink); cursor: pointer; }
.rec-amt { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; min-height: 80px; gap: 10px; }
.rec-amt-v, .rec-form-amt { display: flex; font-size: 72px; font-weight: 700; letter-spacing: -2.5px; line-height: 1; font-variant-numeric: tabular-nums; overflow: hidden; }
.rec-form-amt { font-size: 64px; }
.rec-amt-v .zero, .rec-form-amt .zero { color: var(--t3); }
.rec-amt-v span.in, .rec-form-amt span.in { display: inline-block; animation: digit-in 220ms var(--ease); }
@keyframes digit-in { from { transform: translateY(40%); opacity: 0; } }
.rec-yen { text-align: right; font-size: 15px; color: var(--t2); font-variant-numeric: tabular-nums; min-height: 22px; }
.rec-cats { margin: 12px -16px 0; padding: 0 16px; }
.rec-cats .ui-chip { height: 40px; border-radius: 20px; }
.rec-keys { padding: 12px 0 0; }
.rec-keys button { height: 50px; font-size: 28px; }
@media (min-height: 800px) { .rec-keys button { height: 56px; } }
.rec-save { display: flex; gap: 8px; margin-top: 12px; }
.rec-save .ui-btn { flex: 1; height: 56px; border-radius: 28px; font-size: 17px; }
.rec-save .ui-btn:not(.pri) { background: var(--s2); font-weight: 500; }

.rec-form { position: absolute; inset: 0; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; }
.rec-form .modal-header { grid-template-columns: 1fr auto 1fr; }
.rec-form .modal-close::before { content: attr(data-label); }
.rec-form-body { flex: 1; overflow-y: auto; padding-bottom: 20px; }
.rec-form-keys { padding-top: 16px; }
.rec-picker { position: absolute; inset: 0; z-index: 20; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; }
.rec-picker-in { width: 100%; max-height: 80%; overflow-y: auto; background: var(--bg); color: var(--ink); border-radius: 28px 28px 0 0; padding-bottom: calc(var(--safe-bottom) + 16px); }
body.rec-open .tabbar, body.rec-open .status-bar { visibility: hidden; }
body.rec-open .app-toast { bottom: calc(var(--safe-bottom) + 210px); }
@media (prefers-reduced-motion: reduce) { .rec, .rec-sheet { transition: opacity 200ms; } .rec-amt-v span.in, .rec-form-amt span.in { animation: none; } }

/* 数字カード（提示モード：白地・現地語を最大） */
.numbers-screen { position: fixed; inset: 0; z-index: 900; background: #fbfbfa; color: #0e0e0e; overflow-y: auto; opacity: 0; transition: opacity var(--t-ui); padding-bottom: calc(var(--safe-bottom) + 24px); }
.numbers-screen.in { opacity: 1; }
.numbers-screen .modal-header { background: #fbfbfa; }
.numbers-screen .modal-close { color: #0e0e0e; }
.numbers-screen .modal-close::before { content: attr(data-label); }
.numbers-screen .ui-label, .numbers-screen .ui-big-s { color: #5e5e5b; }
.numbers-screen .num-local { font-size: clamp(40px, 16vw, 84px); }
.numbers-screen .ui-chip { background: #f2f2f0; color: #0e0e0e; }
.numbers-screen .ui-chip.on { background: #0e0e0e; color: #fbfbfa; }

/* 旧 CSS（固定配置・中央寄せ）の打ち消し */
#map-top .map-search { position: relative; top: auto; left: auto; transform: none; width: auto; max-width: none; border: 0; border-radius: var(--radius-input); box-shadow: none; z-index: auto; }
#tab-map .map-unavailable { transform: none; left: 16px; right: 16px; top: 42%; background: none; box-shadow: none; padding: 0; }
.map-fabs .map-fab { color: var(--ink); background: var(--bg); padding: 0; margin: 0; border-radius: 24px; }
.map-fabs .map-fab svg { display: block; stroke: currentColor; }
.modal-overlay[data-present="page"] .modal-close::before { content: '‹ ' attr(data-label); }
.ui-tile { white-space: nowrap; font-size: 13.5px; }

/* 画面（旧モーダル）の本文は左右 16px の余白を持つので、部品の左右余白を詰める */
.modal-body:not(.flush) .ui-rows { margin-left: 4px; margin-right: 4px; }
.modal-body:not(.flush) .ui-sec { padding-left: 4px; padding-right: 4px; }
.modal-body:not(.flush) .ui-hero { padding-left: 4px; padding-right: 4px; }
.modal-body:not(.flush) :is(.ui-seg, .ui-kpis, .ui-banner, .ui-quote, .ui-empty, .ui-skel, .ui-table) { margin-left: 0; margin-right: 0; }
.modal-body:not(.flush) .ui-banner { width: 100%; }
.modal-body:not(.flush) :is(.ui-chips, .ui-btns, .ui-fields, .ui-grid, .ui-tiles, .ui-keypad) { padding-left: 0; padding-right: 0; }
.modal-body:not(.flush) :is(.ui-bar, .ui-note) { padding-left: 4px; padding-right: 4px; }
.modal-body:not(.flush) .ui-bars { margin-left: 4px; margin-right: 4px; }
.ui-rows.flush { margin-left: 0 !important; margin-right: 0 !important; }
.ui-btns.flush { padding-left: 0; padding-right: 0; }

/* 出張詳細 */
#trip-detail-body .ui-hero { padding-left: 4px; }
.trip-tab-content { display: none; }
.trip-tab-content.active { display: block; }
.trip-tabs.ui-seg { margin: 16px 0 0; }
.trip-shop-item { gap: 12px; }
.trip-shop-end { flex-direction: row; align-items: center; gap: 8px; }
.mini-select { height: 32px; border-radius: 16px; border: 0; background: var(--s1); color: var(--ink); font-size: 13px; padding: 0 10px; max-width: 120px; -webkit-appearance: none; appearance: none; }
.row-x { width: 32px; height: 32px; border-radius: 16px; border: 0; background: none; color: var(--t3); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.trip-day-card { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.trip-day-edit { margin-top: 10px; }
.trip-day-edit summary { font-size: 13px; color: var(--t2); cursor: pointer; list-style: none; padding: 6px 0; }
.trip-day-edit summary::-webkit-details-marker { display: none; }
.trip-day-edit summary::after { content: ' ›'; }
.trip-day-actions { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; align-items: center; }
.trip-add-shop { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 14px; }
.trip-status-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.route-sheet { position: fixed; inset: 0; z-index: 650; background: rgba(0,0,0,.32); display: flex; align-items: flex-end; }
.route-sheet[hidden] { display: none; }
.route-sheet-in { width: 100%; max-height: 88vh; display: flex; flex-direction: column; background: var(--bg); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; animation: sheet-up var(--t-sheet) var(--ease); }
.route-sheet-in .trip-optimize-panel { overflow-y: auto; padding: 0 16px 12px; border: 0; background: none; margin: 0; }
.trip-optimize-hotel { cursor: pointer; }
.trip-optimize-hotel input { width: 22px; height: 22px; accent-color: var(--ink); }
.trip-optimize-note:empty { display: none; }
#trip-optimize-note.ui-banner { margin: 10px 0 0; width: 100%; }
@keyframes sheet-up { from { transform: translateY(100%); } }
.trip-chat-input-area { align-items: flex-end; }
.trip-chat-input { flex: 1; border: 0; background: transparent; font-size: var(--fs-input); padding: 14px 16px; resize: none; outline: none; min-height: 50px; }
.trip-chat-messages .chat-msg, .trip-chat-messages > div:not(.trip-chat-welcome) { max-width: 290px; }
.trip-chat-msg { display: flex; flex-direction: column; align-items: flex-start; }
.trip-chat-msg.trip-chat-user { align-items: flex-end; }
.trip-chat-role { display: none; }
.trip-chat-text { max-width: 290px; border-radius: 22px; padding: 12px 16px; font-size: 15px; line-height: 1.6; background: var(--s1); color: var(--ink); }
.trip-chat-user .trip-chat-text { background: var(--ink); color: var(--on-ink); }
.trip-chat-messages { max-height: none; overflow: visible; border: 0; background: none; padding: 14px 0 0; }

/* ==========================================================================
   店舗詳細（Hybrid の詳細＋s1・s2）
   ========================================================================== */
#shop-detail-modal .modal.shop-detail { background: var(--bg); }
.shop-detail-nav { position: absolute; left: 0; right: 0; top: 0; z-index: 5; background: transparent; margin-top: 0; padding-top: calc(var(--safe-top) + 4px); height: auto; min-height: 50px; }
.shop-detail-nav .modal-title { visibility: hidden; }
.sd-round { width: 44px; height: 44px; border-radius: 22px; background: #fff !important; color: #0e0e0e !important; display: flex !important; align-items: center; justify-content: center; font-size: 18px; letter-spacing: 1px; box-shadow: 0 4px 14px -6px rgba(0,0,0,.35); border: 0; padding: 0 !important; }
.shop-detail-nav .modal-close::before, #shop-detail-modal .modal-close::before { content: none !important; }
.shop-detail-nav .modal-close svg { display: block !important; }
.sd-hero { height: 330px; background: var(--placeholder); display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0; border-radius: 0; gap: 0; }
.sd-hero::-webkit-scrollbar { display: none; }
.sd-hero img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; border-radius: 0; margin: 0; }
.sd-hero .empty-state, .sd-hero > *:not(img) { display: none; }
.sd-sheet { position: relative; margin-top: -20px; background: var(--bg); border-radius: 24px 24px 0 0; padding: 24px 20px 120px; display: flex; flex-direction: column; gap: 6px; animation: sd-up 420ms var(--ease); }
@keyframes sd-up { from { transform: translateY(40px); opacity: .4; } }
.sd-name { font-size: var(--fs-hero); font-weight: 700; letter-spacing: -1px; line-height: 1.1; margin: 0; }
.sd-status { font-size: 15px; color: var(--t2); margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.sd-status .opening-hours-status { padding: 0; background: none; font-weight: 600; font-size: 15px; }
.sd-status .opening-hours-status.open { color: var(--ok); }
.sd-status .opening-hours-status.closed { color: var(--t2); }
.sd-status .opening-hours-fetched { font-size: 12px; color: var(--t3); }
.sd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sd-tags .ui-chip { height: 40px; border-radius: 20px; padding: 0 16px; }
.sd-seg { margin: 12px 0 0 !important; }
.sd-sec { padding-left: 0 !important; padding-right: 0 !important; }
.sd-pane[hidden] { display: none !important; }
.sd-hours { list-style: none; padding: 6px 0 0; margin: 0; }
.sd-hours li { display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-size: 17px; color: var(--t2); border: 0; padding: 0; background: none; }
.sd-hours li.today, .sd-hours li.opening-hours-today { color: var(--ink); font-weight: 600; min-height: 48px; }
.sd-meta { font-size: 13px; color: var(--t2); line-height: 1.7; margin: 8px 0 0; }
.sd-meta a { color: var(--ink) !important; font-weight: 600; }
.shop-rating-section { display: flex; flex-direction: column; }
.rating-row { min-height: 52px; }
.rating-label { font-size: 16px; color: var(--ink); width: auto; }
.rating-dots { display: flex; gap: 4px; }
.rating-dot { width: 14px; height: 14px; border-radius: 7px; border: 1.5px solid var(--ink); background: transparent; padding: 0; cursor: pointer; }
.rating-dot.filled, .rating-dot.active { background: var(--ink); }
.sd-more .ui-row { cursor: pointer; }
.social-add-form { display: grid; gap: 8px; padding: 12px 0; }
.sd-bar { flex: none; position: relative; z-index: 3; display: flex; gap: 8px; padding: 10px 16px calc(max(var(--safe-bottom), 24px) + 10px); background: linear-gradient(transparent, var(--bg) 28%); margin-top: -40px; }
.sd-bar-round { width: 56px; height: 56px; border-radius: 28px; background: var(--s2); color: var(--ink); display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer; flex: none; text-decoration: none; }
.sd-bar-round[hidden] { display: none; }
.sd-bar-main { flex: 1; height: 56px; border-radius: 28px; font-size: 17px; }
.sd-bar-main[hidden] { display: none; }
#taxi-card-btn { display: flex; }
/* 記録タブの行（旧部品を行に） */
.visit-item, .purchase-item { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; margin: 0; }
.purchase-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.purchase-summary { font-size: 16px; color: var(--ink); font-weight: 400; }
.purchase-detail { font-size: 13px; color: var(--t2); }
.purchase-thumbnails { display: flex; gap: 6px; margin-top: 6px; }
.purchase-thumbnail { width: 44px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--placeholder); }
.purchase-actions { display: flex; gap: 2px; }
.purchase-actions button { width: 36px; height: 36px; border-radius: 18px; border: 0; background: none; color: var(--t2); display: flex; align-items: center; justify-content: center; }
.visit-date { font-size: 16px; color: var(--ink); }
.visit-duration, .visit-notes { font-size: 13px; color: var(--t2); }
.detail-photos-uploaded { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.detail-photos-uploaded img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; }

/* ログイン（a1） */
.login-overlay { position: fixed; inset: 0; z-index: 3000; background: var(--bg); display: block; padding: calc(var(--safe-top) + 54px) 0 0; overflow-y: auto; -webkit-backdrop-filter: none; backdrop-filter: none; }
.login-card { max-width: 480px; margin: 0 auto; background: none; box-shadow: none; border-radius: 0; padding: 8px 20px 40px; display: flex; flex-direction: column; gap: 6px; width: auto; }
.login-title { font-size: 44px; font-weight: 700; letter-spacing: -1px; line-height: 1.12; margin: 0; color: var(--ink); }
.login-lead { font-size: 15px; color: var(--t2); margin: 0 0 18px; }
.login-input { margin-top: 2px; }
.login-input input { font-size: var(--fs-input); }
.login-error { min-height: 20px; font-size: 14px; color: var(--err); margin: 6px 4px 4px; }
.login-submit { width: 100%; margin-top: 4px; }
.login-cancel { background: none; border: 0; color: var(--t2); font-size: 14px; padding: 14px 0; cursor: pointer; }
.login-note { padding: 0 4px; }
.card-stack .card { padding: 0; margin: 0; border: 0; box-shadow: none; }
.card-stack .card.front { background: transparent; }
.card-stack .card.mid .card-photo { opacity: .9; }
.trip-shop-item.ui-row { display: flex; flex-direction: row; align-items: center; text-align: left; background: none; padding: 8px 0; border-radius: 0; margin: 0; border-bottom: 1px solid var(--line); }
.trip-shop-item .ui-row-body { align-items: flex-start; }
.sd-tags .ui-chip, .sd-tags .btn-tag { color: var(--ink); background: var(--s1); border: 0; }
.sd-tags .ui-chip.on { background: var(--ink); color: var(--on-ink); font-weight: 600; }

/* 原価台帳 */
.ledger-trip-chip { position: relative; }
.ledger-trip-chip select { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; }
.ledger-row { cursor: pointer; }
.ledger-sold { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ledger-measures .ui-kpi { gap: 2px; }
.ledger-measures input.ui-kpi-v { border: 0; background: transparent; padding: 0; width: 100%; outline: none; color: var(--ink); font-family: inherit; }
.ledger-measures .ui-kpi:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.ledger-photos .ui-grid-ph { aspect-ratio: 3 / 4; }
.outbox-item { border: 0; padding: 0; background: none; }
.outbox-item .ui-row { border-bottom: 0; }
.outbox-item { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.outbox-rate-field { margin: 0 0 8px 42px; }
.outbox-delete { background: none; border: 0; color: var(--t2); font-size: 13px; padding: 4px 0 6px 42px; cursor: pointer; }
.outbox-item-error { color: var(--err) !important; }

/* 記録シート「詳しく」（s3） */
.purchase-photo-attach { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.purchase-photo-previews.ui-grid { padding: 0; }
.purchase-photo-previews:empty { display: none; }
.purchase-photo-preview { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: var(--placeholder); }
.purchase-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.purchase-photo-preview-remove { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 14px; border: 0; background: rgba(0,0,0,.55); color: #fff; }
.purchase-photo-add-btn { align-self: flex-start; }
.purchase-amt { padding: 16px 4px 8px; }
.purchase-cur { position: relative; }
.purchase-cur select { position: absolute; inset: 0; opacity: 0; font-size: 16px; }
.purchase-amount-input { border: 0; background: transparent; text-align: right; width: 60%; min-width: 0; outline: none; color: var(--ink); font-family: inherit; padding: 0; }
.purchase-amount-input::placeholder { color: var(--t3); }
.receipt-scan-area { margin-top: 8px; }
.receipt-scan-btn { cursor: pointer; border-top: 1px solid var(--line); }

/* ==========================================================================
   会話（N-1）
   ========================================================================== */
.conv { position: fixed; inset: 0; z-index: 820; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; transform: translateY(100%); transition: transform 400ms var(--ease); }
.conv.in { transform: none; }
.conv-top { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-top) + 8px) 16px 10px; }
.conv-x { width: 40px; height: 40px; border-radius: 20px; background: var(--s1); border: 0; color: var(--ink); display: flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.conv-lang, .conv-mode { height: 36px; border-radius: 18px; background: var(--s1); border: 0; color: var(--ink); display: flex; align-items: center; gap: 6px; padding: 0 14px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.conv-lang span { font-size: 11px; font-weight: 500; color: var(--t2); }
.conv-mode { font-weight: 500; padding: 0 12px; }
.conv-flex { flex: 1; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--t2); font-variant-numeric: tabular-nums; min-width: 0; }
.conv-meta .ui-label { font-size: 11px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-offline { margin: 0 16px 8px; border-radius: 20px; background: var(--s1); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.6; color: var(--t2); }
.conv-offline b { font-size: 15px; color: var(--ink); }
.conv-offline-acts { display: flex; gap: 8px; }
.conv-list { flex: 1; overflow-y: auto; padding: 6px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.conv-empty { padding: 20px 6px; }
.conv-msg { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; animation: row-in .32s var(--ease); }
.conv-msg.me { align-items: flex-end; }
.conv-who { font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--t2); padding: 0 6px; }
.conv-bubble { max-width: 300px; border-radius: 22px; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--s1); }
.conv-msg.me .conv-bubble { background: var(--ink); color: var(--on-ink); }
.conv-src { font-size: 13px; line-height: 1.5; color: var(--t2); transition: color .3s; overflow-wrap: anywhere; }
.conv-msg.me .conv-src { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
.conv-src.partial { color: var(--t3); }
.conv-src .caret { animation: blink .8s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.conv-tr { font-size: 19px; font-weight: 600; line-height: 1.45; letter-spacing: -.2px; animation: row-in .35s var(--ease); overflow-wrap: anywhere; }
.conv-wave { display: flex; align-items: center; gap: 3px; font-size: 12px; opacity: .8; }
.conv-wave span { width: 3px; height: 16px; border-radius: 2px; background: currentColor; animation: wave .7s ease-in-out infinite; }
.conv-wave span:nth-child(2) { animation-delay: .1s; } .conv-wave span:nth-child(3) { animation-delay: .2s; } .conv-wave span:nth-child(4) { animation-delay: .3s; margin-right: 6px; }
@keyframes wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.conv-err { font-size: 13px; color: var(--err); }
.conv-msg.me .conv-err { color: #f07468; }
.conv-err button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.conv-price { height: 36px; border-radius: 18px; background: var(--ink); color: var(--on-ink); display: inline-flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; font-size: 14px; font-weight: 600; border: 0; cursor: pointer; animation: row-in .35s var(--ease); }
.conv-price span { height: 26px; border-radius: 13px; background: color-mix(in srgb, var(--on-ink) 16%, transparent); display: flex; align-items: center; padding: 0 10px; font-size: 12px; }
.conv-face { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 0 12px 10px; }
.conv-face-them, .conv-face-me { flex: 1; border-radius: 24px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.conv-face-them { background: var(--ink); color: var(--on-ink); transform: rotate(180deg); justify-content: flex-end; }
.conv-face-them .ui-label { color: inherit; opacity: .6; }
.conv-face-me { background: var(--s1); }
.conv-face .t { font-size: 26px; font-weight: 700; line-height: 1.3; letter-spacing: -.3px; }
.conv-face .s { font-size: 13px; opacity: .6; line-height: 1.5; }
.conv-bottom { flex: none; background: var(--bg); box-shadow: 0 -1px 0 var(--line); padding: 10px 0 calc(var(--safe-bottom) + 12px); display: flex; flex-direction: column; gap: 10px; }
.conv-quick { padding-top: 0; }
.conv-quick .ui-chip { height: 40px; border-radius: 20px; }
.conv-turn { margin: 0 16px; }
.conv-turn button { font-size: 14px; }
.conv-status { text-align: center; font-size: 13px; color: var(--t2); min-height: 18px; padding: 0 16px; }
.conv-kb { margin: 0 16px; }
.conv-controls { display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.conv-side { width: 52px; height: 52px; border-radius: 26px; background: var(--s1); border: 0; color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; cursor: pointer; }
.conv-mic { position: relative; width: 88px; height: 88px; border-radius: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--s1); color: var(--ink); border: 0; cursor: pointer; transition: background .3s, color .3s; }
.conv-mic span:not(.conv-ring) { font-size: 11px; font-weight: 700; position: relative; }
.conv-mic svg { position: relative; }
.conv-mic.on { background: var(--ink); color: var(--on-ink); }
.conv-mic:disabled { color: var(--t3); }
.conv-ring { position: absolute; inset: 0; border-radius: 44px; background: var(--ink); opacity: 0; }
.conv-mic.on .conv-ring { animation: ring 1.6s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .35; } to { transform: scale(1.7); opacity: 0; } }
.conv-big { position: absolute; inset: 0; z-index: 20; background: #fbfbfa; color: #0e0e0e; padding: calc(var(--safe-top) + 50px) 26px calc(var(--safe-bottom) + 30px); display: flex; flex-direction: column; gap: 18px; cursor: pointer; }
.conv-big[hidden] { display: none; }
.conv-big .ui-label { color: #5e5e5b; }
.conv-big-t { font-size: clamp(32px, 10vw, 44px); font-weight: 700; line-height: 1.25; letter-spacing: -.8px; overflow-wrap: anywhere; }
.conv-big-s { font-size: 15px; color: #5e5e5b; line-height: 1.6; }
.conv-sum { position: absolute; inset: 0; z-index: 25; background: rgba(14,14,14,.35); display: flex; align-items: flex-end; }
.conv-sum[hidden] { display: none; }
.conv-sum-in { width: 100%; background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 20px calc(var(--safe-bottom) + 24px); display: flex; flex-direction: column; gap: 12px; animation: sheet-up .36s var(--ease); }
.conv-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--s2); margin: 0 auto 4px; }
.conv-sum-t { font-size: 26px; font-weight: 700; letter-spacing: -.6px; }
.conv-sum .ui-kpi { align-items: center; text-align: center; }
.conv-sum-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.conv-sum-close { background: none; border: 0; color: var(--t2); font-size: 14px; padding: 8px; cursor: pointer; }
body.conv-open .tabbar, body.conv-open .status-bar { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .conv { transition: opacity 200ms; } .conv-mic.on .conv-ring, .conv-wave span { animation: none; } }

/* ==========================================================================
   PC 幅（1024px〜）：下部タブ → 左レール 96px、下からのシート → 右パネル 420px、全画面シート → 中央ダイアログ 640px
   ========================================================================== */
@media (min-width: 1024px) {
  .tabbar { top: 0; bottom: 0; right: auto; width: 96px; height: auto; flex-direction: column; justify-content: flex-start; padding: calc(var(--safe-top) + 24px) 0 24px; gap: 8px; box-shadow: 1px 0 0 var(--line); }
  .tabbar-btn { flex: none; height: 72px; }
  .tabbar-btn.record { order: -1; margin-bottom: 12px; }
  .app-tabs { left: 96px; }
  .tab { padding-bottom: 40px; }
  .tab > * { max-width: 760px; margin-left: auto; margin-right: auto; }
  .tab .ui-rows, .tab .ui-kpis, .tab .ui-seg, .tab .ui-banner, .tab .ui-empty, .tab .ui-skel, .tab .card-stack, .tab .route-line { max-width: 720px; margin-left: auto; margin-right: auto; }
  #tab-map > * { max-width: none; }
  #tab-map .bottom-sheet { left: auto; right: 0; width: 420px; height: 100%; border-radius: 0; transform: none !important; padding-bottom: 0; box-shadow: -1px 0 0 var(--line); }
  #tab-map .bottom-sheet-handle { display: none; }
  #tab-map #map-container { right: 420px; }
  .map-top { right: 420px; background: none; }
  .map-search { max-width: 520px; }
  .map-fabs { right: 436px; bottom: 24px; }
  .status-bar { left: 112px; right: auto; width: 520px; }
  .app-toast { left: calc(96px + 50% - 280px); right: auto; width: 560px; bottom: 24px; margin: 0; }
  /* push と全画面ページは右側に並べる（地図や一覧を見ながら） */
  .modal-overlay[data-present="push"], .modal-overlay[data-present="page"] { left: auto; width: 520px; bottom: 0; z-index: 350; box-shadow: -1px 0 0 var(--line), -24px 0 48px -32px rgba(0,0,0,.35); }
  .modal-overlay[data-present="sheet"].open { background: rgba(0,0,0,.32); }
  .modal-overlay[data-present="sheet"] > .modal { left: 50%; top: 50%; right: auto; bottom: auto; width: 640px; max-height: 86vh; border-radius: var(--radius-sheet); transform: translate(-50%, -40%); opacity: 0; transition: transform var(--t-sheet) var(--ease), opacity var(--t-ui); }
  .modal-overlay[data-present="sheet"].open > .modal { transform: translate(-50%, -50%); opacity: 1; }
  .modal-overlay[data-present="half"] > .modal { left: auto; right: 0; top: 0; bottom: 0; width: 420px; max-height: none; border-radius: 0; transform: translateX(100%); }
  .modal-overlay[data-present="half"].open > .modal { transform: none; }
  .modal-overlay[data-present="half"] > .modal::before { display: none; }
  .modal-header { margin-top: 12px; }
  .rec, .conv { left: 50%; right: auto; width: 480px; margin-left: -240px; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -24px rgba(0,0,0,.4); }
  .numbers-screen { left: 50%; right: auto; width: 640px; margin-left: -320px; }
  .login-overlay { padding-top: 12vh; }
}

/* タクシーカード（e6・提示モード） */
.taxi-card-overlay { background: #fbfbfa !important; color: #0e0e0e; z-index: 880; }
.taxi-card { background: #fbfbfa !important; color: #0e0e0e; max-width: 640px; margin: 0 auto; padding: calc(var(--safe-top) + 4px) 0 calc(var(--safe-bottom) + 24px); }
.taxi-card-header { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 16px; }
.taxi-card-back, .taxi-card-hotel-btn, .taxi-card-settings-btn { background: none !important; border: 0 !important; color: #0e0e0e !important; font-size: 16px; font-weight: 600; padding: 8px 0; }
.taxi-card-header-actions { display: flex; gap: 16px; align-items: center; }
.taxi-card-body { padding: 18px 24px 0; display: flex; flex-direction: column; gap: 12px; }
.taxi-card-body .ui-label { color: #5e5e5b; }
.taxi-card-address { font-size: clamp(32px, 10vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -.8px; color: #0e0e0e; }
.taxi-card-request { font-size: 17px; line-height: 1.55; color: #5e5e5b; border: 0; padding: 0; background: none; }
.taxi-card-phone { font-size: 18px; color: #0e0e0e; font-weight: 600; text-decoration: none; }
.taxi-card-landmark { font-size: 15px; color: #5e5e5b; }
.taxi-copy-title { margin-top: 18px; color: #0e0e0e; }
.taxi-card-phrase { color: #0e0e0e; border-bottom-color: #e4e4e1 !important; background: none !important; }
.taxi-card-phrase.copied .ui-row-r { color: #2f7a45; }
.taxi-card-phrase .ui-row-s { color: #5e5e5b; }
.taxi-card-settings-title { font-size: 24px; font-weight: 700; color: #0e0e0e; }
.taxi-settings-input { width: 100%; min-height: 50px; border: 0; border-radius: 18px; background: #f2f2f0; color: #0e0e0e; padding: 0 16px; font-size: 17px; margin-bottom: 10px; }
.taxi-settings-save, .taxi-settings-back { width: 100%; height: 52px; border-radius: 26px; border: 0; font-size: 16px; font-weight: 600; margin-top: 8px; }
.taxi-settings-save { background: #0e0e0e; color: #fbfbfa; }
.taxi-settings-back { background: #f2f2f0; color: #0e0e0e; }
.ui-kpi-v { font-size: clamp(17px, 5.2vw, 22px); }
/* 顧客リクエスト・蚤の市・その他の旧部品 */
.cr-card, .request-card, [class*="request-item"] { border: 0 !important; border-left: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; padding: 12px 0 !important; margin: 0 !important; }
.flea-tabs, .trip-tabs:not(.ui-seg), .size-chart-tabs, .translator-tabs, .pb-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--s1); border-radius: 22px; padding: 4px; border: 0; margin: 4px 0 12px; }
.flea-tab, .size-chart-tab, .translator-tab, .pb-tab { height: 36px; border-radius: 18px; border: 0 !important; background: transparent; color: var(--t2); font-size: 15px; font-weight: 400; box-shadow: none; }
.flea-tab.active, .size-chart-tab.active, .translator-tab.active, .pb-tab.active { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.conv-meta > span:last-child { white-space: nowrap; }
.conv-langs .conv-sum-in { max-height: 80vh; overflow-y: auto; }
.conv-langs .ui-row.on .ui-row-t { font-weight: 700; }
.conv-langs .ui-row.on .ui-row-r { color: var(--t2); font-size: 13px; }
