/* 语言切换、分享按钮、二维码弹窗。首页、商品页、咖啡机页共用 */
html.i18n-wait body { visibility: hidden; }

.i18n-tools { display: flex; align-items: center; gap: 8px; flex: none; margin-left: 10px; }
.langpick {
  appearance: none; -webkit-appearance: none; max-width: 104px; height: 28px; padding: 0 22px 0 10px; border: 1px solid var(--line, #d2d2d7);
  border-radius: 999px; color: var(--ink, #1d1d1f); font: inherit; font-size: 12px; cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 8px center / 9px;
}
.langpick option { color: #1d1d1f; background: #fff; }
.sharebtn {
  height: 28px; padding: 0 12px; border: 1px solid var(--line, #d2d2d7); border-radius: 999px; background: transparent;
  color: var(--ink, #1d1d1f); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.sharebtn:hover, .langpick:hover { border-color: var(--muted, #6e6e73); }

.sharebox {
  width: min(360px, calc(100vw - 32px)); padding: 28px 24px 24px; border: 0; border-radius: 20px; text-align: center;
  background: var(--bg, #fff); color: var(--ink, #1d1d1f); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.sharebox::backdrop { background: rgba(0, 0, 0, 0.45); }
.sharebox h2 { margin: 0 0 16px; font-size: 20px; line-height: 1.25; font-weight: 600; }
.shareqr { width: min(240px, 70vw); margin: 0 auto; border-radius: 12px; overflow: hidden; background: #fff; }
.shareqr svg { display: block; width: 100%; height: auto; }
.sharenote { margin: 14px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted, #6e6e73); }
.shareurl {
  width: 100%; margin-top: 14px; padding: 9px 12px; box-sizing: border-box; border: 1px solid var(--line, #d2d2d7); border-radius: 10px;
  background: transparent; color: inherit; font: inherit; font-size: 13px; text-overflow: ellipsis;
}
.sharerow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.shareclose {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted, #6e6e73); font-size: 22px; line-height: 1; cursor: pointer;
}
.sharebox { position: fixed; }

@media (max-width: 860px) {
  .i18n-tools { gap: 6px; margin-left: 6px; }
  .langpick { max-width: 84px; padding-left: 8px; }
  .sharebtn { padding: 0 9px; }
}

/* 手机：第一行返回、名称、语言、分享；任务列表单独占第二行，名字太长就省略 */
@media (max-width: 760px) {
  .localnav { height: auto; min-height: 52px; }
  .localnav-inner { flex-wrap: wrap; gap: 0 10px; padding-top: 8px; padding-bottom: 8px; row-gap: 6px; }
  .localnav-inner .product { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
  .product-sub { display: none; }
  .i18n-tools { margin-left: auto; }
  #tasksMain { order: 5; flex: 1 0 100%; margin-left: 0; gap: 18px; }
}

/* 防垃圾提交的隐藏字段：真人看不到 */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* 译文比中文长，搜索框提示放不下时显示省略号，不要硬切 */
.search input { text-overflow: ellipsis; }

/* 日语大标题一行九个字，手机上按字断行不好看，缩小字号让它留在一行 */
@media (max-width: 480px) { html[lang="ja"] .home-hero h1 { font-size: 33px; } }

/* 全部步骤的文字版（上线版才有）：折叠在页面下方 */
.allsteps { max-width: 980px; margin: 0 auto; padding: 24px 20px; font-size: 15px; line-height: 1.55; color: var(--ink, #1d1d1f); }
.allsteps summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.allsteps h2 { margin: 22px 0 8px; font-size: 19px; }
.allsteps ol { margin: 0; padding-left: 26px; }
.allsteps li { margin: 6px 0; }

/* 提示、注意的小标题写在 CSS 里，这里按语言换 */
html[lang="en"] .tip::before { content: "Tip"; } html[lang="en"] .warn::before { content: "Caution"; }
html[lang="zh-TW"] .tip::before { content: "提示"; } html[lang="zh-TW"] .warn::before { content: "注意"; }
html[lang="ja"] .tip::before { content: "ヒント"; } html[lang="ja"] .warn::before { content: "注意"; }
html[lang="fr"] .tip::before { content: "Conseil"; } html[lang="fr"] .warn::before { content: "Attention"; }
html[lang="de"] .tip::before { content: "Tipp"; } html[lang="de"] .warn::before { content: "Achtung"; }
html[lang="es"] .tip::before { content: "Consejo"; } html[lang="es"] .warn::before { content: "Atención"; }
html[lang="pt"] .tip::before { content: "Dica"; } html[lang="pt"] .warn::before { content: "Atenção"; }

/* 视角按钮 */
#viewbar { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 3; display: flex; gap: 2px; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none;
  padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--bg, #fff) 82%, transparent); backdrop-filter: blur(10px); box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12); }
#viewbar::-webkit-scrollbar { display: none; }
#viewbar button { flex: none; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ink, #1d1d1f); font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
#viewbar button:hover { background: color-mix(in srgb, var(--ink, #1d1d1f) 8%, transparent); }
#viewbar .vstep { color: var(--blue, #0071e3); font-weight: 600; }

/* 操作说明靠左两行，不和中间的字幕挤在一起 */
#legend { max-width: min(36%, 340px); line-height: 1.35; }
@media (max-width: 760px) { #legend { display: none; } }

/* 隐私政策 */
.legal { max-width: 720px; margin: 0 auto; padding: 40px 20px 60px; font-size: 16px; line-height: 1.6; color: var(--ink, #1d1d1f); }
.legal h1 { font-size: 32px; line-height: 1.2; margin: 0 0 20px; }
.legal h2 { font-size: 19px; margin: 28px 0 6px; }
.foot a { color: inherit; }

/* 任务多时标签横向滚动，名称不折行 */
.localnav-inner .product { flex: none; white-space: nowrap; }
.product-sub { flex: 0 1 auto; min-width: 0; max-width: 22ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#tasksMain { flex: 0 1 auto; mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); padding-right: 24px; }
#tasksMain button { flex: none; white-space: nowrap; }

/* 高风险产品的安全提示 */
.safetybar { padding: 10px 16px; background: var(--warn, #fff1f0); color: var(--warn-ink, #a1140a); font-size: 14px; line-height: 1.4; text-align: center; }

/* 卡片：第一行品牌型号，第二行品类 */
.card-p .meta { display: block; }
.card-p .meta h3 { margin: 0; }
.card-p .meta .brand { display: block; margin: 2px 0 0; }
