/* ==========================================================================
   Extras: homepage weather/cost snapshot, shop strip, apartment assistant
   ========================================================================== */

/* ---------- Life in Texas snapshot ---------- */
.snap {
  padding: clamp(56px, 7vw, 96px) 0;
  background: radial-gradient(1200px 500px at 85% -10%, #E7F0FA 0, transparent 60%), linear-gradient(180deg, var(--soft) 0, #fff 100%);
}
.snap-head { text-align: center; max-width: 820px; margin: 0 auto 30px; }
.snap-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 6px 0 10px; }
.snap-head .sub-k { color: var(--muted); margin: 0 auto 22px; }
.snap-tabs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--sh); }
.snap-tabs button { border: 0; background: none; font: 600 .95rem var(--f); color: var(--text); padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.snap-tabs button:hover { background: var(--soft); }
.snap-tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
.snap-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: stretch; }

/* weather card: the sky changes with the conditions */
.snap-wx {
  --sky1: #3E8EDE; --sky2: #8FC6F2;
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 24px; padding: 30px; color: #fff;
  background: linear-gradient(160deg, var(--sky1), var(--sky2));
  box-shadow: var(--sh-lg); transition: background .6s;
  display: flex; flex-direction: column; gap: 18px;
}
.snap-wx[data-wx="clear-night"], .snap-wx[data-wx="part-night"] { --sky1: #0F1E3D; --sky2: #2C4A7A; }
.snap-wx[data-wx="cloudy"], .snap-wx[data-wx="fog"] { --sky1: #5D7088; --sky2: #9DAEC0; }
.snap-wx[data-wx="rain"], .snap-wx[data-wx="storm"] { --sky1: #2F3F55; --sky2: #627A96; }
.snap-wx[data-wx="snow"] { --sky1: #7F98B3; --sky2: #C9D8E6; }
.wx-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.wx-sun { position: absolute; top: -40px; right: -40px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, #FFE58A 0 38%, rgba(255, 214, 90, .45) 39% 55%, transparent 56%);
  animation: wx-pulse 6s ease-in-out infinite; transition: opacity .6s; }
.snap-wx[data-wx$="night"] .wx-sun { background: radial-gradient(circle at 60% 40%, #F4F1E1 0 30%, rgba(244, 241, 225, .18) 31% 50%, transparent 51%); }
.snap-wx[data-wx="cloudy"] .wx-sun, .snap-wx[data-wx="rain"] .wx-sun, .snap-wx[data-wx="storm"] .wx-sun, .snap-wx[data-wx="fog"] .wx-sun, .snap-wx[data-wx="snow"] .wx-sun { opacity: 0; }
.wx-cloud { position: absolute; width: 180px; height: 56px; border-radius: 60px; background: rgba(255, 255, 255, .5); filter: blur(1px); opacity: 0; transition: opacity .6s; animation: wx-drift 26s linear infinite; }
.wx-cloud::before, .wx-cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.wx-cloud::before { width: 80px; height: 80px; top: -38px; left: 30px; }
.wx-cloud::after { width: 60px; height: 60px; top: -26px; left: 92px; }
.wx-cloud.c1 { top: 34px; left: -200px; }
.wx-cloud.c2 { top: 120px; left: -260px; animation-duration: 38s; animation-delay: -14s; transform: scale(.7); }
.snap-wx:not([data-wx^="clear"]) .wx-cloud { opacity: 1; }
.snap-wx[data-wx="cloudy"] .wx-cloud, .snap-wx[data-wx="rain"] .wx-cloud, .snap-wx[data-wx="storm"] .wx-cloud { background: rgba(230, 236, 244, .45); }
.wx-rain { position: absolute; inset: 0; opacity: 0; transition: opacity .6s;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, .5) 0 40%, transparent 40%);
  background-size: 3px 26px; background-position: 0 0; background-repeat: repeat; mask-image: linear-gradient(to bottom, transparent, #000 30%, transparent);
  animation: wx-rain .5s linear infinite; transform: skewX(-12deg); }
.snap-wx[data-wx="rain"] .wx-rain, .snap-wx[data-wx="storm"] .wx-rain { opacity: .22; }
.snap-wx[data-wx="snow"] .wx-rain { opacity: .6; background-image: radial-gradient(circle, #fff 0 1.5px, transparent 2px); background-size: 26px 26px; animation-duration: 3s; transform: none; }
.snap-wx[data-wx="storm"]::after { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; opacity: 0; animation: wx-flash 7s infinite; }
@keyframes wx-pulse { 50% { transform: scale(1.06); } }
@keyframes wx-drift { to { transform: translateX(900px); } }
@keyframes wx-rain { to { background-position: 0 26px; } }
@keyframes wx-flash { 0%, 92%, 96%, 100% { opacity: 0; } 93%, 95% { opacity: .25; } }

.wx-k { margin: 0; font-size: .95rem; opacity: .9; }
.snap-wx b, .snap-wx strong { color: #fff; }
.wx-temp { margin: 2px 0 0; font-size: clamp(3.4rem, 7vw, 5rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.wx-temp sup { font-size: .35em; font-weight: 600; vertical-align: top; margin-left: 4px; }
.wx-short { margin: 6px 0 0; font-size: 1.15rem; font-weight: 600; }
.wx-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; font-size: .88rem; opacity: .92; }
.wx-meta span:empty { display: none; }
.wx-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wx-days li { background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .22); border-radius: 14px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.wx-days span { font-size: .78rem; font-weight: 600; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wx-days i { font-style: normal; font-size: 1.5rem; }
.wx-days b { font-size: 1.1rem; }
.wx-days small { font-size: .7rem; opacity: .85; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wx-climate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .25); }
.wx-climate div { min-width: 0; }
.wx-climate dt { font-size: .72rem; opacity: .85; }
.wx-climate dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; }
.wx-note { margin: 0; font-size: .92rem; line-height: 1.55; opacity: .95; }
.wx-src { margin: auto 0 0; font-size: .72rem; opacity: .7; }

/* cost card */
.snap-cost { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--sh); display: flex; flex-direction: column; }
.sc-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.sc-opt > span { display: block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.seg-pick.sm { gap: 6px; margin-bottom: 14px; }
.seg-pick.sm span { padding: 7px 12px; font-size: .86rem; }
.sc-rent { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--soft); border-radius: 14px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.sc-money { display: inline-flex; align-items: center; font-size: 1.15rem; font-weight: 800; }
.sc-money input { width: 110px; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font: 800 1.1rem var(--f); color: var(--ink); margin-left: 4px; background: #fff; }
.sc-total { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 0 10px; font-weight: 600; color: var(--ink); }
.sc-total b { font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.sc-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--soft); }
.sc-bar span { transition: flex .5s ease; min-width: 3px; }
.sc-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.sc-list li { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text); padding: 6px 0; border-bottom: 1px dashed var(--line); }
.sc-list li i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sc-list li b { margin-left: auto; color: var(--ink); }
.snap .s1 { background: #1D4463; } .snap .s2 { background: #F2B705; } .snap .s3 { background: #3BA6D9; }
.snap .s4 { background: #7C5CD6; } .snap .s5 { background: #2FB38A; } .snap .s6 { background: #EF7D45; } .snap .s7 { background: #C2477E; }
.sc-income { margin: 18px 0 0; font-size: .92rem; color: var(--text); }
.sc-income a { font-weight: 600; }
.sc-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sc-fine { margin: auto 0 0; padding-top: 16px; font-size: .76rem; color: var(--muted); }

@media (max-width: 980px) {
  .snap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .snap-wx, .snap-cost { padding: 22px 18px; border-radius: 20px; }
  .wx-days, .wx-climate { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-opts, .sc-list { grid-template-columns: 1fr; }
  .sc-rent { flex-direction: column; align-items: flex-start; }
  .snap-tabs { border-radius: 18px; }
  .snap-tabs button { padding: 8px 12px; font-size: .88rem; }
}

/* ---------- Shop strip ---------- */
.shop-strip { padding: clamp(56px, 7vw, 92px) 0; background: linear-gradient(135deg, var(--deep) 0, var(--navy) 100%); color: #fff; position: relative; overflow: hidden; }
.shop-strip::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 171, 18, .35), transparent 65%); animation: shop-glow 12s ease-in-out infinite alternate; }
@keyframes shop-glow { to { transform: translate(-120px, 80px) scale(1.15); } }
.shop-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.shop-head h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 6px 0 8px; }
.shop-head .ph2-eyebrow { color: var(--gold-2); }
.shop-head .sub-k { color: rgba(255, 255, 255, .78); margin: 0; max-width: 560px; }
.shop-ctrl { display: flex; gap: 10px; align-items: center; }
.shop-ctrl .btn { background: var(--gold-2); border-color: var(--gold-2); color: var(--deep); }
.shop-ctrl .btn:hover { background: #fff; border-color: #fff; color: var(--deep); }
.shop-arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; transition: background .2s, transform .2s; }
.shop-arrow:hover { background: rgba(255, 255, 255, .2); transform: scale(1.06); }
.shop-track { position: relative; list-style: none; margin: 0; padding: 6px 2px 18px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, calc((100% - 4 * 18px) / 5)); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent; }
.shop-card { scroll-snap-align: start; }
.js .shop-card { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; transition-delay: calc(var(--i) * 70ms); }
.js .shop-card.in { opacity: 1; transform: none; }
.shop-card a { display: flex; flex-direction: column; height: 100%; color: #fff; text-decoration: none; }
.shop-img { position: relative; display: block; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #F3F1EC; box-shadow: 0 14px 34px rgba(0, 0, 0, .25); transition: transform .35s ease, box-shadow .35s ease; }
.shop-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s ease, transform .6s ease; }
.shop-img img.alt { opacity: 0; }
.shop-card a:hover .shop-img, .shop-card a:focus-visible .shop-img { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 22px 44px rgba(0, 0, 0, .35); }
.shop-card a:hover .shop-img img { transform: scale(1.05); }
.shop-card a:hover .shop-img img.alt { opacity: 1; }
.shop-buy { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px; border-radius: 12px; background: rgba(13, 33, 51, .88); color: #fff; text-align: center; font-weight: 700; font-size: .88rem; transform: translateY(140%); transition: transform .3s ease; }
.shop-card a:hover .shop-buy, .shop-card a:focus-visible .shop-buy { transform: none; }
.shop-name { margin-top: 14px; font-weight: 700; line-height: 1.3; }
.shop-price { margin-top: 4px; color: var(--gold-2); font-weight: 800; }
@media (max-width: 720px) {
  .shop-track { grid-auto-columns: 64%; }
  .shop-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wx-sun, .wx-cloud, .wx-rain, .snap-wx::after, .shop-strip::before { animation: none; }
  .js .shop-card { opacity: 1; transform: none; transition: none; }
}

/* snapshot inside the tool page */
.tool-section .snap { padding: 0; background: none; }
.tool-section .snap > .wrap { padding: 0; max-width: none; }
.tool-section .snap-head .ph2-eyebrow, .tool-section .snap-head .sub-k { display: none; }
.snap .ph2-eyebrow { color: var(--gold); }

/* ---------- Apartment assistant ---------- */
.rb { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 95; font-family: var(--f); }
.rb-launch { display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; padding: 8px 18px 8px 8px; border-radius: 999px; color: #fff; font: 700 .95rem var(--f);
  background: linear-gradient(135deg, var(--navy), #2E6A99); box-shadow: 0 14px 34px rgba(13, 33, 51, .35); transition: transform .2s, box-shadow .2s; }
.rb-launch:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(13, 33, 51, .42); }
.rb-face { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--gold-2); color: var(--deep); position: relative; }
.rb-face::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--gold-2); opacity: 0; animation: rb-ping 2.8s ease-out infinite; }
@keyframes rb-ping { 0% { transform: scale(.85); opacity: .9; } 70%, 100% { transform: scale(1.35); opacity: 0; } }
.rb.on .rb-launch { display: none; }
.rb-panel { position: absolute; right: 0; bottom: 0; width: min(400px, calc(100vw - 24px)); height: min(640px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px rgba(13, 33, 51, .32); overflow: hidden;
  opacity: 0; transform: translateY(14px) scale(.98); transform-origin: bottom right; transition: opacity .2s, transform .2s; }
.rb-panel.in { opacity: 1; transform: none; }
.rb-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: linear-gradient(135deg, var(--deep), var(--navy)); color: #fff; }
.rb-head div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rb-head b { color: #fff; font-size: 1rem; }
.rb-head small { opacity: .75; font-size: .78rem; }
.rb-ava { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold-2); color: var(--deep); flex: none; }
.rb-icon { border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.rb-icon:hover { background: rgba(255, 255, 255, .24); }
.rb-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: var(--soft); display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.rb-msg { display: flex; flex-direction: column; gap: 8px; max-width: 92%; animation: rb-in .25s ease; }
@keyframes rb-in { from { opacity: 0; transform: translateY(6px); } }
.rb-msg.me { align-self: flex-end; align-items: flex-end; }
.rb-bubble { padding: 10px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.5; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.rb-msg.me .rb-bubble { background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 16px 16px 4px 16px; }
.rb-typing .rb-bubble { display: flex; gap: 4px; padding: 14px; }
.rb-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: rb-dot 1s infinite; }
.rb-typing i:nth-child(2) { animation-delay: .15s; } .rb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes rb-dot { 50% { transform: translateY(-4px); opacity: .4; } }
.rb-cards { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.rb-card { display: flex; gap: 10px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s; }
.rb-card:hover { border-color: var(--navy); transform: translateX(2px); }
.rb-card img, .rb-noimg { width: 74px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--soft-2); }
.rb-card-t { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.rb-card-t b { font-size: .88rem; line-height: 1.3; }
.rb-card-t small { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.rb-tags em { font-style: normal; font-size: .7rem; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--soft); color: var(--text); }
.rb-tags em.sp { background: var(--gold-soft); color: #6B5A00; }
.rb-all { font-size: .86rem; font-weight: 700; }
.rb-hand { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-chips { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; background: var(--soft); scrollbar-width: none; }
.rb-chips:empty { display: none; }
.rb-chip { flex: none; border: 1px solid var(--line-2); background: #fff; color: var(--navy); font: 600 .8rem var(--f); padding: 7px 12px; border-radius: 99px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.rb-chip:hover { border-color: var(--navy); background: #EEF3F8; }
.rb-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.rb-form input { flex: 1; min-width: 0; border: 1px solid var(--line-2); border-radius: 99px; padding: 10px 16px; font: 500 .92rem var(--f); color: var(--ink); }
.rb-form input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29, 68, 99, .15); }
.rb-send { border: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: #fff; cursor: pointer; font-size: 1rem; flex: none; }
.rb-foot { margin: 0; padding: 0 14px 10px; font-size: .74rem; color: var(--muted); background: #fff; }
@media (max-width: 560px) {
  .rb { right: 12px; }
  .rb-launch-t { display: none; }
  .rb-launch { padding: 6px; }
  .rb.on { left: 0; right: 0; bottom: 0; top: 0; }
  .rb-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; }
}
@media print { .rb { display: none; } }
@media (prefers-reduced-motion: reduce) { .rb-face::after { animation: none; } }
.rb-panel[hidden] { display: none; }

/* ---------- Mobile: text inputs at 16px so iOS Safari does not zoom in on focus ---------- */
@media (max-width: 1024px), (hover: none) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
  select, textarea { font-size: 16px !important; }
}
