/* Raymondovich UI prototype v3 — authenticated workspace visual parity layer.
   Visual rules only. Existing application modules retain ownership of data and interactions. */
:root{
  --rv3-bg:#f2f3f6;--rv3-text:#17191d;--rv3-muted:#5b626d;--rv3-subtle:#8a919b;
  --rv3-line:rgba(20,24,30,.09);--rv3-surface:#fff;--rv3-surface-2:#eceef2;
  --rv3-accent:#d65b1f;--rv3-accent-tint:rgba(214,91,31,.11);--rv3-accent-line:rgba(214,91,31,.32);
  --rv3-glass:rgba(255,255,255,.72);--rv3-glass-line:rgba(20,24,30,.1);--rv3-edge:rgba(255,255,255,.9);
  --rv3-press:rgba(20,24,30,.055);--rv3-shadow:0 14px 40px rgba(22,28,38,.14);
  --rv3-gradient:linear-gradient(145deg,rgba(214,91,31,.05),rgba(255,255,255,.92) 55%);
  --rv3-gradient-accent:linear-gradient(145deg,rgba(214,91,31,.13),rgba(255,255,255,.93) 62%);
  --rv3-gradient-button:linear-gradient(110deg,#d65b1f,#ee8a52);
  --rv3-font:-apple-system,BlinkMacSystemFont,"SF Pro Text",Inter,"Segoe UI",sans-serif;
  --rv3-max-width:480px;--rv3-row-height:64px;--rv3-tab-height:68px;
}
:root[data-theme="dark"]{
  --rv3-bg:#08090b;--rv3-text:#f4f5f7;--rv3-muted:#9a9fa9;--rv3-subtle:#6f7580;
  --rv3-line:rgba(255,255,255,.08);--rv3-surface:#14161a;--rv3-surface-2:#1a1d23;
  --rv3-accent:#ff762f;--rv3-accent-tint:rgba(255,118,47,.14);--rv3-accent-line:rgba(255,118,47,.34);
  --rv3-glass:rgba(26,28,34,.68);--rv3-glass-line:rgba(255,255,255,.12);--rv3-edge:rgba(255,255,255,.1);
  --rv3-press:rgba(255,255,255,.06);--rv3-shadow:0 14px 40px rgba(0,0,0,.45);
  --rv3-gradient:linear-gradient(145deg,rgba(255,118,47,.05),rgba(23,26,32,.92) 55%);
  --rv3-gradient-accent:linear-gradient(145deg,rgba(255,118,47,.17),rgba(36,21,14,.95) 62%);
  --rv3-gradient-button:linear-gradient(110deg,#ff6a27,#ffb078);
}
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --rv3-bg:#08090b;--rv3-text:#f4f5f7;--rv3-muted:#9a9fa9;--rv3-subtle:#6f7580;
    --rv3-line:rgba(255,255,255,.08);--rv3-surface:#14161a;--rv3-surface-2:#1a1d23;
    --rv3-accent:#ff762f;--rv3-accent-tint:rgba(255,118,47,.14);--rv3-accent-line:rgba(255,118,47,.34);
    --rv3-glass:rgba(26,28,34,.68);--rv3-glass-line:rgba(255,255,255,.12);--rv3-edge:rgba(255,255,255,.1);
    --rv3-press:rgba(255,255,255,.06);--rv3-shadow:0 14px 40px rgba(0,0,0,.45);
    --rv3-gradient:linear-gradient(145deg,rgba(255,118,47,.05),rgba(23,26,32,.92) 55%);
    --rv3-gradient-accent:linear-gradient(145deg,rgba(255,118,47,.17),rgba(36,21,14,.95) 62%);
    --rv3-gradient-button:linear-gradient(110deg,#ff6a27,#ffb078);
  }
}
body[data-page="authenticated-workspace"]{background:var(--rv3-bg);color:var(--rv3-text);font-family:var(--rv3-font)}
body[data-page="authenticated-workspace"] .site-header{display:none}
body[data-page="authenticated-workspace"] #main,
body[data-page="authenticated-workspace"] .auth-layout{width:100%;max-width:none;margin:0;padding:0}
.authenticated-app-shell{
  position:relative;display:flex;flex-direction:column;width:100%;max-width:none;height:100dvh;min-height:100dvh;
  margin:0;overflow:hidden;background-color:var(--rv3-bg);
  background-image:radial-gradient(circle 340px at 92% 6%,rgba(214,91,31,.16),transparent 70%);
  border:0;
}
:root[data-theme="dark"] .authenticated-app-shell{background-image:radial-gradient(circle 340px at 92% 6%,rgba(255,105,38,.17),transparent 70%)}
.authenticated-app-content{
  flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  padding:56px 16px calc(var(--rv3-tab-height) + 48px + env(safe-area-inset-bottom,0px));
  scrollbar-width:none;
}
.authenticated-app-content::-webkit-scrollbar{display:none}
.authenticated-app-content>[data-app-screen]{width:100%;max-width:100%;margin:0 auto}
.authenticated-app-content h1{margin:6px 4px 18px;font-size:34px;line-height:1.1;font-weight:700;letter-spacing:-.03em}
.authenticated-app-content h2{letter-spacing:normal}
.authenticated-app-content .app-ui-v3-heading{font-size:34px;line-height:1.1;letter-spacing:-.03em}
.authenticated-app-content .profile-screen,
.authenticated-app-content .profile-subscreen,
.authenticated-app-content .owner-console-shell,
.authenticated-app-content .projects-shell{width:100%;max-width:100%;margin:0 auto}
.profile-screen{padding:0}
.profile-toolbar{min-height:0;margin:0}
.profile-toolbar h1{text-align:left}
.profile-identity{
  display:grid;grid-template-columns:68px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;column-gap:16px;row-gap:5px;
  min-height:104px;margin:0 0 12px;padding:18px;border:1px solid var(--rv3-accent-line);
  border-radius:22px;background:var(--rv3-gradient-accent);box-shadow:none;
}
.profile-avatar{grid-column:1;grid-row:1 / span 2;width:68px;height:68px;border:0;border-radius:50%;background:var(--rv3-accent-tint);color:var(--rv3-accent);box-shadow:0 0 0 2px var(--rv3-bg),0 0 0 3.5px var(--rv3-accent-line),0 0 30px rgba(214,91,31,.18)}
.profile-identity-copy{grid-column:2;grid-row:1;display:grid;gap:5px;min-width:0}
.profile-identity-copy h2{margin:0;color:var(--rv3-text);font-size:20px;font-weight:650;letter-spacing:-.02em;overflow-wrap:anywhere}
.profile-identity-copy p{margin:0;color:var(--rv3-muted);font-size:14px}
.profile-role{grid-column:2;grid-row:2;justify-self:start;margin-top:-4px;padding:3px 11px;border:1px solid var(--rv3-accent-line);border-radius:99px;background:var(--rv3-accent-tint);color:var(--rv3-accent);font-size:12px;font-weight:600}
.profile-groups{display:grid;gap:12px}
.profile-group,.owner-console-group,.profile-settings-card{
  overflow:hidden;border:1px solid var(--rv3-line);border-radius:22px;background:var(--rv3-gradient);box-shadow:none;color:var(--rv3-text)
}
.profile-group-heading,.app-ui-v3-group-label{
  margin:24px 6px 10px;color:var(--rv3-muted);font:500 11px/1.2 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing:.14em;text-transform:uppercase
}
.profile-group-list{display:grid}
.profile-row.app-ui-v3-row,.owner-console-row.app-ui-v3-row{
  position:relative;display:flex;align-items:center;gap:14px;width:100%;min-height:var(--rv3-row-height);
  padding:0 16px 0 12px;border:0;border-radius:0;background:transparent;text-align:left;
  color:var(--rv3-text);box-shadow:none;transition:background .18s ease
}
.profile-row.app-ui-v3-row+.profile-row.app-ui-v3-row::before,
.owner-console-row.app-ui-v3-row+.owner-console-row.app-ui-v3-row::before{
  content:"";position:absolute;top:0;left:66px;right:0;height:1px;background:var(--rv3-line)
}
.profile-row.app-ui-v3-row:active,.owner-console-row.app-ui-v3-row:active{background:var(--rv3-press)}
.profile-row-icon.app-ui-v3-tile,.owner-console-row-icon.app-ui-v3-tile{
  display:grid;width:40px;height:40px;place-items:center;flex:none;border:0;border-radius:12px;
  background:var(--rv3-accent-tint);color:var(--rv3-accent);box-shadow:none
}
.profile-row-title.app-ui-v3-row__title,
.owner-console-row .app-ui-v3-row__title{flex:1;min-width:0;color:var(--rv3-text);font-size:16px;font-weight:500}
.profile-row-value.app-ui-v3-row__value{max-width:48%;color:var(--rv3-muted);font-size:14px}
.profile-row-chevron.app-ui-v3-row__chevron{color:var(--rv3-subtle)}
.profile-empty,.profile-empty-panel{padding:26px 20px;border:0;background:transparent;color:var(--rv3-muted);text-align:center}
.owner-console-groups{display:grid;gap:12px}
.owner-console-group[open]{border-color:var(--rv3-accent-line);background:var(--rv3-gradient-accent)}
.owner-console-group>summary{list-style:none}
.owner-console-group>summary::-webkit-details-marker{display:none}
.owner-console-group-list{display:grid}
.owner-console-group-list .owner-console-row{min-height:var(--rv3-row-height)}
.owner-console-group-summary .owner-console-group-chevron{transition:transform .36s cubic-bezier(.32,.72,0,1)}
.owner-console-group[open] .owner-console-group-summary .owner-console-group-chevron{transform:rotate(90deg)}
.app-placeholder-screen{width:100%;max-width:100%;padding:0}
.app-placeholder-screen h1{margin:6px 4px 18px;font-size:34px}
.app-placeholder-state{border:1px solid var(--rv3-line);border-radius:22px;background:var(--rv3-gradient);box-shadow:none}
.projects-workspace,.owner-console-workspace{padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.projects-content,.ideas-workspace{color:var(--rv3-text)}
.projects-content .projects-page-title,.ideas-workspace .ideas-page-title{font-size:34px;line-height:1.1;letter-spacing:-.03em}
.projects-content .ws-overview,.ideas-workspace .ws-overview{gap:12px}
.projects-content .ws-summary,.ideas-workspace .ws-summary{
  padding:16px 18px;border:1px solid var(--rv3-line);border-radius:20px;background:var(--rv3-gradient);
  box-shadow:none;color:var(--rv3-muted)
}
.projects-content .ws-card,.ideas-workspace .ws-card{
  border:1px solid var(--rv3-line);border-radius:22px;background:var(--rv3-gradient);box-shadow:none;
  color:var(--rv3-text);transition:background .18s ease,border-color .18s ease
}
.projects-content .ws-card.is-focused,.ideas-workspace .idea-card-focused{
  border-color:var(--rv3-accent-line);background:var(--rv3-gradient-accent)
}
.projects-content .ws-group,.ideas-workspace .ws-group{
  overflow:hidden;border:1px solid var(--rv3-line);border-radius:22px;background:var(--rv3-gradient);box-shadow:none
}
.projects-content .ws-group>summary,.ideas-workspace .ws-group>summary{
  min-height:var(--rv3-row-height);padding:0 16px 0 12px;color:var(--rv3-text)
}
.projects-content .ws-group-content,.ideas-workspace .ws-group-content{border-top:1px solid var(--rv3-line)}
.projects-content input,.projects-content select,.projects-content textarea,
.ideas-workspace input,.ideas-workspace select,.ideas-workspace textarea,
.profile-subscreen input,.profile-subscreen select,.profile-subscreen textarea{font-size:16px}
.projects-content button:focus-visible,.ideas-workspace button:focus-visible,
.profile-screen button:focus-visible,.owner-console-shell button:focus-visible{
  outline:2px solid var(--rv3-accent);outline-offset:2px
}
.authenticated-bottom-nav.app-ui-v3-tabbar{
  position:fixed;left:50%;right:auto;bottom:calc(10px + env(safe-area-inset-bottom,0px));
  width:min(calc(var(--rv3-max-width) - 28px),calc(100vw - 28px));height:var(--rv3-tab-height);
  min-height:var(--rv3-tab-height);padding:6px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;
  border:1px solid var(--rv3-glass-line);border-radius:28px;background:var(--rv3-glass);
  box-shadow:inset 0 1px 0 var(--rv3-edge),var(--rv3-shadow);
  -webkit-backdrop-filter:blur(24px) saturate(1.5);backdrop-filter:blur(24px) saturate(1.5);
  transform:translateX(-50%)
}
.authenticated-bottom-nav .app-ui-v3-tab{min-height:0;padding:0;border:1px solid transparent;border-radius:22px;color:var(--rv3-muted);font-size:11px;font-weight:500}
.authenticated-bottom-nav .app-ui-v3-tab.is-active{border-color:var(--rv3-accent-line);background:var(--rv3-gradient-accent);color:var(--rv3-accent);box-shadow:none}
.authenticated-bottom-nav .app-ui-v3-tab.is-active svg{filter:drop-shadow(0 0 7px var(--rv3-accent-glow))}
.authenticated-bottom-nav .app-ui-v3-tab:not(.is-active):active{background:var(--rv3-press);color:var(--rv3-text)}
@media(hover:hover){
 .profile-row.app-ui-v3-row:hover,.owner-console-row.app-ui-v3-row:hover{background:var(--rv3-press)}
 .projects-content .ws-card:hover,.ideas-workspace .ws-card:hover{border-color:var(--rv3-accent-line);background:var(--rv3-gradient-accent);transform:none}
}
@media(max-width:600px){
 .authenticated-app-shell{width:100%;min-height:100dvh;border:0}
 .authenticated-app-content{padding:56px 16px calc(var(--rv3-tab-height) + 48px + env(safe-area-inset-bottom,0px))}
 .profile-identity{grid-template-columns:60px minmax(0,1fr);gap:14px;padding:16px}
 .profile-avatar{width:60px;height:60px}
 .profile-row.app-ui-v3-row,.owner-console-row.app-ui-v3-row{gap:10px;padding-inline:10px}
 .profile-row.app-ui-v3-row+.profile-row.app-ui-v3-row::before,.owner-console-row.app-ui-v3-row+.owner-console-row.app-ui-v3-row::before{left:58px}
 .authenticated-bottom-nav.app-ui-v3-tabbar{bottom:calc(10px + env(safe-area-inset-bottom,0px))}
}
@media(prefers-reduced-motion:reduce){
 .profile-row.app-ui-v3-row,.owner-console-row.app-ui-v3-row,
 .authenticated-bottom-nav.app-ui-v3-tabbar,.authenticated-bottom-nav .app-ui-v3-tab,
 .owner-console-group-summary .owner-console-group-chevron{transition:none}
}

.owner-console-header{margin:0 4px 22px}
.owner-console-eyebrow{margin:6px 0 4px;color:var(--rv3-accent);font:500 11px/1.4 ui-monospace,"SF Mono",Menlo,Consolas,monospace;letter-spacing:.14em;text-transform:uppercase}
.owner-console-title{margin:0 0 10px;font-size:34px;line-height:1.1;font-weight:700;letter-spacing:-.03em}
.owner-console-lead{margin:0;color:var(--rv3-muted);font-size:14px;line-height:1.55}
.profile-tools-screen{width:100%;max-width:100%;padding:0}
.profile-subscreen-header{margin:0 4px 20px}
.profile-subscreen-header h1{margin:6px 0 10px}
.profile-tools-intro{margin:0;color:var(--rv3-muted);font-size:14px;line-height:1.55}
.profile-tools-group{margin:22px 0 0}
.profile-tools-group>h2{margin:0 6px 10px;color:var(--rv3-muted);font:500 11px/1.2 ui-monospace,"SF Mono",Menlo,Consolas,monospace;letter-spacing:.14em;text-transform:uppercase}
.profile-tools-list{overflow:hidden;border:1px solid var(--rv3-line);border-radius:22px;background:var(--rv3-gradient)}
.profile-tool-category-heading{display:grid;gap:3px;padding:14px 16px;color:var(--rv3-text)}
.profile-tool-category-heading small,.profile-tool-row small{color:var(--rv3-muted);font-size:13px}
.profile-tool-row{display:flex;align-items:center;min-height:var(--rv3-row-height);padding:10px 16px;border-top:1px solid var(--rv3-line)}
.profile-tool-row-copy{display:grid;gap:3px;color:var(--rv3-text);font-size:15px}

.profile-appearance-settings{padding:0}
.profile-appearance-settings h2{margin:0;padding:16px 18px 8px;color:var(--rv3-muted);font:500 11px/1.2 ui-monospace,"SF Mono",Menlo,Consolas,monospace;letter-spacing:.14em;text-transform:uppercase}
.profile-theme-toggle{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:var(--rv3-row-height);padding:0 16px;border:0;border-top:1px solid var(--rv3-line);background:transparent;color:var(--rv3-text);text-align:left;font:500 16px/1.3 var(--rv3-font)}
.rv3-switch{position:relative;width:51px;height:31px;flex:none;border:1px solid var(--rv3-line);border-radius:99px;background:var(--rv3-surface-2);transition:background .36s cubic-bezier(.32,.72,0,1)}
.rv3-switch::after{content:"";position:absolute;top:2px;left:2px;width:25px;height:25px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.3);transition:transform .36s cubic-bezier(.32,.72,0,1)}
.profile-theme-toggle[aria-pressed="true"] .rv3-switch{background:var(--rv3-accent)}
.profile-theme-toggle[aria-pressed="true"] .rv3-switch::after{transform:translateX(20px)}

.profile-group.is-accent{border-color:var(--rv3-accent-line);background:var(--rv3-gradient-accent)}
.profile-group.is-accent .profile-row-icon{box-shadow:inset 0 0 0 1px var(--rv3-accent-line)}

.ws-page-title{margin:6px 4px 18px;color:var(--rv3-text);font-size:34px;line-height:1.1;font-weight:700;letter-spacing:-.03em;overflow-wrap:anywhere}

/* Registry controls and summaries — Projects / Ideas. */
.projects-content .ws-toolbar,.ideas-workspace .ws-toolbar{display:flex;align-items:center;gap:10px;margin:6px 0 14px}
.projects-content .ws-search,.ideas-workspace .ws-search{
  flex:1;min-width:0;height:48px;padding:0 14px;border:1px solid var(--rv3-line);border-radius:16px;
  background:var(--rv3-gradient);color:var(--rv3-text);font-size:16px
}
.projects-content .ws-toolbar-actions,.ideas-workspace .ws-toolbar-actions{display:flex;gap:10px}
.projects-content .ws-icon-button,.ideas-workspace .ws-icon-button{
  display:grid;place-items:center;width:48px;height:48px;flex:none;border:1px solid var(--rv3-line);
  border-radius:16px;background:var(--rv3-gradient);color:var(--rv3-text);cursor:pointer
}
.projects-content .ws-icon-button.is-accent,.ideas-workspace .ws-icon-button.is-accent{
  border:0;background:var(--rv3-gradient-button);color:#fff
}
.projects-content .ws-icon-button svg,.ideas-workspace .ws-icon-button svg{width:20px;height:20px}
.projects-content .ws-filters,.ideas-workspace .ws-filters{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:0 0 14px;
  padding:14px;border:1px solid var(--rv3-line);border-radius:18px;background:var(--rv3-gradient)
}
.projects-content .ws-filters[hidden],.ideas-workspace .ws-filters[hidden]{display:none}
.projects-content .ws-filters label,.ideas-workspace .ws-filters label{display:grid;gap:6px;color:var(--rv3-muted);font-size:12px}
.projects-content .ws-filters select,.ideas-workspace .ws-filters select{
  width:100%;min-height:44px;padding:0 10px;border:1px solid var(--rv3-line);border-radius:12px;
  background:var(--rv3-surface);color:var(--rv3-text);font-size:16px
}
.projects-content .ws-overview,.ideas-workspace .ws-overview{display:grid;gap:12px;margin:0 0 12px}
.projects-content .ws-stat-grid,.ideas-workspace .ws-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.projects-content .ws-stat,.ideas-workspace .ws-stat{
  display:grid;gap:10px;min-width:0;padding:16px 18px;border:1px solid var(--rv3-line);
  border-radius:20px;background:var(--rv3-gradient);color:var(--rv3-muted);box-shadow:none
}
.projects-content .ws-stat>span,.ideas-workspace .ws-stat>span{font-size:14px}
.projects-content .ws-stat strong,.ideas-workspace .ws-stat strong{
  color:var(--rv3-text);font-size:36px;line-height:1;font-weight:600;letter-spacing:-.03em
}
.projects-content .ws-stat.is-accent,.ideas-workspace .ws-stat.is-accent{
  border-color:var(--rv3-accent-line);background:var(--rv3-gradient-accent);color:var(--rv3-accent)
}
.projects-content .ws-stat.is-accent strong,.ideas-workspace .ws-stat.is-accent strong{color:var(--rv3-accent)}
.projects-content .ws-summary,.ideas-workspace .ws-summary{display:grid;gap:10px;margin:0;padding:16px 18px}
.projects-content .ws-summary-head,.ideas-workspace .ws-summary-head{display:flex;justify-content:space-between;gap:10px;font-size:14px}
.projects-content .ws-progress,.ideas-workspace .ws-progress{height:8px;margin:0;border-radius:99px;background:var(--rv3-surface-2);overflow:hidden}
.projects-content .ws-progress>span,.ideas-workspace .ws-progress>span{display:block;height:100%;border-radius:inherit;background:var(--rv3-gradient-button)}
.projects-content .ws-summary-foot,.ideas-workspace .ws-summary-foot{font-size:13px;line-height:1.45}
.projects-content .ws-section-title,.ideas-workspace .ws-section-title{
  margin:24px 6px 10px;color:var(--rv3-muted);font:500 11px/1.2 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing:.14em;text-transform:uppercase
}
.projects-content .ws-section-title:not(.is-muted),.ideas-workspace .ws-section-title:not(.is-muted){color:var(--rv3-accent)}
.projects-content .ws-card-list,.ideas-workspace .ws-card-list{display:grid;gap:12px}
.projects-content .ws-card,.ideas-workspace .ws-card{width:100%;padding:18px;text-align:left}
.projects-content .ws-group>summary,.ideas-workspace .ws-group>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}
.projects-content .ws-group-content,.ideas-workspace .ws-group-content{display:grid;gap:0;padding:0}
@media(max-width:360px){
 .projects-content .ws-toolbar,.ideas-workspace .ws-toolbar{gap:7px}
 .projects-content .ws-toolbar-actions,.ideas-workspace .ws-toolbar-actions{gap:7px}
 .projects-content .ws-icon-button,.ideas-workspace .ws-icon-button{width:44px;height:44px}
 .projects-content .ws-stat,.ideas-workspace .ws-stat{padding:14px}
 .projects-content .ws-stat strong,.ideas-workspace .ws-stat strong{font-size:30px}
}

/* Navigation depth and screen motion follow the prototype's tab/push distinction. */
.authenticated-app-content.is-push-screen{padding-bottom:40px}
.authenticated-app-shell.is-push-screen .authenticated-bottom-nav{
  transform:translate(-50%,140%);pointer-events:none
}
.authenticated-app-content.app-ui-v3-screen-enter:not(.is-push-screen){animation:rv3-tab-enter .18s cubic-bezier(.32,.72,0,1) both}
.authenticated-app-content.app-ui-v3-screen-enter.is-push-screen{animation:rv3-push-enter .36s cubic-bezier(.32,.72,0,1) both}
/* Keep transforms off the iOS Safari scroll viewport: transformed overflow containers can retain a stale composited layer after route changes or app suspension. */
@keyframes rv3-tab-enter{from{opacity:0}to{opacity:1}}
@keyframes rv3-push-enter{from{opacity:.65}to{opacity:1}}
@media(prefers-reduced-motion:reduce){
 .authenticated-app-content.app-ui-v3-screen-enter{animation:none}
 .authenticated-app-shell.is-push-screen .authenticated-bottom-nav{transition:none}
}

.profile-empty{justify-items:center;gap:12px;min-height:126px;padding:18px 20px 20px;text-align:center;align-content:center}
.profile-empty-icon{display:grid;width:40px;height:40px;place-items:center;border-radius:13px;background:var(--rv3-accent-tint);color:var(--rv3-accent)}
.profile-empty-icon svg{width:20px;height:20px}
.profile-empty-icon.is-success{background:var(--app-ui-success-surface);color:var(--semantic-success)}
.profile-group[aria-label="Избранное"] .profile-empty::before{content:none;display:none}
.profile-group[aria-label="Избранное"] .profile-group-heading{color:var(--rv3-accent)}
.profile-theme-toggle[aria-checked="true"] .rv3-switch{background:var(--rv3-accent)}
.profile-theme-toggle[aria-checked="true"] .rv3-switch::after{transform:translateX(20px)}
.profile-theme-toggle[aria-checked="false"] .rv3-switch{background:var(--rv3-surface-2)}
.profile-theme-toggle[aria-checked="false"] .rv3-switch::after{transform:translateX(0)}

.profile-section{display:grid;gap:10px;min-width:0}
.profile-groups{gap:22px}
.profile-section>.profile-group-heading{margin:0 6px;color:var(--rv3-muted);font:500 11px/1.2 ui-monospace,"SF Mono",Menlo,Consolas,monospace;letter-spacing:.14em;text-transform:uppercase}
.profile-section[aria-label="Избранное"]>.profile-group-heading{color:var(--rv3-accent)}

.profile-identity.app-ui-v3-group{grid-template-columns:68px minmax(0,1fr);grid-template-rows:auto auto;column-gap:16px;row-gap:5px;min-height:104px;margin:0 0 12px;padding:18px}
.profile-identity.app-ui-v3-group .profile-avatar{grid-column:1;grid-row:1 / span 2;width:68px;height:68px;border:0;border-radius:50%;background:var(--rv3-accent-tint);color:var(--rv3-accent);box-shadow:0 0 0 2px var(--rv3-bg),0 0 0 3.5px var(--rv3-accent-line)}
.profile-identity.app-ui-v3-group .profile-identity-copy{grid-column:2;grid-row:1;min-width:0}
.profile-identity.app-ui-v3-group .profile-role{grid-column:2;grid-row:2;justify-self:start;margin-top:0}
.profile-section>.profile-group-heading{padding:0;border:0;font-size:11px;line-height:1.2;font-weight:500;letter-spacing:.14em}
@media(max-width:600px){.profile-identity.app-ui-v3-group{grid-template-columns:68px minmax(0,1fr);column-gap:16px;row-gap:5px;padding:18px}.profile-identity.app-ui-v3-group .profile-avatar{width:68px;height:68px}}

.authenticated-app-content{padding-top:calc(56px + env(safe-area-inset-top,0px))}
.authenticated-top-bar{
  position:absolute;z-index:8;top:0;right:0;left:0;display:flex;align-items:center;justify-content:center;
  height:calc(52px + env(safe-area-inset-top,0px));padding-top:env(safe-area-inset-top,0px);
  border-bottom:1px solid transparent;color:var(--rv3-text);transition:background .18s ease,border-color .18s ease,backdrop-filter .18s ease
}
.authenticated-app-shell.is-scrolled .authenticated-top-bar{
  border-bottom-color:var(--rv3-line);background:var(--rv3-glass);
  -webkit-backdrop-filter:blur(22px) saturate(1.5);backdrop-filter:blur(22px) saturate(1.5)
}
.authenticated-top-bar-title{max-width:70%;overflow:hidden;color:var(--rv3-text);font-size:17px;font-weight:600;opacity:0;text-overflow:ellipsis;white-space:nowrap;transform:translateY(5px);transition:opacity .18s ease,transform .36s cubic-bezier(.32,.72,0,1)}
.authenticated-app-shell.is-scrolled .authenticated-top-bar-title{opacity:1;transform:none}
.authenticated-back-button{
  position:absolute;top:calc(env(safe-area-inset-top,0px) + 4px);left:10px;display:grid;width:44px;height:44px;place-items:center;
  border:0;border-radius:50%;background:transparent;color:var(--rv3-accent);cursor:pointer
}
.authenticated-back-button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.authenticated-back-button:focus-visible{outline:2px solid var(--rv3-accent);outline-offset:2px}
.authenticated-back-button:active{background:var(--rv3-press)}
.authenticated-back-button[hidden]{display:none}
@media(prefers-reduced-motion:reduce){
 .authenticated-top-bar,.authenticated-top-bar-title{transition:none}
}

.profile-toolbar.app-ui-screen-header{margin:0}
.profile-row-copy{display:grid;min-width:0;gap:3px}
.profile-row-description{display:block;min-width:0;overflow:hidden;color:var(--rv3-muted);font-size:13px;font-weight:400;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.profile-row-value.app-ui-v3-row__value{justify-self:end;max-width:100%;padding:4px 9px;border:1px solid var(--rv3-accent-line);border-radius:99px;background:var(--rv3-accent-tint);color:var(--rv3-accent);font-size:12px;line-height:1.2}
@media(max-width:360px){.profile-row-description{font-size:12px}.profile-row-value.app-ui-v3-row__value{padding:3px 7px;font-size:11px}}

.profile-identity.app-ui-v3-group .profile-identity-copy{gap:4px}
.profile-identity.app-ui-v3-group .profile-identity-copy h2{line-height:1.2}
.profile-identity.app-ui-v3-group .profile-identity-copy p{line-height:1.25}
.profile-identity.app-ui-v3-group .profile-role{padding:2px 11px;line-height:1.2}
.profile-empty{min-height:140px}

.authenticated-app-content .owner-console-title{margin:0 0 10px}

@media(max-width:360px){
 .authenticated-bottom-nav .app-ui-v3-tab{font-size:10px;letter-spacing:-.02em;white-space:nowrap}
}

.profile-settings-screen{display:grid;gap:0}
.profile-settings-section{display:grid;gap:10px;margin:0 0 22px}
.profile-settings-heading{margin:0 6px;padding:0;border:0;color:var(--rv3-muted);font:500 11px/1.2 ui-monospace,"SF Mono",Menlo,Consolas,monospace;letter-spacing:.14em;text-transform:uppercase}
.profile-settings-card{margin:0}
.profile-settings-subsection{display:grid;gap:14px}
.profile-settings-subsection h3{margin:0;color:var(--rv3-text);font-size:16px;font-weight:650}
.profile-settings-subsection+.profile-settings-subsection{margin-top:4px;padding-top:18px;border-top:1px solid var(--rv3-line)}
.profile-appearance-settings{padding:0}
.profile-theme-toggle{min-height:64px;padding:10px 16px;border:0;background:transparent;color:var(--rv3-text);font-size:16px}
.profile-settings-section .profile-settings-card .profile-secondary{min-height:48px}

/* Workspace screens occupy the full authenticated canvas, not a nested outer card. */
.owner-console-workspace:has(.ideas-workspace){padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}

/* Prototype v3: the selected tab is indicated by its accent frame only. */
.authenticated-bottom-nav .app-ui-v3-tab.is-active::after{content:none;display:none}

/* Authenticated workspace must escape the public authorization section wrapper.
   The app is a viewport-level workspace, not a card nested inside the public page. */
body[data-page="authenticated-workspace"]{
  width:100%;
  min-width:0;
  min-height:100dvh;
  margin:0;
  overflow:hidden;
}
body[data-page="authenticated-workspace"] #main > .section:has(.authenticated-app-shell){
  width:100%;
  min-height:0;
  margin:0;
  padding:0;
}
body[data-page="authenticated-workspace"] .auth-layout:has(.authenticated-app-shell){
  display:contents;
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
}
body[data-page="authenticated-workspace"] .authenticated-app-shell{
  position:fixed;
  inset:0;
  z-index:100;
  width:auto;
  max-width:none;
  height:100dvh;
  min-height:100dvh;
  margin:0;
  border:0;
  border-radius:0;
}

/* iPhone viewport: keep the notch/status-bar area clear, but do not reserve
   an empty hidden-header band above the root workspace screens. */
@media(max-width:600px){
  .authenticated-app-content{
    padding-top:calc(var(--safe-top) + 12px);
  }
  .authenticated-app-content.is-push-screen{
    padding-top:calc(var(--safe-top) + 56px);
  }
  .authenticated-top-bar{
    height:calc(52px + var(--safe-top));
    padding-top:var(--safe-top);
  }
  .authenticated-back-button{
    top:calc(var(--safe-top) + 4px);
  }
}


/* Settings and secrets — prototype v3 structure; actions remain UI-only until service integration. */
.profile-settings-screen{width:100%;max-width:100%;padding:0}
.profile-settings-screen .profile-subscreen-header{margin:0 4px 20px}
.profile-settings-screen .profile-subscreen-header h1{margin:6px 0 10px}
.profile-settings-section{display:grid;gap:10px;margin:0 0 22px}
.profile-settings-heading{margin:0 6px;color:var(--rv3-muted);font:500 11px/1.2 ui-monospace,"SF Mono",Menlo,Consolas,monospace;letter-spacing:.14em;text-transform:uppercase}
.profile-settings-card.app-ui-v3-group{margin:0;padding:0;overflow:hidden;border:1px solid var(--rv3-line);border-radius:22px;background:var(--rv3-gradient);box-shadow:none}
.profile-settings-list .profile-row.app-ui-v3-row{min-height:64px;height:64px;padding:0 16px 0 12px}
.profile-settings-list .profile-row.app-ui-v3-row+.profile-row.app-ui-v3-row{border-top:1px solid var(--rv3-line)}
.profile-settings-list .profile-row.app-ui-v3-row+.profile-row.app-ui-v3-row::before{content:none}
.profile-settings-list .profile-row-value.app-ui-v3-row__value{justify-self:end;max-width:46%;padding:0;border:0;border-radius:0;background:transparent;color:var(--rv3-muted);font-size:14px;font-weight:400}
.profile-settings-list .profile-row-description{font-size:13px}
.profile-settings-screen .profile-appearance-settings{padding:0}
.profile-settings-screen .profile-theme-toggle{min-height:64px;padding:0 16px;border:0;background:transparent;color:var(--rv3-text);font-size:16px}
.profile-settings-screen .profile-theme-toggle:focus-visible,
.profile-settings-list .profile-row:focus-visible,
.profile-secrets-add:focus-visible{outline:2px solid var(--rv3-accent);outline-offset:-2px}
.profile-secrets-screen{width:100%;max-width:100%;padding:0}
.profile-secrets-screen .profile-subscreen-header{margin:0 4px 14px}
.profile-secrets-screen .profile-subscreen-header h1{margin:6px 0 10px}
.profile-secrets-intro{margin:0 6px 18px;color:var(--rv3-muted);font-size:14px;line-height:1.55}
.profile-secrets-empty{display:grid;justify-items:center;gap:12px;min-height:150px;padding:24px 20px!important;color:var(--rv3-muted);font-size:14px;line-height:1.5;text-align:center}
.profile-secrets-empty-icon{display:grid;width:40px;height:40px;place-items:center;border-radius:13px;background:var(--rv3-surface-2);color:var(--rv3-muted)}
.profile-secrets-empty-icon svg{width:20px;height:20px}
.profile-secrets-add{width:100%;min-height:50px;margin-top:14px}
.profile-settings-dialog{position:fixed;inset:auto 0 0;width:min(100%,480px);max-width:480px;max-height:min(82dvh,720px);margin:0 auto;padding:0;overflow:auto;border:1px solid var(--rv3-line);border-bottom:0;border-radius:28px 28px 0 0;background:var(--rv3-bg);color:var(--rv3-text);box-shadow:0 -14px 40px rgba(0,0,0,.24)}
.profile-settings-dialog::backdrop{background:rgba(0,0,0,.48);backdrop-filter:blur(3px)}
.profile-settings-dialog-panel{position:relative;display:grid;gap:16px;padding:28px 18px calc(24px + env(safe-area-inset-bottom,0px))}
.profile-settings-dialog-panel h2{margin:0;padding-right:42px;font-size:22px;line-height:1.2;letter-spacing:-.02em}
.profile-settings-dialog-close{position:absolute;top:18px;right:16px;display:grid;width:36px;height:36px;place-items:center;border:1px solid var(--rv3-line);border-radius:50%;background:var(--rv3-surface-2);color:var(--rv3-muted);font-size:24px;line-height:1}
.profile-settings-dialog-field{display:grid;gap:7px;color:var(--rv3-muted);font-size:13px}
.profile-settings-dialog-field input{width:100%;min-height:50px;padding:0 14px;border:1px solid var(--rv3-line);border-radius:14px;background:var(--rv3-gradient);color:var(--rv3-text);font:400 16px/1.3 var(--rv3-font)}
.profile-settings-dialog-field input:focus-visible{border-color:var(--rv3-accent);outline:2px solid var(--rv3-accent);outline-offset:2px}
.profile-settings-dialog-note{margin:0;color:var(--rv3-muted);font-size:13px;line-height:1.45}
.profile-settings-dialog .profile-submit{width:100%;min-height:50px}
@media(max-width:380px){
 .profile-settings-list .profile-row.app-ui-v3-row{gap:10px;padding-inline:10px}
 .profile-settings-list .profile-row-value.app-ui-v3-row__value{max-width:42%;font-size:12px}
}
@media(prefers-reduced-motion:reduce){.profile-settings-dialog{scroll-behavior:auto}}
