/* サイドメニュー下部のボタン配置（縦並び・統一スタイル） */
.side-nav-bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding: 16px 0 8px 0;
}
.side-nav-bottom button {
    width: 100%;
    min-width: 0;
    height: 38px;
    margin: 0;
    font-size: 1.08em;
    padding: 0;
    border-radius: 4px;
    border: none;
    background: #f5f7fa;
    color: #1976d2;
    font-weight: bold;
    box-shadow: 0 1px 4px #0001;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}
.side-nav-bottom button:hover {
    background: #e3f2fd;
    color: #0d47a1;
}
/* 時給アップ通知エフェクト */
.result-mail-anim {
  margin-bottom: 18px;
  height: 64px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  overflow: visible;
}
#wage-up-notice {
  display: none;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: linear-gradient(90deg, #fffbe0 60%, #ffe0e0 100%);
  color: #d2691e;
  font-size: 1.5em;
  font-weight: bold;
  padding: 12px 32px;
  border-radius: 32px;
  box-shadow: 0 4px 24px #f8cfa055, 0 1px 8px #d2691e22;
  z-index: 1002;
  animation: wageUpPop 1.2s cubic-bezier(.5,1.8,.5,1);
  pointer-events: none;
  text-shadow: 0 2px 8px #fff7, 0 0px 1px #fff;
}
@keyframes wageUpPop {
  0% { opacity: 0; transform: translateX(-50%) scale(0.7) translateY(30px); }
  60% { opacity: 1; transform: translateX(-50%) scale(1.15) translateY(-10px); }
  80% { opacity: 1; transform: translateX(-50%) scale(0.98) translateY(0); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}
/* 時給アップ通知エフェクト */
.result-mail-anim {
  margin-bottom: 18px;
  height: 64px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
#result-mail-svg {
  animation: mailmove 1.2s cubic-bezier(.5,1.8,.5,1) 1;
}
@keyframes mailmove {
  0% { transform: translateY(32px) scale(0.7); opacity: 0; }
  60% { transform: translateY(-8px) scale(1.1); opacity: 1; }
  80% { transform: translateY(0) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}
.result-rank {
  font-size: 3.2em;
  font-weight: bold;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
  color: #e67e22;
  text-shadow: 0 2px 8px #f5e6c3, 0 0px 1px #fff;
}
.result-time {
  font-size: 1.4em;
  color: #1976d2;
  margin-bottom: 10px;
}
.result-comment {
  font-size: 1.1em;
  color: #444;
  margin-bottom: 18px;
  min-height: 2.5em;
}
.result-share {
  margin-bottom: 18px;
}
.result-share a {
  margin: 0 8px;
  display: inline-block;
  transition: transform 0.2s;
}
.result-share a:hover {
  transform: scale(1.15);
}
#result-close-btn {
  margin-top: 8px;
  padding: 10px 32px;
  font-size: 1.1em;
  border-radius: 8px;
  background: #1976d2;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  transition: background 0.2s;
}
#result-close-btn:hover {
  background: #1251a3;
}
/* ロック中の問題リスト項目 */
#question-selector li.locked {
  opacity: 0.5;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, #f8f8f8 0 10px, #eee 10px 20px);
  color: #aaa;
}

/* 解放条件表示部 */
#unlock-conditions-row {
  font-size: 0.95em;
  margin-bottom: 0.5em;
  padding: 0.2em 0.5em;
  background: #f7f7f7;
  border-radius: 4px;
}
.unlock-cond {
  color: #1976d2;
  margin: 0 0.2em;
}
/* お題リスト部のリスト表示・詳細画面の返信ボタンのスタイル修正 */
.question-list-panel {
    margin-bottom: 20px;
}
.question-list-panel h2 {
    margin-top: 0;
    color: #34495e;
    position: sticky;
    top: -20px;
    background-color: #fff;
    padding-top: .5rem;
    padding-bottom: .5rem;
    z-index: 1;
}
.question-list-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.question-list-panel li {
    padding: .25rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
}
.question-list-panel li:last-child {
    border-bottom: none;
}
.question-list-panel li:hover {
    background-color: #e9ecef;
}
.question-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 15px;
}
.question-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #555;
    flex-shrink: 0;
}
.question-list-panel li.active {
    background-color: #e3f1fb;
    color: #2176b6;
    font-weight: bold;
}
.question-list-panel li.active .question-stats {
    color: #2176b6;
    filter: brightness(1.1);
}

.email-panel .email-body {
    flex-grow: 1;
    height: auto;
    white-space: pre-wrap;
    font-size: 1.1em;
    background: #fff;
    border: 1.5px solid #cbe6fa;
    border-radius: 8px;
    box-shadow: none;
    padding: 18px 20px;
    margin-bottom: 8px;
    color: #234;
    letter-spacing: 0.01em;
    line-height: 2;
    transition: background 0.3s, box-shadow 0.3s;
}
.email-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
    width: 100%;
}
.email-header p {
    margin: 0;
}
.action-btn {
    padding: 4px 28px;
    min-width: 90px;
    min-height: 0;
    height: 32px;
    font-size: 1em;
    border-radius: 5px;
    background-color: #2ecc71;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 1px 2px rgba(44, 62, 80, 0.04);
}
.action-btn:hover {
    background-color: #27ae60;
}

/* 件名ラベルに左バー装飾 */
.email-header .subject-label {
    display: inline-block;
    padding-left: 0.7em;
    border-left: 4px solid #bdb76b;
    font-weight: bold;
    color: #6b5e2e;
    background: none;
    letter-spacing: 0.03em;
    margin-right: 0.3em;
}

/* main.css: アプリ全体の共通レイアウト・外観 */
body {
    font-family: 'Meiryo', 'Hiragino Kaku Gothic ProN', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0 20px;
    height: 100vh;
    box-sizing: border-box;
}

h1 {
    color: #2c3e50;
    font-size: 1.6em;
    margin: 5px 0;
}


.main-wrapper {
    display: flex;
    width: 100vw;
    max-width: 100vw;
    flex-grow: 1;
    gap: 20px;
    min-height: 0;
    height: calc(100vh - 40px - 48px);
    box-sizing: border-box;
    overflow: hidden;
    padding-bottom: 40px; /* フッター分の余白を確保 */
    margin-bottom: 20px;
}

.side-nav {
    width: 120px;
    background-color: #34495e;
    color: white;
    border-radius: 8px;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.side-nav-bottom {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding-bottom: 10px;
}


.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.side-nav li {
    width: 100%;
}

.side-nav .nav-btn {
    display: block;
    width: 100%;
    padding: 15px 0;
    background-color: transparent;
    color: white;
    border: none;
    text-align: center;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.side-nav .nav-btn:hover {
    background-color: #2c3e50;
}

.side-nav .nav-btn.active {
    background-color: #2c3e50;
    font-weight: bold;
}

.left-panel {
    width: calc(50% - 120px);
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.content-area {
    flex-grow: 1;
    width: calc(50% - 120px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow-y: auto;
    padding-right: 20px;
}

.view-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-area {
    display: flex;
    justify-content: start;
    gap: 20px;
    font-size: 1.1em;
    font-weight: bold;
}
.status-area p {
    margin: 0;
    color: #2c3e50;
}

/* 参考書風・控えめ装飾 for 返信のポイントパネル */
.reply-point-panel {
    background: linear-gradient(135deg, #fafaf7 80%, #f5f5ed 100%);
    border-left: 4px solid #bdb76b;
    border-right: 1px solid #e0e0d0;
    border-top: 1px solid #e0e0d0;
    border-bottom: 1px solid #e0e0d0;
    border-radius: 6px;
    margin-top: 18px;
    margin-bottom: 12px;
    padding: 14px 18px 12px 18px;
    box-shadow: 0 2px 6px rgba(180,180,150,0.06);
    font-size: 1.02em;
    color: #444;
    position: relative;
}
.reply-point-panel h3 {
    font-size: 1.08em;
    color: #7a6c2f;
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: bold;
    letter-spacing: 0.04em;
}
.reply-point-panel::before {
    content: "\1F4D6"; /* 📖 */
    position: absolute;
    left: 10px;
    top: 10px;
    font-size: 1.1em;
    opacity: 0.18;
    pointer-events: none;
}
.reply-point-panel #reply-point-text {
    margin-left: 0.2em;
    line-height: 1.7;
    color: #555;
}

/* 履歴パネルの控えめ装飾 */
.history-panel {
    background: linear-gradient(135deg, #f8faf7 80%, #f3f3ed 100%);
    border-left: 4px solid #6bbdb7;
    border-right: 1px solid #e0e0d0;
    border-top: 1px solid #e0e0d0;
    border-bottom: 1px solid #e0e0d0;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 12px 16px 10px 16px;
    box-shadow: 0 2px 6px rgba(150,180,180,0.05);
    font-size: 1.01em;
    color: #444;
    position: relative;
}
.history-panel h3 {
    font-size: 1.02em;
    color: #2a7a6c;
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: bold;
    letter-spacing: 0.03em;
}
#history-graph {
    display: block;
    margin: 0 auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(44,62,80,0.03);
    border: 1px solid #e0e0e0;
}

/* 評価パネルの装飾 */
.rank-panel {
    background: linear-gradient(90deg, #f7fafc 80%, #f3f3ed 100%);
    border-left: 4px solid #bdb76b;
    border-radius: 6px;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 8px 14px 6px 14px;
    font-size: 0.97em;
    color: #555;
    position: relative;
    box-shadow: 0 1px 2px rgba(180,180,150,0.03);
}
.rank-panel h3 {
    font-size: 1.01em;
    color: #7a6c2f;
    margin-top: 0;
    margin-bottom: 7px;
    font-weight: bold;
    letter-spacing: 0.03em;
}
#rank-criteria-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.97em;
    letter-spacing: 0.01em;
    gap: 4px 8px;
    justify-content: flex-start;
}
#rank-panel .rank-label {
    min-width: 1.3em;
    font-size: 0.97em;
    margin-right: 0.2em;
    padding: 0 1px;
    text-align: right;
    display: inline-block;
    position: static !important;
}
#rank-criteria-row > span[id^="rank-"][id$="-cond"] {
    min-width: 2.8em;
    font-size: 0.97em;
    margin-right: 0.7em;
    padding: 0 1px;
    text-align: left;
    display: inline-block;
}
.rank-label {
    font-weight: bold;
    margin-right: 2px;
    padding: 0 2px;
}
.rank-s { color: #e67e22; }
.rank-a { color: #27ae60; }
.rank-b { color: #2980b9; }
.rank-c { color: #8e44ad; }
.rank-d { color: #c0392b; }
.rank-e { color: #888; }
