*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root{
    --gold-1:#f1d488; --gold-2:#b8892f; --gold-ring1:#efe3c2; --gold-ring2:#b8933f;
    --gold-text:#e8cd8a; --gold-sub:#cbb98f; --gold-line:#c9a24b;
    --gold-tt-name:#3a2b12; --gold-tt-price:#97722c; --gold-tt-border:#d9c48e;
    --gold-link1:#c9a24b; --gold-link2:#8f6c22; --gold-link-text:#fffaf0;
    --gold-bg1:#2a2320; --gold-bg2:#1a1512;

    --wine-1:#c85c73; --wine-2:#8f2f42; --wine-ring1:#eef2f6; --wine-ring2:#8f2f42;
    --wine-text:#a8c5e0; --wine-sub:#b9c7d6; --wine-line:#8f2f42;
    --wine-tt-name:#2c2320; --wine-tt-price:#8f2f42; --wine-tt-border:#d8dee5;
    --wine-link1:#a8c5e0; --wine-link2:#5f88ac; --wine-link-text:#12202c;
    --wine-bg1:#26303d; --wine-bg2:#141a22;

    --boho-1:#eba374; --boho-2:#c1653a; --boho-ring1:#f8ece0; --boho-ring2:#c1653a;
    --boho-text:#eabb92; --boho-sub:#d8b89c; --boho-line:#c1653a;
    --boho-tt-name:#3a2418; --boho-tt-price:#a85c34; --boho-tt-border:#e8cdb3;
    --boho-link1:#eba374; --boho-link2:#a85c34; --boho-link-text:#fff8f2;
    --boho-bg1:#2b211b; --boho-bg2:#1a1310;

    --eclectic-1:#4fc3bd; --eclectic-2:#1f7d78; --eclectic-ring1:#eef8f7; --eclectic-ring2:#1f7d78;
    --eclectic-text:#7fd9d1; --eclectic-sub:#a9cac6; --eclectic-line:#3aa89f;
    --eclectic-tt-name:#1c2b29; --eclectic-tt-price:#1f7d78; --eclectic-tt-border:#bfe4e0;
    --eclectic-link1:#4fc3bd; --eclectic-link2:#1f7d78; --eclectic-link-text:#f2fffd;
    --eclectic-bg1:#1c2b2a; --eclectic-bg2:#101c1b;

    --sage-1:#a3c088; --sage-2:#5c7a45; --sage-ring1:#eef3ea; --sage-ring2:#5c7a45;
    --sage-text:#b6d19d; --sage-sub:#c3d6b3; --sage-line:#7a9860;
    --sage-tt-name:#22301b; --sage-tt-price:#4f6b3f; --sage-tt-border:#cde0bd;
    --sage-link1:#a3c088; --sage-link2:#5c7a45; --sage-link-text:#f4faf0;
    --sage-bg1:#1f261b; --sage-bg2:#12160e;
  }

  body {
    font-family: "Tajawal", sans-serif;
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px 16px;
    transition: background 0.4s;
  }
  body[data-theme="reception"] { background: radial-gradient(ellipse at top, var(--gold-bg1) 0%, var(--gold-bg2) 70%); }
  body[data-theme="bedroom"]   { background: radial-gradient(ellipse at top, var(--wine-bg1) 0%, var(--wine-bg2) 70%); }
  body[data-theme="boho"]      { background: radial-gradient(ellipse at top, var(--boho-bg1) 0%, var(--boho-bg2) 70%); }
  body[data-theme="eclectic"]  { background: radial-gradient(ellipse at top, var(--eclectic-bg1) 0%, var(--eclectic-bg2) 70%); }
  body[data-theme="dining"]    { background: radial-gradient(ellipse at top, var(--sage-bg1) 0%, var(--sage-bg2) 70%); }

  /* tab switcher */
  .tabs { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-bottom:22px; background:rgba(255,255,255,0.06); padding:6px; border-radius:40px; max-width:640px; }
  .tab-btn {
    font-family:"Tajawal", sans-serif; font-size:.92rem; font-weight:700; cursor:pointer;
    padding:10px 22px; border-radius:32px; border:none; background:transparent; color:#cfd3d8;
    transition: background .25s, color .25s;
    display:inline-flex; align-items:center; gap:6px;
  }
  .tab-btn svg { width:16px; height:16px; stroke:currentColor; fill:none; flex-shrink:0; }
  body[data-theme="reception"] .tab-btn.active { background:linear-gradient(135deg,var(--gold-1),var(--gold-2)); color:#2a1f0a; }
  body[data-theme="bedroom"] .tab-btn.active { background:linear-gradient(135deg,var(--wine-1),var(--wine-2)); color:#fff6ee; }
  body[data-theme="boho"] .tab-btn.active { background:linear-gradient(135deg,var(--boho-1),var(--boho-2)); color:#2e1c10; }
  body[data-theme="eclectic"] .tab-btn.active { background:linear-gradient(135deg,var(--eclectic-1),var(--eclectic-2)); color:#0c1f1d; }
  body[data-theme="dining"] .tab-btn.active { background:linear-gradient(135deg,var(--sage-1),var(--sage-2)); color:#141f0e; }

  header { text-align: center; margin-bottom: 22px; }
  .site-logo { position: fixed; top: 16px; left: 22px; z-index: 100; display: block; line-height: 0; opacity: .92; transition: opacity .2s; }
  .site-logo:hover { opacity: 1; }
  .site-logo svg { width: 150px; height: 51px; display: block; }
  @media (max-width: 640px) { .site-logo svg { width: 104px; height: 35px; } }
  header h1 {
    font-family: "Amiri", serif;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: .5px;
    transition: color .4s;
  }
  body[data-theme="reception"] header h1 { color: var(--gold-text); }
  body[data-theme="bedroom"] header h1 { color: var(--wine-text); }
  body[data-theme="boho"] header h1 { color: var(--boho-text); }
  body[data-theme="eclectic"] header h1 { color: var(--eclectic-text); }
  body[data-theme="dining"] header h1 { color: var(--sage-text); }
  header h1::after {
    content: "";
    display: block;
    width: 96px; height: 2px;
    margin: 10px auto 0;
    transition: background .4s;
  }
  body[data-theme="reception"] header h1::after { background: linear-gradient(90deg, transparent, var(--gold-line), transparent); }
  body[data-theme="bedroom"] header h1::after { background: linear-gradient(90deg, transparent, var(--wine-line), transparent); }
  body[data-theme="boho"] header h1::after { background: linear-gradient(90deg, transparent, var(--boho-line), transparent); }
  body[data-theme="eclectic"] header h1::after { background: linear-gradient(90deg, transparent, var(--eclectic-line), transparent); }
  body[data-theme="dining"] header h1::after { background: linear-gradient(90deg, transparent, var(--sage-line), transparent); }
  header p { font-size: .95rem; margin-top: 10px; font-weight: 300; }
  body[data-theme="reception"] header p { color: var(--gold-sub); }
  body[data-theme="bedroom"] header p { color: var(--wine-sub); }
  body[data-theme="boho"] header p { color: var(--boho-sub); }
  body[data-theme="eclectic"] header p { color: var(--eclectic-sub); }
  body[data-theme="dining"] header p { color: var(--sage-sub); }

  .scene { display:none; }
  .scene.active { display:block; }

  .room-wrapper {
    position: relative; width: 100%;
    box-shadow: 0 40px 90px rgba(0,0,0,0.6);
    /* crops the room-pan layer when it scales/shifts for the look-around effect */
    overflow: hidden;
  }
  .room-wrapper.gold { max-width: 720px; box-shadow: 0 40px 90px rgba(0,0,0,0.6), 0 0 0 10px var(--gold-ring1), 0 0 0 13px var(--gold-ring2); background:#f3e9d0; }
  .room-wrapper.wine { max-width: 640px; box-shadow: 0 40px 90px rgba(0,0,0,0.6), 0 0 0 10px var(--wine-ring1), 0 0 0 13px var(--wine-ring2); background:#eef2f6; }
  .room-wrapper.boho { max-width: 680px; box-shadow: 0 40px 90px rgba(0,0,0,0.6), 0 0 0 10px var(--boho-ring1), 0 0 0 13px var(--boho-ring2); background:#f8ece0; }
  .room-wrapper.eclectic { max-width: 680px; box-shadow: 0 40px 90px rgba(0,0,0,0.6), 0 0 0 10px var(--eclectic-ring1), 0 0 0 13px var(--eclectic-ring2); background:#eef8f7; }
  .room-wrapper.sage { max-width: 680px; box-shadow: 0 40px 90px rgba(0,0,0,0.6), 0 0 0 10px var(--sage-ring1), 0 0 0 13px var(--sage-ring2); background:#eef3ea; }

  /* room-pan holds the photo + hotspots as one unit; JS scales/shifts it on
     pointer move so the room feels like it can be looked around, without any
     panorama projection or distortion */
  .room-pan { position: relative; will-change: transform; }

  /* clips only the photo to rounded corners; hotspots/tooltips live outside this so they aren't clipped */
  .room-image { border-radius: 6px; overflow: hidden; }
  .room-image img { width: 100%; height: auto; display: block; }

  /* the room photos are portrait; on desktop, size by viewport height instead of
     width so the whole room fits on screen without scrolling, rather than a tall
     narrow column with empty space on either side */
  @media (min-width: 900px) and (min-height: 600px) {
    .room-wrapper { width: auto; max-width: none; }
    /* same specificity as the per-theme max-width rules above, so this has to
       repeat the selectors to actually win and let wide (e.g. 16:9) room
       photos like the dining room grow past their portrait-photo cap */
    .room-wrapper.gold, .room-wrapper.wine, .room-wrapper.boho,
    .room-wrapper.eclectic, .room-wrapper.sage { max-width: none; }
    .room-image { height: min(78vh, 800px); }
    .room-image img { width: auto; height: 100%; }
  }

  .hotspot { position: absolute; transform: translate(-50%, -50%); z-index: 10; }
  .hotspot:hover, .hotspot.open { z-index: 50; }
  .hotspot-btn {
    width: 34px; height: 34px; border-radius: 50%;
    border: 2px solid #fffaf0;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
    animation: glow 2.4s infinite;
  }
  .gold .hotspot-btn { background: radial-gradient(circle at 32% 30%, var(--gold-1), var(--gold-2) 75%); box-shadow: 0 0 0 4px rgba(184,137,47,0.28), 0 4px 14px rgba(0,0,0,0.45); }
  .wine .hotspot-btn { background: radial-gradient(circle at 32% 30%, var(--wine-1), var(--wine-2) 75%); box-shadow: 0 0 0 4px rgba(143,47,66,0.28), 0 4px 14px rgba(0,0,0,0.45); }
  .boho .hotspot-btn { background: radial-gradient(circle at 32% 30%, var(--boho-1), var(--boho-2) 75%); box-shadow: 0 0 0 4px rgba(193,101,58,0.28), 0 4px 14px rgba(0,0,0,0.45); }
  .eclectic .hotspot-btn { background: radial-gradient(circle at 32% 30%, var(--eclectic-1), var(--eclectic-2) 75%); box-shadow: 0 0 0 4px rgba(31,125,120,0.28), 0 4px 14px rgba(0,0,0,0.45); }
  .sage .hotspot-btn { background: radial-gradient(circle at 32% 30%, var(--sage-1), var(--sage-2) 75%); box-shadow: 0 0 0 4px rgba(92,122,69,0.28), 0 4px 14px rgba(0,0,0,0.45); }
  .gold .hotspot-btn svg { width: 14px; height: 14px; fill: none; stroke: #3a2b12; }
  .wine .hotspot-btn svg { width: 14px; height: 14px; fill: none; stroke: #fff6ee; }
  .boho .hotspot-btn svg { width: 14px; height: 14px; fill: none; stroke: #3a2418; }
  .eclectic .hotspot-btn svg { width: 14px; height: 14px; fill: none; stroke: #f2fffd; }
  .sage .hotspot-btn svg { width: 14px; height: 14px; fill: none; stroke: #16210f; }
  .hotspot-btn:hover { transform: scale(1.22); animation: none; }
  @keyframes glow {
    0%,100% { box-shadow: 0 0 0 4px rgba(184,137,47,0.28), 0 4px 14px rgba(0,0,0,0.45); }
    50% { box-shadow: 0 0 0 10px rgba(184,137,47,0.1), 0 4px 18px rgba(0,0,0,0.5); }
  }

  .tooltip {
    position: absolute; bottom: calc(100% + 13px); left: 50%;
    /* --tip-shift (set by positionTooltip() in script.js) nudges the tooltip
       sideways when centering it on the dot would push it past the room's
       edge; it's 0px whenever there's room to stay centered. */
    transform: translateX(calc(-50% + var(--tip-shift, 0px))) scale(0.85);
    width: 184px;
    border-radius: 10px; padding: 13px 15px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.4);
    pointer-events: none; opacity: 0;
    transition: opacity 0.22s, transform 0.22s;
    text-align: center; direction: rtl;
  }
  .gold .tooltip { background: #fffcf4; border: 1px solid var(--gold-tt-border); }
  .wine .tooltip { background: #fffefb; border: 1px solid var(--wine-tt-border); }
  .boho .tooltip { background: #fffaf5; border: 1px solid var(--boho-tt-border); }
  .eclectic .tooltip { background: #f6fffe; border: 1px solid var(--eclectic-tt-border); }
  .sage .tooltip { background: #f8fcf5; border: 1px solid var(--sage-tt-border); }
  .tooltip.show { opacity: 1; transform: translateX(calc(-50% + var(--tip-shift, 0px))) scale(1); pointer-events: all; }
  /* bridges the gap between the dot and the tooltip so hovering toward the tooltip doesn't drop out */
  .tooltip::before { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 13px; }
  .hotspot.flip-down .tooltip::before { top: auto; bottom: 100%; }
  @media (hover: hover) {
    .hotspot:hover .tooltip { opacity: 1; transform: translateX(calc(-50% + var(--tip-shift, 0px))) scale(1); pointer-events: all; }
  }
  .tooltip::after {
    /* shifted the opposite way so the arrow stays pointing at the dot even
       when the tooltip body has been nudged off-center */
    content:""; position:absolute; top:100%; left:calc(50% - var(--tip-shift, 0px)); transform:translateX(-50%);
    border:7px solid transparent;
  }
  .gold .tooltip::after { border-top-color:#fffcf4; }
  .wine .tooltip::after { border-top-color:#fffefb; }
  .boho .tooltip::after { border-top-color:#fffaf5; }
  .eclectic .tooltip::after { border-top-color:#f6fffe; }
  .sage .tooltip::after { border-top-color:#f8fcf5; }
  .tooltip-icon { display:flex; justify-content:center; margin-bottom: 6px; }
  .tooltip-icon svg { width: 26px; height: 26px; fill:none; stroke-width: 1.75; }
  .gold .tooltip-icon svg { stroke: var(--gold-line); }
  .wine .tooltip-icon svg { stroke: var(--wine-line); }
  .boho .tooltip-icon svg { stroke: var(--boho-line); }
  .eclectic .tooltip-icon svg { stroke: var(--eclectic-line); }
  .sage .tooltip-icon svg { stroke: var(--sage-line); }
  .tooltip-name { font-size: 0.85rem; font-weight: 700; margin-bottom: 2px; font-family:"Amiri", serif; }
  .gold .tooltip-name { color: var(--gold-tt-name); }
  .wine .tooltip-name { color: var(--wine-tt-name); }
  .boho .tooltip-name { color: var(--boho-tt-name); }
  .eclectic .tooltip-name { color: var(--eclectic-tt-name); }
  .sage .tooltip-name { color: var(--sage-tt-name); }
  .tooltip-price { font-size: 0.78rem; font-weight: 700; margin-bottom: 9px; }
  .gold .tooltip-price { color: var(--gold-tt-price); }
  .wine .tooltip-price { color: var(--wine-tt-price); }
  .boho .tooltip-price { color: var(--boho-tt-price); }
  .eclectic .tooltip-price { color: var(--eclectic-tt-price); }
  .sage .tooltip-price { color: var(--sage-tt-price); }
  .tooltip-link { display:block; text-decoration:none; border-radius:8px; padding:7px 10px; font-size:0.8rem; font-weight:700; }
  .gold .tooltip-link { background: linear-gradient(135deg,var(--gold-link1),var(--gold-link2)); color: var(--gold-link-text); }
  .wine .tooltip-link { background: linear-gradient(135deg,var(--wine-link1),var(--wine-link2)); color: var(--wine-link-text); }
  .boho .tooltip-link { background: linear-gradient(135deg,var(--boho-link1),var(--boho-link2)); color: var(--boho-link-text); }
  .eclectic .tooltip-link { background: linear-gradient(135deg,var(--eclectic-link1),var(--eclectic-link2)); color: var(--eclectic-link-text); }
  .sage .tooltip-link { background: linear-gradient(135deg,var(--sage-link1),var(--sage-link2)); color: var(--sage-link-text); }
  .tooltip-link:hover { opacity: 0.9; }
  .hotspot.flip-down .tooltip { bottom:auto; top:calc(100% + 13px); }
  .gold .hotspot.flip-down .tooltip::after { top:auto; bottom:100%; border-top-color:transparent; border-bottom-color:#fffcf4; }
  .wine .hotspot.flip-down .tooltip::after { top:auto; bottom:100%; border-top-color:transparent; border-bottom-color:#fffefb; }
  .boho .hotspot.flip-down .tooltip::after { top:auto; bottom:100%; border-top-color:transparent; border-bottom-color:#fffaf5; }
  .eclectic .hotspot.flip-down .tooltip::after { top:auto; bottom:100%; border-top-color:transparent; border-bottom-color:#f6fffe; }
  .sage .hotspot.flip-down .tooltip::after { top:auto; bottom:100%; border-top-color:transparent; border-bottom-color:#f8fcf5; }

  .legend { display:flex; gap:14px; flex-wrap:wrap; justify-content:center; margin-top:22px; }
  .legend-item {
    border-radius:30px; padding:6px 16px; font-size:0.8rem;
    display:flex; align-items:center; gap:8px;
  }
  body[data-theme="reception"] .legend-item { background:rgba(232,205,138,0.08); border:1px solid rgba(232,205,138,0.25); color:#cbb98f; }
  body[data-theme="bedroom"] .legend-item { background:rgba(168,197,224,0.08); border:1px solid rgba(168,197,224,0.25); color:#b9c7d6; }
  body[data-theme="boho"] .legend-item { background:rgba(235,163,116,0.08); border:1px solid rgba(235,163,116,0.25); color:#d8b89c; }
  body[data-theme="eclectic"] .legend-item { background:rgba(79,195,189,0.08); border:1px solid rgba(79,195,189,0.25); color:#a9cac6; }
  body[data-theme="dining"] .legend-item { background:rgba(163,192,136,0.08); border:1px solid rgba(163,192,136,0.25); color:#c3d6b3; }
  .legend-dot { width:10px; height:10px; border-radius:50%; border:2px solid #fffaf0; }
  body[data-theme="reception"] .legend-dot { background:#c9a24b; }
  body[data-theme="bedroom"] .legend-dot { background:#8f2f42; }
  body[data-theme="boho"] .legend-dot { background:#c1653a; }
  body[data-theme="eclectic"] .legend-dot { background:#1f7d78; }
  body[data-theme="dining"] .legend-dot { background:#5c7a45; }

  footer { margin-top:20px; font-size:0.8rem; text-align:center; }
  body[data-theme="reception"] footer { color:#8a7a54; }
  body[data-theme="bedroom"] footer { color:#5c6b7a; }
  body[data-theme="boho"] footer { color:#8a6a54; }
  body[data-theme="eclectic"] footer { color:#4c6e6a; }
  body[data-theme="dining"] footer { color:#5c7047; }
  footer span { font-weight:700; }
  footer .icp { margin-top:6px; font-size:0.7rem; direction:ltr; }
  footer .icp a { color:inherit; text-decoration:none; opacity:0.8; }
  body[data-theme="reception"] footer span { color:#cbb98f; }
  body[data-theme="bedroom"] footer span { color:#b9c7d6; }
  body[data-theme="boho"] footer span { color:#d8b89c; }
  body[data-theme="eclectic"] footer span { color:#a9cac6; }
  body[data-theme="dining"] footer span { color:#c3d6b3; }
