o2o-site-AEO/solution/site/scripts/mockup/build_stay3.py
Mina Choi 29af37f158 [chore] site/mockup: 목업 스크립트·벤더 번들 정리 — stay2/stay3 빌드 도구 추가
patch_stay.py·inject.js/css·audit-all.mjs 갱신, 벤더 번들 교체(index-D9cPXCE3 →
index-D4jgGFP4 등), stay3 백업 스냅샷과 stay2/stay3 빌드 스크립트(build_stay2.py·
build_stay3.py) 및 원본 템플릿(tpl-story·tpl-creative) 추가. 옛 번들은
vendor/retired/ 에 보관.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-17 13:02:11 +09:00

684 lines
30 KiB
Python

import html
import json
import shutil
from pathlib import Path
HERE = Path(__file__).parent
TPL = HERE / "tpl-story"
OUT = HERE / "build3"
PAYLOAD = json.loads((HERE / "stay3-payload.json").read_text())
ORIGIN = "https://web4ai.o2osolution.ai"
BASE = "/s/stay3"
place = PAYLOAD["place"]
narrative = PAYLOAD["narrative"]
units = PAYLOAD["units"]
media = PAYLOAD["media"]
facts = {f["key"]: f for f in PAYLOAD["facts"]}
faqs = PAYLOAD["faqs"]
links = PAYLOAD["links"]
local = PAYLOAD["local"]
sections = {s["id"]: (json.loads(s["data"]) if isinstance(s.get("data"), str) else None)
for s in PAYLOAD["theme"]["sections"]}
NAME = place["name"]
PHONE = place["phone"]
BOOK_URL = next((l["url"] for l in links if l.get("channel") == 7), "#")
INSTA_URL = next((l["url"] for l in links if l.get("channel") == 4), None)
ABOUT = narrative["about"]
PRICE_FROM = "198,000"
def e(text):
return html.escape(str(text or ""), quote=True)
def unit_fact(unit, key):
for f in unit["facts"]:
if f["key"] == key:
return f
return None
def unit_value(unit, key, default=""):
f = unit_fact(unit, key)
if not f:
return default
unit_text = f.get("unit") or ""
joiner = "" if unit_text in ("명", "원") else " "
return f["value"] + (joiner + unit_text if unit_text else "")
def unit_title(unit):
return unit["name"].split("(")[0].strip()
def unit_subtitle(unit):
raw = unit["name"]
return raw[raw.find("(") + 1:raw.rfind(")")].strip() if "(" in raw else ""
def pics(category=None, limit=None, skip=0):
rows = [m for m in media if category is None or m.get("category") == category]
rows = rows[skip:]
return rows[:limit] if limit else rows
def naver(query):
from urllib.parse import quote
return f"https://search.naver.com/search.naver?query={quote(query)}"
HEAD = """<!DOCTYPE HTML>
<html lang="ko">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{title}</title>
<meta name="description" content="{desc}" />
<link rel="canonical" href="{canonical}" />
<meta property="og:title" content="{title}" />
<meta property="og:description" content="{desc}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{canonical}" />
<meta property="og:image" content="{origin}{og}" />
<link rel="preconnect" href="https://cdn.jsdelivr.net" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Gowun+Batang:wght@400;700&display=swap" />
<link rel="stylesheet" href="{base}/assets/css/main.css" />
<link rel="stylesheet" href="{base}/assets/css/meomoom.css" />
<noscript><link rel="stylesheet" href="{base}/assets/css/noscript.css" /></noscript>
</head>
<body class="is-preload">
<header id="topbar">
<a class="brand" href="{base}">{name}</a>
<nav>
<a href="{base}/rooms">객실</a>
<a href="{base}/gunsan">군산</a>
<a href="tel:{phone}" aria-label="전화">전화</a>
</nav>
</header>
<div id="wrapper" class="divided">
"""
FOOT = """</div>
<div id="bookbar">
<span class="price"><b>{price_from}원</b><small>주중 1박 기준</small></span>
<a class="button primary" href="{book}" target="_blank" rel="noopener noreferrer">예약하기</a>
</div>
<script src="{base}/assets/js/jquery.min.js"></script>
<script src="{base}/assets/js/jquery.scrollex.min.js"></script>
<script src="{base}/assets/js/jquery.scrolly.min.js"></script>
<script src="{base}/assets/js/browser.min.js"></script>
<script src="{base}/assets/js/breakpoints.min.js"></script>
<script src="{base}/assets/js/util.js"></script>
<script src="{base}/assets/js/main.js"></script>
</body>
</html>
"""
FOOTER_SECTION = """
<footer class="wrapper style1 align-center" id="footer">
<div class="inner">
<h2>{name}</h2>
<p>{road}<br />{phone}</p>
<ul class="actions stacked">
<li><a href="{book}" class="button primary fit" target="_blank" rel="noopener noreferrer">네이버 예약</a></li>
<li><a href="tel:{phone}" class="button fit">전화 걸기</a></li>
{insta}
</ul>
<p class="tiny">상호 {name} · 전북 군산시 절골길 18 · 최종 업데이트 2026-09-17<br />
레이아웃은 <a href="https://html5up.net/story">Story by HTML5 UP</a>(CC BY 3.0)를 고쳐 썼습니다.<br />
AI O2O의 Web4Ai로 만든 시안입니다.</p>
</div>
</footer>
"""
def page(path, title, desc, og, body):
canonical = f"{ORIGIN}{BASE}{path}"
head = HEAD.format(title=e(title), desc=e(desc), canonical=canonical, origin=ORIGIN,
og=og, base=BASE, name=e(NAME), phone=PHONE)
foot = FOOT.format(base=BASE, book=e(BOOK_URL), price_from=PRICE_FROM)
insta = (f'<li><a href="{e(INSTA_URL)}" class="button fit" target="_blank" '
f'rel="noopener noreferrer">인스타그램</a></li>') if INSTA_URL else ""
footer = FOOTER_SECTION.format(name=e(NAME), road=e(place["roadAddress"]), phone=PHONE,
book=e(BOOK_URL), insta=insta)
target = OUT / path.lstrip("/") / "index.html" if path else OUT / "index.html"
target.parent.mkdir(parents=True, exist_ok=True)
target.write_text(head + body + footer + foot)
return target
def banner(image, kicker, heading, lead, actions, extra_class="fullscreen cover"):
action_html = f'<ul class="actions stacked">{actions}</ul>' if actions else ""
return f"""
<section class="banner style1 orient-left content-align-left image-position-right {extra_class} onload-image-fade-in onload-content-fade-right">
<div class="content">
<p class="kicker">{kicker}</p>
<h1 class="serif">{heading}</h1>
<p class="major">{lead}</p>
{action_html}
</div>
<div class="image"><img src="{image['url']}" alt="{e(image['alt'])}" /></div>
</section>
"""
def spotlight(image, heading, paragraphs, orient="right", invert=False, actions=""):
body = "".join(f"<p>{p}</p>" for p in paragraphs)
klass = "spotlight style1 orient-%s content-align-left image-position-center onscroll-image-fade-in" % orient
if invert:
klass += " invert"
return f"""
<section class="{klass}">
<div class="content">
<h2 class="serif">{heading}</h2>
{body}
{f'<ul class="actions stacked">{actions}</ul>' if actions else ''}
</div>
<div class="image"><img src="{image['url']}" alt="{e(image['alt'])}" /></div>
</section>
"""
def gallery(rows, style="style2 medium"):
cells = "".join(
f'<article><a href="{m["url"]}" class="image"><img src="{m["url"]}" '
f'alt="{e(m["alt"])}" loading="lazy" /></a>'
f'<div class="caption"><p>{e(m.get("category") or "")}</p></div></article>'
for m in rows)
return f'<div class="gallery {style} lightbox onscroll-fade-in">{cells}</div>'
def spec_index(pairs):
rows = "".join(f"<section><header><h3>{k}</h3></header><div class='content'><p>{v}</p></div></section>"
for k, v in pairs)
return f'<div class="index align-left">{rows}</div>'
def build_home():
hero = media[0]
actions = '<li><a href="#stay" class="button large smooth-scroll-middle ghost">머뭄 둘러보기</a></li>'
body = banner(hero, e(place["addressLocality"]), e(NAME),
e(narrative["tagline"]), actions)
body += f'<div id="stay"></div>'
body += spotlight(pics("외관", 1)[0] if pics("외관", 1) else media[3],
"백 년 된 집 한 채",
[e(ABOUT[0])], orient="right")
body += spotlight(pics("카페", 1)[0] if pics("카페", 1) else media[7],
"마당과 창고형 카페",
[e(ABOUT[1]), e(ABOUT[2])], orient="left")
unit_shots = [(pics("거실", 1, skip=1) or pics(limit=1))[0],
(pics("침실", 1) or pics(limit=1, skip=4))[0]]
cards = ""
for i, u in enumerate(units):
shot = unit_shots[i]
chip_values = [f"기준 {unit_value(u, 'standard_capacity')}",
f"최대 {unit_value(u, 'max_capacity')}",
unit_value(u, "bed_type"), unit_value(u, "room_size")]
chips = "".join(f"<li>{e(c)}</li>" for c in chip_values if c.strip())
cards += f"""
<article class="unit">
<a class="image" href="{BASE}/rooms#{'a' if i == 0 else 'b'}">
<img src="{shot['url']}" alt="{e(shot['alt'])}" loading="lazy" />
</a>
<div class="body">
<h3>{e(unit_title(u))}</h3>
<p class="sub">{e(unit_subtitle(u))}</p>
<ul class="chips">{chips}</ul>
<p class="price">주중 1박 <b>{e(f"{int(unit_value(u, 'weekday_price').replace('원', '').strip()):,}")}원</b></p>
<a class="button fit" href="{BASE}/rooms#{'a' if i == 0 else 'b'}">이 동 자세히 보기</a>
</div>
</article>"""
body += f"""
<section class="wrapper style1 align-center" id="rooms">
<div class="inner">
<h2 class="serif">두 동, 각각 한 팀만</h2>
<p>A동과 B동은 서로 보이지 않습니다. 한 동을 한 팀이 통째로 씁니다.</p>
<div class="units">{cards}</div>
<ul class="actions">
<li><a href="{BASE}/rooms" class="button primary">객실과 요금 전체 보기</a></li>
</ul>
</div>
</section>"""
fest = local["festivals"][0]
spots = local["attractions"][:3]
tiles = "".join(
f'<a class="tile" href="{BASE}/gunsan">'
f'<img src="{s["imageUrl"]}" alt="{e(s["name"])}" loading="lazy" />'
f'<span><b>{e(s["name"])}</b><small>도보 {e(s["distanceText"])}</small></span></a>'
for s in spots)
tiles += (f'<a class="tile" href="{BASE}/gunsan">'
f'<img src="{fest["imageUrl"]}" alt="{e(fest["name"])}" loading="lazy" />'
f'<span><b>{e(fest["name"])}</b><small>{e(fest["month"])}</small></span></a>')
body += f"""
<section class="wrapper style1 invert align-center" id="gunsan">
<div class="inner">
<h2 class="serif">군산에서 보낼 시간</h2>
<p>담을 나서면 근대 도심입니다. 걸어서 닿는 곳과 계절마다 열리는 축제,
하루를 통째로 짜 둔 일정 {len(sections['itinerary']['items'])}가지를 따로 모아 두었습니다.</p>
<div class="tiles">{tiles}</div>
<ul class="actions">
<li><a href="{BASE}/gunsan" class="button primary">군산 둘러보기</a></li>
</ul>
</div>
</section>"""
lat, lng = place["latitude"], place["longitude"]
body += f"""
<section class="wrapper style1 align-center" id="map">
<div class="inner">
<h2 class="serif">오시는 길</h2>
<p class="address">{e(place['roadAddress'])}</p>
<iframe class="mapframe" loading="lazy" title="{e(NAME)} 위치"
src="https://www.openstreetmap.org/export/embed.html?bbox={lng - 0.004}%2C{lat - 0.002}%2C{lng + 0.004}%2C{lat + 0.002}&amp;layer=mapnik&amp;marker={lat}%2C{lng}"></iframe>
<ul class="actions stacked">
<li><a class="button primary fit" href="https://map.naver.com/p/search/{e(place['roadAddress'])}"
target="_blank" rel="noopener noreferrer">길찾기</a></li>
</ul>
<p class="tiny">군산역에서 차로 약 20분 · 히로쓰 가옥 후문에서 걸어서 13m</p>
</div>
</section>"""
amen = [("체크인 / 체크아웃", f"{facts['check_in_time']['value']} / {facts['check_out_time']['value']}"),
("인원", "기준 2명 · 최대 4명 (추가 1인 20,000원)"),
("주차", "가능"), ("와이파이", "있음"), ("취사", "가능"),
("반려동물", "불가"), ("흡연", "불가"), ("바비큐", "불가"),
("픽업 서비스", "없음"), ("취소·환불", "입실 당일 취소·노쇼는 환불되지 않습니다")]
faq_rows = "".join(
f"<details><summary>{e(f['question'])}</summary><p>{e(f['answer'])}</p></details>"
for f in faqs[:5])
body += f"""
<section class="wrapper style1 align-center" id="info">
<div class="inner">
<h2 class="serif">기본 정보</h2>
{spec_index(amen)}
<h3 class="faqhead">자주 묻는 질문</h3>
<div class="faq">{faq_rows}</div>
<ul class="actions">
<li><a href="{BASE}/rooms#info" class="button">이용 안내 · 질문 전체 보기</a></li>
</ul>
</div>
</section>"""
return page("", f"{NAME} · 전북 군산시 독채 펜션",
narrative["summary"], media[0]["url"], body)
def build_rooms():
body = banner(pics("침실", 1)[0] if pics("침실", 1) else media[5],
"객실", "두 동, 각각 한 팀만",
"A동은 일본집의 결을 그대로 두었고, B동은 현대식으로 꾸몄습니다.",
f'<li><a href="{e(BOOK_URL)}" class="button primary large" target="_blank" rel="noopener noreferrer">예약하기</a></li>',
extra_class="cover compact")
for i, u in enumerate(units):
anchor = "a" if i == 0 else "b"
shot = (pics("거실", 1, skip=1) if i == 0 else pics("침실", 1))[0]
spec = [("기준 인원", unit_value(u, "standard_capacity")),
("최대 인원", unit_value(u, "max_capacity")),
("침대", unit_value(u, "bed_type")),
("면적", unit_value(u, "room_size")),
("주중 요금", f"{int(unit_value(u, 'weekday_price').replace('원', '').strip()):,}원"),
("요금 범위", unit_value(u, "price_range"))]
rows = "".join(f"<tr><th>{k}</th><td>{e(v)}</td></tr>" for k, v in spec if str(v).strip())
fac = unit_value(u, "room_facilities").split(" · ")
chips = "".join(f"<li>{e(x)}</li>" for x in fac)
body += f"""
<section class="wrapper style1 {'invert ' if i else ''}align-center" id="{anchor}">
<div class="inner">
<h2 class="serif">{e(unit_title(u))}</h2>
<p>{e(unit_subtitle(u))}</p>
<p class="lead">{e(unit_value(u, 'room_intro'))}</p>
<img class="hero-shot" src="{shot['url']}" alt="{e(shot['alt'])}" loading="lazy" />
<div class="table-wrapper"><table class="alt"><tbody>{rows}</tbody></table></div>
<ul class="chips wide">{chips}</ul>
</div>
</section>"""
body += f"""
<section class="wrapper style1 align-center" id="photos">
<div class="inner">
<h2 class="serif">사진 {len(media)}장</h2>
{gallery(media)}
</div>
</section>"""
amen = [("체크인 / 체크아웃", f"{facts['check_in_time']['value']} / {facts['check_out_time']['value']}"),
("인원 추가", "1인 20,000원"), ("주차", "가능"), ("와이파이", "있음"),
("취사", "가능"), ("반려동물", "불가"), ("흡연", "불가"), ("바비큐", "불가")]
faq_rows = "".join(
f"<details><summary>{e(f['question'])}</summary><p>{e(f['answer'])}</p></details>"
for f in faqs[:14])
body += f"""
<section class="wrapper style1 align-center" id="info">
<div class="inner">
<h2 class="serif">이용 안내</h2>
{spec_index(amen)}
<p class="lead">{e(facts['cancel_policy']['value'])}</p>
<h3 class="faqhead">자주 묻는 질문</h3>
<div class="faq">{faq_rows}</div>
</div>
</section>"""
return page("rooms", f"객실과 요금 · {NAME}",
"A동·B동 두 독채의 인원·침대·면적·요금과 사진 37장.",
media[5]["url"], body)
def build_gunsan():
fest = local["festivals"]
spots = local["attractions"]
rest = local["restaurants"][:8]
itin = sections["itinerary"]["items"]
reading = sections["reading"]["items"]
songs = sections["songs"]["items"]
body = banner(spots[0]["imageUrl"] and {"url": spots[0]["imageUrl"], "alt": spots[0]["name"]},
"군산", "담 너머의 도시",
"걸어서 닿는 근대 도심과 계절마다 열리는 축제, 하루를 통째로 짜 둔 일정.",
f'<li><a href="{BASE}" class="button large">머뭄으로 돌아가기</a></li>',
extra_class="cover compact")
def spot_cards(rows, meta_key):
return "".join(
f'<a class="tile" href="{e(naver(s["searchQuery"]))}" target="_blank" rel="noopener noreferrer nofollow">'
f'<img src="{s["imageUrl"]}" alt="{e(s["name"])}" loading="lazy" />'
f'<span><b>{e(s["name"])}</b><small>{e(s.get(meta_key) or "")}</small>'
f'<em>{e((s.get("description") or "")[:70])}</em></span></a>'
for s in rows if s.get("imageUrl"))
body += f"""
<section class="wrapper style1 align-center" id="around">
<div class="inner">
<h2 class="serif">걸어서 닿는 곳</h2>
<p>도보 시간은 직선거리를 분속 80m로 환산한 값입니다.</p>
<div class="tiles wide">{spot_cards(spots, 'distanceText')}</div>
</div>
</section>
<section class="wrapper style1 invert align-center" id="eat">
<div class="inner">
<h2 class="serif">근처에서 먹을 곳</h2>
<div class="tiles wide">{spot_cards(rest, 'distanceText')}</div>
</div>
</section>
<section class="wrapper style1 align-center" id="festival">
<div class="inner">
<h2 class="serif">계절마다 열리는 것</h2>
<p>한국관광공사 TourAPI 기준. 일정은 주최 측 사정으로 바뀔 수 있습니다.</p>
<div class="tiles wide">{spot_cards(fest, 'period')}</div>
</div>
</section>"""
plans = "".join(
f"<details><summary><b>{e(i['name'])}</b><span>{e(i['duration'])} · {e(i['audience'])}</span></summary>"
f"<p class='why'>{e(i['why'])}</p>"
+ "".join(
f"<div class='day'><h4>{e(d['label'])} <small>{e(d['startTime'])} 출발</small></h4><ol>"
+ "".join(f"<li><b>{e(s['name'])}</b>{('<span>' + e(s['note']) + '</span>') if s.get('note') else ''}</li>"
for s in d["stops"])
+ "</ol></div>" for d in i["days"])
+ "</details>" for i in itin)
body += f"""
<section class="wrapper style1 invert align-center" id="itinerary">
<div class="inner">
<h2 class="serif">하루를 통째로</h2>
<p>머뭄에서 나서고 머뭄으로 돌아옵니다 — {len(itin)}가지</p>
<div class="faq plans">{plans}</div>
</div>
</section>"""
reads = "".join(
f"<article class='read'><h3>{e(r['title'])}</h3><p>{e(r['body'])}</p>"
f"<a href=\"{e(r['source']['url'])}\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">{e(r['source']['name'])}</a></article>"
for r in reading)
body += f"""
<section class="wrapper style1 align-center" id="reading">
<div class="inner">
<h2 class="serif">이 도시를 쓴 사람과 그 자리</h2>
<div class="reads">{reads}</div>
</div>
</section>"""
def song_row(s):
return (f"<li><a href=\"{e(s['listenUrl'])}\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">"
f"<b>{e(s['title'])}</b><span>{e(s['artist'])}</span><em>{e(s['story'])}</em></a></li>")
head_rows = "".join(song_row(s) for s in songs[:8])
rest_rows = "".join(song_row(s) for s in songs[8:])
body += f"""
<section class="wrapper style1 invert align-center" id="songs">
<div class="inner">
<h2 class="serif">군산을 노래한 {len(songs)}곡</h2>
<ol class="songs">{head_rows}</ol>
<details class="more"><summary>나머지 {len(songs) - 8}곡 보기</summary>
<ol class="songs">{rest_rows}</ol>
</details>
</div>
</section>"""
return page("gunsan", f"군산 둘러보기 · {NAME}",
"걸어서 닿는 근대 도심, 계절 축제, 추천 일정 21가지, 군산을 쓴 글과 노래.",
spots[0]["imageUrl"], body)
OVERRIDE = """
:root { --ink: #16181a; --accent: #1f4a3f; --muted: #6a7178; }
body, input, select, textarea, button {
font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
"Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
font-size: 16px;
line-height: 1.7;
word-break: keep-all;
color: var(--ink);
}
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.serif { font-family: "Gowun Batang", serif; font-weight: 700; letter-spacing: -0.01em; }
p { font-size: 16px; }
.kicker { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; margin-bottom: .4rem; }
#footer .inner { padding-top: 3rem; padding-bottom: 3rem; }
#footer h2 { font-size: 20px; }
.tiny { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.lead { max-width: 40rem; margin-left: auto; margin-right: auto; }
input[type="submit"].primary, input[type="reset"].primary, input[type="button"].primary,
button.primary, .button.primary { background-color: var(--accent); }
input[type="submit"].primary:hover, button.primary:hover, .button.primary:hover { background-color: #2a6455; }
a { color: var(--accent); }
#topbar {
position: fixed; top: 0; left: 0; right: 0; height: 48px; z-index: 30;
display: flex; align-items: center; justify-content: space-between;
padding: 0 16px; background: rgba(255,255,255,.88); backdrop-filter: blur(12px);
border-bottom: 1px solid rgba(0,0,0,.07);
}
#topbar .brand { font-weight: 700; font-size: 15px; text-decoration: none; color: var(--ink); letter-spacing: -.01em; }
#topbar nav { display: flex; gap: 4px; }
#topbar nav a {
display: flex; align-items: center; min-height: 44px; padding: 0 10px;
font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink);
}
#wrapper { padding-top: 48px; }
#bookbar {
position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
display: flex; align-items: center; gap: 12px;
padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
border-top: 1px solid rgba(0,0,0,.09);
}
#bookbar .price { display: flex; flex-direction: column; line-height: 1.25; }
#bookbar .price b { font-size: 18px; font-weight: 700; }
#bookbar .price small { font-size: 12px; color: var(--muted); }
#bookbar .button.primary { margin-left: auto; min-width: 9.5rem; min-height: 48px; line-height: 48px; }
body { padding-bottom: 76px; }
.banner.style1 .content > .kicker, .banner.style1 .content > .major { color: inherit; }
.banner.style1 h1 { font-size: 2.6rem; line-height: 1.2; }
.banner.style1 .content { padding: 3rem 1.5rem; }
.units { display: grid; gap: 20px; margin: 2rem 0 1rem; text-align: left; }
.unit { border: 1px solid rgba(0,0,0,.1); border-radius: 12px; overflow: hidden; background: #fff; }
.unit .image { display: block; aspect-ratio: 4/3; }
.unit .image img { width: 100%; height: 100%; object-fit: cover; }
.unit .body { padding: 18px; }
.unit h3 { font-size: 20px; margin: 0 0 2px; }
.unit .sub { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.unit .price { margin: 12px 0; font-size: 15px; }
.unit .price b { font-size: 19px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li {
padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.05);
font-size: 13px; font-weight: 500; line-height: 1.4;
}
.chips.wide { justify-content: center; margin-top: 1rem; }
.invert .chips li { background: rgba(255,255,255,.14); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 1.75rem 0 1rem; text-align: left; }
.tiles.wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile { display: block; border-radius: 12px; overflow: hidden; text-decoration: none; background: rgba(0,0,0,.04); color: inherit; }
.invert .tile { background: rgba(255,255,255,.08); }
.tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.tile span { display: block; padding: 10px 12px 13px; }
.tile b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.tile small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.invert .tile small { color: rgba(255,255,255,.7); }
.tile em { display: block; font-style: normal; font-size: 12.5px; line-height: 1.55; margin-top: 5px; opacity: .8; }
.mapframe { width: 100%; height: 300px; border: 0; border-radius: 12px; margin: 1.5rem 0 1rem; }
.address { font-size: 18px; font-weight: 600; }
.index.align-left { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; max-width: 44rem; margin-inline: auto; }
.index.align-left section { padding: 9px 0; border-bottom: 1px solid rgba(0,0,0,.07); }
.invert .index.align-left section { border-bottom-color: rgba(255,255,255,.16); }
.index.align-left header { margin: 0; padding: 0; }
.index.align-left h3 { font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 0; }
.invert .index.align-left h3 { color: rgba(255,255,255,.7); }
.index.align-left .content { padding: 0; }
.index.align-left .content p { font-size: 15px; margin: 0; line-height: 1.5; }
.faqhead { margin-top: 2.5rem; font-size: 18px; }
.faq { text-align: left; max-width: 44rem; margin: 0 auto; }
.faq details { border-bottom: 1px solid rgba(0,0,0,.1); }
.invert .faq details { border-bottom-color: rgba(255,255,255,.18); }
.faq summary {
cursor: pointer; list-style: none; padding: 15px 28px 15px 0; position: relative;
font-size: 15.5px; font-weight: 600; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 13px; font-size: 20px; font-weight: 400; opacity: .55; }
.faq details[open] summary::after { content: "\\2212"; }
.faq details p { padding: 0 0 15px; margin: 0; font-size: 15px; }
.faq .plans summary span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.invert .faq .plans summary span { color: rgba(255,255,255,.7); }
.plans .why { font-size: 15px; padding-bottom: 8px; }
.plans .day { padding: 4px 0 14px; }
.plans .day h4 { font-size: 14px; margin: 0 0 6px; }
.plans .day h4 small { font-weight: 400; color: var(--muted); }
.plans .day ol { margin: 0; padding-left: 1.2rem; }
.plans .day li { padding: 4px 0; font-size: 14.5px; }
.plans .day li b { font-weight: 600; }
.plans .day li span { display: block; font-size: 13.5px; opacity: .78; line-height: 1.6; }
.reads { display: grid; gap: 18px; text-align: left; max-width: 44rem; margin: 1.5rem auto 0; }
.read { border-left: 2px solid var(--accent); padding-left: 16px; }
.read h3 { font-size: 17px; margin: 0 0 6px; }
.read p { font-size: 15px; margin: 0 0 8px; }
.read a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13.5px; font-weight: 600; }
.songs { list-style: none; margin: 1.5rem 0 0; padding: 0; text-align: left; max-width: 44rem; margin-inline: auto; }
.songs li { border-top: 1px solid rgba(255,255,255,.16); }
.songs li:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
.songs a { display: block; padding: 14px 0; text-decoration: none; color: inherit; min-height: 44px; }
.songs b { font-size: 16px; font-weight: 600; }
.songs span { font-size: 13.5px; opacity: .72; margin-left: 8px; }
.songs em { display: block; font-style: normal; font-size: 13.5px; opacity: .78; margin-top: 3px; line-height: 1.6; }
.hero-shot { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; margin: 1.25rem 0; }
.table-wrapper table.alt th { width: 8rem; font-size: 14px; color: var(--muted); }
.table-wrapper table.alt td { font-size: 15px; }
.banner.style1.cover { position: relative; display: block; padding: 0; }
.banner.style1.cover .image {
position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; max-width: none;
}
.banner.style1.cover .image img { width: 100%; height: 100%; object-fit: cover; }
.banner.style1.cover .content {
position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
min-height: 88svh; padding: 2rem 1.5rem 3rem; text-align: left; max-width: none;
background: linear-gradient(to top, rgba(12,14,13,.86) 0%, rgba(12,14,13,.62) 32%, rgba(12,14,13,.22) 58%, rgba(12,14,13,0) 82%);
}
.banner.style1.cover.compact .content { min-height: 56svh; }
.banner.style1.cover .content,
.banner.style1.cover .content h1,
.banner.style1.cover .content p { color: #fff; }
.banner.style1.cover .content .kicker { opacity: .92; }
.banner.style1.cover .content .major { font-size: 17px; max-width: 26rem; }
.banner.style1.cover .actions { margin-top: 1.25rem; }
.button, .button.large, input[type="submit"], button {
letter-spacing: 0; font-weight: 600; min-height: 48px; line-height: 48px;
}
.button.large { min-height: 52px; line-height: 52px; font-size: 16px; }
.button.ghost { background: rgba(255,255,255,.14); color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
.button.ghost:hover { background: rgba(255,255,255,.24); }
.tile em {
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tiles.wide { align-items: stretch; }
.tiles.wide .tile { display: flex; flex-direction: column; }
#topbar .brand { display: flex; align-items: center; min-height: 44px; }
.more { margin-top: 1.25rem; }
.more > summary {
cursor: pointer; list-style: none; display: inline-flex; align-items: center; justify-content: center;
min-height: 48px; padding: 0 1.5rem; border-radius: 999px; font-size: 15px; font-weight: 600;
box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.more > summary::-webkit-details-marker { display: none; }
@media (min-width: 737px) {
.units { grid-template-columns: repeat(2, 1fr); }
.tiles { grid-template-columns: repeat(4, 1fr); }
.banner.style1 h1 { font-size: 3.4rem; }
.banner.style1.cover .content {
min-height: 82svh; padding: 3rem 4rem 4rem; width: 100%; max-width: none; flex-basis: auto;
}
.banner.style1.cover .content > * { max-width: 34rem; }
.banner.style1.cover.compact .content { min-height: 46svh; }
#topbar { height: 56px; padding: 0 28px; }
#wrapper { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
* { animation: none !important; transition: none !important; }
}
"""
def main():
if OUT.exists():
shutil.rmtree(OUT)
OUT.mkdir(parents=True)
shutil.copytree(TPL / "assets", OUT / "assets")
(OUT / "assets" / "js" / "demo.js").unlink(missing_ok=True)
(OUT / "assets" / "css" / "meomoom.css").write_text(OVERRIDE)
shutil.copy(TPL / "LICENSE.txt", OUT / "assets" / "LICENSE-story.txt")
made = [build_home(), build_rooms(), build_gunsan()]
for path in made:
print(path.relative_to(OUT), f"{path.stat().st_size:,} bytes")
if __name__ == "__main__":
main()