:root {
    --color-unisync: #FD060C;
    --color-unisync-hover: #D0050A;
    --color-caution: #DC143C;
    --color-success: #2e7d32;
    --color-link: #065fd4;
    --color-link-hover: #054ea8;
    --color-text: #343434;
    --color-text-sub: #666666;
    --color-text-placeholder: #999999;
    --color-text-inverted: #ffffff;
    --color-bg: #ffffff;
    --color-bg-sub: #fafafa;
    --color-bg-hover: #f0f0f0;
    --color-main-bg: #E8E8E8;
    --color-content-bg: #F5F5F5;
    --color-input-bg: #ffffff;
    --color-border: #e0e0e0;
    --color-border-dark: #cccccc;
    --color-border-active: #666666;
    
    --status-draft-bg: #FDF2F8; --status-draft-text: #9D174D;
    --status-prog-bg: #FEE2E2; --status-prog-text: #B91C1C;
    --status-sched-bg: #EFF6FF; --status-sched-text: #1E40AF;
    --status-pub-bg: #F9FAFB; --status-pub-text: #9CA3AF;
    --status-gray-bg: #E5E7EB; --status-gray-text: #1F2937;
    
    --font-base: "Avenir Next", "Avenir", "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 14px;
    --font-size-sm: 12px;
    --font-size-xs: 10px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-xxl: 24px;
    
    --header-height: 50px;
    --sidebar-width: 170px;
    
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 50%;
    
    --z-back: -1;
    --z-content: 1;
    --z-sidebar: 900;
    --z-header: 1000;
    --z-dropdown: 1100;
    --z-sticky: 1200;
    --z-modal: 2000;
    --z-tooltip: 2100;
    --z-max: 2147483647;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; width: 100%; background: var(--color-bg); }
body, form, button, label, fieldset, legend, datalist, input, textarea, select, option, header, footer, nav, main, ul, ol, li, table, thead, tbody, tr, th, td, div, span, p, h1, h2, h3, h4, h5, a { font-weight: normal; font-size: var(--font-size-base); font-family: var(--font-base); color: var(--color-text); text-decoration: none; }
a:link, a:visited, a:active, a:hover { color: var(--color-text); text-decoration: none; }
input:focus, textarea:focus, select:focus { border: 1px solid var(--color-border-active); outline: none; }
img { border: 0; }
.sub { font-size: 0.8em; }
.em { font-weight: bold; }
.caution { color: var(--color-caution); }
.loading { width: 100%; height: 40px; background: url("/Component/img/loading.gif") no-repeat center center; }

/* === Header (Fixed) === */
header { 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-bg); 
    z-index: var(--z-header); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 15px; 
    border-bottom: 1px solid var(--color-border);
}

body { padding-top: var(--header-height); }

#logo { padding: 0; display: flex; align-items: center; }
#logo img { height: 34px !important; width: auto; display: block; }

#user_info { height: 100%; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-lg); }
.clock-area { display: flex; align-items: center; border: 1px solid var(--color-border); padding: 4px 12px; margin-right: 12px; border-radius: var(--radius-md); gap: 12px; font-size: 13px; }
.time-text { font-size: 13px; font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sub-time-text { color: var(--color-text-sub); }
.time-spacer { width: 1px; height: 14px; background-color: var(--color-border-dark); display: inline-block; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.blink-colon { animation: blink 1s step-end infinite; display: inline-block; }
.header-tools, .timezone-wrapper { display: flex; align-items: center; gap: 2px; }
.timezone-wrapper { gap: 3px; }
.tz-label { font-size: 12px; font-weight: 400; color: #888; }
.timezone-select { appearance: none; -webkit-appearance: none; background-color: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; color: var(--color-text); cursor: pointer; padding: 2px 20px 2px 6px; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 4px center; background-size: 10px; transition: all var(--transition-fast); width: 68px; }
.timezone-select:hover { background-color: var(--color-bg-hover); border-color: #d0d0d0; }
.timezone-select:focus { outline: none; background-color: var(--color-main-bg); }
.icon-wrapper, .user-menu-wrapper { position: relative; display: flex; align-items: center; cursor: pointer; color: #555; transition: all var(--transition-fast); }
.icon-wrapper { justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-full); }
.user-menu-wrapper { padding: 2px 8px; border-radius: 18px; }
.icon-wrapper:hover, .user-menu-wrapper:hover { background-color: var(--color-bg-hover); color: #000; }
.user-trigger { display: flex; align-items: center; padding: 2px 6px; border-radius: var(--radius-sm); }
.user-trigger:hover { background-color: var(--color-content-bg); }
.header-user-name { font-size: 13px; font-weight: 600; }
.header-dropdown { position: absolute; top: 110%; right: 0; width: 280px; background: var(--color-bg); border: 1px solid var(--color-border); box-shadow: var(--shadow-md); border-radius: 6px; z-index: var(--z-dropdown); cursor: default; text-align: left; overflow: hidden; }
.user-dropdown-pos { width: 160px; top: 120%; }
.dropdown-header { padding: 10px 15px; background: #f9f9f9; border-bottom: 1px solid var(--color-border); font-weight: 600; font-size: 13px; color: #555; }
.dropdown-content { max-height: 300px; overflow-y: auto; }
.dropdown-item { display: flex; align-items: center; padding: 10px 15px; color: #333; font-size: var(--font-size-base); transition: background var(--transition-fast); }
.dropdown-item:hover { background-color: var(--color-content-bg); }
.logout-item { color: var(--color-caution); }
.logout-item:hover { background-color: #fff0f0; }
.badge { position: absolute; top: -4px; right: -4px; background-color: var(--color-caution); color: white; font-size: var(--font-size-xs); font-weight: bold; height: 16px; min-width: 16px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); padding: 0 2px; border: 1px solid var(--color-bg); }

/* Navigation (Top) */
nav#gn { width: 100%; min-height: 36px; background-color: var(--color-unisync); display: flex; justify-content: space-between; padding: 8px 7px 0 7px; order: 1; }
nav#gn a { padding: 1px 10px; border-radius: 10px; font-weight: 500; color: var(--color-text-inverted); }
nav#gn a:hover, nav#gn a:active, nav#gn a.Current { color: var(--color-unisync); background: var(--color-text-inverted); }
nav#gn #gnConfig a { padding-left: 24px; background: url("/Component/img/icon/icon_setting.svg") no-repeat left top; }
nav#gn #gnConfig a:hover, nav#gn #gnConfig a:active, nav#gn #gnConfig a.Current { background: var(--color-text-inverted) url("/Component/img/icon/icon_setting_hover.svg") no-repeat left top; border-radius: 10px; color: var(--color-unisync); }

/* === Sidebar #ln === */
#ln { 
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background-color: var(--color-bg);
    border-right: 1px solid var(--color-border);
    z-index: var(--z-sidebar);
    padding-left: 12px;
}
#ln div.add { display: flex; margin: 15px 0; width: 140px; }
#ln div.add a.add { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; height: auto; padding: 4px 0; background-color: var(--color-unisync); color: var(--color-text-inverted); border-radius: var(--radius-xl); font-weight: 600; font-size: var(--font-size-base); box-shadow: var(--shadow-sm); transition: all var(--transition-fast); transform: translateY(-1px); }
#ln div.add a.add::before { content: "+"; margin-right: 6px; font-size: var(--font-size-lg); font-weight: 500; }
#ln div.add a.add:hover { box-shadow: var(--shadow-md); filter: brightness(1.1); transform: translateY(-2px); }
#ln div.add a.add:active { box-shadow: var(--shadow-sm); filter: brightness(0.95); transform: translateY(0); }
#ln h1 { margin: 1.5em 0 0 0; padding: 0; font-size: var(--font-size-base); width: 100%; font-weight: 600; }
#ln a.list { margin: 5px 0; padding: 2px 2px 2px 12px; display: block; width: 140px; font-weight: 500; }
#ln a.list::before { content: "○"; display: inline-block; margin-left: -6px; margin-right: 6px; }
#ln a.list:hover, #ln a.Current:hover { border-radius: 5px; background-color: var(--color-main-bg); }
#ln a.Current { border-radius: 5px; background-color: var(--color-bg); }
#ln a.Current::before { content: "●"; color: var(--color-unisync); }
#ln div.ln-view-mode{ display: flex; padding:0 1px;}
#ln div.ln-view-mode a.list{ flex: 1; text-align: center; padding: 0px;}
#ln .search-box{ width:140px; border: 1px solid #e8e8e8; padding: 5px; border-radius: 5px; font-size: 12px; margin: 3px 0px 0px 3px; }
#ln .search-box:hover { border: 1px solid #999999; }
#ln .ln-toggle-header { cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding-right: 15px !important; user-select: none; transition: background-color 0.2s; }
#ln .ln-toggle-header:hover { color: var(--color-unisync); }
#ln .ln-arrow { transition: transform 0.3s ease; opacity: 0.5; }
#ln .ln-toggle-header.open .ln-arrow { transform: rotate(180deg); }
#ln .ln-toggle-content { overflow: hidden; }
#ln .sub-nav-container { display: flex; flex-direction: column; gap: 8px; margin: 15px 0; width: 140px; }
#ln .sub-nav-container a.sub-nav-btn { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; height: auto; padding: 8px 0; color: #666; border-radius: 15px; font-weight: 600; font-size: 14px; text-decoration: none; border: 1px solid #e0e0e0; transition: all 0.2s ease; line-height: 1; }
#ln .sub-nav-btn:hover { background-color: #eaeaea; color: #333; border-radius: 15px !important; transform: translateY(-1px); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
#ln .sub-nav-btn:active { transform: translateY(0); }
#ln .ln-stats-wrapper { padding: 15px 0px 5px 3px; cursor: pointer; transition: opacity 0.2s; }
#ln .ln-stats-wrapper:hover { opacity: 0.7; }
#ln .ln-stats-label { font-size: 10px; font-weight: bold; color: #999; text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.5px; }
#ln .ln-stats-value { display: flex; align-items: center; gap: 6px; }
#ln .ln-stats-value span { font-size: 16px; font-weight: bold; color: #333; }
#ln a.ln-backlink { display: flex; align-items: center; margin: 15px 0px; padding: 4px; width: 150px;　font-size: 12px; font-weight: 500; color: #333; letter-spacing: 0.5px;  }
#ln a.ln-backlink::before { content: "⬅"; margin-right: 6px; font-size: 16px; font-weight: 600; }
#ln a.ln-backlink:hover { background-color: #f9f9f9; border-radius: 10px; }
#ln div.anchor-links { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; width: 150px; }
#ln div.anchor-links a.ln-anchor-link { display: flex; text-align:left; justify-content: left; align-items: center; width: 150px; height: auto; padding: 5px; color: #333; font-weight: 600; font-size: 14px; text-decoration: none; }
#ln div.anchor-links a.ln-anchor-link:hover { background-color: #f9f9f9; border-radius: 10px;}
#ln .ln-anchor-link::before { content: ""; width: 16px; height: 16px; margin-right: 6px; vertical-align: middle; }
#ln div.anchor-links a[href="#EntryForm"]::before { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'%3e%3c/path%3e%3cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'%3e%3c/path%3e%3c/svg%3e"); }
#ln div.anchor-links a[href="#StatisticsSection"]::before { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='18' y1='20' x2='18' y2='10'%3e%3c/line%3e%3cline x1='12' y1='20' x2='12' y2='4'%3e%3c/line%3e%3cline x1='6' y1='20' x2='6' y2='14'%3e%3c/line%3e%3c/svg%3e"); }
#ln div.anchor-links a[href="#CommentSection"]::before { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'%3e%3c/path%3e%3c/svg%3e"); }

/* Main Content */
main { display: block; width: 100%; }
#Content { margin-left: var(--sidebar-width); flex: 1; border-top: none; }
div#Entry { margin: 1em; padding: 2em; background-color: var(--color-bg); border-radius: var(--radius-xl); }
#Content h1 { margin: 1em 0; font-weight: bold; font-size: var(--font-size-xl); }
#Content h1 span.keyword { font-weight: bold; font-size: 1.1em; font-style: italic; color: var(--color-unisync); }
#Content h2 { margin: 2em 0 0.4em 0; font-weight: bold; font-size: var(--font-size-lg); padding-left: 0.3em; border-left: 3px solid var(--color-border); }
#Content h3 { margin: 1.5em 0; font-weight: bold; font-size: var(--font-size-lg); }
footer { padding-top: 5px; display: flex; justify-content: center; padding-left: var(--sidebar-width); margin-left: var(--sidebar-width); }

/* Calendar */
#calendar_container { padding: 1em; background-color: var(--color-bg); border-radius: 0; }
.cal_header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 15px; white-space: nowrap; overflow-x: auto; min-width: 100%; -webkit-overflow-scrolling: touch; }
.cal_view { display: inline-block; }
.cal_view a.clear { display: inline-block; margin-left: 1em; font-size: var(--font-size-sm); font-weight: 500; border-radius: var(--radius-xl); padding: 3px 1.5em; background-color: var(--color-bg); border: 1px solid var(--color-border); }
.cal_view a.clear:hover { background-color: var(--color-main-bg); }
.cal_header_month { grid-column: 2; display: flex; align-items: center; gap: 10px; justify-self: center; }
.cal_month { font-size: var(--font-size-xl); font-weight: bold; }
.cal_header_btn { width: 30px; height: 30px; display: flex; justify-content: center; align-items: center; background-color: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-full); cursor: pointer; box-shadow: var(--shadow-sm); transition: all var(--transition-fast); }
.cal_header_btn:hover { background-color: var(--color-main-bg); border-color: var(--color-text); transform: translateY(-1px); }
.cal_header_btn:active { transform: translateY(0); }
.cal_header_thismonth { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 8px; }
.cal_header_thismonth form { display: flex; align-items: center; gap: 5px; }
.cal_header_thismonth form:first-child { font-size: 0; }
.cal_header select { appearance: none; border-radius: 10px; font-weight: 600; border: 1px solid var(--color-border); background-color: var(--color-bg); padding: 4px 25px 4px 10px; cursor: pointer; box-shadow: var(--shadow-sm); transition: all var(--transition-fast); background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: calc(100% - 8px) center; }
.cal_header select:hover { background-color: var(--color-main-bg); border-color: var(--color-text); transform: translateY(-1px); }
.cal_header select:focus { outline: none; border-color: var(--color-text); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1); }
.cal_header_thismonth_btn { font-weight: 600; border-radius: 10px; display: flex; justify-content: center; align-items: center; background-color: var(--color-bg); border: 1px solid var(--color-border); padding: 4px 15px; cursor: pointer; box-shadow: var(--shadow-sm); transition: all var(--transition-fast); }
.cal_header_thismonth_btn:hover { background-color: var(--color-main-bg); border-color: var(--color-text); transform: translateY(-1px); }
.cal_header_thismonth_btn:active { transform: translateY(0); }
#calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; padding: 1em; }
#calendar div.sunday { border-left: 1px solid var(--color-border); }
#calendar div.weekday { border-right: none; border-bottom: 1px solid var(--color-border); text-align: center; font-weight: 600; font-size: var(--font-size-base); }
#calendar div.holiday { color: var(--color-caution); }
#calendar div.day { padding: 8px 2px 0 2px; border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); justify-content: center; align-items: center; min-height: 100px; position: relative; }
#calendar div.day_header { position: relative; justify-content: center; text-align: center; }
#calendar div.day div.day_num, #calendar div.day div.month_name { display: inline-block; font-size: var(--font-size-base); font-weight: 600; }
#calendar div.day div.month_name { padding-right: 3px; }
#calendar div.today div.day_num { border-radius: var(--radius-full); width: 30px; height: 30px; line-height: 30px; justify-content: center; align-items: center; padding: 0; background-color: var(--color-unisync); color: var(--color-text-inverted) !important; }
#calendar div.holiday div.day_num, #calendar div.holiday div.month_name { color: var(--color-caution); }
#calendar div.holiday_name { display: block; padding-left: 2px; font-size: var(--font-size-sm); font-weight: 600; color: var(--color-caution); text-align: left; }
#calendar div.past, div.notthismonth { background-color: #fafafa; }
#calendar div.past div.day_num, #calendar div.notthismonth div.day_num, #calendar div.past div.month_name, #calendar div.notthismonth div.month_name, #calendar div.past div.holiday_name, #calendar div.notthismonth div.holiday_name { color: var(--color-text-placeholder); font-weight: normal; }
#calendar div.day a.add_btn { position: absolute; top: 3px; right: 3px; margin-left: auto; border: 1px solid var(--color-main-bg); border-radius: var(--radius-full); padding: 0; width: 20px; height: 20px; background-color: var(--color-bg); color: var(--color-text); cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); display: flex; justify-content: center; align-items: center; font-size: var(--font-size-base); line-height: 1; }
#calendar div.day a.add_btn:hover { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); transform: translateY(-2px); }
#calendar div.day a.add_btn:active { transform: translateY(0); }
#calendar .content_data { display: block; margin: 9px 3px; border: 1px solid var(--color-main-bg); border-radius: var(--radius-md); padding: 12px; background-color: var(--color-bg); box-shadow: var(--shadow-sm); }
#calendar .content_data .status { display: inline-block; font-size: var(--font-size-sm); font-weight: 500; padding: 3px 10px; border-radius: 5px; background-color: var(--color-main-bg); transition: all 0.2s ease; }
#calendar .content_data .status_0 { background-color: var(--status-draft-bg); color: var(--status-draft-text); }
#calendar .content_data .status_1, #calendar .content_data .status_2 { background-color: var(--status-prog-bg); color: var(--status-prog-text); }
#calendar .content_data .status_3 { background-color: var(--status-sched-bg); color: var(--status-sched-text); }
#calendar .content_data .status_4 { background-color: var(--status-pub-bg); color: var(--status-pub-text); }
#calendar .content_data .status_5 { background-color: var(--status-gray-bg); color: var(--status-gray-text); }
#calendar .content_data .status:hover { cursor: pointer; transform: scale(1.05); box-shadow: 0 2px 2px rgba(0,0,0,0.05); }
#calendar .content_data .content_owner, .content_data .play_list_name { display: inline-block; font-size: var(--font-size-xs); font-weight: 500; padding: 2px 5px; border-radius: 5px; margin-bottom: 5px; margin-right: 3px; border: 1px solid; }
#calendar .content_data:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transform: translateY(-2px); }
.play_list_name { transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer; white-space: normal; word-wrap: break-word; overflow: visible; text-overflow: clip; margin-top: 4px; display: inline-block; font-size: 10px; line-height: 1.25; }
.play_list_name:hover { transform: translateY(-1px) scale(1.05); box-shadow: 0 1px 3px rgba(0,0,0,0.2); filter: brightness(0.95); z-index: 10; }
#calendar div.cal_time { font-weight: 500; font-size: var(--font-size-base); }
#calendar div.cal_time span.cal_sub_time { padding-left: 5px; font-weight: normal; font-size: var(--font-size-xs); }
#calendar div.content_title { padding: 5px 0; font-size: var(--font-size-base); font-weight: 500; }
#calendar div.cal_icon img { display: inline-block; width: 20px; opacity: 1; margin: 3px 3px 8px 0; filter: grayscale(100%); }
#calendar div.cal_icon img.has-youtube { opacity: 1; cursor: pointer; transition: filter 0.2s, transform 0.2s; margin: 3px 3px 8px 0; }
#calendar div.cal_icon img.has-youtube:hover { filter: grayscale(0%); transform: scale(1.2); }
.cal_sub_time { display: none !important; }
.cal-stats-row { font-size: 8px; color: #999; margin-top: 4px; margin-bottom:5px; display: flex; gap: 8px; align-items: center; }
.stat-item { display: flex; align-items: center; gap: 2px; line-height: 1; font-weight: 500; }
.stat-item svg { display: block; opacity: 0.6; width: 10px; height: 10px; }

/* Config */
table.ConfigTable { width: 100%; border-collapse: collapse; border-spacing: 0; }
table.ConfigTable th { padding: 0.2em 1em; white-space: nowrap; text-align: center; background: var(--color-main-bg); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
table.ConfigTable td { padding: .5em; text-align: left; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
table.ConfigTable input[type="text"] { border: 1px solid var(--color-bg); padding: 2px; width: 100%; cursor: pointer; }
table.ConfigTable input[type="text"]:hover { border: 1px solid var(--color-border); }
table.ConfigTable input[type="text"].new, table.ConfigTable input[type="text"]:focus { border: 1px solid var(--color-border); background-color: var(--color-content-bg); cursor: text; }
table.ConfigTable button { padding: 1px 1em; cursor: pointer; font-size: var(--font-size-sm); border: 1px solid var(--color-border); background-color: var(--color-content-bg); border-radius: 1em; }
table.ConfigTable button:hover { filter: brightness(.8); }

/* List Editor */
.ListEditor-form { display: flex; gap: 10px; margin-top: 20px; }
.ListEditor-form button, .ListEditor-item button { padding: 1px 1em; cursor: pointer; font-size: var(--font-size-sm); border: 1px solid var(--color-border); background-color: var(--color-content-bg); border-radius: 1em; }
.ListEditor-form button:hover, .ListEditor-item button:hover { filter: brightness(.8); }
.ListEditor-form input[type="text"], .ListEditor-item input[type="text"] { width: 400px; padding: 2px; }
.ListEditor-item input[type="text"] { font-weight: 400; border: 1px solid #aaa; padding: 4px; border-radius: 5px; }
.ListEditor-item { display: flex; align-items: center; gap: 10px; padding: 3px; border-bottom: 1px solid #ccc; background: #fafafa; cursor: grab; }
input[type="color"] { width: 40px; height: 32px; border: none; }
.ListEditor-hidden-label { display: flex; align-items: center; gap: 4px; font-size: var(--font-size-sm); }
.ListEditor-color-tag { font-weight: bold; padding: 4px 10px; border-radius: 6px; font-size: 13px; border: 1px solid; background-color: #EAF6FD; display: inline-block; }
.drag-over { outline: 2px dashed #0074B8; }

/* Entry Form */
.EntryHeaderRow { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.EntryTitle { margin-bottom: 10px; display: flex; flex-grow: 1; margin-right: 10px; position: relative; align-items: center; }
.EntryTitle input { font-size: var(--font-size-xxl); font-weight: 600; width: 100%; border: none; padding: 4px 0; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.EntryTitle input:hover, .EntryForm-Group input:hover, .EntryForm-Group textarea.input-textarea:hover, .EntryForm-Group .select2-container--default .select2-selection--single:hover, .EntryForm-Group .select2-container--default .select2-selection--multiple:hover, .select2-container--default .select2-results__option[aria-selected="true"]:hover, .select2-container--default .select2-results__option--highlighted[aria-selected]:hover { color: var(--color-text); background-color: var(--color-bg-sub); }
.EntryTitle input:focus, .EntryForm-Group input:focus, .EntryForm-Group textarea.input-textarea:focus { cursor: text; color: var(--color-text); background-color: var(--color-input-bg); border: 1px solid var(--color-text-sub); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); }
.EntryMenu { position: relative; padding-top: 4px; }
.entry-menu-btn { background: transparent; border: none; font-size: 24px; cursor: pointer; color: var(--color-text-sub); padding: 0 8px; line-height: 1; }
.entry-menu-btn:hover { color: var(--color-text); }
.entry-menu-dropdown { position: absolute; top: 100%; right: 0; background: var(--color-bg); border: 1px solid var(--color-border-dark); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); z-index: var(--z-dropdown); min-width: 140px; display: flex; flex-direction: column; }
.entry-menu-dropdown button { background: none; border: none; text-align: left; padding: 10px 15px; font-size: var(--font-size-base); cursor: pointer; white-space: nowrap; color: var(--color-text); border-bottom: 1px solid var(--color-border); position: relative; }
.entry-menu-dropdown button:last-child { border-bottom: none; }
.entry-menu-dropdown button:hover { background-color: var(--color-bg-hover); }
.entry-menu-dropdown button.menu-delete { color: var(--color-caution); }
.hidden { display: none !important; }
.EntryForm-Group { display: flex; margin: 1em 0; align-items: center; }
.mode-entry .EntryForm-Group label { flex: 0 0 150px; white-space: nowrap; }
.EntryTitle button, .EntryForm-Group button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 4px;
    line-height: 1;
}
.us-btn-copy, .link_click {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 4px;
    line-height: 1;
    background-color: transparent !important;
    border: none !important;
    cursor: pointer;
}
.EntryTitle button img, .EntryForm-Group button img, .us-btn-copy img, .us-btn-copy svg, .link_click img, .link_click svg, .EntryForm-Group label a svg { width: 14px !important; height: 14px !important; opacity: 0.6; transition: all 0.2s ease; vertical-align: middle; margin: 0 !important; }
.EntryTitle button:hover img, .EntryForm-Group button:hover img, .us-btn-copy:hover img, .us-btn-copy:hover svg, .link_click:hover img, .link_click:hover svg, .EntryForm-Group label a:hover svg { opacity: 1; transform: scale(1.1); filter: invert(32%) sepia(98%) hue-rotate(206deg) saturate(100%); }
.EntryForm-Group label a svg.icon-setting { width: 14px !important; height: 14px !important; margin-top: -2px; }
.us-btn-copy, .link_click { cursor: pointer; }
.us-copy-wrapper { display: flex; align-items: center; justify-content: center; margin-left: 1px; height: 100%; }
#ContentData_Hashtags textarea.input-textarea { min-height: 1.5em; line-height: 1.5; font-size: var(--font-size-base); box-sizing: border-box; resize: vertical; }
#ContentData_PublishDateTime { position: relative; }
#ContentData_PublishDateTime input[type="text"], .time-picker-wrapper input[type="text"] { width: 3em; flex: 0 0 auto; }
.time-picker-wrapper { position: relative; display: inline-block; }
.time-picker-wrapper input[type="text"] { width: 110px !important; flex: 0 0 auto !important; }
#time-suggestions { display: none; position: absolute; top: 100%; left: 0; background: var(--color-bg); border: 1px solid var(--color-border-dark); max-height: 150px; overflow-y: auto; z-index: var(--z-dropdown); }
.EntryForm-Group label { display: flex; flex: 0 0 120px; align-items: top; justify-content: right; font-weight: 600; font-size: var(--font-size-base); color: #898989; padding: 6px 10px 0 0; }

.EntryForm-Group input[type="text"], 
.EntryForm-Group input[type="url"], 
.EntryForm-Group input[type="date"], 
.EntryForm-Group select, 
.EntryForm-Group textarea.input-textarea { 
    display: flex; 
    flex: 1; 
    border-radius: 6px; 
    background-color: var(--color-input-bg); 
    border: 1px solid #efefef; 
    padding: 2px 10px; 
    color: var(--color-text); 
}
.EntryForm-Group input[type="text"], 
.EntryForm-Group input[type="url"], 
.EntryForm-Group textarea.input-textarea {
    cursor: text;
}
.EntryForm-Group input[type="date"], 
.EntryForm-Group select {
    cursor: pointer;
}

.EntryForm-Group input[type="date"] { flex: 0 0 auto; margin-right: 6px; }
.EntryForm-Group textarea.input-textarea { min-height: 160px; line-height: 1.5; font-size: var(--font-size-base); box-sizing: border-box; }
.EntryForm-Group .tagify { flex: 1; width: 100%; min-width: 0; max-width: 100%; }
.select2-container--default .select2-results__option[aria-selected="true"], .select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[aria-selected="true"] { color: var(--color-text-sub) !important; background-color: #efefef !important; }
.select2-container--default .select2-dropdown { color: var(--color-text-sub); border: 1px solid #efefef !important; border-radius: 4px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); }
.select2-container--default .select2-dropdown li, li.select2-results__option { cursor: pointer !important; color: var(--color-text-sub); }
.select2-container--default .select2-selection--multiple .select2-selection__choice, .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { background-color: #fafafa !important; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { background-color: #fefefe !important; }
#publish_time_option { display: inline-block; font-size: var(--font-size-sm); color: var(--color-text-placeholder); margin: 7px 0 0 7px; }
.fixed-tooltip { position: fixed; background-color: #333; color: #fff; padding: 6px 10px; border-radius: 4px; font-size: var(--font-size-sm); z-index: var(--z-max); pointer-events: none; transform: translate(-50%, -100%); margin-top: -5px; opacity: 0; transition: opacity 0.3s; white-space: nowrap; }
.fixed-tooltip.show { opacity: 1; }
.tooltip-save { visibility: hidden; color: var(--color-success); font-weight: bold; font-size: 13px; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 8px; opacity: 0; transition: opacity 0.5s; white-space: nowrap; }
.tooltip-save.show { visibility: visible; opacity: 1; }
.entry-footer-actions { margin: 40px 0; padding-bottom: 30px; display: flex; justify-content: center; align-items: center; gap: 15px; position: relative; }
.FormActionButtons { margin-top: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.FormActionButtons button { cursor: pointer; width: auto !important; min-width: 140px; padding: 8px 20px !important; font-size: 14px !important; background: var(--color-unisync); color: var(--color-text-inverted); border: none; border-radius: 4px; transition: background 0.2s; }
.FormActionButtons button:hover { background-color: var(--color-unisync-hover); }
.btn-save-inactive { opacity: 0.5; cursor: default; }
.btn-reset { border: none; background: transparent; color: #999; cursor: pointer; font-size: 12px; text-decoration: underline; }
.btn-reset:hover { color: #333; }

/* Comment System */
.comment-section { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--color-border); }
.comment-form-container { display: flex; gap: 10px; margin-bottom: 20px; }
.comment-avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; background-color: var(--color-unisync); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px; flex-shrink: 0; }
.comment-input-wrapper { flex-grow: 1; }
.comment-input-wrapper textarea { width: 100%; border: none; border-bottom: 1px solid transparent; border-radius: 0; padding: 8px 0; resize: none; overflow: hidden; min-height: 40px; font-size: 14px; transition: all 0.2s; background: transparent; }
.comment-input-wrapper textarea:focus { border-bottom: 1px solid var(--color-text); outline: none; }
.comment-actions { margin-top: 5px; display: none; justify-content: space-between; align-items: center; }
.comment-input-wrapper textarea:focus + .comment-actions, .comment-input-wrapper textarea:not(:placeholder-shown) + .comment-actions, #comment_image_preview[style*="block"] ~ .comment-actions { display: flex !important; }
.btn-cancel { background: transparent; border: none; color: #666; font-weight: 600; cursor: pointer; padding: 6px 12px; border-radius: 18px; margin-right: 5px; }
.btn-cancel:hover { background-color: #f0f0f0; }
.btn-submit { background-color: var(--color-unisync); color: #fff; border: none; font-weight: 600; cursor: pointer; padding: 6px 16px; border-radius: 18px; opacity: 0.5; pointer-events: none; }
.comment-input-wrapper textarea:not(:placeholder-shown) + .comment-actions .btn-submit { opacity: 1; pointer-events: auto; }
.btn-submit:hover { background-color: var(--color-unisync-hover); }
.comment-thread-wrapper { margin-bottom: 15px; }
.comment-item { display: flex; gap: 12px; margin-bottom: 4px; padding: 6px 0; border-radius: 4px; }
.comment-item:hover { background-color: #f9f9f9; }
.comment-item:hover .edit-menu { visibility: visible; }
.comment-body { flex-grow: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 2px; }
.comment-author { font-weight: bold; color: #0f0f0f; }
.comment-date { color: #606060; font-size: 12px; }
.comment-text { font-size: 14px; color: #0f0f0f; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.comment-toolbar { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.comment-btn { background: transparent; border: none; color: #606060; font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 16px; }
.comment-btn:hover { background-color: #e5e5e5; color: #0f0f0f; }
.replies-container { margin-left: 44px; margin-top: 8px; }
.reply-form { margin-left: 44px; margin-top: 8px; display: none; }
.reply-form.active { display: block; }
.reply-textarea { width: 100%; border: none !important; border-bottom: 1px solid transparent !important; border-radius: 0; padding: 8px 0; resize: none; background: transparent; transition: border-bottom-color 0.2s; box-shadow: none !important; outline: none !important; }
.reply-textarea:focus { border-bottom: 1px solid var(--color-text) !important; }
.reply-textarea:not(:placeholder-shown) + div .btn-submit { opacity: 1; pointer-events: auto; }
.edit-textarea { width: 100%; border: none !important; border-bottom: 1px solid var(--color-text) !important; border-radius: 0; padding: 8px 0; resize: none; background: transparent; font-size: 14px; box-shadow: none !important; outline: none !important; }
.edit-menu { visibility: hidden; position: relative; margin-left: auto; }
.edit-dropdown { display: none; position: absolute; top: 100%; right: 0; background: #fff; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 100; min-width: 80px; }
.show-menu .edit-dropdown { display: block; }
.edit-dropdown button { display: block; width: 100%; text-align: left; padding: 8px 12px; background: none; border: none; cursor: pointer; font-size: 13px; color: #333; }
.edit-dropdown button:hover { background-color: #f0f0f0; }
.deleted-item { opacity: 0.6; font-style: italic; }
.deleted-comment-text { color: #999; background-color: #f0f0f0; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.highlight-target { background-color: rgba(255, 255, 0, 0.2); transition: background-color 1s; }
.reaction-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 12px; background-color: #f2f2f2; font-size: 12px; cursor: pointer; border: 1px solid transparent; user-select: none; transition: all 0.1s; }
.reaction-pill:hover { background-color: #e5e5e5; }
.reaction-pill.reacted { background-color: #def1ff; border-color: #065fd4; color: #065fd4; }
.picker-container { position: absolute; z-index: 9999; display: none; box-shadow: 0 4px 12px rgba(0,0,0,0.15); border-radius: 8px; }
emoji-picker { --num-columns: 8; --emoji-size: 20px; --background: #fff; height: 300px; width: 320px; }
.tribute-container { z-index: 9999; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border-radius: 4px; font-family: inherit; font-size: 13px; }
.tribute-container ul { background: #fff; padding: 0; margin: 0; list-style: none; max-height: 200px; overflow-y: auto; }
.tribute-container li { padding: 8px 12px; border-bottom: 1px solid #eee; cursor: pointer; }
.tribute-container li:last-child { border-bottom: none; }
.tribute-container li.highlight { background: #f0f0f0; font-weight: bold; }
.mention-link { color: #065fd4; font-weight: 500; background-color: rgba(6, 95, 212, 0.08); padding: 0 4px; border-radius: 2px; }
.mention-me { background-color: rgba(253, 226, 14, 0.5); color: #000; padding: 0 4px; border-radius: 2px; font-weight: bold; }
.notify-item.unread { background-color: #e3f2fd; }
.notify-item.unread:hover { background-color: #bbdefb; }

/* === Topics (Discussion Board) === */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.topic-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; position: relative; display: flex; flex-direction: column; height: 220px; }
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.1); border-color: #ccc; }
.topic-card.resolved { background-color: #f9f9f9; border-color: #eee; }
.topic-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.topic-status-badge { font-size: 10px; font-weight: bold; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.status-open { background-color: #e3f2fd; color: #1565c0; }
.status-resolved { background-color: #e0e0e0; color: #757575; }
.topic-card-title { font-size: 16px; font-weight: bold; color: #333; margin: 0 0 8px 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.topic-card.resolved .topic-card-title { color: #888; text-decoration: line-through; }
.topic-card-desc { font-size: 13px; color: #666; margin: 0; line-height: 1.5; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.topic-card-footer { margin-top: 15px; border-top: 1px solid #f0f0f0; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; }
.topic-meta-item { display: flex; align-items: center; gap: 5px; }
.add-topic-btn { display: inline-block; background-color: var(--color-unisync); color: #fff; font-weight: bold; padding: 10px 20px; border-radius: 20px; margin-top: 15px; transition: background 0.2s; }
.add-topic-btn:hover { background-color: var(--color-unisync-hover); text-decoration: none; color: #fff; }

/* === Modal (Channel Stats) === */
.stats-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: var(--z-modal); justify-content: center; align-items: center; }
.stats-modal-content { background: #fff; width: 90%; max-width: 800px; padding: 20px; border-radius: 8px; position: relative; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.stats-modal-close { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 24px; cursor: pointer; color: #666; }
.stats-chart-wrapper { width: 100%; height: 400px; position: relative; }

/* === Playlist Grid (New Mode) === */
.playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.playlist-card { display: flex; flex-direction: column; justify-content: center; height: 120px; padding: 20px; border-radius: 8px; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; position: relative; overflow: hidden; }
.playlist-card:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.1); }
.playlist-title { font-size: 18px; font-weight: bold; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-meta { font-size: 12px; color: rgba(0,0,0,0.5); font-weight: 500; }
.entry-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }
.entry-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; cursor: pointer; transition: background 0.2s; }
.entry-card:hover { background-color: #f9f9f9; border-color: #ccc; }
.entry-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.entry-type-icon { width: 16px; height: 16px; opacity: 0.6; }
.entry-card-title { font-size: 14px; font-weight: bold; margin: 0 0 8px 0; color: #333; line-height: 1.4; }
.entry-card-footer { display: flex; justify-content: space-between; font-size: 11px; color: #999; }
.status-select-editor { font-size: 11px; padding: 2px; border: 1px solid #ccc; border-radius: 4px; background: #fff; cursor: pointer; }
.status-select-editor:focus { outline: none; border-color: #666; }

/* === Analytics & Stats Styles === */
.stats-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 30px; }
.stat-box { background: #fff; border: 1px solid var(--color-border); padding: 20px 10px; border-radius: 8px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-label { font-size: 12px; color: var(--color-text-sub); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.stat-value { font-size: 24px; font-weight: bold; color: var(--color-text); margin-bottom: 8px; line-height: 1; }
.stat-comparison { font-size: 11px; display: flex; align-items: center; justify-content: center; gap: 4px; color: #999; }
.comp-high { color: var(--color-success); font-weight: 600; }
.comp-low { color: var(--color-caution); font-weight: 600; }
.comp-avg { color: #666; }

/* Analytics Fixes (Chart Height & AI Text) */
.chart-container {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    height: auto !important; /* Force auto height */
    min-height: 400px;
    position: relative;
    display: flex;
    flex-direction: column;
}
.chart-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 350px; /* Fixed height for chart */
    flex-shrink: 0;
}
.ai-insight-box {
    background: #f0f7ff;
    border-left: 4px solid #065fd4;
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    width: 100%;
}
.chart-title { font-size: 12px; font-weight: bold; color: #666; margin-bottom: 10px; text-align: center; }
.list-container { height: auto; min-height: 400px; padding: 0; }
.list-container .chart-title { padding: 15px; margin: 0; border-bottom: 1px solid #eee; text-align: left; }

.video-rank-list { border: none; height: auto; }
.video-rank-item { display: flex; align-items: center; padding: 10px; border-bottom: 1px solid #f5f5f5; text-decoration: none; color: inherit; transition: background 0.1s; }
.video-rank-item:hover { background-color: #f9f9f9; }
.rank-num { font-size: 14px; font-weight: bold; color: #999; width: 30px; text-align: center; }
.rank-thumb { width: 60px; height: 34px; background: #eee; border-radius: 4px; margin-right: 10px; object-fit: cover; }
.rank-info { flex: 1; min-width: 0; }
.rank-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; color: #333; }
.rank-meta { font-size: 11px; color: #888; display: flex; gap: 10px; }
.rank-meta b { color: #555; }

.stats-tab-nav { display: flex; border-bottom: 1px solid #eee; margin-bottom: 20px; gap: 10px; overflow-x: auto; }
.stats-tab-btn { background: none; border: none; padding: 10px 5px; font-size: 14px; font-weight: 600; color: #999; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.stats-tab-btn.active { color: #007bff; border-bottom-color: #007bff; }
.stats-tab-content { display: none; animation: fadeIn 0.3s ease; }
.stats-tab-content.active { display: block; }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }

/* === Login Page Styles === */
.login-container { width: 100%; padding: 20px; display: flex; justify-content: center; align-items: center; min-height: 80vh; }
.login-form { width: 100%; max-width: 400px; background: #fff; padding: 40px 30px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-align: center; }
.login-form .logo { margin-bottom: 20px; }
.login-form .logo img { max-width: 180px; height: auto; }
.error-msg { color: #d32f2f; background: #ffebee; padding: 10px; border-radius: 4px; margin-bottom: 20px; font-size: 14px; font-weight: bold; }
.login-form label { display: block; text-align: left; margin-bottom: 15px; }
.login-form label span { display: block; margin-bottom: 6px; font-weight: bold; color: #555; font-size: 14px; }
.login-form input[type="text"], .login-form input[type="password"] { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px; margin-top: 5px; box-sizing: border-box; outline: none; transition: border-color 0.2s; }
.login-form input[type="text"]:focus, .login-form input[type="password"]:focus { border-color: var(--color-link); }
.submit-wrapper { margin-top: 25px; }
.submit-wrapper input { width: 100%; padding: 14px; background: #333; color: #fff; border: none; border-radius: 4px; font-size: 16px; font-weight: bold; cursor: pointer; transition: background 0.2s; -webkit-appearance: none; }
.submit-wrapper input:hover { background: #555; }

/* Mobile Support */
@media (max-width: 768px) {
    .content-constrained { padding: 0 15px; }
    .ln-back-link { display: inline-block; }
    .stats-chart-wrapper { height: 250px; }
    .clock-area { display: none; }
    main { flex-direction: column; }
    header { position: fixed; top: 0; left: 0; width: 100%; height: 50px; margin: 0px; padding: 0px; z-index: 999; background-color: var(--color-bg); border-bottom: 1px solid var(--color-border); align-items: center; }
    #logo img { height: 50px; width: auto; margin-left: 3px; }
    #user_info { gap: 10px; }
    .header-user-name, .clock-area, .tz-label { display: none; }
    
    #ln { position: fixed; top: 50px; left: 0; width: 100%; height: 50px; z-index: 1000; background-color: var(--color-bg); border-right: none; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; padding: 0 10px; gap: 0; }
    #ln .sub-nav-btn{ margin-left: 10px; }
    #ln div.ln-view-mode a, #ln h1, #ln .ln-toggle-content, #ln .ln-stats-label, #ln form, #ln .anchor-links{ display: none !important; }
    #ln .ln-stats-value{ margin-left: 16px; margin-top: -8px; }

    .cal_header { position: fixed; top: 100px; left: 0; width: 100%; height: 50px; z-index: 998; background-color: var(--color-bg-sub); border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; padding: 0 10px; gap: 8px; }
    body { padding-top: 100px !important; }
    #Content { margin-left: 0; padding-left: 0; }

    .EntryForm-Group { flex-direction: column; align-items: stretch; }
    .EntryForm-Group label { flex: 0 0 auto !important; justify-content: flex-start; padding-bottom: 4px; text-align: left; }
    .EntryForm-Group input, .EntryForm-Group select, .EntryForm-Group textarea { width: 100% !important; max-width: 100%; font-size: 16px; }
    .EntryTitle input { font-size: 20px; }
    .cal_header_thismonth_btn{ display: none !important; }
    
    #calendar_container { padding: 0; background-color: transparent; margin-top: 10px; }
    #calendar { display: flex !important; flex-direction: column; width: 100% !important; min-width: 0 !important; padding: 10px !important; gap: 15px; }
    #calendar div.weekday { display: none !important; }
    #calendar div.day { width: 100% !important; min-height: auto !important; border: 1px solid #eee !important; border-radius: 12px; background: #fff; padding: 15px !important; box-shadow: 0 2px 5px rgba(0,0,0,0.03); display: flex; flex-direction: column; align-items: stretch; }
    #calendar div.day_header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #f5f5f5; width: 100%; }
    #calendar div.day div.day_num { font-size: 16px; font-weight: bold; }
    #calendar div.today { border: 2px solid var(--color-unisync) !important; background-color: #fff !important; }
    #calendar div.day:not(:has(.content_data)) { padding: 10px !important; min-height: 50px !important; opacity: 0.7; }
    #calendar .content_data { margin: 0 0 12px 0 !important; width: 100%; box-shadow: none !important; border: 1px solid #eee !important; background-color: #fafafa !important; }
    #calendar .content_data:last-child { margin-bottom: 0 !important; }
    #calendar div.content_title { font-size: 14px; line-height: 1.4; }
    #calendar div.day a.add_btn { position: static !important; width: 24px; height: 24px; margin-left: auto; }
    .cal_sub_time { display: none !important; }
    .us-btn-copy svg, .link_click svg { display: none; }

    /* Login Mobile */
    .login-container { padding-top: 0; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; background: #f4f5f7; }
    .login-form { width: 90%; max-width: 320px; margin: 0 auto; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
    
    .ConfigTable { display: block; overflow-x: auto; white-space: nowrap; }
    .topic-grid { grid-template-columns: 1fr; }
    .stats-summary-grid { grid-template-columns: 1fr; gap: 10px; }
}