body {
  margin: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background:
    radial-gradient(ellipse at top left, rgba(38, 166, 154, 0.12), transparent 45%),
    radial-gradient(ellipse at bottom right, rgba(121, 85, 72, 0.08), transparent 40%),
    #f4f7f6;
  color: #24302d;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  color: #1a6d5a;
  text-align: center;
}

.login-lead {
  margin: 0 0 20px;
  text-align: center;
  color: #607d8b;
  font-size: 0.92rem;
  line-height: 1.5;
}

.login-error {
  background: #ffebee;
  color: #c62828;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.login-card label {
  display: block;
  margin: 12px 0 6px;
  font-weight: bold;
  color: #1a6d5a;
}

.login-card input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1.5px solid #b2dfdb;
  border-radius: 6px;
  font-size: 1rem;
  background: #f9fdfc;
}

.login-card button {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #26a69a, #1de9b6);
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.source-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.source-tab {
  border: 1px solid #b2dfdb;
  background: #fff;
  color: #455a64;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
}

.source-tab.is-active {
  background: #26a69a;
  border-color: #26a69a;
  color: #fff;
}

.google-paste-box {
  margin-bottom: 12px;
  padding: 12px;
  background: #f7fbfa;
  border: 1px dashed #80cbc4;
  border-radius: 8px;
}

.google-paste-box label {
  display: block;
  margin: 8px 0 4px;
  font-size: 0.85rem;
  font-weight: bold;
  color: #1a6d5a;
}

.google-paste-box input,
.google-paste-box select,
.google-paste-box textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #b2dfdb;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.92rem;
  background: #fff;
  font-family: inherit;
}

.app-header h1 {
  margin: 0 0 6px;
  color: #1a6d5a;
  font-size: 1.5rem;
}

.app-header p {
  margin: 0;
  color: #546e7a;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 720px;
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.logout {
  color: #607d8b;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  padding: 8px 10px;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  background: #fff;
}

.menu-card .menu-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #26a69a, #1de9b6);
  color: #fff;
  font-weight: bold;
}

.menu-card .menu-btn-secondary {
  background: #fff;
  color: #1a6d5a;
  border: 1.5px solid #26a69a;
}

.menu-note {
  margin: 16px 0 8px;
  color: #78909c;
  font-size: 0.85rem;
  text-align: center;
}

.menu-card .logout {
  display: inline-block;
  margin-top: 12px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 16px;
  align-items: start;
}

.panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  padding: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #1a6d5a;
}

.review-list {
  max-height: 72vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-item {
  text-align: left;
  border: 1px solid #dce7e4;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  width: 100%;
}

.review-item:hover {
  border-color: #26a69a;
  background: #f3fbf9;
}

.review-item.is-selected {
  border-color: #26a69a;
  background: #e8f6f3;
  box-shadow: inset 3px 0 0 #26a69a;
}

.review-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.92rem;
}

.review-item-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8rem;
  color: #607d8b;
}

.tag {
  background: #e0f2f1;
  color: #00695c;
  border-radius: 4px;
  padding: 0 6px;
}

.tag.replied {
  background: #eceff1;
  color: #546e7a;
}

.review-item-body {
  margin-top: 6px;
  font-size: 0.86rem;
  color: #455a64;
  line-height: 1.4;
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: #78909c;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-weight: bold;
  color: #1a6d5a;
  margin-bottom: 6px;
}

.hint {
  margin: 0 0 8px;
  color: #78909c;
  font-size: 0.85rem;
}

textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #b2dfdb;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  background: #f9fdfc;
  resize: vertical;
  font-family: inherit;
}

.selected-review {
  border: 1px solid #e0e7e5;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
  background: #fbfefe;
}

.selected-head h3 {
  margin: 0 0 4px;
  color: #1a3d36;
}

.profile {
  font-weight: normal;
  color: #78909c;
  font-size: 0.9rem;
}

.meta, .menu {
  color: #607d8b;
  font-size: 0.88rem;
}

.selected-body {
  margin-top: 10px;
  line-height: 1.7;
  white-space: normal;
}

.existing-reply {
  margin-top: 12px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 0.9rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.btn-primary,
.btn-secondary {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.92rem;
}

.btn-primary {
  background: linear-gradient(90deg, #26a69a, #1de9b6);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  border: 1px solid #90a4ae;
  color: #455a64;
}

.btn-secondary.full {
  width: 100%;
  margin-top: 10px;
}

.btn-secondary.linkish {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.status {
  font-size: 0.88rem;
  color: #1a6d5a;
}

.muted { color: #90a4ae; }
.error { color: #c62828; }

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .review-list {
    max-height: 40vh;
  }
  .app-header {
    flex-direction: column;
  }
}
