/* ==========================================================================
   Cardddle — Theme 9 "Atelier"
   Premium, mobile-first digital card. All rules are scoped under .t9-root so
   the template can be included inside the dashboard editor preview without
   leaking styles into (or inheriting from) the surrounding admin UI.
   ========================================================================== */

.t9-root {
    /* Brand tokens are injected inline per card (see theme9.blade.php) */
    --t9-brand: #1f5f8b;
    --t9-brand-soft: rgba(31, 95, 139, .12);
    --t9-brand-deep: #163f5d;
    --t9-brand-ink: #ffffff;

    --t9-bg: #efe7dc;
    --t9-paper: #fffdfa;
    --t9-paper-2: #f7f1e8;
    --t9-ink: #241f1a;
    --t9-ink-soft: #6c6257;
    --t9-ink-faint: #9b9186;
    --t9-line: rgba(36, 31, 26, .09);
    --t9-line-strong: rgba(36, 31, 26, .16);
    --t9-name: var(--t9-ink);
    --t9-gold: #c29a5b;
    --t9-gold-ink: #8f6329;

    --t9-r-lg: 26px;
    --t9-r-md: 18px;
    --t9-r-sm: 13px;

    --t9-shadow-card: 0 24px 60px -28px rgba(36, 31, 26, .45), 0 2px 10px -4px rgba(36, 31, 26, .18);
    --t9-shadow-row: 0 6px 18px -10px rgba(36, 31, 26, .35);
    --t9-shadow-pop: 0 14px 30px -14px rgba(36, 31, 26, .45);

    --t9-ease: cubic-bezier(.22, .61, .36, 1);
    --t9-gutter: 16px;

    font-family: 'Manrope', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--t9-ink);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    position: relative;
    display: block;
    width: 100%;
    min-height: 100%;
    padding: 10px 12px 24px;
    box-sizing: border-box;
    background: var(--t9-bg);
    overflow-x: clip;
}

.t9-root *,
.t9-root *::before,
.t9-root *::after {
    box-sizing: border-box;
}

.t9-root img {
    max-width: 100%;
}

/* ---------- Icon system ---------------------------------------------------- */

.t9-ico {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.t9-ico--solid {
    fill: currentColor;
    stroke: none;
}

/* Optional full-bleed card background image */
.t9-backdrop {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.t9-root--preview .t9-backdrop {
    display: none;
}

.t9-utility-right {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

/* ---------- Ambient background -------------------------------------------- */

.t9-ambient {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.t9-ambient span {
    position: absolute;
    display: block;
    width: 62vw;
    max-width: 340px;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(46px);
    opacity: .5;
    will-change: transform;
}

.t9-ambient span:nth-child(1) {
    top: -6%;
    left: -18%;
    background: radial-gradient(circle closest-side, var(--t9-brand-soft), transparent);
    animation: t9-drift-a 22s var(--t9-ease) infinite alternate;
}

.t9-ambient span:nth-child(2) {
    bottom: 4%;
    right: -22%;
    background: radial-gradient(circle closest-side, rgba(196, 150, 79, .22), transparent);
    animation: t9-drift-b 26s var(--t9-ease) infinite alternate;
}

@keyframes t9-drift-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(8%, 6%, 0) scale(1.12); }
}

@keyframes t9-drift-b {
    from { transform: translate3d(0, 0, 0) scale(1.06); }
    to   { transform: translate3d(-7%, -5%, 0) scale(1); }
}

/* ---------- Card shell ---------------------------------------------------- */

.t9-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    background: var(--t9-paper);
    border: 1px solid var(--t9-line);
    border-radius: var(--t9-r-lg);
    box-shadow: var(--t9-shadow-card);
    overflow: hidden;
    animation: t9-card-in .7s var(--t9-ease) both;
}

@keyframes t9-card-in {
    from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.985); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Utility bar (QR / views / language) --------------------------- */

.t9-utility {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    max-width: 430px;
    margin: 0 auto 8px;
    position: relative;
    z-index: 2;
}

.t9-utility-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* every control in the top bar shares one size, surface and type */
.t9-chip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    background: rgba(255, 253, 250, .84);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px -14px rgba(20, 16, 12, .55);
    color: var(--t9-ink);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .18s var(--t9-ease), background-color .2s var(--t9-ease);
}

.t9-chip-btn:hover {
    background: #fff;
}

.t9-chip-btn:active {
    transform: scale(.95);
}

.t9-chip-btn svg {
    width: 15px;
    height: 15px;
    flex: none;
}

/* language pill: globe, current language, caret */
.t9-lang-btn {
    max-width: 168px;
    padding: 0 12px 0 13px;
}

.t9-lang-current {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t9-lang-btn .t9-lang-caret {
    width: 13px;
    height: 13px;
    margin-left: -1px;
    color: var(--t9-ink-faint);
}

/* Google's widget is the translation engine only — never shown */
.t9-lang-engine {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* and none of Google's own chrome over the translated page */
body > .skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip {
    display: none !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

/* ---------- Hero ---------------------------------------------------------- */

.t9-hero {
    position: relative;
    isolation: isolate;
}

.t9-hero-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: linear-gradient(140deg, var(--t9-paper-2), var(--t9-brand-soft));
}

.t9-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: 50% 45%;
    /* slow Ken Burns drift + a scroll-linked zoom (--t9-hero-p, 0 → 1, set by
       theme9.js). `scale` composes with the animated transform. */
    scale: calc(1 + var(--t9-hero-p, 0) * .1);
    animation: t9-hero-pan 18s var(--t9-ease) infinite alternate;
    will-change: transform;
}

@keyframes t9-hero-pan {
    from { transform: scale(1.03) translate3d(0, 0, 0); }
    to   { transform: scale(1.08) translate3d(0, -1.2%, 0); }
}

/* Poster-style hero: square artwork with the logo sitting inside its lower edge */
.t9-hero--tall .t9-hero-media {
    aspect-ratio: 5 / 4;
}

.t9-hero--tall .t9-hero-media img {
    object-position: 50% 0;
}

/* posters often carry lettering near the edges — keep their drift gentle */
.t9-hero--tall .t9-hero-media img {
    transform-origin: 50% 30%;
    scale: calc(1 + var(--t9-hero-p, 0) * .05);
    animation-name: t9-hero-pan-soft;
}

@keyframes t9-hero-pan-soft {
    from { transform: scale(1.01) translate3d(0, 0, 0); }
    to   { transform: scale(1.045) translate3d(0, -.6%, 0); }
}

/* poster art carries its own fade — only blend the last edge into the paper */
.t9-hero--tall .t9-hero-scrim {
    background: linear-gradient(to bottom, transparent 74%, var(--t9-paper) 100%);
}

/* Gold dust layer (canvas, drawn only while the hero is on screen) */
.t9-dust {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s var(--t9-ease);
}

.t9-dust.is-live {
    opacity: 1;
}

/* Without a cover image the hero becomes a slim branded band */
.t9-hero--badge .t9-hero-media {
    aspect-ratio: auto;
    height: 128px;
}

.t9-hero--plain .t9-hero-media {
    aspect-ratio: auto;
    height: 74px;
}

.t9-hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(255, 253, 250, 0) 42%, rgba(255, 253, 250, .72) 78%, var(--t9-paper) 100%);
}

.t9-hero-badge {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -44px;
    margin: 0 auto;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    padding: 5px;
    background: var(--t9-paper);
    box-shadow: var(--t9-shadow-pop);
    z-index: 2;
    /* entrance, then a slow float; the scroll lift uses `translate` */
    translate: 0 calc(var(--t9-hero-p, 0) * -14px);
    animation:
        t9-badge-in .8s .12s var(--t9-ease) both,
        t9-float 6.5s 1.2s ease-in-out infinite;
}

.t9-hero--tall .t9-hero-badge {
    width: 128px;
    height: 128px;
    bottom: -32px;
    padding: 6px;
}

/* Hairline gold ring with a travelling glint */
.t9-hero-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    padding: 1.5px;
    background: conic-gradient(from 0deg,
        rgba(194, 154, 91, .15) 0deg,
        var(--t9-gold) 60deg,
        rgba(255, 244, 214, .95) 90deg,
        var(--t9-gold) 120deg,
        rgba(194, 154, 91, .15) 200deg,
        rgba(194, 154, 91, .15) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: t9-spin 9s linear infinite;
    pointer-events: none;
}

.t9-hero-badge img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #fff;
}

@keyframes t9-badge-in {
    from { opacity: 0; transform: translateY(14px) scale(.9); }
    to   { opacity: 1; transform: none; }
}

@keyframes t9-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

@keyframes t9-spin {
    to { transform: rotate(1turn); }
}

/* ---------- Identity ------------------------------------------------------ */

.t9-identity {
    padding: 58px var(--t9-gutter) 0;
    text-align: center;
}

.t9-hero--no-badge + .t9-identity,
.t9-identity.t9-identity--flush {
    padding-top: 22px;
}

.t9-name {
    margin: 0;
    font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: clamp(25px, 7.2vw, 31px);
    letter-spacing: -.012em;
    line-height: 1.16;
    color: var(--t9-name);
    overflow-wrap: break-word;
}

.t9-hero--tall + .t9-identity {
    padding-top: 44px;
}

/* Identity settles in line by line after the card lands */
.t9-identity > * {
    animation: t9-rise .7s var(--t9-ease) backwards;
}

.t9-identity > :nth-child(1) { animation-delay: .22s; }
.t9-identity > :nth-child(2) { animation-delay: .3s; }
.t9-identity > :nth-child(3) { animation-delay: .38s; }
.t9-identity > :nth-child(4) { animation-delay: .46s; }
.t9-identity > :nth-child(5) { animation-delay: .54s; }
.t9-identity > :nth-child(n + 6) { animation-delay: .6s; }

@keyframes t9-rise {
    from { opacity: 0; transform: translate3d(0, 10px, 0); }
    to   { opacity: 1; transform: none; }
}

.t9-role {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    color: var(--t9-ink-soft);
    overflow-wrap: break-word;
}

.t9-tagline {
    margin: 6px 0 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--t9-ink-soft);
}

/* Social rail */
/* Social rail — bare glyphs in their brand colours, 44px touch targets */
.t9-social-rail {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.t9-social-rail a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--t9-ink);
    text-decoration: none;
    transition: transform .25s var(--t9-ease), background-color .25s var(--t9-ease);
}

.t9-social-rail a[data-p="facebook"] { color: #1877f2; }
.t9-social-rail a[data-p="youtube"]  { color: #e62117; }
.t9-social-rail a[data-p="linkedin"] { color: #0a66c2; }

.t9-social-rail a:hover {
    background: var(--t9-brand-soft);
    transform: translateY(-2px);
}

.t9-social-rail a:active {
    transform: scale(.88);
}

.t9-social-rail svg {
    width: 25px;
    height: 25px;
}

/* Keyword ornament: rule · dot · glyph · dot · rule */
.t9-ornament {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    color: var(--t9-gold);
}

.t9-ornament i {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--t9-gold));
    position: relative;
}

.t9-ornament i:last-child {
    background: linear-gradient(to left, transparent, var(--t9-gold));
}

.t9-ornament i::after {
    content: '';
    position: absolute;
    top: -2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--t9-gold);
}

.t9-ornament i:first-child::after { right: 6px; }
.t9-ornament i:last-child::after  { left: 6px; }

.t9-ornament span {
    width: 7px;
    height: 7px;
    flex: none;
    background: var(--t9-gold);
    transform: rotate(45deg);
}

.t9-ornament svg {
    width: 22px;
    height: 26px;
    flex: none;
    stroke-width: 1.5;
    fill: rgba(194, 154, 91, .16);
}

.t9-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 12px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.t9-keywords li {
    position: relative;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--t9-gold-ink);
}

.t9-keywords li + li::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    width: 1px;
    height: 12px;
    transform: translateY(-50%);
    background: var(--t9-gold);
    opacity: .6;
}

/* theme9.js flags the first keyword of each wrapped line — no stray rule */
.t9-keywords li.is-line-start::before {
    display: none;
}

/* ---------- Quick actions ------------------------------------------------- */

.t9-actions {
    padding: 18px var(--t9-gutter) 0;
}

.t9-cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--t9-brand), var(--t9-brand-deep));
    color: var(--t9-brand-ink);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
    box-shadow: 0 12px 24px -14px var(--t9-brand);
    transition: transform .18s var(--t9-ease), box-shadow .18s var(--t9-ease), filter .18s var(--t9-ease);
}

.t9-cta:hover {
    color: var(--t9-brand-ink);
    text-decoration: none;
    filter: brightness(1.04);
}

.t9-cta:active {
    transform: translateY(1px) scale(.985);
}

.t9-cta svg {
    width: 18px;
    height: 18px;
    flex: none;
}

/* Periodic light sweep across the primary button */
.t9-cta::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 45%;
    z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: translateX(-120%) skewX(-18deg);
    animation: t9-sheen 5.5s 1.6s var(--t9-ease) infinite;
    pointer-events: none;
}

@keyframes t9-sheen {
    0%       { transform: translateX(-120%) skewX(-18deg); }
    28%, 100% { transform: translateX(330%) skewX(-18deg); }
}

/* Touch ink — spawned by theme9.js at the pointer position */
.t9-ink {
    position: absolute;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .18;
    pointer-events: none;
    transform: scale(0);
    animation: t9-ink .6s var(--t9-ease) forwards;
}

@keyframes t9-ink {
    to { transform: scale(var(--t9-ink-scale, 40)); opacity: 0; }
}

.t9-section-head,
.t9-quick a,
.t9-row,
.t9-event,
.t9-doc,
.t9-soft-btn {
    position: relative;
    overflow: hidden;
}

.t9-quick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

/* One or two actions should not stretch the full card width */
.t9-quick--few {
    grid-template-columns: repeat(auto-fit, minmax(96px, 128px));
    justify-content: center;
}

.t9-quick a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 62px;
    padding: 8px 4px;
    border: 1px solid var(--t9-line);
    border-radius: 14px;
    background: var(--t9-paper-2);
    color: var(--t9-ink);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .18s var(--t9-ease), background-color .18s var(--t9-ease), border-color .18s var(--t9-ease);
}

.t9-quick a:active {
    transform: scale(.94);
    background: var(--t9-brand-soft);
    border-color: var(--t9-brand);
}

.t9-quick a:hover {
    color: var(--t9-ink);
    text-decoration: none;
}

.t9-quick svg {
    width: 19px;
    height: 19px;
    color: var(--t9-brand);
    flex: none;
}

/* ---------- Sections (accordion) ------------------------------------------ */

.t9-sections {
    padding: 14px var(--t9-gutter) 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.t9-section {
    --t9-accent: var(--t9-brand);
    --t9-accent-deep: var(--t9-brand-deep);
    --t9-accent-soft: var(--t9-brand-soft);
    border-radius: var(--t9-r-md);
    background: var(--t9-paper);
    border: 1px solid var(--t9-line);
    box-shadow: var(--t9-shadow-row);
    overflow: hidden;
}

/* Sections only start hidden once the script is running, so a failed or
   blocked script can never leave the content invisible. */
.t9-anim-ready .t9-section {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
}

.t9-section.is-revealed {
    opacity: 1;
    transform: none;
    transition: opacity .5s var(--t9-ease), transform .5s var(--t9-ease);
}

.t9-section.is-open {
    border-color: transparent;
    box-shadow: var(--t9-shadow-pop);
}

.t9-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--t9-ink);
    transition: background-color .3s var(--t9-ease), color .3s var(--t9-ease);
}

.t9-section.is-open .t9-section-head {
    background: linear-gradient(135deg, var(--t9-accent), var(--t9-accent-deep));
    color: #fff;
}

.t9-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    background: var(--t9-accent);
    color: #fff;
    box-shadow: 0 8px 16px -10px var(--t9-accent);
    transition: transform .3s var(--t9-ease);
}

.t9-section.is-open .t9-section-icon {
    background: rgba(255, 255, 255, .18);
    box-shadow: none;
}

.t9-section-icon svg {
    width: 20px;
    height: 20px;
}

.t9-section-text {
    flex: 1 1 auto;
    min-width: 0;
}

.t9-section-title {
    display: block;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -.005em;
    line-height: 1.25;
    overflow-wrap: break-word;
}

.t9-section-sub {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--t9-ink-faint);
    overflow-wrap: break-word;
}

.t9-section.is-open .t9-section-sub {
    color: rgba(255, 255, 255, .82);
}

/* Points right while closed, turns up when the panel opens */
.t9-section-caret {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--t9-ink-faint);
    transform: rotate(-90deg);
    transition: transform .34s var(--t9-ease), color .3s var(--t9-ease);
}

.t9-section.is-open .t9-section-caret {
    transform: rotate(-180deg);
    color: #fff;
}

.t9-section-head:hover .t9-section-caret {
    color: var(--t9-accent);
}

.t9-section.is-open .t9-section-head:hover .t9-section-caret {
    color: #fff;
}

.t9-section.is-open .t9-section-icon svg {
    animation: t9-icon-pop .55s var(--t9-ease) both;
}

@keyframes t9-icon-pop {
    0%   { transform: scale(.6) rotate(-12deg); }
    60%  { transform: scale(1.15) rotate(4deg); }
    100% { transform: none; }
}

/* Panel content cascades in each time a section opens (--i set by JS) */
.t9-section.is-open .t9-stagger > * {
    animation: t9-rise .5s var(--t9-ease) backwards;
    animation-delay: calc(80ms + var(--i, 0) * 55ms);
}

.t9-section-head:active .t9-section-icon {
    transform: scale(.92);
}

.t9-section-panel {
    height: 0;
    overflow: hidden;
    transition: height .36s var(--t9-ease);
}

.t9-section-body {
    padding: 14px;
    border-top: 1px solid var(--t9-line);
    font-size: 14px;
    line-height: 1.62;
    color: var(--t9-ink-soft);
}

.t9-section-body > *:first-child {
    margin-top: 0;
}

.t9-section-body > *:last-child {
    margin-bottom: 0;
}

.t9-section-body p {
    margin: 0 0 10px;
}

/* Only inline links inside rich text pick up the accent colour — the
   structured rows and cards keep their own typography. */
.t9-rich a {
    color: var(--t9-accent);
    word-break: break-word;
}

.t9-section-body img {
    height: auto;
}

/* ---------- Section content primitives ------------------------------------ */

/* rich text (bio / summernote html) */
.t9-rich {
    font-size: 14px;
    line-height: 1.66;
    color: var(--t9-ink-soft);
    overflow-wrap: break-word;
}

.t9-rich h1, .t9-rich h2, .t9-rich h3, .t9-rich h4 {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--t9-ink);
    font-size: 16px;
    margin: 12px 0 6px;
}

.t9-rich ul, .t9-rich ol {
    padding-left: 20px;
    margin: 0 0 10px;
}

.t9-rich img {
    max-width: 100%;
    height: auto;
    border-radius: var(--t9-r-sm);
}

/* list rows (contact / location / links / social) */
.t9-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.t9-row {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 54px;
    padding: 9px 12px;
    border: 1px solid var(--t9-line);
    border-radius: var(--t9-r-sm);
    background: var(--t9-paper-2);
    color: var(--t9-ink);
    text-decoration: none;
    transition: transform .18s var(--t9-ease), border-color .18s var(--t9-ease), background-color .18s var(--t9-ease);
}

a.t9-row:active {
    transform: scale(.985);
    border-color: var(--t9-accent);
    background: var(--t9-accent-soft);
}

a.t9-row:hover {
    color: var(--t9-ink);
    text-decoration: none;
}

.t9-row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 10px;
    background: var(--t9-accent-soft);
    color: var(--t9-accent);
}

.t9-row-icon svg {
    width: 17px;
    height: 17px;
}

.t9-row-text {
    min-width: 0;
    flex: 1 1 auto;
}

.t9-row-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--t9-ink-faint);
}

.t9-row-value {
    display: block;
    margin-top: 1px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--t9-ink);
    overflow-wrap: break-word;
}

.t9-row-go {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--t9-ink-faint);
}

/* services / bullet list */
.t9-bullets {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.t9-bullets li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 11px 12px;
    border-radius: var(--t9-r-sm);
    background: var(--t9-paper-2);
    border: 1px solid var(--t9-line);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--t9-ink);
    overflow-wrap: break-word;
}

.t9-bullets li::before {
    content: '';
    flex: none;
    width: 7px;
    height: 7px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--t9-accent);
}

/* highlight tiles under the about text */
.t9-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.t9-tiles--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.t9-tile-card {
    --t9-tile: var(--t9-accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 76px;
    padding: 10px 4px 8px;
    border: 1px solid var(--t9-line);
    border-radius: 14px;
    background: #fff;
    text-align: center;
    box-shadow: 0 4px 12px -8px rgba(36, 31, 26, .3);
}

.t9-tile-card svg {
    width: 28px;
    height: 28px;
    color: var(--t9-tile);
    stroke-width: 1.8;
}

.t9-tile-card img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.t9-tile-card span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--t9-ink);
    overflow-wrap: anywhere;
}

/* events */
.t9-events {
    display: flex;
    flex-direction: column;
}

.t9-event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 4px;
    border-bottom: 1px solid var(--t9-line);
    color: var(--t9-ink);
    text-decoration: none;
    border-radius: 12px;
    transition: background-color .2s var(--t9-ease);
}

.t9-event:last-child {
    border-bottom: 0;
}

a.t9-event:hover {
    color: var(--t9-ink);
    text-decoration: none;
    background: var(--t9-accent-soft);
}

a.t9-event:active {
    background: var(--t9-accent-soft);
}

.t9-event-thumb {
    width: 96px;
    height: 68px;
    flex: none;
    border-radius: 10px;
    object-fit: cover;
    background: var(--t9-paper-2);
}

.t9-event-thumb--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    background: var(--t9-accent-soft);
    color: var(--t9-accent);
}

.t9-event-thumb--icon svg {
    width: 26px;
    height: 26px;
}

.t9-event-text {
    flex: 1 1 auto;
    min-width: 0;
}

.t9-event-date {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--t9-ink-faint);
}

.t9-event-title {
    display: block;
    margin-top: 1px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--t9-ink);
    overflow-wrap: break-word;
}

.t9-event-place {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--t9-ink-soft);
    overflow-wrap: anywhere;
}

.t9-event-place svg {
    width: 13px;
    height: 13px;
    margin-top: 1px;
    color: var(--t9-accent);
}

.t9-row-go--chev {
    transform: rotate(-90deg);
}

/* soft secondary button (e.g. "View All Events") */
.t9-soft-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    margin-top: 10px;
    padding: 0 16px;
    border-radius: 12px;
    background: var(--t9-accent-soft);
    color: var(--t9-accent-deep);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s var(--t9-ease), filter .18s var(--t9-ease);
}

.t9-soft-btn:hover {
    color: var(--t9-accent-deep);
    text-decoration: none;
    filter: brightness(.97);
}

.t9-soft-btn:active {
    transform: scale(.98);
}

.t9-soft-btn svg {
    width: 17px;
    height: 17px;
    transition: transform .25s var(--t9-ease);
}

.t9-soft-btn:hover svg {
    transform: translateX(3px);
}

/* media grids */
.t9-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.t9-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.t9-tile {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border: 0;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--t9-paper-2);
    cursor: pointer;
    transition: transform .2s var(--t9-ease);
}

.t9-tile:active {
    transform: scale(.96);
}

.t9-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* catalogue / document cards */
.t9-cards {
    display: grid;
    gap: 9px;
}

.t9-doc {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px;
    border: 1px solid var(--t9-line);
    border-radius: var(--t9-r-sm);
    background: var(--t9-paper-2);
    text-decoration: none;
    color: var(--t9-ink);
    transition: transform .18s var(--t9-ease), border-color .18s var(--t9-ease);
}

button.t9-doc {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.t9-doc:active {
    transform: scale(.985);
    border-color: var(--t9-accent);
}

.t9-doc:hover {
    color: var(--t9-ink);
    text-decoration: none;
}

.t9-doc-thumb {
    width: 54px;
    height: 54px;
    flex: none;
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
}

.t9-doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    flex: none;
    border-radius: 10px;
    background: var(--t9-accent-soft);
    color: var(--t9-accent);
}

.t9-doc-icon svg {
    width: 22px;
    height: 22px;
}

.t9-doc-text {
    min-width: 0;
    flex: 1 1 auto;
}

.t9-doc-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.t9-doc-meta {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--t9-ink-faint);
}

/* video */
.t9-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #14100c;
    cursor: pointer;
    display: block;
}

.t9-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: .92;
    transition: transform .4s var(--t9-ease);
}

.t9-video:active img {
    transform: scale(1.03);
}

.t9-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.t9-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .7);
    transition: transform .22s var(--t9-ease);
}

.t9-video:active .t9-video-play {
    transform: translate(-50%, -50%) scale(.9);
}

.t9-video-play svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
    color: var(--t9-ink);
}

/* enquiry form */
.t9-form {
    display: grid;
    gap: 9px;
}

.t9-field label {
    display: block;
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--t9-ink-faint);
}

.t9-field input,
.t9-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px;
    border: 1px solid var(--t9-line-strong);
    border-radius: 12px;
    background: var(--t9-paper);
    font: inherit;
    font-size: 14px;
    color: var(--t9-ink);
    outline: none;
    transition: border-color .2s var(--t9-ease), box-shadow .2s var(--t9-ease);
}

.t9-field textarea {
    min-height: 92px;
    resize: vertical;
}

.t9-field input:focus,
.t9-field textarea:focus {
    border-color: var(--t9-accent);
    box-shadow: 0 0 0 3px var(--t9-accent-soft);
}

.t9-note {
    display: none;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.t9-note.is-visible {
    display: block;
}

.t9-note--ok {
    background: rgba(31, 122, 80, .12);
    color: #1f7a50;
}

.t9-note--err {
    background: rgba(183, 56, 44, .1);
    color: #b7382c;
}

/* ---------- Footer -------------------------------------------------------- */

.t9-footer {
    margin-top: 18px;
    padding: 20px var(--t9-gutter) 22px;
    text-align: center;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--t9-paper-2));
    border-top: 1px solid var(--t9-line);
}

.t9-quote {
    position: relative;
    margin: 0 0 16px;
    padding: 0 6px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 15.5px;
    font-style: italic;
    line-height: 1.5;
    color: var(--t9-ink);
}

.t9-quote p {
    margin: 0;
}

.t9-quote-mark {
    display: block;
    height: 26px;
    font-size: 46px;
    font-style: normal;
    line-height: 1;
    color: var(--t9-gold);
}

.t9-quote cite {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-style: italic;
    font-weight: 500;
    color: var(--t9-gold-ink);
}

/* Illustrated footer: artwork fills the block, the quote sits in its open
   top-left space, the credit sits on the calm bottom edge */
.t9-footer--art {
    position: relative;
    isolation: isolate;
    min-height: 290px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 28px;
    padding-bottom: 14px;
    background: var(--t9-paper);
    border-top: 0;
}

.t9-footer-art {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 100%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
}

/* the quote owns the open top-left of the artwork — one left edge for the
   mark, the words and the attribution */
.t9-footer--art .t9-quote {
    align-self: flex-start;
    max-width: 68%;
    margin: 0;
    padding: 0 2px;
    text-align: left;
}

.t9-footer--art .t9-quote-mark {
    height: 22px;
    margin-left: -2px;
}

.t9-footer--art .t9-quote cite {
    margin-top: 6px;
}

/* bottom row: the credit on the left, the share action on the right, both
   frosted so they read over any artwork */
.t9-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.t9-footer--art .t9-footer-bar {
    margin-top: auto;
    padding-top: 18px;
}

.t9-powered,
.t9-footer-share {
    border: 1px solid rgba(255, 255, 255, .7);
    background: rgba(255, 253, 250, .82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 22px -16px rgba(20, 16, 12, .55);
}

/* compact credit: the label sits in the logo's empty top-left band,
   starting exactly over the C */
.t9-powered {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 7px 12px 5px;
    border-radius: 14px;
    text-decoration: none;
}

.t9-powered span {
    position: relative;
    z-index: 1;
    font-size: 8.5px;
    font-weight: 700;
    line-height: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--t9-ink-faint);
}

.t9-powered img {
    display: block;
    width: 108px;
    height: auto;
    margin-top: -12px;
}

.t9-footer-share {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--t9-name);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s var(--t9-ease), background-color .2s var(--t9-ease);
}

.t9-footer-share svg {
    width: 16px;
    height: 16px;
}

.t9-footer-share:hover {
    background: #fff;
}

.t9-footer-share:active {
    transform: scale(.95);
}

/* ---------- Dock (compact header after scrolling) -------------------------- */

.t9-dock {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: 0;
    right: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc(100% - 24px);
    max-width: 420px;
    margin: 0 auto;
    padding: 6px 6px 6px 7px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 999px;
    background: rgba(255, 253, 250, .82);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 14px 32px -18px rgba(36, 31, 26, .55);
    overflow: hidden;
    opacity: 0;
    transform: translate3d(0, -130%, 0);
    transition: transform .45s var(--t9-ease), opacity .3s var(--t9-ease);
}

.t9-dock.is-on {
    opacity: 1;
    transform: none;
}

.t9-dock-id {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 40px;
    padding: 0 4px 0 0;
    border: 0;
    background: none;
    color: var(--t9-name);
    font: inherit;
    cursor: pointer;
}

.t9-dock-id img {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 1.5px var(--t9-gold);
}

.t9-dock-id span {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t9-dock-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    min-height: 40px;
    padding: 0 15px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--t9-brand), var(--t9-brand-deep));
    color: var(--t9-brand-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.t9-dock-cta:hover {
    color: var(--t9-brand-ink);
    text-decoration: none;
}

.t9-dock-cta svg {
    width: 16px;
    height: 16px;
}

/* reading progress along the dock's bottom edge */
.t9-dock-progress {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--t9-gold), var(--t9-brand));
    transform-origin: 0 50%;
    transform: scaleX(var(--t9-progress, 0));
}

/* ---------- Row "more" (share this link) --------------------------------- */

.t9-row-shell {
    position: relative;
}

.t9-has-more {
    padding-right: 54px !important;
}

.t9-row-more {
    position: absolute;
    top: 50%;
    right: 6px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-top: -21px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--t9-ink-faint);
    cursor: pointer;
    transition: background-color .2s var(--t9-ease), color .2s var(--t9-ease), transform .2s var(--t9-ease);
}

.t9-row-more svg {
    width: 18px;
    height: 18px;
}

.t9-row-more:hover {
    background: var(--t9-accent-soft);
    color: var(--t9-accent);
}

.t9-row-more:active {
    transform: scale(.9);
}

/* event rows now sit in shells — divide the shells instead */
.t9-events .t9-event {
    border-bottom: 0;
}

.t9-events > * + * {
    border-top: 1px solid var(--t9-line);
}

.t9-chip-btn--icon {
    width: 40px;
    padding: 0;
    justify-content: center;
}

/* ---------- Video card ------------------------------------------------------ */

.t9-video-card {
    border: 1px solid var(--t9-line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 20px -14px rgba(36, 31, 26, .45);
}

.t9-video-card .t9-video {
    border-radius: 0;
}

.t9-video-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .28) 100%);
    pointer-events: none;
}

.t9-video .t9-video-play {
    width: 64px;
    height: 46px;
    border-radius: 14px;
    background: #e62117;
    box-shadow: 0 12px 26px -10px rgba(230, 33, 23, .8);
}

.t9-video .t9-video-play svg {
    color: #fff;
    margin-left: 2px;
}

.t9-video .t9-video-play::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 18px;
    border: 2px solid rgba(255, 255, 255, .7);
    opacity: 0;
    animation: t9-pulse 2.4s 1s var(--t9-ease) infinite;
}

@keyframes t9-pulse {
    0%   { opacity: .8; transform: scale(.9); }
    70%, 100% { opacity: 0; transform: scale(1.25); }
}

.t9-video:hover .t9-video-play {
    transform: translate(-50%, -50%) scale(1.06);
}

.t9-video-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 50px;
    padding: 6px 54px 6px 12px;
}

.t9-video-yt {
    width: 22px;
    height: 22px;
    color: #e62117;
}

.t9-video-title {
    min-width: 0;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--t9-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Share sheet ---------------------------------------------------- */

.t9-sheet {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.t9-sheet[hidden] {
    display: none;
}

.t9-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 12, .5);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .3s var(--t9-ease);
}

.t9-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: calc(100% - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
    background: var(--t9-paper);
    box-shadow: 0 -18px 50px -20px rgba(20, 16, 12, .5);
    transform: translate3d(0, 100%, 0);
    transition: transform .42s cubic-bezier(.2, .9, .25, 1);
    font-family: 'Manrope', system-ui, sans-serif;
    color: var(--t9-ink);
}

.t9-sheet.is-open .t9-sheet-backdrop { opacity: 1; }
.t9-sheet.is-open .t9-sheet-panel { transform: translate3d(0, var(--t9-drag, 0px), 0); }
.t9-sheet.is-dragging .t9-sheet-panel { transition: none; }

.t9-sheet-grip {
    width: 42px;
    height: 5px;
    margin: 2px auto 6px;
    border-radius: 3px;
    background: var(--t9-line-strong);
    touch-action: none;
}

.t9-sheet-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    touch-action: none;
}

.t9-sheet-head h2 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--t9-name);
}

.t9-sheet-x {
    position: absolute;
    right: -6px;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-top: -21px;
    border: 0;
    border-radius: 50%;
    background: var(--t9-paper-2);
    color: var(--t9-ink);
    cursor: pointer;
}

.t9-sheet-x svg {
    width: 18px;
    height: 18px;
}

/* preview of what is being shared */
.t9-share-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 10px 0 16px;
    padding: 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--t9-brand), var(--t9-brand-deep));
    color: var(--t9-brand-ink);
    box-shadow: 0 16px 30px -20px var(--t9-brand);
}

.t9-share-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    flex: none;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    color: var(--t9-brand);
}

.t9-share-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.t9-share-thumb svg {
    width: 28px;
    height: 28px;
}

.t9-share-thumb [hidden] {
    display: none;
}

.t9-share-meta {
    min-width: 0;
}

.t9-share-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.t9-share-host {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    opacity: .78;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* targets — one swipeable row, snapping per tile */
.t9-share-targets {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 68px;
    gap: 6px;
    margin: 0 -18px;
    padding: 4px 18px 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
}

.t9-share-targets::-webkit-scrollbar {
    display: none;
}

.t9-share-target {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--t9-ink);
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    scroll-snap-align: start;
    cursor: pointer;
    animation: t9-rise .4s var(--t9-ease) backwards;
    animation-delay: calc(60ms + var(--i, 0) * 28ms);
}

.t9-share-target:hover {
    color: var(--t9-ink);
    text-decoration: none;
}

.t9-share-target > span:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--t9-tile, #ece6dc);
    color: var(--t9-tile-ink, #fff);
    box-shadow: 0 8px 16px -12px rgba(20, 16, 12, .6);
    transition: transform .2s var(--t9-ease);
}

.t9-share-target:hover > span:first-child {
    transform: translateY(-2px);
}

.t9-share-target:active > span:first-child {
    transform: scale(.9);
}

.t9-share-target svg {
    width: 25px;
    height: 25px;
}

.t9-share-target.is-on > span:first-child {
    box-shadow: 0 0 0 3px var(--t9-paper), 0 0 0 5px var(--t9-brand);
}

/* QR */
.t9-share-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 6px 0 14px;
    padding: 16px;
    border: 1px solid var(--t9-line);
    border-radius: 18px;
    background: #fff;
    animation: t9-pop .3s var(--t9-ease) both;
}

.t9-share-qr[hidden] {
    display: none;
}

.t9-share-qr-code {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    font-size: 12.5px;
    color: var(--t9-ink-faint);
}

.t9-share-qr-code img {
    width: 188px;
    height: 188px;
    image-rendering: pixelated;
}

.t9-share-qr-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--t9-brand-soft);
    color: var(--t9-brand-deep);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}

.t9-share-qr-save[hidden] {
    display: none;
}

.t9-share-qr-save svg {
    width: 15px;
    height: 15px;
}

/* copy field */
.t9-share-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 5px 5px 14px;
    border: 1px solid var(--t9-line-strong);
    border-radius: 14px;
    background: #fff;
}

.t9-share-field {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13.5px;
    color: var(--t9-ink-soft);
    outline: none;
    text-overflow: ellipsis;
}

.t9-share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--t9-brand), var(--t9-brand-deep));
    color: var(--t9-brand-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.t9-share-copy-btn svg {
    width: 16px;
    height: 16px;
}

.t9-share-copy-btn.is-done {
    background: #1f7a50;
}

.t9-share-open {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 46px;
    margin-top: 10px;
    border-radius: 14px;
    border: 1px solid var(--t9-line-strong);
    color: var(--t9-ink);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
}

.t9-share-open[hidden] {
    display: none;
}

.t9-share-open:hover {
    color: var(--t9-ink);
    text-decoration: none;
    background: var(--t9-paper-2);
}

.t9-share-open svg {
    width: 16px;
    height: 16px;
}

/* desktop: a centred dialog instead of a bottom sheet */
@media (min-width: 640px) {
    .t9-sheet {
        align-items: center;
        padding: 24px;
    }

    .t9-sheet-panel {
        border-radius: 26px;
        padding-bottom: 20px;
        transform: translate3d(0, 24px, 0) scale(.97);
        opacity: 0;
        transition: transform .32s var(--t9-ease), opacity .25s var(--t9-ease);
    }

    .t9-sheet.is-open .t9-sheet-panel {
        transform: none;
        opacity: 1;
    }

    .t9-sheet-grip {
        display: none;
    }

    /* mouse users get every target at once instead of a sideways scroller */
    .t9-share-targets {
        grid-auto-flow: row;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-auto-columns: auto;
        row-gap: 12px;
        margin: 0;
        padding: 4px 0 14px;
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

/* ---------- Language sheet --------------------------------------------------- */

.t9-sheet--lang .t9-sheet-panel {
    display: flex;
    flex-direction: column;
    height: min(640px, calc(100% - 24px));
    overflow: hidden;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.t9-lang-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    height: 48px;
    margin: 6px 0 8px;
    padding: 0 14px;
    border: 1px solid var(--t9-line-strong);
    border-radius: 14px;
    background: #fff;
    cursor: text;
    transition: border-color .2s var(--t9-ease), box-shadow .2s var(--t9-ease);
}

.t9-lang-search:focus-within {
    border-color: var(--t9-brand);
    box-shadow: 0 0 0 3px var(--t9-brand-soft);
}

.t9-lang-search svg {
    width: 18px;
    height: 18px;
    color: var(--t9-ink-faint);
}

.t9-lang-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: none;
    font: inherit;
    font-size: 15px;
    color: var(--t9-ink);
    -webkit-appearance: none;
    appearance: none;
}

.t9-lang-search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.t9-lang-list {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 -18px;
    padding: 0 12px 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.t9-lang-group + .t9-lang-group {
    margin-top: 6px;
}

.t9-lang-group-title {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 8px 6px;
    background: var(--t9-paper);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--t9-ink-faint);
}

/* suggested languages as a compact two-column grid */
.t9-lang-group--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

.t9-lang-group--grid .t9-lang-group-title {
    grid-column: 1 / -1;
}

.t9-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    padding: 7px 10px 7px 12px;
    border: 0;
    border-radius: 12px;
    background: none;
    font: inherit;
    text-align: left;
    color: var(--t9-ink);
    cursor: pointer;
    transition: background-color .15s var(--t9-ease);
}

.t9-lang-option:hover,
.t9-lang-option:focus-visible {
    background: var(--t9-paper-2);
    outline: none;
}

.t9-lang-option[aria-selected="true"] {
    background: var(--t9-brand-soft);
}

.t9-lang-names {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.t9-lang-native {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t9-lang-en {
    margin-top: 1px;
    font-size: 11.5px;
    color: var(--t9-ink-faint);
}

.t9-lang-option svg {
    width: 18px;
    height: 18px;
    color: var(--t9-brand);
    opacity: 0;
    stroke-width: 2.2;
}

.t9-lang-option[aria-selected="true"] svg {
    opacity: 1;
}

.t9-lang-empty {
    margin: 0;
    padding: 34px 12px;
    text-align: center;
    font-size: 14px;
    color: var(--t9-ink-faint);
}

.t9-lang-note {
    flex: none;
    margin: 6px 0 0;
    text-align: center;
    font-size: 11px;
    color: var(--t9-ink-faint);
}

/* ---------- Toast ------------------------------------------------------------ */

.t9-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 2147483100;
    max-width: calc(100% - 32px);
    padding: 11px 18px;
    border-radius: 999px;
    background: rgba(28, 24, 20, .92);
    color: #fff;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, 12px, 0);
    transition: opacity .25s var(--t9-ease), transform .25s var(--t9-ease);
}

.t9-toast.is-on {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
}

/* ---------- Focus ------------------------------------------------------- */

.t9-root a:focus-visible,
.t9-root button:focus-visible {
    outline: 2px solid var(--t9-accent, var(--t9-brand));
    outline-offset: 2px;
}

.t9-section-head:focus-visible {
    outline-offset: -3px;
    border-radius: var(--t9-r-md);
}

/* ---------- Lightbox ------------------------------------------------------ */

.t9-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 16, 12, .94);
    opacity: 0;
    transition: opacity .25s var(--t9-ease);
}

.t9-lightbox.is-open {
    display: flex;
    opacity: 1;
}

.t9-lightbox img {
    max-width: 100%;
    max-height: 84vh;
    border-radius: 12px;
    object-fit: contain;
    transform: scale(.96);
    transition: transform .28s var(--t9-ease);
}

.t9-lightbox.is-open img {
    transform: scale(1);
}

.t9-lightbox-close,
.t9-lightbox-nav {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.t9-lightbox-close {
    top: 16px;
    right: 16px;
}

.t9-lightbox-nav.is-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.t9-lightbox-nav.is-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- QR modal ------------------------------------------------------ */

.t9-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 16, 12, .82);
}

.t9-modal.is-open {
    display: flex;
}

.t9-modal-inner {
    background: var(--t9-paper);
    border-radius: 22px;
    padding: 22px;
    text-align: center;
    box-shadow: var(--t9-shadow-pop);
    animation: t9-pop .3s var(--t9-ease) both;
}

.t9-modal-inner svg {
    max-width: 100%;
    height: auto;
}

.t9-modal-inner p {
    margin: 12px 0 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--t9-ink-faint);
}

@keyframes t9-pop {
    from { opacity: 0; transform: scale(.94); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Viewport tuning ----------------------------------------------- */

/* 360 x 800 and narrower */
@media (max-width: 374px) {
    .t9-root { --t9-gutter: 13px; padding-left: 8px; padding-right: 8px; }
    .t9-hero-badge { width: 104px; height: 104px; bottom: -38px; }
    .t9-hero--tall .t9-hero-badge { width: 118px; height: 118px; bottom: -30px; }
    .t9-hero--tall + .t9-identity { padding-top: 40px; }
    .t9-tiles { gap: 6px; }
    .t9-event-thumb { width: 84px; height: 62px; }
    .t9-identity { padding-top: 50px; }
    .t9-section-head { min-height: 54px; gap: 10px; padding: 7px 11px; }
    .t9-section-icon { width: 38px; height: 38px; }
    .t9-section-title { font-size: 14.5px; }
    .t9-social-rail a { width: 39px; height: 39px; }
    .t9-quick a { min-height: 58px; font-size: 10.5px; }
}

/* Desktop keeps the phone-card experience, just floats it on a canvas */
@media (min-width: 768px) {
    .t9-root {
        padding: 34px 16px 44px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .t9-card {
        border-radius: 30px;
    }
}

/* Inside the dashboard editor preview the card sits in a narrow column */
.t9-root.t9-root--preview {
    padding: 10px 0 18px;
    background: transparent;
    min-height: 0;
}

.t9-root--preview .t9-card {
    max-width: 100%;
}

/* ---------- Motion preferences -------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .t9-root *,
    .t9-root *::before,
    .t9-root *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    .t9-section {
        opacity: 1;
        transform: none;
    }

    /* no looping decoration at all */
    .t9-cta::after,
    .t9-dust {
        display: none;
    }

    .t9-hero-ring {
        animation: none !important;
    }

    .t9-hero-media img,
    .t9-hero-badge {
        scale: none;
        translate: none;
    }
}
