/* Existing page styles remain shared; this layer adapts the application shell. */
.mobile-header, .mobile-bottom-nav { display: none; }
.settings-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.settings-links button { min-height: 44px; }
.settings-links button span { margin-left: 16px; }
.settings-logout { color: #c50000; }
.extra-task-card .extra-count { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.extra-task-card .extra-count progress { grid-column: 1 / -1; width: 100%; }
.extra-task-card .extra-count small { display: block; margin-bottom: 4px; }

@media (max-width: 900px) {
    html { scroll-padding-top: 82px; scroll-padding-bottom: 90px; }
    .app-panel { min-height: 100dvh; }
    .app-panel .sidebar { display: none; }
    .mobile-header {
        position: fixed; inset: 0 0 auto; z-index: 40;
        display: flex; align-items: center; justify-content: space-between;
        height: calc(64px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 18px 0;
        background: var(--surface); border-bottom: 1px solid var(--line);
    }
    .mobile-profile-button { border: 0; background: transparent; padding: 4px; border-radius: 50%; cursor: pointer; }
    .mobile-profile-button .user-avatar { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; min-width: 38px; margin: 0; overflow: hidden; border-radius: 50%; }
    .mobile-profile-button img { width: 100%; height: 100%; object-fit: cover; }
    .app-panel .main-content {
        margin-left: 0; min-width: 0; width: 100%;
        padding: calc(84px + env(safe-area-inset-top, 0px)) 16px calc(96px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-bottom-nav {
        display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
        position: fixed; inset: auto 0 0; z-index: 40;
        background: var(--surface); border-top: 1px solid var(--line);
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-nav-item {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
        min-height: 56px; border: 0; border-radius: 10px; background: transparent;
        color: var(--muted); font: inherit; font-size: calc(11px * var(--text-scale, 1)); font-weight: 650; cursor: pointer;
    }
    .mobile-nav-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .mobile-nav-item.active { color: #c50000; background: rgba(197, 0, 0, .06); }
    :root[data-theme="dark"] .mobile-nav-item.active { color: #ff8989; background: rgba(255, 137, 137, .08); }
    .mobile-nav-item:focus-visible, .mobile-profile-button:focus-visible { outline: 2px solid #c50000; outline-offset: -2px; }
    .page-header { align-items: flex-start; gap: 12px; margin-bottom: 20px; }
    .page-header h1 { font-size: calc(23px * var(--text-scale, 1)); }
    .page-header-actions { flex-wrap: wrap; gap: 8px; }
    .page-header-actions > * { min-height: 44px; }
    .task-tabs { display: flex; gap: 6px; }
    .task-tab { flex: 1; min-width: 0; min-height: 44px; padding: 9px 7px; }
    .task-card, .member-card, .team-card { min-width: 0; overflow-wrap: anywhere; }
    .task-actions { flex-wrap: wrap; }
    .task-actions button { min-height: 44px; }
    .modal-overlay { padding: 12px; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
    .modal { max-width: 100%; max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
    .modal input:not([type="checkbox"]):not([type="radio"]), .modal select, .modal textarea,
    .settings-form input:not([type="checkbox"]), .settings-form select, .settings-form textarea { font-size: 16px; max-width: 100%; }
    .modal-footer { flex-wrap: wrap; }
    #calendarGrid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .settings-links { display: grid; grid-template-columns: 1fr auto; }
}

@media (max-width: 600px) {
    .tasks-grid, .idea-list.tasks-grid, .members-grid, .teams-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .page-header { flex-direction: column; }
    .page-header-actions { width: 100%; }
    .page-header-actions > * { flex: 1; }
    .idea-toolbar, .idea-toolbar-actions { flex-wrap: wrap; min-width: 0; }
    .idea-type-tabs { width: 100%; }
    .idea-toolbar-actions { width: 100%; }
    .idea-toolbar-actions select { min-width: 0; flex: 1; }
    .settings-links { grid-template-columns: 1fr; }
}

.idea-trash { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.idea-trash svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.idea-type-tabs:empty { display: none; }

.member-permissions { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 16px 0; }
.member-permissions legend { font-weight: 700; padding: 0 6px; }
.member-permissions p { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.member-permissions label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.member-permissions input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; accent-color: #c50000; }

.password-field { position: relative; width: 100%; }
.password-field input { width: 100%; padding-right: 48px !important; }
.password-toggle { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted, #666); cursor: pointer; }
.password-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle:focus-visible { outline: 2px solid #c50000; outline-offset: -3px; }

.permission-group { border-top: 1px solid var(--line, #e5e5e5); }
.permission-group summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 2px; cursor: pointer; font-weight: 650; color: var(--ink, #222); list-style: none; }
.permission-group summary::-webkit-details-marker { display: none; }
.permission-group summary::after { content: ''; width: 8px; height: 8px; flex: 0 0 8px; margin-right: 5px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.permission-group[open] summary::after { transform: rotate(225deg); }
.permission-group summary:focus-visible { outline: 2px solid #c50000; outline-offset: -2px; border-radius: 6px; }
.member-permissions .permission-options { padding: 0 4px 12px 16px; }
.member-permissions .permission-options label { font-weight: 400; line-height: 1.5; padding: 6px 0; }

.idea-card .idea-description { min-height: 0 !important; margin-bottom: 10px; }
.idea-card .content-details-button { align-self: flex-start; min-height: 40px; }
.calendar-detail-task .calendar-detail-body > p { margin: 6px 0 10px; }
.content-details-button { margin: 4px 0 10px; }
.content-detail-modal { width: min(680px, 100%); }
.content-full-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.content-full-text a { color: #1769c2; text-decoration: underline; }
:root[data-theme="dark"] .content-full-text a { color: #80baff; }
.content-media figure { margin: 18px 0; }
.content-media img, .content-media video { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto 8px; border-radius: 10px; object-fit: contain; }
.content-media video { width: 100%; background: #111; }
.content-media figcaption { overflow-wrap: anywhere; font-size: 13px; }
.content-link-preview { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-top: 8px; max-height: 180px; overflow: auto; }
.content-link-preview small { color: var(--muted); }

.idea-card.idea-approved { background: #f0f9f2; }
:root[data-theme="dark"] .idea-card.idea-approved { background: #1d3027; }
.content-detail-meta { display: grid; gap: 6px; margin-bottom: 16px; font-size: 13px; overflow-wrap: anywhere; }
.content-detail-meta .detail-facts { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
.content-detail-meta .detail-facts:empty { display:none; }
.content-detail-meta .detail-fact { flex:1 1 100px; min-width:0; padding:12px; border:1px solid var(--line, #e5e7eb); border-radius:10px; background:color-mix(in srgb, var(--muted, #777) 5%, transparent); }
.content-detail-meta .detail-fact-date { flex-basis:180px; }
.content-detail-meta dt { margin:0 0 7px; font-size:12px; font-weight:500; color:var(--muted, #666); }
.content-detail-meta dd { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0; font-size:14px; font-weight:650; color:var(--ink, #222); }
.content-detail-meta .detail-time { font-size:13px; font-weight:500; color:var(--muted, #666); }
.content-detail-meta .detail-status { display:inline-flex; align-items:center; gap:7px; }
.content-detail-meta .detail-status::before { content:''; width:7px; height:7px; flex:none; border-radius:50%; background:currentColor; opacity:.65; }
.content-detail-meta .detail-xp { color:#b42318; }
.content-detail-meta .detail-xp span { font-size:11px; }
.content-detail-meta .detail-teams-section h3 { margin:0 0 10px; font-size:14px; font-weight:650; color:var(--ink, #222); }
.content-detail-meta .detail-teams-list { display:grid; gap:8px; }
:root[data-theme="dark"] .content-detail-meta .detail-xp { color:#ff9c94; }

.task-card .task-card-header { min-height: 0 !important; }
.task-card .task-card-header h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.task-card .task-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 0 !important; }
.task-card .task-description a { color: #1769c2; text-decoration: underline; }
:root[data-theme="dark"] .task-card .task-description a { color: #80baff; }
.compact-task-card > .idea-files, .compact-task-card .task-team-chips, .compact-task-card > .task-assignees { display: none !important; }
.task-card .task-actions { display: flex; flex-wrap: nowrap; gap: 5px; align-items: center; }
.task-card .task-actions button { flex: 0 1 auto; min-width: 0; padding: 8px; white-space: nowrap; }
.task-card .task-actions button[hidden] { display: none !important; }
.task-card .action-icon { display: none; }
 .task-card .task-actions.compact-actions .action-label { display: none; }
.task-card .task-actions.compact-actions .action-icon { display: inline; font-size: 19px; line-height: 1; }
.task-card .task-actions.compact-actions button { min-width: 34px; min-height: 40px; padding: 6px; }
.task-card .task-actions.compact-actions .idea-trash { min-width: 34px; }

.task-card .task-card-header h3 { min-width:0; flex:1 1 auto; }
.task-card .task-card-header .status-badge { flex:0 0 auto; white-space:nowrap; overflow-wrap:normal; word-break:normal; }
.content-detail-meta .detail-team { padding:10px 12px; border-left:3px solid var(--team-color); border-radius:8px; background:var(--team-soft); }
.content-detail-meta .detail-team-title { color:var(--team-color); }
.content-detail-meta .detail-members { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.content-detail-meta .detail-members .assignee { color:var(--team-color); background:var(--team-soft); border:1px solid var(--team-color); padding:4px 8px; border-radius:20px; }
:root[data-theme="dark"] .content-detail-meta .detail-team { background:color-mix(in srgb, var(--team-color) 15%, #20242a); }
.member-xp-panel { margin:16px 0; padding:14px; border:1px solid var(--line, #ddd); border-radius:12px; }
.member-xp-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.member-xp-heading h3 { margin:0; font-size:15px; }
.member-xp-heading strong { color:#b42318; background:#fbeeed; padding:6px 10px; border-radius:8px; }
.member-xp-panel p { font-size:12px; line-height:1.6; color:var(--muted, #666); margin:10px 0; }
.member-xp-inputs { display:flex; flex-wrap:wrap; gap:10px; }
.member-xp-inputs label { flex:1 1 140px; min-width:0; font-size:13px; }
.member-xp-inputs input, .member-xp-inputs select { display:block; width:100%; margin-top:6px; }
.member-xp-panel button { min-height:44px; }
.member-xp-panel p:empty { display:none; }
.task-card .action-icon svg { width:20px; height:20px; display:block; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.task-card .task-actions.compact-actions .action-icon { vertical-align:middle; }
.help-hint { display:inline-flex; vertical-align:middle; margin-left:5px; position:relative; }
.help-info { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; padding:4px; border:0; border-radius:50%; background:transparent; color:var(--muted, #666); cursor:pointer; }
.help-info svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
.help-info:hover, .help-info:focus-visible { color:#b42318; background:#fbeeed; outline:2px solid transparent; }
.help-tooltip { display:none; position:absolute; top:calc(100% + 6px); left:0; width:max-content; max-width:min(340px, calc(100vw - 32px)); padding:12px 14px; border-radius:10px; background:#25282e; color:#fff; font-size:13px; font-weight:400; line-height:1.6; box-shadow:0 6px 24px #0003; z-index:20000; white-space:normal; }
.help-hint:hover .help-tooltip, .help-hint:focus-within .help-tooltip, .help-open .help-tooltip { display:block; }
.project-purpose-button { display:block; margin:12px auto 20px; padding:8px 12px; border:0; background:transparent; color:#b42318; font:inherit; font-size:13px; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.project-purpose-dialog { width:min(600px, calc(100vw - 32px)); max-height:85dvh; margin:auto; padding:24px; border:1px solid var(--line, #ddd); border-radius:16px; background:var(--surface, #fff); color:var(--ink, #222); overflow:auto; }
.project-purpose-dialog::backdrop { background:#0008; }
.project-purpose-dialog h2 { font-size:20px; }
.project-purpose-dialog h3 { font-size:15px; margin:20px 0 6px; }
.project-purpose-dialog p { font-size:14px; line-height:1.75; margin:10px 0; }
:root[data-theme="dark"] .project-purpose-dialog { background:#20242a; color:#f3f4f6; }

.help-heading { display:flex; align-items:center; justify-content:flex-start; gap:5px; min-width:0; }
.help-heading > label, .help-heading > h2, .help-heading > h3, .help-heading > small { margin:0; flex:0 1 auto; width:auto; }
.help-heading > .help-hint { flex:0 0 auto; margin-left:0; }
.member-delete-panel { margin-top:20px; padding-top:16px; border-top:1px solid var(--line, #ddd); }
.member-delete-panel p { font-size:13px; line-height:1.65; margin:12px 0; overflow-wrap:anywhere; }
.member-delete-panel button { min-height:44px; }
.member-profile-editor { border:1px solid var(--line, #ddd); border-radius:12px; padding:14px; margin-bottom:16px; }
.member-profile-editor summary { font-weight:650; cursor:pointer; margin-bottom:12px; }
.member-image-preview { display:block; max-width:100%; width:160px; max-height:100px; object-fit:cover; border-radius:10px; margin:8px 0; }
.member-image-preview[hidden] { display:none; }
.member-xp-operations { display:flex; gap:4px; flex:1 1 100%; padding:4px; border-radius:10px; background:color-mix(in srgb, var(--muted, #777) 8%, transparent); }
.member-xp-operations button { flex:1; min-width:0; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--ink, #222); padding:8px 5px; font:inherit; font-size:12px; cursor:pointer; }
.member-xp-operations button[aria-pressed="true"] { color:#b42318; border-color:#b42318; background:#fbeeed; }
.member-teams-section { padding:12px; border:1px solid var(--line, #ddd); border-radius:12px; }
.member-teams-section > summary { cursor:pointer; min-height:32px; }
.member-teams-section > summary::after { content:'⌄'; margin-left:8px; }
.member-teams-section[open] > summary::after { content:'⌃'; }
.member-teams-section .member-editor-team-grid { margin-top:12px; }
.member-footer-actions { display:flex; flex-wrap:nowrap!important; gap:8px; justify-content:flex-end; }
.member-footer-actions #memberDelete { margin-right:auto; }
.member-footer-actions button { flex:0 1 auto; padding:10px; white-space:nowrap; }
.member-delete-panel:has([hidden]) { display:none; }
@media(max-width:900px) {
    .mobile-bottom-nav { grid-template-columns:repeat(5,minmax(0,1fr)); }
    .mobile-nav-item { min-width:0; padding:5px 2px; }
    .mobile-nav-item span { font-size:10px; line-height:1.2; white-space:normal; }
}
.project-modal { width:min(720px,100%); }
.project-modal [hidden] { display:none!important; }
.project-two-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.project-xp { border:1px solid var(--line,#ddd); border-radius:12px; padding:12px; margin:14px 0; }
.project-xp legend { font-size:14px; font-weight:650; }
.project-xp-options { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; margin-bottom:10px; }
.project-xp-options label { cursor:pointer; min-width:0; }
.project-xp-options input { position:absolute; opacity:0; width:1px; height:1px; }
.project-xp-options span { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:10px 3px; min-height:58px; border:1px solid var(--line,#ddd); border-radius:8px; font-size:13px; }
.project-xp-options input:checked + span { color:#b42318; background:#fbeeed; border-color:#b42318; }
.project-xp-options input:focus-visible + span { outline:2px solid #b42318; outline-offset:2px; }
.project-modal small { display:block; color:var(--muted,#666); font-size:12px; line-height:1.5; margin-top:5px; }
.project-drafts { display:grid; gap:12px; margin:18px 0; }
.project-draft { border:1px solid var(--line,#ddd); border-radius:12px; padding:14px; overflow-wrap:anywhere; }
.project-draft p { margin:8px 0; font-size:13px; line-height:1.5; }
.project-draft .task-actions { display:flex; flex-wrap:wrap; gap:6px; }
.project-draft .task-actions button { padding:8px 10px; min-height:40px; }
.project-draft .detail-members { display:flex; flex-wrap:wrap; gap:6px; }
.project-draft .assignee { color:var(--team-color); background:var(--team-soft); border-radius:16px; padding:4px 8px; }
.project-draft .status-badge { flex:none; white-space:nowrap; }
.project-subheading { margin:20px 0 8px; font-size:16px; }
.project-card progress { width:100%; height:6px; accent-color:#b42318; margin:12px 0; }
.project-xp > input[type="number"] { display:block; width:100%; padding:11px 12px; margin:10px 0; border:1px solid var(--line,#ddd); border-radius:10px; font:inherit; background:var(--surface,#fff); color:var(--ink,#222); }
.project-modal .project-draft .task-card-header h3 { min-width:0; overflow-wrap:anywhere; }
.assignment-team-tiles { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.assignment-team-tile { min-width:0; padding:12px; text-align:left; border:1px solid var(--team-color); border-radius:10px; background:var(--team-soft); color:var(--team-color); cursor:pointer; font:inherit; }
.assignment-team-tile strong { display:block; font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.assignment-team-tile small { display:flex; justify-content:space-between; color:inherit; font-size:11px; }
.assignment-team-tile[aria-pressed="true"] { box-shadow:inset 0 0 0 1px var(--team-color); }
.assignment-team-tile[aria-pressed="true"] strong::before { content:'✓ '; }
.team-members-modal { width:min(460px,100%); }
.team-members-list { display:grid; gap:8px; margin:16px 0; }
.team-members-list > label { display:flex; align-items:center; gap:12px; padding:10px; border:1px solid var(--line,#ddd); border-radius:10px; cursor:pointer; }
.team-members-list input { width:18px; height:18px; accent-color:#b42318; flex:none; }
.project-deadline-hint { font-size:12px; line-height:1.6; color:var(--muted,#666); padding:10px; background:color-mix(in srgb,var(--muted,#666) 7%,transparent); border-radius:8px; margin:0 0 12px; }
#projectDrafts > h3 { font-size:15px; margin:0; }
#projectDrafts .project-draft { border-left:3px solid #b42318; background:color-mix(in srgb,var(--muted,#666) 3%,transparent); box-shadow:0 2px 6px #00000005; }
#projectDrafts .project-draft > strong { display:block; font-size:15px; line-height:1.4; }
#projectDrafts .task-actions { border-top:1px solid var(--line,#ddd); padding-top:10px; margin-top:12px; justify-content:flex-end; }
#projectDrafts .task-actions button { border:0; border-radius:8px; background:color-mix(in srgb,var(--muted,#666) 10%,transparent); color:var(--ink,#222); cursor:pointer; font:inherit; font-size:12px; }
#projectDrafts [data-draft-remove] { color:#b42318; }
.draft-team-chips { display:flex; flex-wrap:wrap; gap:5px; margin:10px 0; }
.draft-team-chips span { color:var(--team-color); background:var(--team-soft); padding:4px 8px; border-radius:6px; font-size:12px; }
:root[data-theme="dark"] .assignment-team-tile { background:color-mix(in srgb,var(--team-color) 18%,#20242a); color:var(--ink,#eee); }
.notification-bell { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; flex:none; position:relative; border:0; background:transparent; color:var(--ink,#222); cursor:pointer; border-radius:50%; }
.notification-bell svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.notification-count { position:absolute; top:0; right:0; min-width:17px; padding:2px 4px; border-radius:10px; color:white; background:#b42318; font-size:10px; line-height:1.2; }
.notification-count[hidden] { display:none; }
.notifications-modal { width:min(550px,100%); }
.notification-item { padding:14px; border:1px solid var(--line,#ddd); border-radius:10px; margin:10px 0; }
.notification-item p { font-size:13px; line-height:1.6; margin:8px 0; }
.notification-unread { border-left:3px solid #b42318; background:color-mix(in srgb,#b42318 4%,transparent); }
.notification-item small { font-size:11px; color:var(--muted,#777); }
.notification-item .task-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.review-edge-list > div { border:1px solid var(--line,#ddd); padding:10px; border-radius:8px; margin:8px 0; font-size:12px; line-height:1.6; }
.review-edge-list button { margin-left:8px; }
.review-warning { padding:10px; border-left:3px solid #bc841d; background:color-mix(in srgb,#bc841d 8%,transparent); font-size:13px; line-height:1.6; border-radius:6px; }
.review-files { display:grid; gap:10px; margin:16px 0; overflow-wrap:anywhere; }
.task-review-overlay textarea { width:100%; padding:10px; border:1px solid var(--line,#ddd); border-radius:8px; background:var(--surface,#fff); color:var(--ink,#222); font:inherit; }
.project-predecessors { border:1px solid var(--line,#ddd); border-radius:10px; padding:12px; margin:14px 0; }
.project-predecessors legend { font-size:14px; font-weight:650; }
.project-predecessors label { display:flex; align-items:center; gap:8px; min-height:40px; font-size:13px; }
.project-predecessors input[type="checkbox"] { width:18px; height:18px; accent-color:#b42318; }

/* University groups and delivery review use the application palette. */
.member-editor-team[hidden]{display:none!important}
.university-section{margin:0 0 24px}
.university-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);margin-bottom:14px}
.university-heading h2{font-size:1.1rem;margin:0;color:var(--ink)}
.university-heading>span{color:var(--muted);font-size:.8rem}
.member-profile-link{border:0;padding:0;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.profile-university{padding:10px 12px;border-left:3px solid #c50000;background:var(--page);border-radius:8px}
.project-draft.task-assigned-to-me,.project-card.task-assigned-to-me{border:1px solid #c5000060;background:color-mix(in srgb,var(--surface) 94%,#c50000 6%);box-shadow:inset 3px 0 #c50000}
.assigned-task-label{display:inline-block;color:#b00000;font-size:.75rem;font-weight:600;margin-bottom:8px}
[data-theme="dark"] .assigned-task-label{color:#ffaaa5}
.project-draft{background:var(--surface);color:var(--ink);border-color:var(--line)}
.review-edge-list>div{background:var(--page);border:1px solid var(--line);border-radius:10px;padding:10px 12px;gap:8px;align-items:center}
.review-edge-list>div>span{flex:1;min-width:0;font-size:.82rem;color:var(--ink)}
.review-edge-list p{width:100%;margin:4px 0 0;color:var(--muted);font-size:.82rem}
.review-warning{background:color-mix(in srgb,var(--surface) 93%,#bd8a25 7%);border:1px solid #bd8a2538;color:var(--ink);font-size:.82rem;border-radius:8px;padding:10px 12px}
.review-submitter{background:var(--page);padding:10px 12px;border-radius:8px;color:var(--muted)}
.review-submitter strong{color:var(--ink)}
.organization-create-actions{display:flex;flex-wrap:wrap;gap:8px}

.task-actions[hidden]{display:none!important}
.member-university{font-weight:600;color:var(--ink);font-size:.8rem}

.definition-pencil{width:34px;height:34px;flex:none;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:var(--page);color:var(--muted);cursor:pointer}
.definition-pencil:hover{color:#c50000}
.definition-pencil svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.organization-modal-actions{display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:8px}
.organization-modal-actions .definition-delete{margin-right:auto;color:#b42318}
.university-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.university-tile{display:grid;grid-template-columns:1fr auto;gap:8px;padding:20px;text-align:left;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}
.university-tile strong{font-size:1rem}.university-tile>span:first-of-type{grid-row:2;color:var(--muted);font-size:.8rem}.university-tile>span:last-child{grid-column:2;grid-row:1/3;align-self:center;color:#c50000}
.university-modal{width:min(1100px,calc(100vw - 24px));max-height:90dvh;overflow:auto}
.team-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.content-approval-tabs{margin-bottom:14px}

.definition-card-header{justify-content:flex-start;gap:8px}
.definition-card-header h3{flex:0 1 auto}

.task-editor-actions{display:flex;justify-content:flex-end;flex-wrap:nowrap;gap:8px}
.task-editor-actions .task-editor-delete{margin-right:auto;color:#b42318}
.task-predecessor-heading .help-hint{margin-left:6px}

.project-repeat{border:1px solid var(--border-color,#e5e7eb);border-radius:14px;padding:16px;margin:16px 0;min-width:0}
.project-repeat legend{font-weight:600;padding:0 6px}
.project-repeat .recurring-options{display:flex;gap:12px}
.project-repeat .recurring-option{display:flex;align-items:center;gap:8px;padding:9px 16px;border:1px solid var(--border-color,#e5e7eb);border-radius:10px;cursor:pointer}
.project-repeat .recurring-option:has(input:checked){border-color:#c00;background:rgba(204,0,0,.06)}
.project-repeat input[type=radio]{accent-color:#c00}
#projectRepeatOptions{margin-top:16px}
#projectRepeatOptions[hidden]{display:none}
.project-repeat small{display:block;line-height:1.5;opacity:.75}

.team-member-mini-list .team-member-mini{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:8px}
.team-member-mini-list .team-member-mini .member-edit-button{grid-column:3;grid-row:1;justify-self:end;width:auto;margin:0;white-space:nowrap;padding:7px 10px}
.team-member-mini-list .team-member-mini > span:nth-child(2){grid-column:2;grid-row:1;min-width:0}
.team-member-mini-list .member-profile-link{overflow-wrap:anywhere;text-align:left}
.notification-read-all{margin-bottom:12px}

.notification-header-actions{display:flex;align-items:center;gap:8px}
.notification-header-actions .notification-read-all{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:10px;background:var(--surface-color,#f3f4f6);color:inherit;cursor:pointer;margin:0}
.notification-read-all svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.notification-read-all:disabled{opacity:.4;cursor:default}
.page-header-actions:has(#createProjectButton){display:flex;align-items:stretch;gap:8px}
.page-header-actions:has(#createProjectButton) > button{height:auto;min-height:44px;align-self:stretch;display:flex;align-items:center;justify-content:center;flex:1;margin:0}
.team-tabs:has(.team-create-actions){display:flex;align-items:center;flex-wrap:wrap;width:100%;gap:8px}
.team-create-actions{order:3;display:flex;gap:8px;margin-left:auto;flex-wrap:wrap}
.team-create-actions button{min-height:38px}
.team-back{margin-bottom:16px}
@media(max-width:600px){.team-create-actions{flex-basis:100%;margin-left:0}.team-create-actions button{flex:1;padding:9px 8px;font-size:12px}.page-header-actions:has(#createProjectButton){flex-direction:row;flex-wrap:nowrap;width:100%}}

.team-controls .team-navigation-actions{display:flex;flex-wrap:nowrap;width:100%;gap:6px;margin:0;order:0}
.team-navigation-actions > button{flex:1;min-width:0;padding:9px 5px;font-size:12px;line-height:1.35;white-space:normal;min-height:44px}
.team-navigation-actions #teamNavigate{order:-1}
.team-navigation-actions #teamNavigate.is-back{order:-1}
.team-location{font-size:18px;margin:16px 0}
.team-name-line{display:flex;align-items:center;gap:7px;min-width:0}
.team-name-line .definition-pencil{flex-shrink:0}
.group-open-name{border:0;background:none;color:inherit;font:inherit;font-weight:700;text-align:left;padding:0;cursor:pointer;overflow-wrap:anywhere}
.group-open-arrow{border:0;background:none;color:inherit;font-size:22px;cursor:pointer}
.team-page .team-stats{grid-template-columns:1fr}

.team-location{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.team-location>span{display:inline;font-size:18px}
.team-location>small{font-size:12px;font-weight:500;color:var(--muted,#666)}
.member-editor-summary{background-size:cover;background-position:center;flex-wrap:wrap}
.member-editor-summary .member-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.member-summary-bio{flex-basis:100%;margin:6px 0 0;font-weight:400}
.project-draft .assignee{background:var(--team-soft);color:var(--team-color);border:1px solid color-mix(in srgb,var(--team-color) 20%,transparent)}
.project-draft .assignee small{font-size:10px;margin-left:5px}
.calendar-filter-team-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}
.calendar-filter-team{min-width:0!important;max-width:100%;display:flex;align-items:center}
.calendar-filter-team-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calendar-filter-team input,.calendar-filter-team-dot{flex-shrink:0}
.project-repeat .recurring-options{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}
.project-repeat .recurring-option{padding:0;border:0;background:transparent!important;display:block;position:relative}
.project-repeat .recurring-option input{position:absolute;opacity:0;width:1px;height:1px}
.project-repeat .recurring-option span{display:block;text-align:center;padding:10px 14px;border:1px solid var(--line,#ddd);border-radius:10px}
.project-repeat .recurring-option input:checked+span{color:#c50000;border-color:#c50000;background:rgba(197,0,0,.06)}
.project-repeat .recurring-option input:focus-visible+span{outline:2px solid #c50000;outline-offset:2px}
.idea-page-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center}
.idea-page-header>.page-header-actions{grid-column:1/-1;display:flex;gap:8px;width:100%}
.idea-page-header .page-filter-button{justify-self:end;min-height:36px;padding:8px 12px}
.page-header:has(#taskFilterButton){display:flex;flex-direction:row;justify-content:space-between;align-items:center}
#taskFilterButton{width:auto!important;flex:0 0 auto;min-height:36px;padding:8px 12px}
.settings-logout{position:absolute;right:0;top:0;width:auto!important}
.settings-page{position:relative}
.task-filter-deadline-grid input[type=date]{width:100%;margin-top:10px}
.content-media img,.content-media video{max-width:100%;max-height:320px;border-radius:10px}
.page-header .settings-logout{position:static;margin-left:auto;flex:none}

/* Existing forms: optional links and notification recipients. */
.link-editor-list,.content-links,.recipient-chips{display:grid;gap:8px}.link-editor-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) 36px;gap:6px;margin-bottom:8px}.link-editor-row input{min-width:0;width:100%}.content-links a{overflow-wrap:anywhere;color:var(--primary,#b91c1c);text-decoration:underline}.recipient-results{display:grid;gap:6px;max-height:220px;overflow:auto}.recipient-chips{display:flex;flex-wrap:wrap;margin-bottom:8px}.content-links{margin:14px 0}@media(max-width:520px){.link-editor-row{grid-template-columns:minmax(0,1fr) 36px}.link-editor-row [data-link-title]{grid-column:1/-1}}

.prerequisite-summary{margin:12px 0;padding:10px;border:1px solid #e5e7eb;border-radius:10px;background:#ffffff99}.prerequisite-summary h4{margin:0 0 7px;font-size:12px}.prerequisite-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 0;font-size:12px}.prerequisite-row>span{min-width:0;overflow-wrap:anywhere}.prerequisite-row small{flex:none;white-space:nowrap}.prerequisite-approved{color:#15803d}.prerequisite-revision{color:#b45309}.prerequisite-pending{color:#6b7280}

/* Tooltips are mounted at body level so modal overflow cannot clip them. */
.help-tooltip{position:fixed;box-sizing:border-box;overflow:auto;overflow-wrap:anywhere;overscroll-behavior:contain;max-height:calc(100dvh - 24px);z-index:2147483000}
.notification-card{display:block;width:100%;text-align:left;font:inherit;cursor:pointer;border:1px solid #e5e7eb;border-radius:12px;padding:12px;background:#fff;min-width:0}
.notification-card strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
.notification-card p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:13px;margin:6px 0 0}
.notification-card.notification-unread{border-left:3px solid #c00;background:#fff7f7}.notification-card small{display:block;margin-top:6px;color:#6b7280}
.notification-detail h2,.notification-detail .content-full-text{overflow-wrap:anywhere;white-space:pre-wrap}
.assignment-status{display:block;font-size:11px;font-weight:500;color:#6b7280}

/* Shared task creator on the Projects page. */
#modalTaskKind{width:100%;min-height:44px;border:1px solid #d1d5db;border-radius:10px;padding:10px 12px;background:#fff;color:inherit;font:inherit}
@media(max-width:520px){.page-header:has(#createStandaloneTask){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.page-header:has(#createStandaloneTask)>.page-header-actions{display:contents}.page-header:has(#createStandaloneTask) #taskFilterButton{grid-column:2;grid-row:1}.page-header #createStandaloneTask{grid-column:1/-1;grid-row:2;width:100%;min-height:42px}}

.notification-header-actions .notification-send{display:grid;place-items:center;flex:none;width:36px;height:36px;padding:8px;border:0;border-radius:10px;background:var(--surface-color,#f3f4f6);color:inherit;cursor:pointer}
.notification-send svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.recipient-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.recipient-heading label{margin:0}.recipient-heading .secondary-button{width:auto;padding:8px 12px;font-size:13px}.recipient-count{display:block;margin:6px 0;color:#6b7280}
@media(max-width:380px){.notifications-modal>.modal-header{gap:6px}.notifications-modal>.modal-header h2{font-size:20px}.notification-header-actions{gap:4px}.notifications-modal>.modal-header .help-heading{gap:4px;min-width:0}}

.foundation-member-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-bottom:12px}.foundation-member-controls input,.foundation-member-controls select{min-width:0;width:100%;padding:10px;border:1px solid #ddd;border-radius:10px;background:#fff;color:inherit;font:inherit}
.foundation-member-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:12px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;color:inherit;cursor:pointer;margin-bottom:8px}.foundation-member-text{display:grid;gap:4px;min-width:0;flex:1}.foundation-member-text>span{font-size:12px;overflow-wrap:anywhere}.foundation-member-text>small{color:#b91c1c}.foundation-member-xp{font-size:12px;white-space:nowrap}.foundation-members-modal [data-self-member]{position:sticky;top:0;background:#fff;z-index:1}.foundation-members-modal [data-self-member] .foundation-member-row{background:#fff7f7;border-color:#f1d4d4}.foundation-member-row .member-avatar{flex:none;overflow:hidden}.foundation-member-row .member-avatar img{width:100%;height:100%;object-fit:cover}

/* Shared modal scrolling: existing headers stay above every form and detail body. */
:is(.task-modal,.project-purpose-dialog){
    --modal-inset:24px;
    padding-top:0;
    padding-inline:var(--modal-inset);
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    isolation:isolate;
    max-height:min(92vh,calc(100dvh - 36px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));
    scroll-padding-top:130px;
}
:is(.task-modal,.project-purpose-dialog) .modal-header,
.calendar-filter-modal .calendar-filter-header{
    position:sticky;
    top:0;
    z-index:20;
    flex-shrink:0;
    background:var(--surface,#fff);
    border-bottom:1px solid var(--line,#eee);
    align-items:flex-start;
}
:is(.task-modal,.project-purpose-dialog) .modal-header{
    margin-inline:calc(-1 * var(--modal-inset));
    margin-top:0;
    padding:var(--modal-inset) var(--modal-inset) 16px;
}
:is(.modal-header,.calendar-filter-header)>:not(button){min-width:0}
:is(.modal-header,.calendar-filter-header) :is(h2,h3,p){overflow-wrap:anywhere}
:is(.modal-header,.calendar-filter-header) :is(.modal-close,.calendar-filter-close){flex-shrink:0}
.calendar-filter-modal{
    display:block;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    isolation:isolate;
    max-height:min(680px,calc(100dvh - 36px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));
    scroll-padding-top:110px;
}
@media(max-width:700px){
    :is(.task-modal,.project-purpose-dialog){--modal-inset:16px}
    :is(.task-modal,.calendar-filter-modal,.project-purpose-dialog){max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))}
}

/* Settings only: respond to the space left after the desktop sidebar. */
.settings-layout{container:settings / inline-size;width:100%;min-width:0}
.settings-layout .settings-grid{grid-template-columns:minmax(0,1fr);max-width:none;width:100%;gap:20px;align-items:stretch}
.settings-layout #profilePreview{margin-bottom:20px;min-width:0}
.settings-layout #profilePreview .profile-card{max-width:none}
.settings-layout .settings-form{min-width:0;display:flex;flex-direction:column;padding:20px;gap:0}
.settings-layout .settings-form h2{font-size:18px;margin:0 0 18px}
.settings-layout .settings-form .task-form-group{min-width:0;margin-bottom:14px}
.settings-layout .settings-form :is(input,select,textarea){width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.settings-layout .settings-form textarea{resize:vertical}
.settings-layout .settings-form>p{font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.settings-layout .settings-form>p:empty{margin:0}
.settings-layout .settings-form>p:not(:empty){margin-bottom:12px}
.settings-layout .settings-form>button[type="submit"]{margin-top:auto;min-height:44px;align-self:flex-start;max-width:100%;white-space:normal}
.settings-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px;margin-bottom:14px}
.settings-images .settings-image-field{padding:12px;margin-bottom:0!important;border:1px solid var(--line);border-radius:12px;display:flex;flex-direction:column;gap:8px}
.settings-images .settings-image-field :is(label,small){margin:0}
.settings-images .settings-image-field input[type="file"]{font-size:12px;padding:6px}
.settings-images .settings-image-field [data-clear]{align-self:flex-start;min-height:40px;margin:0;white-space:normal}
@container settings (min-width:760px){
    .settings-layout .settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .settings-layout #profilePreview .profile-card{display:grid;grid-template-columns:minmax(140px,24%) minmax(0,1fr)}
    .settings-layout #profilePreview .profile-cover{height:100%;min-height:160px}
    .settings-layout #profilePreview .profile-details{padding:20px;min-width:0;overflow-wrap:anywhere}
    .settings-layout #profilePreview .profile-avatar{float:left;margin:0 16px 10px 0}
    .settings-layout #profilePreview .profile-details p{margin:6px 0}
}
@media(max-width:480px){
    .settings-layout .settings-form{padding:16px}
    .settings-layout .settings-form>button[type="submit"]{align-self:stretch}
}

/* Project flow: DOM nodes and a single SVG layer share the task dependency graph. */
.project-flow-page{min-width:0}
.project-flow-page .page-header{align-items:center;margin-bottom:12px}
.project-flow-page .page-header p{margin-top:5px;overflow-wrap:anywhere}
.flow-toolbar-shell{position:sticky;top:8px;z-index:25;background:var(--surface,#fff);border:1px solid var(--line,#ddd);border-radius:12px;box-shadow:0 3px 12px #00000008;padding:10px 34px 10px 10px;margin-bottom:10px}
.flow-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:7px}
.flow-toolbar button{min-height:36px;padding:8px 11px;font-size:13px}
.flow-toolbar-toggle{position:absolute;right:5px;top:5px;width:26px;height:28px;border:0;border-radius:7px;background:#f5f5f5;color:#555;cursor:pointer}
.flow-toolbar-shell.collapsed{height:30px;padding:0;background:transparent;border-color:transparent;box-shadow:none}
.flow-toolbar-shell.collapsed .flow-toolbar{display:none}
.flow-toolbar-shell.collapsed .flow-toolbar-toggle{background:#fff;border:1px solid #ddd}
.flow-zoom{display:flex;gap:6px;align-items:center;white-space:nowrap;font-size:12px}
.flow-zoom span{min-width:38px;text-align:center}
.flow-connection-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;background:#fff4f4;border:1px solid #edd0d0;border-radius:10px;font-size:13px}
.flow-connection-tools[hidden],.flow-context-menu[hidden]{display:none}
.flow-message{font-size:12px;line-height:1.4;margin:8px 0;color:var(--muted,#666)}
.flow-message:empty{display:none}
.project-flow-viewport{height:70vh;height:70dvh;min-height:330px;max-width:100%;overflow:auto;border:1px solid var(--line,#ddd);border-radius:14px;background:#fff;overscroll-behavior:contain;position:relative;touch-action:none}
.project-flow-space{position:relative;min-width:100%;min-height:100%}
.project-flow-canvas{position:absolute;left:0;top:0;transform-origin:0 0;background-image:radial-gradient(#dedede 1px,transparent 1px);background-size:20px 20px}
.project-flow-canvas.flow-is-empty:after{content:attr(data-empty-message);display:block;position:sticky;left:20px;top:100px;width:min(270px,75vw);padding:22px;color:#777;font-size:14px;background:#ffffffd9;border-radius:12px;pointer-events:none}
.project-flow-connections{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.flow-edge{fill:none;stroke:#a91d29;stroke-width:3;pointer-events:stroke;cursor:pointer}
.flow-edge:hover,.flow-edge:focus{stroke-width:6;outline:none}
.flow-preview{fill:none;stroke:#a91d29;stroke-width:3;stroke-dasharray:7 5;pointer-events:none}
.project-task-node{position:absolute;box-sizing:border-box;width:270px;padding:16px 16px 12px;background:var(--team-soft,#fff);border:1px solid var(--team-color,#ddd);border-top-width:4px;border-radius:13px;box-shadow:0 3px 10px #0000000b;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;transition:box-shadow .12s,opacity .12s}
.project-task-node:hover,.project-task-node:focus-visible{box-shadow:0 5px 18px #00000019;outline:2px solid #ad253233;outline-offset:3px}
.flow-node-heading{display:flex;gap:8px;align-items:flex-start;min-width:0}
.flow-node-heading h2{font-size:15px;line-height:1.4;min-width:0;flex:1;overflow-wrap:anywhere;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.flow-node-heading .status-badge{font-size:10px;padding:4px;flex:none;white-space:nowrap}
.flow-description,.flow-assignees{font-size:12px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;margin:8px 0}
.flow-date{font-size:11px;color:#666}
.flow-port{position:absolute;top:calc(50% - 13px);width:26px;height:26px;padding:0;border:2px solid #a91d29;background:#fff;color:#a91d29;border-radius:50%;z-index:2;touch-action:none;cursor:crosshair}
.flow-input{left:-14px}.flow-output{right:-14px}
.flow-connect-button{display:flex;margin-left:auto;width:37px;height:30px;align-items:center;justify-content:center;border:1px solid #d8c4c4;border-radius:7px;background:#fff;color:#922131;cursor:pointer}
.flow-connect-button svg{width:27px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
.flow-linking .flow-connect-button{visibility:hidden}
.flow-source{outline:3px solid #a91d29;box-shadow:0 0 0 6px #a91d2919}
.flow-target{cursor:crosshair;outline:2px solid #67976c;background:#fbfff9;box-shadow:0 3px 16px #639a6629}
.flow-unavailable{opacity:.45}
.flow-hover-target{outline:4px solid #458852;box-shadow:0 0 0 7px #45885225}
.flow-dragging .project-task-node:not(.flow-moving){opacity:.4}
.project-task-node.flow-moving{z-index:4;cursor:grabbing;box-shadow:0 12px 28px #0000002c;filter:brightness(1.03)}
.project-task-node.flow-collision{outline:3px solid #c53030;background:#fff0f0}
.flow-context-menu{position:fixed;z-index:4000;width:240px;max-width:calc(100vw - 16px);max-height: min(420px,calc(100dvh - 16px));overflow:auto;background:var(--surface,#fff);border:1px solid #ddd;border-radius:11px;box-shadow:0 12px 40px #0003;padding:6px}
.flow-context-menu>button{display:block;width:100%;border:0;background:transparent;text-align:left;padding:10px;border-radius:7px;font:inherit;font-size:13px;color:var(--ink,#222);cursor:pointer;overflow-wrap:anywhere}
.flow-context-menu button:hover,.flow-context-menu button:focus-visible{background:#f8eeee;outline:none}
.flow-context-menu small{display:block;padding:8px;color:#777;overflow-wrap:anywhere}
.flow-context-menu .flow-zoom{justify-content:center;padding:6px}
.flow-context-menu .flow-zoom button{border:1px solid #ddd;border-radius:6px;padding:5px 14px;background:#fff;cursor:pointer}
@media(max-width:768px){
 .flow-toolbar-shell{top:68px}.flow-toolbar button{font-size:12px;padding:7px 9px;min-height:38px}
 .project-flow-viewport{height:65dvh}
 .project-task-node{width:180px;padding:12px 12px 9px;min-height:86px}
 .flow-node-heading{display:block}.flow-node-heading h2{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:13px;line-height:1.4}
 .flow-node-heading .status-badge{display:inline-block;margin-top:5px;font-size:9px;padding:2px 5px}
 .flow-description,.flow-assignees,.flow-date{display:none}
 .flow-connect-button{position:absolute;right:10px;bottom:8px;width:30px;height:25px}.flow-connect-button svg{width:23px;height:18px}
 .flow-port{width:24px;height:24px;top:calc(50% - 12px)}.flow-input{left:-13px}.flow-output{right:-13px}
}
/* Focus editor chrome stays separate from the scaled canvas. */
body.flow-focus{overflow:hidden}
body.flow-focus .sidebar,body.flow-focus .mobile-header,body.flow-focus .mobile-bottom-nav{display:none!important}
body.flow-focus .project-flow-page{position:fixed;inset:0;z-index:50;display:flex;flex-direction:column;background:#fff;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);min-width:0}
body.flow-focus .project-flow-page>.page-header{display:none}
body.flow-focus .project-flow-viewport{flex:1;min-height:0;height:auto;border-radius:0;border-width:0}
.project-flow-page .flow-toolbar-shell{border-radius:12px 12px 0 0;margin-bottom:0;padding:7px 38px 7px 7px;box-shadow:none;flex-shrink:0}
body.flow-focus .flow-toolbar-shell{position:relative;top:0;border-width:0 0 1px;border-radius:0}
.project-flow-page .flow-toolbar{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;gap:5px;scrollbar-width:thin;min-width:0;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.project-flow-page .flow-toolbar button{flex:none;height:38px;min-width:38px;padding:8px;border:1px solid #e3e3e3;border-radius:8px;background:#fff;color:#424242;cursor:pointer;touch-action:pan-x}
.project-flow-page .flow-toolbar button:hover{background:#f8eeee;color:#a91d29}
.project-flow-page .flow-toolbar button[hidden]{display:none}
.project-flow-page .flow-toolbar [data-flow-publish]{background:#b50919;color:#fff;border-color:#b50919;font-size:12px;padding:8px 12px}
.flow-tool svg,.flow-toolbar-toggle svg{width:21px;height:21px;display:block;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.flow-toolbar-toggle svg{width:18px;height:18px;margin:auto}
.project-flow-page .flow-toolbar-shell.collapsed{height:29px;padding:0;border:0;background:#fff}
.project-flow-page .flow-toolbar-toggle{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.project-flow-page .flow-connection-tools{border-radius:0;margin:0;flex-shrink:0;overflow-wrap:anywhere}
body.flow-focus .flow-message{padding:5px 12px;margin:0;flex-shrink:0;background:#fff;font-size:11px}
.flow-tool-tip{position:fixed;z-index:90;padding:7px 10px;border-radius:7px;max-width:calc(100vw - 16px);background:#25282e;color:#fff;font-size:12px;line-height:1.4;pointer-events:none;box-shadow:0 3px 12px #0002}
.flow-tool-tip[hidden]{display:none}
.project-task-node.flow-ready{box-shadow:0 10px 25px #0003;outline:2px solid #b42b3544;outline-offset:2px;filter:brightness(1.025);cursor:grabbing;z-index:3}
.flow-connect-button{width:46px;height:40px;border-radius:9px}
.flow-connect-button svg{width:33px;height:25px}
.flow-port-top,.flow-port-bottom{left:calc(50% - 13px);right:auto}
.flow-port-top{top:-14px}.flow-port-bottom{top:auto;bottom:-14px}
.flow-guide-modal{max-width:640px}
.flow-guide-modal section{padding:10px 0;border-bottom:1px solid var(--line,#eee)}
.flow-guide-modal section:last-child{border:0}
.flow-guide-modal h3{font-size:15px;margin:0 0 7px}
.flow-guide-modal p{font-size:14px;line-height:1.65;margin:0;color:var(--muted,#666)}
@media(max-width:768px){
 .project-flow-page .flow-toolbar-shell{top:68px}
 body.flow-focus .flow-toolbar-shell{top:0}
 .project-flow-page .flow-toolbar button{height:40px;min-width:40px}
 .project-task-node{min-height:101px;padding-bottom:47px}
 .flow-connect-button{width:44px;height:38px;right:8px;bottom:6px}
 .flow-connect-button svg{width:31px;height:23px}
 .flow-port-top,.flow-port-bottom{left:calc(50% - 12px)}
 .flow-port-top{top:-13px}.flow-port-bottom{top:auto;bottom:-13px}
}
/* Clean cards: attachment points are geometry only, never interactive handles. */
.project-flow-page .flow-port{display:none!important}
.flow-node-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:9px}
.flow-node-actions .flow-connect-button{position:static;margin:0;flex:none}
.flow-disconnect-button{color:#8e4436;background:#fff8f5;border-color:#e8c5ba}
.flow-linking .flow-node-actions{visibility:hidden}
.project-flow-page .flow-toolbar{justify-content:safe center}
@media(min-width:769px) and (max-width:1100px){.project-flow-page .flow-toolbar{flex-wrap:wrap}}
@media(max-width:768px){
 .project-flow-page .flow-toolbar-shell{padding:5px 31px 5px 5px}
 .project-flow-page .flow-toolbar{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:40px 40px;gap:4px;overflow:visible;align-items:center;justify-content:stretch}
 .project-flow-page .flow-toolbar>button{min-width:0;width:100%;padding:7px 4px;height:40px}
 .project-flow-page .flow-toolbar svg{margin:auto}
 .flow-toolbar [data-page]{grid-column:1;grid-row:1}
 .flow-toolbar [data-flow-add]{grid-column:2;grid-row:1}
 .flow-toolbar [data-flow-arrange]{grid-column:3;grid-row:1}
 .flow-toolbar [data-project-edit]{grid-column:4;grid-row:1}
 .flow-toolbar [data-flow-home]{grid-column:5;grid-row:1}
 .flow-toolbar [data-flow-focus]{grid-column:6;grid-row:1}
 .flow-toolbar .flow-zoom{grid-column:1 / span 3;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 .project-flow-page .flow-toolbar .flow-zoom button{min-width:0;width:100%}
 .flow-toolbar [data-flow-guide]{grid-column:4;grid-row:2}
 .flow-toolbar [data-flow-publish]{grid-column:5 / span 2;grid-row:2}
 .project-flow-page .flow-toolbar-shell.collapsed .flow-toolbar{display:none}
 .project-task-node{padding-bottom:10px;min-height:101px}
 .flow-node-actions{margin-top:7px;gap:6px}
 .flow-node-actions .flow-connect-button{width:44px;height:38px}
}
/* Flow publishing state and shared task-create illustration. */
.project-flow-page .flow-toolbar [data-flow-add]{background:#fbeef0;border-color:#dcaeb3;color:#a91d29}
.project-flow-page .flow-toolbar [data-flow-update]{background:#b50919;color:#fff;border-color:#b50919}
.project-flow-canvas.flow-is-empty:after{display:none}
.flow-empty-message{display:none;position:sticky;left:20px;top:100px;width:min(290px,75vw);padding:20px;color:#777;font-size:14px;background:#ffffffed;border-radius:12px;pointer-events:none;line-height:2}
.flow-is-empty .flow-empty-message{display:block}
.flow-empty-message span{display:inline-flex;vertical-align:middle;border:1px solid #dcaeb3;background:#fbeef0;border-radius:6px;padding:4px;color:#a91d29}
.flow-empty-message svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.flow-focus .project-flow-page:before{content:attr(data-flow-status);font-size:11px;color:#666;padding:4px 12px;background:#fff}
@media(max-width:768px){.flow-toolbar [data-flow-update]{grid-column:5 / span 2;grid-row:2}}
/* Keep the connection entry point anchored at the right edge. */
.flow-node-actions .flow-connect-button{order:1}
.flow-node-actions .flow-disconnect-button{order:0}
.assignment-picker .modal-header{display:flex;align-items:center;gap:10px}
.assignment-picker .modal-header h2{flex:1;min-width:0;overflow-wrap:anywhere}
.assignment-picker [data-picker-back][hidden]{display:none}
.assignment-picker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.assignment-picker-grid button{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:14px 10px;border:1px solid var(--team-color,#ddd);background:var(--team-soft,#fafafa);border-radius:10px;color:var(--ink,#333);font:inherit;text-align:left;cursor:pointer}
.assignment-picker-grid button>span:first-child{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.assignment-picker-grid small{flex:none;font-size:11px}
.assignment-picker-grid button:hover{filter:brightness(.97)}
.assignment-picker-summary{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.assignment-picker-summary>span{padding:5px 8px;border-radius:8px;background:var(--team-soft,#f5f5f5);border:1px solid var(--team-color,#ddd);font-size:12px;overflow-wrap:anywhere}
.assignment-picker-open{width:100%;display:flex;justify-content:space-between;gap:10px}
@media(max-width:600px){.assignment-picker-grid button{font-size:clamp(12px,3.5vw,14px);padding:12px 8px}.assignment-picker-grid{gap:8px}}
.project-card .project-pending-badge{background:#fff5dc;color:#805b16;border:1px solid #ead5a4;font-size:11px;padding:4px 7px;white-space:normal;overflow-wrap:normal;line-height:1.35;text-align:center;max-width:160px;flex-shrink:0}
@media(max-width:480px){.project-card .project-pending-badge{font-size:10px;max-width:130px;padding:3px 6px}}
.project-flow-page .flow-toolbar [data-flow-delete]{color:#a91d29}
.project-flow-page .flow-toolbar [data-flow-delete]:hover{background:#fbe5e7;border-color:#dba7ad}
@media(max-width:768px){
 .project-flow-page .flow-toolbar{grid-template-columns:repeat(7,minmax(0,1fr))}
 .flow-toolbar [data-flow-delete]{grid-column:7;grid-row:1}
 .flow-toolbar [data-flow-publish],.flow-toolbar [data-flow-update]{grid-column:5 / span 3;grid-row:2}
}
.notice-schedule-actions{display:flex;align-items:center;gap:5px;flex-shrink:0}
.notice-schedule-actions :is(
    [data-schedule-mode],
    [data-schedule-manage]
){
    position:relative;
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    padding:7px;
    border:1px solid var(--line,#ddd);
    background:var(--surface,#fff);
    border-radius:8px;
    color:var(--muted,#666);
    cursor:pointer;
}
.notice-schedule-actions svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.notice-schedule-actions [aria-pressed="true"]{background:#fbecee;color:#b50919;border-color:#dca8af}
.notice-mode-tooltip{display:none;position:absolute;right:0;top:100%;padding:5px 8px;background:#333;color:#fff;border-radius:5px;font-size:12px;white-space:nowrap;z-index:5;pointer-events:none}
:is(
    [data-schedule-mode],
    [data-schedule-manage]
):hover .notice-mode-tooltip,
:is(
    [data-schedule-mode],
    [data-schedule-manage]
):focus-visible .notice-mode-tooltip{
    display:block;
}
.notice-schedule-panel{background:#faf7f7;border:1px solid #eadbde;border-radius:10px;padding:14px;margin:12px 0}
.notice-schedule-panel[hidden],.notice-schedule-panel [hidden]{display:none}
.notice-schedule-panel h3{font-size:15px;margin:0 0 12px}
.notice-schedule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.notice-schedule-panel input,.notice-schedule-panel select{width:100%;min-width:0}
.modal-header:has(.notice-schedule-actions) h2{min-width:0;flex:1;font-size:clamp(16px,4vw,22px)}
@media(max-width:480px){.notice-schedule-grid{grid-template-columns:1fr;gap:0}.notice-schedule-actions{gap:3px}.notice-schedule-actions :is(
    [data-schedule-mode],
    [data-schedule-manage]
){
    width:36px;
    height:38px;
}.modal-header:has(.notice-schedule-actions){gap:6px}}
/* Read-only Flow Editor */
.project-flow-page.flow-readonly .project-task-node {
    cursor: pointer;
}

.project-flow-page.flow-readonly .project-task-node:active {
    cursor: pointer;
}

.project-flow-page.flow-readonly .flow-edge {
    cursor: default;
}

/* =========================
PLANLANAN BİLDİRİMLER
========================= */

.notice-plan-manager{
    max-width:720px;
}

.notice-plan-manager>
.modal-header>
div{
    min-width:0;
    display:grid;
    gap:3px;
}

.notice-plan-manager>
.modal-header h2{
    margin:0;
}

.notice-plan-manager>
.modal-header p{
    margin:0;
    color:#6b7280;
    font-size:12px;
}

.notice-plan-list{
    display:grid;
    gap:10px;
    padding:4px 0 2px;
}

.notice-plan-card{
    display:grid;
    gap:9px;
    padding:13px;

    border:
        1px solid
        var(--line,#e5e7eb);

    border-radius:12px;

    background:
        var(--surface,#fff);
}

.notice-plan-card-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
}

.notice-plan-card-head>div{
    min-width:0;
    display:grid;
    gap:4px;
}

.notice-plan-card strong{
    overflow-wrap:anywhere;
}

.notice-plan-card p{
    margin:0;
    color:#4b5563;

    display:-webkit-box;

    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;

    overflow:hidden;
}

.notice-plan-type,
.notice-plan-status{
    display:inline-flex;

    width:max-content;
    max-width:100%;

    align-items:center;

    border-radius:999px;

    padding:3px 7px;

    font-size:11px;
    font-weight:700;
}

.notice-plan-type{
    background:#f3f4f6;
    color:#4b5563;
}

.notice-plan-status{
    flex:none;

    background:#eef2ff;
    color:#4450a5;
}

.notice-plan-status-active{
    background:#e9f8ef;
    color:#237544;
}

.notice-plan-status-completed{
    background:#f3f4f6;
    color:#6b7280;
}

.notice-plan-status-cancelled{
    background:#fdecec;
    color:#a12b37;
}

.notice-plan-meta{
    display:grid;
    gap:3px;

    color:#6b7280;
    font-size:12px;
}

.notice-plan-actions{
    display:flex;
    justify-content:flex-end;
    gap:8px;

    flex-wrap:wrap;
}

.notice-plan-actions
.secondary-button{
    width:auto;
}

.notice-plan-delete{
    color:#a91d29;
    border-color:#e5b9be;
}

.notice-plan-delete:hover{
    background:#fbe5e7;
}

@media(max-width:480px){

    .notice-plan-card-head{
        align-items:flex-start;
    }

    .notice-plan-actions>*{
        flex:1;
    }

    .notice-plan-manager>
    .modal-header p{
        display:none;
    }
}
/* =====================================================
   MOBILE ISTANBUL ARCHITECTURAL HEADER
   Yazısız, tamamen CSS ile çizilen dengeli İstanbul panoraması.
===================================================== */
@media (max-width: 900px) {
    .mobile-header {
        isolation: isolate;
        overflow: hidden;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px 42px;
        align-items: center;
        gap: 7px;
        height: calc(66px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 10px 0 12px;
        background: var(--surface);
        border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
        box-shadow: 0 8px 26px color-mix(in srgb, var(--shadow-color) 38%, transparent);
    }

    .mobile-header::before {
        content: "";
        position: absolute;
        z-index: -2;
        inset: 0;
        background:
            radial-gradient(ellipse at 28% 110%, color-mix(in srgb, var(--accent) 17%, transparent) 0 24%, transparent 54%),
            radial-gradient(circle at 72% 12%, color-mix(in srgb, var(--accent-soft-strong) 24%, transparent) 0 13%, transparent 34%),
            linear-gradient(120deg,
                color-mix(in srgb, var(--surface) 90%, var(--accent-soft) 10%) 0%,
                color-mix(in srgb, var(--surface) 72%, var(--accent-soft) 28%) 52%,
                color-mix(in srgb, var(--surface) 88%, var(--page) 12%) 100%);
        pointer-events: none;
    }

    .mobile-header::after {
        content: "";
        position: absolute;
        z-index: -1;
        left: 12px;
        right: 12px;
        bottom: 0;
        height: 1px;
        background: linear-gradient(90deg,
            transparent,
            color-mix(in srgb, var(--accent) 28%, transparent) 24%,
            color-mix(in srgb, var(--accent) 62%, transparent) 50%,
            color-mix(in srgb, var(--accent) 28%, transparent) 76%,
            transparent);
        opacity: .55;
        pointer-events: none;
    }

    .mobile-istanbul-scene {
        --scene-ink: color-mix(in srgb, var(--ink) 73%, var(--accent) 27%);
        --scene-soft: color-mix(in srgb, var(--ink) 48%, var(--accent) 52%);
        position: relative;
        align-self: stretch;
        width: 100%;
        min-width: 0;
        height: 58px;
        overflow: hidden;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        pointer-events: none;
    }

    .istanbul-sky,
    .istanbul-silhouette {
        position: absolute;
        inset: 0;
    }

    .istanbul-sky::before {
        content: "";
        position: absolute;
        right: 10%;
        top: 7px;
        width: 25px;
        height: 25px;
        border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
        border-radius: 50%;
        box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 8%, transparent);
        opacity: .7;
    }

    .istanbul-silhouette {
        color: var(--scene-ink);
    }

    .istanbul-silhouette::before {
        content: "";
        position: absolute;
        z-index: 1;
        left: 0;
        right: 1%;
        bottom: 5px;
        height: 1px;
        background: linear-gradient(90deg,
            transparent 0%,
            color-mix(in srgb, var(--scene-ink) 42%, transparent) 8%,
            color-mix(in srgb, var(--accent) 74%, transparent) 48%,
            color-mix(in srgb, var(--scene-ink) 42%, transparent) 92%,
            transparent 100%);
    }

    .istanbul-silhouette::after {
        content: "";
        position: absolute;
        z-index: 1;
        left: 37%;
        right: 2%;
        bottom: 1px;
        height: 2px;
        border-top: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
        border-bottom: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
        transform: skewX(-24deg);
        opacity: .62;
    }

    /* Cami: daha ince ve dengeli silüet */
    .scene-mosque {
        position: absolute;
        z-index: 3;
        left: 6%;
        bottom: 6px;
        width: 46px;
        height: 12px;
        border-radius: 4px 4px 1px 1px;
        background: var(--scene-ink);
        opacity: .92;
    }

    .scene-mosque::before,
    .scene-mosque::after {
        content: "";
        position: absolute;
        bottom: 100%;
        width: 12px;
        height: 5px;
        background: var(--scene-ink);
        border-radius: 12px 12px 1px 1px;
        opacity: .94;
    }

    .scene-mosque::before { left: 2px; }
    .scene-mosque::after { right: 2px; }

    .scene-mosque-dome {
        position: absolute;
        left: 50%;
        bottom: 100%;
        width: 29px;
        height: 13px;
        transform: translateX(-50%);
        border-radius: 50% 50% 7% 7% / 92% 92% 8% 8%;
        background: var(--scene-ink);
    }

    .scene-mosque-dome::before {
        content: "";
        position: absolute;
        left: 50%;
        bottom: calc(100% - 1px);
        width: 1px;
        height: 8px;
        background: var(--scene-ink);
    }

    .scene-mosque-dome::after {
        content: "";
        position: absolute;
        left: calc(50% - 1px);
        bottom: calc(100% + 5px);
        width: 4px;
        height: 4px;
        border: 1px solid var(--scene-ink);
        border-left-color: transparent;
        border-radius: 50%;
    }

    .scene-minaret {
        position: absolute;
        z-index: 4;
        bottom: 6px;
        width: 2px;
        height: 31px;
        border-radius: 2px 2px 0 0;
        background: var(--scene-ink);
        opacity: .94;
    }

    .scene-minaret::before {
        content: "";
        position: absolute;
        left: -2px;
        top: 7px;
        width: 6px;
        height: 2px;
        border-radius: 3px;
        background: var(--scene-ink);
        box-shadow: 0 3px 0 -0.5px color-mix(in srgb, var(--scene-ink) 78%, transparent);
    }

    .scene-minaret::after {
        content: "";
        position: absolute;
        left: -1px;
        top: -8px;
        width: 0;
        height: 0;
        border-left: 2px solid transparent;
        border-right: 2px solid transparent;
        border-bottom: 9px solid var(--scene-ink);
    }

    .scene-minaret-left { left: 3%; }
    .scene-minaret-right { left: 29%; }

    /* Galata esintili kule */
    .scene-tower {
        position: absolute;
        z-index: 3;
        left: 34%;
        bottom: 6px;
        width: 10px;
        height: 22px;
        border-radius: 2px 2px 0 0;
        background: color-mix(in srgb, var(--scene-ink) 88%, transparent);
    }

    .scene-tower::before {
        content: "";
        position: absolute;
        left: -3px;
        top: -7px;
        width: 16px;
        height: 8px;
        clip-path: polygon(50% 0, 100% 100%, 0 100%);
        background: var(--scene-ink);
    }

    .scene-tower::after {
        content: "";
        position: absolute;
        left: 4px;
        top: -13px;
        width: 2px;
        height: 7px;
        border-radius: 2px;
        background: var(--scene-ink);
    }

    /* Boğaz köprüsü */
    .scene-bridge {
        position: absolute;
        z-index: 2;
        left: 42%;
        right: 3%;
        bottom: 5px;
        height: 36px;
        color: color-mix(in srgb, var(--accent) 72%, var(--ink) 28%);
        opacity: .92;
    }

    .bridge-tower {
        position: absolute;
        bottom: 3px;
        width: 2px;
        height: 25px;
        border-radius: 1px;
        background: currentColor;
        box-shadow: 7px 0 0 currentColor;
    }

    .bridge-tower::before,
    .bridge-tower::after {
        content: "";
        position: absolute;
        left: 0;
        width: 9px;
        height: 1.5px;
        background: currentColor;
    }

    .bridge-tower::before { top: 6px; }
    .bridge-tower::after { top: 14px; }
    .bridge-tower-left { left: 5%; }
    .bridge-tower-right { right: 10%; }

    .bridge-deck {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 4px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        box-shadow: 0 3px 0 -0.5px color-mix(in srgb, currentColor 36%, transparent);
    }

    .bridge-cable {
        position: absolute;
        top: 7px;
        height: 19px;
        border-top: 1px solid currentColor;
        border-radius: 52% 52% 0 0;
    }

    .bridge-cable-left {
        left: 8%;
        width: 47%;
        transform: rotate(1.3deg);
        transform-origin: left top;
    }

    .bridge-cable-right {
        right: 12%;
        width: 47%;
        transform: rotate(-1.3deg);
        transform-origin: right top;
    }

    .bridge-cable::after {
        content: "";
        position: absolute;
        left: 8%;
        right: 7%;
        top: 2px;
        height: 18px;
        background: repeating-linear-gradient(90deg,
            currentColor 0 1px,
            transparent 1px 9px);
        opacity: .4;
    }

    /* Türk bayrağı - temadan bağımsız olarak gerçek kırmızı */
    .scene-flag {
        position: absolute;
        z-index: 7;
        right: 2.5%;
        top: 8px;
        width: 22px;
        height: 14px;
        border-radius: 1px 3px 3px 1px;
        background: #c8102e;
        box-shadow: 0 2px 7px rgba(200,16,46,.18);
        transform: skewY(-2deg);
    }

    .scene-flag::before {
        content: "";
        position: absolute;
        left: -2px;
        top: -2px;
        width: 2px;
        height: 36px;
        border-radius: 999px;
        background: color-mix(in srgb, var(--scene-ink) 84%, var(--accent) 16%);
    }

    .flag-crescent {
        position: absolute;
        left: 5px;
        top: 3.5px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #fff;
    }

    .flag-crescent::after {
        content: "";
        position: absolute;
        left: 2.2px;
        top: -1px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #c8102e;
    }

    .flag-star {
        position: absolute;
        left: 12.5px;
        top: 2.1px;
        color: #fff;
        font-size: 6px;
        line-height: 1;
        transform: rotate(8deg);
    }

    /* Uçak */
    .scene-plane {
        position: absolute;
        z-index: 6;
        left: 45%;
        top: 6px;
        width: 22px;
        height: 8px;
        background: var(--scene-soft);
        clip-path: polygon(0 44%, 40% 40%, 56% 0, 66% 0, 62% 40%, 100% 44%, 100% 58%, 62% 58%, 67% 100%, 57% 100%, 40% 59%, 0 58%);
        transform: rotate(-7deg);
        opacity: .72;
    }

    .scene-plane::before,
    .scene-plane::after {
        display: none;
    }

    /* Helikopter */
    .scene-helicopter {
        position: absolute;
        z-index: 6;
        left: 66%;
        top: 17px;
        width: 14px;
        height: 6px;
        border-radius: 7px 8px 5px 5px;
        background: var(--scene-soft);
        opacity: .68;
    }

    .scene-helicopter::before {
        content: "";
        position: absolute;
        left: -4px;
        top: -5px;
        width: 22px;
        height: 1px;
        border-radius: 999px;
        background: var(--scene-soft);
        box-shadow: 11px 3px 0 -0.2px var(--scene-soft);
    }

    .scene-helicopter::after {
        content: "";
        position: absolute;
        right: -10px;
        top: 2px;
        width: 11px;
        height: 2px;
        border-radius: 2px;
        background: var(--scene-soft);
        transform: rotate(-6deg);
    }

    /* Kuşlar */
    .scene-bird {
        position: absolute;
        z-index: 5;
        width: 7px;
        height: 4px;
        border-top: 1.4px solid var(--scene-soft);
        border-radius: 50% 50% 0 0;
        opacity: .52;
        transform: rotate(11deg);
    }

    .scene-bird::after {
        content: "";
        position: absolute;
        left: 5px;
        top: -2px;
        width: 7px;
        height: 4px;
        border-top: 1.4px solid var(--scene-soft);
        border-radius: 50% 50% 0 0;
        transform: rotate(-22deg);
    }

    .scene-bird-one { left: 31%; top: 9px; }
    .scene-bird-two { left: 38%; top: 18px; transform: scale(.72) rotate(1deg); }

    /* Profil ve bildirim: aynı optik boy, kaymasız grid */
    .mobile-profile-button,
    .mobile-header > .notification-bell {
        position: relative;
        z-index: 10;
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        margin: 0;
        padding: 2px;
        align-self: center;
        justify-self: center;
        border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
        border-radius: 50%;
        background: color-mix(in srgb, var(--surface-raised) 80%, var(--accent-soft) 20%);
        color: var(--ink);
        box-shadow: 0 4px 13px color-mix(in srgb, var(--shadow-color) 26%, transparent);
    }

    .mobile-profile-button .user-avatar {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        min-width: 34px;
        margin: 0;
        border: 1.5px solid color-mix(in srgb, var(--accent) 50%, transparent);
        border-radius: 50%;
        background: var(--surface-raised);
        color: var(--ink);
        overflow: hidden;
    }

    .mobile-header > .notification-bell {
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-header > .notification-bell svg {
        width: 20px;
        height: 20px;
        stroke-width: 1.8;
    }

    .mobile-header > .notification-bell .notification-count {
        top: -3px;
        right: -3px;
        min-width: 17px;
        height: 17px;
        padding: 2px 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--surface);
        border-radius: 999px;
        background: #c8102e;
        color: #fff;
        font-size: 9px;
        font-weight: 800;
        line-height: 1;
    }

    .mobile-header > .notification-bell .notification-count[hidden] {
        display: none;
    }

    .mobile-profile-button:active,
    .mobile-header > .notification-bell:active {
        transform: scale(.96);
    }

    /* Alt bar temanın tamamını gerçek biçimde takip eder */
    .mobile-bottom-nav {
        overflow: hidden;
        background: var(--surface);
        border-top: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
        box-shadow: 0 -8px 28px color-mix(in srgb, var(--shadow-color) 32%, transparent);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .mobile-bottom-nav::before {
        content: "";
        position: absolute;
        left: 9%;
        right: 9%;
        top: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--accent), transparent);
        opacity: .46;
    }

    .mobile-nav-item {
        position: relative;
        color: color-mix(in srgb, var(--muted) 88%, var(--ink) 12%);
        transition: color .18s ease, background .18s ease, transform .18s ease;
    }

    .mobile-nav-item svg {
        transition: transform .18s ease, stroke .18s ease;
    }

    .mobile-nav-item.active {
        color: var(--accent-ink);
        background: color-mix(in srgb, var(--accent) 11%, transparent);
    }

    .mobile-nav-item.active::before {
        content: "";
        position: absolute;
        top: -6px;
        left: 26%;
        right: 26%;
        height: 3px;
        border-radius: 0 0 999px 999px;
        background: var(--accent);
        box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 38%, transparent);
    }

    .mobile-nav-item.active svg {
        transform: translateY(-1px);
    }

    .mobile-nav-item:active {
        transform: scale(.97);
    }
}

@media (max-width: 360px) {
    .mobile-header {
        grid-template-columns: minmax(0, 1fr) 39px 39px;
        gap: 5px;
        padding-left: 8px;
        padding-right: 7px;
    }

    .mobile-profile-button,
    .mobile-header > .notification-bell {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }

    .mobile-profile-button .user-avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .scene-helicopter { display: none; }
    .scene-bird-two { display: none; }
    .scene-flag { right: 1%; }
}
