/* v-template-excel-009 */

.excel-body {
  margin: 0;
  background: #eef1f4;
  color: #222;
  width: 100%;
  min-width: 100vw;
  overflow-x: hidden;
}

.excel-app {
  min-height: 100vh;
  width: 100vw;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
}

.excel-titlebar,
.excel-menubar,
.excel-toolbar,
.formula-bar,
.sheet-wrapper,
.sheet-tabs {
  width: 100vw;
  max-width: 100vw;
}

.excel-titlebar {
  height: 58px;
  background: #217346;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.excel-title-left,
.excel-title-center,
.excel-title-right {
  display: flex;
  align-items: center;
}

.excel-title-left {
  gap: 10px;
}

.excel-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #185c37;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.excel-fileinfo {
  line-height: 1.1;
}

.excel-filename {
  font-size: 14px;
  font-weight: 600;
}

.excel-filesub {
  font-size: 11px;
  opacity: 0.9;
}

.excel-search {
  width: 240px;
  max-width: 36vw;
  border: none;
  border-radius: 18px;
  padding: 8px 14px;
  outline: none;
  background: rgba(255,255,255,0.92);
}

.excel-share-btn {
  border: none;
  background: #fff;
  color: #217346;
  border-radius: 18px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}

.excel-menubar {
  height: 36px;
  background: #f8f8f8;
  border-bottom: 1px solid #d9dfe6;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  font-size: 14px;
}

.excel-menubar span:hover {
  background: #ebeff3;
  border-radius: 4px;
  padding: 2px 4px;
}

.excel-toolbar {
  min-height: 62px;
  background: #fbfbfb;
  border-bottom: 1px solid #d9dfe6;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  flex-wrap: wrap;
}

.excel-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 16px;
  border-right: 1px solid #e3e7ec;
}

.excel-toolbar-group:last-child {
  border-right: none;
}

.excel-toolbar > .excel-toolbar-group > button,
.excel-toolbar > .excel-toolbar-group > select {
  height: 32px;
  border: 1px solid #cfd6dd;
  background: #fff;
  border-radius: 4px;
  padding: 0 10px;
}

.formula-bar {
  height: 42px;
  background: #f7f8fa;
  border-bottom: 1px solid #d9dfe6;
  display: grid;
  grid-template-columns: 70px 44px 1fr;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
}

.name-box,
.fx-box,
.formula-input {
  height: 28px;
  border: 1px solid #cfd6dd;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 13px;
}

.fx-box {
  justify-content: center;
  color: #666;
}

.formula-input {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sheet-wrapper {
  flex: 1;
  overflow: auto;
  padding: 0;
  background: #fff;
}

.sheet,
.excel-sheet-wide {
  width: 100%;
  min-width: 1800px;
  display: grid;
  grid-template-columns: 56px repeat(12, minmax(120px, 1fr));
  grid-auto-rows: minmax(36px, auto);
  border-top: 1px solid #d7dde5;
  border-left: 1px solid #d7dde5;
  background: #fff;
}

.sheet-corner,
.col-head,
.row-head,
.cell {
  border-right: 1px solid #d7dde5;
  border-bottom: 1px solid #d7dde5;
}

.sheet-corner,
.col-head,
.row-head {
  background: #f3f5f7;
  color: #58636f;
  font-size: 13px;
}

.sheet-corner,
.col-head {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.row-head {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cell {
  background: #fff;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.7;
}

.cell-wide {
  min-height: 96px;
}

.excel-editor {
  min-height: 76px;
  white-space: pre-wrap;
  word-break: break-word;
}

.excel-editor:empty::before {
  content: attr(data-placeholder);
  color: #8a8a8a;
}

.label-cell {
  background: #f8fafb;
  font-weight: 600;
  color: #4a5560;
}

.action-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.excel-next-link {
  color: #217346;
  text-decoration: none;
  font-weight: 600;
}

.excel-next-link:hover {
  text-decoration: underline;
}

.history-intro-cell {
  color: #5f6b76;
  background: #fbfcfd;
}

.history-row-head {
  background: #f3f5f7;
}

.history-label-cell {
  font-weight: 600;
  color: #4a5560;
  background: #f8fafb;
}

.history-content-cell {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 56px;
  line-height: 1.9;
  padding: 12px 14px;
}

.question-history-cell {
  background: #fcfdfd;
}

.answer-history-cell {
  background: #ffffff;
}

.empty-row {
  opacity: 0.28;
}

.sheet-tabs {
  height: 42px;
  background: #f4f6f8;
  border-top: 1px solid #d9dfe6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.sheet-tab {
  min-width: 88px;
  height: 28px;
  border: 1px solid #cfd6dd;
  background: #fff;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #555;
}

.sheet-tab.active {
  border-bottom-color: #fff;
  color: #217346;
  font-weight: 600;
}

/* color palette */
.excel-toolbar .color-palette-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-right: 12px;
}

.excel-toolbar .color-palette-label {
  font-size: 12px;
  color: #5f6368;
  line-height: 1;
}

.excel-toolbar .color-palette-grid {
  display: grid;
  grid-template-columns: repeat(10, 18px);
  grid-template-rows: repeat(2, 18px);
  gap: 4px;
  align-items: center;
}

.excel-toolbar .color-swatch {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  padding: 0;
  margin: 0;
  border: 1px solid #c8ced6;
  border-radius: 50%;
  cursor: pointer;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.excel-toolbar .color-swatch:hover {
  transform: scale(1.08);
}

.excel-toolbar .color-swatch[data-value="#ffffff"] {
  border-color: #9aa0a6;
}

#font-size-select,
#font-family-select {
  margin-right: 8px;
  height: 30px;
}

/* v-template-excel-010 : font color dropdown */

.font-color-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.font-color-trigger {
  width: 36px;
  height: 32px;
  border: 1px solid #cfd6dd;
  background: #fff;
  border-radius: 4px;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}

.font-color-trigger-a {
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
  color: #222;
}

.font-color-trigger-underline {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: #222222;
  display: block;
}

.font-color-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 10px;
}

.font-color-panel[hidden] {
  display: none;
}

.font-color-panel .color-palette-grid {
  display: grid;
  grid-template-columns: repeat(10, 18px);
  grid-template-rows: repeat(2, 18px);
  gap: 4px;
  align-items: center;
}

.font-color-panel .color-swatch {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  padding: 0;
  margin: 0;
  border: 1px solid #c8ced6;
  border-radius: 4px;
  cursor: pointer;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.font-color-panel .color-swatch:hover {
  transform: scale(1.08);
}

.font-color-panel .color-swatch[data-value="#ffffff"] {
  border-color: #9aa0a6;
}

.marker-button span {
  background: linear-gradient(transparent 45%, #fff59d 45%, #fff59d 88%, transparent 88%);
  padding: 0 2px;
  border-radius: 2px;
}

.single-run-cell {
  text-align: center;
  vertical-align: middle;
}

.single-run-cell .excel-next-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 56px;
  color: #217346;
  text-decoration: none;
  font-weight: 600;
}

.single-run-cell .excel-next-link:hover {
  text-decoration: underline;
}
.format-icon-button,
.align-icon-button {
  width: 40px;
  min-width: 40px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.bold-icon-button span {
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  color: #374151;
  display: inline-block;
}

.align-icon {
  width: 18px;
  height: 14px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  vertical-align: middle;
}

.align-icon span {
  display: block;
  height: 2px;
  background: #4b5563;
  border-radius: 2px;
}

/* 左揃え */
.align-left span:nth-child(1) { width: 100%; margin-right: auto; }
.align-left span:nth-child(2) { width: 75%;  margin-right: auto; }
.align-left span:nth-child(3) { width: 90%;  margin-right: auto; }

/* 中央揃え */
.align-center span:nth-child(1) { width: 100%; margin-left: auto; margin-right: auto; }
.align-center span:nth-child(2) { width: 75%;  margin-left: auto; margin-right: auto; }
.align-center span:nth-child(3) { width: 90%;  margin-left: auto; margin-right: auto; }

/* 右揃え */
.align-right span:nth-child(1) { width: 100%; margin-left: auto; }
.align-right span:nth-child(2) { width: 75%;  margin-left: auto; }
.align-right span:nth-child(3) { width: 90%;  margin-left: auto; }