:root { --pom-bg: #f5f8fb; --pom-accent: #244c77; --pom-tint: #e8f0fa; --pom-border: #dde7f0; }
body:has(.theme-staff) { --pom-bg: #f5fafa; --pom-accent: #08676d; --pom-tint: #e8f3f3; --pom-border: #dcebec; }
body:has(.theme-owner) { --pom-bg: #f8f7fc; --pom-accent: #4c3a88; --pom-tint: #efecf8; --pom-border: #e6e1f2; }
body:has(.theme-cast) { --pom-bg: #fff; --pom-accent: #222; --pom-tint: #f5f5f5; --pom-border: #e4e4e4; }
body { --ink: #222b38; --muted: #5c6470; --line: #e3e8ed; --green: var(--pom-accent); --green-dark: var(--pom-accent); }
.icon { mask-size: calc(40 * var(--icon-size)) var(--icon-size); }
:focus-visible { outline-color: var(--pom-accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.pom-shell { background: var(--pom-bg); }
.pom-shell .app-body { margin: 0; }
.pom-shell .sidebar { transform: translateX(-100%); transition: transform .18s ease; width: min(19rem, 87vw); }
.pom-shell.menu-open .sidebar { transform: none; }
.pom-shell.menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 4; background: #212b3b66; }
.pom-shell .sidebar .nav-item.selected, .pom-shell .sidebar .nav-item:hover { background: var(--pom-tint); color: var(--pom-accent); }
.pom-shell .sidebar .nav-item .icon, .pom-shell .nav-count { color: var(--pom-accent); }
.pom-shell .nav-count { background: var(--pom-tint); }
.brand-word { font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 800; letter-spacing: .01em; }
.brand-mark { color: var(--pom-accent); background: transparent; box-shadow: none; border: 0; }
.pom-topbar { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; padding: 0 max(1rem,calc((100% - 76rem) / 2)); min-height: 5.5rem; }
.pom-topbar .top-account { justify-self: start; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.pom-topbar .topbar-actions { justify-self: end; gap: .15rem; }
.pom-topbar .topbell { width: 44px; height: 44px; color: var(--pom-accent); }
.pom-topbar .topbell i { background: #a23553; }
.pom-topbar .brand { gap: .46rem; }
.pom-topbar .brand-mark { width: auto; height: auto; flex-basis: auto; }
.pom-topbar .brand-mark .icon { --icon-size: 1.63rem; }
.pom-topbar .brand-word { font-size: 1.33rem; }
.pom-identity { display: grid; justify-items: center; gap: .3rem; }
.role-chip { background: var(--pom-accent); color: white; padding: .12rem .68rem .16rem; border-radius: 99px; font-size: .72rem; font-weight: 750; }
.pom-trial { padding: .22rem 1rem 0; text-align: center; font-size: .68rem; color: var(--muted); }
.profile-avatar { width: 44px; height: 44px; display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  overflow: hidden; background: var(--pom-tint); color: var(--pom-accent); border: 1px solid var(--pom-border); font-weight: 750; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-photo-preview .profile-avatar { width: 66px; height: 66px; }
.pom-shell .main-content { max-width: 80rem; padding-bottom: 6rem; }
.pom-shell .pom-home { max-width: 52rem; padding: .7rem 1rem 6rem; }
.home-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; }
.home-tile { display: grid; justify-items: center; align-content: center; gap: .48rem; min-width: 0; min-height: 6.45rem;
  padding: .55rem .15rem; border: 1px solid var(--pom-border); border-radius: .95rem; background: var(--pom-tint);
  font-size: clamp(.72rem,3.45vw,.92rem); line-height: 1.32; font-weight: 750; text-align: center; }
.home-tile:hover { border-color: var(--pom-accent); }
.home-tile:active { transform: scale(.98); }
.tile-symbol { position: relative; display: grid; place-items: center; width: 2.8rem; height: 2.65rem; color: var(--pom-accent); }
.tile-symbol .icon { --icon-size: 2rem; }
.tile-badge, .tab-badge, .chat-unread { min-width: 1.15rem; height: 1.15rem; padding-inline: .18rem; border-radius: 99px; color: white;
  background: #a23553; font-size: .67rem; font-weight: 750; display: inline-grid; place-items: center; line-height: 1; }
.tile-badge { position: absolute; top: -.14rem; right: -.43rem; border: 1px solid white; }
.pom-shell .pom-tabs { position: fixed; z-index: 3; inset: auto 0 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr));
  padding: .25rem max(.4rem,calc((100% - 35rem) / 2)) max(.35rem,env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--pom-border); }
.pom-shell .pom-tabs .nav-item { width: 100%; min-height: 3rem; margin: 0; font-size: .74rem; border-radius: .75rem;
  display: grid; gap: .05rem; align-content: center; justify-items: center; padding: .2rem; }
.pom-shell .pom-tabs .tab-icon { display: grid; place-items: center; position: relative; width: 2.5rem; height: 1.55rem; border-radius: 1rem; }
.pom-shell .pom-tabs .icon { --icon-size: 1.32rem; color: #58626f; }
.pom-shell .pom-tabs .nav-item.selected { color: var(--pom-accent); background: transparent; }
.pom-shell .pom-tabs .nav-item.selected .tab-icon { background: var(--pom-tint); }
.pom-shell .pom-tabs .nav-item.selected .icon { color: var(--pom-accent); }
.tab-badge { position: absolute; top: -.24rem; right: -.32rem; border: 1px solid white; }
.login-layout { background: #f5f8fb; }
.login-side { background: #17324c; }
.login-side::before { content: none; }
.login-side .brand-mark { background: #234361; border: 0; color: #fff; }
.login-intro h1 { font-family: inherit; font-size: clamp(2.6rem,5.4vw,5.25rem); font-weight: 750; }
.login-intro p { color: #d8e4f1; }
.login-symbol { background: var(--pom-tint); color: var(--pom-accent); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb,var(--pom-accent),black 12%); border-color: var(--pom-accent); }
[data-summary] { color: var(--muted); font-size: .9rem; margin-bottom: .65rem; }

.chat-policy { color: var(--muted); font-size: .83rem; max-width: 58ch; margin-bottom: 1rem; }
.chat-index, .chat-layout { max-width: 48rem; }
.chat-index { background: #fff; border: 1px solid var(--line); border-radius: .94rem; overflow: hidden; }
.chat-thread { display: flex; align-items: center; gap: .7rem; min-height: 4.1rem; padding: .65rem .85rem;
  width: 100%; text-align: left; border: 0; background: #fff; border-bottom: 1px solid var(--line); }
.chat-thread:last-child { border-bottom: 0; }
.chat-thread:hover { background: var(--pom-bg); }
.chat-thread-info { display: grid; flex: 1; min-width: 0; }
.chat-thread small, .chat-thread strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread-meta { color: var(--muted); display: grid; justify-items: end; gap: .24rem; font-size: .72rem; }
.chat-messages { max-height: min(58vh,34rem); min-height: 9rem; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border: 1px solid var(--line); border-radius: .94rem; padding: .8rem; }
.chat-messages ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.chat-message { display: flex; align-items: end; gap: .42rem; }
.chat-message.own { justify-content: flex-end; }
.chat-message .profile-avatar { width: 31px; height: 31px; }
.chat-bubble-group { max-width: min(86%,36rem); min-width: 0; }
.chat-bubble { padding: .55rem .75rem; background: #f0f2f5; border-radius: .85rem .85rem .85rem .28rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-message.own .chat-bubble { background: var(--pom-tint); border-radius: .85rem .85rem .28rem .85rem; }
.chat-sender, .chat-message-meta { color: var(--muted); font-size: .73rem; }
.chat-message-meta { display: flex; gap: .5rem; align-items: center; padding-inline: .15rem; min-height: 1.3rem; }
.chat-message.own .chat-message-meta { justify-content: flex-end; }
.chat-message-meta .link-btn { min-height: 32px; font-size: .75rem; }
.chat-older { text-align: center; margin-bottom: .5rem; }
.chat-compose { display: grid; gap: .4rem; margin-block: .7rem; }
.chat-compose textarea { width: 100%; padding: .6rem; border: 1px solid var(--line); border-radius: .7rem; resize: vertical; }
.chat-compose-actions { display: flex; justify-content: space-between; align-items: center; }
.chat-compose .muted { font-size: .78rem; }
.chat-people { display: grid; gap: .22rem; max-height: 16rem; overflow-y: auto; border: 1px solid var(--line); border-radius: .5rem; }
.chat-review-list { list-style: none; margin: 0; padding: .4rem 1rem; }
.chat-review-list li { padding: .7rem 0; display: grid; gap: .12rem; justify-items: start; border-bottom: 1px solid var(--line); }
.chat-review-list li:last-child { border: 0; }
.chat-review-list small { color: var(--muted); display: block; }
.chat-review-list p { overflow-wrap: anywhere; }

.theme-cast .pom-topbar .brand-word {
  font-family: Georgia, "Hiragino Mincho ProN", serif;
  font-weight: 500;
  letter-spacing: .035em;
}
.theme-cast .role-chip { padding: 0; background: transparent; color: var(--pom-accent); }
.theme-cast .top-account img, .cast-home-portrait img, .theme-cast .home-tile .profile-avatar img { filter: grayscale(1); }
.pom-shell.theme-cast .pom-home { max-width: 42rem; }
.cast-home-profile {
  display: grid;
  grid-template-columns: clamp(5.65rem, 29vw, 8rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(.8rem, 4.5vw, 1.4rem);
  margin-bottom: .9rem;
}
.cast-home-portrait { aspect-ratio: 4 / 5; }
.cast-home-portrait .profile-avatar {
  width: 100%; height: 100%; border-radius: 1rem; background: #f1f1f1; font-size: 2rem;
}
.cast-home-identity { display: grid; justify-items: start; min-width: 0; gap: .4rem; }
.cast-home-name { font-size: clamp(1.1rem, 4.5vw, 1.55rem); font-weight: 750; overflow-wrap: anywhere; }
.cast-home-identity .link-btn { min-height: 44px; }
.cast-home-identity .emergency-btn { margin-top: .15rem; min-height: 44px; }
.theme-cast .home-tile {
  min-height: 5.55rem; gap: .3rem; background: #f8f8f8; border-radius: .8rem;
  box-shadow: 0 2px 5px #1414140e;
}
.theme-cast .home-tile .tile-symbol { height: 2.3rem; }
.theme-cast .home-tile .tile-symbol .icon { --icon-size: 1.78rem; }
.theme-cast .home-tile .profile-avatar { width: 36px; height: 36px; border-color: #d4d4d4; }
.pom-shell.theme-cast .pom-tabs { background: #171717; border-color: #303030; }
.pom-shell.theme-cast .pom-tabs .nav-item, .pom-shell.theme-cast .pom-tabs .icon { color: #dedede; }
.pom-shell.theme-cast .pom-tabs .nav-item:hover { background: #272727; }
.pom-shell.theme-cast .pom-tabs .selected .tab-icon { background: #3a3a3a; }
.pom-shell.theme-cast .pom-tabs .selected, .pom-shell.theme-cast .pom-tabs .selected .icon { color: #fff; }
.pom-shell.theme-cast .pom-tabs .nav-item:focus-visible { outline-color: #fff; outline-offset: -2px; }
@media (min-width: 740px) {
  .home-grid { gap: .85rem; }
  .home-tile { min-height: 7rem; }
  .pom-shell .pom-home { padding-inline: 2rem; }
}
@media (max-width: 380px) {
  .pom-topbar { min-height: 4.75rem; padding-inline: .65rem; }
  .pom-topbar .brand-word { font-size: 1.11rem; }
  .pom-topbar .brand-mark .icon { --icon-size: 1.25rem; }
  .pom-shell .pom-home { padding-inline: .72rem; }
  .home-grid { gap: .42rem; }
  .home-tile { min-height: 5.8rem; }
}

/* The four cast designs share the same controls and layout. */
.cast-design-editorial {
  --design-bg: #fff; --design-ink: #202022; --design-card: #f8f8f8; --design-border: #e4e4e4;
  --design-accent: #28282a; --design-nav: #171717; --design-nav-ink: #dedede; --design-active: #3a3a3a;
  --design-wallpaper: url("/cast-editorial.webp");
}
.cast-design-luxury {
  --design-bg: #141211; --design-ink: #fff5df; --design-card: #27231e; --design-border: #554735;
  --design-accent: #e3c48a; --design-nav: #141211; --design-nav-ink: #ecdbc3; --design-active: #3e3220;
  --design-wallpaper: url("/cast-luxury.webp");
}
.cast-design-midnight {
  --design-bg: #0e1728; --design-ink: #eef5ff; --design-card: #1b2b42; --design-border: #2c4562;
  --design-accent: #90ccff; --design-nav: #111d2d; --design-nav-ink: #c6d8ef; --design-active: #27445e;
  --design-wallpaper: url("/cast-midnight.webp");
}
.cast-design-greige {
  --design-bg: #f4eee6; --design-ink: #342e29; --design-card: #fbf7f0; --design-border: #dcd0c2;
  --design-accent: #50453a; --design-nav: #514539; --design-nav-ink: #f2e7d8; --design-active: #716152;
  --design-wallpaper: url("/cast-greige.webp");
}
.pom-shell.theme-cast:has(.pom-home) {
  background: var(--design-bg) var(--design-wallpaper) center top / 100% calc(100% - 3.4rem - env(safe-area-inset-bottom)) no-repeat;
  color: var(--design-ink);
}
@media (min-width: 740px) {
  .pom-shell.theme-cast:has(.pom-home) {
    background-image: linear-gradient(90deg, var(--design-bg), transparent 10%, transparent 90%, var(--design-bg)), var(--design-wallpaper);
    background-size: 46rem calc(100% - 3.4rem);
  }
}
.theme-cast .pom-topbar, .theme-cast .pom-topbar .brand, .theme-cast .pom-topbar .topbell {
  background-color: var(--design-bg); color: var(--design-ink); border-color: var(--design-border);
}
.theme-cast .role-chip, .theme-cast .brand-mark, .theme-cast .tile-symbol { color: var(--design-accent); }
.theme-cast .pom-home .home-tile { background: var(--design-card); border-color: var(--design-border); color: var(--design-ink); }
.theme-cast .pom-home .home-tile:hover { border-color: var(--design-accent); }
.theme-cast .cast-home-portrait .profile-avatar, .theme-cast .pom-topbar .profile-avatar, .theme-cast .home-tile .profile-avatar {
  background: var(--design-card); border-color: var(--design-border); color: var(--design-ink);
}
.theme-cast .cast-home-identity .link-btn, .theme-cast:has(.pom-home) .pom-trial { color: var(--design-ink); }
.theme-cast:not(.cast-design-editorial) .top-account img,
.theme-cast:not(.cast-design-editorial) .cast-home-portrait img,
.theme-cast:not(.cast-design-editorial) .home-tile .profile-avatar img { filter: none; }
.pom-shell.theme-cast .pom-tabs { background: var(--design-nav); border-color: var(--design-border); }
.pom-shell.theme-cast .pom-tabs .nav-item, .pom-shell.theme-cast .pom-tabs .icon { color: var(--design-nav-ink); }
.pom-shell.theme-cast .pom-tabs .selected .tab-icon,
.pom-shell.theme-cast .pom-tabs .nav-item:hover { background: var(--design-active); }
.cast-design-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); gap: .75rem; max-width: 55rem; }
.design-card { display: grid; align-content: start; gap: .4rem; padding: .55rem; border: 1px solid var(--line);
  border-radius: 14px; background: white; text-align: left; color: var(--ink); font-size: .83rem; overflow-wrap: anywhere; }
.design-card[aria-pressed=true] { border: 2px solid var(--pom-accent); padding: calc(.55rem - 1px); }
.design-demo { min-width: 0; display: grid; gap: .35rem; padding: .5rem .45rem .35rem;
  border: 1px solid var(--design-border); border-radius: .6rem;
  background: var(--design-bg) var(--design-wallpaper) center / 100% 100%; color: var(--design-ink); }
.design-demo-title { display: flex; align-items: center; justify-content: center; gap: .2rem; font: bold .65rem Georgia, serif; }
.design-demo-title .icon { --icon-size: .7rem; }
.design-demo-profile { min-width: 0; display: flex; align-items: center; gap: .35rem; font-size: .63rem; }
.design-demo-profile img, .design-demo-profile .icon { height: 33px; width: 26px; object-fit: cover; border-radius: .28rem; }
.cast-design-editorial .design-demo-profile img { filter: grayscale(1); }
.design-demo-profile span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.design-demo-profile .icon { --icon-size: 26px; }
.design-demo-icons { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .16rem; color: var(--design-accent); }
.design-demo-icons > span { min-height: 1.1rem; display: grid; place-items: center; border-radius: .21rem; background: var(--design-card); }
.design-demo-icons .icon { --icon-size: .69rem; }
.design-demo-tabs { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); justify-items: center;
  padding: .2rem; border-radius: .3rem; background: var(--design-nav); color: var(--design-nav-ink); }
.design-demo-tabs .icon, .design-selected .icon { --icon-size: .675rem; }
.design-selected { display: flex; gap: .25rem; align-items: center; color: var(--pom-accent); }
.settings-link-list { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fit,minmax(min(100%,145px),1fr)); padding: .2rem .8rem .85rem; }
.settings-link-list .btn { justify-content: flex-start; min-height: 44px; white-space: normal; }
.calendar-key { padding: .13rem .4rem; border-radius: 5px; background: var(--pom-tint); color: var(--ink); font-size: .75rem; }
.calendar-event.formal-event time, .calendar-event.tentative-event time { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calendar-grid.month .calendar-event .calendar-customer { display: inline; min-width: 0; }
.calendar-event.tentative-event { border-left-style: dashed; }
.today-booking-list, .task-list { list-style: none; padding: 0 .8rem .6rem; margin: 0; }
.today-booking { width: 100%; display: flex; gap: .7rem; align-items: center; justify-content: space-between; min-height: 48px;
  padding: .45rem .3rem; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); }
.today-booking time { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.task-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: .35rem; align-items: center;
  min-height: 54px; padding: .2rem .25rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.task-row div > :is(small, .task-due) { display: block; color: var(--muted); font-size: .76rem; white-space: pre-wrap; }
.task-row.is-complete { color: #5a615f; background: #fafafa; }
.task-state, .task-check { display: grid; place-items: center; min-height: 44px; }
.task-check { width: 44px; border: 0; border-radius: .6rem; background: transparent; color: var(--pom-accent); }
.task-check:hover { background: var(--pom-tint); }
.task-check:empty::before, .task-state > span:not(.icon) { content: ''; width: 17px; height: 17px; border: 1px solid #858c93; border-radius: .27rem; }
.task-row > .icon { justify-self: center; }
.community-links, .community-quick { display: flex; flex-wrap: wrap; gap: .65rem; padding: .15rem 0; }
.community-links { border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.community-links .link-btn, .community-quick .link-btn { min-height: 44px; }
.community-feed { max-width: 45rem; margin-inline: auto; }
.community-feed .community-card { border-radius: .85rem; }
.community-actions .community-reaction { min-height: 44px; }
.counsel-questions { display: grid; gap: .9rem; }
.counsel-question { min-width: 0; margin: 0; padding: .65rem .8rem .8rem; border: 1px solid var(--line, #dce2e8); border-radius: 12px; }
.counsel-question legend { padding: 0 .35rem; color: inherit; font-weight: 700; }
.counsel-question .source-details { margin-top: .65rem; }
.counsel-avoid { margin: .35rem 0 0; font-weight: 650; }
.personal-question-list > div > span { overflow-wrap: anywhere; min-width: 0; }
.personal-question-list > div > button { flex-shrink: 0; }

.pom-home-brand { min-height: 44px; padding: .1rem .35rem; border: 0; border-radius: .45rem; background: transparent; color: inherit; }
.finance-tabs { display: grid; max-width: 33rem; grid-template-columns: repeat(3,1fr); margin-bottom: 1rem; padding: .2rem; gap: .2rem;
  border-radius: .8rem; background: var(--pom-tint); }
.finance-tabs button { min-height: 44px; background: transparent; color: var(--ink); border: 0; border-radius: .65rem; font-weight: 650; }
.finance-tabs button[aria-current] { background: var(--pom-accent); color: #fff; }
.calendar-key, .calendar-grid.month .formal-event { background: #ddf2fb; border-left-color: var(--point, #18729f); color: #073f5b; }
.calendar-key.is-draft, .calendar-grid.month .tentative-event { background: #eceef1; color: #363c45; border-left-color: #747984; }
.calendar-grid.month .cancelled-event { background: #f0f0f0; color: #535658; }
.calendar-event-status { font-weight: 700; color: #4f555f; }
@media (max-width: 600px) {
  .pom-shell .calendar-panel .calendar-grid { gap: 1px; }
  .pom-shell .calendar-cell { padding-inline: 1px; }
  .calendar-grid.month .calendar-event { display: grid; grid-template-columns: minmax(0,1fr); text-align: left;
    gap: .08rem; padding: .17rem .1rem; min-height: 32px; font-size: .68rem; line-height: 1.2; }
  .calendar-grid.month .calendar-event time { font-size: .625rem; overflow: hidden; text-overflow: ellipsis; }
  .calendar-grid.month .calendar-event .calendar-event-status { display: inline; font-size: .59rem; }
}

.counsel-question-set { display: grid; gap: .55rem; }
.counsel-group-title { margin: .25rem 0 0; font-size: .95rem; }
.counsel-question { padding: .35rem .65rem .55rem; }
.counsel-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.counsel-pills .counsel-pill { display: inline-flex; position: relative; margin: 0; padding: 0; }
.counsel-pill span { min-height: 34px; display: inline-flex; align-items: center; justify-content: center;
  padding: .26rem .62rem; border: 1px solid #c9d1d9; border-radius: .55rem; background: #fff; color: #223140;
  font-size: .82rem; font-weight: 550; line-height: 1.3; }
.counsel-pill input:checked + span { border-color: #1a6383; background: #d8edf7; color: #123d55; box-shadow: inset 0 0 0 1px #1a6383; }
.counsel-ng .counsel-pill input:checked + span { border-color: #983c45; background: #f9e1e5; color: #722630; box-shadow: inset 0 0 0 1px #983c45; }
.counsel-pill input:focus-visible + span { outline: 2px solid #586cc5; outline-offset: 2px; }
.counsel-choice-controls { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: end; }
.counsel-choice-controls .btn { padding-inline: .5rem; }

.personal-goal-list { list-style: none; padding: 0 .8rem .75rem; margin: 0; }
.personal-goal-card { padding: .7rem .2rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.personal-goal-card > div { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.personal-goal-card > small { display: block; color: var(--muted); margin-top: .28rem; }
.personal-goal-card p { margin: .32rem 0; }
.personal-goal-card progress { width: min(100%,26rem); display: block; height: .65rem; accent-color: var(--pom-accent); }
.goal-achieved { background: #e0f3e7; color: #1d5e39; }
.goal-missed { background: #f7e8eb; color: #792d3d; }
.legacy-goals { padding: .7rem; }

.chat-layout { max-width: 55rem; margin-inline: auto; }
.chat-policy summary { cursor: pointer; min-height: 28px; }
.chat-policy p { margin: .15rem 0 .45rem; }
.chat-thread-info strong { color: var(--ink); }
.chat-thread-info small { color: var(--muted); }
.chat-thread-meta time { white-space: nowrap; }
.chat-bubble { margin: 0; }
.chat-bubble p { margin: 0; }
.chat-attachment { display: grid; gap: .22rem; margin-top: .2rem; color: inherit; overflow-wrap: anywhere; }
.chat-attachment img { width: min(100%, 240px); max-height: 240px; object-fit: contain; border-radius: .45rem; }
.chat-attachment span, .chat-file-selections { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.chat-compose { position: sticky; bottom: calc(4.3rem + env(safe-area-inset-bottom)); padding: .45rem .5rem;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: .84rem; z-index: 2; }
.chat-compose-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: .35rem; align-items: end; }
.chat-compose textarea { resize: none; min-height: 44px; max-height: 7rem; }
.chat-compose .check-field { min-height: 28px; font-size: .8rem; }
.chat-file-button { display: grid; position: relative; place-items: center; width: 44px; height: 44px; border-radius: .6rem;
  background: var(--pom-tint); cursor: pointer; }
.chat-file-button input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chat-file-button:focus-within { outline: 2px solid var(--pom-accent); }
.chat-contact-profile { display: grid; gap: .55rem; justify-items: center; color: var(--ink); }
.chat-contact-profile :is(h3,p) { margin: 0; }

.calendar-grid.month .calendar-event { container-type: inline-size; container-name: calendar-slot; }
.calendar-grid.month .calendar-event .calendar-name-full { display: block; }
.calendar-grid.month .calendar-event .calendar-time-mark { display: inline; }
.calendar-event .calendar-name-compact { display: none; }
@container calendar-slot (max-width: 49px) {
  .calendar-grid.month .calendar-event :is(.calendar-name-full,.calendar-time-mark) { display: none; }
  .calendar-grid.month .calendar-event .calendar-name-compact { display: inline; }
}
.finance-tabs { grid-template-columns: repeat(2,1fr); }
.sales-summary-title { font-size: 1rem; margin: .25rem 0 .6rem; }

.calendar-mark-legend { margin: .25rem .75rem .5rem; font-size: .77rem; color: var(--muted); }
.calendar-mark-legend p { margin: .2rem 0; }
.calendar-grid.month .calendar-event .calendar-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; overflow: visible; }
.calendar-grid.month .calendar-event .calendar-mark { display: inline; font-size: .62rem; line-height: 1.2; }
.calendar-event .calendar-cast-name { font-size: .73rem; }
.calendar-cast-list { display: grid; max-height: 46vh; overflow: auto; gap: .15rem; min-width: 0; border: 1px solid var(--line); border-radius: .65rem; }
.operations-calendar-scroll { overflow: auto; max-width: 100%; }
.operations-calendar-scroll .calendar-grid { min-width: 38rem; }
.operations-calendar-scroll .calendar-grid.month .formal-event:not(.cancelled-event) { background: var(--calendar-chip-bg,#ddf2fb); color: var(--calendar-chip-ink,#073f5b); border-left-color: currentColor; }
.operations-calendar-scroll .calendar-grid.month .calendar-event { display: grid; grid-template-columns: minmax(0,1fr); align-content: start; gap: .15rem; padding: .24rem; text-align: start; font-size: .76rem; }
.operations-calendar-scroll .calendar-grid.month .calendar-event .calendar-cast-name { display: block; font-weight: 550; }
.operations-calendar-scroll .calendar-grid.month .calendar-event time { font-size: .72rem; }
.booking-contacts .btn { margin: .2rem 0; }

/* Keep the home layout and wallpaper independent of the selected cast theme. */
.theme-cast .pom-home { padding-top: .32rem; padding-bottom: 6.25rem; }
.theme-cast .top-account-spacer { width: 44px; height: 44px; }
.theme-cast .cast-home-profile { grid-template-columns: clamp(5.75rem, 33vw, 8.1rem) minmax(0,1fr); gap: 1rem; margin-bottom: .95rem; }
.theme-cast .cast-home-name { margin: 0; letter-spacing: .045em; }
.theme-cast .cast-home-name span { font-size: .78rem; font-weight: 600; }
.theme-cast .cast-home-portrait { aspect-ratio: 3 / 4; width: 100%; padding: 0; border: 0; background: transparent; }
.theme-cast .cast-home-portrait:focus-visible { outline-color: var(--design-accent); }
.theme-cast .cast-home-portrait .profile-avatar { border-radius: .95rem .95rem .7rem .7rem; }
.theme-cast .home-grid { gap: .54rem; }
.theme-cast .pom-home .home-tile { min-height: clamp(4.55rem, 22vw, 6.8rem); border-radius: .85rem; }
.theme-cast .pom-home .home-tile > span:last-child { font-size: clamp(.65rem, 3vw, .92rem); }
.theme-cast .topbell { border-color: transparent; }
.theme-cast:has(.pom-home) .pom-topbar,
.theme-cast:has(.pom-home) .pom-topbar .brand,
.theme-cast:has(.pom-home) .pom-topbar .topbell { background: transparent; }
.theme-cast:has(.pom-home) .pom-topbar { border-bottom-color: transparent; }
.theme-cast:has(.pom-home) .pom-trial { font-size: .64rem; margin-block: 0 .2rem; opacity: .72; }
.home-work-link { color: var(--design-ink); background: var(--design-card); border: 1px solid var(--design-border);
  border-radius: .65rem; min-height: 38px; display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .5rem; }
.home-work-link .icon { --icon-size: 1rem; color: var(--design-accent); }
.theme-cast.cast-design-luxury .pom-home .home-tile { background: linear-gradient(155deg,#302d29,#141310 73%,#282117); box-shadow: 0 4px 12px #0008; }
.theme-cast.cast-design-editorial .pom-home .home-tile { background: linear-gradient(155deg,#fff,#f2f2f2); box-shadow: 0 3px 7px #1112; }
.theme-cast.cast-design-midnight .pom-home .home-tile { background: linear-gradient(150deg,#1a2a41,#0e1729); box-shadow: 0 4px 12px #03081499; }
.theme-cast.cast-design-greige .pom-home .home-tile { background: linear-gradient(145deg,#fbf7f0,#eee5da); box-shadow: 0 4px 8px #44352524; }
.theme-cast:has(.pom-home).cast-design-editorial .pom-tabs .selected .tab-icon { background: transparent; }

.community-feed-timeline .community-card { border-radius: 0; box-shadow: none; border: 0; border-bottom: 1px solid var(--line); margin: 0; }
.community-feed-timeline { border: 1px solid var(--line); border-radius: .85rem; overflow: hidden; }
.community-feed-questions .question-card { padding: 1rem; margin-bottom: .7rem; border: 1px solid #ece5ef; box-shadow: none; }
.community-feed-questions .question-card h2 { margin: .6rem 0; font-size: 1.03rem; line-height: 1.5; }
.question-answer { padding: .65rem .75rem; border-radius: .6rem; background: #f5eff8; color: #30253f; }
.question-answer p { margin: 0 0 .35rem; }
.community-feed-notes { display: grid; gap: .75rem; max-width: 58rem; grid-template-columns: repeat(auto-fit,minmax(min(100%, 290px),1fr)); }
.note-search { max-width: 58rem; margin: .65rem auto; }
.note-card { border-left: 3px solid #328278; align-content: start; }
.note-card h2 { margin: .45rem 0; font-size: 1.08rem; }
.note-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.note-tag { min-height: 36px; padding: .3rem .65rem; border: 1px solid #b1d2ca; border-radius: 999px; background: #eaf6f4; color: #194f49; }
.note-updated { color: var(--muted); display: block; margin: .45rem 0; }
.login-entry { display: inline-block; margin-top: .65rem; color: var(--muted); font-size: .84rem; }
.home-tile .work-badge { background: #a52f37; color: #fff; }
