    body {
      background: #E0D9CC;
      color: #131215;
      font-family: arial, helvetica, sans-serif;
      font-size: 10pt;
      margin: 0;
      padding: 0;
    }

    a, a:visited { color: #00E; text-decoration: none; }
    a:hover { color: red !important; }

    hr { border: none; border-top: 1px solid #000; margin: 20px auto; width: 80%; }

    /* Column width matches .container inner × .section-divider (96%); height from same width keeps 2480×440 proportions */
    .nav{
      display:block;
      background:transparent;
      border-bottom:none;
      padding:0 0 12px 0;
      font-size:12px;
      position:relative;
      z-index:100;
    }
    /* Depth matches thermal task panels (see core/thermal.mjs computeThermalStyles .panel) */
    /* Default: full-width banner (mobile, tablets, half a wide window) — matches old edge-to-edge behavior */
    .nav-inner{
      position:relative;
      width:100%;
      max-width:100%;
      margin:0 auto;
      box-sizing:border-box;
      border-radius:0;
      overflow:hidden;
      border:1px solid rgba(106,98,85,0.55);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.42),
        inset 0 -2px 5px rgba(111,90,30,0.2),
        0 10px 28px rgba(0,0,0,0.22);
    }
    /* Large viewports only: same width as main column / section-divider, rounded card */
    @media (min-width: 1400px){
      .nav-inner{
        width:min(calc(0.96 * (min(1100px, 100vw) - 32px)), calc(100% - 32px));
        border-radius:10px;
      }
    }
    /* Percent is relative to .nav-inner width — same aspect as full-width banner before */
    .nav-inner::before{
      content:'';
      display:block;
      width:100%;
      padding-top:17.74%; /* 440/2480 */
    }
    .nav-banner-link{
      position:absolute;
      left:0;
      top:0;
      right:0;
      bottom:0;
      z-index:0;
      display:block;
      overflow:hidden;
    }
    .nav-banner-link img{
      width:100%;
      height:100%;
      object-fit:cover;
      object-position:center;
      display:block;
    }
    .nav-left{
      font-weight:bold;
      color:#23241e;
      position:absolute;
      left:0;
      bottom:0;
      z-index:1;
      padding:8px 12px;
    }
    .nav-left a{color:#23241e;text-decoration:none;font-weight:bold;}
    .nav-left a:hover{opacity:0.8 !important;}
    .nav-right{
      display:flex;
      align-items:center;
      gap:8px;
      position:absolute;
      right:0;
      bottom:0;
      z-index:1;
      padding:8px 12px;
    }
    .nav-right a{margin:0;color:#23241e;font-weight:bold;}

    .btn{
      background:#4E4639;
      border:1px solid #6a6255;
      border-right:2px solid #6a6255;
      border-bottom:2px solid #6a6255;
      color:#E0D9CC;
      padding:6px 10px;
      font-size:10pt;
      cursor:pointer;
    }
    .btn:hover{background:#6a6255;}
    .btn.small{font-size:9pt;padding:4px 6px;}

    /* Nav-specific button theme (yellow) */
    .nav .btn{
      background:#fdd41a;
      border:1px solid #c9a815;
      border-right:2px solid #c9a815;
      border-bottom:2px solid #c9a815;
      color:#23241e;
      font-weight:bold;
      font-size:9.5pt;
      padding:5.7px 9.5px;
    }
    .nav .btn:hover{background:#ffe44a;}

    /* Thermal-styled buttons inside task rows */
    .task-row .btn.small{
      background:#fdd41a;
      color:#23241e;
      border:1px solid #c9a815;
      border-right:2px solid #c9a815;
      border-bottom:2px solid #c9a815;
      border-radius:6px;
      padding:6px 16px;
      box-shadow:0 4px 14px rgba(0,0,0,0.25);
      font-weight:bold;
    }
    .task-row .btn.small:hover{background:#ffe44a;}

    .container{max-width:1100px;margin:24px auto;padding:16px}

    h2,h3{color:#131215;margin:6px 0;text-align:center;}

    .section{text-align:center;margin-bottom:32px;}
    .section-divider{height:1px;background:#000;width:96%;margin:24px auto;}

    .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;justify-content:center;}

    .card{
      background:#4E4639;
      border:1px solid #6a6255;
      border-right:2px solid #6a6255;
      border-bottom:2px solid #6a6255;
      padding:10px;
      display:flex;
      flex-direction:column;
    }
    .card img.thumb{width:100%;height:140px;object-fit:cover}
    .card-title{margin:4px 0;font-weight:bold;color:#E0D9CC}
    .card-desc{font-size:10pt;margin:6px 0;color:#c5bfb3}
    .card-meta{font-size:10pt;margin-bottom:6px;color:#a8a29a}

    .row{
      padding:12px;
      margin-bottom:12px;
      border-radius:10px;
    }

    .progress{height:20px;background:rgba(0,0,0,0.2);border-radius:4px;overflow:hidden;position:relative;margin-top:20px}
    .progress>i{display:block;height:100%;background:#3b82f6;width:0;transition:width 0.3s, background-color 0.3s}
    
    /* TikTok Embed Styling */
    .tiktok-embed{margin:20px auto;max-width:100%;}

    .task-row{cursor:pointer; position:relative; border-radius:10px;}
    .task-header{display:flex;align-items:center;gap:12px;position:relative;}
    .task-title{font-weight:bold;}
    .task-details{display:none;margin-top:10px;text-align:left;}
    .task-row.open .task-details{display:block;}
    .task-row.open .task-details .task-greeting{display:none !important;}
    .task-row .progress{flex:1;margin-top:0;}
    .task-actions{display:flex;gap:8px;justify-content:center;align-items:center;margin-top:12px;flex-wrap:wrap;}
    .task-remove{position:absolute;top:0;right:0;border:1px solid rgba(255,255,255,0.2);background:rgba(0,0,0,0.3);padding:2px 6px;border-radius:4px;color:#e8e8e8;font-weight:bold;cursor:pointer;z-index:2;}
    .progress{position:relative;}
    .progress-title-overlay{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-weight:bold;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,0.6);font-size:9px;}
    .tasks-title{color:inherit !important;}
    .username-link{font-weight:bold;}
    .username-link:hover{opacity:0.8 !important;}

    /* Home Top section: slimmer folded row – profile name only when open */
    .task-row .task-profile-row{display:none;}
    .task-row.open .task-profile-row{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative;margin-bottom:10px;}
    .task-row:not(.open) .task-header .progress{height:28px;}
    .task-row:not(.open).task-row-top{width:85%;margin-left:0;margin-right:auto;padding:6px 10px;}
    .task-row:not(.open) .task-header .progress .open-text{display:none !important;}
    .task-row.open .task-header .progress .folded-text{display:none !important;}

    /* Latest section: slot at top, grid of cards below */
    #latest-task-section{
      display:flex;
      flex-direction:column;
      align-items:stretch;
      gap:12px;
    }
    #latest-grid{
      display:flex;
      flex-direction:row;
      flex-wrap:wrap;
      justify-content:flex-start;
      align-items:flex-start;
      gap:10px;
    }
    .latest-task-card{
      width:44px;
      height:44px;
      flex-shrink:0;
      border-radius:8px;
      position:relative;
      overflow:hidden;
      cursor:pointer;
      display:flex;
      align-items:center;
      justify-content:center;
    }
    .latest-task-card .latest-radial-wrap{
      position:absolute;
      inset:0;
      border-radius:8px;
      overflow:hidden;
      display:flex;
      align-items:center;
      justify-content:center;
    }
    /* Wrapper with faded edge so the radial progress looks smooth (mask lives here so fill is not overwritten) */
    .latest-task-card .latest-radial-fade-wrap{
      position:absolute;
      inset:0;
      display:flex;
      align-items:center;
      justify-content:center;
      mask-image:radial-gradient(ellipse 100% 100% at 50% 50%, black 50%, transparent 90%);
      -webkit-mask-image:radial-gradient(ellipse 100% 100% at 50% 50%, black 50%, transparent 90%);
      mask-size:100% 100%;
      -webkit-mask-size:100% 100%;
      mask-position:50% 50%;
      -webkit-mask-position:50% 50%;
    }
    /* Dot in center, radially expanding (scale 0..1) */
    .latest-task-card .latest-radial-fade-wrap .latest-radial-fill{
      position:absolute;
      width:142%;
      height:142%;
      top:50%;
      left:50%;
      border-radius:50%;
      background:var(--progress-fill, #4caf50);
      transform:translate(-50%,-50%) scale(calc(var(--pct) / 100));
      transition:transform 0.5s ease-out, background 0.5s ease-out;
    }
    /* Latest: wrapper so card can expand to full row like Top Rated */
    .latest-task-wrapper{
      flex-shrink:0;
      width:44px;
      height:44px;
    }
    .latest-task-wrapper.open{
      width:100%;
      height:auto;
    }
    .latest-task-wrapper.open .latest-task-card{display:none;}
    .latest-task-wrapper .latest-task-expanded{display:none;}
    .latest-task-wrapper.open .latest-task-expanded{display:block;}
    /* Latest: slot at top, grid below */
    #latest-task-section{
      display:flex;
      flex-direction:column;
      align-items:stretch;
      gap:12px;
    }
    #latest-expanded-slot{
      width:100%;
      order:-1;
    }
    #latest-expanded-slot.has-content{
      display:block !important;
    }
    #latest-grid{
      display:flex;
      flex-direction:row;
      flex-wrap:wrap;
      justify-content:flex-start;
      align-items:flex-start;
      gap:10px;
    }

    small{color:inherit; opacity:0.7;}

    /* PROFILE HEADER */
    .profile-header {
      text-align: center;
      background: #4E4639;
      border: 1px solid #6a6255;
      border-radius: 8px;
      padding: 40px 16px;
      position: relative;
      background-size: cover;
      background-position: center;
    }
    .profile-name {
      font-size: 24px;
      font-weight: bold;
      color: #E0D9CC;
    }

    /* Tasks Section */
    .tasks-section {
      text-align: center;
      margin-top: 24px;
    }
    .tasks-section > div[id*="container"],
    #top-rated-section {
      padding: 0 10%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }
    /* Latest: slot at top, grid of squares below */
    #latest-task-section {
      display: flex !important;
      flex-direction: column !important;
      align-items: stretch !important;
      gap: 12px !important;
      padding: 0 10%;
    }
    #latest-expanded-slot { order: -1; }
    #latest-grid {
      display: flex !important;
      flex-direction: row !important;
      flex-wrap: wrap !important;
      justify-content: flex-start !important;
      align-items: flex-start !important;
      gap: 10px !important;
    }
    #latest-grid .latest-task-card {
      width: 44px !important;
      height: 44px !important;
      max-width: none !important;
    }
    .task-row {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      transform: scale(0.9);
      transform-origin: center;
    }
    /* Revert 10% spacing on mobile only */
    @media (max-width: 768px) {
      .tasks-section > div[id*="container"],
      #latest-task-section,
      #top-rated-section {
        padding: 0;
      }
      #latest-task-section {
        display: flex !important;
        flex-direction: column !important;
      }
      .task-row {
        transform: scale(1);
      }
    }
    .tasks-title {
      margin-bottom: 12px;
      font-weight: bold;
    }
    .add-task-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      margin-top: 12px;
    }

    .globe-btn {
      background: none;
      border: none;
      outline: none;
      padding: 8px 12px;
      cursor: pointer;
      font-size: 20px;
      line-height: 1;
      color: #4E4639;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .globe-btn:hover {
      background: rgba(78,70,57,0.1);
    }
    .globe-btn:focus {
      outline: none;
      box-shadow: none;
    }
    .domestic-slots {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .domestic-slot-active {
      position: relative;
      min-height: 60px;
    }
    .domestic-slot-active .add-task-btn {
      margin-bottom: 8px;
    }
    .domestic-slot-locked {
      opacity: 0.35;
      pointer-events: none;
    }
    .domestic-slot-active:not(.has-task) {
      opacity: 0.7;
    }
    .add-task-row {
      opacity: 1;
    }
    .task-slot-placeholder {
      opacity: 0.35;
    }
    .task-slot-placeholder .domestic-locked-placeholder {
      padding: 12px;
      border-radius: 10px;
      background: #1a1c20;
      border: 1px solid #cfd2d6;
      min-height: 28px;
    }
    .task-slot-placeholder .domestic-locked-placeholder .progress {
      height: 20px;
      background: rgba(0,0,0,0.3);
      border-radius: 4px;
      overflow: hidden;
      margin-top: 8px;
    }
    .task-slot-placeholder .domestic-locked-placeholder .progress i {
      display: block;
      height: 100%;
      width: 0;
      background: #3b82f6;
    }
    .domestic-locked-placeholder {
      padding: 12px;
      border-radius: 10px;
      background: #1a1c20;
      border: 1px solid #cfd2d6;
      min-height: 28px;
    }
    .domestic-locked-placeholder .progress {
      height: 20px;
      background: rgba(0,0,0,0.3);
      border-radius: 4px;
      overflow: hidden;
      margin-top: 8px;
    }
    .domestic-locked-placeholder .progress i {
      display: block;
      height: 100%;
      width: 0;
      background: #3b82f6;
    }

    /* Modal */
    .modal {
      display: none; 
      position: fixed;
      z-index: 999;
      left: 0; top: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.5);
      justify-content: center;
      align-items: center;
    }
    .modal-content {
      background: #fff;
      border-radius: 8px;
      padding: 16px;
      max-width: 400px;
      width: 90%;
    }
    #task-modal .task-modal-inner {
      display: flex;
      flex-direction: column;
      max-height: min(90vh, 640px);
      overflow-y: auto;
    }
    #task-modal .task-modal-heading {
      flex-shrink: 0;
      margin: 0 0 12px 0;
      text-align: center;
      font-size: 1.25rem;
      order: -1;
    }
    #task-modal #task-form {
      flex: 1 1 auto;
      min-height: 0;
    }
    #task-desc,
    #edit-task-desc {
      resize: none;
      min-height: 72px;
      max-height: 120px;
      box-sizing: border-box;
      vertical-align: top;
    }
    .edit-task-actions {
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-start;
    }
    #edit-task-video[readonly] {
      background: #f3f3f3;
      cursor: not-allowed;
    }
    .form-group {
      margin-bottom: 12px;
    }
    .form-group label { display: block; margin-bottom: 4px; }
    .form-group input, .form-group textarea {
      width: 100%;
      padding: 6px;
      border-radius: 4px;
      border: 1px solid #ccc;
    }
    .form-actions {
      display: flex;
      justify-content: space-between;
      margin-top: 12px;
    }

    /* =============================================
       THERMAL CONTINUUM – DONATE POPUP (mobile-first)
       ============================================= */

    /* Fixed overlay – covers entire viewport */
    #donate-modal {
      display: none;
      position: fixed;
      z-index: 1000;
      inset: 0;                       /* top/right/bottom/left = 0 */
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      transition: background 0.5s ease;
    }
    #donate-modal.open { display: flex; }

    .donate-backdrop {
      position: absolute;
      inset: 0;
      /* tapped to close */
    }

    .donate-panel {
      position: relative;
      z-index: 1;
      width: 100%;
      max-width: 420px;
      margin: auto;                   /* centre in flex */
      border-radius: 0;              /* flush on mobile */
      padding: 28px 20px 36px;
      min-height: 100dvh;            /* full phone height */
      display: flex;
      flex-direction: column;
      transition: all 0.5s ease;
      font-family: system-ui, -apple-system, sans-serif;
    }

    /* On taller / wider screens give it a card look */
    @media (min-width: 480px) {
      .donate-panel {
        border-radius: 18px;
        min-height: auto;
        margin: 32px auto;
        max-height: 94dvh;
        overflow-y: auto;
      }
    }

    /* ---- Close button (top-right ×) ---- */
    .donate-close {
      position: absolute;
      top: 12px; right: 14px;
      width: 36px; height: 36px;
      border-radius: 50%;
      border: none;
      background: rgba(0,0,0,0.08);
      font-size: 20px;
      line-height: 1;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }
    .donate-close:hover { background: rgba(0,0,0,0.15); }

    /* ---- Typography ---- */
    .donate-panel h2 {
      margin: 0 0 4px 0;
      font-size: 20px;
      line-height: 1.3;
      padding-right: 40px;        /* room for close btn */
    }
    .donate-panel .donate-subtitle {
      margin: 0 0 6px 0;
      font-size: 13px;
      opacity: 0.6;
    }
    .donate-panel .donate-desc {
      display: none; /* greeting not shown in donate modal */
    }

    .donate-panel .donate-disclaimer {
      font-size: 11px;
      line-height: 1.35;
      opacity: 0.75;
      margin: 12px 0 0 0;
      padding: 0 4px;
      max-width: 100%;
      word-wrap: break-word;
      overflow-wrap: break-word;
      box-sizing: border-box;
    }

    /* ---- Progress bar ---- */
    .donate-progress-wrap {
      height: 28px;
      border-radius: 14px;
      overflow: hidden;
      position: relative;
      margin-bottom: 6px;
    }
    .donate-progress-wrap i {
      display: block;
      height: 100%;
      transition: width 0.5s ease, background 0.5s ease;
    }
    .donate-progress-wrap .donate-progress-label {
      position: absolute;
      left: 50%; top: 50%;
      transform: translate(-50%, -50%);
      font-size: 12px;
      font-weight: bold;
      text-shadow: 0 1px 2px rgba(0,0,0,0.5);
      color: #fff;
      white-space: nowrap;
    }
    .donate-stats {
      text-align: center;
      font-size: 13px;
      margin-bottom: 20px;
      opacity: 0.7;
    }

    /* ---- Copy-link bar ---- */
    .donate-link-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 14px 0;
      padding: 10px 12px;
      border-radius: 10px;
      font-size: 12px;
    }
    .donate-link-bar input {
      flex: 1;
      border: none;
      background: transparent;
      font-size: 12px;
      color: inherit;
      outline: none;
      min-width: 0;
    }
    .donate-link-bar button {
      flex-shrink: 0;
      padding: 6px 14px;
      border-radius: 8px;
      border: 1px solid rgba(0,0,0,0.10);
      background: rgba(255,255,255,0.40);
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
      transition: background 0.2s;
    }
    .donate-link-bar button:hover {
      background: rgba(255,255,255,0.65);
    }

    /* ---- QR code section ---- */
    .donate-qr-section {
      display: block;              /* no flex – plain stacking */
      text-align: center;
      margin: 16px 0 8px;
      position: relative;
      z-index: 10;                 /* above other modal content */
    }
    .donate-qr-wrap {
      display: inline-block;       /* shrink-wrap the image */
      background: #fff;
      border-radius: 14px;
      padding: 16px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.10);
      position: relative;
      z-index: 11;
    }
    .donate-qr-wrap img {
      display: block;
      width: 200px;
      height: 200px;
      image-rendering: auto;       /* smooth – better for camera scanning */
    }
    .donate-qr-label {
      font-size: 13px;
      opacity: 0.7;
      text-align: center;
      margin: 14px 0 4px;
    }

    /* ---- Amount slider ---- */
    .donate-slider-section {
      width: 100%;
      max-width: 260px;
      margin: 0 auto;
      text-align: center;
    }
    .donate-slider-value {
      font-size: 28px;
      font-weight: 700;
      margin-bottom: 8px;
    }
    .donate-slider-section input[type="range"] {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 6px;
      border-radius: 3px;
      background: rgba(0,0,0,0.12);
      outline: none;
      transition: background 0.3s;
    }
    .donate-slider-section input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: #b8922e;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(0,0,0,0.25);
      border: 2px solid #fff;
      transition: background 0.3s;
    }
    .donate-slider-section input[type="range"]::-moz-range-thumb {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: #b8922e;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(0,0,0,0.25);
      border: 2px solid #fff;
    }
    .donate-slider-minmax {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      opacity: 0.5;
      margin-top: 4px;
    }

    /* ---- Action buttons (big touch targets) ---- */
    .donate-actions {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: auto;             /* push to bottom on mobile */
      padding-top: 20px;
    }
    .btn-swish {
      width: 100%;
      padding: 14px 0;
      border-radius: 14px;
      border: none;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      transition: transform 0.12s, box-shadow 0.2s;
      letter-spacing: 0.3px;
      -webkit-tap-highlight-color: transparent;
    }
    .btn-swish:active { transform: scale(0.97); }
    .btn-back-donate {
      width: 100%;
      padding: 12px 0;
      border-radius: 14px;
      border: 1px solid rgba(0,0,0,0.10);
      background: transparent;
      font-size: 14px;
      cursor: pointer;
      transition: background 0.2s;
      -webkit-tap-highlight-color: transparent;
    }
    .btn-back-donate:active { background: rgba(0,0,0,0.06); }

    /* ---- Video ---- */
    .donate-video-wrap {
      margin: 14px 0;
      border-radius: 12px;
      overflow: hidden;
    }

    /* ---- Copied toast ---- */
    .copied-toast {
      font-size: 11px;
      color: #22c55e;
      font-weight: bold;
      opacity: 0;
      transition: opacity 0.3s;
    }
    .copied-toast.show { opacity: 1; }

    /* Banner placeholder (legacy, kept for reference) */

    /* Country selection grid */
    .country-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 8px;
      max-width: 360px;
      margin: 20px auto;
      padding: 0 16px;
      box-sizing: border-box;
    }
    .country-flag-btn {
      aspect-ratio: 4/3;
      border: 2px solid #6a6255;
      border-radius: 6px;
      background: #4E4639;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      transition: border-color 0.2s, transform 0.15s;
      padding: 4px;
    }
    .country-flag-btn:hover {
      border-color: #131215;
      transform: scale(1.08);
    }
    .country-flag-btn .flag-label {
      font-size: 9px;
      color: #E0D9CC;
      margin-top: 2px;
    }

    /* Nav dropdown */
    .nav-dropdown { position: relative; display: inline-block; z-index: 10001; }
    .nav-dropdown-toggle {
      cursor: pointer;
      color: #23241e;
      font-weight: bold;
      text-decoration: none;
      background: #fdd41a;
      border: 1px solid #c9a815;
      border-right: 2px solid #c9a815;
      border-bottom: 2px solid #c9a815;
      border-radius: 0;
      font-size: 12px;
      padding: 6px 10px;
      font-family: inherit;
    }
    .nav-dropdown-toggle:hover { background: #ffe44a; color: #23241e; }
    .nav-dropdown-menu {
      display: none;
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      background: #fdd41a;
      border: 1px solid #c9a815;
      border-radius: 4px;
      min-width: 140px;
      z-index: 10000;
      box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }
    .nav-dropdown-menu.show { display: block; }
    .nav-dropdown-item {
      display: block;
      padding: 8px 12px;
      color: #23241e;
      text-decoration: none;
      font-size: 11px;
      font-weight: bold;
      cursor: pointer;
      border: none;
      background: none;
      width: 100%;
      text-align: left;
      font-family: inherit;
    }
    .nav-dropdown-item:hover { background: #ffe44a; color: #23241e; }

    /* Top rated task card (home) */
    .top-task-card {
      background: #4E4639;
      border: 1px solid #6a6255;
      border-right: 2px solid #6a6255;
      border-bottom: 2px solid #6a6255;
      padding: 10px;
      cursor: pointer;
      transition: transform 0.1s;
    }
    .top-task-card:hover { transform: translateY(-2px); }
    .top-task-card .top-task-title { font-weight: bold; color: #E0D9CC; margin: 4px 0; font-size: 12px; }
    .top-task-card .top-task-author { font-size: 10pt; color: #a8a29a; margin-bottom: 4px; }
    .top-task-card .top-task-units { font-size: 9pt; color: #c5bfb3; margin-top: 4px; }
    .top-task-card .top-task-rank {
      display: inline-block;
      background: #131215;
      color: #fff;
      font-size: 10px;
      font-weight: bold;
      width: 20px;
      height: 20px;
      line-height: 20px;
      text-align: center;
      border-radius: 50%;
      margin-bottom: 4px;
    }

    /* Completed task states */
    .task-row.pending-task {
      background: #3a3a3a !important;
      border-color: #555 !important;
      color: #999 !important;
      box-shadow: none !important;
    }
    .task-row.pending-task .progress { background: #2a2a2a !important; }
    .task-row.pending-task .progress > i { background: #666 !important; }
    .task-row.pending-task .progress-title-overlay { color: #aaa !important; text-shadow: none !important; }
    .task-row.pending-task .task-details p,
    .task-row.pending-task .task-details small { color: #888 !important; }
    .task-row.pending-task .tasks-title { color: #888 !important; }

    .task-row.confirmed-task .progress > i { background: #b8922e !important; }
    .task-row.confirmed-task .progress { box-shadow: 0 0 8px rgba(184,146,46,0.4); }
    .task-row.confirmed-task small { color: #5a4a2a !important; }
    .task-row.confirmed-task .tasks-title { color: #2a2a2a !important; }

    /* Unfinished task on thermal (confirmed) profile: progress track same as normal/cold (solid so warm panel doesn't show through) */
    .task-row.progress-track-normal .task-header .progress,
    .task-row.task-row.progress-track-normal .progress {
      background: #1e2025 !important;
      box-shadow: none !important;
    }

    /* Social Crowd Funding link (hidden for now, function preserved) */
    .scf-link {
      display: none;
      text-align: center;
      font-size: 10px;
      color: #E0D9CC;
      cursor: pointer;
      text-decoration: none;
    }
    .scf-link:hover { color: red; }

    /* SCF modal */
    #scf-modal {
      display: none;
      position: fixed;
      z-index: 1000;
      inset: 0;
      background: rgba(0,0,0,0.92);
      justify-content: center;
      align-items: center;
    }
    #scf-modal.open { display: flex; }
    .scf-modal-content {
      color: #fff;
      text-align: center;
      padding: 40px 24px;
      max-width: 420px;
      width: 90%;
    }
    .scf-modal-content h2 { color: #fff; margin-bottom: 16px; }
    .scf-modal-content p { color: #ccc; font-size: 14px; line-height: 1.6; }
    .scf-modal-close {
      position: absolute;
      top: 16px; right: 18px;
      background: none;
      border: none;
      color: #fff;
      font-size: 28px;
      cursor: pointer;
    }
    .scf-modal-close:hover { color: #f66; }

    /* Owner sidebar */
    .owner-sidebar-toggle {
      display: none; /* hidden by default, shown via JS for owner */
      position: fixed;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      z-index: 10000;
      background: #1a1c20;
      color: #e8e8e8;
      border: 1px solid #cfd2d6;
      border-right: none;
      border-radius: 8px 0 0 8px;
      padding: 14px 6px;
      cursor: pointer;
      font-size: 14px;
      box-shadow: -2px 0 10px rgba(0,0,0,0.3);
      transition: right 0.3s ease;
      writing-mode: vertical-lr;
      letter-spacing: 1px;
    }
    .owner-sidebar-toggle:hover { background: #2a2c30; }
    .owner-sidebar-toggle.shifted { right: 280px; }

    .owner-sidebar {
      position: fixed;
      top: 0;
      right: -280px;
      width: 280px;
      height: 100%;
      background: #1a1c20;
      border-left: 1px solid #cfd2d6;
      z-index: 9998;
      transition: right 0.3s ease;
      overflow-y: auto;
      box-shadow: -4px 0 20px rgba(0,0,0,0.4);
      padding: 0;
      display: flex;
      flex-direction: column;
    }
    .owner-sidebar.open { right: 0; }

    .owner-sidebar-header {
      padding: 14px 16px 10px;
      border-bottom: 1px solid rgba(207,210,214,0.2);
      color: #e8e8e8;
      font-weight: bold;
      font-size: 13px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .owner-sidebar-header .sidebar-close {
      background: none;
      border: none;
      color: #e8e8e8;
      font-size: 20px;
      cursor: pointer;
      padding: 0 4px;
    }
    .owner-sidebar-header .sidebar-close:hover { color: #f66; }
    .owner-sidebar-count {
      background: #b8922e;
      color: #1a1a1a;
      font-size: 10px;
      font-weight: bold;
      padding: 2px 6px;
      border-radius: 10px;
      margin-left: 6px;
    }

    .owner-sidebar-list {
      padding: 8px;
      list-style: none;
      margin: 0;
      flex: 1;
      min-height: 0;
      overflow-y: auto;
    }
    .owner-sidebar-item {
      background: #3a3a3a;
      border: 1px solid #555;
      border-radius: 6px;
      padding: 10px;
      margin-bottom: 8px;
      cursor: pointer;
      transition: background 0.15s;
    }
    .owner-sidebar-item:hover { background: #4a4a4a; }
    .owner-sidebar-item-title {
      color: #ccc;
      font-weight: bold;
      font-size: 11px;
      margin-bottom: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .owner-sidebar-item-user {
      color: #888;
      font-size: 9px;
      margin-bottom: 6px;
    }
    .owner-sidebar-item-progress {
      height: 6px;
      background: #2a2a2a;
      border-radius: 3px;
      overflow: hidden;
    }
    .owner-sidebar-item-progress i {
      display: block;
      height: 100%;
      background: #666;
      border-radius: 3px;
    }
    .owner-sidebar-item-meta {
      color: #888;
      font-size: 9px;
      margin-top: 4px;
      text-align: right;
    }
    .owner-sidebar-empty {
      color: #666;
      text-align: center;
      padding: 30px 16px;
      font-size: 11px;
    }
    .owner-sidebar-footer {
      padding: 12px 16px;
      border-top: 1px solid #3a3a3a;
      margin-top: auto;
    }
    .owner-reset-tasks-btn {
      width: 100%;
      font-size: 10px;
      padding: 8px;
      background: #5a2a2a;
      border-color: #7a3a3a;
      color: #f0c0c0;
    }
    .owner-reset-tasks-btn:hover {
      background: #7a3a3a;
    }
    .owner-reset-tasks-btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    /* Fixed copyright footer */
    .copyright-footer {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: rgba(78,70,57,0.95);
      border-top: 1px solid #6a6255;
      text-align: center;
      font-size: 9px;
      color: #E0D9CC;
      padding: 4px 0;
      z-index: 9999;
      letter-spacing: 0.5px;
    }
    body { padding-bottom: 24px; } /* space so content isn't hidden behind footer */
    
    /* Remove number input spinners */
    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
      -webkit-appearance: none;
      appearance: none;
      margin: 0;
    }
    input[type="number"] {
      -moz-appearance: textfield;
      appearance: textfield;
    }
    
    /* Greeting animation */
    .greeting-animation {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.8);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 99999;
      opacity: 1;
      pointer-events: none;
      animation: greetingFade 2s linear forwards;
    }
    .greeting-animation-text {
      color: white;
      font-size: 48px;
      font-weight: bold;
      text-align: center;
      padding: 20px;
      word-wrap: break-word;
      max-width: 90%;
    }
    @keyframes greetingFade {
      from {
        opacity: 1;
      }
      to {
        opacity: 0;
      }
    }
    
    /* Progress bar animation */
    .progress-animate {
      transition: width 1.5s ease-out;
    }
    .progress > i {
      will-change: width;
      backface-visibility: hidden;
      transform: translateZ(0);
    }
