/* TalkMed Mobile: one type scale, a quiet canvas, glass on controls. */
:root {
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: var(--font-body);
  --color-text: #302642;
  --body-muted: #71677e;
  --color-accent: #74409d;
  --tm-violet: #74409d;
  --tm-ink: #302642;
  --tm-muted: #71677e;
  --tm-line: #ded7e9;
  --tm-glass: linear-gradient(145deg, #ffffffed, #ffffffa8);
  --tm-shadow: 0 12px 36px #5030780a, 0 2px 5px #50307804;
}
body {
  font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
  color: var(--tm-ink); -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse at 95% 0, #e9d6f8 0, transparent 46%),
    radial-gradient(ellipse at 0 65%, #def4ef 0, transparent 45%), #f7f5fc;
}
button, input, textarea, select { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-heading); letter-spacing: -.025em; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #10818a; outline-offset: 4px;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 82px; min-height: 82px; padding: 16px 32px; gap: 20px;
  background: #ffffffa6; border-bottom: 1px solid #ffffffd9;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.brand-logo { width: 185px; height: auto; }
.top-right { display: flex; gap: 10px; align-items: center; }
.top-right .talkmed-header-account {
  display: inline-flex; min-height: 44px; padding: 10px 16px;
  border-radius: 16px; font-size: .875rem; gap: 8px;
}
.workspace { max-width: 1420px; margin: 0 auto; display: grid; grid-template-columns: 218px minmax(0,1fr); gap: 20px; padding: 24px 28px 24px 12px; }
.sidebar { background: transparent; border: 0; padding: 12px 8px; gap: 28px; }
.sidebar .identity { padding: 8px 12px; gap: 10px; }
.sidebar .identity strong { color: var(--tm-ink); font-size: .9375rem; overflow-wrap: anywhere; }
.sidebar .identity small { color: var(--tm-muted); font-size: .8125rem; }
.sidebar .avatar { width: 42px; height: 42px; background: #ede2f5; color: #714294; border: 1px solid #fff; box-shadow: none; flex: none; }
.sidebar nav { gap: 8px; }
.sidebar .nav-button {
  border: 1px solid transparent; border-radius: 18px; padding: 14px 16px;
  color: #6a5c79; font-size: 1rem; min-height: 54px; gap: 13px;
}
.sidebar .nav-button.active {
  color: #613289; background: var(--tm-glass); border-color: #fff;
  box-shadow: var(--tm-shadow), inset 0 1px 1px #fff; font-weight: 650;
}
.sidebar-foot { padding: 16px 12px; background: transparent; border: 0; border-top: 1px solid var(--tm-line); border-radius: 0; box-shadow: none; }
.sidebar-foot .text-link, .sidebar-foot a { display: flex; gap: 8px; align-items: center; text-align: left; font-size: .875rem; color: #6f587f; min-height: 44px; text-decoration: none; }
.sidebar-foot svg { width: 18px; height: 18px; flex: none; }
#main { min-width: 0; max-width: 1120px; min-height: calc(100dvh - 130px); margin: 0; padding: 30px clamp(22px,3vw,44px) 40px; border: 1px solid #ffffffe6; border-radius: 32px; background: #faf9fddb; box-shadow: var(--tm-shadow); }
.page-heading { margin-bottom: 24px; align-items: center; }
.page-heading h1 { font-size: clamp(1.8rem,3vw,2.35rem); font-weight: 700; line-height: 1.2; letter-spacing: -.035em; margin-top: 0; color: var(--tm-ink); }
.page-heading p { max-width: 58ch; font-size: 1rem; line-height: 1.6; color: var(--tm-muted); }
.page-heading .eyebrow { font-size: .875rem; font-weight: 550; letter-spacing: .01em; text-transform: none; margin-bottom: 8px; display: block; color: #786385; }
.btn { min-height: 48px; border-radius: 16px; font-size: 1rem; font-weight: 600; line-height: 1.35; padding: 13px 20px; letter-spacing: -.01em; gap: 9px; }
.btn-primary, .contact-profile-card .btn-primary, .privacy-editor .btn-primary {
  color: #fff; background: linear-gradient(130deg, #8150b0, #683699);
  border: 1px solid #7240a0; box-shadow: 0 5px 14px #68419121, inset 0 1px 1px #ffffff57;
}
.btn-secondary, .tm-round-button {
  background: var(--tm-glass); color: #674681; border: 1px solid #d9cce4;
  box-shadow: 0 3px 10px #51307608, inset 0 1px 1px #fff;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.btn:active, .tm-action-card:active, .tm-resource:active, .tm-round-button:active { transform: scale(.985); }
.btn:disabled { transform: none; opacity: .5; }
.text-link { font-size: .9375rem; line-height: 1.5; min-height: 44px; }
.panel, .privacy-editor, .privacy-aside, .contact-profile-card, .account-create-guide, .network-search-panel {
  border-radius: 24px; border-color: #e4dced; background: #ffffffd9; box-shadow: var(--tm-shadow);
}
.care-form { gap: 20px; }
.care-form label { font-size: .9375rem; font-weight: 600; line-height: 1.5; color: #554162; }
.care-form input:not([type=checkbox]):not([type=radio]), .care-form textarea, .care-form select {
  border: 1px solid #ddd4e6; border-radius: 14px; background: #fcfbfe;
  min-height: 50px; font-size: 1rem; line-height: 1.5; padding: 12px 14px; color: var(--tm-ink);
}
.care-form input:focus, .care-form textarea:focus, .care-form select:focus { border-color: #9670b5; box-shadow: 0 0 0 3px #8250a912; }
.care-form label small { font-size: .875rem; font-weight: 400; color: var(--tm-muted); }
.care-form .care-check { font-weight: 400; font-size: .9375rem; }
.account-strip { border-radius: 16px; font-size: .875rem; margin-bottom: 22px; box-shadow: none; }
.auth-tabs { padding: 5px; border-radius: 19px; border: 1px solid #e5dcee; background: #f1ebf8; gap: 5px; }
.auth-tabs .btn { border: 0; box-shadow: none; min-height: 46px; font-size: .9375rem; padding: 10px; background: transparent; }
.auth-tabs [aria-pressed=true] { color: #623788; background: #fff; box-shadow: 0 2px 7px #60388412; }
.tm-home { max-width: 1000px; margin: auto; }
.tm-home-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.tm-home-heading h1 { margin: 0; font-size: clamp(2rem,3vw,2.6rem); font-weight: 730; line-height: 1.2; letter-spacing: -.04em; }
.tm-home-heading p { margin: 8px 0 0; color: var(--tm-muted); font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.tm-round-button { display: grid; place-items: center; border-radius: 50%; width: 48px; height: 48px; flex: none; }
.tm-round-button svg { width: 21px; height: 21px; }
.tm-home-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 20px; }
.tm-connect {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 28px; padding: 28px;
  background: radial-gradient(ellipse at 110% 110%, #369f9e70, transparent 55%), linear-gradient(128deg, #8a56b4, #693497 62%, #68419f);
  color: white; border: 1px solid #ffffff75; box-shadow: 0 14px 34px #7950a127, inset 0 1px 1px #ffffff73;
}
.tm-connect-heading { display: flex; align-items: center; gap: 11px; font-size: .875rem; font-weight: 550; color: #faf2ff; margin-bottom: 22px; }
.tm-glass-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; border: 1px solid #ffffff42; background: linear-gradient(140deg,#ffffff36,#ffffff0c); box-shadow: inset 0 1px 0 #ffffff60; }
.tm-glass-symbol svg { width: 24px; height: 24px; }
.tm-connect h2 { font-size: clamp(1.85rem,2.7vw,2.5rem); font-weight: 650; line-height: 1.15; letter-spacing: -.035em; margin: 0 0 12px; color: #fff; }
.tm-connect>p { color: #f3e9fc; font-size: .9375rem; line-height: 1.55; margin-bottom: 24px; max-width: 29ch; }
.tm-connect .tm-glass-primary {
  width: 100%; color: #583076; border-color: #ffffffea;
  background: linear-gradient(135deg, #fffffffa, #f3e6ffeb); border-radius: 17px;
  min-height: 52px; box-shadow: inset 0 2px 2px #fff, 0 6px 18px #3e175c22;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.tm-connect .tm-glass-primary svg { width: 19px; height: 19px; flex: none; }
.tm-connect-help { display: block; width: 100%; margin: 9px 0 -7px; padding: 10px 4px; min-height: 44px; background: transparent; border: 0; color: #f5ecff; font-size: .875rem; text-decoration: underline; text-decoration-color: #ffffff70; text-underline-offset: 4px; }
.tm-glitter { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.tm-glitter i { position: absolute; display: block; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px #fce5ff50; opacity: .65; }
.tm-glitter i:nth-child(1) { right: 16%; top: 13%; width: 5px; height: 5px; }
.tm-glitter i:nth-child(2) { right: 7%; top: 31%; }
.tm-glitter i:nth-child(3) { right: 24%; top: 40%; width: 4px; height: 4px; }
.tm-glitter i:nth-child(4) { right: 10%; top: 62%; width: 2px; height: 2px; }
.tm-glitter i:nth-child(5) { right: 39%; top: 7%; width: 2px; height: 2px; }
.tm-glitter i:nth-child(6) { right: 9%; top: 17%; width: 13px; height: 13px; border-radius: 0; clip-path: polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%); opacity: .8; }
.tm-glitter i:nth-child(7) { right: 23%; top: 57%; width: 10px; height: 10px; border-radius: 0; clip-path: polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%); opacity: .7; }
.tm-home-actions { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; min-width: 0; }
.tm-action-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; min-width: 0; text-align: left; padding: 24px; border: 1px solid #fff; border-radius: 26px; background: var(--tm-glass); box-shadow: var(--tm-shadow), inset 0 1px 1px #fff; color: var(--tm-ink); }
.tm-action-icon { width: 44px; height: 44px; border: 1px solid #ffffffc9; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(140deg, #dff8f0, #c5ece6); color: #1d7676; box-shadow: 0 3px 8px #1487820c, inset 0 1px 0 #fff; }
.tm-action-draft .tm-action-icon { color: #8252a5; background: linear-gradient(140deg, #f1e5fd, #e4d2f4); }
.tm-action-icon svg { width: 23px; height: 23px; }
.tm-action-card strong { display: block; font-size: 1.0625rem; font-weight: 650; line-height: 1.35; }
.tm-action-card small { display: block; margin-top: 6px; font-size: .875rem; color: var(--tm-muted); line-height: 1.45; }
.tm-resources { margin-top: 30px; }
.tm-resources>h2 { font-size: 1.1875rem; line-height: 1.4; font-weight: 650; margin-bottom: 14px; }
.tm-resource-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.tm-resource { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; min-width: 0; padding: 20px; text-align: left; border: 1px solid #e5ddeb; border-radius: 22px; background: #ffffffb8; color: var(--tm-ink); box-shadow: inset 0 1px 0 #fff; }
.tm-resource-icon { color: #806094; }
.tm-resource-icon svg { width: 23px; height: 23px; display: block; }
.tm-resource strong { display: block; font-size: .9375rem; font-weight: 600; line-height: 1.5; }
.tm-resource small { display: block; font-size: .875rem; color: var(--tm-muted); line-height: 1.5; margin-top: 4px; }
.tm-account-entry { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; margin-top: 26px; border-radius: 23px; border: 1px solid #e4d9ed; background: linear-gradient(135deg,#f4edfbd9,#eef9f6b5); }
.tm-account-entry h2 { font-size: 1.125rem; line-height: 1.4; font-weight: 650; margin: 0; }
.tm-account-entry p { font-size: .875rem; color: var(--tm-muted); margin: 6px 0 0; }
.tm-account-actions { display: flex; gap: 10px; flex-shrink: 0; }
.tm-account-actions .btn { font-size: .9375rem; }
.tm-home-footer { margin-top: 24px; }
.tm-home-links, .tm-home-fine { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; }
.tm-home-links button, .tm-home-links a, .tm-home-fine button { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 0; background: none; border: 0; color: #72548a; text-decoration: none; font-size: .875rem; }
.tm-home-links svg { width: 17px; height: 17px; }
.tm-home-fine { margin-top: 5px; padding-top: 9px; border-top: 1px solid #e7deee; color: var(--tm-muted); }
.tm-home-fine span { font-size: .8125rem; line-height: 1.6; }
.tm-home-fine button { font-size: .8125rem; }
.mobile-nav { -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%); }
@media (hover:hover) {
  .btn-primary:hover { background: linear-gradient(130deg,#7945a7,#60318c); }
  .btn-secondary:hover, .tm-action-card:hover, .tm-resource:hover { background: #fff; border-color: #cdbadd; }
  .tm-connect .tm-glass-primary:hover { background: #fff; }
  .tm-home-links a:hover, .tm-home-links button:hover { color: #4e266f; text-decoration: underline; }
}
@media (max-width:1100px) {
  .workspace { grid-template-columns: 188px minmax(0,1fr); gap: 12px; padding-right: 18px; }
  #main { padding-inline: 25px; }
  .tm-home-layout { grid-template-columns: 1fr; }
  .tm-home-actions { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto; }
  .tm-account-entry { flex-direction: column; align-items: flex-start; }
  .tm-resource-list { grid-template-columns: 1fr; gap: 0; border: 1px solid #e5ddeb; border-radius: 24px; overflow: hidden; background: #fff9; }
  .tm-resource { flex-direction: row; align-items: center; border: 0; border-bottom: 1px solid #eee6f3; border-radius: 0; padding: 17px 19px; gap: 16px; background: transparent; }
  .tm-resource:last-child { border-bottom: 0; }
  .tm-resource-icon { flex: none; width: 39px; height: 39px; border-radius: 13px; display: grid; place-items: center; background: #f1eaf8; }
}
@media (max-width:740px) {
  body { background: radial-gradient(ellipse at 100% 10%,#ecdcf7,transparent 45%),radial-gradient(ellipse at 0 70%,#e0f4ee,transparent 42%),#f8f6fc; }
  .topbar { height: 72px; min-height: 72px; padding: 14px 20px; gap: 12px; background: #ffffff85; border-bottom: 1px solid #ffffffa0; }
  .brand { min-width: 0; flex: 1; }
  .brand-logo { width: 140px; max-width: 100%; }
  .top-right { display: flex; gap: 8px; }
  .top-right .talkmed-header-account { font-size: .875rem; min-height: 42px; padding: 10px 12px; border-radius: 14px; }
  .top-right .talkmed-header-account[data-action=account-open] { display: none; }
  .workspace { display: block; padding: 0; }
  .sidebar { display: none; }
  #main { border: 0; border-radius: 0; margin: 0; padding: 24px 20px calc(116px + env(safe-area-inset-bottom)); min-height: calc(100dvh - 72px); background: transparent; box-shadow: none; }
  .tm-home { max-width: 540px; }
  .tm-home-heading { margin-bottom: 22px; gap: 12px; }
  .tm-home-heading h1 { font-size: 2.1rem; }
  .tm-home-heading p { font-size: .9375rem; max-width: 28ch; }
  .tm-round-button { width: 44px; height: 44px; }
  .tm-home-layout { grid-template-columns: 1fr; gap: 16px; }
  .tm-connect { padding: 24px; border-radius: 26px; }
  .tm-connect-heading { margin-bottom: 16px; }
  .tm-connect h2 { font-size: 2rem; line-height: 1.12; }
  .tm-connect>p { margin-bottom: 20px; max-width: none; }
  .tm-home-actions { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto; gap: 12px; }
  .tm-action-card { padding: 18px 16px; gap: 13px; border-radius: 22px; justify-content: flex-start; }
  .tm-action-card strong { font-size: 1rem; }
  .tm-action-card small { font-size: .875rem; }
  .tm-action-icon { width: 40px; height: 40px; border-radius: 14px; }
  .tm-resources { margin-top: 26px; }
  .tm-resources>h2 { font-size: 1.125rem; margin-bottom: 13px; }
  .tm-resource small { font-size: .875rem; }
  .tm-account-entry { padding: 20px; gap: 16px; }
  .tm-account-actions { width: 100%; gap: 8px; }
  .tm-account-actions .btn { flex: 1; padding: 12px 10px; font-size: .875rem; }
  .tm-home-links { gap: 0 12px; }
  .tm-home-links a, .tm-home-links button { font-size: .875rem; }
  .tm-home-fine { gap: 0 12px; }
  .page-heading h1, .page-heading:has(.pseudonym-pill) h1 { font-size: 1.8rem; }
  .page-heading p { font-size: 1rem; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  .panel { padding: 21px 18px; }
  .mobile-nav { display: flex; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 500px; margin: auto; padding: 6px; gap: 4px; border: 1px solid #fff; border-radius: 25px; background: #ffffffcf; box-shadow: 0 9px 32px #57337c1a, inset 0 1px 1px #fff; }
  .mobile-nav button { min-height: 58px; min-width: 0; padding: 8px 3px; border-radius: 19px; color: #796b86; font-size: .875rem; gap: 4px; font-weight: 500; }
  .mobile-nav button svg { width: 21px; height: 21px; }
  .mobile-nav button.active { background: linear-gradient(135deg,#ede2f8e6,#f7efffea); color: #693b90; box-shadow: inset 0 1px 0 #fff,0 2px 5px #63358a0a; }
  .mobile-nav button.active svg { color: #74449b; stroke-width: 1.9; }
}
@media (max-width:360px) {
  .topbar { padding-inline: 16px; }
  #main { padding-inline: 16px; }
  .tm-connect { padding: 22px 20px; }
  .tm-action-card { padding: 16px 13px; }
  .tm-home-links { flex-direction: column; align-items: flex-start; }
  .mobile-nav { left: 10px; right: 10px; }
}
@media (prefers-reduced-motion:no-preference) {
  .tm-action-card,.tm-resource,.tm-round-button { transition: background .2s,border-color .2s,transform .2s; }
  .page-enter .tm-home-heading,.page-enter .tm-home-layout { animation: tm-arrive .42s ease-out both; }
  .page-enter .tm-home-layout { animation-delay: .06s; }
  .page-enter .tm-glitter i { animation: tm-light 3s ease-in-out 2; }
  .page-enter .tm-glitter i:nth-child(2n) { animation-delay: .65s; }
}
@keyframes tm-arrive { from { opacity: .65; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tm-light { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-transparency:reduce) { .topbar,.mobile-nav,.tm-action-card,.btn-secondary { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (forced-colors:active) { .tm-glitter { display: none; } .tm-connect,.tm-action-card,.tm-resource,.tm-round-button,.mobile-nav,.btn { background: Canvas; color: CanvasText; border: 1px solid CanvasText; } .tm-connect h2,.tm-connect p,.tm-connect-heading,.tm-connect-help { color: CanvasText; } }
