/* Apple-platform presentation principles adapted to the existing spherical scene.
   Color describes a direction; connection ink continues to describe edge type. */
#stage .tile .sw-emblem{width:30px;height:30px;flex:none;border-radius:var(--r-mini);background:var(--widget-wash);color:var(--widget-accent);display:grid;place-items:center}
#stage .tile .sw-head{height:30px;gap:8px}
#stage .tile .sw-head .sw-emblem .apple-symbol{width:21px;height:21px;color:inherit;margin:0;position:static}
#stage .tile .sw-label{color:var(--ink-2);font-size:11px}
#stage .tile .sw-card[data-size=mini] .sw-head{height:24px}
#stage .tile .sw-card[data-size=mini] .sw-emblem{width:24px;height:24px;border-radius:var(--r-mini)}
#stage .tile .sw-card[data-size=mini] .sw-emblem .apple-symbol{width:17px;height:17px}
#stage .tile .sw-card[data-size=mini] .sw-title{font-size:15px;line-height:1.25}
#stage .tile .sw-card[data-form=note] .sw-preview{background:#fff7df;border:0;border-radius:var(--r-field);padding:10px 12px}
#stage .tile .sw-card[data-form=document] .sw-preview{background:#f5f5f7;border:0;border-radius:var(--r-mini);padding:10px 12px}
#stage .tile .sw-card[data-form=mail] .sw-preview{border-top:1px solid #e5e5ea;padding-top:10px}
#stage .tile .sw-card[data-form=transcript] .sw-preview{background:var(--widget-wash);border:0;padding:10px 12px;border-radius:var(--r-field)}
#stage .tile .sw-card[data-form=chronology] .sw-date{display:flex;align-items:baseline;gap:8px;color:var(--widget-accent)}
#stage .tile .sw-date b{font-size:40px;line-height:1;letter-spacing:var(--tr-26);font-weight:600;font-variant-numeric:tabular-nums}
#stage .tile .sw-date span{font-size:13px;color:var(--ink-2)}
#stage .tile .sw-card[data-form=chronology] .sw-row{align-items:center}
#stage .tile .sw-card[data-form=chronology] .sw-index{border-radius:var(--r-mini);padding:4px;background:var(--widget-wash);color:var(--widget-accent)}
#stage .tile .sw-card[data-form=process] .sw-index{border-radius:50%;display:grid;place-items:center;width:22px;height:22px;background:var(--widget-wash);color:var(--widget-accent);font-weight:600}
#stage .tile .sw-card[data-form=process] .sw-row{align-items:center}
#stage .tile .sw-progress{display:flex;flex-direction:column;gap:4px}
#stage .tile .sw-progress progress{appearance:none;width:100%;height:5px;border:0;border-radius:var(--r-mini);overflow:hidden;background:#e5e5ea;accent-color:var(--widget-accent)}
#stage .tile .sw-progress progress::-webkit-progress-bar{background:#e5e5ea}
#stage .tile .sw-progress progress::-webkit-progress-value{background:var(--widget-accent);border-radius:var(--r-mini)}
#stage .tile .sw-progress small{font-size:11px;line-height:1.3;color:var(--ink-2)}
#stage .tile .sw-priority{margin-left:auto;font-size:11px;font-weight:600;color:var(--ink-2)}
#stage .tile .sw-priority[data-priority=urgent]{color:var(--danger)}
#stage .tile .sw-priority[data-priority=high]{color:#915510}
#stage .tile .sw-mosaic{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#stage .tile .sw-mosaic-item{display:flex;min-width:0;align-items:center;flex-direction:column;gap:5px;padding:8px 4px;background:var(--widget-wash);border-radius:var(--r-field)}
#stage .tile .sw-mosaic-item .apple-symbol{position:static;width:22px;height:22px;color:var(--widget-accent);margin:0}
#stage .tile .sw-mosaic-item small{font-size:11px;color:var(--ink-2);width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#stage .tile .sw-route-types{display:flex;flex-wrap:wrap;gap:4px 8px;flex:none}
#stage .tile .sw-route-type{font-size:11px;color:var(--route-color);display:inline-flex;align-items:center;gap:4px}
#stage .tile .sw-route-type:before{content:'';width:12px;height:2px;background:currentColor;border-radius:2px}
#stage .tile button.sw-related-row{width:100%;text-align:left;padding:8px 0;min-height:44px;color:#1d1d1f;background:none;transition:color 160ms cubic-bezier(.2,1,.3,1)}
#stage .tile button.sw-related-row:hover{color:var(--widget-accent)}
#stage .tile .sw-related{gap:2px;padding-top:8px}
#stage .tile .sw-related-row .apple-symbol{color:var(--widget-accent);width:16px;height:16px}
#stage .tile .sw-card[data-size=mini] .sw-meta{color:#626773}
#stage .tile.surface-peer:has(.sw-card[data-form=note]){height:182px}
#stage .tile.surface-peer:has(.sw-card[data-form=chronology]),#stage .tile.surface-peer:has(.sw-card[data-form=process]){height:242px}
#stage .tile.surface-peer:has(.sw-card[data-form=workspace]){height:228px}
#stage .tile.surface-peer .surface-body{height:100%;max-height:none}
#stage .tile.surface-peer .sw-card .sw-title{font-size:17px}
#stage .tile.surface-peer .sw-card .sw-date b{font-size:28px}
#stage .tile.surface-peer .sw-route-types{margin-top:auto}
#stage .tile.surface-peer .sw-meta{display:none}
#stage .tile.surface-hero .sw-related{flex:none}
#stage .tile.surface-hero .sw-preview{flex-shrink:1}
#stage .tile.micro:not(.surface-peer):not(.surface-hero):has(.sw-card){border-radius:var(--r-surface)}
#stage .tile.micro .sw-card{position:relative;padding-left:32px;justify-content:center}
#stage .tile.micro .sw-card .sw-head{position:absolute;left:0;top:50%;transform:translateY(-50%)}
#stage .tile.micro .sw-title{font-size:12px}
#stage .tile.micro .sw-format{display:none}
#stage .tile .surface-relation-filter{grid-column:1/-1;grid-row:3;width:100%;min-height:36px;padding:6px 10px;background:#f2f2f7;color:#34343a;border:0;border-radius:var(--r-field);font:500 12px -apple-system,BlinkMacSystemFont,system-ui,sans-serif;cursor:pointer}
#stage .tile .surface-relation-filter:focus-visible{outline:2px solid #007aff;outline-offset:2px}
#stage .tile .projection-mosaic{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0}
#stage .tile .projection-member{background:#f2f5f9;border-radius:var(--r-field);padding:10px;min-width:0;display:flex;align-items:center;gap:8px;text-align:left;color:#34343a}
#stage .tile .projection-member .apple-symbol{position:static;width:25px;height:25px;flex:none;margin:0;color:#1767b0}
#stage .tile .projection-member[data-kind=Заметка]{background:#fff7df}
#stage .tile .projection-member[data-kind=Заметка] .apple-symbol{color:#896014}
#stage .tile .projection-member[data-kind=Кейс]{background:#f6f0fa}
#stage .tile .projection-member[data-kind=Кейс] .apple-symbol{color:#7651a3}
#stage .tile .projection-member>span:last-child{font-size:11px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#stage .tile:not(.surface-hero) .projection-mosaic{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
#stage .tile:not(.surface-hero) .projection-member{justify-content:center;padding:8px 4px}
#stage .tile:not(.surface-hero) .projection-member>span:last-child{display:none}
#stage .tile:has(.projection-mosaic) .projection-count b{font-size:28px}
#stage .tile.surface-hero:has(.projection-mosaic) .projection-count b{font-size:34px}
#stage .tile[data-corpus-role] .corpus-head>.apple-symbol{width:32px;height:32px;padding:6px;border-radius:var(--r-field);color:#007aff;background:#edf5ff}
#stage .tile[data-corpus-symbol="person.crop.circle"] .corpus-head>.apple-symbol{color:#00c7be;background:#e6f8f7}
#stage .tile[data-corpus-symbol="calendar"] .corpus-head>.apple-symbol{color:#ff3b30;background:#fff0f0}
@media(max-width:650px){
 #stage .tile .sw-date b{font-size:28px}
 #stage .tile.surface-hero .sw-card{gap:9px}
 #stage .tile.surface-hero .sw-route-types{gap:3px 6px}
 #stage .tile.surface-hero .projection-member{padding:8px;gap:6px}
 #stage .tile.surface-hero .projection-member>span:last-child{font-size:11px}
}
@media(max-width:650px) and (max-height:650px){
 #stage .tile.surface-peer:has(.sw-card){height:140px}
 #stage .tile.surface-peer .sw-progress,#stage .tile.surface-peer .sw-date,#stage .tile.surface-peer .sw-mosaic,#stage .tile.surface-peer .sw-route-types{display:none}
}
@media(prefers-reduced-motion:reduce){#stage .tile button.sw-related-row{transition:none cubic-bezier(.2,1,.3,1)}}
@media(prefers-contrast:more){#stage .tile .sw-label,#stage .tile .sw-meta,#stage .tile .sw-route-type{color:#1d1d1f}}

/* A2 (канон apple-interaction): press-отклик первым кадром, тишина при reduced. */
#stage .tile button.sw-related-row:active{color:var(--widget-accent);opacity:.7}
