/* StealAnEgg.asia — egg selector (green cartoon UI) */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --font: 'Fredoka One', 'Trebuchet MS', system-ui, sans-serif;
  --card: #fff;
  --radius: clamp(16px, 3vw, 24px);
  --btn-radius: clamp(14px, 2.5vw, 20px);
  --green-grad: linear-gradient(180deg, #7fff20 0%, #22dd10 50%, #14b80a 100%);
  --green-shadow: #0a6e08;
  --grey-grad: linear-gradient(180deg, #f4f6f8 0%, #dfe4ea 100%);
  --grey-shadow: #b8c0ca;
  --text: #2a2a2a;
  --subtext: #aaa;
  --input-border: #e0e0e0;
  --avatar-bg: #f4f4f4;
  --card-shadow: 0 20px 60px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.10);
  --press: linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.12));
  --stroke:
    -2px -2px 0 #111, 2px -2px 0 #111,
    -2px  2px 0 #111, 2px  2px 0 #111,
     0   -2px 0 #111, 0    2px 0 #111,
    -2px  0   0 #111, 2px  0   0 #111;
}

html, body { min-height: 100%; margin: 0; }

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 65% 90% at 0% 50%,   #28e8c8 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 60%, #80ff30 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 50% 0%,   #72d4f0 0%, transparent 60%),
    linear-gradient(135deg, #4cd4c0 0%, #60bce8 40%, #78e060 75%, #a0ff38 100%);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; user-select: none; }

/* ── Page ── */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(5.5rem, 22vw, 8rem) clamp(.75rem, 4vw, 1.5rem) clamp(3rem, 8vw, 4rem);
}

/* ── Card ── */
.card {
  background: var(--card);
  border: 4px solid #5de8d8;
  border-radius: var(--radius);
  width: 100%;
  max-width: 40rem;
  box-shadow: var(--card-shadow), 0 0 0 1px rgba(255,255,255,.5);
  position: relative;
}

.card-title {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -65%);
  margin: 0;
  width: 90%;
  text-align: center;
  line-height: 1.1;
  font-size: clamp(1.6rem, 6vw, 2.8rem);
  font-weight: 400;
  color: #fff;
  text-shadow: var(--stroke);
  z-index: 5;
}

.card-body { padding: clamp(2.6rem, 9vw, 3.6rem) clamp(1rem, 4vw, 1.75rem) clamp(.9rem, 3vw, 1.5rem); }

/* Logo title */
.logo-title { transform: translate(-50%, -72%); width: auto; }
.logo-title img { width: clamp(9rem, 38vw, 15rem); height: auto; margin: 0 auto; filter: drop-shadow(0 4px 0 rgba(0,0,0,.25)); }

/* ── Labels ── */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 .2rem .4rem;
}
.label { font-size: clamp(1.1rem, 3.8vw, 1.6rem); color: var(--text); user-select: none; }
.count { font-size: clamp(.85rem, 2.8vw, 1.1rem); color: var(--subtext); }

/* ── Inputs ── */
.input-wrap { margin-bottom: clamp(.8rem, 3vw, 1.2rem); }
input[type="text"], input[type="search"] {
  display: block;
  width: 100%;
  border: 2px solid var(--input-border);
  border-radius: var(--btn-radius);
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1.05rem, 3.5vw, 1.5rem);
  padding: clamp(.5rem, 2vw, .75rem) clamp(.8rem, 3vw, 1.2rem);
  transition: border-color .12s;
  box-shadow: inset 0 2px rgba(0,0,0,.03);
  -webkit-appearance: none;
}
input::placeholder { color: var(--subtext); opacity: 1; }
input:focus { border-color: #b0b0b0; outline: none; }
.input-wrap.error input[type="text"] { border-color: #f4482e; }
.err-text { color: #f4482e; font-size: clamp(.8rem, 2.6vw, 1rem); margin: -.6rem 0 .8rem .3rem; min-height: 1.2em; }

/* ── Item grid ── */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.5rem, 2vw, .8rem); }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.item {
  position: relative;
  background: #fff;
  border: 2px solid var(--input-border);
  border-radius: var(--btn-radius);
  box-shadow: 0 4px 0 var(--input-border);
  padding: clamp(.45rem, 1.8vw, .65rem);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
@media (hover:hover) and (pointer:fine) {
  .item:hover { border-color: var(--subtext); box-shadow: 0 5px 0 var(--input-border); transform: translateY(-1px); }
}
.item:active { box-shadow: 0 1px 0 var(--input-border); transform: translateY(3px); }
.item.selected { border-color: #22dd10; box-shadow: 0 4px 0 var(--green-shadow); background: #f3ffe9; }

.item-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: .5rem;
  border-radius: calc(var(--btn-radius) - 6px);
  background: var(--avatar-bg);
  border: 2px solid var(--input-border);
  margin-bottom: .45rem;
}
.item-name { font-size: clamp(.95rem, 3.2vw, 1.25rem); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-desc { color: var(--subtext); font-size: clamp(.75rem, 2.5vw, .95rem); line-height: 1.25; min-height: 2.4em; margin: .15rem 0 .5rem; }

.empty { text-align: center; color: var(--subtext); font-size: clamp(.95rem, 3vw, 1.2rem); padding: 1.2rem .25rem; }

/* ── Divine tier ── */
.item-badge {
  position: absolute;
  top: .5rem; left: .5rem;
  z-index: 2;
  font-size: clamp(.6rem, 2.1vw, .72rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: -1px -1px 0 #6b4400, 1px -1px 0 #6b4400, -1px 1px 0 #6b4400, 1px 1px 0 #6b4400;
  background-image: linear-gradient(180deg, #ffe680 0%, #ffc21f 55%, #ff9a1f 100%);
  border: 2px solid #8a5600;
  border-radius: 999px;
  padding: .12rem .5rem;
  box-shadow: 0 2px 0 #8a5600;
}
.item.divine { border-color: #ffc21f; box-shadow: 0 4px 0 #d99a00; }
.item.divine .item-img { background: #fffbea; border-color: #ffe07a; }
.item.divine.selected { border-color: #22dd10; box-shadow: 0 4px 0 var(--green-shadow); }

.item.admin { border-color: #ff8f8f; box-shadow: 0 4px 0 #d31f2b; }
.item.admin .item-img { background: #fff3f3; border-color: #ffc9c9; }
.item.developer { border-color: #4dc3ff; box-shadow: 0 4px 0 #1f7fae; }
.item.developer .item-img { background: #eefaff; border-color: #b6e6ff; }

.item-badge--admin {
  background-image: linear-gradient(180deg, #ff9a8f 0%, #f4482e 60%, #d31f2b 100%);
  border-color: #7a0f18;
  box-shadow: 0 2px 0 #7a0f18;
}
.item-badge--developer {
  background-image: linear-gradient(180deg, #9fe2ff 0%, #4dc3ff 55%, #1f9fd6 100%);
  border-color: #0b5f80;
  box-shadow: 0 2px 0 #0b5f80;
  color: #04222f;
  text-shadow: none;
}

.filter-chip--admin { color: #b32a13; border-color: #ff8f8f; box-shadow: 0 2px 0 #ff8f8f; }
.filter-chip--admin[aria-pressed="true"] { background-image: linear-gradient(180deg, #ff9a8f, #f4482e); color: #fff; border-color: #7a0f18; }
.filter-chip--dev { color: #0b5f80; border-color: #4dc3ff; box-shadow: 0 2px 0 #4dc3ff; }
.filter-chip--dev[aria-pressed="true"] { background-image: linear-gradient(180deg, #9fe2ff, #4dc3ff); color: #04222f; border-color: #0b5f80; text-shadow: none; }

.label-tools { display: flex; align-items: center; gap: .5rem; }
.filter-chip {
  font-family: var(--font);
  font-size: clamp(.7rem, 2.3vw, .82rem);
  color: #8a5600;
  background: #fff;
  border: 2px solid #ffc21f;
  border-radius: 999px;
  padding: .18rem .6rem;
  cursor: pointer;
  box-shadow: 0 2px 0 #ffc21f;
}
.filter-chip[aria-pressed="true"] {
  background-image: linear-gradient(180deg, #ffe680 0%, #ffc21f 55%, #ff9a1f 100%);
  color: #fff;
  border-color: #8a5600;
  text-shadow: -1px -1px 0 #6b4400, 1px -1px 0 #6b4400, -1px 1px 0 #6b4400, 1px 1px 0 #6b4400;
}

/* ── Buttons ── */
.btn {
  font-family: var(--font);
  color: #fff;
  border-radius: var(--btn-radius);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0 0 5px;
  display: inline-flex;
  position: relative;
  width: 100%;
  text-decoration: none;
}
.btn::before {
  content: "";
  background: var(--btn-shadow, var(--green-shadow));
  border-radius: var(--btn-radius);
  position: absolute;
  top: 50%; bottom: 0; left: 0; right: 0;
}
.btn-inner {
  background-image: var(--btn-grad, var(--green-grad));
  border: 3px solid var(--btn-shadow, var(--green-shadow));
  border-radius: var(--btn-radius);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: .55rem 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 4px rgba(255,255,255,.4);
  font-size: clamp(1.1rem, 4vw, 1.7rem);
  text-shadow: var(--stroke);
  transition: transform .12s;
}
.btn-inner::after {
  content: "";
  filter: blur(6px);
  pointer-events: none;
  background-image: linear-gradient(100deg,
    rgba(255,255,255,0) 0%, rgba(255,255,255,.12) 22%,
    rgba(255,255,255,.32) 42%, rgba(255,255,255,.55) 50%,
    rgba(255,255,255,.32) 58%, rgba(255,255,255,.12) 78%,
    rgba(255,255,255,0) 100%);
  width: 60%;
  animation: shimmer 3s linear infinite;
  position: absolute;
  top: -30%; bottom: -30%; left: 0;
  transform: translate(-180%) skew(-14.4deg);
}
@keyframes shimmer {
  0%        { transform: translate(-180%) skew(-14.4deg); }
  33.33%,to { transform: translate(340%)  skew(-14.4deg); }
}
@media (hover:hover) and (pointer:fine) { .btn:hover .btn-inner { filter: brightness(1.06); transform: translateY(-1px); } }
.btn:active .btn-inner {
  background-image: var(--press), var(--btn-grad, var(--green-grad));
  transform: translateY(4px);
  box-shadow: inset 0 3px rgba(255,255,255,.2);
}

.btn-small .btn-inner { font-size: clamp(.85rem, 2.8vw, 1.05rem); padding: .35rem .4rem; text-shadow: none; color: #555; }
.btn-small .btn-inner::after { display: none; }
.btn-grey { --btn-grad: var(--grey-grad); --btn-shadow: var(--grey-shadow); }
.item.selected .btn-small .btn-inner { color: #fff; text-shadow: var(--stroke); }

.btn-full { min-height: clamp(3.5rem, 12vw, 5.5rem); margin-top: .2rem; }
.btn-full .btn-inner {
  font-size: clamp(1.7rem, 6.5vw, 3rem);
  letter-spacing: .08em;
  box-shadow: inset 0 5px rgba(255,255,255,.5), inset 0 -3px rgba(0,0,0,.15);
  text-shadow:
    -3px -3px 0 #111, 3px -3px 0 #111,
    -3px  3px 0 #111, 3px  3px 0 #111,
     0   -3px 0 #111, 0    3px 0 #111,
    -3px  0   0 #111, 3px  0   0 #111,
    -4px  0   0 #111, 4px  0   0 #111,
     0   -4px 0 #111, 0    4px 0 #111;
}

/* ── Selection summary ── */
.summary {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--input-border);
  border-radius: var(--btn-radius);
  box-shadow: 0 4px 0 var(--input-border);
  padding: clamp(.6rem, 2.5vw, 1rem) clamp(.8rem, 3vw, 1.2rem);
  margin: clamp(1rem, 3.5vw, 1.4rem) 0 1rem;
}
.summary-thumb {
  flex: none;
  width: clamp(3.2rem, 11vw, 4.8rem);
  height: clamp(3.2rem, 11vw, 4.8rem);
  border-radius: 50%;
  background: var(--avatar-bg);
  border: 2px solid var(--input-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--subtext);
  font-size: 1.6rem;
}
.summary-thumb img { width: 100%; height: 100%; object-fit: contain; padding: .35rem; }
.summary-info { min-width: 0; margin-left: clamp(.6rem, 2.5vw, 1rem); flex: 1; }
.summary-name { font-size: clamp(1.15rem, 4.2vw, 1.8rem); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-desc { color: var(--subtext); font-size: clamp(.85rem, 3vw, 1.2rem); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-check { flex: none; width: 1.8rem; height: 1.8rem; margin-left: .5rem; display: none; }
.summary.has-item .summary-check { display: block; }

.note { text-align: center; color: var(--subtext); font-size: clamp(.75rem, 2.5vw, .95rem); margin: .7rem 0 0; }
.note a { color: inherit; }
.note a:hover { color: #14b80a; }

/* ── Shake ── */
.shake { animation: shake .5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake {
  10%,30%,50%,70%,90% { transform: translate(-5px); }
  20%,40%,60%,80%     { transform: translate(5px); }
}

/* ── Modal ── */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem 1.5rem;
  background: rgba(9,31,13,.55);
  z-index: 50;
}
.overlay.open { display: flex; }
.modal { max-width: 26rem; animation: pop .22s ease-out both; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal .card-body { text-align: center; padding-top: clamp(1.4rem, 5vw, 2rem); }
.modal .note a { text-decoration: underline; }
.modal-img {
  width: clamp(6rem, 28vw, 8rem);
  height: clamp(6rem, 28vw, 8rem);
  object-fit: contain;
  padding: .6rem;
  border-radius: var(--btn-radius);
  border: 2px solid var(--input-border);
  background: var(--avatar-bg);
  margin: .6rem auto .8rem;
}
.modal-name { font-size: clamp(1.4rem, 5vw, 2rem); margin: 0; }
.modal-desc { color: var(--subtext); font-size: clamp(.95rem, 3.2vw, 1.2rem); margin: .25rem 0 .9rem; }

/* ── Steps ── */
.step { display: none; flex-direction: column; }
.step.active { display: flex; }

/* Loading overlay */
.card-loading {
  display: none; position: absolute; inset: -4px; border-radius: var(--radius);
  background: rgba(9,31,13,.5); justify-content: center; align-items: center; z-index: 20;
}
.card-loading.active { display: flex; }
.spinner { width: 3rem; height: 3rem; }
.spinner svg { width: 100%; height: 100%; animation: spin .8s linear infinite; overflow: visible; }
.spinner circle { fill: none; stroke-width: 7px; }
.spinner .track { stroke: rgba(255,255,255,.35); }
.spinner .fill  { stroke: #fff; stroke-linecap: round; stroke-dasharray: 44 82; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Confirm user */
.confirm-title { text-align: center; font-size: clamp(1.5rem, 5.5vw, 2.4rem); margin-bottom: .8rem; }
.user-link {
  display: flex; align-items: center; width: 100%; background: #fff; color: inherit; text-decoration: none;
  border: 2px solid var(--input-border); border-radius: var(--btn-radius); box-shadow: 0 4px 0 var(--input-border);
  padding: clamp(.6rem, 2.5vw, 1rem) clamp(.8rem, 3vw, 1.2rem); margin-bottom: 1rem;
}
.avatar {
  flex: none; width: clamp(3.5rem, 12vw, 5rem); height: clamp(3.5rem, 12vw, 5rem);
  border-radius: 50%; overflow: hidden; background: var(--avatar-bg); border: 2px solid var(--input-border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info { min-width: 0; margin-left: clamp(.6rem, 2.5vw, 1rem); }
.user-display { font-size: clamp(1.2rem, 4.5vw, 2rem); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-name { color: var(--subtext); font-size: clamp(.85rem, 3vw, 1.3rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-row { display: flex; gap: clamp(.4rem, 2vw, .75rem); }
.btn-row .btn { flex: 1; }
.btn-red { --btn-grad: linear-gradient(180deg, #ff9077 0%, #f4482e 100%); --btn-shadow: #b32a13; }
.who { display: flex; align-items: center; gap: .5rem; color: var(--subtext); font-size: clamp(.85rem, 3vw, 1.1rem); margin: 0 .2rem .8rem; }
.who img { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--avatar-bg); }
.who button { margin-left: auto; background: none; border: 0; color: #14b80a; font-family: var(--font); font-size: inherit; cursor: pointer; }

/* Claim modal */
.notice-icon { width: clamp(4rem, 16vw, 5.5rem); height: auto; margin: .4rem auto .6rem; animation: pop .3s ease-out both; }
.claim-eggs { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: .6rem; }
.claim-eggs img { width: 3.2rem; height: 3.2rem; object-fit: contain; }
.steps-list { text-align: left; list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .45rem; }
.steps-list li { display: flex; gap: .6rem; align-items: center; font-size: clamp(.95rem, 3.4vw, 1.2rem);
  background: var(--avatar-bg); border: 2px solid var(--input-border); border-radius: 14px; padding: .55rem .8rem; }
.steps-list b { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center;
  background: #22dd10; color: #fff; font-weight: 400; text-shadow: var(--stroke); border: 2px solid #0a6e08; }

/* secondary button under the main join button */
#benBtn { margin-top: .55rem; }
#benBtn .btn-inner { font-size: clamp(.9rem, 3.6vw, 1.2rem); padding: .45rem .5rem; text-shadow: none; color: #555; }
#benBtn .btn-inner::after { display: none; }

.search-wrap { position: relative; }
.search-wrap input { padding-right: 3rem !important; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.clear-search {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  width: 2rem; height: 2rem; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--input-border); color: #666; font-size: 1.3rem; line-height: 1; font-family: var(--font);
}
.clear-search[hidden] { display: none; }

/* Tap ripple */
.tap-ripple {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  width: 20px; height: 20px;
  background-image: radial-gradient(circle,
    rgba(255,255,255,.2) 0%, rgba(255,255,255,.3) 45%,
    rgba(255,255,255,.95) 72%, rgba(255,255,255,0) 100%);
  animation: ripple-fade .2s ease-out both;
  z-index: 60;
}
@keyframes ripple-fade {
  0% { opacity: .7; transform: translate(-50%,-50%) scale(1); }
  to { opacity: 0;  transform: translate(-50%,-50%) scale(3); }
}

/* ── Ben branding + footer links (additions) ── */
.byben {
  text-align: center;
  font-size: clamp(.8rem, 2.7vw, 1rem);
  color: #0a6e08;
  background: rgba(255,255,255,.7);
  border: 2px solid rgba(10,110,8,.18);
  border-radius: 999px;
  padding: .3rem .8rem;
  width: fit-content;
  margin: 0 auto clamp(.9rem, 3vw, 1.2rem);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.byben b { font-weight: 400; }
.byben a { color: inherit; text-decoration: none; border-bottom: 2px solid rgba(10,110,8,.35); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Fake browser chrome (roblox.com.ss) ── */
.browser {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #12161d;
}
.browser__bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .7rem;
  background: #1c2027;
  border-bottom: 1px solid #2c323c;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.browser__dots { display: flex; gap: .32rem; flex: none; padding-right: .2rem; }
.browser__dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.browser__dots i:nth-child(1) { background: #ff5f57; }
.browser__dots i:nth-child(2) { background: #febc2e; }
.browser__dots i:nth-child(3) { background: #28c840; }

.browser__tab {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: none;
  max-width: 15rem;
  padding: .3rem .55rem;
  border-radius: 8px 8px 0 0;
  background: #2a303a;
  color: #d6dbe3;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .74rem;
  white-space: nowrap;
  overflow: hidden;
}
.browser__tab span:not(.browser__x) { overflow: hidden; text-overflow: ellipsis; }
.browser__tab img { border-radius: 3px; flex: none; }
.browser__x { color: #98a1ae; font-size: .95rem; line-height: 1; }

.browser__url {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: 1;
  min-width: 0;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: #0e1116;
  border: 1px solid #333a45;
  color: #c9d1dd;
  text-decoration: none;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .8rem;
  white-space: nowrap;
  overflow: hidden;
}
.browser__url span { overflow: hidden; text-overflow: ellipsis; }
.browser__url svg { width: 14px; height: 14px; flex: none; color: #6ee06a; }
.browser__url:hover { border-color: #4a5464; color: #fff; }

.browser__icons { display: flex; gap: .5rem; flex: none; color: #98a1ae; padding-left: .2rem; }
.browser__icons svg { width: 16px; height: 16px; }

.browser__stage { flex: 1; display: flex; }
.browser__stage .page { flex: 1; min-height: calc(100vh - 44px); min-height: calc(100svh - 44px); }

@media (max-width: 560px) {
  .browser__dots, .browser__icons, .browser__tab { display: none; }
  .browser__bar { padding: .4rem .5rem; }
  .browser__url { font-size: .72rem; padding: .3rem .55rem; }
}

/* ── In-page Roblox browser window ── */
.browser-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(0 0 0 / 70%);
  backdrop-filter: blur(4px);
}
.browser-modal[hidden] { display: none; }

.browser-window {
  display: flex;
  width: 100%;
  max-width: 64rem;
  height: 85vh;
  height: 85svh;
  flex-direction: column;
  overflow: hidden;
  border-radius: .75rem;
  background: #202124;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
}
.tab-bar { display: flex; align-items: flex-end; gap: .25rem; padding: .5rem .75rem 0; background: #202124; }
.browser-tab {
  display: flex;
  min-width: 12.5rem;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: .5rem .5rem 0 0;
  color: #fff;
  background: #35363a;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .75rem;
}
.tab-icon { width: 1rem; height: 1rem; border-radius: .25rem; object-fit: cover; }
.tab-close { width: .875rem; margin-left: auto; opacity: .6; font-size: 1rem; line-height: 1; }

.toolbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  color: #fff;
  background: #35363a;
}
.toolbar-icon { width: 1rem; height: 1rem; opacity: .7; flex: none; }
.toolbar-icon.is-disabled { opacity: .4; }

.address-bar {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: .5rem;
  padding: .375rem 1rem;
  border-radius: 9999px;
  background: #202124;
  color: #e8eaed;
  text-decoration: none;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .875rem;
}
.lock-icon { width: .875rem; height: .875rem; flex: none; opacity: .6; }
.address { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.window-close { margin-left: .5rem; opacity: .7; transition: opacity 150ms ease; background: none; border: 0; color: #fff; cursor: pointer; padding: 0; }
.window-close:hover { opacity: 1; }
.window-close svg { width: 1.25rem; height: 1.25rem; display: block; }

.browser-frame { width: 100%; min-height: 0; flex: 1; border: 0; background: #fff; }

@media (max-width: 640px) {
  .browser-modal { padding: 0; }
  .browser-window { border-radius: 0; height: 100svh; max-width: none; }
  .browser-tab { min-width: 0; flex: 1; }
  .toolbar-icon { display: none; }
  .address { font-size: .78rem; }
}

/* ── stars: cursor trail + twinkle field ── */
.cursor-star {
  position: fixed;
  z-index: 55;
  width: 16px;
  height: 16px;
  pointer-events: none;
  background: #fff;
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  filter: drop-shadow(0 0 7px rgba(255, 245, 170, .95));
  animation: star-fade .72s ease-out forwards;
}
@keyframes star-fade {
  from { opacity: .95; transform: translate(-50%, -50%) scale(.35) rotate(0deg); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.2) rotate(75deg); }
}

.sparkle-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.sparkle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  opacity: .55;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .9));
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: .15; transform: scale(.6) rotate(0deg); }
  50% { opacity: .75; transform: scale(1.05) rotate(30deg); }
}
@media (prefers-reduced-motion: reduce) { .sparkle, .cursor-star { animation: none; } }

/* ── source lock ── */
body { -webkit-user-select: none; user-select: none; }
input, textarea, .address, .browser__url { -webkit-user-select: text; user-select: text; }

.lock-toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translate(-50%, 14px);
  z-index: 90;
  padding: .55rem .9rem;
  border-radius: 999px;
  background: #202124;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .8rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.lock-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
