/*
 * ARTIZS.SAY — Global Chat Desktop
 * Production checkpoint: Global Desktop v0.3.2
 * Approved Global keycap morphology / scalable production cover / UI System v1.1
 * Scope intentionally limited to desktop >= 1200px.
 */

@media (min-width:1200px){
  :root{
    --say-yellow:#FFC83D;
    --say-ink:#111827;
    --say-text:#232936;
    --say-subtext:#6B7280;
    --say-border:#E5E7EB;
    --say-bg:#F8FAFC;
    --say-online:#22C55E;
    --room-global:#3B82F6;
    --room-ai:#06B6D4;
    --room-design:#F472B6;
    --room-business:#F59E0B;
    --room-tech:#60A5FA;
    --room-career:#22C55E;
    --room-photography:#6366F1;
    --room-gaming:#7C3AED;
    --room-lifestyle:#84CC16;
    --say-radius-sm:8px;
    --say-radius-md:12px;
    --say-radius-lg:18px;
    --say-radius-pill:999px;
    --say-shadow-soft:0 6px 20px rgba(15,23,42,.08);
  }

  html,body{height:100%;overflow:hidden;background:#fff}
  body{font-family:Inter,"LINE Seed Sans TH","Segoe UI",Tahoma,sans-serif;color:var(--say-text)}
  button,input{font:inherit}

  /* 01 — DESKTOP ARCHITECTURE: Interests | Conversation | People + Expertise */
  .app-shell{
    width:100vw;height:100vh;height:100dvh;
    display:grid;
    grid-template-columns:264px minmax(0,1fr) 304px;
    background:#fff;
    overflow:hidden;
  }

  /* 02 — INTERESTS SIDEBAR */
  .sidebar{
    padding:24px 18px 16px;
    border-right:1px solid var(--say-border);
    background:#fff;
    overflow:hidden;
    display:flex;
    flex-direction:column;
  }
  .brand{height:auto;margin:0 6px 18px;display:flex;align-items:center;justify-content:flex-start}
  .brand-logo-image{display:block;max-width:156px;max-height:30px;width:auto;height:auto;object-fit:contain;object-position:left center}
  .brand-wordmark{font-size:23px;font-weight:900;letter-spacing:-.04em;color:var(--say-ink)}

  .room-search{
    height:40px;margin:0 4px 14px;padding:0 12px;
    border:1px solid var(--say-border);border-radius:var(--say-radius-md);
    background:var(--say-bg);display:flex;align-items:center;gap:8px;color:#94A3B8;
  }
  .room-search svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}
  .room-search input{border:0;outline:0;background:transparent;min-width:0;width:100%;font-size:12px;color:var(--say-text)}
  .room-search input::placeholder{color:#94A3B8}

  .section-title{margin:4px 8px 8px;font-size:10px;font-weight:800;letter-spacing:.13em;color:#94A3B8}
  .room-list{display:flex;flex-direction:column;gap:4px;overflow:auto;min-height:0;padding:0 2px 4px;scrollbar-width:none}
  .room-list::-webkit-scrollbar{display:none}
  .room-item{
    position:relative;width:100%;min-height:58px;
    border:1px solid var(--say-border);background:#fff;border-radius:var(--say-radius-md);
    padding:8px 10px;display:grid;grid-template-columns:38px minmax(0,1fr) auto;
    gap:9px;align-items:center;text-align:left;color:var(--say-text);cursor:pointer;
    transition:background .15s ease,border-color .15s ease,box-shadow .15s ease;
  }
  .room-item:hover{background:#F8FAFC;box-shadow:0 3px 12px rgba(15,23,42,.04)}
  .room-item.active{
    color:var(--say-text)!important;
    background:color-mix(in srgb,var(--room-accent,var(--room-global)) 12%,white)!important;
    border-color:var(--room-accent,var(--room-global))!important;
    box-shadow:none!important;
  }
  .room-icon,.room-icon-badge{
    width:36px;height:36px;display:grid;place-items:center;background:transparent!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible;
  }
  .room-mascot-2d{width:34px;height:34px;display:block;object-fit:contain}
  .room-copy{min-width:0}
  .room-copy strong{display:block;font-size:12px;line-height:1.15;font-weight:800;color:var(--say-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .room-copy small{display:block;margin-top:3px;font-size:9px;line-height:1.25;color:var(--say-subtext);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .room-item.active .room-copy small{color:var(--say-subtext)!important}
  .room-count{min-width:32px;height:24px;padding:0 8px;border-radius:var(--say-radius-pill);background:#F1F5F9;color:#64748B;font-size:9px;font-weight:700;display:grid;place-items:center}
  .room-item.active .room-count{background:#fff;color:var(--say-ink)}

  .sidebar-footer{margin-top:auto;padding:14px 4px 0;border-top:1px solid var(--say-border)}
  .profile-chip{width:100%;border:0;background:transparent;border-radius:var(--say-radius-md);padding:7px;display:flex;align-items:center;gap:10px;text-align:left;color:inherit}
  .profile-chip:hover{background:var(--say-bg)}
  .profile-chip .avatar{width:36px;height:36px;background:var(--say-ink);color:#fff}
  .profile-copy strong{display:block;font-size:11px;color:var(--say-ink)}
  .profile-copy small{display:block;margin-top:2px;font-size:9px;color:var(--say-subtext)}

  /* 03 — CONVERSATION */
  .chat-panel{
    min-width:0;height:100%;background:#fff;display:grid;
    grid-template-rows:auto auto minmax(0,1fr) auto;
    overflow:hidden;position:relative;
  }

  /* Global header follows the approved Desktop reference: identity first, cover second. */
  .room-meta-strip{
    min-height:76px;padding:18px 24px 12px;border:0;background:#fff;
    display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  }
  .room-meta-identity{display:flex;align-items:flex-start;gap:0;min-width:0;flex:1}
  .room-meta-icon{display:none!important}
  .room-meta-copy{min-width:0}
  .room-meta-title-line{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
  .room-meta-title-line h1{margin:0;font-size:20px;line-height:1.1;font-weight:850;letter-spacing:-.035em;color:var(--say-ink)}
  .official-badge{display:none!important}
  .live-dot{width:8px;height:8px;border:2px solid #fff;border-radius:50%;background:var(--say-online);box-shadow:0 0 0 1px #DCFCE7;flex:0 0 8px}
  .room-meta-title-line #roomOnline{font-size:10px;font-weight:700;color:var(--say-subtext)}
  .room-meta-copy p{margin:6px 0 0;font-size:10px;line-height:1.35;color:var(--say-subtext);white-space:normal;overflow:visible}
  .room-meta-presence{display:none!important}

  .room-title-sound{margin-left:2px}
  .header-icon-btn.room-title-action{
    width:28px;height:28px;border:0;background:transparent;border-radius:var(--say-radius-sm);padding:5px;color:#64748B;display:grid;place-items:center
  }
  .header-icon-btn.room-title-action:hover{background:#F1F5F9;color:var(--say-ink)}
  .header-icon-btn.room-title-action svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  .rooms-responsive-btn,.people-responsive-btn{display:none!important}
  .sound-popover{top:34px;left:0;width:270px;border:1px solid var(--say-border);border-radius:var(--say-radius-lg);box-shadow:var(--say-shadow-soft)}

  /* Global production cover: scalable background + separate mascot layer; kept thin so conversation stays above the fold. */
  .room-cover{
    width:auto;height:clamp(142px,12vw,176px);min-height:0;max-height:none;
    margin:0 24px 14px;border:0;border-radius:var(--say-radius-lg);
    overflow:hidden;background:#EFF6FF;background-repeat:no-repeat;background-size:cover;background-position:center;
    flex:0 0 auto;position:relative;
  }
  .room-cover.has-cover{background-size:cover}
  .room-cover.collapsed{max-height:none;opacity:1}
  .source-cover-default{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
  .source-cover-default.hidden{display:none!important}
  .global-cover-mascot{
    position:absolute;right:clamp(26px,4vw,64px);bottom:-12px;z-index:2;
    height:clamp(152px,14vw,204px);width:auto;max-width:42%;object-fit:contain;
    pointer-events:none;user-select:none;filter:drop-shadow(0 14px 20px rgba(37,99,235,.12));
  }
  .global-cover-mascot.hidden{display:none!important}
  .room-cover.source-global-cover:after{
    content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
    background:linear-gradient(90deg,rgba(255,255,255,.16) 0%,rgba(255,255,255,0) 38%,rgba(255,255,255,.04) 100%);
  }

  /* Messages are the visual priority. */
  .messages{
    min-height:0;overflow-y:auto;overflow-x:hidden;padding:2px 24px 24px;
    scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:#CBD5E1 transparent;
  }
  .messages::-webkit-scrollbar{width:8px}.messages::-webkit-scrollbar-thumb{background:#CBD5E1;border-radius:999px}
  .history-marker{max-width:640px;margin:5px auto 14px;text-align:center;color:#94A3B8;font-size:9px}
  .history-marker:before,.history-marker:after{width:15%;background:#E2E8F0}
  .history-marker span{font-size:8px;letter-spacing:.12em;color:#94A3B8}
  .history-marker p{margin:4px 0 0;font-size:9px;color:#94A3B8}

  .message{
    max-width:780px;display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;
    padding:11px 0 12px;margin:0;
  }
  .message-avatar-presence{position:relative;width:40px;height:40px;display:block;margin-top:1px}
  .message-avatar-presence .avatar{width:40px;height:40px;margin:0;background:#E2E8F0;color:#475569}
  .message-avatar-presence.is-online:after{
    content:"";position:absolute;right:-1px;bottom:1px;width:9px;height:9px;border:2px solid #fff;border-radius:50%;background:var(--say-online)
  }
  .message-content{min-width:0}
  .msg-head{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 5px}
  .msg-name{font-size:11px;font-weight:800;color:var(--say-ink);line-height:1.2}
  .msg-name:hover{text-decoration:none;color:#0F172A}
  .msg-expertise{
    border:0!important;background:transparent!important;border-radius:0!important;padding:0!important;
    font-size:9px!important;font-weight:600;color:#C2417B!important;line-height:1.2
  }
  .msg-expertise b{font-size:8px;font-weight:700;color:#94A3B8}
  .msg-time{margin-left:1px;font-size:8px;color:#94A3B8}
  .msg-body{
    width:min(620px,100%);max-width:100%;margin:0;padding:11px 14px;
    border-radius:var(--say-radius-md);background:#F1F5F9;color:var(--say-text);
    font-size:12px;line-height:1.5;white-space:pre-wrap;word-break:break-word
  }
  .msg-body.caption{margin-top:7px}
  .msg-media{max-width:420px;margin-top:4px}.msg-media img{border-radius:var(--say-radius-lg);border:1px solid var(--say-border);box-shadow:none}
  .msg-sticker{font-size:42px;line-height:1;margin:4px 0}
  .reply-context{width:fit-content;max-width:520px;margin:0 0 6px;padding:7px 10px;border:0;border-radius:10px;background:#F8FAFC;color:#64748B;font-size:9px}
  .msg-actions{opacity:1;margin-top:6px;display:flex;align-items:center;gap:6px}
  .msg-actions button{font-size:9px;color:#94A3B8}
  .message-secondary-action{padding:3px 5px!important;opacity:0;transition:opacity .15s ease}
  .message:hover .message-secondary-action,.message:focus-within .message-secondary-action{opacity:1}
  .reaction-btn{
    min-width:34px;height:24px;padding:0 9px!important;border-radius:var(--say-radius-pill)!important;
    border:1px solid #F1F5F9!important;background:#fff!important;color:#64748B!important;
    display:inline-flex;align-items:center;justify-content:center;gap:4px
  }
  .reaction-btn[data-reaction="like"]{background:#FFF1F2!important;border-color:#FFE4E6!important}
  .reaction-btn[data-reaction="angry"]{background:#FFF7ED!important;border-color:#FFEDD5!important}
  .reaction-btn.active{box-shadow:inset 0 0 0 1px #94A3B8;font-weight:800;color:var(--say-ink)!important}

  .empty-state.compact{margin:3vh auto 2vh;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
  .empty-state-source{display:block;width:160px;height:auto;border-radius:0;background:transparent}
  .global-empty-mascot{width:172px;filter:drop-shadow(0 10px 18px rgba(15,23,42,.08));margin-bottom:2px}
  .empty-state.compact h2{margin:1px 0 0;font-size:15px;letter-spacing:-.02em;color:var(--say-ink)}
  .empty-state.compact>p:not(.empty-first-join-note){margin:0;font-size:10px;color:var(--say-subtext)}
  .empty-first-join-note{margin:2px 0 0;font-size:9px!important;color:#94A3B8!important}

  /* 04 — COMPOSER */
  .composer-wrap{padding:10px 24px 16px;border-top:0;background:#fff;position:relative;z-index:20}
  .composer{
    min-height:46px;border:1px solid #CBD5E1;border-radius:14px;background:#fff;
    display:grid;grid-template-columns:34px 34px minmax(0,1fr) 34px;align-items:center;gap:2px;padding:5px 6px;
    box-shadow:none
  }
  .composer:focus-within{border-color:#94A3B8;box-shadow:0 0 0 3px #F1F5F9}
  .composer-icon-btn{width:32px;height:32px;border:0;background:transparent;border-radius:9px;color:#64748B;display:grid;place-items:center}
  .composer-icon-btn:hover{background:#F1F5F9;color:var(--say-ink)}
  .composer-icon-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}
  .composer #messageInput{border:0;outline:0;background:transparent;padding:8px 7px;font-size:11px;color:var(--say-text)}
  .composer #messageInput::placeholder{color:#94A3B8}
  .send-btn{
    width:32px;height:32px;border:0;border-radius:50%;padding:0;background:var(--say-ink);color:transparent;font-size:0;position:relative
  }
  .send-btn:after{content:"↑";position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:14px;font-weight:800;line-height:1}
  .send-btn:hover{background:#0F172A}
  .composer-help{display:none}
  .reply-preview{margin-bottom:7px;border:1px solid var(--say-border);border-radius:10px;background:#F8FAFC;color:#64748B}
  .sticker-popover{left:24px;right:24px;bottom:70px;border:1px solid var(--say-border);border-radius:var(--say-radius-lg);box-shadow:var(--say-shadow-soft)}

  /* 05 — PEOPLE + EXPERTISE */
  .people-panel{
    padding:22px 18px 18px;border-left:1px solid var(--say-border);background:#fff;
    overflow-y:auto;z-index:25
  }
  .panel-header{padding:0 2px 16px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
  .panel-header .eyebrow{display:none}
  .panel-header h2{margin:0;font-size:15px;line-height:1.2;font-weight:850;letter-spacing:-.025em;color:var(--say-ink)}
  .panel-header-actions{display:flex;align-items:center;gap:8px}
  .panel-online-count{font-size:9px;font-weight:700;color:#94A3B8;white-space:nowrap}
  .people-summary{display:none}
  .people-list{display:flex;flex-direction:column;gap:4px}
  .person{
    width:100%;border:0;background:#fff;border-radius:var(--say-radius-md);padding:9px 7px;
    display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;align-items:start;text-align:left;color:inherit
  }
  .person:hover{background:#F8FAFC}
  .presence-wrap{position:relative;width:40px;height:40px;display:block}
  .presence-wrap .avatar{width:40px;height:40px;background:#E2E8F0;color:#475569}
  .presence-wrap.is-online:after,.presence-wrap:after{
    content:"";position:absolute;right:-1px;bottom:1px;width:9px;height:9px;border:2px solid #fff;border-radius:50%;background:var(--say-online)
  }
  .person-copy{min-width:0;padding-top:1px}
  .person-copy strong{display:block;font-size:11px;line-height:1.2;font-weight:800;color:var(--say-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .person-role{display:block;margin-top:3px!important;font-size:9px!important;line-height:1.2;color:var(--say-subtext)!important}
  .person-tags{display:flex!important;align-items:center;gap:5px;margin-top:7px!important;overflow:visible!important;white-space:normal!important}
  .expertise-tag,.recognition-tag{
    display:inline-flex!important;align-items:center!important;width:auto!important;max-width:130px;
    margin:0!important;padding:4px 7px;border-radius:var(--say-radius-pill);font-size:8px!important;line-height:1!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
  }
  .expertise-tag{background:#F1F5F9;color:#475569!important}
  .recognition-tag{background:#FFF7D6;color:#92400E!important}

  /* Keep all modals and backend-driven states from the existing product untouched. */
}
