/* split from original index.html - 2026-06-20 */

:root{
  --bg:#f4f7fb;
  --surface:#ffffff;
  --surface-soft:#f8fbff;
  --surface-blue:#eef6ff;
  --ink:#1d2733;
  --muted:#6b7a8c;
  --line:#dbe6f0;
  --primary:#2563eb;
  --primary2:#06b6d4;
  --accent:#f472b6;
  --success:#16a34a;
  --warning:#d97706;
  --danger:#dc2626;
  --shadow:0 14px 34px rgba(31,60,93,.12);
  --shadow-soft:0 8px 20px rgba(31,60,93,.08);
  --radius:18px;
}
*{box-sizing:border-box;}
html,body{
  margin:0;
  min-height:100%;
  font-family:"Inter","Noto Sans JP","Yu Gothic","Meiryo",system-ui,sans-serif;
  color:var(--ink);
}
body{
  background:
    radial-gradient(circle at 8% 0%,rgba(37,99,235,.13),transparent 28%),
    radial-gradient(circle at 100% 8%,rgba(6,182,212,.12),transparent 30%),
    linear-gradient(180deg,#f8fbff,#f4f7fb);
  padding:18px;
  overflow-x:hidden;
}
button,input,select,textarea{font:inherit;}
button{
  border:0;
  border-radius:12px;
  padding:9px 15px;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:white;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(37,99,235,.22);
  transition:.14s ease;
}
button:hover{transform:translateY(-1px);filter:brightness(1.04);}
button.secondary{
  background:#fff;
  color:var(--primary);
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
}
button.danger{
  background:linear-gradient(135deg,#ef4444,#f97316);
}
button.small{font-size:12px;padding:5px 10px;border-radius:10px;}
input,select,textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:12px;
  padding:9px 11px;
  background:#fff;
  outline:none;
}
input:focus,select:focus,textarea:focus{
  border-color:rgba(37,99,235,.6);
  box-shadow:0 0 0 4px rgba(37,99,235,.1);
}
textarea{resize:vertical;min-height:72px;}
label{
  font-size:12px;
  color:var(--muted);
  font-weight:800;
  display:block;
  margin:9px 0 5px;
}
.hidden{display:none!important;}
.app{
  max-width:1400px;
  margin:0 auto;
}
.app::before{
  content:"LINKSHELL COMMUNITY PORTAL";
  display:block;
  margin:0 0 10px;
  color:var(--primary);
  font-size:12px;
  font-weight:900;
  letter-spacing:.18em;
}
.card{
  background:rgba(255,255,255,.88);
  border:1px solid rgba(219,230,240,.9);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  padding:16px;
  backdrop-filter:blur(10px);
}
.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:14px;
  padding:22px 24px;
  border-radius:26px;
  background:
    linear-gradient(135deg,rgba(15,23,42,.92),rgba(30,64,175,.82)),
    linear-gradient(135deg,#1d4ed8,#06b6d4);
  color:white;
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}
.header::before{
  content:"";
  position:absolute;
  right:-80px;
  top:-110px;
  width:280px;
  height:280px;
  border-radius:50%;
  background:rgba(255,255,255,.13);
}
.header::after{
  content:"";
  position:absolute;
  right:130px;
  bottom:-70px;
  width:160px;
  height:160px;
  border-radius:50%;
  background:rgba(6,182,212,.25);
}
.title{
  position:relative;
  z-index:1;
  font-size:30px;
  font-weight:900;
  letter-spacing:.02em;
}
.title::before{content:"◇ ";color:#67e8f9;}
.title::after{
  content:"Activities / Reservations / Member Board";
  display:block;
  margin-top:4px;
  color:#c7d2fe;
  font-size:12px;
  letter-spacing:.08em;
  font-weight:800;
}
.toolbar{
  position:relative;
  z-index:1;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.login-wrap{
  min-height:calc(100vh - 36px);
  display:grid;
  place-items:center;
}
.login-card{
  width:min(440px,100%);
  background:rgba(255,255,255,.94);
}
.login-card h1{
  margin:0 0 8px;
  color:var(--primary);
  font-size:26px;
}
.login-card p{
  margin:0 0 14px;
  color:var(--muted);
  font-size:13px;
  line-height:1.65;
}
.login-actions{
  display:flex;
  gap:8px;
  margin-top:14px;
  align-items:center;
  flex-wrap:wrap;
}
.notice{
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:12px;
  margin-bottom:12px;
}
.notice-list{
  max-height:78px;
  overflow:auto;
  padding-right:4px;
}
.notice-item{
  display:grid;
  grid-template-columns:96px 1fr;
  gap:9px;
  padding:7px 0;
  border-bottom:1px solid var(--line);
  font-size:13px;
}
.notice-date{
  color:var(--muted);
  font-weight:900;
}
.comment-time{
  font-size:10px;
  color:#94a3b8;
  font-weight:800;
}
.main-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:12px;
}
.timeline-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
}
.timeline-title{
  font-size:23px;
  font-weight:900;
  color:var(--ink);
}
.timeline-title::before{
  content:"";
  display:inline-block;
  width:10px;
  height:22px;
  border-radius:999px;
  background:linear-gradient(180deg,var(--primary),var(--primary2));
  margin-right:8px;
  vertical-align:-4px;
}
.day-tabs{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:8px;
  margin-bottom:10px;
}
.day-tab{
  border-radius:16px;
  padding:10px 7px;
  background:#fff;
  color:var(--ink);
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
  font-size:12px;
  line-height:1.3;
}
.day-tab.active{
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:white;
  border-color:transparent;
  box-shadow:0 12px 24px rgba(37,99,235,.24);
}
.timeline{
  border-radius:22px;
  border:1px solid var(--line);
  background:#fff;
  overflow:hidden;
  box-shadow:var(--shadow-soft);
  min-height:1300px;
}
.day-title{
  background:linear-gradient(90deg,#f8fbff,#eef6ff);
  border-bottom:1px solid var(--line);
  padding:10px 12px;
  font-weight:900;
  color:var(--primary);
  display:flex;
  justify-content:space-between;
  font-size:14px;
  gap:4px;
}
.day-title span:last-child{
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
}
.time-grid{
  display:grid;
  grid-template-columns:66px 1fr;
}
.time-labels{
  background:#f8fbff;
  border-right:1px solid var(--line);
}
.time-label{
  height:41px;
  border-bottom:1px solid #edf3f8;
  font-size:11px;
  color:var(--muted);
  padding:4px 7px;
  text-align:right;
}
.time-label.hour{
  font-weight:900;
  color:#334155;
  background:#f8fbff;
}
.time-label.half{
  font-size:10px;
  color:#94a3b8;
  background:#fbfdff;
}
.time-label.end{
  height:0;
  border-bottom:0;
  transform:translateY(-9px);
  font-weight:900;
  color:#334155;
  background:transparent;
}
.lane{
  position:relative;
  background:repeating-linear-gradient(to bottom,#fff 0,#fff 40px,#edf3f8 41px,#fff 42px,#fff 81px,#dbe7f1 82px);
  min-height:1230px;
}
.activity{
  position:absolute;
  left:12px;
  right:12px;
  border-radius:18px;
  border:1px solid #cfe0f0;
  background:linear-gradient(135deg,#f8fbff,#fff 60%,#f0f9ff);
  box-shadow:0 10px 20px rgba(31,60,93,.12);
  padding:7px 12px;
  cursor:pointer;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.activity::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:6px;
  background:linear-gradient(180deg,var(--primary),var(--primary2));
}
.activity:hover{
  outline:3px solid rgba(37,99,235,.13);
}
.activity-top{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
  border-bottom:1px dashed #d7e4ef;
  padding-bottom:4px;
  margin-bottom:2px;
  flex-shrink:0;
}
.activity-title{
  font-weight:900;
  color:#1e3a5f;
  font-size:15px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  padding-left:3px;
}
.activity-meta{
  font-size:11px;
  color:var(--primary);
  font-weight:900;
  background:#eff6ff;
  border:1px solid #bfdbfe;
  border-radius:999px;
  padding:2px 8px;
  white-space:nowrap;
}
.activity-members{
  font-size:11px;
  display:flex;
  gap:4px;
  flex-wrap:wrap;
  line-height:1.25;
  overflow:hidden;
}
.badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:1px 6px;
  font-weight:900;
}
.badge.join{background:#dcfce7;color:#15803d;}
.badge.no{background:#fee2e2;color:#b91c1c;}
.badge.maybe{background:#fef3c7;color:#92400e;}
.badge.empty{background:#f1f5f9;color:#64748b;}
.job-grid{
  display:grid;
  grid-template-columns:repeat(8,1fr);
  gap:6px;
  margin:10px 0;
}
.job-chip{
  border-radius:12px;
  padding:7px 0;
  background:#f8fafc;
  color:#334155;
  border:1px solid var(--line);
  box-shadow:none;
  font-weight:900;
  font-size:13px;
}
.job-chip.selected{
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:white;
  border-color:transparent;
  box-shadow:0 8px 16px rgba(37,99,235,.2);
}
.job-list{
  display:inline-flex;
  gap:3px;
  flex-wrap:wrap;
  margin-left:4px;
}
.job-mini{
  background:#eff6ff;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
  border-radius:999px;
  padding:0 4px;
  font-size:10px;
  font-weight:900;
}
.side{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.panel-title{
  font-weight:900;
  color:var(--ink);
  margin-bottom:9px;
  font-size:15px;
  display:flex;
  align-items:center;
  gap:7px;
}
.panel-title::after{
  content:"";
  height:1px;
  flex:1;
  background:var(--line);
}
.member-list{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.member-pill{
  background:#eff6ff;
  border:1px solid #bfdbfe;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
  font-weight:900;
  color:#1d4ed8;
}
.admin-form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.activity-admin-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:45vh;
  overflow:auto;
  padding-right:3px;
}
.admin-item{
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px;
  background:#fff;
}
.admin-item-top{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:flex-start;
}
.admin-item-name{
  font-weight:900;
  color:var(--ink);
}
.admin-item-sub{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}
.modal-bg{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  display:grid;
  place-items:center;
  padding:14px;
  z-index:20;
}
.modal{
  width:min(560px,100%);
  max-height:calc(100vh - 28px);
  overflow:auto;
  background:#fff;
  border-radius:24px;
  padding:18px;
  box-shadow:0 24px 64px rgba(15,23,42,.24);
}
.modal h2{
  margin:0 0 8px;
  color:var(--ink);
  font-size:21px;
}
.admin-menu{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:10px;
}
.admin-menu button{
  border-radius:18px;
  min-height:62px;
  text-align:left;
  padding:12px;
  box-shadow:none;
}
.admin-menu .menu-title{
  display:block;
  font-size:15px;
  font-weight:900;
}
.admin-menu .menu-sub{
  display:block;
  font-size:11px;
  opacity:.88;
  margin-top:4px;
  line-height:1.35;
}
.subpage-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
}
.response-options{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin:12px 0;
}
.response-options button{
  box-shadow:none;
  border:1px solid transparent;
}
.response-options .join{background:#16a34a;}
.response-options .maybe{background:#f59e0b;color:#452a03;}
.response-options .no{background:#ef4444;}
.modal-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  margin-top:12px;
  flex-wrap:wrap;
}
.note{
  font-size:12px;
  color:var(--muted);
  line-height:1.55;
}
.toast{
  position:fixed;
  left:50%;
  bottom:20px;
  transform:translateX(-50%);
  background:#0f172a;
  color:white;
  padding:9px 16px;
  border-radius:999px;
  font-weight:900;
  box-shadow:var(--shadow);
  z-index:30;
  opacity:0;
  pointer-events:none;
  transition:.2s;
}
.toast.show{opacity:1;bottom:28px;}
.menu-button{
  min-width:48px;
  height:42px;
  font-size:24px;
  line-height:1;
  padding:6px 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.side-menu-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.35);
  z-index:18;
}
.side-menu{
  position:fixed;
  top:16px;
  right:16px;
  width:min(310px,calc(100vw - 32px));
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:0 24px 64px rgba(15,23,42,.24);
  padding:14px;
  z-index:19;
}
.side-menu-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:12px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
}
.side-menu-title{
  font-weight:900;
  color:var(--primary);
  letter-spacing:.14em;
}
.side-menu-sub{
  font-size:12px;
  color:var(--muted);
  font-weight:800;
  margin-top:2px;
}
.side-menu-item{
  width:100%;
  display:block;
  text-align:left;
  margin-top:8px;
  border-radius:16px;
  padding:12px 14px;
  box-shadow:none;
}
.limbus-modal{
  width:min(860px,calc(100vw - 24px));
}
.limbus-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.limbus-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:8px 0;
}
.limbus-board{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.limbus-card{
  border:1px solid var(--line);
  border-radius:20px;
  padding:13px;
  box-shadow:var(--shadow-soft);
}
.limbus-apo{background:linear-gradient(135deg,#eff6ff,#fff);}
.limbus-tem{background:linear-gradient(135deg,#fdf2f8,#fff);}
.limbus-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.limbus-title{
  font-size:18px;
  font-weight:900;
  color:var(--ink);
}
.limbus-count{
  font-weight:900;
  color:var(--primary);
  background:#eff6ff;
  border:1px solid #bfdbfe;
  border-radius:999px;
  padding:4px 10px;
  white-space:nowrap;
}
.limbus-particles{
  display:grid;
  grid-template-columns:auto 1fr auto 1fr;
  align-items:center;
  gap:6px;
  margin-bottom:10px;
  font-size:12px;
  font-weight:900;
  color:var(--muted);
}
.limbus-particles input{
  text-align:center;
  padding:6px 8px;
}
.limbus-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.limbus-grid label{
  margin:0;
  color:var(--ink);
  text-align:center;
}
.limbus-grid select{
  margin-top:4px;
  text-align:center;
  text-align-last:center;
}
.limbus-grid select.limbus-hit{background:#dcfce7;}
.limbus-grid select.limbus-miss{background:#fee2e2;}
.limbus-grid select.limbus-wait{background:#fff;}
.limbus-details{
  margin-top:10px;
  background:#f8fafc;
  border:1px solid var(--line);
  border-radius:16px;
  padding:8px;
}
.limbus-details summary{
  cursor:pointer;
  font-weight:900;
  color:var(--primary);
}
.limbus-adjust-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin:8px 0;
  flex-wrap:wrap;
}
.limbus-last{
  font-size:12px;
  font-weight:900;
  color:var(--muted);
  margin:6px 0;
}
.limbus-hit-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  font-size:12px;
}
.limbus-hit-grid div{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:5px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:4px;
}
.limbus-reset{
  width:100%;
  margin-top:10px;
}
@media(max-width:1100px){
  .main-grid{grid-template-columns:1fr;}
  .side{order:-1;display:grid;grid-template-columns:1fr 1fr;}
}
@media(max-width:760px){
  body{padding:10px;}
  .notice{grid-template-columns:1fr;}
  .header{align-items:flex-start;flex-direction:column;padding:18px;}
  .title{font-size:24px;}
  .toolbar{width:100%;}
  .day-tabs{grid-template-columns:repeat(4,1fr);}
  .side{display:flex;}
  .admin-menu{grid-template-columns:1fr;}
  .job-grid{grid-template-columns:repeat(6,1fr);}
  .limbus-board{grid-template-columns:1fr;}
  .limbus-modal{width:min(430px,calc(100vw - 16px));}
}

.gear-modal{width:min(980px,calc(100vw - 24px));}
.gear-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px;}
.gear-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0;}
.gear-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0;}
.gear-tab{box-shadow:none;}
.gear-scroll{overflow:auto;border:1px solid var(--line);border-radius:18px;background:white;max-height:65vh;}
.gear-table{width:100%;border-collapse:separate;border-spacing:0;min-width:620px;font-size:13px;}
.gear-table th,.gear-table td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:7px;text-align:center;background:#fff;}
.gear-table th{position:sticky;top:0;z-index:2;background:#eff6ff;color:var(--primary);font-weight:900;}
.gear-table .gear-job{position:sticky;left:0;z-index:1;background:#f8fbff;color:var(--ink);font-weight:900;width:58px;}
.gear-table .gear-job-head{position:sticky;left:0;z-index:3;width:58px;}
.gear-table select{min-width:74px;padding:6px 8px;text-align:center;text-align-last:center;font-weight:900;}
.gear-table select.gear-none{background:#f8fafc;color:#64748b;}
.gear-table select.gear-p1{background:#eef6ff;color:#1d4ed8;}
.gear-table select.gear-p2{background:#e0f2fe;color:#0369a1;}
.gear-table select.gear-p3{background:#dcfce7;color:#15803d;}
.gear-table select.gear-p4{background:#fef3c7;color:#92400e;}
@media(max-width:760px){
  .gear-modal{width:min(430px,calc(100vw - 16px));}
  .gear-tabs{grid-template-columns:1fr;}
  .gear-table{min-width:560px;font-size:12px;}
  .gear-table th,.gear-table td{padding:5px;}
  .gear-table select{min-width:66px;padding:5px 6px;}
}


.gear-flag-panel{
  margin:10px 0;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:linear-gradient(135deg,#f8fbff,#fff);
}
.gear-flag-title{
  font-weight:900;
  color:var(--ink);
  margin-bottom:8px;
}
.gear-flag-list{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
.gear-flag-chip{
  width:100%;
  box-shadow:none;
  background:#fff;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:14px;
  padding:8px 10px;
  text-align:left;
}
.gear-flag-chip.done{
  background:linear-gradient(135deg,#16a34a,#22c55e);
  color:white;
  border-color:transparent;
}
.gear-flag-chip .flag-main{
  display:block;
  font-size:13px;
  font-weight:900;
}
.gear-flag-chip .flag-sub{
  display:block;
  font-size:10px;
  opacity:.82;
  margin-top:2px;
}
@media(max-width:760px){
  .gear-flag-list{grid-template-columns:1fr 1fr;}
}


.gear-flag-matrix-wrap{
  display:block;
}
.gear-flag-note{
  grid-column:1/-1;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  margin-bottom:8px;
}
.gear-flag-matrix-scroll{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:14px;
  background:white;
}
.gear-flag-matrix{
  width:100%;
  min-width:620px;
  border-collapse:separate;
  border-spacing:0;
  font-size:12px;
}
.gear-flag-matrix th,
.gear-flag-matrix td{
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:6px;
  text-align:center;
  background:#fff;
}
.gear-flag-matrix thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#eff6ff;
  color:var(--primary);
}
.gear-flag-matrix tbody th{
  position:sticky;
  left:0;
  z-index:1;
  background:#f8fbff;
  color:var(--ink);
}
.gear-mini-flag{
  width:100%;
  min-width:80px;
  padding:6px;
  border-radius:12px;
  background:#f8fafc;
  color:#64748b;
  border:1px solid var(--line);
  box-shadow:none;
}
.gear-mini-flag.done{
  background:linear-gradient(135deg,#16a34a,#22c55e);
  color:white;
  border-color:transparent;
}
.gear-mini-flag span{
  display:block;
  font-weight:900;
}
.gear-mini-flag small{
  display:block;
  font-size:9px;
  opacity:.82;
  margin-top:1px;
}
.gear-flag-job-list{
  grid-template-columns:repeat(4,1fr);
}
@media(max-width:760px){
  .gear-flag-job-list{grid-template-columns:1fr 1fr;}
  .gear-flag-matrix{min-width:560px;}
  .gear-mini-flag{min-width:70px;}
}


.gear-flag-section-title{
  grid-column:1/-1;
  margin:10px 0 6px;
  padding:6px 10px;
  border-left:5px solid var(--primary);
  background:#f8fbff;
  border-radius:10px;
  color:var(--ink);
  font-weight:900;
}
.gear-flag-part-list{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:8px;
}
.gear-flag-help{
  display:block;
  margin-top:3px;
  font-size:10px;
  color:var(--muted);
  font-weight:800;
}
.gear-flag-help-cell{
  text-align:left!important;
  font-size:11px;
  color:var(--muted);
  line-height:1.35;
}
.gear-flag-matrix select{
  min-width:76px;
  font-weight:900;
}
.gear-flag-select-none{background:#f8fafc;color:#64748b;}
.gear-flag-select-p2{background:#e0f2fe;color:#0369a1;}
.gear-flag-select-p3{background:#dcfce7;color:#15803d;}
.gear-flag-select-p4{background:#fef3c7;color:#92400e;}
.gear-flag-matrix th small{
  color:var(--muted);
  font-size:10px;
}
@media(max-width:760px){
  .gear-flag-part-list{grid-template-columns:1fr 1fr;}
}


.gear-integrated-note{
  grid-column:1/-1;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  margin:4px 0 8px;
}
.gear-table .gear-cell-combo{
  display:flex;
  flex-direction:column;
  gap:5px;
  align-items:stretch;
}
.gear-table .gear-cell-combo select{
  min-width:72px;
}
.gear-table .gear-cell-label{
  font-size:10px;
  color:var(--muted);
  font-weight:900;
  text-align:left;
}
.gear-table .gear-flag-inline{
  font-size:11px;
  padding:5px 6px;
}
.gear-table .gear-head-flag{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
.gear-table .gear-head-flag button{
  padding:4px 8px;
  font-size:11px;
  box-shadow:none;
  border-radius:999px;
}
.gear-table .gear-head-flag button.done{
  background:linear-gradient(135deg,#16a34a,#22c55e);
  color:white;
}
.gear-table .gear-head-flag button:not(.done){
  background:#f8fafc;
  color:#64748b;
  border:1px solid var(--line);
}
.gear-job-flag-select{
  margin-top:4px;
  min-width:70px!important;
  font-size:11px;
}
.gear-job-cell-wrap{
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:center;
}
.gear-flag-compact{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
}
@media(max-width:760px){
  .gear-flag-compact{grid-template-columns:1fr 1fr;}
  .gear-table .gear-cell-combo select{min-width:64px;}
}


.gear-empy-part-panel{
  grid-column:1/-1;
  margin:8px 0 10px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:16px;
  background:linear-gradient(135deg,#f8fbff,#fff);
}
.gear-empy-part-title{
  font-weight:900;
  color:var(--ink);
  margin-bottom:8px;
}
.gear-empy-part-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:8px;
}
.gear-empy-part-btn{
  width:100%;
  box-shadow:none;
  background:#f8fafc;
  color:#64748b;
  border:1px solid var(--line);
  border-radius:14px;
  padding:8px;
}
.gear-empy-part-btn.done{
  background:linear-gradient(135deg,#16a34a,#22c55e);
  color:white;
  border-color:transparent;
}
.gear-empy-part-btn span{
  display:block;
  font-weight:900;
}
.gear-empy-part-btn small{
  display:block;
  font-size:10px;
  opacity:.82;
  margin-top:2px;
}
.gear-empy-job-table .gear-job-stage-cell{
  min-width:110px;
  background:#f8fbff;
}
.gear-empy-job-stage-wrap{
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:center;
}
.gear-empy-job-stage-wrap select{
  min-width:82px!important;
}
.gear-empy-table-note{
  grid-column:1/-1;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  margin:4px 0 8px;
}
@media(max-width:760px){
  .gear-empy-part-grid{grid-template-columns:1fr 1fr;}
}


.gear-condition-box{
  grid-column:1/-1;
  background:#f8fbff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  margin-bottom:8px;
}
.gear-condition-title{
  font-weight:900;
  color:var(--ink);
  margin-bottom:5px;
}
.gear-condition-box ul{
  margin:0;
  padding-left:1.2em;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  line-height:1.55;
}
.gear-table caption{
  caption-side:top;
  text-align:left;
  padding:9px 10px;
  background:#eff6ff;
  color:var(--primary);
  font-weight:900;
  border-bottom:1px solid var(--line);
}


.new-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:6px;
  padding:2px 7px;
  border-radius:999px;
  background:linear-gradient(135deg,#ef4444,#f97316);
  color:white;
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
  box-shadow:0 5px 12px rgba(239,68,68,.25);
}
.notice-item.is-new{
  background:linear-gradient(90deg,rgba(239,68,68,.08),transparent);
  border-radius:10px;
  padding-left:6px;
}
.activity-log-list{
  max-height:118px;
}
.activity-log-kind{
  display:inline-flex;
  padding:1px 6px;
  border-radius:999px;
  background:#eff6ff;
  color:var(--primary);
  font-size:10px;
  font-weight:900;
  margin-bottom:3px;
}
.activity-log-line{
  display:flex;
  align-items:flex-start;
  gap:6px;
  min-width:0;
  line-height:1.45;
}
.activity-log-datetime{
  flex:0 0 auto;
  color:var(--primary);
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
  padding-top:1px;
}
.activity-log-content{
  min-width:0;
  flex:1 1 auto;
  overflow-wrap:anywhere;
}
.activity-log-more-wrap{
  padding:7px 0 2px;
  text-align:center;
}
#showMoreActivityLogsBtn{
  width:100%;
  box-shadow:none;
}
.side-menu-members{
  margin:12px 0;
  padding:10px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#f8fbff;
}
.side-menu-section-title{
  font-weight:900;
  color:var(--ink);
  margin-bottom:8px;
  font-size:13px;
}
.side-menu-members .member-list{
  max-height:160px;
  overflow:auto;
}


/* 表示範囲拡大・スマホ最適化 */
.card{
  padding:12px;
}
.notice{
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.notice-list{
  max-height:128px;
}
#noticeList{
  max-height:138px;
}
#activityLogList{
  max-height:138px;
}
#memberCommentList{
  max-height:260px!important;
}
.notice-item{
  grid-template-columns:82px 1fr;
  gap:7px;
  padding:5px 0;
  font-size:12px;
}
.panel-title{
  margin-bottom:6px;
}
.comment-compose{
  margin-top:8px;
}
.comment-compose > button{
  width:100%;
}
.comment-compose-box{
  margin-top:8px;
  padding:9px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8fbff;
}
.comment-compose-box textarea{
  min-height:64px;
}
.comment-compose-actions{
  justify-content:flex-start!important;
  margin-top:8px;
}
.activity-log-list{
  max-height:138px;
}
@media(max-width:900px){
  body{
    padding:8px;
  }
  .app::before{
    text-align:center;
    font-size:10px;
    margin-bottom:6px;
  }
  .header{
    padding:14px;
    border-radius:20px;
    margin-bottom:8px;
  }
  .title{
    font-size:21px;
  }
  .title::after{
    font-size:10px;
    line-height:1.3;
  }
  .toolbar{
    width:100%;
    justify-content:space-between;
  }
  .member-pill{
    font-size:11px;
    padding:4px 8px;
  }
  .notice{
    grid-template-columns:1fr;
    gap:8px;
    margin-bottom:8px;
  }
  .notice .card{
    padding:10px;
  }
  #noticeList,
  #activityLogList{
    max-height:170px;
  }
  .main-grid{
    grid-template-columns:1fr;
    gap:8px;
  }
  .main-grid > .card{
    order:2;
  }
  .side{
    order:1;
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  .side .card{
    padding:10px;
  }
  #todaySummary{
    max-height:120px;
    overflow:auto;
  }
  #memberCommentList{
    max-height:220px!important;
  }
  .timeline-head{
    flex-direction:column;
    align-items:flex-start;
    gap:3px;
  }
  .timeline-title{
    font-size:19px;
  }
  .day-tabs{
    grid-template-columns:repeat(2,1fr);
    gap:6px;
  }
  .day-tab{
    padding:8px 5px;
  }
  .timeline{
    min-height:auto;
  }
  .time-grid{
    grid-template-columns:54px 1fr;
  }
  .time-label{
    padding:4px 4px;
    font-size:10px;
  }
  .activity{
    left:6px;
    right:6px;
    border-radius:14px;
    padding:6px 8px;
  }
  .activity-title{
    font-size:13px;
  }
  .activity-meta{
    font-size:10px;
    padding:1px 5px;
  }
  .activity-members{
    font-size:10px;
    gap:3px;
  }
  .badge{
    padding:1px 5px;
  }
}
@media(max-width:430px){
  body{
    padding:6px;
  }
  .header{
    padding:12px;
  }
  .title{
    font-size:19px;
  }
  .toolbar{
    gap:5px;
  }
  .menu-button{
    min-width:42px;
    height:38px;
    font-size:22px;
  }
  .notice-item{
    grid-template-columns:72px 1fr;
    font-size:11px;
  }
  #noticeList,
  #activityLogList{
    max-height:150px;
  }
  #memberCommentList{
    max-height:200px!important;
  }
  .side-menu{
    top:8px;
    right:8px;
    width:calc(100vw - 16px);
    border-radius:20px;
  }
  .modal{
    padding:13px;
    border-radius:20px;
  }
  .day-tabs{
    grid-template-columns:1fr 1fr;
  }
}


.cloud-status-corner{
  position:fixed;
  right:8px;
  top:6px;
  z-index:10;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(15,23,42,.55);
  color:white;
  font-size:10px;
  font-weight:800;
  opacity:.55;
  pointer-events:none;
}
.limbus-details-open{
  display:block;
}
.limbus-details-title{
  cursor:default;
  font-weight:900;
  color:var(--primary);
  margin-bottom:6px;
}
.timeline.empty-timeline{
  min-height:0;
}
.empty-day-message{
  padding:18px;
  color:var(--muted);
  font-weight:800;
  text-align:center;
}
@media(max-width:760px){
  .cloud-status-corner{
    right:6px;
    top:4px;
    font-size:9px;
    opacity:.45;
  }
}


.limbus-correction{
  margin:8px 0;
  border:1px dashed var(--line);
  border-radius:12px;
  padding:7px;
  background:#fff;
}
.limbus-correction summary{
  cursor:pointer;
  font-weight:900;
  color:var(--primary);
}
.limbus-details-open{
  background:#f8fbff;
}


.limbus-top{
  flex-wrap:wrap;
}
.limbus-correction-toggle.active{
  background:linear-gradient(135deg,#64748b,#94a3b8);
  color:white;
}
.limbus-correction-panel{
  margin-top:8px;
  padding:9px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.58);
}
.limbus-correction-title{
  font-size:12px;
  font-weight:900;
  color:var(--muted);
  margin:5px 0;
}
.limbus-hit-adjust-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  font-size:12px;
}
.limbus-hit-adjust-grid div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:4px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:5px;
}
.limbus-hit-adjust-grid span{
  min-width:26px;
  text-align:center;
  font-weight:900;
}
.limbus-history-panel{
  margin-top:10px;
  padding:9px;
  border-radius:14px;
  background:rgba(255,255,255,.46);
  border:1px solid rgba(255,255,255,.7);
}
.limbus-history-head{
  display:grid;
  grid-template-columns:96px 1fr;
  gap:10px;
  font-size:11px;
  font-weight:900;
  color:var(--muted);
  margin-bottom:5px;
}
.limbus-history-body{
  display:grid;
  grid-template-columns:96px 1fr;
  gap:10px;
  align-items:center;
}
.limbus-last-value{
  min-height:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:3px 8px;
  background:rgba(255,255,255,.82);
  border-radius:999px;
  font-size:13px;
  font-weight:900;
  color:var(--primary);
}
.limbus-history-panel .limbus-hit-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px 8px;
}
.limbus-history-panel .limbus-hit-grid div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.9);
  border-radius:10px;
  padding:4px 8px;
  font-size:12px;
}
.limbus-history-panel .limbus-hit-grid span:first-child{
  font-weight:900;
  color:var(--muted);
}
.limbus-history-panel .limbus-hit-grid span:last-child{
  font-weight:900;
  color:var(--ink);
}
@media(max-width:760px){
  .limbus-history-head,
  .limbus-history-body{
    grid-template-columns:88px 1fr;
    gap:8px;
  }
  .limbus-history-panel{
    padding:8px;
  }
}


.version-button{
  padding:6px 10px;
  font-size:12px;
  box-shadow:none;
}
#versionNumberBadge,
.version-mini-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:4px;
  padding:1px 7px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:white;
  font-size:10px;
  font-weight:900;
}
.version-entry-title{
  font-weight:900;
  color:var(--ink);
}
.version-entry-body{
  white-space:pre-wrap;
  line-height:1.55;
}
@media(max-width:430px){
  .version-button{
    width:auto;
    padding:5px 8px;
    font-size:11px;
  }
}


/* ===== Theme: Antique Guild / Brown ===== */
:root{
  --bg:#f5efe6;
  --surface:#fffaf2;
  --surface-soft:#fbf2e8;
  --surface-blue:#f3e3cf;
  --ink:#34261d;
  --muted:#806b5a;
  --line:#e4cdb6;
  --primary:#8b5e34;
  --primary2:#c08a53;
  --accent:#d6a85f;
  --success:#5c8b5e;
  --warning:#c47a25;
  --danger:#b95345;
  --shadow:0 16px 34px rgba(72,45,24,.18);
  --shadow-soft:0 8px 22px rgba(72,45,24,.11);
}
body{
  background:
    radial-gradient(circle at 10% 0%,rgba(192,138,83,.20),transparent 30%),
    radial-gradient(circle at 95% 8%,rgba(139,94,52,.18),transparent 28%),
    linear-gradient(180deg,#fff8ed,#f3e7d8);
}
.app::before{content:"FF11 LINKSHELL GUILD";color:#8b5e34;}
.header{
  background:
    linear-gradient(135deg,rgba(55,35,22,.94),rgba(139,94,52,.84)),
    linear-gradient(135deg,#8b5e34,#d6a85f);
  box-shadow:0 18px 44px rgba(72,45,24,.24);
}
.header::before{background:rgba(255,233,191,.16);}
.header::after{background:rgba(214,168,95,.24);}
.title::before{content:"◆ ";color:#f2c879;}
.title::after{color:#f8dbab;}
.card,.modal,.side-menu{
  background:rgba(255,250,242,.94);
  border-color:#ead8c5;
}
.panel-title::after{background:linear-gradient(90deg,#d6a85f,transparent);}
button{background:linear-gradient(135deg,#8b5e34,#c08a53);}
button.secondary{background:#fffaf2;color:#8b5e34;border-color:#e4cdb6;}
.member-pill,.activity-log-kind,.activity-meta,.limbus-count{
  background:#fff2df;
  border-color:#e4c39e;
  color:#8b5e34;
}
.day-tab.active,.new-badge,#versionNumberBadge,.version-mini-badge{
  background:linear-gradient(135deg,#8b5e34,#c08a53);
}
.day-title,.gear-table th,.gear-flag-matrix thead th,.gear-table caption{
  background:linear-gradient(90deg,#fff2df,#fffaf2);
  color:#8b5e34;
}
.lane{
  background:repeating-linear-gradient(to bottom,#fffaf2 0,#fffaf2 40px,#ead8c5 41px,#fffaf2 42px,#fffaf2 81px,#d7b997 82px);
}
.activity{
  border-color:#dec2a6;
  background:linear-gradient(135deg,#fff7ec,#fffdf8 58%,#f3e5d3);
}
.activity::before{background:linear-gradient(180deg,#c08a53,#8b5e34);}
.cloud-status-corner{background:rgba(52,38,29,.55);}


/* 短時間活動カードの見切れ対策 */
.activity.short-activity{
  padding:3px 8px;
  z-index:2;
}
.activity.short-activity .activity-top{
  display:flex;
  align-items:center;
  gap:6px;
  border-bottom:0;
  padding-bottom:0;
  margin-bottom:1px;
}
.activity.short-activity .activity-title{
  font-size:12px;
  line-height:1.1;
}
.activity.short-activity .activity-meta{
  font-size:9px;
  padding:1px 5px;
}
.activity.short-activity .activity-members{
  display:flex;
  flex-wrap:wrap;
  gap:3px;
  max-height:18px;
  overflow-y:auto;
  overflow-x:hidden;
  line-height:1;
  scrollbar-width:thin;
  padding-right:2px;
}
.activity.short-activity .badge{
  flex:0 0 auto;
  padding:1px 5px;
  font-size:9px;
  white-space:nowrap;
}

/* 今日の予定の空白行対策 */
.today-list{display:flex;flex-direction:column;gap:7px;}
.today-item{display:grid;grid-template-columns:82px 1fr;gap:8px;align-items:start;padding:6px 0;border-bottom:1px solid var(--line);}
.today-item:last-child{border-bottom:0;}
.today-time{color:var(--primary);font-weight:900;font-size:12px;white-space:nowrap;}
.today-main{line-height:1.35;}
.today-memo{margin-top:2px;color:var(--muted);font-size:12px;}
@media(max-width:430px){.today-item{grid-template-columns:74px 1fr;gap:6px}.today-time{font-size:11px}}

/* 1時間以内カード：活動名の右に時間を配置 */
.activity.compact-activity .activity-top{
  display:flex;
  align-items:center;
  gap:6px;
  border-bottom:0;
  padding-bottom:0;
  margin-bottom:2px;
}
.activity.compact-activity .activity-title{
  min-width:0;
  flex:1;
}
.activity.compact-activity .activity-meta{
  flex:0 0 auto;
}
.activity.compact-activity .activity-members{
  margin-top:1px;
}


/* タイムラインカード：概要表示 */
.activity.summary-activity{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:10px;
  padding:8px 12px;
}
.activity.summary-activity .activity-summary-left{
  min-width:0;
  padding-left:3px;
}
.activity-summary-line{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.activity-summary-time{
  flex:0 0 auto;
  font-size:11px;
  font-weight:900;
  color:var(--primary);
  background:#fff2df;
  border:1px solid #e4c39e;
  border-radius:999px;
  padding:2px 8px;
}
.activity-summary-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:15px;
  font-weight:900;
  color:#1e3a5f;
}
.activity-summary-memo{
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  line-height:1.25;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.activity-summary-count{
  flex:0 0 auto;
  align-self:start;
  border-radius:999px;
  padding:3px 9px;
  background:#fffaf2;
  border:1px solid var(--line);
  color:var(--primary);
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.activity.summary-activity.short-activity{
  padding:4px 8px;
  grid-template-columns:minmax(0,1fr) auto;
}
.activity.summary-activity.short-activity .activity-summary-line{
  gap:5px;
}
.activity.summary-activity.short-activity .activity-summary-time{
  font-size:9px;
  padding:1px 5px;
}
.activity.summary-activity.short-activity .activity-summary-title{
  font-size:12px;
}
.activity.summary-activity.short-activity .activity-summary-memo{
  display:block;
  margin-top:2px;
  font-size:10px;
  line-height:1.15;
  color:var(--muted);
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.activity.summary-activity.short-activity .activity-summary-count{
  font-size:9px;
  padding:1px 5px;
}

/* 参加登録モーダル内の一覧 */
.response-registered-box{
  margin:10px 0;
  padding:10px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fffaf2;
}
.response-registered-list{
  display:flex;
  flex-direction:column;
  gap:7px;
  max-height:220px;
  overflow:auto;
}
.response-person{
  border:1px solid var(--line);
  border-radius:14px;
  padding:8px;
  background:#fff;
}
.response-person-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.response-name{
  font-weight:900;
  color:var(--ink);
}
.response-jobs{
  margin-top:5px;
  display:flex;
  gap:4px;
  flex-wrap:wrap;
}
.response-comment{
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}
@media(max-width:760px){
  .activity.summary-activity{
    grid-template-columns:1fr;
    gap:4px;
  }
  .activity-summary-count{
    justify-self:start;
  }
}


/* 概要カード右側：名前/参加可否表示 */
.activity-response-summary{
  align-self:start;
  display:flex;
  flex-direction:column;
  gap:3px;
  max-height:100%;
  overflow:auto;
  min-width:118px;
  scrollbar-width:thin;
}
.activity-response-mini{
  display:inline-flex;
  justify-content:center;
  border-radius:999px;
  padding:2px 7px;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.activity-response-mini.join{background:#dcfce7;color:#15803d;}
.activity-response-mini.no{background:#fee2e2;color:#b91c1c;}
.activity-response-mini.maybe{background:#fef3c7;color:#92400e;}
.activity-response-mini.empty{background:#f1f5f9;color:#64748b;}

/* 30分/1時間カードの文字サイズ統一 */
.activity.summary-activity.short-activity .activity-summary-time,
.activity.summary-activity.compact-activity .activity-summary-time{
  font-size:10px;
  padding:1px 6px;
}
.activity.summary-activity.short-activity .activity-summary-title,
.activity.summary-activity.compact-activity .activity-summary-title{
  font-size:13px;
}
.activity.summary-activity.short-activity .activity-response-mini,
.activity.summary-activity.compact-activity .activity-response-mini{
  font-size:10px;
  padding:1px 6px;
}
.activity.summary-activity.short-activity .activity-summary-memo,
.activity.summary-activity.compact-activity .activity-summary-memo{
  font-size:10px;
  line-height:1.15;
  -webkit-line-clamp:1;
}
.activity.summary-activity.short-activity .activity-response-summary,
.activity.summary-activity.compact-activity .activity-response-summary{
  min-width:106px;
  gap:2px;
}


/* 参加可否を横並び＋折り返し＋枠内スクロール */
.activity-response-summary{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-content:flex-start;
  justify-content:flex-start;
  gap:3px 4px;
  max-height:100%;
  overflow-y:auto;
  overflow-x:hidden;
  min-width:150px;
  max-width:42%;
  padding-right:2px;
  scrollbar-width:thin;
}
.activity-response-mini{
  flex:0 0 auto;
  max-width:100%;
}
.activity.summary-activity.short-activity .activity-response-summary,
.activity.summary-activity.compact-activity .activity-response-summary{
  min-width:130px;
  max-width:46%;
  gap:2px 3px;
}
@media(max-width:760px){
  .activity-response-summary{
    max-width:100%;
    min-width:0;
  }
  .activity.summary-activity{
    grid-template-columns:1fr;
  }
}


/* 参加可否を活動名の右に続けて表示 */
.activity.summary-activity{
  display:block!important;
  padding:7px 12px;
}
.activity.summary-activity .activity-summary-left{
  width:100%;
  min-width:0;
}
.activity-summary-line{
  display:flex!important;
  align-items:flex-start;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:4px 6px;
  min-width:0;
  max-height:calc(100% - 2px);
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
}
.activity-summary-time,
.activity-summary-title{
  flex:0 0 auto;
}
.activity-response-summary{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-content:flex-start;
  justify-content:flex-start;
  gap:3px 4px;
  min-width:0!important;
  max-width:none!important;
  max-height:none!important;
  overflow:visible!important;
  padding-right:0;
}
.activity-response-mini{
  flex:0 0 auto;
}
.activity.summary-activity.short-activity,
.activity.summary-activity.compact-activity{
  padding:4px 8px;
}
.activity.summary-activity.short-activity .activity-summary-line,
.activity.summary-activity.compact-activity .activity-summary-line{
  gap:3px 4px;
  max-height:100%;
}
.activity.summary-activity.short-activity .activity-summary-memo{
  display:block;
  margin-top:2px;
  font-size:10px;
  line-height:1.15;
  color:var(--muted);
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}


/* 参加可否：状態ごとにまとめて省スペース表示 */
.activity-response-group{
  display:inline-flex;
  align-items:center;
  flex-wrap:wrap;
  gap:2px 5px;
  border-radius:999px;
  padding:2px 7px;
  font-size:11px;
  font-weight:800;
  line-height:1.25;
}
.activity-response-group b{
  font-weight:900;
  margin-right:1px;
}
.activity-response-group.join{background:#dcfce7;color:#15803d;}
.activity-response-group.no{background:#fee2e2;color:#b91c1c;}
.activity-response-group.maybe{background:#fef3c7;color:#92400e;}
.activity-response-group.empty{background:#f1f5f9;color:#64748b;}
.activity.summary-activity.short-activity .activity-response-group,
.activity.summary-activity.compact-activity .activity-response-group{
  font-size:10px;
  padding:1px 6px;
  gap:1px 4px;
}


/* 詳細モーダル：名前・参加可否・ジョブを横並び */
.response-person-head.compact{
  justify-content:flex-start;
  align-items:center;
  flex-wrap:wrap;
  gap:5px 7px;
}
.response-person-head.compact .response-name{
  flex:0 0 auto;
}
.response-jobs.inline{
  margin-top:0;
  display:inline-flex;
  gap:3px;
  flex-wrap:wrap;
  align-items:center;
}
.response-jobs.inline.note{
  font-size:11px;
}
.response-person{
  padding:7px 8px;
}
.response-comment{
  margin-top:4px;
  padding-left:2px;
}


/* 30分カードでも活動コメントを下段に表示 */
.activity.summary-activity.short-activity{
  overflow:hidden;
}
.activity.summary-activity.short-activity .activity-summary-left{
  max-height:100%;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
}
.activity.summary-activity.short-activity .activity-summary-memo{
  display:block;
  margin-top:2px;
  font-size:10px;
  line-height:1.15;
  color:var(--muted);
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}


/* 30分カード：文字サイズを戻して行間・余白だけ圧縮 */
.activity.summary-activity.short-activity{
  padding:3px 7px;
}
.activity.summary-activity.short-activity .activity-summary-line{
  gap:2px 4px;
  line-height:1.02;
}
.activity.summary-activity.short-activity .activity-summary-time{
  font-size:10px;
  padding:0 5px;
  line-height:1.12;
}
.activity.summary-activity.short-activity .activity-summary-title{
  font-size:13px;
  line-height:1.08;
}
.activity.summary-activity.short-activity .activity-response-group{
  font-size:10px;
  padding:0 5px;
  line-height:1.12;
}
.activity.summary-activity.short-activity .activity-summary-memo{
  margin-top:0;
  font-size:10px;
  line-height:1.05;
}


/* 30分カード：行間をほんの少しだけ広げる */
.activity.summary-activity.short-activity .activity-summary-line{
  line-height:1.06;
}
.activity.summary-activity.short-activity .activity-summary-time{
  line-height:1.16;
}
.activity.summary-activity.short-activity .activity-summary-title{
  line-height:1.12;
}
.activity.summary-activity.short-activity .activity-response-group{
  line-height:1.16;
}
.activity.summary-activity.short-activity .activity-summary-memo{
  line-height:1.10;
}


/* 30分カード：行間をさらに+0.05広げる */
.activity.summary-activity.short-activity .activity-summary-line{
  line-height:1.11;
}
.activity.summary-activity.short-activity .activity-summary-time{
  line-height:1.21;
}
.activity.summary-activity.short-activity .activity-summary-title{
  line-height:1.17;
}
.activity.summary-activity.short-activity .activity-response-group{
  line-height:1.21;
}
.activity.summary-activity.short-activity .activity-summary-memo{
  line-height:1.15;
}


/* 30分カード：圧縮版に戻し、1行目と2行目の間だけ少し広げる */
.activity.summary-activity.short-activity .activity-summary-line{
  line-height:1.02;
  margin-bottom:2px;
}
.activity.summary-activity.short-activity .activity-summary-time{
  line-height:1.12;
}
.activity.summary-activity.short-activity .activity-summary-title{
  line-height:1.08;
}
.activity.summary-activity.short-activity .activity-response-group{
  line-height:1.12;
}
.activity.summary-activity.short-activity .activity-summary-memo{
  margin-top:0;
  line-height:1.05;
}


/* 30分カード：1行目と2行目の間だけ 3.0px */
.activity.summary-activity.short-activity .activity-summary-line{
  line-height:1.02;
  margin-bottom:3.0px;
}
.activity.summary-activity.short-activity .activity-summary-time{
  line-height:1.12;
}
.activity.summary-activity.short-activity .activity-summary-title{
  line-height:1.08;
}
.activity.summary-activity.short-activity .activity-response-group{
  line-height:1.12;
}
.activity.summary-activity.short-activity .activity-summary-memo{
  margin-top:0;
  line-height:1.05;
}


/* 管理者LS活動画面の整理 */
.admin-section{
  border:1px solid var(--line);
  border-radius:16px;
  background:#fffaf2;
  margin:10px 0;
  overflow:hidden;
}
.admin-section summary{
  cursor:pointer;
  padding:11px 13px;
  font-weight:900;
  color:var(--primary);
  background:linear-gradient(90deg,#fff2df,#fffaf2);
  list-style:none;
}
.admin-section summary::-webkit-details-marker{
  display:none;
}
.admin-section summary::before{
  content:"▶";
  display:inline-block;
  margin-right:7px;
  transition:.15s ease;
}
.admin-section[open] summary::before{
  transform:rotate(90deg);
}
.admin-section-body{
  padding:12px;
  border-top:1px solid var(--line);
}
#activityPage .activity-admin-list{
  max-height:260px;
}
#activityPage textarea{
  min-height:58px;
}


/* NEW表示を赤系で強調 */
.new-badge{
  background:linear-gradient(135deg,#ef4444,#dc2626)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.75);
  box-shadow:0 4px 12px rgba(220,38,38,.35)!important;
}
.notice-item.is-new{
  background:linear-gradient(90deg,rgba(239,68,68,.13),transparent)!important;
}


/* バージョン履歴ボタンをヘッダーカード欄外の右上へ */
.header{
  position:relative;
  overflow:visible!important;
}
.version-button{
  position:absolute;
  top:-14px;
  right:12px;
  z-index:5;
  background:#fffaf2!important;
  color:var(--primary)!important;
  border:1px solid var(--line)!important;
  box-shadow:0 8px 18px rgba(72,45,24,.16)!important;
  border-radius:999px!important;
}
@media(max-width:760px){
  .version-button{
    top:-10px;
    right:8px;
    font-size:10px;
    padding:4px 8px;
  }
}


/* バージョン履歴ボタン：ヘッダーと重ならない独立配置 */
.header{
  overflow:visible!important;
}
.version-button{
  position:fixed!important;
  top:72px!important;
  right:18px!important;
  z-index:80!important;
  background:#fffaf2!important;
  color:var(--primary)!important;
  border:1px solid var(--line)!important;
  box-shadow:0 8px 18px rgba(72,45,24,.18)!important;
  border-radius:999px!important;
  padding:5px 10px!important;
  font-size:11px!important;
}
@media(max-width:760px){
  .version-button{
    top:66px!important;
    right:10px!important;
    padding:4px 8px!important;
    font-size:10px!important;
  }
}


/* 履歴ボタン：タイトル行の右側に配置 */
.version-button{
  position:static!important;
  top:auto!important;
  right:auto!important;
  z-index:auto!important;
  margin-left:auto!important;
  align-self:center!important;
  background:#fffaf2!important;
  color:var(--primary)!important;
  border:1px solid var(--line)!important;
  box-shadow:0 4px 10px rgba(72,45,24,.12)!important;
  border-radius:999px!important;
  padding:5px 10px!important;
  font-size:11px!important;
  white-space:nowrap!important;
}
.header .toolbar{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
@media(max-width:760px){
  .version-button{
    padding:4px 8px!important;
    font-size:10px!important;
  }
}


/* ゲスト表示・マスク */
.guest-mask{
  border:1px dashed var(--line);
  border-radius:16px;
  padding:16px;
  background:rgba(255,255,255,.72);
  color:var(--muted);
  font-weight:900;
  text-align:center;
}
.guest-disabled{
  opacity:.55;
  filter:grayscale(.2);
}
.guest-badge{
  background:#f1f5f9!important;
  border-color:#cbd5e1!important;
  color:#64748b!important;
}


/* 掲示板投稿欄：デフォルト非表示 */
.comment-compose-box{
  display:none;
}
.comment-compose-box.open{
  display:block;
}


/* 初回・復帰時のクラウド同期中オーバーレイ */
.cloud-sync-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  background:rgba(52,38,29,.42);
  backdrop-filter:blur(2px);
}
.cloud-sync-overlay.hidden{display:none!important;}
.cloud-sync-box{
  width:min(360px,calc(100vw - 36px));
  padding:22px 20px;
  border-radius:22px;
  background:#fffaf2;
  border:1px solid var(--line);
  box-shadow:0 24px 64px rgba(52,38,29,.28);
  text-align:center;
  color:var(--ink);
}
.cloud-sync-spinner{
  width:34px;
  height:34px;
  margin:0 auto 12px;
  border:4px solid #ead8c5;
  border-top-color:var(--primary);
  border-radius:999px;
  animation:cloudSyncSpin .8s linear infinite;
}
.cloud-sync-title{
  font-size:18px;
  font-weight:900;
  color:var(--primary);
}
.cloud-sync-sub{
  margin-top:6px;
  font-size:12px;
  font-weight:800;
  color:var(--muted);
  line-height:1.5;
}
@keyframes cloudSyncSpin{to{transform:rotate(360deg);}}



/* 更新履歴：横書き1行表示の強制補正 */
.notice-item.activity-log-item{
  display:block!important;
  grid-template-columns:none!important;
  width:100%;
}
.notice-item.activity-log-item .activity-log-line{
  display:flex!important;
  flex-direction:row!important;
  align-items:flex-start!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  white-space:normal!important;
}
.notice-item.activity-log-item .activity-log-datetime{
  flex:0 0 74px!important;
  width:74px!important;
  min-width:74px!important;
  max-width:74px!important;
  white-space:nowrap!important;
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
  line-height:1.45!important;
}
.notice-item.activity-log-item .activity-log-content{
  display:block!important;
  flex:1 1 auto!important;
  min-width:0!important;
  max-width:100%!important;
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  line-height:1.45!important;
}
.notice-item.activity-log-item .activity-log-kind,
.notice-item.activity-log-item .new-badge{
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
}
@media(max-width:430px){
  .notice-item.activity-log-item .activity-log-line{gap:6px!important;}
  .notice-item.activity-log-item .activity-log-datetime{
    flex-basis:68px!important;
    width:68px!important;
    min-width:68px!important;
    max-width:68px!important;
    font-size:10px!important;
  }
}


/* ===== アンケート機能（KV同期/API保存） ===== */
.poll-card-list{display:flex;flex-direction:column;gap:8px;}
.poll-card-item{border:1px solid var(--line);border-radius:16px;background:#fff;padding:10px;box-shadow:var(--shadow-soft);}
.poll-card-title{font-weight:900;color:var(--ink);line-height:1.35;}
.poll-card-meta{font-size:11px;color:var(--muted);font-weight:800;margin-top:3px;}
.poll-type-select{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0;}
.poll-type-card{min-height:104px;text-align:left;border-radius:18px;box-shadow:none;padding:13px;background:linear-gradient(135deg,#8b5e34,#c08a53);}
.poll-type-card .menu-title{display:block;font-size:16px;font-weight:900;}
.poll-type-card .menu-sub{display:block;font-size:12px;opacity:.9;margin-top:6px;line-height:1.45;}
.poll-option-row{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:center;margin-top:7px;}
.poll-option-row button{box-shadow:none;}
.poll-result-row{margin:9px 0;}
.poll-result-head{display:flex;justify-content:space-between;gap:8px;font-size:12px;font-weight:900;color:var(--ink);}
.poll-result-bar{height:11px;border-radius:999px;background:#f3e3cf;overflow:hidden;border:1px solid var(--line);margin-top:4px;}
.poll-result-fill{height:100%;width:0;background:linear-gradient(90deg,var(--primary),var(--primary2));border-radius:999px;}
.poll-answer-list{display:flex;flex-direction:column;gap:7px;max-height:220px;overflow:auto;margin-top:10px;}
.poll-answer-item{border:1px solid var(--line);border-radius:14px;background:#fff;padding:8px;font-size:12px;}
.poll-answer-name{font-weight:900;color:var(--primary);}
.poll-answer-choice{font-weight:900;color:var(--ink);margin-top:3px;}
.poll-answer-comment{color:var(--muted);margin-top:3px;white-space:pre-wrap;line-height:1.4;}
.poll-choice-list{display:flex;flex-direction:column;gap:7px;margin:10px 0;}
.poll-choice-label{display:flex;gap:8px;align-items:center;border:1px solid var(--line);background:#fff;border-radius:14px;padding:8px 10px;font-weight:900;color:var(--ink);}
.poll-choice-label input{width:auto;box-shadow:none;}
.poll-status-badge{display:inline-flex;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:900;background:#dcfce7;color:#15803d;}
.poll-status-badge.closed{background:#fee2e2;color:#b91c1c;}
.poll-dashboard-results{margin-top:6px;}
.poll-dashboard-results .poll-result-row{margin:6px 0;}
.poll-dashboard-results .poll-result-head{font-size:11px;}
.poll-dashboard-results .poll-result-bar{height:9px;margin-top:3px;}
/* メイン画面・一覧用：投票結果を省スペース表示（バー左／数値右） */
.poll-result-grid.compact{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px 6px;
  margin-top:5px;
  width:100%;
  min-width:0;
}
.poll-result-grid.compact .poll-result-card{
  display:block;
  padding:5px 6px;
  border-radius:10px;
  box-shadow:none;
  background:#fffaf2;
  min-width:0;
  overflow:hidden;
}
.poll-result-grid.compact .poll-result-option{
  display:block;
  min-width:0;
  font-size:10px;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-bottom:3px;
}
.poll-result-grid.compact .poll-result-line{
  display:grid;
  grid-template-columns:minmax(0,1fr) 50px;
  align-items:center;
  gap:5px;
  min-width:0;
}
.poll-result-grid.compact .poll-result-bar{
  height:6px;
  margin-top:0;
  width:100%;
  min-width:0;
}
.poll-result-grid.compact .poll-result-percent{
  font-size:10px;
  line-height:1;
  white-space:nowrap;
  color:var(--primary);
  text-align:right;
  font-weight:900;
}
.poll-result-grid.compact .poll-result-count{
  display:none;
}
.poll-result-grid.compact .poll-result-count-mini{
  display:inline;
  color:var(--muted);
  font-weight:900;
}
.poll-dashboard-free-comment{
  display:inline-flex;
  align-items:center;
  margin-top:5px;
  padding:2px 7px;
  border-radius:999px;
  background:#fff2df;
  border:1px solid #e4c39e;
  color:var(--primary);
  font-size:11px;
  font-weight:900;
}

/* ===== アンケート：2列カード集計・進行中/終了済み ===== */
.poll-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px;}
.poll-result-card{border:1px solid var(--line);border-radius:15px;background:linear-gradient(135deg,#fffaf2,#fff);padding:9px;box-shadow:var(--shadow-soft);min-width:0;}
.poll-result-option{font-weight:900;color:var(--ink);font-size:12px;line-height:1.25;overflow-wrap:anywhere;}
.poll-result-percent{font-size:20px;font-weight:900;color:var(--primary);line-height:1.1;margin-top:3px;}
.poll-result-count{font-size:11px;font-weight:900;color:var(--muted);margin-top:2px;}
.poll-result-card .poll-result-bar{height:10px;margin-top:6px;background:#f3e3cf;border:1px solid var(--line);}
.poll-list-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0 10px;}
.poll-list-tab{box-shadow:none;background:#fffaf2!important;color:var(--primary)!important;border:1px solid var(--line)!important;}
.poll-list-tab.active{background:linear-gradient(135deg,var(--primary),var(--primary2))!important;color:white!important;border-color:transparent!important;}
.poll-section-title{font-weight:900;color:var(--primary);margin:10px 0 7px;display:flex;align-items:center;gap:7px;}
.poll-section-title::after{content:"";height:1px;flex:1;background:var(--line);}
.poll-more-wrap{text-align:center;margin-top:8px;}
.poll-anon-note{font-size:11px;color:var(--muted);font-weight:800;margin-top:4px;}
@media(max-width:760px){.poll-result-grid{grid-template-columns:1fr;}.poll-result-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 6px;}.poll-result-grid.compact .poll-result-card{display:block;padding:5px 6px;}.poll-result-grid.compact .poll-result-option,.poll-result-grid.compact .poll-result-percent{font-size:10px;}}
@media(max-width:380px){.poll-result-grid.compact{grid-template-columns:1fr;}}

@media(max-width:760px){.poll-type-select{grid-template-columns:1fr;}.poll-type-card{min-height:auto;}}
/* ===== アンケート：メイン集計表示＋ゲスト閲覧専用 ===== */
.poll-dashboard-question{font-weight:900;color:var(--ink);line-height:1.35;margin-bottom:5px;}
.poll-dashboard-summary{font-size:11px;color:var(--muted);font-weight:900;margin:4px 0 6px;}
.poll-free-count{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;background:#fff2df;border:1px solid var(--line);color:var(--primary);font-size:11px;font-weight:900;margin-top:4px;}
.poll-guest-note{border:1px dashed var(--line);border-radius:14px;background:rgba(255,255,255,.72);padding:9px 10px;color:var(--muted);font-size:12px;font-weight:900;margin:8px 0;}
.poll-readonly{opacity:.72;pointer-events:none;}
.poll-list-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;}


/* ===== アンケート：v7 メイン画面さらに圧縮 ===== */
#pollDashboard.poll-card-list{
  gap:5px!important;
}
#pollDashboard .poll-card-item{
  padding:6px 8px!important;
  border-radius:12px!important;
  box-shadow:none!important;
}
#pollDashboard .poll-dashboard-question{
  margin-bottom:3px!important;
  font-size:12px!important;
  line-height:1.2!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#pollDashboard .poll-dashboard-summary{
  display:none!important;
}
#pollDashboard .poll-dashboard-results{
  margin-top:2px!important;
}
#pollDashboard .poll-result-grid.compact{
  gap:3px 5px!important;
  margin-top:2px!important;
}
#pollDashboard .poll-result-grid.compact .poll-result-card{
  padding:3px 5px!important;
  border-radius:8px!important;
  border-color:#ead8c5!important;
  background:rgba(255,250,242,.72)!important;
}
#pollDashboard .poll-result-grid.compact .poll-result-option{
  font-size:9.5px!important;
  line-height:1.05!important;
  margin-bottom:2px!important;
}
#pollDashboard .poll-result-grid.compact .poll-result-line{
  grid-template-columns:minmax(0,1fr) 43px!important;
  gap:3px!important;
}
#pollDashboard .poll-result-grid.compact .poll-result-bar{
  height:5px!important;
  margin-top:0!important;
  border-width:1px!important;
}
#pollDashboard .poll-result-grid.compact .poll-result-percent{
  font-size:9.5px!important;
  line-height:1!important;
}
#pollDashboard .poll-dashboard-foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:6px;
  margin-top:4px;
}
#pollDashboard .poll-dashboard-free-comment{
  margin-top:0!important;
  padding:1px 6px!important;
  font-size:10px!important;
  line-height:1.2!important;
}
#pollDashboard .modal-actions{
  margin-top:0!important;
}
#pollDashboard .modal-actions button{
  padding:2px 8px!important;
  font-size:10px!important;
  border-radius:999px!important;
  line-height:1.25!important;
}
#pollDashboard .poll-more-wrap{
  margin-top:3px!important;
}
#pollDashboard .poll-more-wrap button{
  padding:3px 10px!important;
  font-size:10px!important;
}
@media(max-width:380px){
  #pollDashboard .poll-result-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  #pollDashboard .poll-result-grid.compact .poll-result-line{grid-template-columns:minmax(0,1fr) 39px!important;}
  #pollDashboard .poll-result-grid.compact .poll-result-percent{font-size:9px!important;}
}




/* Notice detail modal - 2026-07-04 */
.notice-detail-link{
  display:inline;
  padding:0;
  margin:0 2px;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--primary);
  box-shadow:none;
  font-weight:900;
  text-decoration:underline;
  cursor:pointer;
}
.notice-detail-link:hover{transform:none;filter:none;color:var(--primary2);}
.notice-detail-suffix{color:var(--muted);font-size:12px;}
.notice-detail-modal{width:min(760px, calc(100vw - 28px));max-height:82vh;overflow:auto;}
.notice-detail-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px;}
.notice-detail-head h2{margin:0;}
.notice-detail-title{font-size:18px;font-weight:900;margin:12px 0;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft);}
.notice-detail-body{white-space:normal;line-height:1.8;font-size:14px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff;min-height:180px;}
.notice-detail-input{min-height:180px;line-height:1.7;}

/* Overlap layout 2026-07-05
   重なったLS活動は、カード同士を上下に重ねず左右の列へ自動分割します。 */
.activity.overlap-activity{
  z-index:2;
  padding-left:10px;
  padding-right:8px;
}
.activity.overlap-activity .activity-summary-line{
  gap:3px 5px;
}
.activity.overlap-activity .activity-summary-time{
  font-size:10px;
  padding:1px 6px;
}
.activity.overlap-activity .activity-summary-title{
  font-size:13px;
  max-width:100%;
}
.activity.overlap-activity .activity-summary-memo{
  -webkit-line-clamp:2;
}
.activity.overlap-activity .activity-response-summary{
  font-size:10px;
}

@media (max-width: 720px){
  .activity.overlap-activity{
    padding-left:8px;
    padding-right:6px;
  }
  .activity.overlap-activity .activity-summary-time{
    font-size:9px;
    padding:1px 5px;
  }
  .activity.overlap-activity .activity-summary-title{
    font-size:12px;
  }
  .activity.overlap-activity .activity-response-summary,
  .activity.overlap-activity .activity-summary-memo{
    font-size:9px;
  }
}


/* multiline activity memo v24 2026-07-05
   管理者編集画面で入力した改行を、LS活動カード上でも保持して表示します。 */
.activity-summary-memo,
.today-memo,
.admin-item-sub,
.response-comment{
  white-space:pre-line;
}
.activity.summary-activity .activity-summary-memo{
  word-break:break-word;
}


/* notice link restore v26 2026-07-05
   LS活動カード内の本文・参加表示を省略せず、カードの高さを超えた分はカード内スクロールで確認します。 */
.activity.summary-activity{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-width:thin;
  align-content:flex-start;
}
.activity.summary-activity::-webkit-scrollbar{width:8px;}
.activity.summary-activity::-webkit-scrollbar-thumb{background:#d6b895;border-radius:999px;}
.activity.summary-activity .activity-summary-left{
  min-width:0;
  min-height:0;
}
.activity.summary-activity .activity-summary-line{
  align-items:flex-start;
  flex-wrap:wrap;
}
.activity.summary-activity .activity-summary-title{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  word-break:break-word;
  overflow-wrap:anywhere;
  line-height:1.25;
}
.activity.summary-activity .activity-summary-memo,
.activity.summary-activity.short-activity .activity-summary-memo,
.activity.summary-activity.compact-activity .activity-summary-memo,
.activity.overlap-activity .activity-summary-memo{
  display:block!important;
  white-space:pre-wrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  -webkit-line-clamp:unset!important;
  -webkit-box-orient:unset!important;
  word-break:break-word;
  overflow-wrap:anywhere;
  max-height:none!important;
}
.activity.summary-activity .activity-response-summary,
.activity.summary-activity.short-activity .activity-response-summary,
.activity.summary-activity.compact-activity .activity-response-summary,
.activity.overlap-activity .activity-response-summary{
  max-height:none!important;
  overflow:visible!important;
}


/* ===== アンケート v28：トップ画面ボタンのホバー安定化 ===== */
#pollDashboard button:hover,
#pollDashboard button:focus,
#pollDashboard button:active{
  transform:none!important;
}
#pollDashboard [data-poll-open-answer],
#pollDashboardMoreBtn{
  position:relative;
  z-index:2;
  pointer-events:auto;
  touch-action:manipulation;
}



/* v40 activity request + added activity fields */
.activity-request-modal-card{width:min(820px,94vw);max-height:90vh;overflow:auto}
.activity-check-label{display:flex;align-items:center;gap:8px;margin:8px 0;font-weight:700}
.activity-check-label input{width:auto;margin:0}
.input-suffix{display:flex;align-items:center;gap:6px}.input-suffix input{flex:1;min-width:0}.input-suffix span{white-space:nowrap}
.activity-request-card{border:1px solid #e5c9a7;border-radius:12px;padding:10px;margin:8px 0;background:#fffaf3}
.activity-request-card.pending{border-left:5px solid #c58a45}.activity-request-card.approved{border-left:5px solid #559b6b}.activity-request-card.rejected{border-left:5px solid #bf6464}
.activity-request-head{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:6px}
.activity-request-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.activity-request-grid .full{grid-column:1/-1}
.activity-request-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.activity-request-status{font-weight:800}
.activity-summary-conditions{font-size:12px;font-weight:700;color:#8a5b29;margin-top:2px}
@media(max-width:700px){.activity-request-grid{grid-template-columns:1fr}.activity-request-grid .full{grid-column:auto}}

#activityRequestModal:not(.hidden){display:flex!important;position:fixed;inset:0;z-index:12000;align-items:center;justify-content:center;background:rgba(45,30,18,.48);padding:16px;}
#activityRequestModal.hidden{display:none!important;}


/* v5: readable, opaque activity request modal */
#activityRequestModal:not(.hidden){
  display:flex!important;
  position:fixed;
  inset:0;
  z-index:12000;
  align-items:center;
  justify-content:center;
  background:rgba(28,20,14,.72)!important;
  backdrop-filter:blur(2px);
  padding:22px;
}
#activityRequestModal.hidden{display:none!important;}
.activity-request-modal-card{
  width:min(900px,96vw)!important;
  max-height:92vh;
  overflow:auto;
  background:#fffaf2!important;
  color:#3f2b1e!important;
  border:1px solid #d7b98d;
  border-radius:18px;
  box-shadow:0 24px 70px rgba(0,0,0,.42);
  padding:0!important;
  opacity:1!important;
}
.activity-request-modal-card *{opacity:1!important;}
.activity-request-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  padding:20px 22px 16px;
  background:#fff4e5;
  border-bottom:1px solid #e0c7a5;
  position:sticky;
  top:0;
  z-index:3;
}
.activity-request-modal-head .panel-title{font-size:22px;color:#3f2b1e!important;}
.activity-request-subtitle{margin-top:6px;color:#75583f;font-size:13px;line-height:1.6;}
.activity-request-close{
  width:40px;
  height:40px;
  min-width:40px;
  border-radius:50%;
  font-size:26px;
  line-height:1;
  padding:0;
  background:#fff!important;
  color:#6b4728!important;
  border:1px solid #d9b88e!important;
}
.activity-request-close:hover{background:#f8e8d5!important;}
.activity-request-tabs{
  display:flex;
  gap:8px;
  padding:14px 22px 0;
  background:#fffaf2;
}
.activity-request-tab{
  flex:1;
  border:1px solid #d8b98d!important;
  background:#fff!important;
  color:#6d4a2f!important;
  border-radius:12px 12px 0 0;
  padding:11px 14px;
  font-weight:800;
}
.activity-request-tab.active{background:#b67836!important;color:#fff!important;border-color:#b67836!important;}
.tab-count{display:inline-flex;min-width:22px;height:22px;padding:0 6px;align-items:center;justify-content:center;border-radius:999px;background:rgba(255,255,255,.9);color:#8d5b2a;margin-left:5px;font-size:12px;}
.activity-request-pane{display:none;padding:20px 22px 24px;background:#fffaf2;}
.activity-request-pane.active{display:block;}
.activity-request-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;}
.activity-request-grid label{display:flex;flex-direction:column;gap:6px;font-weight:800;color:#4b3424!important;}
.activity-request-grid .full{grid-column:1/-1;}
.activity-request-grid input,.activity-request-grid select,.activity-request-grid textarea{
  background:#fff!important;
  color:#332317!important;
  border:1px solid #d6b88f!important;
  border-radius:10px;
  padding:10px 12px;
}
.activity-request-grid textarea{min-height:130px;resize:vertical;}
.activity-check-label{flex-direction:row!important;align-items:center;gap:9px!important;}
.activity-check-label input{width:auto!important;}
.activity-request-footer{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;}
.activity-request-own-list{min-height:140px;}
.activity-request-card{background:#fff!important;color:#3d2a1d!important;box-shadow:0 3px 12px rgba(90,57,28,.08);}
#adminActivityRequestList .activity-request-card{background:#fffdf8!important;}
@media(max-width:700px){
  #activityRequestModal:not(.hidden){align-items:flex-start;padding:8px;}
  .activity-request-modal-card{width:100%!important;max-height:96vh;border-radius:14px;}
  .activity-request-grid{grid-template-columns:1fr;}
  .activity-request-grid .full{grid-column:auto;}
  .activity-request-modal-head{padding:16px;}
  .activity-request-tabs{padding:10px 14px 0;}
  .activity-request-pane{padding:16px 14px 20px;}
}


/* v6 board images */
.board-image-picker{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:8px}.board-image-note{margin-top:5px;font-size:11px}.board-image-preview{margin-top:8px;padding:7px;border:1px solid #dfc7a5;border-radius:10px;background:#fff}.board-image-preview img{display:block;max-width:100%;max-height:220px;margin:auto;border-radius:8px}.board-comment-body{min-width:0}.board-image-thumb-button{display:block;border:0!important;background:transparent!important;padding:4px 0!important;margin-top:5px;text-align:left}.board-image-thumb{display:block;max-width:180px;max-height:140px;object-fit:cover;border-radius:9px;border:1px solid #d8bea0;box-shadow:0 3px 10px rgba(55,35,20,.15);cursor:zoom-in}.board-image-viewer-modal{width:min(1000px,96vw)!important;max-height:94vh;overflow:auto;background:#211a15!important}.board-image-viewer-modal .panel-title{color:#fff}.board-image-viewer-modal img{display:block;max-width:100%;max-height:82vh;margin:12px auto 0;object-fit:contain}

/* ======================================================
   HomeOfCalmCats Premium Theme
   Phase 1 / Project Luna
   既存機能を変更せず、末尾追加だけで適用する外観テーマ
====================================================== */

:root{
  --bg:#07111f;
  --surface:#13243a;
  --surface-soft:#192d48;
  --surface-blue:#203a5c;
  --ink:#f3f7ff;
  --muted:#aebbd0;
  --line:rgba(222,190,104,.24);
  --primary:#d8b75a;
  --primary2:#f1d98d;
  --accent:#75bfff;
  --success:#6ed89b;
  --warning:#efbd63;
  --danger:#f17777;
  --shadow:0 20px 55px rgba(0,0,0,.42);
  --shadow-soft:0 12px 30px rgba(0,0,0,.28);
  --radius:20px;
  --luna-bg:#07111f;
  --luna-bg2:#0d1a2d;
  --luna-panel:#13243a;
  --luna-panel2:#192d48;
  --luna-gold:#d8b75a;
  --luna-gold-light:#f5df96;
  --luna-blue:#75bfff;
}

html{
  background:#07111f;
  scrollbar-color:#8d7334 #0b1728;
  scrollbar-width:thin;
}

body{
  color:var(--ink);
  background:
    radial-gradient(circle at 82% 6%,rgba(255,244,190,.18) 0 1%,rgba(245,223,150,.11) 2%,transparent 13%),
    radial-gradient(circle at 18% 4%,rgba(117,191,255,.12),transparent 24%),
    radial-gradient(circle at 78% 42%,rgba(78,118,181,.10),transparent 28%),
    linear-gradient(180deg,#050b15 0%,#081423 24%,#0b1728 58%,#0e1d31 100%);
  background-attachment:fixed;
  min-height:100vh;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-2;
  opacity:.62;
  background-image:
    radial-gradient(circle at 8% 11%,rgba(255,255,255,.9) 0 1px,transparent 1.5px),
    radial-gradient(circle at 24% 24%,rgba(255,255,255,.65) 0 1px,transparent 1.5px),
    radial-gradient(circle at 42% 8%,rgba(255,255,255,.75) 0 1px,transparent 1.5px),
    radial-gradient(circle at 61% 18%,rgba(255,255,255,.7) 0 1px,transparent 1.5px),
    radial-gradient(circle at 72% 30%,rgba(255,255,255,.5) 0 1px,transparent 1.5px),
    radial-gradient(circle at 91% 15%,rgba(255,255,255,.85) 0 1px,transparent 1.5px),
    radial-gradient(circle at 13% 54%,rgba(255,255,255,.45) 0 1px,transparent 1.5px),
    radial-gradient(circle at 34% 68%,rgba(255,255,255,.5) 0 1px,transparent 1.5px),
    radial-gradient(circle at 81% 70%,rgba(255,255,255,.45) 0 1px,transparent 1.5px);
  background-size:260px 220px,310px 270px,280px 240px,360px 300px,300px 260px,330px 250px,350px 320px,290px 280px,370px 330px;
}

body::after{
  content:"";
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  height:25vh;
  pointer-events:none;
  z-index:-1;
  background:
    linear-gradient(135deg,transparent 0 42%,rgba(3,8,15,.72) 43% 48%,transparent 49%) 0 100%/240px 150px repeat-x,
    linear-gradient(45deg,transparent 0 46%,rgba(3,8,15,.86) 47% 52%,transparent 53%) 80px 100%/300px 180px repeat-x,
    linear-gradient(180deg,transparent,rgba(2,7,13,.88));
  opacity:.55;
}

*{
  scrollbar-width:thin;
  scrollbar-color:#8d7334 #0b1728;
}

*::-webkit-scrollbar{width:10px;height:10px;}
*::-webkit-scrollbar-track{background:#0b1728;border-radius:999px;}
*::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#c7a64b,#80662c);
  border:2px solid #0b1728;
  border-radius:999px;
}
*::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#efd987,#a78639);}

.app{max-width:1450px;}
.app::before{
  content:"HOME OF CALM CATS  •  PREMIUM LINKSHELL PORTAL";
  color:var(--luna-gold-light);
  text-shadow:0 0 18px rgba(216,183,90,.35);
  letter-spacing:.22em;
}

.header{
  min-height:132px;
  padding:28px 30px;
  border:1px solid rgba(239,216,143,.32);
  border-radius:28px;
  background:
    linear-gradient(90deg,rgba(7,17,31,.95),rgba(20,39,65,.90) 58%,rgba(15,29,49,.84)),
    radial-gradient(circle at 80% 20%,rgba(245,223,150,.16),transparent 28%);
  box-shadow:0 24px 65px rgba(0,0,0,.46),inset 0 1px 0 rgba(255,255,255,.06);
}

.header::before{
  right:54px;
  top:20px;
  width:88px;
  height:88px;
  border-radius:50%;
  background:
    radial-gradient(circle at 35% 32%,#fffdf0 0 8%,#f4dfa0 32%,#d2ad50 66%,rgba(216,183,90,.12) 70%,transparent 73%);
  box-shadow:0 0 30px rgba(245,223,150,.34),0 0 90px rgba(245,223,150,.18);
  opacity:1;
}

.header::after{
  width:460px;
  height:190px;
  right:0;
  bottom:-82px;
  border-radius:50% 50% 0 0;
  background:
    linear-gradient(135deg,transparent 0 48%,rgba(2,7,14,.78) 49% 53%,transparent 54%) 0 100%/100px 90px repeat-x,
    linear-gradient(45deg,transparent 0 47%,rgba(2,7,14,.92) 48% 54%,transparent 55%) 30px 100%/125px 110px repeat-x;
  opacity:.72;
}

.title{
  font-size:34px;
  line-height:1.18;
  color:#f8fbff;
  letter-spacing:.035em;
  text-shadow:0 3px 18px rgba(0,0,0,.45),0 0 20px rgba(117,191,255,.14);
}
.title::before{content:"✦ ";color:var(--luna-gold-light);}
.title::after{
  content:"PREMIUM GUILD PORTAL";
  margin-top:9px;
  color:var(--luna-gold-light);
  font-size:12px;
  letter-spacing:.32em;
  text-shadow:0 0 15px rgba(216,183,90,.32);
}

.card,
.modal,
.side-menu{
  color:var(--ink);
  border:1px solid rgba(222,190,104,.22);
  background:
    linear-gradient(180deg,rgba(25,45,72,.96),rgba(16,31,51,.97)),
    radial-gradient(circle at 10% 0%,rgba(117,191,255,.10),transparent 30%);
  box-shadow:var(--shadow-soft),inset 0 1px 0 rgba(255,255,255,.045);
  backdrop-filter:blur(12px);
}

.card:hover{
  border-color:rgba(239,216,143,.32);
}

.panel-title,
.timeline-title,
.modal h2,
.side-menu-title,
.admin-item-name,
.limbus-title,
.gear-flag-title,
.version-entry-title{
  color:var(--luna-gold-light);
  text-shadow:0 0 14px rgba(216,183,90,.16);
}

.panel-title::after{
  background:linear-gradient(90deg,rgba(216,183,90,.52),rgba(117,191,255,.14),transparent);
}

.note,
label,
.login-card p,
.admin-item-sub,
.side-menu-sub,
.notice-date,
.comment-time,
.time-label,
.day-title span:last-child{
  color:var(--muted);
}

button{
  border:1px solid rgba(255,235,166,.24);
  background:linear-gradient(180deg,#f2d983 0%,#d2aa47 52%,#a47e2f 100%);
  color:#241b0d;
  box-shadow:0 10px 24px rgba(0,0,0,.33),inset 0 1px 0 rgba(255,255,255,.45);
  text-shadow:0 1px 0 rgba(255,255,255,.25);
}
button:hover{
  transform:translateY(-2px);
  filter:brightness(1.08);
  box-shadow:0 14px 30px rgba(0,0,0,.38),0 0 18px rgba(216,183,90,.16);
}
button:active{transform:translateY(0);}

button.secondary,
.day-tab,
.job-chip,
.gear-flag-chip,
.gear-mini-flag,
.gear-empy-part-btn,
.gear-table .gear-head-flag button:not(.done){
  background:linear-gradient(180deg,#294665,#1d324b);
  color:#eaf2ff;
  border:1px solid rgba(222,190,104,.20);
  box-shadow:0 8px 18px rgba(0,0,0,.20);
  text-shadow:none;
}

button.secondary:hover,
.day-tab:hover,
.job-chip:hover{
  border-color:rgba(245,223,150,.42);
  background:linear-gradient(180deg,#335777,#24405f);
}

button.danger{
  color:white;
  background:linear-gradient(180deg,#d96a6a,#9f3e49);
  border-color:rgba(255,170,170,.35);
}

input,
select,
textarea{
  color:#f5f8ff;
  background:rgba(8,21,37,.84);
  border:1px solid rgba(222,190,104,.20);
  box-shadow:inset 0 1px 5px rgba(0,0,0,.25);
}
input::placeholder,textarea::placeholder{color:#7f8fa8;}
input:focus,select:focus,textarea:focus{
  border-color:rgba(245,223,150,.62);
  box-shadow:0 0 0 4px rgba(216,183,90,.10),inset 0 1px 5px rgba(0,0,0,.22);
}
select option{background:#13243a;color:#f3f7ff;}

.login-card{
  border-color:rgba(245,223,150,.30);
  box-shadow:0 30px 80px rgba(0,0,0,.52),0 0 80px rgba(62,111,170,.10);
}
.login-card h1{color:var(--luna-gold-light);}

.notice-item{
  border-bottom-color:rgba(222,190,104,.13);
}
.notice-item:hover{
  background:rgba(117,191,255,.045);
}

.day-tab{
  color:#dce7f7;
}
.day-tab.active,
.job-chip.selected,
.new-badge,
#versionNumberBadge,
.version-mini-badge{
  color:#201708;
  border-color:rgba(255,239,184,.28);
  background:linear-gradient(180deg,#f2dc8d,#c99e3c);
  box-shadow:0 11px 24px rgba(0,0,0,.31),0 0 18px rgba(216,183,90,.13);
}

.timeline{
  border-color:rgba(222,190,104,.24);
  background:linear-gradient(180deg,#0e1e33,#0a1728);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03),0 16px 38px rgba(0,0,0,.28);
}

.day-title{
  color:var(--luna-gold-light);
  background:linear-gradient(90deg,#1d3552,#14263e);
  border-bottom-color:rgba(222,190,104,.20);
}

.time-labels{
  background:#101f33;
  border-right-color:rgba(222,190,104,.16);
}
.time-label{
  border-bottom-color:rgba(123,151,185,.12);
}
.time-label.hour{
  color:#d7e3f5;
  background:#12243a;
}
.time-label.half{color:#74879f;background:#0f1e31;}
.time-label.end{color:#d7e3f5;background:transparent;}

.lane{
  background:
    repeating-linear-gradient(to bottom,
      #0d1c2f 0,
      #0d1c2f 40px,
      rgba(117,191,255,.10) 41px,
      #0d1c2f 42px,
      #0d1c2f 81px,
      rgba(216,183,90,.16) 82px);
}

.activity{
  color:#eef5ff;
  border-color:rgba(222,190,104,.25);
  background:
    linear-gradient(135deg,rgba(38,70,105,.97),rgba(22,41,65,.98) 58%,rgba(19,35,57,.98));
  box-shadow:0 12px 28px rgba(0,0,0,.30),inset 0 1px 0 rgba(255,255,255,.045);
}
.activity::before{
  background:linear-gradient(180deg,#f2d980,#a97d2c);
  box-shadow:0 0 14px rgba(216,183,90,.34);
}
.activity:hover{
  outline:2px solid rgba(245,223,150,.22);
  box-shadow:0 16px 34px rgba(0,0,0,.35),0 0 22px rgba(117,191,255,.08);
}
.activity-top{border-bottom-color:rgba(222,190,104,.20);}
.activity-title{color:#f4f8ff;}
.activity-meta,
.activity-log-kind,
.limbus-count,
.member-pill,
.job-mini{
  color:#f0d989;
  background:rgba(216,183,90,.10);
  border-color:rgba(216,183,90,.28);
}

.badge.join{background:rgba(66,165,104,.20);color:#8ee3ad;border:1px solid rgba(110,216,155,.18);}
.badge.no{background:rgba(214,80,92,.18);color:#ff9aa3;border:1px solid rgba(241,119,119,.18);}
.badge.maybe{background:rgba(226,168,65,.18);color:#f6cd7d;border:1px solid rgba(239,189,99,.18);}
.badge.empty{background:rgba(140,158,182,.14);color:#b7c3d4;border:1px solid rgba(174,187,208,.12);}

.side-menu-overlay,
.modal-bg{
  background:rgba(1,7,14,.72);
  backdrop-filter:blur(6px);
}
.side-menu{
  border-color:rgba(245,223,150,.28);
}
.side-menu-head{border-bottom-color:rgba(222,190,104,.18);}
.side-menu-members,
.comment-compose-box,
.gear-flag-panel,
.gear-empy-part-panel,
.gear-condition-box,
.limbus-details,
.limbus-correction-panel,
.limbus-history-panel{
  color:var(--ink);
  border-color:rgba(222,190,104,.18);
  background:rgba(8,21,37,.55);
}

.admin-item,
.limbus-hit-grid div,
.limbus-hit-adjust-grid div,
.limbus-history-panel .limbus-hit-grid div{
  color:var(--ink);
  border-color:rgba(222,190,104,.16);
  background:rgba(11,27,46,.74);
}

.limbus-card{
  color:var(--ink);
  border-color:rgba(222,190,104,.22);
  box-shadow:0 14px 30px rgba(0,0,0,.25);
}
.limbus-apo{
  background:linear-gradient(145deg,rgba(26,57,88,.94),rgba(13,30,50,.96));
}
.limbus-tem{
  background:linear-gradient(145deg,rgba(58,40,74,.94),rgba(24,27,48,.96));
}
.limbus-last-value{
  color:#f0d989;
  background:rgba(8,21,37,.72);
}

.gear-scroll,
.gear-flag-matrix-scroll{
  border-color:rgba(222,190,104,.20);
  background:#0c192b;
}
.gear-table th,
.gear-flag-matrix thead th,
.gear-table caption{
  color:#f0d989;
  background:#1d3552;
  border-color:rgba(222,190,104,.18);
}
.gear-table td,
.gear-flag-matrix td{
  color:#e9f0fb;
  background:#11243a;
  border-color:rgba(222,190,104,.13);
}
.gear-table .gear-job,
.gear-flag-matrix tbody th,
.gear-table .gear-job-stage-cell{
  color:#f0d989;
  background:#152b45;
  border-color:rgba(222,190,104,.16);
}

.board-image-preview{
  background:#0b1829;
  border-color:rgba(222,190,104,.20);
}
.board-image-viewer-modal{
  background:#07111f!important;
  border-color:rgba(245,223,150,.26)!important;
}
.board-image-thumb{
  border-color:rgba(222,190,104,.28);
  box-shadow:0 6px 18px rgba(0,0,0,.32);
}

.cloud-status-corner{
  color:#f2e2ad;
  background:rgba(4,12,22,.68);
  border:1px solid rgba(222,190,104,.16);
}
.toast{
  color:#f7edcb;
  background:linear-gradient(180deg,#182c44,#0d1b2e);
  border:1px solid rgba(222,190,104,.25);
}

@media(max-width:900px){
  .header{min-height:unset;padding:20px 18px;}
  .header::before{right:22px;top:16px;width:62px;height:62px;opacity:.82;}
  .header::after{opacity:.44;}
  .title{font-size:25px;padding-right:70px;}
  .title::after{letter-spacing:.20em;font-size:10px;}
}

@media(max-width:430px){
  body{background-attachment:scroll;}
  .app::before{letter-spacing:.12em;}
  .header::before{right:13px;top:13px;width:52px;height:52px;}
  .title{font-size:21px;padding-right:55px;}
  .title::after{letter-spacing:.14em;font-size:9px;}
  .card,.modal,.side-menu{backdrop-filter:none;}
}

/* =========================================================
   Layout Renewal Phase 1
   画面の骨組みを「左メニュー / 中央 / 右情報欄」の3列へ変更。
   機能・ID・保存処理には触れず、配置のみを再構成しています。
   ========================================================= */
.dashboard-layout{
  display:grid;
  grid-template-columns:minmax(190px, 230px) minmax(0, 1fr) minmax(280px, 360px);
  gap:14px;
  align-items:start;
  padding:0 14px 18px;
}
.dashboard-center,
.dashboard-right{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.dashboard-top-row{
  display:grid;
  grid-template-columns:minmax(250px, .82fr) minmax(300px, 1.18fr);
  gap:14px;
  min-width:0;
}
.dashboard-layout > .side-menu{
  position:sticky;
  inset:auto;
  top:14px;
  z-index:5;
  display:flex;
  width:auto;
  max-width:none;
  max-height:calc(100vh - 28px);
  transform:none;
  opacity:1;
  visibility:visible;
  flex-direction:column;
  overflow:auto;
}
.dashboard-layout > .side-menu .side-menu-head{
  position:sticky;
  top:0;
  z-index:2;
}
.dashboard-layout > .side-menu #sideMenuCloseBtn{display:none;}
.dashboard-timeline-card{min-width:0;}
.dashboard-timeline-card .timeline{min-height:440px;}
.dashboard-right .card{min-width:0;}
.dashboard-right .notice-list{max-height:240px;overflow:auto;}
.dashboard-today-card,
.dashboard-notice-card{min-height:150px;}

@media (min-width:1101px){
  #sideMenu.hidden{display:flex!important;}
  #sideMenuOverlay{display:none!important;}
  #sideMenuOpenBtn{display:none!important;}
}

@media (max-width:1280px){
  .dashboard-layout{
    grid-template-columns:205px minmax(0, 1fr) 300px;
    gap:10px;
    padding-inline:10px;
  }
  .dashboard-top-row{grid-template-columns:1fr;gap:10px;}
  .dashboard-center,.dashboard-right{gap:10px;}
}

@media (max-width:1100px){
  .dashboard-layout{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(270px, 34%);
  }
  .dashboard-layout > .side-menu{
    position:fixed;
    inset:0 auto 0 0;
    z-index:1001;
    width:min(340px,88vw);
    max-height:none;
    transform:translateX(0);
  }
  .dashboard-layout > .side-menu.hidden{display:none!important;}
  .dashboard-layout > .side-menu #sideMenuCloseBtn{display:inline-flex;}
  #sideMenuOpenBtn{display:inline-flex;}
}

@media (max-width:820px){
  .dashboard-layout{display:flex;flex-direction:column;padding:0 10px 16px;}
  .dashboard-center,.dashboard-right{width:100%;}
  .dashboard-top-row{display:flex;flex-direction:column;}
  .dashboard-right{display:grid;grid-template-columns:1fr;}
  .dashboard-timeline-card .timeline{min-height:360px;}
}

/* =========================================================
   Layout Renewal Phase 2
   ヘッダーを「ブランド / 背景演出 / アカウント」の3ブロックへ再構成。
   既存のログイン表示・バージョン履歴・メニュー機能は維持します。
   ========================================================= */
.portal-header{
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:minmax(430px, 1.05fr) minmax(180px, .95fr) minmax(285px, auto);
  align-items:center;
  gap:18px;
  min-height:128px;
  margin:0 14px 14px;
  padding:18px 24px;
  overflow:hidden;
  border:1px solid rgba(225,174,75,.48);
  border-radius:0 0 18px 18px;
  background:
    radial-gradient(circle at 68% 22%, rgba(67,131,219,.25), transparent 25%),
    linear-gradient(90deg, rgba(5,14,26,.98) 0%, rgba(7,24,45,.94) 43%, rgba(8,27,51,.89) 72%, rgba(4,13,25,.97) 100%);
  box-shadow:0 14px 34px rgba(0,0,0,.28), inset 0 -1px rgba(244,195,94,.12);
}
.portal-header::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  width:auto;
  height:auto;
  opacity:.68;
  background:
    linear-gradient(180deg, transparent 0 58%, rgba(2,8,17,.72) 100%),
    radial-gradient(circle at 74% 18%, rgba(118,187,255,.30) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 34%, rgba(255,235,170,.26) 0 1px, transparent 2px),
    radial-gradient(circle at 58% 30%, rgba(143,201,255,.24) 0 1px, transparent 2px);
  background-size:auto, 92px 86px, 128px 112px, 148px 126px;
  pointer-events:none;
}
.portal-header::after{
  content:"";
  position:absolute;
  left:24px;
  right:24px;
  bottom:0;
  z-index:-1;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(242,190,78,.85) 18%, rgba(242,190,78,.25) 78%, transparent);
}
.portal-brand{
  display:flex;
  align-items:center;
  gap:18px;
  min-width:0;
}
.portal-brand-mark{
  display:grid;
  place-items:center;
  flex:0 0 66px;
  width:66px;
  height:82px;
  font-size:52px;
  line-height:1;
  color:#e9b94f;
  filter:sepia(1) saturate(.7) drop-shadow(0 3px 5px rgba(0,0,0,.42));
  transform:scaleX(-1);
}
.portal-brand-copy{min-width:0;}
.portal-brand-kicker,
.portal-brand-subtitle{
  color:#e8b953;
  font-family:Georgia, "Times New Roman", serif;
  letter-spacing:.28em;
  text-shadow:0 2px 8px rgba(0,0,0,.55);
  white-space:nowrap;
}
.portal-brand-kicker{font-size:12px;margin:0 0 5px 4px;}
.portal-brand-subtitle{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:5px;
  font-size:11px;
}
.portal-brand-subtitle::before,
.portal-brand-subtitle::after{
  content:"";
  height:1px;
  flex:1;
  background:linear-gradient(90deg, transparent, rgba(222,174,72,.65));
}
.portal-brand-subtitle::after{background:linear-gradient(90deg, rgba(222,174,72,.65), transparent);}
.portal-header .portal-brand-title{
  padding:0;
  color:#efc46a;
  font-family:Georgia, "Times New Roman", serif;
  font-size:clamp(32px,3vw,48px);
  font-weight:500;
  line-height:1;
  letter-spacing:.015em;
  white-space:nowrap;
  text-shadow:0 2px 0 #5d3613, 0 6px 16px rgba(0,0,0,.72);
}
.portal-header .portal-brand-title::before,
.portal-header .portal-brand-title::after{content:none;}
.portal-header-scene{
  position:relative;
  align-self:stretch;
  min-width:0;
}
.portal-header-scene::before{
  content:"";
  position:absolute;
  inset:auto -10px 4px -45px;
  height:54px;
  opacity:.48;
  background:
    linear-gradient(155deg, transparent 0 48%, rgba(2,8,17,.95) 49% 100%),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(1,7,15,.88) 19px 24px, transparent 25px 42px);
  clip-path:polygon(0 78%,8% 63%,13% 75%,20% 38%,26% 72%,35% 52%,43% 75%,51% 20%,58% 72%,66% 44%,72% 76%,80% 28%,86% 72%,93% 50%,100% 76%,100% 100%,0 100%);
}
.portal-header-moon{
  position:absolute;
  top:3px;
  left:48%;
  color:#d9efff;
  font-size:54px;
  line-height:1;
  text-shadow:0 0 10px #8fd1ff,0 0 24px rgba(86,165,255,.75);
  transform:rotate(-18deg);
}
.portal-account{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap:10px;
  min-width:0;
}
.portal-account-pill{
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:3px 6px 3px 4px;
  border:1px solid rgba(95,145,203,.25);
  border-radius:999px;
  background:rgba(2,11,23,.62);
  box-shadow:inset 0 1px rgba(255,255,255,.03);
}
.portal-avatar{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border:1px solid rgba(224,173,76,.65);
  border-radius:50%;
  background:linear-gradient(145deg,#17304e,#081628);
  font-size:19px;
}
.portal-header .member-pill{
  min-width:0;
  padding:0;
  overflow:hidden;
  border:0;
  background:transparent;
  color:#f5f1e6;
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.portal-header .version-button{
  min-width:48px;
  padding:7px 10px;
  border:0;
  border-left:1px solid rgba(95,145,203,.20);
  border-radius:0 999px 999px 0;
  background:transparent;
  color:#dbe6f4;
  box-shadow:none;
}
.portal-account-actions{
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:10px;
}
.portal-header-action,
.portal-header .menu-button{
  min-height:38px;
  border-color:rgba(226,174,72,.48);
  background:linear-gradient(180deg,rgba(24,37,55,.86),rgba(6,15,27,.92));
  color:#f3eee1;
}
.portal-header-action:hover,
.portal-header .menu-button:hover{
  border-color:rgba(246,202,104,.85);
  background:linear-gradient(180deg,rgba(38,55,78,.94),rgba(10,22,38,.96));
}
@media (min-width:1101px){
  .portal-header .menu-button{display:none!important;}
  .portal-account-actions{grid-template-columns:1fr 1fr;}
}
@media (max-width:1180px){
  .portal-header{
    grid-template-columns:minmax(390px,1fr) minmax(250px,auto);
    min-height:112px;
  }
  .portal-header-scene{display:none;}
  .portal-header .portal-brand-title{font-size:36px;}
}
@media (max-width:760px){
  .portal-header{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:14px;
    min-height:0;
    margin:0 10px 10px;
    padding:15px;
    border-radius:0 0 14px 14px;
  }
  .portal-brand{gap:11px;}
  .portal-brand-mark{flex-basis:48px;width:48px;height:58px;font-size:39px;}
  .portal-brand-kicker{font-size:9px;letter-spacing:.18em;}
  .portal-header .portal-brand-title{font-size:clamp(25px,8vw,35px);}
  .portal-brand-subtitle{font-size:9px;letter-spacing:.19em;}
  .portal-account{width:100%;}
}
@media (max-width:430px){
  .portal-brand-mark{display:none;}
  .portal-header .portal-brand-title{font-size:27px;padding:0;}
  .portal-account-actions{grid-template-columns:1fr 1fr auto;gap:7px;}
  .portal-header-action{padding-inline:9px;font-size:12px;}
}


/* =========================================================
   Layout Renewal Phase 3
   左サイドメニューを完成イメージに近い縦型ナビゲーションへ整理。
   既存ボタンIDと各機能は維持し、ページ内移動項目のみ追加しています。
   ========================================================= */
@media (min-width:1101px){
  .dashboard-layout{
    grid-template-columns:218px minmax(0,1fr) minmax(290px,360px);
    padding-left:8px;
  }
}
.dashboard-layout > .side-menu{
  gap:0;
  padding:0 8px 12px;
  border-color:rgba(222,168,65,.58);
  border-radius:0 14px 14px 0;
  background:
    linear-gradient(90deg,rgba(4,13,25,.98),rgba(8,25,44,.96)),
    radial-gradient(circle at 20% 8%,rgba(53,107,165,.16),transparent 32%);
  box-shadow:8px 0 28px rgba(0,0,0,.28), inset -1px 0 rgba(235,184,81,.10);
  scrollbar-width:thin;
}
.portal-side-head{
  display:grid!important;
  grid-template-columns:40px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  margin:0 -8px 7px;
  padding:13px 10px 12px!important;
  border-bottom:1px solid rgba(222,168,65,.35);
  background:linear-gradient(180deg,rgba(15,36,59,.98),rgba(6,18,33,.96));
}
.portal-side-emblem{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  color:#e9b94f;
  font-size:27px;
  filter:sepia(1) saturate(.75) drop-shadow(0 2px 3px rgba(0,0,0,.45));
  transform:scaleX(-1);
}
.portal-side-head .side-menu-title{
  overflow:hidden;
  color:#efc46a;
  font-family:Georgia,"Times New Roman",serif;
  font-size:14px;
  letter-spacing:.015em;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.portal-side-head .side-menu-sub{
  margin-top:2px;
  color:#b98c3d;
  font-size:8px;
  letter-spacing:.20em;
}
.portal-side-nav{display:flex;flex-direction:column;gap:2px;}
.dashboard-layout > .side-menu .portal-nav-item,
.dashboard-layout > .side-menu .portal-logout-item{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  align-items:center;
  gap:7px;
  min-height:43px;
  margin:0;
  padding:7px 10px;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:#f0eee8;
  font-size:13px;
  font-weight:600;
  text-align:left;
  box-shadow:none;
}
.dashboard-layout > .side-menu .portal-nav-item:hover{
  border-color:rgba(221,169,67,.45);
  background:linear-gradient(90deg,rgba(53,38,16,.78),rgba(31,34,36,.42));
  transform:translateX(2px);
}
.dashboard-layout > .side-menu .portal-nav-item.is-current{
  border-color:rgba(235,181,75,.72);
  background:
    linear-gradient(90deg,rgba(109,73,23,.88),rgba(58,39,17,.68)),
    radial-gradient(circle at 15% 50%,rgba(255,213,112,.22),transparent 45%);
  color:#fff4d2;
  box-shadow:inset 0 1px rgba(255,240,196,.12),0 0 14px rgba(214,151,43,.10);
}
.portal-nav-icon{
  display:grid;
  place-items:center;
  width:30px;
  font-size:20px;
  line-height:1;
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.4));
}
.portal-side-admin-label{
  margin:11px 7px 5px;
  padding-top:11px;
  border-top:1px solid rgba(204,164,91,.24);
  color:#d8ab51;
  font-size:10px;
  font-weight:700;
  letter-spacing:.16em;
}
.dashboard-layout > .side-menu .portal-admin-item{color:#f3dfb1;}
.portal-side-members{
  margin:10px 4px 0;
  padding:9px;
  border:1px solid rgba(103,142,184,.20);
  border-radius:8px;
  background:rgba(2,10,20,.34);
}
.portal-side-members .member-list{max-height:112px;overflow:auto;}
.dashboard-layout > .side-menu .portal-logout-item{
  margin-top:9px;
  border-color:rgba(197,102,86,.25);
  color:#efc5bd;
}
@media (max-width:1100px){
  .dashboard-layout > .side-menu{border-radius:0 14px 14px 0;}
}
@media (max-width:430px){
  .portal-side-head{grid-template-columns:36px minmax(0,1fr) auto;}
  .dashboard-layout > .side-menu .portal-nav-item,
  .dashboard-layout > .side-menu .portal-logout-item{min-height:45px;font-size:14px;}
}

/* =========================================================
   Phase 3 adjustment A
   PC版サイドメニューの内部スクロールを廃止し、ページ全体でスクロール。
   サイド見出しの猫アイコンを外し、タイトル表示幅を確保。
   ========================================================= */
@media (min-width:1101px){
  .dashboard-layout > .side-menu{
    position:relative;
    top:auto;
    align-self:start;
    max-height:none;
    overflow:visible;
    scrollbar-width:auto;
  }
  .dashboard-layout > .side-menu .side-menu-head{
    position:relative;
    top:auto;
  }
}
.portal-side-head{
  grid-template-columns:minmax(0,1fr) auto;
}
.portal-side-head .side-menu-title{
  overflow:visible;
  text-overflow:clip;
  white-space:nowrap;
  font-size:13px;
}
@media (max-width:430px){
  .portal-side-head{grid-template-columns:minmax(0,1fr) auto;}
}


/* =========================================================
   Layout Renewal Phase 4
   「本日の予定」と「お知らせ」を完成イメージに近い横並びカードへ整理。
   データ描画・保存処理・各機能IDは維持しています。
   ========================================================= */
.dashboard-top-row[data-layout-phase="4"]{
  grid-template-columns:minmax(300px,.92fr) minmax(340px,1.08fr);
  align-items:stretch;
}
.portal-summary-card{
  display:flex;
  flex-direction:column;
  min-height:210px;
  padding:0;
  overflow:hidden;
}
.portal-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:58px;
  padding:11px 14px;
  border-bottom:1px solid rgba(215,166,70,.28);
  background:linear-gradient(180deg,rgba(19,35,54,.74),rgba(7,18,31,.34));
}
.portal-card-heading{
  display:flex;
  align-items:center;
  min-width:0;
  gap:11px;
}
.portal-card-head .panel-title{
  margin:0;
  white-space:nowrap;
}
.portal-card-date{
  color:#eee8dc;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.portal-card-link{
  flex:0 0 auto;
  min-height:32px;
  padding:5px 13px;
  border-radius:999px;
  border-color:rgba(224,172,71,.58);
  background:rgba(5,14,25,.60);
  color:#f1eadc;
  font-size:11px;
}
.portal-card-body{
  flex:1;
  min-height:0;
  margin:0;
  padding:10px 13px 12px;
}
.dashboard-today-card .today-list{
  display:flex;
  flex-direction:column;
  gap:9px;
}
.dashboard-today-card .today-item{
  display:grid;
  grid-template-columns:78px minmax(0,1fr);
  align-items:stretch;
  min-height:62px;
  padding:0;
  overflow:hidden;
  border:1px solid rgba(49,118,225,.72);
  border-radius:9px;
  background:linear-gradient(105deg,rgba(8,49,116,.96),rgba(8,31,71,.92));
  box-shadow:inset 0 1px rgba(151,200,255,.12),0 6px 13px rgba(0,0,0,.16);
}
.dashboard-today-card .today-item:nth-child(even){
  border-color:rgba(139,77,231,.72);
  background:linear-gradient(105deg,rgba(52,27,120,.94),rgba(31,20,75,.92));
}
.dashboard-today-card .today-time{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px;
  border-right:1px solid rgba(255,255,255,.11);
  color:#fff;
  font-size:15px;
  font-weight:700;
  line-height:1.25;
  text-align:center;
}
.dashboard-today-card .today-main{
  display:flex;
  align-items:center;
  min-width:0;
  padding:10px 13px;
  color:#f7f4ed;
  font-size:15px;
}
.dashboard-notice-card .notice-list{
  max-height:154px;
  overflow:auto;
  scrollbar-width:thin;
}
.dashboard-notice-card .notice-item{
  grid-template-columns:58px minmax(0,1fr);
  gap:9px;
  padding:8px 2px;
  border-bottom-color:rgba(177,195,214,.13);
  line-height:1.45;
}
.dashboard-notice-card .notice-date{
  color:#ece7df;
  font-variant-numeric:tabular-nums;
}
@media (max-width:1280px){
  .dashboard-top-row[data-layout-phase="4"]{grid-template-columns:1fr;}
  .portal-summary-card{min-height:180px;}
}
@media (max-width:520px){
  .portal-card-head{align-items:flex-start;padding:10px 11px;}
  .portal-card-heading{align-items:flex-start;flex-direction:column;gap:2px;}
  .dashboard-today-card .today-item{grid-template-columns:68px minmax(0,1fr);}
  .dashboard-today-card .today-time,.dashboard-today-card .today-main{font-size:13px;}
}


/* =========================================================
   Layout Renewal Phase 5
   LS活動タイムラインを中央カラムの主役として拡張。
   既存の描画先ID・活動操作・保存処理には触れず、表示領域のみ調整。
   ========================================================= */
.dashboard-timeline-card[data-layout-phase="5"]{
  position:relative;
  min-width:0;
  padding:0;
  overflow:hidden;
  border-color:rgba(214,159,58,.54);
  background:
    linear-gradient(180deg,rgba(12,29,48,.97),rgba(3,15,28,.98)),
    radial-gradient(circle at 50% 0,rgba(42,104,171,.12),transparent 48%);
}
.dashboard-timeline-card[data-layout-phase="5"] .timeline-head{
  min-height:58px;
  margin:0;
  padding:12px 16px;
  border-bottom:1px solid rgba(215,166,70,.27);
  background:linear-gradient(180deg,rgba(20,38,58,.82),rgba(7,19,33,.45));
}
.dashboard-timeline-card[data-layout-phase="5"] .timeline-title{
  color:#f3eee4;
  font-size:18px;
  letter-spacing:.02em;
}
.dashboard-timeline-card[data-layout-phase="5"] .timeline-title::before{
  display:none;
}
.dashboard-timeline-card[data-layout-phase="5"] .timeline-head > .note{
  color:#aebdca;
  font-size:11px;
  text-align:right;
}
.dashboard-timeline-card[data-layout-phase="5"] .day-tabs{
  display:flex;
  gap:7px;
  margin:0;
  padding:10px 14px;
  overflow-x:auto;
  border-bottom:1px solid rgba(160,185,208,.16);
  background:rgba(2,11,22,.42);
  scrollbar-width:thin;
}
.dashboard-timeline-card[data-layout-phase="5"] .day-tab{
  flex:1 0 86px;
  min-width:86px;
  min-height:38px;
  padding:7px 9px;
  border:1px solid rgba(121,153,184,.30);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(20,36,55,.90),rgba(8,19,33,.90));
  color:#e6e9ed;
  box-shadow:inset 0 1px rgba(255,255,255,.04);
}
.dashboard-timeline-card[data-layout-phase="5"] .day-tab:hover{
  border-color:rgba(223,169,65,.56);
  transform:translateY(-1px);
}
.dashboard-timeline-card[data-layout-phase="5"] .day-tab.active{
  border-color:rgba(80,139,255,.90);
  background:linear-gradient(135deg,rgba(31,76,184,.96),rgba(54,43,173,.96));
  color:#fff;
  box-shadow:inset 0 1px rgba(255,255,255,.16),0 0 15px rgba(52,96,225,.22);
}
.dashboard-timeline-card[data-layout-phase="5"] .timeline{
  min-height:500px;
  margin:0;
  border:0;
  border-radius:0;
  background:rgba(3,14,26,.60);
  box-shadow:none;
}
.dashboard-timeline-card[data-layout-phase="5"] .day-title{
  background:linear-gradient(90deg,rgba(15,38,65,.96),rgba(7,24,42,.96));
  border-bottom-color:rgba(136,168,198,.22);
  color:#f0c05c;
}
.dashboard-timeline-card[data-layout-phase="5"] .time-grid{
  grid-template-columns:72px minmax(0,1fr);
}
.dashboard-timeline-card[data-layout-phase="5"] .time-labels{
  background:rgba(5,18,31,.86);
  border-right-color:rgba(140,169,196,.20);
}
.dashboard-timeline-card[data-layout-phase="5"] .time-label{
  border-bottom-color:rgba(138,165,189,.14);
  color:#d8dde3;
}
.dashboard-timeline-card[data-layout-phase="5"] .time-canvas{
  background-color:rgba(4,16,29,.72);
  background-image:linear-gradient(to bottom,rgba(143,172,198,.12) 1px,transparent 1px);
}
@media (min-width:1281px){
  .dashboard-center{gap:14px;}
  .dashboard-timeline-card[data-layout-phase="5"] .timeline{min-height:560px;}
}
@media (max-width:640px){
  .dashboard-timeline-card[data-layout-phase="5"] .timeline-head{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }
  .dashboard-timeline-card[data-layout-phase="5"] .timeline-head > .note{text-align:left;}
  .dashboard-timeline-card[data-layout-phase="5"] .time-grid{grid-template-columns:58px minmax(0,1fr);}
  .dashboard-timeline-card[data-layout-phase="5"] .timeline{min-height:420px;}
}


/* =========================================================
   Layout Renewal Phase 6
   右情報欄を「掲示板 / 更新履歴 / アンケート」の順に整理。
   見出しと操作ボタンを横並びにし、右カラム内の高さと余白を統一。
   ========================================================= */
.dashboard-right[data-layout-phase="6"]{
  gap:14px;
}
.dashboard-right[data-layout-phase="6"] .portal-right-card{
  min-width:0;
  padding:0;
  overflow:hidden;
}
.dashboard-right[data-layout-phase="6"] .portal-right-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:48px;
  padding:10px 12px;
  border-bottom:1px solid rgba(214,165,74,.28);
  background:linear-gradient(180deg,rgba(19,42,70,.74),rgba(8,25,43,.38));
}
.dashboard-right[data-layout-phase="6"] .portal-right-card-head .panel-title{
  min-width:0;
  margin:0;
  font-size:15px;
  white-space:nowrap;
}
.dashboard-right[data-layout-phase="6"] .portal-right-link{
  flex:0 0 auto;
  min-height:30px;
  padding:5px 11px;
  border-radius:999px;
  font-size:11px;
  box-shadow:none;
}
.dashboard-right[data-layout-phase="6"] .portal-right-caption{
  flex:0 0 auto;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
}
.dashboard-right[data-layout-phase="6"] .portal-right-list{
  max-height:none;
  overflow:visible;
  padding:4px 12px 8px;
}
.dashboard-right[data-layout-phase="6"] .portal-right-board .portal-right-list{
  min-height:180px;
  max-height:310px;
  overflow:auto;
}
.dashboard-right[data-layout-phase="6"] .portal-right-history .portal-right-list{
  min-height:118px;
  max-height:230px;
  overflow:auto;
}
.dashboard-right[data-layout-phase="6"] .portal-right-poll #pollDashboard{
  padding:10px 12px 12px;
}
.dashboard-right[data-layout-phase="6"] .comment-compose{
  padding:0 12px 12px;
}
.dashboard-right[data-layout-phase="6"] .comment-compose-box{
  margin-top:8px;
}
@media (max-width:1280px){
  .dashboard-right[data-layout-phase="6"]{gap:10px;}
  .dashboard-right[data-layout-phase="6"] .portal-right-board .portal-right-list{max-height:260px;}
}
@media (max-width:820px){
  .dashboard-right[data-layout-phase="6"] .portal-right-board .portal-right-list,
  .dashboard-right[data-layout-phase="6"] .portal-right-history .portal-right-list{
    max-height:none;
    overflow:visible;
  }
}


/* =========================================================
   Layout Renewal Phase 7
   タイムライン下に主要機能のショートカットを配置。
   既存ボタンを呼び出す構成のため、各機能の処理・保存先は変更しない。
   ========================================================= */
.dashboard-quick-actions[data-layout-phase="7"]{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  min-width:0;
}
.dashboard-quick-actions[data-layout-phase="7"] .portal-quick-card{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:9px;
  min-width:0;
  min-height:132px;
  padding:14px 8px 12px;
  border:1px solid rgba(215,159,57,.52);
  border-radius:11px;
  background:
    linear-gradient(180deg,rgba(18,37,58,.96),rgba(5,18,32,.98)),
    radial-gradient(circle at 50% 0,rgba(65,126,188,.14),transparent 54%);
  color:#f0ece5;
  box-shadow:inset 0 1px rgba(255,255,255,.05),0 8px 20px rgba(0,0,0,.18);
  text-align:center;
  cursor:pointer;
  transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.dashboard-quick-actions[data-layout-phase="7"] .portal-quick-card:hover{
  border-color:rgba(244,188,75,.88);
  background:
    linear-gradient(180deg,rgba(29,52,78,.98),rgba(8,24,41,.98)),
    radial-gradient(circle at 50% 0,rgba(84,151,220,.20),transparent 58%);
  box-shadow:inset 0 1px rgba(255,255,255,.08),0 10px 26px rgba(0,0,0,.24),0 0 15px rgba(210,151,45,.10);
  transform:translateY(-2px);
}
.dashboard-quick-actions[data-layout-phase="7"] .portal-quick-card:active{
  transform:translateY(0);
}
.dashboard-quick-actions[data-layout-phase="7"] .portal-quick-card:focus-visible{
  outline:2px solid rgba(94,158,255,.95);
  outline-offset:2px;
}
.dashboard-quick-actions[data-layout-phase="7"] .portal-quick-icon{
  display:grid;
  place-items:center;
  min-height:48px;
  font-size:40px;
  line-height:1;
  filter:drop-shadow(0 3px 4px rgba(0,0,0,.40));
}
.dashboard-quick-actions[data-layout-phase="7"] .portal-quick-label{
  display:block;
  width:100%;
  overflow-wrap:anywhere;
  font-size:13px;
  font-weight:800;
  line-height:1.35;
  letter-spacing:.01em;
}
@media (max-width:1500px){
  .dashboard-quick-actions[data-layout-phase="7"]{grid-template-columns:repeat(3,minmax(0,1fr));}
  .dashboard-quick-actions[data-layout-phase="7"] .portal-quick-card{min-height:108px;}
}
@media (max-width:820px){
  .dashboard-quick-actions[data-layout-phase="7"]{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  .dashboard-quick-actions[data-layout-phase="7"] .portal-quick-card{min-height:96px;padding:11px 7px;}
  .dashboard-quick-actions[data-layout-phase="7"] .portal-quick-icon{min-height:38px;font-size:31px;}
}
@media (max-width:420px){
  .dashboard-quick-actions[data-layout-phase="7"]{grid-template-columns:1fr 1fr;}
  .dashboard-quick-actions[data-layout-phase="7"] .portal-quick-label{font-size:12px;}
}

/* =========================================================
   Layout Renewal Phase 8 (Final)
   画面幅ごとの最終レスポンシブ調整と、余白・高さ・スクロール位置を統一。
   機能ID、JavaScript、Worker、D1/KV、保存形式は変更しない。
   ========================================================= */
html{
  scroll-behavior:smooth;
  scroll-padding-top:18px;
}
body{
  overflow-x:hidden;
}
#todayPanel,
#noticePanel,
#timelinePanel,
#boardPanel,
#historyPanel,
#memberPanel{
  scroll-margin-top:18px;
}
.dashboard-layout,
.dashboard-center,
.dashboard-right,
.dashboard-top-row,
.dashboard-quick-actions{
  min-width:0;
}
.dashboard-center,
.dashboard-right{
  align-content:start;
}
.dashboard-layout[data-layout-phase="3"]{
  width:100%;
  max-width:1920px;
  margin-inline:auto;
}
.dashboard-center > *,
.dashboard-right > *{
  width:100%;
  box-sizing:border-box;
}
.portal-summary-card,
.dashboard-timeline-card,
.portal-right-card,
.portal-quick-card{
  contain:layout paint;
}
.portal-card-head,
.portal-right-card-head,
.timeline-head{
  box-sizing:border-box;
}
.portal-card-heading,
.portal-card-heading .panel-title,
.portal-right-card-head .panel-title,
.timeline-title{
  min-width:0;
}
.portal-card-heading .panel-title,
.portal-right-card-head .panel-title,
.timeline-title{
  overflow-wrap:anywhere;
}

/* 大型PC: 3列をゆったり使用 */
@media (min-width:1501px){
  .dashboard-layout[data-layout-phase="3"]{
    grid-template-columns:224px minmax(0,1fr) minmax(320px,380px);
    gap:16px;
    padding:14px 16px 24px 8px;
  }
  .dashboard-center,
  .dashboard-right{gap:16px;}
  .dashboard-top-row[data-layout-phase="4"]{gap:16px;}
  .dashboard-quick-actions[data-layout-phase="7"]{
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:12px;
  }
}

/* 一般的なPC: 中央を優先しつつ右欄を確保 */
@media (min-width:1101px) and (max-width:1500px){
  .dashboard-layout[data-layout-phase="3"]{
    grid-template-columns:210px minmax(0,1fr) minmax(286px,330px);
    gap:12px;
    padding:12px 12px 22px 6px;
  }
  .dashboard-center,
  .dashboard-right{gap:12px;}
  .dashboard-top-row[data-layout-phase="4"]{gap:12px;}
  .dashboard-quick-actions[data-layout-phase="7"]{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

/* タブレット: サイドメニューは既存の開閉式、本文は1列化 */
@media (max-width:1100px){
  .dashboard-layout[data-layout-phase="3"]{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:12px;
    padding:0 12px 22px;
  }
  .dashboard-center,
  .dashboard-right{gap:12px;}
  .dashboard-right[data-layout-phase="6"]{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
  }
  .dashboard-right[data-layout-phase="6"] .portal-right-poll{
    grid-column:1 / -1;
  }
  .dashboard-right[data-layout-phase="6"] .portal-right-board .portal-right-list,
  .dashboard-right[data-layout-phase="6"] .portal-right-history .portal-right-list{
    max-height:none;
    overflow:visible;
  }
}

/* 小型タブレット・スマホ */
@media (max-width:820px){
  html{scroll-padding-top:10px;}
  #todayPanel,
  #noticePanel,
  #timelinePanel,
  #boardPanel,
  #historyPanel,
  #memberPanel{scroll-margin-top:10px;}
  .dashboard-layout[data-layout-phase="3"]{
    gap:10px;
    padding:0 10px 18px;
  }
  .dashboard-top-row[data-layout-phase="4"]{
    grid-template-columns:minmax(0,1fr);
    gap:10px;
  }
  .dashboard-center,
  .dashboard-right{gap:10px;}
  .dashboard-right[data-layout-phase="6"]{
    grid-template-columns:minmax(0,1fr);
  }
  .dashboard-right[data-layout-phase="6"] .portal-right-poll{
    grid-column:auto;
  }
  .portal-card-head,
  .dashboard-right[data-layout-phase="6"] .portal-right-card-head{
    min-height:46px;
    padding:9px 11px;
  }
  .portal-card-link,
  .portal-right-link{
    min-height:34px;
  }
  .dashboard-timeline-card[data-layout-phase="5"] .day-tabs{
    padding:8px 10px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  .dashboard-timeline-card[data-layout-phase="5"] .day-tab{
    flex-basis:80px;
    min-width:80px;
    scroll-snap-align:start;
  }
  .dashboard-quick-actions[data-layout-phase="7"]{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
  }
  .dashboard-quick-actions[data-layout-phase="7"] .portal-quick-card{
    min-height:94px;
  }
}

/* 狭いスマホ */
@media (max-width:520px){
  .dashboard-layout[data-layout-phase="3"]{
    padding-inline:8px;
  }
  .portal-card-head,
  .dashboard-right[data-layout-phase="6"] .portal-right-card-head{
    align-items:flex-start;
  }
  .portal-card-heading{
    gap:3px;
  }
  .portal-card-date,
  .portal-right-caption{
    font-size:9px;
  }
  .portal-card-link,
  .dashboard-right[data-layout-phase="6"] .portal-right-link{
    padding-inline:9px;
    font-size:10px;
  }
  .dashboard-timeline-card[data-layout-phase="5"] .timeline-head{
    padding:10px 11px;
  }
  .dashboard-timeline-card[data-layout-phase="5"] .timeline-title{
    font-size:16px;
  }
  .dashboard-timeline-card[data-layout-phase="5"] .timeline-head > .note{
    font-size:10px;
    line-height:1.45;
  }
  .dashboard-timeline-card[data-layout-phase="5"] .time-grid{
    grid-template-columns:54px minmax(0,1fr);
  }
  .dashboard-quick-actions[data-layout-phase="7"] .portal-quick-card{
    min-height:88px;
    padding:10px 6px;
  }
  .dashboard-quick-actions[data-layout-phase="7"] .portal-quick-icon{
    min-height:34px;
    font-size:28px;
  }
  .dashboard-quick-actions[data-layout-phase="7"] .portal-quick-label{
    font-size:12px;
  }
}

/* キーボード操作と動きを抑える設定 */
.portal-nav-item:focus-visible,
.portal-card-link:focus-visible,
.portal-right-link:focus-visible,
.portal-header-action:focus-visible,
.menu-button:focus-visible{
  outline:2px solid rgba(106,170,255,.95);
  outline-offset:2px;
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{
    scroll-behavior:auto!important;
    transition-duration:.01ms!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
  }
}


/* =========================================================
   Layout Phase 9: navigation cleanup and square framing
   ========================================================= */

/* ヘッダーと左メニューの外周は角丸なし */
.portal-header,
.dashboard-layout > .side-menu,
.side-menu{
  border-radius:0 !important;
}

/* 左上のLS名を中央揃え */
.portal-side-head{
  justify-content:center;
  text-align:center;
}
.portal-side-head > div{
  width:100%;
  min-width:0;
}
.portal-side-head .side-menu-title,
.portal-side-head .side-menu-sub{
  width:100%;
  text-align:center;
}

/* PCでは左メニュー常設のためハンバーガーを非表示 */
#sideMenuOpenBtn{
  display:none !important;
}

/* タブレット・スマホでは左メニュー開閉用として表示 */
@media (max-width:1100px){
  #sideMenuOpenBtn{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
  }
}

/* 削除済みショートカット欄の余白が残らないようにする */
.dashboard-center > .dashboard-timeline-card:last-child{
  margin-bottom:0;
}


/* =========================================================
   Phase 10: fixed background, header artwork and image logo
   ========================================================= */

/* サイト全体の背景素材を固定表示 */
html{
  min-height:100%;
  background:#06101f;
}
body{
  min-height:100%;
  background-color:#06101f !important;
  background-image:
    linear-gradient(rgba(2,9,20,.24),rgba(2,9,20,.40)),
    url("../assets/phase10/background-pc.webp") !important;
  background-repeat:no-repeat !important;
  background-position:center top !important;
  background-size:cover !important;
  background-attachment:fixed !important;
}

/* ヘッダー専用背景 */
.portal-header{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:138px;
  background-color:rgba(4,13,27,.90) !important;
  background-image:
    linear-gradient(90deg,rgba(3,10,22,.42),rgba(3,10,22,.06) 55%,rgba(3,10,22,.42)),
    url("../assets/phase10/header-background.webp") !important;
  background-repeat:no-repeat !important;
  background-position:center 52% !important;
  background-size:cover !important;
  box-shadow:0 8px 28px rgba(0,0,0,.42);
}
.portal-header::before{
  background:linear-gradient(180deg,rgba(3,10,22,.05),rgba(3,10,22,.34)) !important;
  opacity:1 !important;
}
.portal-header::after{
  opacity:.32 !important;
}
.portal-header-scene,
.portal-header-moon{
  display:none !important;
}

/* 文字ロゴを添付画像ロゴへ置換 */
.portal-image-brand{
  position:relative;
  z-index:2;
  width:min(49vw,590px);
  min-width:360px;
  height:122px;
  padding:0;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
.portal-main-logo{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:left center;
  filter:drop-shadow(0 4px 10px rgba(0,0,0,.72));
}
.portal-account{
  position:relative;
  z-index:3;
}

/* 左メニュー上部のロゴも中央揃え */
.portal-side-logo-head{
  position:relative;
  display:flex !important;
  align-items:center;
  justify-content:center !important;
  min-height:116px;
  padding:7px 8px !important;
  overflow:hidden;
}
.portal-side-logo{
  display:block;
  width:100%;
  max-width:205px;
  height:101px;
  object-fit:contain;
  object-position:center;
  filter:drop-shadow(0 3px 7px rgba(0,0,0,.72));
}
.portal-side-logo-head #sideMenuCloseBtn{
  position:absolute;
  top:7px;
  right:7px;
  z-index:2;
}

/* 背景を見せつつ本文の可読性を確保 */
.dashboard-layout > .side-menu,
.dashboard-center > .card,
.dashboard-center .card,
.dashboard-right > .card,
.dashboard-right .card,
.portal-summary-card,
.dashboard-timeline-card,
.portal-right-card{
  background-color:rgba(5,17,34,.84) !important;
  -webkit-backdrop-filter:blur(4px);
  backdrop-filter:blur(4px);
}
.dashboard-layout > .side-menu{
  background-image:linear-gradient(180deg,rgba(7,22,42,.93),rgba(3,13,27,.88)) !important;
}

@media (max-width:1100px){
  .portal-header{
    min-height:112px;
  }
  .portal-image-brand{
    width:min(58vw,470px);
    min-width:280px;
    height:96px;
  }
}

@media (max-width:820px){
  body{
    background-image:
      linear-gradient(rgba(2,9,20,.27),rgba(2,9,20,.44)),
      url("../assets/phase10/background-mobile.webp") !important;
    background-position:center top !important;
    background-size:cover !important;
    background-attachment:fixed !important;
  }
  .portal-header{
    min-height:98px;
    background-position:center center !important;
  }
  .portal-image-brand{
    width:min(65vw,390px);
    min-width:230px;
    height:82px;
  }
  .portal-side-logo-head{
    min-height:106px;
  }
  .portal-side-logo{
    height:92px;
  }
}

@media (max-width:520px){
  .portal-header{
    min-height:88px;
  }
  .portal-image-brand{
    width:58vw;
    min-width:182px;
    height:72px;
  }
}


/* =========================================================
   Phase 10.1: logo visibility and login logo unification
   ========================================================= */

/* 元画像の上下余白を表示領域側で切り、ロゴ本体を大きく見せる */
.portal-image-brand{
  width:min(54vw,680px) !important;
  min-width:420px !important;
  height:142px !important;
}
.portal-main-logo{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center 46% !important;
  transform:scale(1.16);
  transform-origin:left center;
}

/* 左メニューのロゴも同じ画像・同じトリミングで中央に大きく表示 */
.portal-side-logo-head{
  min-height:132px !important;
  padding:4px 6px !important;
}
.portal-side-logo{
  width:224px !important;
  max-width:calc(100% - 10px) !important;
  height:118px !important;
  object-fit:cover !important;
  object-position:center 46% !important;
  transform:scale(1.08);
}

/* ログイン画面も文字タイトルではなくPhase10ロゴ画像を使用 */
.portal-login-logo-wrap{
  width:min(100%,720px);
  height:250px;
  margin:-34px auto -22px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}
.portal-login-logo{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 46%;
  transform:scale(1.08);
  filter:drop-shadow(0 5px 13px rgba(0,0,0,.74));
}
.login-card{
  overflow:hidden;
}

@media (max-width:1100px){
  .portal-image-brand{
    width:min(59vw,560px) !important;
    min-width:330px !important;
    height:122px !important;
  }
}

@media (max-width:820px){
  .portal-image-brand{
    width:min(67vw,430px) !important;
    min-width:245px !important;
    height:100px !important;
  }
  .portal-main-logo{
    transform:scale(1.10);
  }
  .portal-side-logo-head{
    min-height:122px !important;
  }
  .portal-side-logo{
    width:214px !important;
    height:108px !important;
  }
  .portal-login-logo-wrap{
    height:210px;
    margin:-27px auto -18px;
  }
}

@media (max-width:520px){
  .portal-image-brand{
    width:61vw !important;
    min-width:196px !important;
    height:84px !important;
  }
  .portal-main-logo{
    transform:scale(1.04);
  }
  .portal-login-logo-wrap{
    height:174px;
    margin:-20px auto -12px;
  }
}

/* =========================================================
   Phase 10.2: transparent header / right-aligned account / compact side logo
   ========================================================= */

/* 背景素材をそのまま見せるため、ヘッダーの面・画像・縁・影を撤去 */
.portal-header{
  grid-template-columns:minmax(0,1fr) auto !important;
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
  border:0 !important;
  box-shadow:none !important;
  padding-left:18px !important;
  padding-right:18px !important;
}
.portal-header::before,
.portal-header::after{
  content:none !important;
  display:none !important;
}
.portal-header-scene{
  display:none !important;
}

/* アカウント表示とヘッダー内ボタンを右端へ配置 */
.portal-account{
  justify-self:end !important;
  align-self:center !important;
  width:270px;
  max-width:100%;
  margin-left:auto !important;
}
.portal-account-pill,
.portal-account-actions{
  width:100%;
}

/* 左メニュー上部の枠を、実際に見えるロゴの大きさへ合わせる */
.portal-side-logo-head{
  min-height:88px !important;
  height:88px !important;
  padding:2px 6px !important;
}
.portal-side-logo{
  width:192px !important;
  max-width:calc(100% - 12px) !important;
  height:82px !important;
  transform:scale(1.15) !important;
  transform-origin:center;
}

@media (max-width:1100px){
  .portal-header{
    grid-template-columns:minmax(0,1fr) auto !important;
  }
  .portal-account{
    width:250px;
  }
}

@media (max-width:820px){
  .portal-header{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    padding:12px 14px !important;
  }
  .portal-account{
    width:100%;
    margin-left:0 !important;
  }
  .portal-side-logo-head{
    min-height:84px !important;
    height:84px !important;
  }
  .portal-side-logo{
    width:188px !important;
    height:78px !important;
  }
}


/* =========================================================
   Phase 10.3: remove side logo / prevent main logo clipping
   ========================================================= */

/* 左メニューはロゴ枠を撤去し、ホームを最上段にする */
.portal-side-logo-head{
  display:none !important;
  min-height:0 !important;
  height:0 !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  background:none !important;
  box-shadow:none !important;
  overflow:visible !important;
}
.portal-side-logo{
  display:none !important;
}
.portal-side-nav{
  margin-top:0 !important;
  padding-top:8px !important;
}

/* メインロゴの上端を切らず、少し右へ移動 */
.portal-header{
  overflow:visible !important;
}
.portal-image-brand{
  overflow:visible !important;
  padding-top:8px !important;
  margin-left:22px !important;
}
.portal-main-logo{
  object-fit:contain !important;
  object-position:left center !important;
  transform:translate(0,6px) scale(1.08) !important;
  transform-origin:left center !important;
}

@media (max-width:820px){
  /* スマホでは閉じるボタンだけを小さく残す */
  .portal-side-logo-head{
    display:flex !important;
    justify-content:flex-end !important;
    align-items:center !important;
    height:38px !important;
    min-height:38px !important;
    padding:4px 8px 0 !important;
  }
  .portal-side-logo-head #sideMenuCloseBtn{
    position:static !important;
  }
  .portal-side-nav{
    padding-top:2px !important;
  }
  .portal-image-brand{
    margin-left:10px !important;
    padding-top:5px !important;
  }
  .portal-main-logo{
    transform:translate(0,3px) scale(1.04) !important;
  }
}

@media (max-width:520px){
  .portal-image-brand{
    margin-left:5px !important;
  }
  .portal-main-logo{
    transform:translate(0,2px) scale(1.02) !important;
  }
}

/* =========================================================
   Phase 10.3.1: restore large main logo / lower and shift right
   ========================================================= */

/* 元画像の広い透明余白をトリミング表示し、ロゴ本体を大きく戻す */
.portal-image-brand{
  width:min(58vw,730px) !important;
  min-width:520px !important;
  height:170px !important;
  margin-left:58px !important;
  padding-top:14px !important;
  overflow:hidden !important;
}
.portal-main-logo{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center 51% !important;
  transform:scale(1.14) !important;
  transform-origin:center center !important;
}

@media (max-width:1100px){
  .portal-image-brand{
    width:min(61vw,610px) !important;
    min-width:390px !important;
    height:145px !important;
    margin-left:38px !important;
    padding-top:11px !important;
  }
  .portal-main-logo{
    transform:scale(1.13) !important;
  }
}

@media (max-width:820px){
  .portal-image-brand{
    width:min(72vw,480px) !important;
    min-width:260px !important;
    height:112px !important;
    margin-left:14px !important;
    padding-top:7px !important;
  }
  .portal-main-logo{
    object-position:center 51% !important;
    transform:scale(1.10) !important;
  }
}

@media (max-width:520px){
  .portal-image-brand{
    width:68vw !important;
    min-width:215px !important;
    height:94px !important;
    margin-left:8px !important;
    padding-top:5px !important;
  }
  .portal-main-logo{
    transform:scale(1.08) !important;
  }
}

/* =========================================================
   Phase 10.3.2: large logo without top clipping
   ========================================================= */
.portal-image-brand{
  width:min(58vw,730px) !important;
  min-width:520px !important;
  height:180px !important;
  margin-left:58px !important;
  padding:8px 0 0 !important;
  overflow:visible !important;
  align-items:flex-start !important;
}
.portal-main-logo{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  object-position:left top !important;
  transform:none !important;
  transform-origin:left top !important;
}

@media (max-width:1100px){
  .portal-image-brand{
    width:min(61vw,610px) !important;
    min-width:390px !important;
    height:156px !important;
    margin-left:38px !important;
    padding-top:8px !important;
  }
}

@media (max-width:820px){
  .portal-image-brand{
    width:min(72vw,480px) !important;
    min-width:260px !important;
    height:124px !important;
    margin-left:14px !important;
    padding-top:6px !important;
  }
}

@media (max-width:520px){
  .portal-image-brand{
    width:68vw !important;
    min-width:215px !important;
    height:102px !important;
    margin-left:8px !important;
    padding-top:5px !important;
  }
}

/* =========================================================
   Phase 10.3.3: separate login/main logo sizing
   ========================================================= */
/* メイン画面：余白除去済みロゴを大きく表示 */
.portal-image-brand{
  width:min(60vw,760px) !important;
  min-width:540px !important;
  height:190px !important;
  margin-left:58px !important;
  padding-top:10px !important;
  overflow:visible !important;
}
.portal-main-logo{
  display:block !important;
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  object-position:left top !important;
  transform:none !important;
}

/* ログイン画面：カード内に収まる独立サイズへ戻す */
.portal-login-logo-wrap{
  width:min(100%,390px) !important;
  height:122px !important;
  margin:2px auto 14px !important;
  overflow:visible !important;
}
.portal-login-logo{
  display:block !important;
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  transform:none !important;
}

@media (max-width:1100px){
  .portal-image-brand{
    width:min(63vw,640px) !important;
    min-width:410px !important;
    height:166px !important;
    margin-left:38px !important;
  }
}
@media (max-width:820px){
  .portal-image-brand{
    width:min(74vw,500px) !important;
    min-width:270px !important;
    height:132px !important;
    margin-left:14px !important;
  }
  .portal-login-logo-wrap{
    width:min(100%,350px) !important;
    height:110px !important;
  }
}
@media (max-width:520px){
  .portal-image-brand{
    width:72vw !important;
    min-width:225px !important;
    height:108px !important;
    margin-left:8px !important;
  }
  .portal-login-logo-wrap{
    width:min(100%,310px) !important;
    height:96px !important;
    margin-bottom:10px !important;
  }
}

/* =========================================================
   Phase 10.4: compact transparent header + slightly larger main logo
   ========================================================= */
@media (min-width:1101px){
  .portal-header{
    min-height:214px !important;
    padding:6px 18px 4px !important;
    margin-bottom:6px !important;
    gap:12px !important;
    align-items:center !important;
  }
  .portal-image-brand{
    width:min(64vw,835px) !important;
    min-width:590px !important;
    height:205px !important;
    margin-left:78px !important;
    padding-top:4px !important;
    align-self:center !important;
  }
  .portal-main-logo{
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
    object-position:left center !important;
    transform:none !important;
  }
  .portal-account{
    align-self:center !important;
  }
}

@media (min-width:821px) and (max-width:1100px){
  .portal-header{
    min-height:178px !important;
    padding:6px 14px 4px !important;
    margin-bottom:6px !important;
    gap:10px !important;
  }
  .portal-image-brand{
    width:min(65vw,690px) !important;
    min-width:430px !important;
    height:170px !important;
    margin-left:48px !important;
    padding-top:3px !important;
  }
}


/* =========================================================
   Phase 10.5: centered logo / version-only desktop header
   ========================================================= */
.portal-whoami-hidden{
  display:none !important;
}

@media (min-width:821px){
  .portal-header{
    position:relative !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    grid-template-columns:none !important;
  }
  .portal-image-brand{
    margin-left:0 !important;
    margin-right:0 !important;
    flex:0 1 auto !important;
  }
  .portal-account{
    position:absolute !important;
    top:18px !important;
    right:22px !important;
    width:auto !important;
    max-width:calc(100% - 44px) !important;
    margin:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
  }
  .portal-version-label{
    width:auto !important;
    min-width:174px !important;
    min-height:38px !important;
    padding:8px 15px !important;
    white-space:nowrap !important;
    font-size:14px !important;
    letter-spacing:.02em !important;
  }
  .portal-header .menu-button{
    display:none !important;
  }
}

@media (max-width:820px){
  .portal-header{
    position:relative !important;
    display:block !important;
    min-height:132px !important;
    padding:48px 12px 6px !important;
  }
  .portal-image-brand{
    margin:0 auto !important;
    width:min(78vw,500px) !important;
    min-width:0 !important;
  }
  .portal-account{
    position:absolute !important;
    top:8px !important;
    right:10px !important;
    left:10px !important;
    width:auto !important;
    height:38px !important;
    margin:0 !important;
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
  }
  .portal-version-label{
    width:auto !important;
    min-width:0 !important;
    min-height:36px !important;
    padding:7px 11px !important;
    white-space:nowrap !important;
    font-size:12px !important;
  }
  .portal-header .menu-button{
    display:inline-flex !important;
    flex:0 0 40px !important;
    width:40px !important;
    height:36px !important;
    min-width:40px !important;
    padding:0 !important;
    align-items:center !important;
    justify-content:center !important;
    font-size:22px !important;
    line-height:1 !important;
  }
}

@media (max-width:420px){
  .portal-version-label{
    font-size:11px !important;
    padding-inline:8px !important;
  }
  .portal-header .menu-button{
    flex-basis:38px !important;
    width:38px !important;
    min-width:38px !important;
  }
}

/* =========================================================
   Phase 10.6: unified antique-gold portal controls
   ========================================================= */
:root{
  --portal-control-bg-top:rgba(18,43,70,.96);
  --portal-control-bg-bottom:rgba(5,21,38,.98);
  --portal-control-border:#a88338;
  --portal-control-border-soft:rgba(235,195,92,.42);
  --portal-control-text:#f7dda0;
  --portal-control-shadow:rgba(0,0,0,.46);
  --portal-control-glow:rgba(240,196,75,.22);
}

/* Right-top version plate */
.portal-header .portal-version-label{
  appearance:none !important;
  border:1px solid var(--portal-control-border) !important;
  border-radius:9px !important;
  color:var(--portal-control-text) !important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.055),transparent 42%),
    linear-gradient(180deg,var(--portal-control-bg-top),var(--portal-control-bg-bottom)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.09),
    inset 0 0 0 1px rgba(0,0,0,.34),
    0 3px 10px var(--portal-control-shadow) !important;
  text-shadow:0 1px 2px #000 !important;
  font-weight:800 !important;
  letter-spacing:.045em !important;
  cursor:pointer !important;
  transition:border-color .18s ease, box-shadow .18s ease, filter .18s ease, transform .12s ease !important;
}
.portal-header .portal-version-label::before,
.portal-header .portal-version-label::after{
  content:"";
  display:inline-block;
  width:11px;
  height:1px;
  vertical-align:middle;
  margin:0 7px;
  background:linear-gradient(90deg,transparent,#d7b553,transparent);
  opacity:.9;
}
.portal-header .portal-version-label:hover,
.portal-header .portal-version-label:focus-visible{
  border-color:#e0bd61 !important;
  filter:brightness(1.08) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 0 0 1px rgba(0,0,0,.28),
    0 0 0 1px rgba(244,206,100,.12),
    0 0 16px var(--portal-control-glow),
    0 4px 12px var(--portal-control-shadow) !important;
}
.portal-header .portal-version-label:active{
  transform:translateY(1px) !important;
  filter:brightness(.96) !important;
}
.portal-header .portal-version-label #versionNumberBadge{
  color:inherit !important;
  background:none !important;
  border:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  min-width:0 !important;
}

/* Dashboard compact action buttons */
.portal-card-link,
.portal-right-link{
  appearance:none !important;
  border:1px solid var(--portal-control-border-soft) !important;
  border-radius:8px !important;
  color:#f4d68d !important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.045),transparent 45%),
    linear-gradient(180deg,rgba(25,52,78,.96),rgba(8,27,45,.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    inset 0 0 0 1px rgba(0,0,0,.28),
    0 2px 6px rgba(0,0,0,.32) !important;
  text-shadow:0 1px 2px #000 !important;
  font-weight:750 !important;
  letter-spacing:.015em !important;
  padding:7px 13px !important;
  min-height:31px !important;
  transition:border-color .18s ease, box-shadow .18s ease, color .18s ease, filter .18s ease, transform .12s ease !important;
}
.portal-card-link:hover,
.portal-card-link:focus-visible,
.portal-right-link:hover,
.portal-right-link:focus-visible{
  color:#ffe9aa !important;
  border-color:#d9b758 !important;
  filter:brightness(1.08) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.11),
    inset 0 0 0 1px rgba(0,0,0,.24),
    0 0 12px rgba(235,190,70,.16),
    0 3px 8px rgba(0,0,0,.38) !important;
}
.portal-card-link:active,
.portal-right-link:active{
  transform:translateY(1px) !important;
  filter:brightness(.95) !important;
}

/* Mobile hamburger: same world, clearly separated from the plate */
.portal-header .menu-button{
  border:1px solid var(--portal-control-border) !important;
  border-radius:8px !important;
  color:#f5d98e !important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.05),transparent 45%),
    linear-gradient(180deg,var(--portal-control-bg-top),var(--portal-control-bg-bottom)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 0 0 1px rgba(0,0,0,.3),
    0 3px 9px rgba(0,0,0,.38) !important;
  text-shadow:0 1px 2px #000 !important;
}
.portal-header .menu-button:hover,
.portal-header .menu-button:focus-visible{
  border-color:#dfbd62 !important;
  color:#fff0ba !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.11),
    0 0 14px rgba(235,190,70,.18),
    0 3px 9px rgba(0,0,0,.4) !important;
}

@media (max-width:820px){
  .portal-header .portal-account{
    gap:10px !important;
  }
  .portal-header .portal-version-label{
    min-height:35px !important;
    padding:6px 9px !important;
    border-radius:8px !important;
    letter-spacing:.025em !important;
  }
  .portal-header .portal-version-label::before,
  .portal-header .portal-version-label::after{
    width:7px;
    margin-inline:4px;
  }
  .portal-header .menu-button{
    margin-left:2px !important;
  }
}

@media (max-width:480px){
  .portal-card-link,
  .portal-right-link{
    padding:6px 10px !important;
    min-height:29px !important;
    font-size:11px !important;
  }
  .portal-header .portal-version-label::before,
  .portal-header .portal-version-label::after{
    display:none;
  }
}

/* =========================================================
   Phase 10.7 - dashboard readability / poll theme unification
   ========================================================= */

/* 本日の予定：シンプルな1行リストへ */
.dashboard-today-card .today-list{
  gap:0;
}
.dashboard-today-card .today-item,
.dashboard-today-card .today-item:nth-child(even){
  display:flex;
  align-items:center;
  min-height:38px;
  gap:14px;
  padding:7px 10px;
  border:0;
  border-bottom:1px solid rgba(205,164,72,.20);
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
}
.dashboard-today-card .today-item:last-child{
  border-bottom:0;
}
.dashboard-today-card .today-time{
  display:block;
  flex:0 0 auto;
  min-width:92px;
  padding:0;
  border:0;
  color:#e8c76d;
  font-size:12px;
  font-weight:800;
  line-height:1.3;
  text-align:left;
  letter-spacing:.01em;
}
.dashboard-today-card .today-main{
  display:block;
  min-width:0;
  padding:0;
  color:#f3eee2;
  font-size:13px;
  font-weight:700;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dashboard-today-card .today-empty{
  padding:14px 4px;
  color:#aeb9c8;
  font-size:12px;
}

/* タイムライン：暗い活動カード上でも全文字を高コントラスト化 */
.activity.summary-activity{
  color:#f5f0e5 !important;
}
.activity.summary-activity .activity-summary-time{
  color:#ffe29a !important;
  background:rgba(255,221,135,.12) !important;
  border-color:rgba(224,183,78,.40) !important;
}
.activity.summary-activity .activity-summary-title{
  color:#ffffff !important;
  text-shadow:0 1px 2px rgba(0,0,0,.85);
}
.activity.summary-activity .activity-summary-conditions{
  color:#d8c9aa !important;
}
.activity.summary-activity .activity-summary-memo,
.activity.summary-activity.short-activity .activity-summary-memo,
.activity.summary-activity.compact-activity .activity-summary-memo,
.activity.overlap-activity .activity-summary-memo{
  color:#d8e0ea !important;
}
.activity.summary-activity .activity-response-summary,
.activity.summary-activity.short-activity .activity-response-summary,
.activity.summary-activity.compact-activity .activity-response-summary{
  color:#e9edf4 !important;
}
.activity.summary-activity .activity-response-group,
.activity.summary-activity .activity-response-group b{
  color:#eef2f7 !important;
}
.activity.summary-activity .activity-response-group.join,
.activity.summary-activity .activity-response-group.join b{color:#b9f6cf !important;}
.activity.summary-activity .activity-response-group.no,
.activity.summary-activity .activity-response-group.no b{color:#ffc0c0 !important;}
.activity.summary-activity .activity-response-group.maybe,
.activity.summary-activity .activity-response-group.maybe b{color:#ffe49a !important;}
.activity.summary-activity .activity-response-group.empty,
.activity.summary-activity .activity-response-group.empty b{color:#dce3ec !important;}

/* アンケート：白背景を廃止してサイト全体のネイビー×ゴールドへ統一 */
.poll-card-item,
.poll-result-card,
.poll-answer-item,
.poll-choice-label,
.poll-list-tab,
.poll-dashboard-free-comment{
  background:linear-gradient(180deg,rgba(19,43,70,.98),rgba(9,28,49,.98)) !important;
  border:1px solid rgba(194,151,55,.42) !important;
  box-shadow:inset 0 1px rgba(255,255,255,.04),0 5px 14px rgba(0,0,0,.18) !important;
  color:#edf2f7 !important;
}
.poll-card-title,
.poll-dashboard-question,
.poll-result-option,
.poll-answer-choice,
.poll-choice-label,
.poll-result-head{
  color:#f5ead0 !important;
}
.poll-card-meta,
.poll-dashboard-summary,
.poll-answer-comment,
.poll-anon-note,
.poll-result-count,
.poll-result-count-mini{
  color:#aebbc9 !important;
}
.poll-answer-name,
.poll-section-title,
.poll-result-percent{
  color:#e5bd59 !important;
}
.poll-result-bar,
.poll-result-card .poll-result-bar{
  background:rgba(3,16,29,.88) !important;
  border-color:rgba(194,151,55,.36) !important;
}
.poll-result-fill{
  background:linear-gradient(90deg,#b68829,#f0cf73) !important;
  box-shadow:0 0 8px rgba(228,185,76,.30);
}
.poll-list-tab{
  color:#d8c28b !important;
}
.poll-list-tab.active{
  background:linear-gradient(180deg,rgba(86,59,18,.96),rgba(48,34,12,.98)) !important;
  color:#ffe7a1 !important;
  border-color:rgba(220,176,68,.72) !important;
}
.poll-section-title::after{
  background:rgba(194,151,55,.28) !important;
}
.poll-free-count{
  background:rgba(111,76,19,.34) !important;
  border-color:rgba(211,168,68,.48) !important;
  color:#f4d475 !important;
}
.poll-status-badge{
  background:rgba(30,115,76,.32) !important;
  color:#baf4d1 !important;
  border:1px solid rgba(72,190,127,.32);
}
.poll-status-badge.closed{
  background:rgba(137,48,48,.32) !important;
  color:#ffc6c6 !important;
  border-color:rgba(218,90,90,.32);
}

@media(max-width:760px){
  .dashboard-today-card .today-item,
  .dashboard-today-card .today-item:nth-child(even){
    gap:9px;
    padding:7px 8px;
  }
  .dashboard-today-card .today-time{
    min-width:82px;
    font-size:11px;
  }
  .dashboard-today-card .today-main{
    font-size:12px;
  }
}


/* =========================================================
   Phase 10.8 - subpage/modal visual unification + board cleanup
   ========================================================= */

/* 管理画面・各種モーダルを現行ネイビー×ゴールドへ統一 */
.modal,
.admin-modal,
.admin-subpage,
.activity-request-modal,
.activity-request-pane,
.activity-request-card,
#activityRequestModal .modal,
#adminModal .modal,
#versionModal .modal,
#gearModal .modal {
  background:linear-gradient(180deg,rgba(20,46,76,.98),rgba(7,27,48,.99)) !important;
  color:#f4f7fb !important;
  border-color:rgba(208,167,67,.55) !important;
}

/* 旧デザインの白・クリーム色コンテンツ面を抑止 */
.modal .card,
.modal .form-section,
.modal .admin-section,
.modal .admin-form,
.modal .activity-request-pane,
.modal .activity-request-card,
.admin-subpage > .card,
.admin-subpage > section,
.admin-subpage .section-box,
#activityPage .activity-admin-form,
#activityPage details,
#memberPage .member-admin-form,
#versionPage .admin-item,
#versionPage .activity-admin-list .admin-item,
#commentPage .admin-item,
#historyCleanupPage .admin-item {
  background:rgba(7,27,48,.86) !important;
  color:#eef5ff !important;
  border-color:rgba(208,167,67,.34) !important;
  box-shadow:none !important;
}

.modal details,
.admin-subpage details {
  background:rgba(7,27,48,.88) !important;
  border:1px solid rgba(208,167,67,.34) !important;
  color:#eef5ff !important;
}
.modal summary,
.admin-subpage summary {
  color:#f4d477 !important;
  background:rgba(20,46,76,.92) !important;
  border-bottom-color:rgba(208,167,67,.28) !important;
}

/* ラベル・補足 */
.modal label,
.admin-subpage label,
.activity-request-modal label,
.modal .note,
.admin-subpage .note,
.modal .admin-item-sub {
  color:#c4d2e3 !important;
}
.modal .panel-title,
.admin-subpage .panel-title,
.modal h2,
.modal h3,
.modal h4 {
  color:#f5d77b !important;
}

/* 入力欄 */
.modal input:not([type="checkbox"]):not([type="radio"]),
.modal select,
.modal textarea,
.admin-subpage input:not([type="checkbox"]):not([type="radio"]),
.admin-subpage select,
.admin-subpage textarea,
.activity-request-modal input:not([type="checkbox"]):not([type="radio"]),
.activity-request-modal select,
.activity-request-modal textarea {
  background:#071b30 !important;
  color:#f5f8fc !important;
  border:1px solid rgba(208,167,67,.42) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025) !important;
}
.modal input::placeholder,
.modal textarea::placeholder,
.admin-subpage input::placeholder,
.admin-subpage textarea::placeholder {
  color:#8094ad !important;
}

/* 活動登録依頼モーダルの旧白背景 */
.activity-request-modal .activity-request-tab,
#activityRequestModal .activity-request-tab {
  background:#102c49 !important;
  color:#d9e5f2 !important;
  border-color:rgba(208,167,67,.35) !important;
}
.activity-request-modal .activity-request-tab.active,
#activityRequestModal .activity-request-tab.active {
  background:linear-gradient(180deg,#9a6b24,#6e4716) !important;
  color:#fff4c7 !important;
  border-color:#d0a743 !important;
}

/* リンバス管理の旧パステル背景を現行色へ */
.limbus-apo,
.limbus-tem,
.limbus-card,
.limbus-member-card {
  background:linear-gradient(180deg,#163655,#0b2742) !important;
  color:#f2f6fb !important;
  border-color:rgba(208,167,67,.34) !important;
}
.limbus-tem { background:linear-gradient(180deg,#352844,#191f38) !important; }
.limbus-grid select,
.limbus-grid input {
  background:#071b30 !important;
  color:#f3f7fb !important;
  border-color:rgba(208,167,67,.38) !important;
}

/* バージョン履歴 */
.version-mini-badge {
  background:linear-gradient(180deg,#d8b554,#a47721) !important;
  color:#172235 !important;
  border:1px solid #f0d77f !important;
}

/* 掲示板投稿欄：操作を整理 */
.comment-compose-box {
  background:linear-gradient(180deg,#102c49,#091f36) !important;
  border:1px solid rgba(208,167,67,.45) !important;
  border-radius:14px !important;
  padding:14px !important;
}
.comment-compose-box > label {
  display:block;
  color:#f5d77b !important;
  font-weight:800;
  margin-bottom:6px;
}
.comment-compose-box textarea {
  min-height:76px;
  background:#071b30 !important;
  color:#f5f8fc !important;
  border:1px solid rgba(208,167,67,.45) !important;
}
.board-image-picker {
  display:grid !important;
  grid-template-columns:auto auto minmax(0,1fr);
  align-items:center !important;
  gap:8px !important;
  margin-top:10px !important;
}
.board-image-picker .note {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.comment-compose-actions {
  display:flex !important;
  justify-content:flex-end !important;
  gap:8px !important;
  margin-top:12px !important;
}
#addMemberCommentBtn { order:1; }
#closeCommentComposeBtn { order:2; }
.board-image-preview {
  background:#071b30 !important;
  border-color:rgba(208,167,67,.35) !important;
}

/* 白背景が残りやすい汎用リスト・結果カードも現行色へ */
.modal .poll-card-item,
.modal .poll-answer-item,
.modal .poll-choice-label,
.modal .poll-result-card,
.admin-subpage .poll-card-item,
.admin-subpage .poll-answer-item,
.admin-subpage .poll-choice-label,
.admin-subpage .poll-result-card {
  background:#0b2742 !important;
  color:#eef5ff !important;
  border-color:rgba(208,167,67,.32) !important;
}

@media (max-width:700px){
  .board-image-picker{grid-template-columns:1fr 1fr !important;}
  .board-image-picker .note{grid-column:1 / -1;}
  .comment-compose-actions > button{flex:1 1 0;}
}

/* =========================================================
   Phase 10.9 - readability / request modal / limbus / admin buttons
   ========================================================= */

/* タイムライン活動カード：参加可否を暗背景上で明確に表示 */
.activity.summary-activity .activity-response-group{
  border:1px solid rgba(255,255,255,.14) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05) !important;
  text-shadow:none !important;
}
.activity.summary-activity .activity-response-group.join,
.activity.summary-activity .activity-response-mini.join{
  background:rgba(26,104,67,.82) !important;
  border-color:rgba(96,215,148,.48) !important;
  color:#e7fff0 !important;
}
.activity.summary-activity .activity-response-group.join b{color:#aef0c8 !important;}
.activity.summary-activity .activity-response-group.no,
.activity.summary-activity .activity-response-mini.no{
  background:rgba(123,48,52,.86) !important;
  border-color:rgba(236,114,119,.46) !important;
  color:#fff0f0 !important;
}
.activity.summary-activity .activity-response-group.no b{color:#ffc2c5 !important;}
.activity.summary-activity .activity-response-group.maybe,
.activity.summary-activity .activity-response-mini.maybe{
  background:rgba(126,88,24,.88) !important;
  border-color:rgba(232,185,77,.46) !important;
  color:#fff6d8 !important;
}
.activity.summary-activity .activity-response-group.maybe b{color:#ffe29a !important;}
.activity.summary-activity .activity-response-group.empty,
.activity.summary-activity .activity-response-mini.empty{
  background:rgba(54,69,88,.88) !important;
  border-color:rgba(151,169,193,.30) !important;
  color:#eef3f8 !important;
}

/* トップ画面アンケート：旧クリーム色を完全に排除し、文字とバーを高コントラスト化 */
#pollDashboard .poll-card-item{
  background:linear-gradient(180deg,#153452 0%,#0a253e 100%) !important;
  border:1px solid rgba(205,164,65,.52) !important;
}
#pollDashboard .poll-dashboard-question{
  color:#f5dc8b !important;
  text-shadow:0 1px 1px rgba(0,0,0,.55) !important;
}
#pollDashboard .poll-result-grid.compact .poll-result-card{
  background:rgba(6,25,43,.94) !important;
  border-color:rgba(205,164,65,.34) !important;
  box-shadow:none !important;
}
#pollDashboard .poll-result-grid.compact .poll-result-option{
  color:#edf3fa !important;
  font-weight:800 !important;
}
#pollDashboard .poll-result-grid.compact .poll-result-bar{
  background:#031522 !important;
  border-color:rgba(205,164,65,.28) !important;
}
#pollDashboard .poll-result-grid.compact .poll-result-fill{
  background:linear-gradient(90deg,#9d7226,#e0b84f) !important;
}
#pollDashboard .poll-result-grid.compact .poll-result-percent{
  color:#f0cf73 !important;
  font-weight:900 !important;
}
#pollDashboard .poll-dashboard-free-comment{
  background:#091f36 !important;
  color:#d7e2ef !important;
  border-color:rgba(205,164,65,.32) !important;
}

/* 活動登録依頼：上部も現行ネイビー×ゴールドへ統一 */
#activityRequestModal{
  background:rgba(1,10,20,.78) !important;
}
#activityRequestModal .activity-request-modal-card{
  background:linear-gradient(180deg,#153452 0%,#0a253e 100%) !important;
  color:#edf4fb !important;
  border-color:rgba(205,164,65,.55) !important;
}
#activityRequestModal .activity-request-modal-head{
  background:linear-gradient(180deg,#193b5d 0%,#102c49 100%) !important;
  border-bottom-color:rgba(205,164,65,.38) !important;
}
#activityRequestModal .activity-request-modal-head .panel-title{
  color:#f4d477 !important;
}
#activityRequestModal .activity-request-subtitle{
  color:#c2cfdd !important;
}
#activityRequestModal .activity-request-close{
  background:#102c49 !important;
  color:#f4d477 !important;
  border-color:rgba(205,164,65,.50) !important;
}
#activityRequestModal .activity-request-close:hover{
  background:#1a456f !important;
}
#activityRequestModal .activity-request-tabs,
#activityRequestModal .activity-request-pane{
  background:#0a253e !important;
}
#activityRequestModal .activity-request-tab{
  background:#12314f !important;
  color:#dce7f2 !important;
  border-color:rgba(205,164,65,.34) !important;
}
#activityRequestModal .activity-request-tab.active{
  background:linear-gradient(180deg,#76551d,#503913) !important;
  color:#fff0b7 !important;
  border-color:rgba(221,180,77,.72) !important;
}
#activityRequestModal .tab-count{
  background:rgba(5,23,39,.82) !important;
  color:#f2d374 !important;
}
#activityRequestModal .activity-request-grid label{
  color:#d4deea !important;
}
#activityRequestModal .activity-request-grid input,
#activityRequestModal .activity-request-grid select,
#activityRequestModal .activity-request-grid textarea{
  background:#061b2f !important;
  color:#f5f8fb !important;
  border-color:rgba(205,164,65,.40) !important;
}
#activityRequestModal .activity-request-card,
#adminActivityRequestList .activity-request-card{
  background:#0b2945 !important;
  color:#eef4fb !important;
}

/* リンバス箱管理：当たり/はずれ/まだ の状態色を復元 */
.limbus-grid select.limbus-hit,
.limbus-card .limbus-grid select.limbus-hit,
.limbus-member-card .limbus-grid select.limbus-hit{
  background:linear-gradient(180deg,#245d43,#174532) !important;
  color:#eafff1 !important;
  border-color:rgba(99,210,145,.58) !important;
}
.limbus-grid select.limbus-miss,
.limbus-card .limbus-grid select.limbus-miss,
.limbus-member-card .limbus-grid select.limbus-miss{
  background:linear-gradient(180deg,#6d3439,#50262b) !important;
  color:#fff0f1 !important;
  border-color:rgba(226,108,116,.58) !important;
}
.limbus-grid select.limbus-wait,
.limbus-card .limbus-grid select.limbus-wait,
.limbus-member-card .limbus-grid select.limbus-wait{
  background:linear-gradient(180deg,#183652,#102a43) !important;
  color:#dfe8f2 !important;
  border-color:rgba(140,158,183,.34) !important;
}

/* 管理者ページ：強すぎる黄色ボタンを落ち着いたアンティークゴールドへ */
#adminPage button:not(.danger):not(.secondary),
.admin-subpage button:not(.danger):not(.secondary),
#adminModal button:not(.danger):not(.secondary){
  background:linear-gradient(180deg,#8a6a2b 0%,#654b1d 100%) !important;
  color:#fff0bf !important;
  border:1px solid rgba(211,171,71,.62) !important;
  box-shadow:0 3px 10px rgba(0,0,0,.20),inset 0 1px rgba(255,255,255,.07) !important;
}
#adminPage button:not(.danger):not(.secondary):hover,
.admin-subpage button:not(.danger):not(.secondary):hover,
#adminModal button:not(.danger):not(.secondary):hover{
  background:linear-gradient(180deg,#967533 0%,#705522 100%) !important;
  filter:none !important;
}

/* =========================================================
   Phase 11.1.3 - notice detail modal readability fix
   ========================================================= */
#noticeDetailModal .notice-detail-modal{
  background:linear-gradient(180deg,rgba(20,46,76,.99),rgba(7,27,48,.995)) !important;
  color:#eef5ff !important;
  border:1px solid rgba(208,167,67,.55) !important;
  box-shadow:0 20px 60px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.03) !important;
}
#noticeDetailModal .notice-detail-head h2{
  color:#f5d77b !important;
}
#noticeDetailModal .notice-detail-head{
  border-bottom:1px solid rgba(208,167,67,.28) !important;
  padding-bottom:10px !important;
}
#noticeDetailModal #noticeDetailDate,
#noticeDetailModal .note{
  color:#aebfd3 !important;
}
#noticeDetailModal .notice-detail-title{
  color:#f7f9fc !important;
  background:rgba(24,55,88,.94) !important;
  border:1px solid rgba(208,167,67,.35) !important;
  box-shadow:none !important;
}
#noticeDetailModal .notice-detail-body{
  color:#e8f0fa !important;
  background:rgba(5,23,39,.94) !important;
  border:1px solid rgba(208,167,67,.34) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02) !important;
}
#noticeDetailModal .notice-detail-body a{
  color:#f0cc6b !important;
}
#noticeDetailModal .notice-detail-body a:hover{
  color:#ffe59a !important;
}
#noticeDetailModal #noticeDetailCloseBtn{
  background:linear-gradient(180deg,#183652,#102a43) !important;
  color:#f4f7fb !important;
  border:1px solid rgba(208,167,67,.38) !important;
}


/* Phase 11.2: activity request badge + compacted activity-log details */
.side-activity-request-status{
  display:flex;
  align-items:center;
  gap:7px;
  margin:-3px 12px 6px 48px;
  min-height:18px;
  font-size:11px;
  line-height:1.2;
  color:#d7c78d;
  letter-spacing:.02em;
}
.side-activity-request-status.hidden{display:none!important;}
.side-activity-request-status strong{color:#f2d36c;font-size:12px;}
.side-activity-request-alert{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#b9303b;
  border:1px solid #ef7c83;
  color:#fff;
  font-size:11px;
  font-weight:900;
  box-shadow:0 0 8px rgba(225,58,72,.45);
  animation:sideRequestAlertPulse 1.8s ease-in-out infinite;
}
.side-activity-request-alert.hidden{display:none!important;}
@keyframes sideRequestAlertPulse{0%,100%{transform:scale(1);box-shadow:0 0 5px rgba(225,58,72,.35)}50%{transform:scale(1.08);box-shadow:0 0 12px rgba(225,58,72,.7)}}

.activity-log-item.has-compacted-logs{position:relative;cursor:help;outline:none;}
.activity-log-compact-count{
  display:inline-block;
  margin-left:5px;
  padding:1px 5px;
  border:1px solid rgba(211,171,63,.55);
  border-radius:999px;
  color:#e9c85c;
  background:rgba(82,61,13,.38);
  font-size:10px;
  white-space:nowrap;
}
.activity-log-compact-tooltip{
  position:absolute;
  z-index:80;
  left:10px;
  right:10px;
  top:calc(100% + 5px);
  display:none;
  max-height:220px;
  overflow:auto;
  padding:9px 10px;
  border:1px solid rgba(203,163,55,.72);
  border-radius:8px;
  background:rgba(5,22,39,.98);
  color:#e9eef5;
  box-shadow:0 10px 26px rgba(0,0,0,.45),0 0 0 1px rgba(255,220,104,.05) inset;
  font-size:11px;
  line-height:1.5;
  pointer-events:none;
}
.activity-log-item.has-compacted-logs:hover .activity-log-compact-tooltip,
.activity-log-item.has-compacted-logs:focus .activity-log-compact-tooltip,
.activity-log-item.has-compacted-logs.compact-open .activity-log-compact-tooltip{display:block;}
.activity-log-compact-title{color:#e7c55e;font-weight:700;margin-bottom:5px;}
.activity-log-compact-row{padding:4px 0;border-top:1px solid rgba(180,150,75,.18);}
.activity-log-compact-row:first-of-type{border-top:0;}
@media(max-width:760px){
  .side-activity-request-status{margin-left:46px;font-size:10px;}
  .activity-log-item.has-compacted-logs{cursor:pointer;}
  .activity-log-item.has-compacted-logs:hover .activity-log-compact-tooltip:not(.compact-open *){ }
  .activity-log-compact-tooltip{left:4px;right:4px;max-height:180px;font-size:10px;}
}
\n\n/* Phase 11.2.1: request zero-count + correct compact history popup */\n.side-activity-request-status{display:flex!important;}\n.side-activity-request-status .side-activity-request-alert.hidden{display:none!important;}\n.activity-log-compact-tooltip-floating{\n  z-index:2147483000!important;\n  pointer-events:none!important;\n  max-height:210px!important;\n  overflow:auto!important;\n  padding:9px 10px!important;\n  border:1px solid rgba(203,163,55,.82)!important;\n  border-radius:8px!important;\n  background:rgba(5,22,39,.995)!important;\n  color:#e9eef5!important;\n  box-shadow:0 14px 34px rgba(0,0,0,.62),0 0 0 1px rgba(255,220,104,.07) inset!important;\n  font-size:11px!important;\n  line-height:1.5!important;\n}\n@media (hover:hover){\n  .activity-log-item.has-compacted-logs:hover > .activity-log-compact-tooltip,\n  .activity-log-item.has-compacted-logs:focus > .activity-log-compact-tooltip{display:none!important;}\n}\n

/* =========================================================
   Phase 11.3 - dashboard detail modals / compact board compose
   ========================================================= */
.dashboard-detail-viewer{
  z-index: 12000 !important;
  padding: clamp(12px, 3vw, 32px);
}
.dashboard-detail-modal{
  width: min(1120px, 94vw) !important;
  height: min(82vh, 820px);
  max-height: 88vh !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  background: linear-gradient(180deg, rgba(20,48,78,.98), rgba(5,25,44,.99)) !important;
  border: 1px solid rgba(202,160,65,.55) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.05) !important;
}
.dashboard-detail-head{
  flex: 0 0 auto;
  padding: 14px 16px !important;
  border-bottom: 1px solid rgba(202,160,65,.35);
}
.dashboard-detail-body{
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 10px 14px 16px;
}
.dashboard-detail-body > .portal-detail-expanded-source{
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 6px;
}
.dashboard-detail-body #todaySummary.portal-detail-expanded-source{
  overflow-y: auto !important;
}
body.dashboard-detail-open{
  overflow: hidden;
}

/* Board: More button in header, compact Post button under list */
.board-post-footer{
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  padding: 7px 10px 8px;
  border-top: 1px solid rgba(202,160,65,.22);
}
.board-post-open-btn{
  min-width: 74px;
  padding: 5px 13px !important;
  font-size: 12px !important;
}
.comment-compose-box{
  padding: 10px !important;
}
.board-compose-compact-row{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-top: 7px;
}
.board-compose-compact-row button{
  flex: 0 0 auto;
  min-height: 30px !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  white-space: nowrap;
}
.board-compose-file-name{
  display: block;
  margin-top: 5px;
  min-height: 0;
  font-size: 10px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comment-compose-actions{ display:none !important; }

@media (max-width: 640px){
  .dashboard-detail-viewer{ padding: 8px; }
  .dashboard-detail-modal{
    width: 97vw !important;
    height: 88vh;
    max-height: 90vh !important;
  }
  .dashboard-detail-body{ padding: 8px 9px 12px; }
  .board-compose-compact-row{
    gap: 4px;
  }
  .board-compose-compact-row button{
    padding: 4px 7px !important;
    font-size: 10px !important;
  }
}

/* Phase12.1: LS rules formatting + editor usability */
.portal-header-info-stack{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:5px;
}

.ls-rules-open-btn{
  border:1px solid rgba(232,190,79,.95)!important;
  background:linear-gradient(180deg,rgba(92,65,14,.96),rgba(39,27,8,.98))!important;
  color:#fff1b8!important;
  font-weight:800!important;
  letter-spacing:.04em;
  box-shadow:0 0 0 1px rgba(255,223,126,.18) inset,0 3px 12px rgba(0,0,0,.35),0 0 14px rgba(220,169,53,.2);
  padding:7px 13px!important;
  min-height:34px;
  border-radius:5px!important;
  white-space:nowrap;
}
.ls-rules-open-btn:hover{
  filter:brightness(1.14);
  transform:translateY(-1px);
}

/* 閲覧モーダル */
.ls-rules-view-modal{
  width:min(900px,94vw)!important;
  height:min(82vh,820px)!important;
  max-height:90vh!important;
  display:flex;
  flex-direction:column;
}
.ls-rules-content{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  white-space:pre-wrap !important;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.9;
  padding:20px 24px;
  margin-top:8px;
  background:rgba(7,18,31,.72);
  border:1px solid rgba(202,160,65,.35);
  border-radius:6px;
  color:#f3ead6;
  text-align:left;
}

/* 管理者側の編集欄を広く・縦長に */
#lsRulesPage{
  width:100%;
}
#lsRulesPage .subpage-head{
  margin-bottom:10px;
}
.ls-rules-admin-textarea{
  display:block;
  width:100%!important;
  height:62vh!important;
  min-height:480px!important;
  max-height:72vh!important;
  resize:vertical;
  box-sizing:border-box;
  line-height:1.8;
  padding:14px 16px!important;
  white-space:pre-wrap;
  overflow-wrap:normal;
  tab-size:2;
}
.ls-rules-updated-at{
  margin-top:8px;
  text-align:right;
}

@media(max-width:640px){
  .portal-header-info-stack{gap:3px}
  .ls-rules-open-btn{
    font-size:11px!important;
    padding:5px 8px!important;
    min-height:29px;
  }
  .ls-rules-view-modal{
    width:96vw!important;
    height:86vh!important;
    max-height:92vh!important;
  }
  .ls-rules-content{
    padding:14px 13px;
    font-size:13px;
    line-height:1.8;
  }
  .ls-rules-admin-textarea{
    height:58vh!important;
    min-height:400px!important;
    max-height:68vh!important;
  }
}

/* Phase12.1: LS rules formatting + editor usability */
.portal-header-info-stack{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:5px;
}
.ls-rules-open-btn{
  border:1px solid rgba(232,190,79,.95)!important;
  background:linear-gradient(180deg,rgba(92,65,14,.96),rgba(39,27,8,.98))!important;
  color:#fff1b8!important;
  font-weight:800!important;
  letter-spacing:.04em;
  box-shadow:0 0 0 1px rgba(255,223,126,.18) inset,0 3px 12px rgba(0,0,0,.35),0 0 14px rgba(220,169,53,.2);
  padding:7px 13px!important;
  min-height:34px;
  border-radius:5px!important;
  white-space:nowrap;
}
.ls-rules-open-btn:hover{filter:brightness(1.14);transform:translateY(-1px);}

.ls-rules-view-modal{
  width:min(900px,94vw)!important;
  height:min(82vh,820px)!important;
  max-height:90vh!important;
  display:flex;
  flex-direction:column;
}
.ls-rules-content{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  white-space:pre-wrap!important;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.9;
  padding:20px 24px;
  margin-top:8px;
  background:rgba(7,18,31,.72);
  border:1px solid rgba(202,160,65,.35);
  border-radius:6px;
  color:#f3ead6;
  text-align:left;
}

#lsRulesPage{width:100%;}
#lsRulesPage .subpage-head{margin-bottom:10px;}
.ls-rules-admin-textarea{
  display:block;
  width:100%!important;
  height:62vh!important;
  min-height:480px!important;
  max-height:72vh!important;
  resize:vertical;
  box-sizing:border-box;
  line-height:1.8;
  padding:14px 16px!important;
  white-space:pre-wrap;
  tab-size:2;
}
.ls-rules-updated-at{margin-top:8px;text-align:right;}

@media(max-width:640px){
  .portal-header-info-stack{gap:3px}
  .ls-rules-open-btn{font-size:11px!important;padding:5px 8px!important;min-height:29px}
  .ls-rules-view-modal{width:96vw!important;height:86vh!important;max-height:92vh!important}
  .ls-rules-content{padding:14px 13px;font-size:13px;line-height:1.8}
  .ls-rules-admin-textarea{height:58vh!important;min-height:400px!important;max-height:68vh!important}
}
