
    .card-insight span {
      display: block;
      margin-top: 3px;
      color: var(--text-tertiary);
      font-size: 11px;
      font-weight: var(--font-weight-regular);
      line-height: 1.2;
    }

    .slot-day {
      padding: 13px;
    }

    .slot-head {
      align-items: center;
      margin-bottom: 11px;
    }

    .slot-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
      min-width: 0;
    }

    .slot {
      min-width: 0;
      min-height: 46px;
      border: 1px solid rgba(143, 211, 255, 0.31);
      border-radius: var(--radius-pill);
      background:
        linear-gradient(135deg, rgba(143, 211, 255, 0.22), rgba(183, 156, 255, 0.14)),
        rgba(8, 18, 39, 0.84);
      color: #f4fbff;
      font-weight: 800;
      overflow-wrap: anywhere;
      box-shadow: inset 0 1px 0 var(--glass-highlight);
    }

    .slot.occupied {
      border-color: rgba(255, 154, 168, 0.34);
      background: rgba(115, 35, 50, 0.72);
      color: #ffe7eb;
    }

    .slot.template-on {
      border-color: rgba(143, 246, 208, 0.36);
      background: rgba(29, 119, 94, 0.6);
      color: #e8fff6;
    }

    .slot.selected {
      border-color: rgba(255, 255, 255, 0.72);
      background: transparent;
      box-shadow: 0 0 0 3px rgba(155, 220, 255, 0.12);
    }

    .empty,
    .notice {
      color: rgba(236, 243, 255, 0.8);
      line-height: 1.45;
    }

    .notice strong {
      color: var(--text);
    }

    .profile-row {
      align-items: center;
    }

    .compact-list {
      display: grid;
      gap: 8px;
      margin-top: 10px;
      min-width: 0;
    }

    .mini-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      min-width: 0;
      max-width: 100%;
      border-radius: var(--radius-xl);
      padding: 11px 12px;
      border: 1px solid var(--border-subtle);
      background: rgba(5, 12, 27, 0.76);
    }

    .mini-row strong,
    .mini-row span,
    .mini-row p {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .form-grid {
      display: grid;
      gap: 8px;
      margin-top: 10px;
    }

    .field,
    .select {
      width: 100%;
      min-height: 46px;
      border: 1px solid rgba(225, 240, 255, 0.3);
      border-radius: var(--radius-xl);
      outline: 0;
      padding: 0 14px;
      background: rgba(3, 9, 22, 0.86);
      color: var(--text);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }

    .field:focus,
    .select:focus {
      border-color: rgba(155, 220, 255, 0.66);
      background: rgba(8, 18, 38, 0.95);
    }

    .field::placeholder {
      color: rgba(236, 243, 255, 0.6);
    }

    textarea.field {
      min-height: 92px;
      padding-top: 12px;
      padding-bottom: 12px;
      line-height: 1.35;
      resize: vertical;
    }

    body.ai-view #app-back-row {
      display: none;
    }

    #view-ai.active {
      display: flex;
      flex: 1 1 auto;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      animation: none;
    }

    #view-ai .section-head {
      flex: 0 0 auto;
      flex-wrap: nowrap;
      margin: 3px 0 10px;
    }

    .ai-title-group {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .ai-back-button {
      width: 38px;
      height: 38px;
      border: 1px solid rgba(225, 240, 255, 0.22);
      border-radius: var(--radius-round);
      display: grid;
      place-items: center;
      flex: 0 0 auto;
      color: var(--text);
      background: rgba(7, 14, 30, 0.8);
    }

    .ai-back-button svg {
      width: 22px;
      height: 22px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.5;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .ai-chat-shell {
      display: flex;
      flex: 1 1 auto;
      flex-direction: column;
      gap: 9px;
      min-height: 0;
      overflow: hidden;
    }

    .ai-chat-intro {
      flex: 0 0 auto;
      padding: 10px 12px;
      border: 1px solid rgba(155, 220, 255, 0.22);
      border-radius: 17px;
      background: linear-gradient(135deg, rgba(42, 95, 155, 0.35), rgba(91, 65, 151, 0.24));
      color: var(--text-secondary);
      font-size: 13px;
      line-height: 1.35;
    }

    .ai-chat-shell.has-messages .ai-chat-intro {
      display: none;
    }

    .ai-messages {
      display: flex;
      flex: 1 1 auto;
      flex-direction: column;
      gap: 10px;
      min-height: 0;
      max-height: none;
      overflow-y: auto;
      overscroll-behavior: contain;
      padding: 5px 3px 10px;
      scroll-behavior: smooth;
      scrollbar-width: thin;
      scrollbar-color: rgba(155, 220, 255, 0.45) transparent;
      -webkit-overflow-scrolling: touch;
    }

    .ai-message {
      align-self: flex-start;
      width: fit-content;
      max-width: min(90%, 430px);
      padding: 10px 13px 12px;
      border-radius: 18px 18px 18px 5px;
      background: rgba(10, 20, 41, 0.95);
      border: 1px solid rgba(155, 220, 255, 0.19);
      color: var(--text);
      font-size: 15px;
      line-height: 1.5;
      overflow-wrap: anywhere;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    }

    .ai-message-role {
      margin-bottom: 5px;
      color: var(--accent);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .ai-message-content strong {
      color: #ffffff;
      font-weight: 800;
    }

    .ai-message.user {
      align-self: flex-end;
      border-radius: 18px 18px 5px 18px;
      background: linear-gradient(135deg, rgba(34, 113, 172, 0.96), rgba(91, 72, 177, 0.92));
      border-color: rgba(210, 235, 255, 0.28);
    }

    .ai-message.user .ai-message-role {
      color: rgba(255, 255, 255, 0.72);
    }

    .ai-message.pending {
      opacity: 0.68;
    }

    .ai-empty {
      margin: auto;
      max-width: 300px;
      text-align: center;
      color: rgba(236, 243, 255, 0.7);
      line-height: 1.5;
    }

    .ai-composer {
      position: relative;
      flex: 0 0 auto;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: end;
      gap: 8px;
      padding: 8px;
      border: 1px solid rgba(225, 240, 255, 0.24);
      border-radius: 23px;
      background: rgba(4, 10, 24, 0.97);
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }

    .ai-composer .field {
      min-height: 46px;
      max-height: 112px;
      padding: 12px 14px;
      border-radius: 17px;
      line-height: 1.35;
      resize: none;
    }

    .ai-send {
      width: 48px;
      min-width: 48px;
      height: 48px;
      padding: 0;
      border-radius: var(--radius-md);
      display: grid;
      place-items: center;
      font-size: 19px;
    }

    .coordinate-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
    }

    .location-hint {
      border: 1px solid rgba(155, 220, 255, 0.22);
      border-radius: 20px;
      padding: 10px 12px;
      background: rgba(5, 12, 27, 0.72);
      color: rgba(236, 243, 255, 0.76);
      font-size: 13px;
      line-height: 1.35;
    }

    .action-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
      margin-top: 10px;
      min-width: 0;
      max-width: 100%;
    }

    .action-row.stack {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      width: min(100%, 290px);
    }

    .action-row.stack .wide {
      grid-column: 1 / -1;
    }

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

    .button-grid .wide {
      grid-column: 1 / -1;
    }

    .mini-row > .button-grid {
      min-width: min(250px, 46vw);
      margin-top: 0;
    }

    .app-menu-panel {
      border: 1px solid rgba(255, 255, 255, 0.14);
      background:
        linear-gradient(180deg, rgba(33, 45, 74, 0.82), rgba(8, 12, 24, 0.9)),
        rgba(18, 18, 22, 0.9);
      box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.16);
      backdrop-filter: blur(30px) saturate(170%);
      -webkit-backdrop-filter: blur(30px) saturate(170%);
    }

    .app-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 18px 10px;
      margin: 14px 0 24px;
      min-width: 0;
    }

    .app-icon {
      display: grid;
      justify-items: center;
      align-content: start;
      gap: 7px;
      min-width: 0;
      color: var(--text);
      background: transparent;
      text-align: center;
      outline: none;
      box-shadow: none;
      -webkit-tap-highlight-color: transparent;
    }

    .app-icon:focus:not(:focus-visible) {
      outline: none;
      box-shadow: none;
    }

    .app-icon:active .app-icon-tile {
      transform: translateY(2px) scale(0.94);
      filter: brightness(1.12);
    }

    .app-icon.is-pressing .app-icon-tile {
      box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.42),
        0 0 0 2px rgba(142, 211, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -14px 28px rgba(29, 90, 178, 0.18);
    }

    .app-icon-tile {
      position: relative;
      display: grid;
      place-items: center;
      width: var(--icon-size, 72px);
      height: var(--icon-size, 72px);
      border-radius: 22px;
      background:
        radial-gradient(circle at 28% 18%, rgba(120, 196, 255, 0.14), transparent 42%),
        linear-gradient(145deg, rgba(20, 27, 43, 0.92), rgba(3, 8, 20, 0.9));
      border: 1px solid rgba(180, 220, 255, 0.15);
      box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
      font-size: 30px;
      transition: transform 0.18s ease, filter 0.18s ease;
    }

    .app-icon > span:last-child {
      display: block;
      width: 100%;
      max-width: min(100%, 108px);
      min-height: 14px;
      color: rgba(248, 251, 255, 0.82);
      font-size: clamp(10.5px, 2.8vw, 11.5px);
      font-weight: 560;
      line-height: 1.12;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      overflow-wrap: normal;
      text-shadow: 0 1px 6px rgba(0, 0, 0, 0.46);
    }

    .app-badge {
      position: absolute;
      top: -6px;
      right: -6px;
      min-width: 22px;
      height: 22px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      padding: 0 6px;
      border-radius: var(--radius-pill);
      background: #ff453a;
      border: 0;
      color: white;
      font-size: 12px;
      font-weight: 900;
      line-height: 1;
      font-variant-numeric: tabular-nums;
      text-rendering: geometricPrecision;
      text-shadow: none;
      box-shadow: none;
      transform: translateZ(0);
    }

    .app-badge-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      max-width: none;
      color: #fff;
      font-size: inherit;
      font-weight: inherit;
      line-height: 1;
      text-shadow: none;
      transform: translateY(0.5px);
    }


    .app-widget-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-top: 10px;
    }

    .app-widget {
      position: relative;
      display: grid;
      grid-template-rows: auto 1fr;
      align-items: stretch;
      gap: 10px;
      aspect-ratio: 1 / 1;
      min-height: 0;
      min-width: 0;
      padding: 16px;
      border: 1px solid rgba(225, 240, 255, 0.2);
      border-radius: 24px;
      color: var(--text-primary);
      text-align: left;
      background:
        radial-gradient(circle at 18% 12%, rgba(124, 199, 255, 0.2), transparent 42%),
        linear-gradient(145deg, rgba(15, 28, 58, 0.78), rgba(4, 9, 23, 0.84));
      box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
      backdrop-filter: blur(18px) saturate(150%);
      -webkit-backdrop-filter: blur(18px) saturate(150%);
      overflow: hidden;
    }

    .app-widget::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 46%);
      pointer-events: none;
    }

    .app-widget:active,
    .app-widget.is-pressing {
      transform: translateY(1px) scale(0.985);
      border-color: rgba(143, 211, 255, 0.46);
    }

    .app-widget-head {
      position: relative;
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      z-index: 1;
    }

    .app-widget-icon {
      position: relative;
      display: grid;
      place-items: center;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.74);
      border: 1px solid rgba(255, 255, 255, 0.1);
      font-size: 24px;
      box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
      z-index: 1;
    }
