html.app-mode #scene { display: none; }
html.app-mode, html.app-mode body { background: var(--bg); }
.login-hint { font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.login-tools-r .lang-list { inset-inline-end: 0; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.p-app { position: relative; z-index: 1; --side: 256px; min-height: 100vh; background: var(--bg); }
.p-nav { position: fixed; top: 0; inset-inline-start: 0; bottom: 0; width: var(--side); background: var(--card); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 0 18px; z-index: 30; transition: transform var(--t-base) var(--ease); }
.p-nav-brand { display: block; padding: 0 22px 24px; text-decoration: none; }
.p-nav-brand .wys-original { height: 40px; }
.p-nav-links { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; overflow: auto; flex: 1; }
.p-nav-links a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; text-decoration: none; transition: background-color var(--t-fast), color var(--t-fast); }
.p-nav-links a:hover { background: var(--panel-2); color: var(--ink); }
.p-nav-links a[aria-current="page"] { background: var(--panel-2); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
html[dir="rtl"] .p-nav-links a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--accent); }
.p-count { margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.p-count:empty { display: none; }
.p-nav-kf { display: flex; flex-direction: column; gap: 8px; padding: 18px 22px; border-top: 1px solid var(--line); }
.p-nav-kf .mono { font-size: 10px; }
.p-nav-kf .kf-lockup { height: 24px; }
.p-nav-foot { padding: 16px 22px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.p-me { display: flex; gap: 10px; align-items: center; min-width: 0; }
.p-me > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.p-me b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-me small { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
html[dir="rtl"] .p-me small { letter-spacing: 0; text-transform: none; font-family: var(--arabic); font-size: 12px; }
.p-av { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.p-links { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.p-langs { display: inline-flex; gap: 10px; }
.p-langs a { font-size: 12.5px; color: var(--muted); text-decoration: none; }
.p-langs a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.p-menu { display: none; position: fixed; top: 12px; inset-inline-start: 12px; z-index: 40; background: var(--card); }
.p-main { margin-inline-start: var(--side); min-height: 100vh; padding: 28px clamp(18px, 3vw, 40px) 60px; max-width: calc(var(--side) + 1240px); }
@media (max-width: 980px) {
  .p-nav { transform: translateX(-100%); }
  html[dir="rtl"] .p-nav { transform: translateX(100%); }
  .p-nav.open { transform: none; box-shadow: 30px 0 80px -40px rgba(0,0,0,.4); }
  html[dir="rtl"] .p-nav.open { transform: none; }
  .p-menu { display: inline-flex; }
  .p-main { margin-inline-start: 0; padding-top: 70px; }
}

.p-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.p-head h1 { font-size: clamp(30px, 3.4vw, 46px); margin-bottom: 6px; }
.p-head p { color: var(--ink-soft); max-width: 62ch; }
.p-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.p-card { background: var(--card); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.p-card h2 { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
html[dir="rtl"] .p-card h2 { font-family: var(--arabic); letter-spacing: 0; text-transform: none; font-size: 13px; }
.p-big { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2rem; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
html[dir="rtl"] .p-big { font-family: var(--arabic); letter-spacing: 0; }
.p-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .1em; direction: ltr; unicode-bidi: isolate; }
.p-hero { grid-column: 1 / -1; position: relative; overflow: hidden; background: var(--night); color: var(--night-ink); padding: clamp(26px, 3vw, 40px); border-radius: 0; }
.p-hero::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 22px solid var(--accent); inset-inline-end: -150px; top: -190px; opacity: .85; }
.p-hero h1 { position: relative; z-index: 1; font-size: clamp(34px, 3.8vw, 52px); line-height: 1.02; }
.p-hero p { position: relative; z-index: 1; margin-top: 12px; color: color-mix(in srgb, var(--night-ink) 82%, transparent); max-width: 56ch; }
.p-hero .hero-cta { position: relative; z-index: 1; margin-top: 22px; }
.p-hero .btn-white { background: var(--night-ink); color: var(--night); }
.p-hero .btn-line-white { background: transparent; color: var(--night-ink); border-color: rgba(255,255,255,.35); }
.p-next { display: grid; gap: 4px; margin-top: 8px; }
.p-next b { font-size: 18px; font-weight: 600; }
.p-next span { color: var(--muted); font-size: 14px; }
.caption { font-size: 13px; color: var(--muted); }

.p-tabs { position: relative; display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--panel-2); margin-bottom: 18px; flex-wrap: wrap; }
.p-tabs button { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-soft); cursor: pointer; }
.p-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 6px 16px -10px rgba(0,0,0,.4); }
.p-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.p-item { display: grid; grid-template-columns: 76px 3px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.p-item::before { content: ""; grid-column: 2; grid-row: 1; align-self: stretch; background: var(--line-strong); border-radius: 2px; }
.p-item.assigned::before { background: var(--accent); }
.p-time { grid-column: 1; grid-row: 1; font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.p-time small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.p-item > div:nth-child(2) { grid-column: 3; grid-row: 1; }
.p-item > div:nth-child(3) { grid-column: 4; grid-row: 1; }
.p-item h3 { font-size: 18px; line-height: 1.3; }
.p-item p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.p-item .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); white-space: nowrap; }
html[dir="rtl"] .badge { font-family: var(--arabic); letter-spacing: 0; text-transform: none; font-size: 12px; }
.badge .ico { width: 13px; height: 13px; }
.badge-ok { border-color: #23A26D; color: #1D8A5C; }
.badge-invite { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.badge-grey { color: var(--muted); }
.lock-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.lock-note .ico { width: 14px; height: 14px; }
.save-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.save-btn:hover { border-color: var(--ink); }
.save-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.save-btn .ico { width: 15px; height: 15px; }
.empty { padding: 32px 0; color: var(--muted); }
.p-sec { margin-top: 44px; }
.p-sec > h2 { font-size: 26px; margin-bottom: 6px; }
.p-sec > p { color: var(--ink-soft); margin-bottom: 14px; }
.p-msg { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: grid; gap: 8px; margin-bottom: 12px; }
.p-msg header { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.p-msg h3 { font-size: 17px; }
.p-msg time { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.p-msg pre { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 15px; color: var(--ink-soft); line-height: 1.6; }
.p-list .p-msg:first-child { margin-top: 14px; }
.p-badge-wrap { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }
.p-badge { position: relative; overflow: hidden; border-radius: 20px; background: var(--night); color: var(--night-ink); padding: 24px; aspect-ratio: 54 / 86; display: flex; flex-direction: column; }
.p-badge::after { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; border: 18px solid var(--accent); inset-inline-end: -170px; top: -150px; opacity: .85; }
.p-badge .frost { display: none; }
.p-badge-logo { position: relative; z-index: 1; height: 40px; width: auto; align-self: flex-start; }
.p-badge-body { position: relative; z-index: 1; margin-top: auto; display: grid; gap: 6px; }
.p-badge-body .cat { display: inline-flex; align-self: flex-start; padding: 5px 10px; border-radius: 4px; border: 1px solid rgba(255,255,255,.35); font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
html[dir="rtl"] .p-badge-body .cat { font-family: var(--arabic); letter-spacing: 0; text-transform: none; font-size: 12px; }
.p-badge-body b { font-family: var(--font-display); font-size: 28px; font-weight: var(--display-weight); letter-spacing: -.02em; line-height: 1.1; }
.p-badge-body small { color: var(--night-muted); font-size: 13.5px; }
.p-qr { margin-top: 16px; display: flex; align-items: center; gap: 14px; background: #fff; color: #08243C; border-radius: 12px; padding: 12px; }
.p-qr svg { width: 100px; height: 100px; flex: none; }
.p-qr .p-code { font-size: 20px; font-weight: 600; }
.p-qr span { font-size: 12px; color: #56616D; display: block; }
.p-dl { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0; }
.p-dl dt, .p-dl dd { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.p-dl dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
html[dir="rtl"] .p-dl dt { font-family: var(--arabic); letter-spacing: 0; text-transform: none; font-size: 13px; }
.p-dl dd { font-weight: 500; }
.p-dl dt:last-of-type, .p-dl dd:last-of-type { border-bottom: 0; }
.p-ok { display: inline-flex; align-items: center; gap: 8px; color: #1D8A5C; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .25s, transform .25s; z-index: 300; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1000px) { .p-grid { grid-template-columns: 1fr 1fr; } .p-badge-wrap { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .p-grid { grid-template-columns: 1fr; } .p-item { grid-template-columns: 64px 3px minmax(0, 1fr); } .p-item > div:nth-child(3) { grid-column: 3; grid-row: 2; } .p-dl { grid-template-columns: 1fr; } .p-dl dt { border-bottom: 0; padding-bottom: 2px; } }
@media print { .p-nav, .p-menu, .p-head .btn, .p-badge-side { display: none !important; } .p-main { margin: 0; } .p-badge { width: 54mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.portal .p-head .btn-ghost .ico { width: 16px; height: 16px; }
.badge-wait { border-color: #D9A21B; color: #9A6B00; }
.badge-wait .ico { width: 13px; height: 13px; }
.p-item.declined { opacity: .62; }
.p-item .save-btn { width: auto; height: auto; min-height: 36px; display: inline-flex; place-items: initial; border-radius: 999px; }
.p-item > div:nth-child(3) { justify-self: end; align-self: center; display: flex; justify-content: flex-end; }
.p-item > div:nth-child(3) .badge { min-height: 30px; }
.p-badge::after { display: none; }
.p-badge-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.p-badge-top .p-badge-logo { height: 38px; }
.p-badge-kf { color: #FFFFFF; display: block; padding-inline-start: 16px; border-inline-start: 1px solid rgba(255,255,255,.22); }
.p-badge-kf svg { display: block; height: 28px; width: auto; }
.p-badge-body b { font-size: clamp(34px, 3.4vw, 40px); line-height: 1.05; }
.p-badge-body small { font-size: 14.5px; }
.chat-app { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.chat-side { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.chat-side-head { padding: 14px 16px 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
html[dir="rtl"] .chat-side-head { font-family: var(--arabic); letter-spacing: 0; font-size: 12.5px; }
.chat-thread { width: 100%; display: flex; gap: 11px; align-items: center; padding: 12px 14px; color: var(--ink); border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; text-align: start; font: inherit; transition: background-color var(--t-fast); }
.chat-thread:hover { background: var(--panel-2); }
.chat-thread.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
html[dir="rtl"] .chat-thread.active { box-shadow: inset -3px 0 0 var(--accent); }
.chat-thread-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chat-thread-text strong { font-size: 14px; display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.chat-thread-text strong time { font-size: 11px; font-weight: 400; color: var(--muted); }
.chat-thread-text small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.chat-app .chat-main { border-radius: 12px; }
.chat-app .chat { min-height: 320px; height: calc(100vh - 380px); }
html[dir="rtl"] .chat-msg.mine { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .chat-meta time { margin-left: 0; margin-right: auto; padding-left: 0; padding-right: 10px; }
@media (max-width: 1000px) { .chat-app { grid-template-columns: 1fr; } .chat-app .chat { height: 52vh; } }
.p-badge-kf .kf-lockup { color: #FFFFFF; }
.p-badge-kf .kf-lockup path[fill="currentColor"] { fill: #FFFFFF; }
.p-badge-top .p-badge-logo { height: 44px; }
.p-badge-kf svg { height: 32px; }
.p-badge-body { gap: 8px; }
.p-badge-body b { font-size: clamp(38px, 3.8vw, 46px); }
.p-hero::after { border: 0; width: 360px; height: 360px; inset-inline-end: -140px; top: 50%; transform: translateY(-50%); background: radial-gradient(closest-side, #00BFFF, transparent); opacity: .5; }
.p-item .save-btn { height: 38px; min-height: 38px; min-width: 176px; padding: 0 16px; justify-content: center; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1; white-space: nowrap; }
.p-item .save-btn .ico { width: 15px; height: 15px; flex: none; display: block; }
.p-item .save-btn[data-req] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.p-item .save-btn[data-req]:hover { background: color-mix(in srgb, var(--ink) 85%, var(--accent)); }
.p-item .save-btn[data-wd] { color: #B83A3A; border-color: color-mix(in srgb, #B83A3A 45%, transparent); }
.p-item .save-btn[data-wd]:hover { background: #FDEDED; }
.p-item > div:nth-child(3) .badge { min-height: 38px; min-width: 176px; justify-content: center; border-radius: 999px; padding: 0 14px; }
.p-badge-top { align-items: center; }
.p-badge-top .p-badge-logo, .p-badge-kf svg { height: 34px; width: auto; }
.p-badge-kf { padding-inline-start: 14px; display: flex; align-items: center; height: 34px; }
.p-id { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: #FDEDED; border: 1.5px solid #D64545; color: #8E1F1F; }
.p-id h2 { color: #8E1F1F; font-size: 18px; }
.p-id p { color: #8E1F1F; margin-top: 4px; max-width: 70ch; font-size: 14.5px; }
.p-id .p-id-due { font-weight: 700; }
.p-id-btn { position: relative; overflow: hidden; background: #B83A3A; color: #fff; border-color: #B83A3A; flex: none; }
.p-id-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.p-id-btn .ico { width: 16px; height: 16px; }
.p-venues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.p-venue { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
.p-venue-map { position: relative; aspect-ratio: 16 / 10; background: var(--panel-2); }
.p-venue-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.p-venue-hit { position: absolute; inset: 0; z-index: 1; }
.p-venue-body { padding: 14px 16px 16px; display: grid; gap: 8px; flex: 1; }
.p-venue-body h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.p-venue-body h3 .ico { width: 18px; height: 18px; color: var(--accent); flex: none; }
.p-venue-body p { font-size: 13.5px; color: var(--muted); }
.p-venue-body .btn { justify-self: start; margin-top: 4px; }
@media (max-width: 1000px) { .p-venues { grid-template-columns: 1fr; } }
html[lang^="en"] .p-nav-links span, html[lang^="en"] .a-nav span { text-transform: capitalize; }
.p-id > div { flex: 1; min-width: 260px; text-align: start; }
.p-id h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: -.01em; text-transform: none; color: #8E1F1F; }
html[lang^="en"] .p-id h2 { text-transform: capitalize; }
.p-item .save-btn { text-transform: capitalize; }
.p-id-cd { flex: none !important; min-width: 0 !important; display: grid; gap: 6px; justify-items: center; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid #F0B8B8; }
.p-id-cd-h { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8E1F1F; }
html:not([lang^="en"]) .p-id-cd-h { text-transform: none; letter-spacing: 0; }
.p-id-units { display: flex; gap: 8px; direction: ltr; }
html[dir="rtl"] .p-id-units { flex-direction: row-reverse; }
.p-id-units span { display: grid; justify-items: center; min-width: 58px; padding: 8px 6px; border-radius: 10px; background: #FDEDED; }
.p-id-units b { font-size: 26px; font-weight: 700; line-height: 1; color: #B83A3A; font-variant-numeric: tabular-nums; }
.p-id-units small { font-size: 11.5px; color: #8E1F1F; margin-top: 4px; }
.p-id-cd > small { font-size: 12.5px; font-weight: 600; color: #8E1F1F; }
.p-id .p-id-btn { margin-top: 12px; }
.p-id-off .p-id-btn { margin-top: 0; }
.p-item .save-btn.is-off { opacity: .55; cursor: not-allowed; }
.lock-note.clash-note { color: #8A4B00; }
.p-wa { margin-top: 26px; }
.p-wa p { max-width: 70ch; }
.p-wa .btn { margin-top: 12px; }
.p-card.p-id { flex-direction: row; align-items: center; }
@media (max-width: 640px) { .p-card.p-id { flex-direction: column; align-items: stretch; } .p-id-cd { justify-self: stretch; } }
