* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #1fa3b5;
  --teal-deep: #0e7787;
  --ink: #0d2830;
  --muted: #64808b;
  --glass: rgba(255, 255, 255, 0.55);
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(55% 42% at 88% 4%, rgba(31, 163, 181, 0.16) 0%, transparent 65%),
    radial-gradient(48% 40% at 4% 92%, rgba(31, 163, 181, 0.12) 0%, transparent 65%),
    radial-gradient(70% 55% at 50% 50%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
    linear-gradient(to right, rgba(13, 40, 48, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(13, 40, 48, 0.035) 1px, transparent 1px),
    linear-gradient(160deg, #f6fbfc 0%, #eef7f8 50%, #f2f9fa 100%);
  background-size: auto, auto, auto, 64px 64px, 64px 64px, auto;
}

.page { max-width: 1100px; margin: 0 auto; padding: 48px 20px 110px; }

.head { text-align: center; margin-bottom: 34px; }
.brandlogo { display: block; height: 30px; width: auto; margin: 0 auto 20px; }
.head h1 {
  font-size: 46px; font-weight: 750; letter-spacing: -1.4px;
  background: linear-gradient(115deg, var(--ink) 30%, var(--teal-deep) 75%, var(--teal) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.head .hl { color: transparent; }
.head p { margin-top: 10px; color: var(--muted); font-size: 16px; font-weight: 450; letter-spacing: -0.1px; }

.layout { display: flex; gap: 26px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }

.glass {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.45) 45%, rgba(255, 255, 255, 0.65) 100%);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  box-shadow:
    0 1px 1px rgba(13, 40, 48, 0.03),
    0 8px 24px rgba(13, 40, 48, 0.07),
    0 24px 64px rgba(13, 40, 48, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.35);
}
.glass::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 42%;
  border-radius: 28px 28px 60% 60%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
  pointer-events: none;
}

.calcwrap { padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.calcwrap::before { display: none; }

.calcphoto { position: relative; width: 360px; max-width: 92vw; user-select: none; }
.calcphoto img { width: 100%; display: block; pointer-events: none;
  filter: drop-shadow(0 22px 38px rgba(13, 40, 48, 0.42)); }

#lcd {
  position: absolute;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(140, 220, 255, 0.28), inset 0 0 4px rgba(0, 0, 0, 0.25);
}

.hs { position: absolute; background: transparent; border: 0; cursor: pointer; border-radius: 9px; padding: 0;
  -webkit-tap-highlight-color: transparent; }
.hs:active, .hs.pressed { background: rgba(255, 255, 255, 0.25); box-shadow: 0 0 12px rgba(140, 220, 255, 0.35); }
.hs--dbg { background: rgba(31, 163, 181, 0.35); outline: 1px solid #d0384e; }

.sidecol { display: flex; flex-direction: column; gap: 18px; max-width: 350px; flex: 1 1 300px; }
.panel { padding: 22px 24px; font-size: 14px; }
.panel h2 {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--teal-deep); margin-bottom: 14px;
}

#legend { display: grid; gap: 8px; }
.lrow { display: flex; gap: 10px; align-items: baseline; }
.lkey {
  flex: none; min-width: 88px; text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(233, 247, 249, 0.9));
  border: 1px solid rgba(31, 163, 181, 0.22);
  border-radius: 8px; padding: 3px 8px;
  font: 650 11px/1.5 ui-monospace, "SF Mono", Consolas, monospace;
  color: var(--teal-deep);
  box-shadow: 0 1px 2px rgba(13, 40, 48, 0.06), inset 0 1px 0 #fff;
}
.lact { color: #33525d; line-height: 1.45; }

.cta {
  margin-top: 14px; width: 100%;
  background: linear-gradient(180deg, #2cb3c4 0%, #17909f 100%);
  color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 0.1px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px; padding: 12px 14px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(23, 144, 159, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.08s;
}
.cta:hover { filter: brightness(1.05); transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(23, 144, 159, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.cta:active { transform: translateY(0); }

.guide ol { padding-left: 18px; display: grid; gap: 8px; color: #33525d; line-height: 1.5; }
.guide code {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(31, 163, 181, 0.25);
  border-radius: 6px; padding: 0 6px;
  font: 650 11.5px/1.6 ui-monospace, Consolas, monospace;
  color: var(--teal-deep);
  box-shadow: 0 1px 1px rgba(13, 40, 48, 0.05);
}
.quota {
  margin-top: 14px; padding: 10px 13px;
  background: linear-gradient(135deg, rgba(31, 163, 181, 0.10), rgba(31, 163, 181, 0.05));
  border: 1px solid rgba(31, 163, 181, 0.15);
  border-radius: 13px; font-size: 12.5px; color: #1d4a54;
  display: flex; gap: 9px; align-items: center;
}
.quota .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: none;
  box-shadow: 0 0 8px rgba(31, 163, 181, 0.7); }

.foot { text-align: center; color: #a3bcc4; font-size: 12px; margin-top: 26px; letter-spacing: 0.2px; }

.buyrow { display: flex; justify-content: center; margin-top: 30px; }
.buybtn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 34px; border-radius: 999px;
  background: linear-gradient(135deg, #35bccb 0%, #1a97a8 55%, #12808f 100%);
  color: #fff; text-decoration: none; font-weight: 800; font-size: 16.5px; letter-spacing: 0.1px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 34px rgba(23, 144, 159, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -8px 16px rgba(0, 40, 50, 0.12);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 0.45s, filter 0.45s;
}
.buybtn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: saturate(1.15) brightness(1.04);
  box-shadow: 0 18px 44px rgba(23, 144, 159, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.buybtn__arrow { transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.buybtn:hover .buybtn__arrow { transform: translateX(5px); }

.modal[hidden], .tip[hidden], .cartbar[hidden] { display: none !important; }

.modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13, 40, 48, 0.25);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  animation: fadein 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes fadein { from { opacity: 0; } }
.modal__card {
  width: min(430px, 92vw); padding: 26px 26px 22px;
  animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.modal__card h3 { font-size: 19px; letter-spacing: -0.3px; }
.modal__sub { color: var(--muted); font-size: 13px; margin: 5px 0 15px; }
.modal__card input, .modal__card textarea {
  width: 100%; margin-bottom: 11px;
  padding: 11px 13px; font: 500 14px/1.45 inherit; color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(31, 163, 181, 0.25);
  border-radius: 13px; outline: none; resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.modal__card input:focus, .modal__card textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(31, 163, 181, 0.15);
  transform: scale(1.005);
}
.modal__btns { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.btn-ghost {
  background: transparent; border: 0; cursor: pointer;
  color: var(--muted); font-weight: 650; font-size: 13.5px; padding: 10px 12px;
  border-radius: 10px; transition: background 0.3s;
}
.btn-ghost:hover { background: rgba(13, 40, 48, 0.06); }
.modal__btns .cta { width: auto; }

.tip { position: fixed; z-index: 55; left: 50%; top: 18px; transform: translateX(-50%); width: min(440px, 92vw); }
.tip__card {
  position: relative; padding: 15px 40px 15px 16px;
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: 18px;
  animation: tipin 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.18);
}
@keyframes tipin { from { opacity: 0; transform: translateY(-16px) scale(0.97); } }
.tip__badge {
  flex: none; margin-top: 1px;
  background: linear-gradient(135deg, #35bccb, #12808f);
  color: #fff; font: 800 10px/1 inherit; letter-spacing: 1.5px;
  padding: 5px 8px; border-radius: 7px;
  box-shadow: 0 4px 10px rgba(23, 144, 159, 0.4);
}
.tip__card p { font-size: 13px; line-height: 1.5; color: #24505c; }
.tip__card code {
  background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(31, 163, 181, 0.25);
  border-radius: 5px; padding: 0 4px; font: 650 11px/1.5 ui-monospace, Consolas, monospace; color: var(--teal-deep);
}
.tip__close {
  position: absolute; top: 8px; right: 10px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 18px; color: var(--muted); line-height: 1;
}

.cartbar {
  position: fixed; z-index: 50; left: 50%; bottom: 18px;
  transform: translate(-50%, 24px); opacity: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 9px 10px 9px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.75), rgba(255,255,255,0.5));
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 32px rgba(13, 40, 48, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15), opacity 0.45s;
  max-width: 94vw;
}
.cartbar--on { transform: translate(-50%, 0); opacity: 1; }
.cartbar img {
  width: 42px; height: 42px; object-fit: cover; object-position: top;
  border-radius: 50%;
  background: #dfe9ec;
  box-shadow: inset 0 0 0 1px rgba(13, 40, 48, 0.08);
}
.cartbar__name { font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; }
.cartbar__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  background: linear-gradient(135deg, #35bccb, #17909f);
  color: #fff; text-decoration: none; font-weight: 750; font-size: 13.5px; white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 18px rgba(23, 144, 159, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2), filter 0.4s;
}
.cartbar__btn:hover { transform: scale(1.04); filter: saturate(1.15) brightness(1.05); }
@media (max-width: 560px) { .cartbar__name { display: none; } }

@media (max-width: 760px) {
  .page { padding-top: 30px; }
  .head h1 { font-size: 33px; }
  .calcwrap { padding: 15px; }
  .sidecol { max-width: 480px; }
}
