/* InviteOS Host Portal — layers over admin.css (Ink & Foil) */

.ios-portal-body { background: var(--parchment); }
#ios-portal { min-height: 100vh; }

/* auth gate */
.po-auth {
	min-height: 100vh;
	display: flex; align-items: center; justify-content: center;
	padding: 30px 18px;
	background:
		radial-gradient(ellipse at 12% 8%, rgba(216, 167, 160, 0.3), transparent 50%),
		radial-gradient(ellipse at 88% 92%, rgba(185, 138, 60, 0.22), transparent 50%),
		var(--parchment);
}
.po-auth-card {
	width: 440px; max-width: 100%;
	background: var(--paper);
	border-radius: 18px;
	border-top: 3px solid var(--foil);
	box-shadow: 0 30px 80px rgba(20, 17, 23, 0.18);
	padding: 34px 32px;
}
.po-auth-card .word { font-family: var(--font-display); font-size: 30px; font-weight: 600; text-align: center; }
.po-auth-card .word em { font-style: italic; color: var(--foil); }
.po-auth-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 22px; }
.po-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.po-tab {
	flex: 1; padding: 10px; border-radius: 10px; font-weight: 600; font-size: 13px;
	border: 1px solid var(--line); background: var(--paper); color: var(--muted);
}
.po-tab.on { background: var(--ink); border-color: var(--ink); color: var(--parchment); }
.po-hp { position: absolute; left: -5000px; }

/* portal shell */
.po-top {
	background: var(--ink);
	color: var(--parchment);
	padding: 16px 26px;
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	flex-wrap: wrap;
}
.po-top .word { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.po-top .word em { font-style: italic; color: var(--foil-soft); }
.po-top .who { font-size: 12.5px; color: #b6ada2; }
.po-top .who b { color: var(--parchment); }
.po-wrap { max-width: 1150px; margin: 0 auto; padding: 30px 22px 80px; }

.po-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 24px; }
.po-nav button {
	padding: 10px 16px; border-radius: 99px; font-size: 13px; font-weight: 600;
	border: 1px solid var(--line); background: var(--paper); color: var(--muted);
}
.po-nav button.on { background: var(--foil); border-color: var(--foil); color: #fff8ec; }
.po-nav button:disabled { opacity: 0.45; }

/* activation banner */
.po-activate {
	background: linear-gradient(100deg, var(--ink), var(--ink-3));
	color: var(--parchment);
	border-radius: var(--radius);
	padding: 20px 24px;
	display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
	margin-bottom: 22px;
	border-left: 4px solid var(--foil);
}
.po-activate h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.po-activate p { color: #b6ada2; font-size: 13px; margin-top: 4px; max-width: 560px; line-height: 1.6; }
.po-activate .btn.gold { flex-shrink: 0; margin-left: auto; }

/* plan cards */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 26px 24px;
	text-align: center;
	position: relative;
	transition: box-shadow 0.15s, transform 0.15s;
}
.plan-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.plan-card.pick { border-color: var(--foil); box-shadow: 0 0 0 2px rgba(185, 138, 60, 0.3); }
.plan-card .pn { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--foil); font-weight: 700; }
.plan-card .pp { font-family: var(--font-display); font-size: 44px; font-weight: 600; color: var(--ink); margin: 10px 0 2px; }
.plan-card .pg { color: var(--muted); font-size: 13px; }
.plan-card .pb { font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--muted); margin-top: 10px; }
.plan-card ul { list-style: none; margin: 16px 0 18px; font-size: 12.5px; color: var(--text); line-height: 2.1; }
.plan-card .ribbon {
	position: absolute; top: 14px; right: -8px;
	background: var(--foil); color: #fff8ec;
	font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700;
	padding: 5px 12px; border-radius: 4px 0 0 4px;
}

/* details editor */
.po-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .po-two { grid-template-columns: 1fr; } }
.rep-row { display: grid; grid-template-columns: 110px 1fr 36px; gap: 8px; margin-bottom: 8px; }
.rep-row input { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: var(--paper); }
.rep-x { border: 1px solid var(--line); background: var(--paper); border-radius: 9px; color: var(--danger); font-weight: 700; }

.share-box {
	background: #fbf4e6; border: 1px solid #e8d3ab; border-radius: var(--radius);
	padding: 18px 20px; margin-bottom: 20px;
}
.share-box .code { word-break: break-all; }

.po-cap { font-size: 12.5px; color: var(--muted); }
.po-cap b { color: var(--foil); }

/* share hero — the invite link is the product */
.share-hero {
	background: linear-gradient(115deg, var(--ink), #2b2433 60%, #3a2f26);
	color: var(--parchment);
	border-radius: var(--radius);
	padding: 26px 28px;
	margin-bottom: 22px;
	border-left: 4px solid var(--foil);
}
.share-hero .sh-k {
	font-size: 10.5px; letter-spacing: 3px; text-transform: uppercase;
	color: var(--foil-soft); font-weight: 700;
}
.share-hero .sh-link {
	font-family: ui-monospace, Menlo, monospace;
	font-size: 15px; word-break: break-all;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(217, 181, 113, 0.3);
	border-radius: 10px;
	padding: 13px 15px;
	margin: 10px 0 12px;
	color: #fff;
}
.share-hero .sh-note { color: #b6ada2; font-size: 13px; line-height: 1.65; max-width: 620px; }
.share-hero .sh-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }

.cust-row td { cursor: default; }
.cust-detail table.tbl th { background: #f2ecdf; }

/* hero uploader + accent picker */
.hero-drop {
	border: 1.5px dashed var(--line);
	border-radius: 12px;
	background: var(--parchment);
	overflow: hidden;
	min-height: 150px;
	display: flex; align-items: center; justify-content: center;
}
.hero-drop img { width: 100%; height: 190px; object-fit: cover; display: block; }
.hero-empty { text-align: center; padding: 30px 20px; }
.hero-empty b { display: block; font-family: var(--font-display); font-size: 19px; color: var(--ink); }
.hero-empty span { font-size: 12.5px; color: var(--muted); }

.accent-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatch {
	width: 30px; height: 30px; border-radius: 8px;
	border: 2px solid transparent;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
	cursor: pointer;
}
.swatch.on { border-color: var(--ink); transform: scale(1.08); }
.swatch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.accent-row input[type="color"] {
	width: 44px; height: 30px; padding: 0;
	border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer;
}

.tpl-group {
	font-size: 10.5px; letter-spacing: 2.4px; text-transform: uppercase;
	color: var(--muted); font-weight: 700;
	margin: 14px 0 2px;
}
.tpl-group:first-child { margin-top: 0; }

/* page-style picker */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 980px) { .theme-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .theme-grid { grid-template-columns: 1fr; } }
.theme-card {
	background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
	padding: 14px; text-align: left; position: relative;
	transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.theme-card.on { border-color: var(--foil); box-shadow: 0 0 0 2px rgba(185, 138, 60, 0.28); }
.theme-card b { display: block; font-size: 14.5px; margin-top: 12px; }
.theme-card > span:not(.tprev):not(.theme-on) { font-size: 12px; color: var(--muted); line-height: 1.5; }
.theme-on {
	position: absolute; top: 12px; right: 12px;
	background: var(--foil); color: #fff8ec;
	font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 700;
	padding: 4px 9px; border-radius: 99px;
}

/* live theme miniatures — real markup + real theme CSS, scaled down */
.tprev {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.09);
	background: inherit;
}
.tprev-inner {
	display: block;
	position: absolute;
	top: 0; left: 0;
	width: 520px;
	transform: scale(0.42);
	transform-origin: top left;
	padding: 16px;
}
.tprev .rs-card {
	display: flex;
	flex-direction: column;
	padding: 26px 24px 22px;
	text-align: center;
	overflow: hidden;
	box-shadow: none;
}
.tprev .rs-head { display: block; }
.tprev .rs-monogram { width: 46px; height: 46px; font-size: 16px; margin: 0 auto 8px; }
.tprev .rs-card.with-hero { padding-top: 0; }
.tprev .rs-hero-in {
	display: block; position: relative;
	margin: 0 -24px 18px;
	aspect-ratio: 16 / 11;
	overflow: hidden;
}
.tprev .rs-hero-in img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tprev .rs-hero-veil {
	display: block; position: absolute; inset: 0;
	background: linear-gradient(to bottom, rgba(20,17,23,0) 40%, rgba(20,17,23,0.72) 100%);
}
.tprev .rs-hero-cap {
	display: flex; flex-direction: column; gap: 5px;
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 16px 18px 14px; text-align: left; color: #fff;
}
.tprev .rs-hero-eyebrow { display: block; font-size: 8px; letter-spacing: 2.4px; text-transform: uppercase; }
.tprev .rs-hero-title { display: block; font-family: var(--font-display); font-size: 27px; font-weight: 600; line-height: 1.05; }
.tprev .rs-eyebrow { display: block; font-size: 8px; letter-spacing: 2.6px; text-transform: uppercase; }
.tprev .rs-title { display: block; font-size: 30px; line-height: 1.06; margin: 8px 0 0; }
.tprev .rs-rule { display: block; width: 54px; height: 1px; margin: 12px auto; }
.tprev .rs-details { display: block; font-size: 8.5px; letter-spacing: 1.8px; line-height: 1.9; }
.tprev .rs-count4 { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.tprev .rs-count4 > span { display: block; min-width: 42px; padding: 7px 4px; border-radius: 7px; text-align: center; }
.tprev .rs-count4 b { display: block; font-family: var(--font-display); font-size: 16px; line-height: 1; }
.tprev .rs-count4 span span { font-size: 6px; letter-spacing: 1px; text-transform: uppercase; }
.tprev .rs-form-panel { display: block; margin-top: 16px; }
.tprev .rs-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 0 0 9px; }
.tprev .rs-choice span {
	display: block; padding: 9px 4px; border-radius: 8px;
	font-size: 9px; font-weight: 600; text-align: center;
	border: 1.2px solid var(--line-light, #e5dccb);
}
.tprev-field {
	display: block; height: 22px; border-radius: 6px; margin-bottom: 7px;
	border: 1.2px solid var(--line-light, #e5dccb);
}
.tprev .rs-send {
	display: block; padding: 11px 4px; border-radius: 9px;
	font-size: 9.5px; font-weight: 700; text-align: center; color: #fff8ec;
}
/* Love's dark form panel, mirrored in the miniature */
.tprev.theme-love .rs-form-panel { background: #2b211c; margin: 16px -24px -22px; padding: 16px 24px 18px; }
.tprev.theme-love .tprev-field { background: #3a2e27; border-color: #55443a; }
.tprev.theme-love .rs-choice span { background: #3a2e27; border-color: #55443a; color: #e6dccd; }
.tprev.theme-love .rs-choice .yes.on { background: #f7f2e8; color: #2b211c; }
.tprev.theme-love .rs-send { background: #f7f2e8; color: #2b211c; }

.theme-card { overflow: hidden; }

/* the miniature inherits every theme's ordering rules, so each tile
   genuinely shows that style's information architecture */
.tprev .rs-hero-in { flex-shrink: 0; }
.tprev .rs-details { display: block; }
.tprev.theme-love .rs-details { border-top: 1px solid #d8cab4; border-bottom: 1px solid #d8cab4; padding: 7px 0; margin: 6px auto 0; }
.tprev.theme-velure .rs-card.with-hero > .rs-hero-in { aspect-ratio: 4 / 3.4; }
.tprev.theme-romance .rs-card { text-align: left; }
.tprev.theme-romance .rs-rule { margin-left: 0; }
.tprev .rs-count4 > span > span { display: block; }

/* page-mode chooser */
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .mode-pick { grid-template-columns: 1fr; } }
.mode-card {
	position: relative; text-align: left;
	background: var(--paper); border: 1px solid var(--line);
	border-radius: 14px; padding: 18px;
	transition: transform .15s, box-shadow .15s, border-color .15s;
}
.mode-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mode-card.on { border-color: var(--foil); box-shadow: 0 0 0 2px rgba(185,138,60,.28); }
.mode-card b { display: block; font-size: 15px; margin: 14px 0 5px; }
.mode-card > span:not(.mode-art):not(.theme-on) { font-size: 12.5px; color: var(--muted); line-height: 1.6; display: block; }
.mode-art {
	display: flex; gap: 8px; align-items: stretch;
	background: var(--parchment); border-radius: 10px; padding: 12px; height: 110px;
}
.ma-page, .ma-step {
	flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 6px;
	padding: 7px; display: flex; flex-direction: column; gap: 5px;
}
.ma-photo { display: block; height: 30px; border-radius: 3px; background: linear-gradient(135deg, #cfc5b4, #8d8271); }
.ma-photo.sm { height: 26px; }
.ma-l { display: block; height: 4px; border-radius: 99px; background: #e3dbcc; }
.ma-l.s { width: 58%; }
.ma-btn { display: block; height: 9px; border-radius: 99px; background: var(--foil); margin-top: auto; }
.ma-tick {
	display: flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; border-radius: 99px;
	background: #e2ecdf; color: #3f6b3c; font-size: 12px; font-weight: 700; margin: 0 auto;
}

/* section manager */
.sec-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.sec-row { display: grid; grid-template-columns: 46px 1fr 150px; gap: 10px; align-items: center; }
@media (max-width: 620px) { .sec-row { grid-template-columns: 46px 1fr; } .sec-hint { display: none; } }
.sec-title {
	border: 1px solid var(--line); border-radius: 9px;
	padding: 9px 12px; background: var(--paper); font-size: 13.5px;
}
.sec-hint { font-size: 11.5px; color: var(--muted); }
.sec-tog { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.sec-tog input { position: absolute; opacity: 0; width: 0; height: 0; }
.sec-tog span {
	position: absolute; inset: 0; border-radius: 99px;
	background: #ded3c0; transition: background .18s;
}
.sec-tog span::after {
	content: ""; position: absolute; top: 3px; left: 3px;
	width: 18px; height: 18px; border-radius: 99px; background: #fff;
	transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.sec-tog input:checked + span { background: var(--foil); }
.sec-tog input:checked + span::after { transform: translateX(18px); }
.sec-tog input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.col-pick { display: flex; gap: 6px; align-items: center; }
.col-pick input[type="color"] {
	width: 100%; height: 34px; padding: 0;
	border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer;
}
.col-pick input[data-empty] { opacity: .4; }
