*{box-sizing:border-box}
:root{
  --bg:#f7f7f5;--panel:#fff;--text:#1d1d1f;--muted:#777;--line:#dededb;
  --accent:#1f6f54;--accentText:#fff;--danger:#b3261e;--best:#e8f3ee;
}
html{background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Sans","Yu Gothic UI",Meiryo,sans-serif}
body{margin:0;min-width:320px}
button,input,select{font:inherit}
button{cursor:pointer}
.topbar{height:48px;position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;padding:0 10px;background:rgba(247,247,245,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(8px)}
.topbar strong{font-size:17px}
.topbar small{margin-left:6px;color:var(--muted);font-size:10px}
.top-actions{display:flex;align-items:center;gap:6px}
.icon-btn{width:36px;height:36px;border:1px solid var(--line);background:var(--panel);border-radius:8px;font-size:18px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 1px 2px rgba(0,0,0,.06);transition:background .15s,border-color .15s,transform .05s,box-shadow .15s}
.primary,.ghost{background:#fff;color:var(--text);border-color:#bfc2bf}
.primary{background:var(--accent);color:var(--accentText);border-color:var(--accent)}
.ghost{background:var(--panel);color:var(--text);border-color:var(--line)}
.danger{color:var(--danger);border-color:#e9bbb7}
.mini{min-height:34px;padding:0 10px;font-size:13px}
main{max-width:900px;margin:0 auto;padding:7px}
.searchbar{display:flex;align-items:center;gap:7px;margin-bottom:6px}
.searchbar input{flex:1;height:34px;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:0 10px;font-size:16px}
.count{min-width:44px;text-align:right;font-size:11px;color:var(--muted)}
.product-list{display:flex;flex-direction:column;gap:4px}
.product-card{position:relative;background:var(--panel);border:1px solid var(--line);border-radius:8px;overflow:hidden;transition:opacity .18s ease,filter .18s ease,border-color .18s ease,box-shadow .18s ease}
.product-summary{width:100%;min-height:43px;border:0;background:transparent;padding:4px 6px 4px 9px;display:grid;grid-template-columns:minmax(0,1fr) auto 14px;align-items:center;text-align:left;gap:5px}
.summary-main{min-width:0;display:flex;align-items:flex-start;gap:5px}
.product-name{
  font-weight:700;
  font-size:14px;
  line-height:1.2;
  white-space:normal;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-clamp:2
}
.product-size{flex:none;color:var(--muted);font-size:10px;white-space:nowrap}
.best-wrap{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:5px;line-height:1.12;white-space:nowrap}
.best-store{max-width:100%;font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.best-unit{font-size:14px;white-space:nowrap}
.chev{font-size:20px;color:var(--muted);transition:.18s transform}
.product-card.open{z-index:40;border-color:var(--accent);box-shadow:0 7px 24px rgba(0,0,0,.22)}
.product-card.open .chev{transform:rotate(90deg)}
.product-detail{border-top:1px solid var(--line);padding:5px}
.store-scroll{width:100%;min-width:0;position:relative}
.store-table{width:100%;min-width:0}
.detail-toolbar{display:flex;justify-content:flex-end;gap:5px;margin-bottom:4px}
.store-head,.store-row{display:grid;grid-template-columns:18px minmax(86px,1.4fr) 72px 44px 54px 66px 54px 112px 124px 28px;gap:3px;align-items:center}
.store-head{padding:1px 2px 3px;font-size:9px;color:var(--muted);text-align:center}
.store-head span:nth-child(2){text-align:left}
.store-row{position:relative;padding:3px 2px;border-top:1px solid #ededeb}
.store-row:first-child{border-top:0}
.store-row input,.store-row select{height:32px;min-width:0;border:1px solid var(--line);border-radius:6px;background:#fff;padding:0 4px;font-size:12px}
.store-row select{padding:0 2px}
.st-unit{font-weight:700;text-align:right;font-size:12px;white-space:nowrap}
.st-delete{height:30px;border:0;background:transparent;color:var(--muted);font-size:18px}
body.focus-mode::before{content:"";position:fixed;inset:0;background:rgba(0,0,0,.24);z-index:30;pointer-events:none}
body.focus-mode .product-card.open{position:relative;z-index:40}
body.focus-mode .product-card.open .product-summary,body.focus-mode .product-card.open .product-detail{position:relative;z-index:41}
.empty{padding:34px 10px;text-align:center;color:var(--muted);font-size:13px}
.hidden{display:none!important}
.dialog{width:min(94vw,560px);border:0;border-radius:12px;padding:0;background:var(--panel);color:var(--text);box-shadow:0 18px 60px rgba(0,0,0,.22)}
.dialog::backdrop{background:rgba(0,0,0,.38)}
.dialog form{padding:12px}
.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.dialog-head strong{font-size:17px}
.dialog label{display:block;font-size:12px;color:var(--muted)}
.dialog input,.dialog select{width:100%;height:40px;margin-top:4px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text);padding:0 9px;font-size:16px}
.grid2,.grid3{display:grid;gap:8px;margin-top:10px}
.grid2{grid-template-columns:1fr 1fr}
.grid3{grid-template-columns:1.2fr .8fr 1fr}
.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.settings-block{padding:10px 0;border-top:1px solid var(--line)}
.settings-block:first-of-type{border-top:0}
.settings-title{font-size:13px;font-weight:700;margin-bottom:8px}
.suffix{display:flex;align-items:center;gap:5px}
.stack{display:flex;flex-direction:column;gap:6px}
@media(max-width:650px){
  .store-scroll{overflow-x:auto;overflow-y:hidden;padding-bottom:2px;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .store-table{min-width:748px}
  .store-head,.store-row{min-width:0;grid-template-columns:18px 88px 66px 42px 50px 62px 50px 104px 116px 26px}
  .product-summary{grid-template-columns:minmax(0,1fr) auto 12px}
  .grid3{grid-template-columns:1fr .72fr .88fr}
}
@media(max-width:380px){
  main{padding:5px}
  .product-summary{min-height:40px;padding-left:7px;grid-template-columns:minmax(0,1fr) auto 10px}
  .product-name{font-size:13px}
  .best-unit{font-size:13px}
  .best-store{font-size:9px}
}


.best-mark{display:flex;align-items:center;justify-content:center;min-width:18px;font-size:12px;line-height:1;color:inherit;white-space:nowrap}

.st-price-result,.st-unit{font-weight:700;text-align:right;font-size:12px;white-space:nowrap}


button:active,.primary:active,.ghost:active,.icon-btn:active{transform:translateY(1px);box-shadow:none}
button:focus-visible,.primary:focus-visible,.ghost:focus-visible,.icon-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(hover:hover) and (pointer:fine){
  .primary:hover{filter:brightness(.94);box-shadow:0 2px 5px rgba(0,0,0,.12)}
  .ghost:hover,.icon-btn:hover{background:#f1f3f1;border-color:#9ea39f;box-shadow:0 2px 5px rgba(0,0,0,.10)}
}
.top-actions .primary{min-width:58px}
.detail-toolbar .primary,.detail-toolbar .ghost{min-width:72px}
.dialog-actions .primary,.dialog-actions .ghost{min-width:92px}
.backup-btn{width:100%;min-height:42px;font-size:14px}
.settings-block .stack{gap:8px}
.st-delete{border:1px solid transparent;border-radius:6px;background:#fff;color:#7a7a7a;font-size:17px;box-shadow:none;transition:background .15s,border-color .15s,color .15s}
@media(hover:hover) and (pointer:fine){
  .st-delete:hover{background:#fff0ef;border-color:#e4b7b2;color:var(--danger)}
}

.hidden-file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}

.primary,.ghost{
  min-height:38px;
  padding:0 13px;
  border:1px solid transparent;
  border-radius:8px;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  cursor:pointer;
  box-shadow:0 1px 3px rgba(0,0,0,.12);
  transition:background .15s,border-color .15s,transform .05s,box-shadow .15s;
}
.primary{background:var(--accent);color:var(--accentText);border-color:var(--accent)}
.ghost{background:#fff;color:var(--text);border-color:#b9bdb9}
.backup-btn{
  width:100%;
  min-height:44px;
  padding:0 14px;
  font-size:14px;
  border-radius:8px;
}
button:active,.primary:active,.ghost:active,.icon-btn:active{transform:translateY(1px);box-shadow:none}


.history-dialog{width:min(96vw,720px)}
.history-panel{padding:12px}
.history-product-name{margin-top:2px;font-size:12px;color:var(--muted)}
.history-note{margin:-3px 0 8px;font-size:11px;color:var(--muted)}
.history-table-wrap{width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:8px;background:#fff}
.history-grid{display:grid;grid-template-columns:138px minmax(120px,1fr) 104px 104px;min-width:520px;align-items:center}
.history-head{background:#f2f3f1;border-bottom:1px solid var(--line);font-size:11px;font-weight:700;color:#555}
.history-head span,.history-row span{padding:8px 9px;min-width:0}
.history-row{border-bottom:1px solid #ececea;font-size:12px}
.history-row:last-child{border-bottom:0}
.history-store{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-price{text-align:right;font-weight:600;white-space:nowrap}
.history-empty{padding:24px 10px;text-align:center;color:var(--muted);font-size:13px}
@media(max-width:520px){
  .history-dialog{width:calc(100vw - 16px)}
  .history-panel{padding:10px}
  .history-grid{grid-template-columns:126px 120px 94px 94px;min-width:434px}
  .history-head span,.history-row span{padding:7px 6px}
}


.reading-field{margin-top:10px}
.product-group-label{
  margin:10px 2px 3px;
  padding:2px 7px 3px;
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  border-bottom:1px solid var(--line);
  letter-spacing:.04em;
}
.product-group-label:first-child{margin-top:2px}


.product-summary-row{display:flex;align-items:stretch;width:100%}
.product-summary-row .product-summary{flex:1;min-width:0}
.bulk-check-wrap{width:38px;flex:none;display:flex;align-items:center;justify-content:center;border-right:1px solid var(--line);background:#fafafa}
.bulk-check-wrap input{width:20px;height:20px;margin:0;accent-color:var(--accent)}
.best-values{display:flex;align-items:baseline;justify-content:flex-end;gap:8px;min-width:0;white-space:nowrap}
.best-price{font-size:12px;font-weight:700}
.best-unit{font-size:14px;font-weight:700}
.bulk-store-bar{margin-bottom:6px;padding:7px;border:1px solid var(--line);border-radius:8px;background:var(--panel)}
.bulk-store-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;font-size:12px}
.bulk-store-top strong{font-size:13px}
#bulkSelectedCount{color:var(--muted);white-space:nowrap}
.bulk-store-controls{display:grid;grid-template-columns:minmax(120px,1fr) auto auto auto;gap:5px;align-items:center}
.bulk-store-controls input{height:36px;border:1px solid var(--line);border-radius:8px;background:#fff;padding:0 9px;font-size:16px;min-width:0}
.bulk-message{min-height:0;margin-top:4px;font-size:11px;color:var(--muted)}
.bulk-message:empty{display:none}
.product-list.bulk-mode .product-card.open .product-detail{display:none!important}
.product-list.bulk-mode .chev{visibility:hidden}
@media(max-width:520px){
  .bulk-store-controls{grid-template-columns:minmax(0,1fr) auto auto}
  #btnBulkCancel{grid-column:1 / -1}
  .best-values{gap:5px}
  .best-price{font-size:11px}
  .best-unit{font-size:12px}
}


.best-legend{display:flex;align-items:center;gap:14px;margin:1px 2px 5px;padding:0 2px;font-size:10px;color:var(--muted)}
.best-legend span{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.best-legend strong{font-size:11px;color:var(--text)}
.best-values{gap:16px}
.best-metric{display:inline-flex;align-items:baseline;gap:3px;white-space:nowrap}
.metric-mark{font-size:10px;font-weight:700;letter-spacing:-1px;color:var(--text)}
.template-note{margin:-2px 0 7px;font-size:11px;color:var(--muted)}
.template-message{margin-top:6px;font-size:11px;color:var(--muted)}
@media(max-width:520px){
  .best-values{gap:12px}
  .metric-mark{font-size:9px}
}

.danger-zone{border-top:1px solid #e8c6c2}
.danger-button{width:100%;min-height:44px;border:1px solid #d7a09b;border-radius:8px;background:#fff5f4;color:var(--danger);font-weight:700;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.danger-button:active{transform:translateY(1px);box-shadow:none}
@media(hover:hover) and (pointer:fine){.danger-button:hover{background:#ffebe9;border-color:#c97d76}}
.store-purchase-view{max-width:900px;margin:0 auto}
.store-purchase-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;padding:2px 2px 4px}
.store-purchase-head strong{font-size:15px}
.shopping-memo-summary{margin-top:3px;font-size:14px;font-weight:700;color:var(--text)}
.shopping-memo-duplicate{margin-top:5px;padding:6px 8px;border:1px solid #e4b45f;border-radius:7px;background:#fff8e8;color:#7a4b00;font-size:11px;line-height:1.45;white-space:pre-line}
.shopping-memo-tools{display:flex;align-items:center;gap:6px;margin-bottom:6px}
.shopping-memo-filters{display:flex;gap:3px;flex:none}
.shopping-filter{height:34px;padding:0 9px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--text);font-size:11px;white-space:nowrap}
.shopping-filter.active{background:var(--accent);border-color:var(--accent);color:var(--accentText);font-weight:700}
.shopping-store-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:6px 7px;background:#fafafa;border-bottom:1px solid var(--line)}
.shopping-store-filters .shopping-filter{width:100%}
.store-purchase-search{flex:1;min-width:0;width:100%;height:34px;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:0 10px;font-size:16px}
.store-purchase-list{display:flex;flex-direction:column;gap:4px}
.store-card{background:var(--panel);border:1px solid var(--line);border-radius:8px;overflow:hidden}
.store-summary{min-height:47px;padding:4px 6px 4px 8px;display:flex;align-items:center;gap:5px;background:var(--panel);border-bottom:0}
.store-card.open .store-summary{border-bottom:1px solid var(--line)}
.store-summary-toggle{min-width:0;flex:1;min-height:38px;border:0;background:transparent;padding:0;display:grid;grid-template-columns:minmax(0,1fr) auto 14px;gap:6px;align-items:center;text-align:left;color:var(--text)}
.store-summary-name{font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.store-summary-count{font-size:10px;color:var(--muted);white-space:nowrap}
.store-summary-chev{font-size:20px;color:var(--muted);transition:.18s transform}
.store-card.open .store-summary-chev{transform:rotate(90deg)}
.store-summary-actions{display:flex;align-items:center;gap:3px;flex:none}
.shopping-store-action{min-height:30px;padding:0 7px;font-size:10px;white-space:nowrap}
.shopping-store-action:disabled{opacity:.42;cursor:default}
.store-product-list{max-height:min(52vh,430px);overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:#fff}
.store-product-row{display:grid;grid-template-columns:54px 22px minmax(0,1fr) 86px 78px;column-gap:7px;align-items:center;min-height:42px;padding:4px 7px;border-top:1px solid #ececea;font-size:12px}
.store-product-row:first-child{border-top:0}
.store-product-mark{width:54px;min-width:54px;display:flex;align-items:center;justify-content:flex-start;font-size:13px;font-weight:700;text-align:left}
.store-product-check{width:18px;height:18px;margin:0;accent-color:var(--accent)}
.store-product-name{min-width:0;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.store-product-amount{font-size:11px;text-align:right;white-space:nowrap;color:var(--muted);overflow:hidden;text-overflow:ellipsis}
.store-product-price{text-align:right;font-weight:700;white-space:nowrap}
.shopping-edit-amount-wrap{display:grid;grid-template-columns:minmax(38px,1fr) 42px;gap:2px;min-width:0}
.shopping-edit-price-wrap{display:flex;align-items:center;justify-content:flex-end;gap:2px;min-width:0;font-weight:700}
.shopping-edit-amount,.shopping-edit-unit,.shopping-edit-price{height:32px;min-width:0;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--text);font-size:12px;padding:0 4px}
.shopping-edit-amount,.shopping-edit-price{text-align:right}
.shopping-edit-unit{padding:0 1px}
.shopping-edit-price{width:58px}
.shopping-store-empty{padding:18px 10px;text-align:center;color:var(--muted);font-size:12px}
@media(max-width:650px){
  .shopping-memo-tools{align-items:stretch;flex-direction:column}
  .shopping-memo-filters{width:100%;display:grid;grid-template-columns:1fr 1fr 1fr}
  .shopping-filter{width:100%;padding:0 4px}
  .store-summary{align-items:flex-start;flex-wrap:wrap}
  .store-summary-toggle{flex-basis:100%;width:100%}
  .store-summary-actions{width:100%;justify-content:flex-end;padding-bottom:2px}
  .store-product-row{grid-template-columns:52px 22px minmax(0,1fr) 80px 68px;column-gap:6px;padding-left:6px;padding-right:6px}
  .store-product-mark{width:52px;min-width:52px}
  .shopping-edit-amount-wrap{grid-template-columns:minmax(34px,1fr) 40px}
  .shopping-edit-price{width:50px}
}
@media(max-width:520px){
  .topbar{padding:0 5px}
  .top-actions{gap:3px}
  .top-actions .mini{min-height:32px;padding:0 6px;font-size:11px}
  .topbar strong{font-size:15px}
  .topbar small:not(.app-version){display:none}
  .store-product-row{grid-template-columns:50px 21px minmax(0,1fr) 72px 64px;column-gap:5px;font-size:11px}
  .store-product-mark{width:50px;min-width:50px}
  .store-product-amount{font-size:10px}
  .shopping-edit-amount-wrap{grid-template-columns:minmax(30px,1fr) 37px}
  .shopping-edit-amount,.shopping-edit-unit,.shopping-edit-price{font-size:11px;padding-left:2px;padding-right:2px}
  .shopping-edit-price{width:46px}
}

.template-summary{margin-top:6px;font-size:11px;color:var(--muted)}
.template-dialog{width:min(96vw,860px)}
.template-editor{padding:12px}
.template-editor-sub{margin-top:2px;font-size:11px;color:var(--muted)}
.template-editor-section{padding:10px 0;border-top:1px solid var(--line)}
.template-editor-section:first-of-type{border-top:0}
.template-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.template-section-head>strong{font-size:14px}
.template-section-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}
.template-product-add{display:grid;grid-template-columns:minmax(120px,1.3fr) minmax(110px,1fr) 76px 66px 70px auto;gap:4px;margin-bottom:6px}
.template-store-add{display:grid;grid-template-columns:minmax(150px,1fr) auto;gap:5px;margin-bottom:6px}
.template-product-add input,.template-product-add select,.template-store-add input{
  min-width:0;height:36px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:0 7px;font-size:14px;color:var(--text)
}
.template-entry-list{display:flex;flex-direction:column;gap:3px}
.template-entry-row{display:grid;align-items:center;gap:5px;min-height:37px;padding:3px 5px;border:1px solid #e7e7e4;border-radius:7px;background:#fff}
.template-product-row{grid-template-columns:28px minmax(120px,1.4fr) minmax(90px,1fr) 76px 58px 58px 32px}
.template-store-row{grid-template-columns:28px minmax(160px,1fr) 32px}
.template-entry-check{width:18px;height:18px;margin:0;accent-color:var(--accent)}
.template-entry-name{font-size:12px;font-weight:700;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.template-entry-reading{font-size:10px;color:var(--muted);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.template-entry-meta{font-size:11px;color:var(--muted);white-space:nowrap}
.template-entry-delete{height:28px;width:28px;border:1px solid #e3c5c2;border-radius:6px;background:#fff7f6;color:var(--danger);font-weight:700}
.template-empty{padding:12px 6px;text-align:center;font-size:11px;color:var(--muted)}
.template-editor-actions{display:flex;justify-content:flex-end;gap:7px;padding-top:10px;border-top:1px solid var(--line)}
@media(max-width:700px){
  .template-dialog{width:calc(100vw - 12px)}
  .template-editor{padding:9px}
  .template-product-add{grid-template-columns:1fr 1fr 74px}
  .template-product-add #tplProductUnit,.template-product-add #tplProductTax,.template-product-add #btnAddTemplateProduct{min-width:0}
  .template-product-row{grid-template-columns:28px minmax(125px,1fr) 92px 66px 52px 32px}
  .template-product-row .template-entry-reading{display:none}
  .template-entry-list{overflow-x:auto}
  .template-product-row{min-width:470px}
  .template-editor-actions{flex-direction:column}
  .template-editor-actions .primary,.template-editor-actions .ghost{width:100%;min-height:42px}
}

.field-hint{display:block;margin-top:3px;font-size:10px;color:var(--muted)}

.barcode-launch{
  width:100%;
  min-height:42px;
  margin-bottom:10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
  color:var(--text);
  font-weight:700;
  cursor:pointer;
}
.barcode-dialog{width:min(96vw,560px)}
.barcode-wrap{padding:12px}
.barcode-sub{margin-top:2px;font-size:10px;color:var(--muted)}
.barcode-camera-section{position:relative;margin-top:8px}
.barcode-video{
  width:100%;
  aspect-ratio:4/3;
  display:block;
  object-fit:cover;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
}
.barcode-guide{
  position:absolute;
  left:10%;
  right:10%;
  top:27%;
  height:32%;
  border:2px solid rgba(80,80,80,.75);
  border-radius:10px;
  pointer-events:none;
  box-shadow:0 0 0 999px rgba(255,255,255,.12);
}
.barcode-guide span{
  position:absolute;
  left:8%;
  right:8%;
  top:50%;
  height:2px;
  background:rgba(80,80,80,.8);
}
.barcode-message{margin:6px 0;font-size:11px;color:var(--muted)}
.barcode-manual{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;margin-top:10px}
.barcode-manual input,.barcode-edit-grid input,.barcode-edit-grid select{
  width:100%;
  min-width:0;
  height:38px;
  border:1px solid var(--line);
  border-radius:8px;
  padding:0 9px;
  background:#fff;
  color:var(--text);
  font-size:16px;
}
.barcode-result{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--line);
}
.barcode-result-code{font-size:11px;color:var(--muted)}
.barcode-choice-title{margin:9px 0 5px;font-size:12px;font-weight:700}
.barcode-choice{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:45px;
  padding:6px 8px;
  margin-bottom:5px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
}
.barcode-choice input{width:19px;height:19px;accent-color:var(--accent)}
.barcode-choice span{display:flex;flex-direction:column;min-width:0}
.barcode-choice small{font-size:9px;color:var(--muted)}
.barcode-choice strong{font-size:13px;white-space:normal;overflow-wrap:anywhere}
.barcode-choice.disabled{opacity:.45}
.barcode-edit-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin:10px 0;
}
.barcode-edit-grid label{font-size:10px;color:var(--muted)}
@media(max-width:520px){
  .barcode-wrap{padding:9px}
  .barcode-edit-grid{grid-template-columns:1fr 1fr}
  .barcode-edit-grid label:nth-child(1),
  .barcode-edit-grid label:nth-child(2){grid-column:1/-1}
}


/* Ver.0.27: バーコード追加画面を白背景へ統一 */
#barcodeDialog,
.barcode-dialog,
.barcode-wrap,
.barcode-camera-section,
.barcode-result,
.barcode-manual,
.barcode-edit-grid{
  background:#fff;
}
#barcodeDialog{
  color:var(--text);
}
#barcodeDialog .dialog-head{
  background:#fff;
}
#barcodeDialog input,
#barcodeDialog select,
#barcodeDialog button{
  background-color:#fff;
}
#barcodeDialog .primary{
  background:var(--accent);
  color:#fff;
}
#barcodeDialog .barcode-choice{
  background:#fff;
}
#barcodeDialog .barcode-video{
  background:#fff;
}
#barcodeDialog .barcode-camera-section{
  background:#fff;
}
#barcodeDialog .barcode-message{
  color:var(--muted);
}

/* Ver.0.28: 商品追加ダイアログの×をフォーム外に固定 */
#productDialog{position:relative}
.product-dialog-close{
  position:absolute;
  top:8px;
  right:8px;
  z-index:20;
}
#productDialog .dialog-head{
  padding-right:38px;
}

/* Ver.0.29: スマホでもバージョン番号を常時表示 */
.app-version{
  display:inline-block!important;
  margin-left:4px;
  font-size:9px!important;
  font-weight:600;
  color:var(--muted);
  white-space:nowrap;
  vertical-align:middle;
}
@media(max-width:520px){
  .app-version{
    display:inline-block!important;
    font-size:8px!important;
    margin-left:3px;
  }
}

.barcode-api-actions{
  display:flex;
  gap:5px;
  justify-content:flex-end;
  margin-top:6px;
}
#yahooClientId{
  width:100%;
  min-height:40px;
  margin-top:4px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  padding:0 9px;
  font-size:14px;
}



/* Ver.0.32: 展開時は商品名を優先 */
.product-card.open .best-wrap{
  display:none;
}
.product-card.open .product-summary{
  grid-template-columns:minmax(0,1fr) 14px;
}
.product-card.open .summary-main{
  width:100%;
  min-width:0;
}
.product-card.open .product-name{
  display:block;
  overflow:visible;
  white-space:normal;
  -webkit-line-clamp:unset;
  line-clamp:unset;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.product-card.open .product-size{
  margin-top:2px;
}

/* バーコード検索で取得できた商品画像 */
.product-image-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  padding:7px 6px 5px;
  border-bottom:1px solid var(--line);
  background:#fff;
}
.product-image-wrap.hidden{
  display:none;
}
.product-image{
  display:block;
  width:auto;
  height:auto;
  max-width:min(180px,55vw);
  max-height:150px;
  object-fit:contain;
  border-radius:8px;
  background:#fff;
}
@media(max-width:520px){
  .product-card.open .product-summary{
    grid-template-columns:minmax(0,1fr) 12px;
  }
  .product-image{
    max-width:48vw;
    max-height:130px;
  }
}



/* Ver.0.37: 広告を専用iframeへ分離 */
.ad-area{
  width:100%;
  margin:14px auto 18px;
  text-align:center;
  position:relative;
  z-index:0;
}
.ad-label{
  margin:0 0 4px;
  color:var(--muted);
  font-size:10px;
  line-height:1.2;
}
.ad-frame-host{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  width:100%;
  overflow:hidden;
  position:relative;
  z-index:0;
  isolation:isolate;
  contain:layout paint;
}
.ad-frame{
  display:block;
  border:0;
  padding:0;
  margin:0 auto;
  background:transparent;
  position:relative;
  z-index:0;
}
.ad-frame-sp{
  width:320px;
  max-width:100%;
  height:100px;
}
.ad-frame-pc{
  width:728px;
  max-width:100%;
  height:90px;
}
/* Ver.0.35: はじめに・使い方 */
.link-button{
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:var(--text);
}
.guide-start-link{
  display:inline-block;
  margin-top:10px;
  color:var(--accent);
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:3px;
}
.guide-body{
  min-height:100vh;
  background:#f7f7f5;
  color:var(--text);
}
.guide-topbar{
  position:sticky;
  top:0;
  z-index:20;
  min-height:52px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:8px;
  padding:0 12px;
  background:rgba(247,247,245,.97);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(8px);
}
.guide-topbar strong{
  font-size:15px;
  text-align:center;
}
.guide-back{
  justify-self:start;
  color:var(--text);
  text-decoration:none;
  font-size:13px;
  font-weight:700;
}
.guide-main{
  width:min(760px,calc(100% - 24px));
  margin:0 auto;
  padding:18px 0 42px;
}
.guide-hero{
  padding:24px 4px 28px;
}
.guide-kicker{
  margin-bottom:8px;
  color:var(--accent);
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
}
.guide-hero h1{
  margin:0 0 12px;
  font-size:clamp(26px,7vw,42px);
  line-height:1.18;
  letter-spacing:-.02em;
}
.guide-hero p{
  margin:0 0 20px;
  color:var(--muted);
  font-size:14px;
  line-height:1.8;
}
.guide-primary{
  display:inline-flex;
  min-height:42px;
  align-items:center;
  justify-content:center;
  padding:0 18px;
  text-decoration:none;
}
.guide-section{
  position:relative;
  margin:18px 0 30px;
  padding-top:8px;
}
.guide-section-no{
  margin-bottom:3px;
  color:var(--accent);
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
}
.guide-section>h2{
  margin:0 0 14px;
  font-size:22px;
}
.guide-card,
.guide-step,
.guide-feature,
.guide-faq{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.guide-card{
  margin:10px 0;
  padding:16px;
}
.guide-card h2,
.guide-card h3{
  margin:0 0 8px;
}
.guide-card p,
.guide-step p,
.guide-feature p,
.guide-faq p,
.guide-privacy p{
  margin:7px 0 0;
  color:#555b57;
  font-size:13px;
  line-height:1.75;
}
.guide-important{
  border-left:4px solid var(--accent);
}
.guide-step{
  display:grid;
  grid-template-columns:34px 1fr;
  gap:10px;
  margin:10px 0;
  padding:14px;
}
.guide-step-no{
  width:28px;
  height:28px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#ecefeb;
  font-size:12px;
  font-weight:800;
}
.guide-step h3,
.guide-feature h3{
  margin:2px 0 5px;
  font-size:15px;
}
.guide-device-grid,
.guide-feature-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.guide-device-grid>div{
  padding:11px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fafafa;
}
.guide-device-grid strong{
  font-size:12px;
}
.guide-device-grid p{
  font-size:12px;
}
.guide-mini-list{
  margin:10px 0 10px 1.2em;
  padding:0;
  color:#444a46;
  font-size:13px;
  line-height:1.8;
}
.guide-external{
  display:inline-block;
  margin-top:2px;
  color:var(--accent);
  font-weight:700;
}
.guide-note{
  padding:10px 12px;
  background:#f4f6f4;
  border-radius:8px;
}
.guide-feature{
  padding:15px;
}
.guide-symbols{
  display:grid;
  gap:8px;
  margin:10px 0 2px;
}
.guide-symbols>div{
  display:grid;
  grid-template-columns:28px 1fr;
  gap:8px;
  align-items:start;
}
.guide-symbols strong{
  font-size:20px;
  line-height:1;
}
.guide-symbols span{
  color:#444a46;
  font-size:13px;
  line-height:1.6;
}
.guide-warning{
  margin-top:12px;
  padding:12px 14px;
  background:#fff7e8;
  border:1px solid #ead8ae;
  border-radius:10px;
  color:#6d5730;
  font-size:12px;
  line-height:1.7;
}
.guide-faq{
  margin:9px 0;
  overflow:hidden;
}
.guide-faq summary{
  cursor:pointer;
  padding:14px;
  font-size:13px;
  font-weight:700;
}
.guide-faq p{
  padding:0 14px 14px;
  margin:0;
}
.guide-privacy{
  padding:16px;
  background:#f0f3f0;
  border-radius:12px;
}
.guide-cta{
  margin:34px 0 0;
  padding:24px 16px;
  text-align:center;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
}
.guide-cta h2{
  margin:0 0 8px;
  font-size:21px;
}
.guide-cta p{
  margin:0 0 16px;
  color:var(--muted);
  font-size:13px;
  line-height:1.7;
}
.guide-footer{
  padding:24px 0 4px;
  text-align:center;
  color:var(--muted);
  font-size:10px;
}
@media(max-width:600px){
  .guide-main{
    width:min(100% - 18px,760px);
    padding-top:10px;
  }
  .guide-device-grid,
  .guide-feature-grid{
    grid-template-columns:1fr;
  }
  .guide-hero{
    padding-top:18px;
  }
  .guide-topbar{
    grid-template-columns:auto 1fr;
  }
  .guide-topbar strong{
    text-align:right;
  }
}


/* Ver.0.38: スマホの商品追加ダイアログを画面上部へ固定 */
@media(max-width:650px){
  #productDialog.dialog[open]{
    position:fixed;
    top:max(6px, env(safe-area-inset-top));
    bottom:auto;
    left:50%;
    right:auto;
    transform:translateX(-50%);
    margin:0;
    width:min(94vw,560px);
    max-height:calc(100dvh - 12px - env(safe-area-inset-top));
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }

  #productDialog form{
    min-height:0;
  }
}

/* Ver.0.39: バーコード追加画面の初期表示を白背景へ */


/* Ver.0.41: 商品設定の商品画像管理 */
.product-image-setting{
  margin-top:12px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
}
.product-image-setting-title{
  margin-bottom:8px;
  font-size:12px;
  font-weight:700;
}
.product-image-setting-body{
  display:flex;
  align-items:center;
  gap:10px;
}
.product-image-setting-preview{
  width:72px;
  height:72px;
  object-fit:contain;
  flex:0 0 72px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
}
.product-image-setting .danger{
  min-height:38px;
}




/* Ver.0.48: バーコード登録の初期値・画像使用選択 */
.setting-check-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:10px;
}
.setting-check-row input,
.barcode-image-option input{
  width:auto;
  min-width:18px;
  height:18px;
  margin:0;
}
.barcode-register-options{
  margin:12px 0 10px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
}
.barcode-image-option{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:600;
}
.barcode-image-option:has(input:disabled){
  opacity:.55;
}

/* Ver.0.51: 価格バッジ */
.price-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:2px;
  min-height:20px;
  padding:1px 6px 1px 4px;
  border:1px solid currentColor;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  box-shadow:0 1px 2px rgba(0,0,0,.10);
}
.price-badge .badge-icon{font-size:11px;line-height:1}
.badge-low{color:#7a5a00;background:#fff8d8;border-color:#d6b447}
.badge-special{color:#a1263d;background:#fff0f3;border-color:#dc8194}
.mini-badge{min-height:17px;padding:1px 4px 1px 3px;font-size:8px}
.mini-badge .badge-icon{font-size:9px}
.best-store{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}
.best-store-item{display:inline-flex;align-items:center;gap:3px;min-width:0}
.best-mark{min-width:40px}
.best-legend{flex-wrap:wrap}
.best-legend>span{gap:5px}
.metric-mark{display:none}

/* Ver.0.51: 商品編集は保存/キャンセルで確定 */
.product-edit-actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid var(--line);
}
.product-edit-actions .btn-delete-product-detail{margin-right:auto}
.product-edit-actions button{min-width:86px}
.save-toast{
  position:fixed;
  left:50%;
  bottom:max(24px, env(safe-area-inset-bottom));
  z-index:1000;
  transform:translate(-50%,8px);
  opacity:0;
  padding:9px 16px;
  border-radius:999px;
  background:rgba(28,28,30,.92);
  color:#fff;
  font-size:13px;
  font-weight:700;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
.save-toast.show{opacity:1;transform:translate(-50%,0)}

/* Ver.0.51: 店舗セル内の種類別内容量 */
.st-store-cell{min-width:0;display:flex;flex-direction:column;gap:3px}
.st-store-cell>.st-store{width:100%}
.st-quantity-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:3px}
.st-quantity-fields input,.st-quantity-fields select{width:100%;min-width:0}

/* Ver.0.52: スマホ店舗入力を従来の1行＋横スクロールへ戻す */
@media(max-width:650px){
  .store-scroll{overflow-x:auto;overflow-y:hidden;padding-bottom:2px;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .store-table{min-width:774px;width:100%}
  .store-head{display:grid}
  .store-head,.store-row{
    min-width:0;
    grid-template-columns:44px 88px 66px 42px 50px 62px 50px 104px 116px 26px;
    gap:3px;
    align-items:center;
  }
  .store-row{padding:3px 2px}
  .store-row .best-mark{min-width:40px}
  .store-row input,.store-row select{height:32px;padding:0 4px;font-size:12px}
  .store-row select{padding:0 2px}
  .store-row .st-price-result,.store-row .st-unit{font-size:12px;overflow:visible;text-overflow:clip}
  .store-row .st-delete{width:auto;min-width:0;height:30px;padding:0}
  .st-quantity-fields{grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:3px}
  .st-quantity-fields input,.st-quantity-fields select{height:28px;font-size:10px}
  .product-edit-actions{flex-wrap:wrap}
  .product-edit-actions button{min-width:76px;padding:0 9px}
}

/* Ver.0.51: 設定ヘッダーを常時固定 */
#settingsDialog{
  max-height:calc(100dvh - 24px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
#settingsDialog form{padding:0 12px 12px}
#settingsDialog .settings-dialog-head{
  position:sticky;
  top:0;
  z-index:30;
  margin:0 -2px 4px;
  padding:12px 2px 10px;
  background:rgba(255,255,255,.97);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(8px);
}

/* Ver.0.51: 商品追加の×とバーコードボタンを分離 */
#productDialog .dialog-head{min-height:38px;padding-right:44px;margin-bottom:8px}
#productDialog .barcode-launch{margin-top:4px;margin-bottom:12px}
.product-dialog-close{top:10px;right:10px}

/* Ver.0.51: バーコード結果を1画面で確定しやすく */
.barcode-result-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:7px;margin-top:10px}
.barcode-result-actions button{min-height:44px}
@media(max-width:420px){
  .barcode-result-actions{grid-template-columns:1fr}
}
/* Ver.0.51: 店舗削除×は常時ボタンとして見える */
.st-delete{
  border:1px solid #d8c3c0;
  background:#fff8f7;
  color:var(--danger);
  font-weight:800;
}
@media(min-width:651px){
  .store-head,.store-row{grid-template-columns:44px minmax(86px,1.4fr) 72px 44px 54px 66px 54px 112px 124px 28px}
}


/* Ver.0.53: 商品一覧を商品名・最安・価格に簡略化 */
.best-wrap.no-best .best-list-badge{display:none}
.best-wrap.no-best .best-price{font-size:11px;font-weight:500;color:var(--muted)}
.best-list-badge{flex:none}
.product-card:not(.open) .best-price{font-size:13px;font-weight:700}

/* Ver.0.53: バーコード検索の操作ボタンと説明文を分離 */
#settingsDialog .barcode-api-actions{margin:8px 0 10px}
#settingsDialog .barcode-api-actions + .template-note{margin-top:0;clear:both}
@media(max-width:420px){
  #settingsDialog .barcode-api-actions{flex-wrap:wrap}
  #settingsDialog .barcode-api-actions button{flex:1 1 96px}
}

/* =========================================================
   PriceLog Ver.0.57 Natural Wood theme
   Visual refresh only: existing content and workflows stay intact.
   ========================================================= */
:root{
  --bg:#f7f1e4;
  --panel:#fffdf7;
  --text:#3f342b;
  --muted:#817567;
  --line:#e5d8c3;
  --accent:#5f9d63;
  --accentText:#fffef9;
  --danger:#b85e52;
  --best:#edf5e8;
  --wood:#d8b47e;
  --wood-deep:#9a7048;
  --cream:#fff8e9;
  --leaf:#6f9d63;
  --shadow:0 4px 14px rgba(104,78,48,.09);
}
html{
  background:
    repeating-linear-gradient(0deg,rgba(168,122,67,.018) 0 1px,transparent 1px 7px),
    linear-gradient(135deg,#fbf7ed 0%,#f4ead8 100%);
}
body{
  color:var(--text);
  background:
    radial-gradient(circle at 8% 12%,rgba(126,160,94,.08),transparent 18rem),
    radial-gradient(circle at 92% 42%,rgba(211,173,113,.10),transparent 22rem);
}
.topbar{
  height:54px;
  padding:0 12px;
  background:rgba(255,250,239,.94);
  border-bottom:1px solid #e7d7bd;
  box-shadow:0 2px 12px rgba(105,78,48,.07);
}
.topbar>div:first-child{display:flex;align-items:center;min-width:0}
.topbar strong{display:inline-flex;align-items:center;gap:7px;font-size:18px;color:#4a392d;letter-spacing:.1px}
.topbar strong::before{
  content:"";
  width:34px;height:34px;flex:none;border-radius:10px;
  background:url('./icon-192-v057.png') center/cover no-repeat;
  box-shadow:0 2px 7px rgba(105,78,48,.16);
}
.topbar small{color:#998b7b}
main{padding:10px 8px 14px}
.icon-btn,.primary,.ghost,.shopping-filter,.danger-button{
  border-radius:11px;
  box-shadow:0 2px 7px rgba(105,78,48,.08);
}
.icon-btn{background:#fffaf0;border-color:#e5d6bd;color:#655344}
.primary{background:linear-gradient(180deg,#6ca970,#57955d);border-color:#57955d;color:#fff}
.ghost{background:#fffaf0;border-color:#e5d6bd;color:#5b4a3d}
.danger{color:#ad554b;border-color:#e8c8bd}
.searchbar{margin-bottom:9px}
.searchbar input,.store-purchase-search{
  background:#fffdf8;
  border-color:#e4d5bd;
  border-radius:13px;
  box-shadow:inset 0 1px 2px rgba(105,78,48,.04),0 2px 8px rgba(105,78,48,.05);
}
.product-list{gap:7px}
.product-card{
  background:rgba(255,253,247,.97);
  border-color:#e6d9c5;
  border-radius:14px;
  box-shadow:var(--shadow);
}
.product-card.open{border-color:#8ab285;box-shadow:0 10px 28px rgba(86,75,51,.16)}
.product-summary{min-height:48px;padding:6px 9px 6px 12px}
.product-name{color:#41352c}
.product-size,.best-store,.count{color:#8c7e6f}
.product-detail{border-top-color:#eadfce;background:rgba(255,250,239,.74);padding:7px}
.store-head{color:#8b7b6b}
.store-row{border-top-color:#eee2d2}
.store-row input,.store-row select,.dialog input,.dialog select,.shopping-edit-amount,.shopping-edit-unit,.shopping-edit-price{
  background:#fffefb;border-color:#dfcfb7;color:#44372e;border-radius:9px;
}
.st-delete{background:#fffaf2;border-color:#eadccb;color:#8c7867}
.best-legend{
  background:rgba(255,250,239,.78);
  border:1px solid #eadcc6;
  border-radius:12px;
  padding:6px 8px;
  box-shadow:0 2px 8px rgba(105,78,48,.04);
}
.price-badge{border-radius:999px;box-shadow:0 1px 4px rgba(90,68,41,.09)}
.badge-low{background:linear-gradient(180deg,#f3c86a,#dba947);border-color:#c79638;color:#5c421b}
.badge-special{background:linear-gradient(180deg,#d98972,#bf6759);border-color:#ad584c;color:#fffaf4}
.dialog{
  background:#fffaf0;
  border:1px solid #e3d3ba;
  border-radius:18px;
  box-shadow:0 20px 65px rgba(75,57,38,.24);
}
.dialog::backdrop{background:rgba(62,48,35,.42)}
.dialog-head strong,.settings-title{color:#4b3b2f}
.settings-block{border-top-color:#eadcca}
.bulk-store-bar,.barcode-result,.template-block{
  background:#fffaf0!important;
  border-color:#e6d7bf!important;
  border-radius:14px!important;
}

/* Shopping memo: warm cards + automatic store illustrations. */
.store-purchase-head{padding:4px 4px 7px}
.store-purchase-head strong{font-size:17px;color:#49392d}
.shopping-memo-duplicate{
  border-color:#e4c57d;
  border-radius:12px;
  background:#fff8df;
  color:#765220;
  box-shadow:0 2px 8px rgba(126,92,41,.05);
}
.shopping-memo-tools{margin-bottom:9px}
.store-purchase-list{gap:8px}
.store-card{
  background:#fffdf7;
  border-color:#e4d6c0;
  border-radius:15px;
  box-shadow:var(--shadow);
}
.store-summary{
  min-height:56px;
  padding:6px 8px;
  background:linear-gradient(180deg,#fffdf8,#fff9ed);
}
.store-card.open .store-summary{border-bottom-color:#e6d8c2}
.store-summary-toggle{
  min-height:44px;
  grid-template-columns:42px minmax(0,1fr) auto 14px;
  gap:8px;
}
.store-illustration{
  width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;flex:none;
  border-radius:12px;
  background:linear-gradient(145deg,#f8f1df,#efe3c9);
  border:1px solid rgba(154,112,72,.13);
  box-shadow:0 2px 7px rgba(102,77,47,.10);
  overflow:hidden;
}
.store-illustration svg{width:36px;height:36px;display:block}
.store-summary-name{font-size:14px;color:#44372d}
.store-summary-count{color:#8a7968}
.shopping-store-filters{background:#fbf4e7;border-bottom-color:#e8dac5;padding:7px 8px}
.shopping-filter{background:#fffdf8;border-color:#dfcfb8;color:#695747}
.shopping-filter.active{background:#6b9f68;border-color:#6b9f68;color:#fff}
.store-product-list{background:#fffefb}
.store-product-row{border-top-color:#eee2d2;background:#fffefb}
.store-product-row:nth-child(even){background:#fffcf5}
.store-product-name{color:#45372e}
.store-product-amount{color:#8c7b6c}
.store-product-check{accent-color:#649b63}
.shopping-store-empty{color:#8a7a6b}

/* Ads and empty states remain visually quiet. */
.ad-area,.empty{color:#8d7f70}
.guide-start-link{color:#4f8755}

@media(hover:hover) and (pointer:fine){
  .ghost:hover,.icon-btn:hover{background:#f8efdf;border-color:#ccb997}
  .product-card:hover{border-color:#d7c5a8}
  .store-card:hover{border-color:#d8c5a5}
}
@media(max-width:650px){
  .topbar{height:auto;min-height:54px;padding:6px 6px 6px 8px}
  .topbar strong::before{width:31px;height:31px;border-radius:9px}
  .topbar strong{font-size:16px;gap:5px}
  .store-summary{padding:6px 7px}
  .store-summary-toggle{grid-template-columns:40px minmax(0,1fr) auto 14px;gap:6px}
  .store-illustration{width:38px;height:38px;border-radius:11px}
  .store-illustration svg{width:34px;height:34px}
}
@media(max-width:380px){
  .topbar strong::before{width:28px;height:28px}
  .topbar strong{font-size:15px}
  .store-summary-toggle{grid-template-columns:36px minmax(0,1fr) auto 12px;gap:5px}
  .store-illustration{width:34px;height:34px}
  .store-illustration svg{width:31px;height:31px}
}
