/* World page (/world): search bar, tabs, results on the left, preview on the right. */
body.world-page{display:flex; flex-direction:column; height:100vh; overflow:hidden}
.w-shell{flex:1; min-height:0; display:flex; flex-direction:column; width:100%; max-width:1500px; margin:0 auto; padding:18px 16px 0}

/* search: one big rounded box, like a search engine */
.w-search{display:flex; justify-content:center; margin-bottom:14px}
.w-search input{
  width:min(680px,100%); padding:12px 20px 12px 46px; font:inherit; font-size:17px; color:var(--ink);
  background:var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='8.5' cy='8.5' r='6'/%3E%3Cpath d='M13 13l5 5'/%3E%3C/svg%3E") no-repeat 16px center;
  border:1px solid var(--line); border-radius:999px; box-shadow:0 1px 6px rgba(0,0,0,.12); outline:none;
}
.w-search input:focus{border-color:var(--accent); box-shadow:0 1px 10px rgba(0,0,0,.18)}

.w-tabs{display:flex; justify-content:center; gap:6px; border-bottom:1px solid var(--line)}
.w-tabs button{font:inherit; font-size:15px; padding:8px 18px; background:none; border:0; border-bottom:3px solid transparent; color:var(--muted); cursor:pointer}
.w-tabs button[aria-selected="true"]{color:var(--ink); border-bottom-color:var(--accent); font-weight:600}

.w-body{flex:1; min-height:0; display:grid; grid-template-columns:minmax(300px,380px) 1fr; gap:16px; padding:14px 0 16px}

/* results */
.w-list{overflow:auto; padding-right:4px}
.w-count{margin:0 0 8px; font-size:13px; color:var(--muted)}
.w-list ol{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px}
.w-result button{all:unset; box-sizing:border-box; display:flex; flex-direction:column; gap:2px; width:100%; padding:10px 12px; border-radius:10px; cursor:pointer}
.w-result button:hover{background:var(--paper)}
.w-result.on button{background:var(--paper); box-shadow:inset 3px 0 0 var(--accent)}
.w-result.pinned button{background:color-mix(in srgb,var(--accent) 8%,transparent)}
.w-crumb{font-size:12px; color:#1e8e3e}
:root[data-theme="dark"] .w-crumb{color:#81c995}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .w-crumb{color:#81c995} }
.w-title{font-size:19px; line-height:1.25; color:var(--accent)}
.w-result button:hover .w-title{text-decoration:underline}
.w-meta{display:flex; flex-wrap:wrap; gap:10px; font-size:13px; color:var(--muted)}
.w-meta b{font-weight:600}
.w-pin{color:var(--accent)}
.w-stars{color:#d4a017; font-weight:600}
.w-hearts{color:#e0245e; font-weight:600}
.w-none{color:var(--muted); padding:12px}

/* preview */
.w-view{min-height:0; display:flex; flex-direction:column; background:var(--paper); border:1px solid var(--line); border-radius:12px; overflow:hidden}
.w-bar{display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; padding:12px 16px; border-bottom:1px solid var(--line)}
.w-bar:empty{display:none}
.w-head{flex:1; min-width:200px}
.w-head h2{margin:0; font-size:1.3rem}
.w-head p{margin:0; font-size:13px; color:var(--muted)}
.w-acts{display:flex; flex-wrap:wrap; align-items:center; gap:8px}
.w-acts button,.w-copy{font:inherit; font-size:14px; padding:6px 12px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--ink); cursor:pointer; text-decoration:none}
.w-copy{background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600}
:root[data-theme="dark"] .w-copy{color:#11131a}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .w-copy{color:#11131a} }
.w-zoombtns{display:inline-flex; gap:4px}
.w-zoombtns button{min-width:34px}
.w-mine{font-size:14px; color:var(--muted)}
.w-heart.on{color:#e0245e; border-color:#e0245e}
.rate{display:inline-flex}
.rate .star{all:unset; cursor:pointer; font-size:24px; line-height:1; padding:0 1px; color:var(--line)}
.rate .star.on{color:#f5b301}
.rate:hover .star{color:#f5b301}
.rate .star:hover ~ .star{color:var(--line)}
.w-stage{flex:1; min-height:0; overflow:auto; padding:20px; background:#b9b5a7}
:root[data-theme="dark"] .w-stage{background:#34322c}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .w-stage{background:#34322c} }
.w-empty{margin:40px auto; text-align:center; color:#2b2a26; font-size:18px}
.w-zoom{width:max-content}

/* the read-only plan or template */
.wd{display:flex; flex-direction:column; align-items:center; gap:24px}
.wd-title span{display:inline-block; padding:6px 22px; font-weight:600}
.wd-grid{display:grid; gap:16px}
.wd-col,.wd-row{display:flex; align-items:center; justify-content:center}
.wd-col span,.wd-row span{padding:4px 12px; font-weight:600; box-shadow:0 .05em .15em rgba(0,0,0,.3); white-space:pre-wrap; text-align:center}
.wd-page{position:relative; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 2px 0 rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.22); line-height:1.2}
.wd-prow{display:flex; align-items:center; justify-content:center; padding:0 12px; overflow:hidden; flex:none; border-bottom:1px solid rgba(0,0,0,.12); white-space:pre-wrap; word-break:break-word}
.wd-notes{padding:16px 18px; white-space:pre-wrap; text-align:left; overflow:hidden}
.wd-items{list-style:none; margin:0; padding:10px; text-align:left}
.wd-items li{padding:6px 4px; border-bottom:1px solid rgba(0,0,0,.1)}
.wd-items li.done{text-decoration:line-through; opacity:.55}
.wd-ink{position:absolute; inset:0; width:100%; height:100%}
.wd-ink path{fill:none; stroke-linecap:round; stroke-linejoin:round}
.wd-slot{border:3px dashed rgba(0,0,0,.22)}

#w-toast{position:fixed; left:50%; bottom:24px; transform:translateX(-50%); padding:10px 16px; border-radius:8px; background:var(--ink); color:var(--bg); opacity:0; transition:opacity .2s; pointer-events:none; z-index:10}
#w-toast.show{opacity:1}

/* phone: results above, preview below; the page scrolls */
@media (max-width:800px){
  body.world-page{height:auto; overflow:auto}
  .w-body{grid-template-columns:1fr}
  .w-list{max-height:none; overflow:visible}
  .w-view{min-height:70vh}
  .w-stage{min-height:60vh}
}

/* User Shared Visions: kind filters, the tree of rooms and walls, and a whole wall */
.w-kinds{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px}
.w-kinds button{font:inherit; font-size:13px; padding:4px 10px; border:1px solid var(--line); border-radius:999px; background:var(--paper); color:var(--ink); cursor:pointer}
.w-kinds button[aria-pressed="true"]{background:var(--accent); border-color:var(--accent); color:#fff}
.w-place{display:grid; grid-template-columns:220px 1fr; gap:14px; height:100%; min-height:400px}
.w-place.only-wall{grid-template-columns:1fr}
.w-tree{background:var(--paper); color:var(--ink); border-radius:10px; padding:10px; overflow:auto; display:flex; flex-direction:column; gap:2px; font-size:14px; align-self:start; max-height:100%}
.w-node{font-weight:600; padding:3px 0}
.w-wallbtn{all:unset; cursor:pointer; padding:4px 8px; border-radius:6px}
.w-wallbtn:hover{background:var(--bg)}
.w-wallbtn.on{background:var(--accent); color:#fff}
.w-wallview{overflow:auto; min-height:0}
.wd-wall{position:relative; box-shadow:0 10px 60px rgba(0,0,0,.35); background-image:radial-gradient(rgba(0,0,0,.2) 2px,transparent 3px); background-size:48px 48px}
.wd-plan{position:absolute}
.wd-grip{position:absolute; top:-46px; left:0; padding:6px 14px; border-radius:8px; background:#1b1a17; color:#fff; font-weight:600; font-size:22px; white-space:nowrap}
@media (max-width:800px){ .w-place{grid-template-columns:1fr} }
.wd-pin{position:absolute; z-index:6; font-size:64px; line-height:1; transform:translate(-50%,-85%); filter:drop-shadow(0 3px 2px rgba(0,0,0,.45))}
.wd-pin.blue{filter:hue-rotate(205deg) saturate(1.4) drop-shadow(0 3px 2px rgba(0,0,0,.45))}
.wd-table{width:calc(100% - 24px); margin:12px; border-collapse:collapse; table-layout:fixed}
.wd-table th,.wd-table td{border:1px solid rgba(0,0,0,.25); padding:6px 8px; height:2.2em; text-align:left; vertical-align:top; overflow-wrap:anywhere; white-space:pre-wrap}
.wd-table th{background:rgba(0,0,0,.07)}

/* Calm look (2026-10-07): quieter preview area and tabs, readable empty text in both themes */
.w-shell{padding-top:24px}
.w-search input{box-shadow:none; height:48px; padding-top:0; padding-bottom:0}
.w-search input:focus{box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent)}
.w-tabs button{font-weight:500}
.w-tabs button[aria-selected="true"]{border-bottom-color:var(--ink); font-weight:500}
.w-result button{border-radius:12px}
.w-title{font-size:17px; font-weight:500}
.w-view{border-radius:14px}
.w-stage{background:var(--bg) radial-gradient(color-mix(in srgb,var(--muted) 35%,transparent) 1px,transparent 1.5px) 0 0/22px 22px}
:root[data-theme="dark"] .w-stage{background:var(--bg) radial-gradient(color-mix(in srgb,var(--muted) 35%,transparent) 1px,transparent 1.5px) 0 0/22px 22px}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .w-stage{background:var(--bg) radial-gradient(color-mix(in srgb,var(--muted) 35%,transparent) 1px,transparent 1.5px) 0 0/22px 22px} }
.w-empty{color:var(--muted); font-size:16px}
.w-copy{border-radius:9px}
.w-acts button{border-radius:9px; background:transparent}
.w-acts button:hover{background:var(--hover)}
