:root {
  --app-green: #208b6b;
  --app-green-light: #eafaf2;
  --accent: #208b6b;
  --card-bg: #fff;
  --font-color: #263238;
  --icon-bg: #e5f4ee;
  --radius: 26px;
  --shadow: 0 6px 32px 0 rgba(32,139,107,0.07);
  --transition: all .18s cubic-bezier(.4,0,.2,1);
  --search-bg: #f2f2f7;
  --gray: #b0b0b0;
}

html, body {
  min-height: 100vh;
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'SF Pro Display', 'Poppins', 'Helvetica Neue', Helvetica, Arial, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  color: var(--font-color);
  background: var(--app-green-light);
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 0;
  background: url('https://i.meee.com.tw/5rVs918.jpg') center center/cover no-repeat, var(--app-green-light);
filter: blur(5px) brightness(0.92) saturate(1.08);
  opacity: 0.82;
  pointer-events: none;
}

main, #preloader, #live-chat, #chat-toggle, footer {
  position: relative;
  z-index: 2;
}

#preloader {
  position: fixed;
  z-index: 2000;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s;
}
#preloader .spinner {
  border: 5px solid #eafaf2;
  border-top: 5px solid var(--app-green);
  border-radius: 50%;
  width: 58px;
  height: 58px;
  animation: spin 1.2s linear infinite;
}
@keyframes spin {
  0% {transform: rotate(0deg);}
  100% {transform: rotate(360deg);}
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100vw;
  min-height: 0;
  padding: 20px 0;
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.main-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px #208b6b1a, 0 1.5px 12px 0 rgba(0,0,0,.06);
  padding: 36px 30px 32px 30px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 410px;
  min-width: 0;
  min-height: 0;
  max-width: 95vw;
  margin: 44px auto 34px auto;
  box-sizing: border-box;
  transition: width .25s;
}

@media (max-width: 900px) {
  .main-container {
    margin: 38px auto 28px auto;
    width: 98vw;
    max-width: 98vw;
    padding: 20px 12px 20px 12px;
    border-radius: 20px;
    max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
  }
}
@media (max-width: 600px) {
  main {
    padding: 10vw 0 12vw 0; 
  }
  .main-container {
    margin: 22px 3vw 20px 3vw;
    width: 94vw;
    max-width: 98vw;
    padding: 12px 2vw 12px 2vw;
    border-radius: 18px;
  }
}
@media (max-width: 420px) {
  .main-container {
    padding: 4vw 2vw 4vw 2vw;
    min-width: 0;
    width: 100vw;
    max-width: 100vw;
    margin: 12px 0 8px 0;
    border-radius: 12px;
  }
  main {
    padding: 2vw 0 4vw 0;
  }
}

@media (max-width: 350px) {
  .main-container {
    padding: 2vw 1vw;
    margin: 4px 0 4px 0;
    border-radius: 8px;
  }
}

.center-helper {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

.ai-box {
  width: 142px; height: 142px; min-width: 142px; min-height: 142px; max-width: 142px; max-height: 142px;
  margin: 0 auto 13px auto;
  background: #f7faf7f5;
  border-radius: 50%;
  box-shadow: 0 1.5px 12px #208b6b22;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0; transition: background .2s, border-radius .22s, width .18s, height .18s;
  overflow: visible; position: relative;
}
.ai-box.ai-active {
  width: 100%; max-width: 100%; height: auto; min-height: 110px;
  border-radius: 20px; padding: 24px 10px; align-items: flex-start; justify-content: flex-start; margin-bottom: 18px;
}
.ai-img {
  width: 122px; height: 122px; object-fit: contain; border-radius: 50%;
  box-shadow: 0 2px 14px #208b6b25;
  margin-bottom: 6px; margin-top: 6px; margin-left: auto; margin-right: auto;
  display: block;
  background: none;
}
.ai-content {
  display: none; width: 100%; font-size: 1.13rem; color: var(--font-color); padding: 3px 8px 0 8px;
  font-weight: 500; letter-spacing: 0.7px; text-align: left; min-height: 40px; background: none;
}
.ai-box.ai-active .ai-img { display: none; }
.ai-box.ai-active .ai-content { display: block; animation: fadeIn .28s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.logo-img {
  display: block; margin: 0 auto 18px auto;
  width: 240px; max-width: 80vw; height: auto;
  background: transparent; padding: 0; border: none; box-shadow: none; border-radius: 0; object-fit: contain;
}
@media (max-width: 500px) {
  .logo-img { width: 70vw; max-width: 90vw; margin-bottom: 14px; }
  .ai-box { width: 80vw; max-width: 150px; height: 80vw; min-width: 92px; min-height: 92px; max-height: 150px; }
  .ai-img { width: 70vw; max-width: 120px; height: 70vw; max-height: 120px; }
}

.search-bar {
  margin: 0 auto 28px auto;
  background: var(--search-bg);
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  box-shadow: 0 2px 12px #ccc3;
  max-width: 290px;
  font-size: 1.05rem;
  color: var(--gray);
  position: relative;
  transition: box-shadow .18s;
  overflow: hidden;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
}
@media (max-width: 420px) {
  .search-bar {
    max-width: 98vw;
    margin-left: 2vw; margin-right: 2vw;
    padding: 8px 6px;
  }
}
@media (max-width: 330px) {
  .search-bar {
    padding: 6px 2px;
  }
}

.search-bar i {
  color: var(--gray);
  margin-right: 8px;
  font-size: 1.08rem;
  z-index: 2;
}
.search-input {
  border: none;
  background: transparent;
  font-size: 1.04rem;
  color: var(--font-color);
  flex: 1;
  outline: none;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: .5px;
  padding: 3px 0;
  transition: color .15s;
  z-index: 2;
  min-width: 0;
  background: transparent;
}
.search-placeholder-marquee {
  position: absolute;
  left: 35px;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  color: #20765b;
  font-size: .97rem;
  opacity: 1;
  font-weight: 500;
  letter-spacing: 0.3px;
  pointer-events: none;
  z-index: 1;
  width: calc(100% - 35px);
  user-select: none;
  background: transparent;
  justify-content: center;
  right: 0;
  margin: 0 auto;
  text-align: center;
}
.search-placeholder-marquee span {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 12s linear infinite;
  min-width: 100%;
  text-align: center;
}
@keyframes marquee {
  0% {transform: translateX(100%);}
  100% {transform: translateX(-100%);}
}
.search-input:not(:placeholder-shown),
.search-input:focus,
.search-input:active {
  background: transparent;
}
.search-input:focus ~ .search-placeholder-marquee,
.search-input:not(:placeholder-shown) ~ .search-placeholder-marquee {
  display: none;
}
.search-clear {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 1.13rem;
  cursor: pointer;
  margin-left: 6px;
  padding: 2px;
  display: none;
  z-index: 3;
}
.search-input:not(:placeholder-shown) ~ .search-clear {
  display: block;
}
.search-input::placeholder { color: transparent; }

.categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 14px 16px;
  margin: 40px 0 6px 0;
  justify-items: center;
  width: 100%;
  max-width: 340px;
  min-width: 120px;
  padding: 0 0 0 0;
  box-sizing: border-box;
}
.category-card {
  background: transparent;
  border-radius: 50%;
  width: 160px;
  height: 160px;
  min-width: 100px;
  min-height: 100px;
  max-width: 160px;
  max-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow .18s, background .18s, transform .14s, width .15s, height .15s, border-color .18s;
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  text-decoration: none !important;
  aspect-ratio: 1/1;
  padding: 0;
  overflow: visible;
  box-shadow: none;
}
.category-ring {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  display: block;
}
.category-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 6px; 
  pointer-events: none;
  user-select: none;
  z-index: 1;
  position: relative;
}
.category-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  margin: 0;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 10px #208b6b12;
  z-index: 2;
  position: relative;
}
.category-card .cat-title {
  font-size: 1.15rem;
  color: var(--app-green);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.5px;
  display: block;
  width: 100%;
  flex-shrink: 0;
  flex-grow: 0;
  white-space: pre-line;
  word-break: break-word;
  background: transparent;
  z-index: 2;
  position: relative;
  text-shadow: 0 2px 8px #eafaf2;
}
.category-card:hover .category-ring circle,
.category-card:focus .category-ring circle,
.category-card:active .category-ring circle {
  stroke: #13644b;
  filter: drop-shadow(0 0 12px #13644b66);
  stroke-dasharray: 6 3 1 3;
}
.category-card:hover .category-ring path,
.category-card:focus .category-ring path,
.category-card:active .category-ring path {
  stroke: #81d8bf;
  opacity: 1;
}
@media (max-width: 600px) {
  .categories {
    gap: 10px 6px;
    max-width: 96vw;
    min-width: 0;
  }
  .category-card {
    width: 33vw;
    min-width: 80px;
    min-height: 80px;
    height: 33vw;
    max-width: 110px;
    max-height: 110px;
  }
  .category-inner { gap: 4px; }
  .category-card img { width: 32px; height: 32px; }
  .category-card .cat-title { font-size: 1rem; }
}
@media (max-width: 450px) {
  .categories { gap: 6px 2px; }
  .category-card {
    width: 42vw;
    min-width: 54px;
    min-height: 54px;
    height: 42vw;
    max-width: 85px;
    max-height: 85px;
  }
  .category-inner { gap: 2px; }
  .category-card img { width: 22px; height: 22px; }
  .category-card .cat-title { font-size: .78rem; }
}
@media (max-width: 350px) {
  .category-card {
    width: 53vw;
    min-width: 32px;
    min-height: 32px;
    height: 53vw;
    aspect-ratio: 1/1;
  }
  .category-inner { gap: 1px; }
  .category-card .cat-title { font-size: .65rem; }
}

#chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--app-green);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  box-shadow: 0 6px 24px #208b6b36;
  cursor: pointer;
  font-size: 1.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  transition: background .16s, transform .14s;
}
#chat-toggle:hover, #chat-toggle:focus {
  background: #13644b;
  transform: scale(1.07);
}
#live-chat {
  position: fixed;
  bottom: 88px;
  right: 20px;
  width: 238px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 8px 40px #208b6b33, 0 1.5px 12px 0 rgba(0,0,0,.10);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1002;
  border: 1.5px solid #b0e7d1;
  animation: chatIn .36s cubic-bezier(.4,0,.2,1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: .97rem;
}
@keyframes chatIn {
  from { opacity: 0; transform: translateY(60px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
.chat-header {
  background: var(--app-green);
  color: #fff;
  padding: 10px 12px 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: 1px;
}
.chat-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.13rem;
  font-weight: 700;
  cursor: pointer;
  transition: color .16s;
  margin-left: 8px;
  padding: 0 2px;
}
.chat-header button:hover {
  color: #ffe478;
  background: none;
}
.chat-body {
  padding: 9px 11px 9px 11px;
  font-size: .93rem;
  color: var(--font-color);
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.chat-body a {
  color: var(--app-green);
  text-decoration: underline;
  font-weight: bold;
  transition: color .18s;
  word-break: break-all;
}
.chat-body a:hover { color: #13644b; }

footer {
  flex-shrink: 0;
  position: relative;
  text-align: center;
  padding: 12px 6px 7px 6px;
  font-size: 0.87rem;
  margin-top: auto;
  color: var(--app-green);
  font-weight: 600;
  letter-spacing: 1.1px;
  background: #fff;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-shadow: 0 -2px 20px #208b6b13;
  z-index: 1;
  bottom: 0;
  left: 0;
  width: 100vw;
}
footer span { color: #13644b; font-weight: 700; margin: 0 4px; letter-spacing: 2px; }
footer a { color: var(--app-green); text-decoration: underline; margin-left: 5px; font-weight: 700; transition: color .14s; }
footer a:hover { color: #13644b; }

.capsule-toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0 8px 0;
  user-select: none;
}
.capsule-toggle {
  position: relative;
  display: inline-flex;
  border-radius: 999px;
  background: #f6f6f6;
  box-shadow: 0 1px 3px rgba(32,139,107,0.07);
  overflow: hidden;
  border: 1.2px solid #e6e6e6;
  min-width: 180px;
  height: 40px;
}
.capsule-option {
  position: relative;
  flex: 1 1 0;
  z-index: 1;
  padding: 6px 0;
  margin: 0;
  font-size: 1rem;
  color: #208b6b;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  transition: color 0.15s;
  font-family: inherit;
  font-weight: 500;
  height: 40px;
}
.capsule-option.active { color: #fff; font-weight: 600; }
.capsule-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 6px);
  height: 34px;
  background: #208b6b;
  border-radius: 999px;
  transition: transform 0.3s cubic-bezier(.68,-0.55,.27,1.55);
  z-index: 0;
  will-change: transform;
}
.capsule-toggle.zh .capsule-slider { transform: translateX(0%); }
.capsule-toggle.en .capsule-slider { transform: translateX(100%); }
@media (max-width: 500px) {
  .capsule-toggle { min-width: 120px; height: 32px; }
  .capsule-option { font-size: 0.95rem; height: 32px; }
  .capsule-slider { height: 26px; top: 3px; left: 3px; width: calc(50% - 6px); }
}

.search-bar {
  pointer-events: none;
  opacity: 0.7;
}
.search-bar * { pointer-events: none; }
.search-clear { display: none !important; }
.search-placeholder-marquee {
  position: absolute;
  left: 40px;
  top: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  height: 100%;
  font-size: 1rem;
  color: #aaa;
}
.search-placeholder-marquee span {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 8s linear infinite;
  font-family: inherit;
  opacity: 0.9;
}
@keyframes marquee {
  0% { transform: translateX(0);}
  100% { transform: translateX(-100%);}
}
.search-input {
  background: none !important;
  color: transparent !important;
  text-shadow: 0 0 0 #333;
  caret-color: transparent;
}
.search-bar:focus-within .search-placeholder-marquee { display: none; }

@media (max-width: 600px) {
  main {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    position: relative; 
  }
  .main-container {
    max-width: 390px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
    padding-bottom: 80px !important;
    position: relative;
    z-index: 1;
  }
  .categories {
    gap: 22px 22px !important;
    max-width: 310px !important;
    margin-top: 22px !important;
    margin-bottom: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .category-card {
    width: 124px !important;
    height: 124px !important;
    min-width: 86px !important;
    min-height: 86px !important;
    max-width: 140px !important;
    max-height: 140px !important;
    transform: scale(1.22) !important;
    z-index: 10;
  }
  .category-inner {
    gap: 10px !important;
  }
  .category-card img {
    width: 54px !important;
    height: 54px !important;
  }
  .category-card .cat-title {
    font-size: 0.92rem !important;
  }
  .logo-img {
    width: 210px !important;
    max-width: 90vw !important;
    margin-bottom: 18px !important;
    margin-top: 0 !important;
    display: block;
  }

  /* --- iPhone Notch (劉海) --- */
  .iphone-notch {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 28px;
    background: #181818;
    border-radius: 0 0 36px 36px;
    z-index: 1000;
    margin-top: env(safe-area-inset-top, 0);
    box-shadow: 0 2px 6px 0 rgba(0,0,0,0.08);
    pointer-events: none;
  }

  .iphone-homebar {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: #d1d1d1;
    border-radius: 3px;
    z-index: 1000;
    opacity: 0.92;
    margin-bottom: env(safe-area-inset-bottom, 0);
    pointer-events: none;
  }
}

@media (max-width: 410px) {
  main {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    position: relative;
  }
  .main-container {
    max-width: 99vw !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
    padding-bottom: 56px !important;
    position: relative;
    z-index: 1;
  }
  .categories {
    gap: 14px 12px !important;
    max-width: 230px !important;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
  }
  .category-card {
    width: 104px !important;
    height: 104px !important;
    min-width: 76px !important;
    min-height: 76px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    transform: scale(1.22) !important;
    z-index: 11;
  }
  .category-inner {
    gap: 7px !important;
  }
  .category-card img {
    width: 44px !important;
    height: 44px !important;
  }
  .category-card .cat-title {
    font-size: 0.78rem !important;
  }
  .logo-img {
    width: 140px !important;
    max-width: 75vw !important;
    margin-bottom: 12px !important;
    margin-top: 0 !important;
    display: block;
  }
  .iphone-notch {
    width: 110px;
    height: 22px;
    border-radius: 0 0 18px 18px;
  }
  .iphone-homebar {
    width: 80px;
    height: 4px;
  }
}
@media (max-width: 600px) {
  .main-container {
    position: relative;
    overflow: hidden;
  }
  .main-container .iphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 28px;
    background: #181818;
    border-radius: 0 0 36px 36px;
    z-index: 100;
    box-shadow: 0 2px 6px 0 rgba(0,0,0,0.08);
    pointer-events: none;
  }
  .main-container .iphone-homebar {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: #d1d1d1;
    border-radius: 3px;
    z-index: 100;
    opacity: 0.92;
    pointer-events: none;
  }
}
@media (max-width: 410px) {
  .main-container .iphone-notch {
    width: 110px;
    height: 22px;
    border-radius: 0 0 18px 18px;
  }
  .main-container .iphone-homebar {
    width: 80px;
    height: 4px;
  }
}

@media (max-width: 600px) {
  .main-container {
    position: relative;
    overflow: hidden;
    border: 1px solid #222; 
    border-radius: 38px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    background: #fff;
    padding-top: 44px !important;
    padding-bottom: 94px !important;
  }
  .main-container .iphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 76px;
    height: 12px;
    background: #181818;
    border-radius: 0 0 18px 18px;
    z-index: 100;
    box-shadow: 0 2px 6px 0 rgba(0,0,0,0.08);
    pointer-events: none;
  }
  .main-container .iphone-homebar {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: 68px;
    height: 4px;
    background: #d1d1d1;
    border-radius: 3px;
    z-index: 100;
    opacity: 0.92;
    pointer-events: none;
  }
}

html, body {
  min-height: 100vh;
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'SF Pro Display', 'Poppins', 'Helvetica Neue', Helvetica, Arial, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  color: var(--font-color);
  background: var(--app-green-light);
}

.main-container {
  width: 410px;
  margin: 44px auto 34px auto;
  padding: 36px 30px 32px 30px;
  box-sizing: border-box;
  max-width: 95vw;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

@media (max-width: 900px) {
  main {
    padding: 30px 40px; 
  }

  .main-container {
    width: 65vw; 
    max-width: 65vw;
    margin: 20px auto;
    padding: 32px 28px;
    border-radius: 26px;
    box-shadow: 0 8px 40px rgba(32,139,107,0.12);
  }

  
  .categories {
    gap: 20px;
    max-width: 90%;
    margin: 30px auto 10px auto;
  }

  .category-card {
    width: 140px;
    height: 140px;
    min-width: 140px;
    min-height: 140px;
  }
}


@media (max-width: 768px) {
  .main-container {
    width: 70vw; 
    max-width: 70vw;
    padding: 30px 24px;
  }
}

@media (max-width: 600px) {
  main {
    padding: 20px 0;
  }

  .main-container {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 34, 34, 0.1);
    border-radius: 38px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    background: #fff;
    padding-top: 38px !important;
    padding-bottom: 90px !important;
    width: 92% !important;
    max-width: 340px !important;
    margin: 10px auto !important;
  }

  .categories {
    gap: 16px !important;
    max-width: 280px !important;
    margin: 20px auto 0 auto !important;
  }

  .category-card {
    width: 112px !important;
    height: 112px !important;
    min-width: 112px !important;
    min-height: 112px !important;
    max-width: 112px !important;
    max-height: 112px !important;
    transform: scale(1.08) !important;
  }

  .main-container .iphone-homebar {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    width: 68px;
    height: 4px;
    background: #d1d1d1;
    border-radius: 3px;
    z-index: 100;
    opacity: 0.92;
    pointer-events: none;
  }
}

/* --- 較小手機尺寸保持不變 --- */
@media (max-width: 410px) {
  .main-container {
    padding-top: 34px !important;
    padding-bottom: 82px !important;
  }

  .categories {
    gap: 14px !important;
    max-width: 260px !important;
    margin: 16px auto 0 auto !important;
  }

  .category-card {
    width: 106px !important;
    height: 106px !important;
    min-width: 106px !important;
    min-height: 106px !important;
    max-width: 106px !important;
    max-height: 106px !important;
    transform: scale(1.05) !important;
  }

  .main-container .iphone-homebar {
    bottom: 28px;
  }
}

@media (max-width: 320px) {
  .main-container {
    padding-top: 30px !important;
    padding-bottom: 76px !important;
  }

  .categories {
    gap: 12px !important;
    max-width: 240px !important;
    margin: 14px auto 0 auto !important;
  }

  .category-card {
    width: 98px !important;
    height: 98px !important;
    min-width: 98px !important;
    min-height: 98px !important;
    max-width: 98px !important;
    max-height: 98px !important;
    transform: scale(1) !important;
  }

  .main-container .iphone-homebar {
    bottom: 26px;
  }
}
