:root {
  --mail-bg: #f6f8fc;
  --mail-panel: #ffffff;
  --mail-line: #e0e4e9;
  --mail-text: #202124;
  --mail-muted: #737b86;
  --mail-blue-soft: #d3e3fd;
  --mail-blue: #245bc6;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--mail-text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    "Hiragino Sans",
    "Yu Gothic",
    YuGothic,
    Meiryo,
    sans-serif;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

/*
|--------------------------------------------------------------------------
| メール画面
|--------------------------------------------------------------------------
*/

.mail-page {
  overflow: hidden;
  background: var(--mail-bg);
}

.mail-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns:
    240px
    minmax(250px, 720px)
    1fr;
  align-items: center;
  min-height: 66px;
  padding: 8px 18px;
  background: var(--mail-bg);
}

.mail-logo-area {
  display: flex;
  align-items: center;
  gap: 13px;
}

.menu-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4f5864;
  cursor: pointer;
  font-size: 23px;
}

.menu-button:hover {
  background: #e9edf3;
}

.mail-logo {
  color: #303640;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.mail-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border-radius: 24px;
  background: #eaf1fb;
}

.mail-search-form input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #202124;
  font-size: 15px;
}

.header-account {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #365fc7;
  color: #ffffff;
  font-weight: 700;
}

.mail-layout {
  display: grid;
  grid-template-columns:
    230px
    minmax(0, 1fr);
  height: calc(100vh - 66px);
}

.mail-sidebar {
  padding: 12px;
  background: var(--mail-bg);
}

.compose-button {
  min-width: 150px;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  background: #c2e7ff;
  color: #001d35;
  cursor: pointer;
  font-weight: 700;
  box-shadow:
    0 1px 2px
    rgba(0, 0, 0, 0.08);
}

.compose-button:hover {
  box-shadow:
    0 3px 8px
    rgba(0, 0, 0, 0.15);
}

.mail-navigation {
  margin-top: 18px;
}

.navigation-item {
  display: grid;
  grid-template-columns:
    30px
    1fr
    auto;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 0 20px 20px 0;
  color: #3b4048;
  font-size: 14px;
  text-decoration: none;
}

.navigation-item:hover {
  background: #e9edf3;
}

.navigation-item.active {
  background: var(--mail-blue-soft);
  color: #001d35;
  font-weight: 700;
}

.navigation-item strong {
  font-size: 12px;
}

.mail-main {
  display: grid;
  grid-template-columns:
    minmax(320px, 42%)
    minmax(400px, 58%);
  overflow: hidden;
  margin-right: 12px;
  border-radius: 18px 18px 0 0;
  background: var(--mail-panel);
  box-shadow:
    0 1px 4px
    rgba(50, 64, 90, 0.12);
}

.mail-list-panel {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border-right: 1px solid var(--mail-line);
}

.mail-list-toolbar,
.reader-toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
  min-height: 52px;
  padding: 0 17px;
  border-bottom: 1px solid #edf0f3;
  background: #ffffff;
}

.mail-list-toolbar button,
.reader-toolbar button,
.reader-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #56606d;
  cursor: pointer;
  text-decoration: none;
}

.mail-list-toolbar button:hover,
.reader-toolbar button:hover,
.reader-back:hover {
  background: #edf0f4;
}

.mail-count {
  margin-left: auto;
  color: var(--mail-muted);
  font-size: 12px;
}

.mail-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-color:
    #c8cdd4
    transparent;
  scrollbar-width: thin;
}

.mail-list-item {
  display: grid;
  grid-template-columns:
    58px
    minmax(0, 1fr);
  min-height: 92px;
  border-bottom: 1px solid #e6e9ed;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  transition:
    background-color 0.15s,
    box-shadow 0.15s;
}

.mail-list-item:hover {
  position: relative;
  z-index: 2;
  background: #f6f8fb;
  box-shadow:
    0 2px 7px
    rgba(32, 33, 36, 0.14);
}

.mail-list-item.active {
  background: #eaf2ff;
}

.mail-select-area {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 13px;
  padding-top: 18px;
  color: #8a929d;
}

.fake-checkbox {
  width: 15px;
  height: 15px;
  border: 2px solid #9ba3ad;
  border-radius: 2px;
}

.mail-star {
  font-size: 18px;
}

.mail-list-content {
  overflow: hidden;
  padding: 13px 14px 12px 0;
}

.mail-list-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mail-sender {
  overflow: hidden;
  color: #333842;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-date {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--mail-muted);
  font-size: 11px;
}

.mail-subject {
  overflow: hidden;
  margin-top: 7px;
  color: #303640;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-preview {
  overflow: hidden;
  margin-top: 5px;
  color: var(--mail-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suspicious-mail .mail-sender {
  color: #5f6065;
}

.mail-reader-panel {
  display: flex;
  overflow: hidden;
  flex-direction: column;
}

.mail-reader {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 0 38px 50px;
}

.reader-header {
  padding: 28px 0 20px;
}

.reader-header h1 {
  margin: 0 0 25px;
  color: #25282d;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.5;
}

.reader-sender-row {
  display: grid;
  grid-template-columns:
    44px
    minmax(0, 1fr)
    auto;
  align-items: start;
  gap: 12px;
}

.sender-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #66717f;
  color: #ffffff;
  font-weight: 700;
}

.sender-information {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.sender-information strong {
  color: #30343a;
  font-size: 14px;
}

.sender-information span {
  overflow: hidden;
  color: var(--mail-muted);
  font-size: 12px;
  text-overflow: ellipsis;
}

.sender-information small {
  display: block;
  width: 100%;
  margin-top: 3px;
  color: var(--mail-muted);
}

.reader-sender-row time {
  color: var(--mail-muted);
  font-size: 12px;
}

.reader-body {
  max-width: 760px;
  padding: 25px 0;
  color: #282c32;
  font-size: 16px;
  line-height: 2;
}

.reader-body p {
  margin: 0;
}

.mail-space {
  height: 22px;
}

.danger-link-row {
  margin-top: 28px !important;
}

.danger-mail-link {
  display: inline-block;
  color: #1155cc;
  font-size: 18px;
  font-weight: 700;
  text-decoration: underline;
}

.danger-mail-link:hover {
  color: #d32626;
}

.mail-safety-actions {
  margin-top: 45px;
  padding: 20px;
  border: 1px solid #dde2e8;
  border-radius: 12px;
  background: #f7f9fb;
}

.mail-safety-actions p {
  margin-bottom: 13px;
  color: #5f6772;
  font-size: 13px;
  line-height: 1.7;
}

.safety-search-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #c8d1df;
  border-radius: 8px;
  background: #ffffff;
  color: #2455a4;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.safety-search-button:hover {
  background: #eef4ff;
}

/*
|--------------------------------------------------------------------------
| 映像・暗転
|--------------------------------------------------------------------------
*/

.effect-running {
  overflow: hidden !important;
}

.effect-stage {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.12s,
    visibility 0.12s;
}

.effect-stage.visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.effect-background {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at center,
      rgba(35, 35, 35, 0.2),
      rgba(0, 0, 0, 0.76)
    );
  backdrop-filter: blur(2px);
}

.effect-video-card {
  position: relative;
  z-index: 2;
  overflow: hidden;
  width: min(850px, 88vw);
  aspect-ratio: 16 / 9;
  border: 2px solid
    rgba(255, 255, 255, 0.5);
  background: #000000;
  box-shadow:
    0 0 30px
    rgba(255, 255, 255, 0.2),
    0 30px 90px
    rgba(0, 0, 0, 0.85);
  transform:
    scale(0.05)
    rotate(-9deg);
}

.effect-stage.visible
.effect-video-card {
  animation:
    video-pop-out
    0.52s
    cubic-bezier(
      0.15,
      1.2,
      0.3,
      1
    )
    forwards;
}

@keyframes video-pop-out {
  0% {
    opacity: 0;
    transform:
      scale(0.05)
      rotate(-9deg);
  }

  65% {
    opacity: 1;
    transform:
      scale(1.08)
      rotate(1deg);
  }

  100% {
    opacity: 1;
    transform:
      scale(1)
      rotate(0);
  }
}

.effect-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: cover;
}

.fallback-video {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle,
      #3b3b3b 0%,
      #060606 55%,
      #000000 100%
    );
}

.static-noise {
  position: absolute;
  inset: -50%;
  opacity: 0.32;
  background-image:
    repeating-radial-gradient(
      circle at 30% 20%,
      #ffffff 0,
      #ffffff 1px,
      transparent 1px,
      transparent 4px
    );
  animation:
    static-move
    0.13s
    steps(2)
    infinite;
}

@keyframes static-move {
  0% {
    transform:
      translate(0, 0)
      rotate(0);
  }

  50% {
    transform:
      translate(4%, -3%)
      rotate(1deg);
  }

  100% {
    transform:
      translate(-3%, 5%)
      rotate(-1deg);
  }
}

.fallback-face {
  position: absolute;
  top: 50%;
  left: 50%;
  color:
    rgba(255, 255, 255, 0.88);
  font-size:
    clamp(90px, 18vw, 210px);
  text-shadow:
    8px 0
    rgba(255, 0, 0, 0.25),
    -8px 0
    rgba(0, 140, 255, 0.25);
  transform:
    translate(-50%, -50%);
  animation:
    face-glitch
    0.7s
    steps(2)
    infinite;
}

@keyframes face-glitch {
  0%,
  100% {
    transform:
      translate(-50%, -50%)
      scale(1);
  }

  40% {
    transform:
      translate(-48%, -51%)
      scale(1.04);
  }

  60% {
    transform:
      translate(-52%, -49%)
      scale(0.98);
  }
}

.effect-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 28px 30px 22px;
  background:
    linear-gradient(
      transparent,
      rgba(0, 0, 0, 0.9)
    );
  color: #ffffff;
  text-align: center;
  text-shadow:
    0 2px 8px #000000;
}

.effect-caption strong {
  display: block;
  font-size:
    clamp(22px, 3vw, 38px);
}

.effect-caption span {
  display: block;
  margin-top: 7px;
  font-size:
    clamp(13px, 1.4vw, 18px);
}

.blackout-layer {
  position: absolute;
  z-index: 10;
  inset: 0;
  background: #000000;
  opacity: 0;
  pointer-events: none;
}

.effect-stage.dark
.blackout-layer {
  animation:
    sudden-blackout
    0.18s
    forwards;
}

@keyframes sudden-blackout {
  0% {
    opacity: 0;
  }

  40% {
    opacity: 0.35;
  }

  100% {
    opacity: 1;
  }
}

/*
|--------------------------------------------------------------------------
| 検索ページ
|--------------------------------------------------------------------------
*/

.search-page {
  background: #ffffff;
}

.search-page-header {
  display: flex;
  align-items: center;
  min-height: 70px;
  padding: 0 35px;
  border-bottom: 1px solid #e3e6eb;
}

.search-page-logo {
  padding: 9px 14px;
  border-radius: 7px;
  background: var(--mail-blue);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
}

.search-page-main {
  width: min(
    900px,
    calc(100% - 32px)
  );
  margin: 0 auto;
  padding: 70px 0;
}

.search-hero {
  text-align: center;
}

.search-hero h1 {
  margin: 0;
  color: #222831;
  font-size: 34px;
}

.search-hero p {
  margin: 12px 0 30px;
  color: #707985;
}

.large-search-form {
  display: grid;
  grid-template-columns:
    1fr
    110px;
  max-width: 700px;
  min-height: 55px;
  margin: 0 auto;
  border: 1px solid #c8cfd9;
  border-radius: 28px;
  background: #ffffff;
  box-shadow:
    0 5px 18px
    rgba(37, 51, 76, 0.1);
}

.large-search-form input {
  min-width: 0;
  padding: 0 22px;
  border: 0;
  border-radius: 28px 0 0 28px;
  outline: 0;
  background: transparent;
}

.large-search-form button {
  border: 0;
  border-radius: 0 28px 28px 0;
  background: var(--mail-blue);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.search-results {
  max-width: 760px;
  margin: 60px auto 0;
}

.result-count {
  color: #747d89;
  font-size: 13px;
}

.danger-result-card {
  display: grid;
  grid-template-columns:
    70px
    1fr;
  gap: 20px;
  margin-top: 18px;
  padding: 27px;
  border: 1px solid #f0c1c1;
  border-radius: 15px;
  background: #fff6f6;
}

.danger-result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #d93d3d;
  color: #ffffff;
  font-size: 30px;
}

.risk-label {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  background: #d93d3d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.danger-result-content h2 {
  margin: 14px 0 10px;
  color: #932828;
  font-size: 22px;
}

.danger-result-content > p {
  color: #5e4141;
  line-height: 1.8;
}

.result-detail {
  display: grid;
  grid-template-columns:
    125px
    1fr;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid #efcece;
  font-size: 14px;
  line-height: 1.7;
}

.open-mail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 23px;
  padding: 0 20px;
  border-radius: 8px;
  background: var(--mail-blue);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.open-mail-button:hover {
  background: #174ba9;
}

.search-advice-card {
  margin-top: 30px;
  padding: 25px;
  border: 1px solid #dde2e9;
  border-radius: 14px;
  background: #f8fafc;
}

.search-advice-card h3 {
  margin-top: 0;
}

.search-advice-card li {
  margin: 9px 0;
  color: #535c68;
  line-height: 1.7;
}

/*
|--------------------------------------------------------------------------
| レスポンシブ
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {
  .mail-header {
    grid-template-columns:
      auto
      1fr
      auto;
  }

  .mail-logo-area {
    min-width: 130px;
  }

  .mail-layout {
    grid-template-columns:
      76px
      minmax(0, 1fr);
  }

  .mail-sidebar {
    padding: 8px;
  }

  .compose-button {
    min-width: 0;
    width: 54px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .compose-button::before {
    content: "＋";
    font-size: 25px;
  }

  .navigation-item {
    display: flex;
    justify-content: center;
    padding: 0;
    border-radius: 20px;
  }

  .navigation-item span:nth-child(2),
  .navigation-item strong {
    display: none;
  }

  .mail-main {
    grid-template-columns:
      42%
      58%;
  }

  .mail-reader {
    padding-right: 23px;
    padding-left: 23px;
  }
}

@media (max-width: 680px) {
  .mail-page {
    overflow: auto;
  }

  .mail-header {
    position: sticky;
    top: 0;
    grid-template-columns:
      auto
      1fr
      auto;
    padding: 8px 10px;
  }

  .mail-logo {
    font-size: 0;
  }

  .mail-logo::after {
    content: "✉";
    font-size: 23px;
  }

  .mail-search-form {
    height: 43px;
  }

  .mail-layout {
    display: block;
    height: auto;
  }

  .mail-sidebar {
    display: none;
  }

  .mail-main {
    display: block;
    min-height:
      calc(100vh - 66px);
    margin: 0;
    border-radius: 0;
  }

  .mail-list-panel {
    height: 400px;
    border-right: 0;
    border-bottom:
      1px solid #dfe4e9;
  }

  .mail-reader-panel {
    min-height: 600px;
  }

  .mail-reader {
    overflow: visible;
    padding: 0 20px 50px;
  }

  .reader-header h1 {
    font-size: 20px;
  }

  .reader-body {
    font-size: 15px;
  }

  .effect-video-card {
    width: 94vw;
  }

  .search-page-main {
    padding-top: 40px;
  }

  .large-search-form {
    grid-template-columns:
      1fr
      90px;
  }

  .danger-result-card {
    display: block;
  }

  .danger-result-content {
    margin-top: 18px;
  }

  .result-detail {
    display: block;
  }

  .result-detail strong {
    display: block;
    margin-bottom: 4px;
  }
}
