:root{--yellow:#ffbd2e;--orange:#f35a25;--ink:#171717;--muted:#6e6657;--paper:#fffdf8;--cream:#fff7df;--line:#e8d9b3;--danger:#b62920;--success:#1b7b49}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans TC","PingFang TC",sans-serif;color:var(--ink);background:#fff8e8}button,input,select,textarea{font:inherit}.hidden{display:none!important}.admin-shell{width:min(1320px,calc(100% - 28px));margin:18px auto 56px}.admin-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:18px 22px;border:4px solid #111;border-radius:26px;background:var(--yellow);box-shadow:0 8px 0 rgba(0,0,0,.12)}.admin-brand{display:flex;align-items:center;gap:18px}.admin-brand img{width:180px;height:auto}.admin-brand h1{margin:3px 0 0;font-size:clamp(24px,4vw,40px)}.eyebrow{font-size:11px;font-weight:900;letter-spacing:.16em}.header-actions{display:flex;gap:10px}.primary-button,.secondary-button,.danger-button{min-height:42px;display:inline-flex;align-items:center;justify-content:center;padding:0 16px;border:3px solid #111;border-radius:14px;font-weight:900;text-decoration:none;cursor:pointer}.primary-button{background:var(--yellow);color:#111}.primary-button.small{min-height:38px;padding:0 12px;font-size:13px}.secondary-button{background:#fff;color:#111}.danger-button{background:#fff0ed;color:var(--danger);border-color:var(--danger)}.login-card,.message-panel{max-width:620px;margin:28px auto;padding:28px;border:4px solid #111;border-radius:24px;background:#fff}.login-card h2{margin:4px 0 6px;font-size:30px}.login-card p,.message-panel p{color:var(--muted);line-height:1.6}.message-panel.warning{background:#fff1bd}.message-panel.danger{background:#ffe4df}.form-stack{display:grid;gap:16px;margin-top:20px}.form-stack label>span{display:block;margin-bottom:6px;font-size:13px;font-weight:850}.form-stack input,.form-stack select,.form-stack textarea,.search-row input,.search-row select{width:100%;min-height:44px;padding:10px 12px;border:2px solid #cfc2a2;border-radius:12px;background:#fff;color:#111}.form-stack textarea{resize:vertical;line-height:1.55}.form-stack input:focus,.form-stack select:focus,.form-stack textarea:focus,.search-row input:focus,.search-row select:focus{outline:3px solid rgba(255,189,46,.45);border-color:#111}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}.switch-row{display:flex!important;align-items:center;gap:10px}.switch-row input{width:20px!important;min-height:20px!important;accent-color:var(--orange)}.switch-row span{margin:0!important}.form-actions{display:flex;gap:10px;flex-wrap:wrap}.inline-message{min-height:20px;font-size:13px;font-weight:800;color:var(--muted)}.inline-message.success{color:var(--success)}.inline-message.error{color:var(--danger)}.tabs{display:flex;gap:8px;margin-top:24px;padding:8px;border:3px solid #111;border-radius:18px;background:#fff}.tab{flex:1;min-height:44px;border:0;border-radius:12px;background:transparent;font-weight:900;cursor:pointer}.tab.active{background:var(--yellow)}.tab-panel{display:none;margin-top:18px}.tab-panel.active{display:block}.panel-grid{display:grid;grid-template-columns:minmax(360px,.85fr) minmax(480px,1.15fr);gap:18px;align-items:start}.panel{padding:22px;border:3px solid #111;border-radius:22px;background:#fff}.panel-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}.panel-title-row h2{margin:0;font-size:24px}.panel-title-row p{margin:5px 0 0;color:var(--muted);font-size:13px;line-height:1.5}.search-row{display:flex;gap:10px;margin-top:16px}.search-row select{max-width:190px}.record-list{display:grid;gap:10px;margin-top:14px}.record-card{width:100%;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding:14px;border:2px solid #ddd1b4;border-radius:14px;background:#fffaf0;text-align:left;cursor:pointer}.record-card:hover{border-color:#111}.record-card.active{border-color:#111;background:#fff0b5;box-shadow:0 4px 0 #111}.record-card strong{display:block}.record-meta{margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45}.status-pill{padding:5px 8px;border-radius:999px;background:#e6f5eb;color:#1c6d42;font-size:11px;font-weight:900}.status-pill.off{background:#eee;color:#666}.form-panel{position:sticky;top:12px}.tag-editor{padding:14px;border:2px dashed #d6c59e;border-radius:14px;background:#fffaf0}.tag-editor-title{font-weight:900;margin-bottom:12px}.tag-editor-group{padding:12px 0;border-top:1px solid #e8dcc1}.tag-editor-group:first-child{padding-top:0;border-top:0}.tag-editor-group h4{margin:0 0 8px;font-size:13px}.tag-checks{display:flex;flex-wrap:wrap;gap:7px}.tag-check{position:relative}.tag-check input{position:absolute;opacity:0;pointer-events:none}.tag-check span{display:inline-flex;align-items:center;min-height:34px;padding:0 10px;border:2px solid #111;border-radius:999px;background:#fff;font-size:12px;font-weight:800;cursor:pointer}.tag-check input:checked+span{background:var(--orange);color:#fff}.empty-list{padding:22px;border:2px dashed #d8c9a7;border-radius:14px;text-align:center;color:var(--muted)}@media(max-width:980px){.admin-header{align-items:flex-start}.admin-brand{align-items:flex-start}.admin-brand img{width:130px}.panel-grid{grid-template-columns:1fr}.form-panel{position:static}.two-col{grid-template-columns:1fr}}@media(max-width:620px){.admin-shell{width:calc(100% - 14px);margin-top:8px}.admin-header{flex-direction:column;border-radius:20px}.header-actions{width:100%}.header-actions>*{flex:1}.admin-brand{flex-direction:column}.tabs{overflow-x:auto}.tab{min-width:110px}.panel{padding:16px}.panel-title-row{flex-direction:column}.search-row{flex-direction:column}.search-row select{max-width:none}}

/* V2.1 店家列表與批次匯入 */
.restaurant-grid{grid-template-columns:minmax(520px,1.12fr) minmax(430px,.88fr)}
.restaurant-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:16px}.restaurant-stats>div{padding:10px 12px;border:2px solid #111;border-radius:12px;background:#fffaf0}.restaurant-stats strong{display:block;font-size:22px}.restaurant-stats span{font-size:11px;color:var(--muted);font-weight:800}
.restaurant-list-head{display:grid;grid-template-columns:minmax(180px,1.5fr) minmax(150px,1fr) 100px 72px;gap:10px;margin-top:14px;padding:0 12px 6px;color:var(--muted);font-size:11px;font-weight:900}.restaurant-list{display:grid;gap:8px;max-height:630px;overflow:auto;padding-right:3px}.restaurant-row{width:100%;display:grid;grid-template-columns:minmax(180px,1.5fr) minmax(150px,1fr) 100px 72px;gap:10px;align-items:center;padding:12px;border:2px solid #ddd1b4;border-radius:14px;background:#fffaf0;text-align:left;cursor:pointer}.restaurant-row:hover{border-color:#111}.restaurant-row.active{border-color:#111;background:#fff0b5;box-shadow:0 3px 0 #111}.restaurant-main strong{display:block}.restaurant-address{margin-top:3px;color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.restaurant-tags-mini{display:flex;flex-wrap:wrap;gap:4px}.restaurant-tags-mini span{padding:3px 6px;border-radius:999px;background:#fff;border:1px solid #ddcfaf;font-size:10px;font-weight:800}.restaurant-date{font-size:11px;color:var(--muted)}
.bulk-grid{display:grid;grid-template-columns:minmax(500px,.9fr) minmax(520px,1.1fr);gap:18px;align-items:start}.import-help{margin-top:16px;padding:14px;border:2px dashed #d6c59e;border-radius:14px;background:#fffaf0;color:#5d5548;font-size:12px;line-height:1.65}.import-help code{background:#fff;padding:2px 5px;border-radius:5px}.import-source-grid{display:grid;grid-template-columns:210px 1fr;gap:14px;margin-top:16px}.file-drop{min-height:180px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:18px;border:3px dashed #111;border-radius:16px;background:#fff8dc;text-align:center;cursor:pointer}.file-drop>span{font-weight:900;font-size:18px}.file-drop input{width:100%;min-height:auto!important;padding:8px!important;font-size:11px}.file-drop small{color:var(--muted)}.paste-box label{display:block;margin-bottom:7px}.paste-box textarea{width:100%;min-height:180px;padding:12px;border:2px solid #cfc2a2;border-radius:12px;resize:vertical}.import-options{display:grid;grid-template-columns:260px 1fr;gap:16px;align-items:end;margin:16px 0}.import-options label>span{display:block;margin-bottom:6px;font-size:12px;font-weight:850}.import-options select{width:100%;min-height:42px;padding:8px;border:2px solid #cfc2a2;border-radius:12px;background:#fff}.bulk-preview{margin-top:14px;max-height:650px;overflow:auto}.bulk-table{width:100%;border-collapse:separate;border-spacing:0 7px;font-size:11px}.bulk-table th{text-align:left;color:var(--muted);padding:0 7px}.bulk-table td{padding:9px 7px;background:#fffaf0;border-top:1px solid #e3d5b5;border-bottom:1px solid #e3d5b5;vertical-align:top}.bulk-table td:first-child{border-left:1px solid #e3d5b5;border-radius:10px 0 0 10px}.bulk-table td:last-child{border-right:1px solid #e3d5b5;border-radius:0 10px 10px 0}.bulk-warning{color:#a05a00;font-weight:800}.bulk-error{color:var(--danger);font-weight:900}.bulk-ok{color:var(--success);font-weight:900}.secondary-button.small{min-height:38px;padding:0 12px;font-size:12px}
@media(max-width:1120px){.restaurant-grid,.bulk-grid{grid-template-columns:1fr}.restaurant-list{max-height:none}.form-panel{position:static}}
@media(max-width:720px){.restaurant-list-head{display:none}.restaurant-row{grid-template-columns:1fr auto}.restaurant-row>.restaurant-tags-mini,.restaurant-row>.restaurant-date{grid-column:1/-1}.import-source-grid,.import-options{grid-template-columns:1fr}.file-drop{min-height:130px}}


/* V2.2 Google Places 輔助匯入 */
.google-import-grid{
  display:grid;
  grid-template-columns:minmax(430px,.86fr) minmax(560px,1.14fr);
  gap:18px;
  align-items:start;
}
.google-api-status{
  padding:7px 10px;
  border:2px solid #111;
  border-radius:999px;
  background:#fff8dc;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.google-api-status.ok{background:#e5f6ea;color:#17663d}
.google-api-status.error{background:#ffe7e2;color:#a62d23}
.google-policy-note{
  margin-top:16px;
  padding:14px;
  border:2px dashed #d6c59e;
  border-radius:14px;
  background:#fffaf0;
  color:#5c5448;
  font-size:12px;
  line-height:1.65;
}
.gmp-attribution{
  display:block;
  margin-top:8px;
  font-family:Roboto,Arial,sans-serif;
  font-style:normal;
  font-weight:400;
  font-size:12px;
  color:#5e5e5e;
  white-space:nowrap;
}
.google-query-label{
  display:block;
  margin-top:16px;
  font-size:13px;
  font-weight:900;
}
.google-query-box{
  width:100%;
  margin-top:7px;
  min-height:190px;
  padding:12px;
  border:2px solid #cfc2a2;
  border-radius:12px;
  resize:vertical;
  line-height:1.55;
}
.google-search-options{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:12px 16px;
  align-items:end;
  margin-top:14px;
}
.google-search-options>label>span{
  display:block;
  margin-bottom:6px;
  font-size:12px;
  font-weight:850;
}
.google-search-options select{
  width:100%;
  min-height:42px;
  padding:8px;
  border:2px solid #cfc2a2;
  border-radius:12px;
  background:#fff;
}
.google-call-estimate{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  align-items:baseline;
  margin:14px 0;
  padding:12px 14px;
  border:2px solid #111;
  border-radius:12px;
  background:#fff2b7;
  font-size:12px;
}
.google-call-estimate small{color:var(--muted)}
.google-result-list{
  display:grid;
  gap:10px;
  margin-top:14px;
  max-height:690px;
  overflow:auto;
  padding-right:3px;
}
.google-result-card{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:10px;
  padding:12px;
  border:2px solid #ddd1b4;
  border-radius:14px;
  background:#fffaf0;
}
.google-result-card.duplicate{
  background:#f2f2f2;
  opacity:.82;
}
.google-result-check{
  margin-top:5px;
  width:18px;
  height:18px;
  accent-color:var(--orange);
}
.google-result-body{min-width:0}
.google-result-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.google-result-name{
  font-size:15px;
  font-weight:900;
  line-height:1.35;
}
.google-result-meta{
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
}
.google-result-badges{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:7px;
}
.google-result-badges span{
  padding:3px 7px;
  border:1px solid #d9cba9;
  border-radius:999px;
  background:#fff;
  font-size:10px;
  font-weight:800;
}
.google-result-link{
  font-size:11px;
  font-weight:900;
  color:#174f91;
  text-decoration:none;
  white-space:nowrap;
}
.google-custom-name{
  width:100%;
  min-height:38px;
  margin-top:9px;
  padding:8px 10px;
  border:2px solid #cfc2a2;
  border-radius:10px;
  background:#fff;
  font-size:12px;
}
.google-duplicate-note{
  margin-top:7px;
  color:#9a5a00;
  font-size:11px;
  font-weight:900;
}
.google-import-panel{margin-top:18px}
.google-tag-apply{
  margin-top:16px;
  padding:14px;
  border:2px dashed #d6c59e;
  border-radius:14px;
  background:#fffaf0;
}
.google-import-options{
  margin:14px 0;
  color:var(--muted);
  font-size:12px;
}
.google-import-options p{margin:7px 0 0;line-height:1.55}
.google-tag-group{
  padding:10px 0;
  border-top:1px solid #e8dcc1;
}
.google-tag-group:first-child{border-top:0;padding-top:0}
.google-tag-group h4{margin:0 0 8px;font-size:13px}
.google-tag-checks{display:flex;flex-wrap:wrap;gap:7px}
.google-tag-check{position:relative}
.google-tag-check input{position:absolute;opacity:0;pointer-events:none}
.google-tag-check span{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 10px;
  border:2px solid #111;
  border-radius:999px;
  background:#fff;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.google-tag-check input:checked+span{background:var(--orange);color:#fff}
@media(max-width:1120px){
  .google-import-grid{grid-template-columns:1fr}
  .google-result-list{max-height:none}
}
@media(max-width:720px){
  .google-search-options{grid-template-columns:1fr}
  .google-result-head{flex-direction:column}
}


/* V2.3 多來源建庫 */
.source-hero{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:18px}
.source-hero h2{margin:4px 0 8px;font-size:28px}
.source-hero p{margin:0;color:var(--muted);line-height:1.65;max-width:720px}
.source-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(100px,1fr));gap:8px;min-width:300px}
.source-stat-grid>div{padding:12px;border:2px solid #111;border-radius:14px;background:#fff;text-align:center}
.source-stat-grid strong,.source-stat-grid span{display:block}
.source-stat-grid strong{font-size:24px}.source-stat-grid span{font-size:10px;font-weight:900;color:var(--muted)}
.source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.source-card-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}
.source-card h2{margin:0 0 6px}.source-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.6}
.source-badge{display:inline-flex;align-items:center;min-height:30px;padding:0 10px;border:2px solid #111;border-radius:999px;background:#fff2b7;font-size:10px;font-weight:900;white-space:nowrap}
.source-badge.google{background:#eaf2ff}
.source-preview-panel,.google-match-panel,.source-policy-panel{margin-top:18px}
.source-actions{display:flex;gap:8px;flex-wrap:wrap}
.source-import-options{margin:12px 0}
.source-preview-wrap{overflow:auto;border:2px solid #dfd3b7;border-radius:14px;background:#fff}
.source-table{width:100%;min-width:840px;border-collapse:collapse}
.source-table th,.source-table td{padding:10px 11px;border-bottom:1px solid #eee0bf;text-align:left;vertical-align:top;font-size:12px}
.source-table th{position:sticky;top:0;background:#fff5cf;font-size:11px;z-index:1}
.source-table tr:last-child td{border-bottom:0}
.source-origin{display:inline-flex;padding:3px 7px;border:1px solid #111;border-radius:999px;font-size:9px;font-weight:900;background:#fff}
.source-origin.government{background:#e9f3ff}.source-origin.openstreetmap{background:#e8f6e8}
.source-coordinate{margin-top:4px;color:var(--muted);font-size:10px}
.source-status{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:900}
.source-status.new{background:#e4f7e7;color:#1b6737}.source-status.duplicate{background:#fff0d8;color:#925500}
.google-match-note{margin:14px 0;padding:13px 15px;border:2px dashed #d2c39f;border-radius:14px;background:#fffaf0;font-size:12px;line-height:1.6}
.google-match-controls{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
.google-match-controls label span{display:block;margin-bottom:6px;font-size:11px;font-weight:900}
.google-match-controls select{min-height:42px;padding:8px 12px;border:2px solid #cfc2a2;border-radius:12px;background:#fff}
.google-progress{margin-top:15px}
.google-progress-bar{height:14px;overflow:hidden;border:2px solid #111;border-radius:999px;background:#fff}
.google-progress-bar span{display:block;width:0;height:100%;background:var(--orange);transition:width .2s ease}
#googleProgressText{margin-top:7px;color:var(--muted);font-size:11px;font-weight:800}
.source-policy-panel p{margin:7px 0 0;color:var(--muted);font-size:12px;line-height:1.65}
@media(max-width:900px){
  .source-hero{align-items:stretch;flex-direction:column}
  .source-stat-grid{min-width:0;width:100%;grid-template-columns:repeat(4,1fr)}
  .source-grid{grid-template-columns:1fr}
}
@media(max-width:580px){
  .source-stat-grid{grid-template-columns:repeat(2,1fr)}
}
