    @charset "utf-8";

    /* 全体 */
    body {
      margin: 0;
      padding: 0;
      overflow-x: hidden;
      font-family: 'Roboto', sans-serif;
      color: #5B4545;
      line-height: 1.6;
      padding-top: 58px;
    }

    /* ヘッダー */
    .header {
      background-color: #8B7355;
      height: 58px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 20px;
      letter-spacing: 0.1em;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1;

    }

    .logo {
      height: 45px;
    }

    .header nav ul {
      list-style: none;
      display: flex;
      gap: 50px;
      margin: 0;
      padding: 0;
    }

    .header nav a {
      color: white;
      text-decoration: none;
      font-size: 18px;
      font-weight: 600;
    }

    .header nav a:hover {
      color: #f2d986;
      border-bottom: 2px solid #f2d986;
      animation: all 0.3s ease;

    }

    /* MainVisual */
    .main-visual {
      background-color: #FFFACD;
      padding: 25px 0 15px;
      text-align: center;
    }

    .main-visual h1 {
      font-size: 48px;
      font-weight: 300;
      margin-bottom: 0cap;
      letter-spacing: 0.1em;
    }

    .mv-container {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 40px;
    }

    .dog-image img {
      max-width: 600px;
      height: auto;
      border-radius: 0 200px 200px 0;
      margin-left: 0;
    }

    .side-text {
      margin-left: 50px;
      margin-right: 50px;
      margin-bottom: 20px;
    }

    .mv-all img {
      max-width: 800px;
      margin-left: -10px;
      margin-top: 0px;
      margin-bottom: 10px;
    }

    .side-text img {
      max-width: 80%;
      height: auto;
    }

    /* Section-Title */
    .title {
      text-align: center;
      font-size: 30px;
      font-weight: 400;
      margin: 0 0 30px;
      position: relative;
      display: inline-block;
      left: 50%;
      transform: translateX(-50%);
      letter-spacing: 0.1em;
    }

    .title::after {
      content: '';
      display: block;
      width: 0;
      height: 4px;
      background-color: #B03060;
      margin-top: 8px;
      animation: lineExpand 6s ease-in infinite;
      animation-delay: 0.5s;
    }

    @keyframes lineExpand {

      0%,
      100% {
        width: 0;
      }

      50%,
      60% {
        width: 100%;
      }
    }

    /* Profile */
    #profile {
      background-color: #F5F5DC;
      padding: 30px 0 40px;
    }

    .profile-box {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      gap: 100px;
      align-items: center;
      padding: 0 60px;
    }

    .profile-img img {
      width: 240px;
      height: 240px;
      border-radius: 50%;
      border: 5px solid white;
      flex-shrink: 0;
    }

    .profile-text {
      flex: 1;
      max-width: 800px;
    }

    .profile-text p {
      margin-bottom: 12px;
      font-size: 16px;
    }

    /* 制作物 */
    #work {
      background-color: #ffffff;
      padding: 30px 0 40px;
    }

    .work-grid {
      max-width: 900px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 50px;
      padding: 0 10px;
    }

    .work-item {
      display: block;
      transition: translate 0.3s ease;
      position: relative;
      cursor: pointer;
    }

    .work-item:hover {
      translate: 0 -5px;
    }

    .work-item::before {
      content: '';
      z-index: -1;
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      border: 1px solid #E0E0E0;
      transform-origin: center;
      transform: scale(1);
      border-radius: 14px;
      transition: all 0.75s ease-in-out;
    }

    .work-item:hover::before {
      transform-origin: center;
      transform: scale(1.5);
      opacity: 0;
    }

    .work-item img {
      width: 100%;
      height: auto;
      display: block;
    }

    /* モーダル */
    .work-modal {
      display: none;
      position: fixed;
      z-index: 2000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.3);
      animation: fadeIn 0.3s ease;
    }

    .work-modal.show {
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .modal-container {
      position: relative;
      background-color: white;
      width: 90%;
      max-width: 1100px;
      max-height: 90vh;
      border-radius: 16px;
      overflow: auto;
      animation: slideUp 0.3s ease;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    }

    .modal-close {
      position: absolute;
      top: 20px;
      right: 30px;
      font-size: 35px;
      color: #5B4545;
      cursor: pointer;
      z-index: 10;
      transition: color 0.3s ease;
      line-height: 1;
    }

    .modal-close:hover {
      color: #B03060;
    }

    .modal-content-wrapper {
      display: flex;
      flex-wrap: wrap;
      min-height: min-content;
    }

    .modal-left {
      flex: 1;
      min-width: 400px;
      background-color: #F5F5F5;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 50px 40px;
    }

    .modal-left img {
      max-width: 100%;
      max-height: none;
      object-fit: contain;
      border-radius: 8px;
    }

    .modal-right {
      flex: 1;
      min-width: 400px;
      padding: 50px 40px;
      overflow-y: visible;
      max-height: none;
    }

    .modal-right h3 {
      font-size: 26px;
      color: #5B4545;
      margin-bottom: 20px;
      border-bottom: 3px solid #B03060;
      padding-bottom: 12px;
      font-weight: 500;
    }

    .modal-right p {
      font-size: 16px;
      line-height: 1.8;
      color: #5B4545;
      margin-bottom: 20px;
    }

    .work-info {
      margin-top: 30px;
      padding: 25px;
      background-color: #F5F5DC;
      border-radius: 12px;
      border: 1px solid #E0E0E0;
    }

    .work-info p {
      margin-bottom: 12px;
      font-size: 15px;
      line-height: 1.6;
    }

    .work-info strong {
      color: #5B4545;
      font-weight: 600;
    }

    /* アニメーション */
    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(40px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* スキル */
    #skill {
      background-color: #F5F5DC;
      padding: 40px 0 60px;
      margin-bottom: 480px;
    }

    #skill::after {
      content: "";
      position: fixed;
      left: 0;
      right: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-image: url(../images/sunset.jpeg);
      background-repeat: no-repeat;
      background-position: center center;
      background-size: cover;
      z-index: -1;
    }

    .skill-grid {
      max-width: 1000px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 30px;
      padding: 0 40px;
    }

    .skill-grid img {
      width: 100%;
      height: auto;
      display: block;
    }

    /* お問い合わせ */
    #contact {
      background-color: #fff;
      padding: 40px 0 60px;
    }

    .contact-container {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      gap: 40px;
      padding: 0 40px;
    }

    /* 左：フォーム */
    .contact-left {
      flex: 1;
      background: white;
      padding: 30px;
      border-radius: 16px;
      box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.15);
      border: 1px solid #E0E0E0;
    }

    .contact-left h3 {
      text-align: center;
      font-size: 18px;
      margin-bottom: 25px;
    }

    .contact-left form label {
      display: block;
      font-size: 16px;
      margin-bottom: 8px;
      margin-top: 15px;
    }

    .required {
      color: red;
    }

    .contact-left input,
    .contact-left textarea {
      width: 100%;
      padding: 12px;
      border: 1px solid #F5A5A5;
      border-radius: 8px;
      background: #F9F9F9;
      font-size: 16px;
      box-sizing: border-box;
    }

    .contact-left input::placeholder,
    .contact-left textarea::placeholder {
      color: #B0B0B0;
      opacity: 1;
    }

    .contact-left textarea {
      height: 120px;
      resize: vertical;
    }

    .contact-left button {
      width: 50%;
      padding: 9px;
      background: #F37373;
      color: white;
      border: none;
      border-radius: 8px;
      font-size: 18px;
      margin-top: 20px;
      display: block;
      margin-left: auto;
      margin-right: auto;
      text-align: center;
    }

    .contact-left button:hover {
      background: #E25D5D;
      transition: all 0.3s ease;
      transform: translateY(-2px);
    }

    /* 右：連絡先 */
    .contact-right {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 20px;
      height: 100%;

    }

    .contact-info-box,
    .contact-message-box {
      background: white;
      padding: 30px;
      border-radius: 12px;
      box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.15);
      flex: 1;
      border: 1px solid #E0E0E0;
    }

    .contact-info-box h3,
    .contact-message-box h3 {
      text-align: center;
      font-size: 18px;
      margin-bottom: 12px;
    }

    .contact-item {
      display: flex;
      gap: 10px;
      margin-bottom: 16px;
      align-items: center;
    }

    .contact-item .icon {
      width: 35px;
      height: 35px;
      background: #F37373;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .contact-item .icon img {
      width: 33px;
      height: 33px;
    }

    .contact-item .label {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 1px;
    }

    .contact-item .value {
      font-size: 16px;
    }

    .contact-message-box {
      display: flex;
      flex-direction: column;
    }

    .contact-message-box p {
      font-size: 16px;
      line-height: 1.6;
      margin-bottom: 6px;
    }

    /* フッター */
    footer {
      background-color: #8B7355;
      padding: 20px 0;
      text-align: center;
    }

    footer p {
      color: #ffffff;
      font-size: 14px;
    }

    /* 詳細ボタン */
    .detail-button {
      display: block;
      width: 50%;
      padding: 9px 0;
      margin: 25px auto 0;
      background: #F37373;
      color: white;
      text-decoration: none;
      border-radius: 8px;
      font-size: 18px;
      text-align: center;
      transition: all 0.3s ease;
    }

    .detail-button:hover {
      background: #E25D5D;
      transform: translateY(-2px);
    }


    /* レスポンシブ */
    @media screen and (max-width: 640px) {
      .header nav {
        display: none;
      }

      .logo {
        height: 35px;
      }

      .main-visual h1 {
        font-size: 28px;
      }

      .mv-all img {
        max-width: 100%;
      }

      .profile-box {
        display: block;
        padding: 0 20px;
      }

      .profile-img {
        text-align: center;
        margin-bottom: 30px;
      }

      .profile-img img {
        width: 180px;
        height: 180px;
      }

      /* 3→1列に */
      .work-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
      }

      /* 3→1列に */
      .skill-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
      }

      .contact-container {
        display: block;
        padding: 0 20px;
      }

      .contact-left {
        margin-bottom: 30px;
      }

      .contact-left,
      .contact-info-box,
      .contact-message-box {
        padding: 20px;
      }

      /* モーダル箇所 */
      .modal-container {
        width: 95%;
        border-radius: 12px;
        overflow-x: hidden;
      }

      .modal-content-wrapper {
        flex-direction: column;
        overflow-y: auto;
        max-height: 90vh;
      }

      .modal-left,
      .modal-right {
        min-width: 0;
        min-width: 100%;
        padding: 30px 20px;
        box-sizing: border-box;
      }

      .modal-right {
        overflow-y: visible;
        /* ←PC版のautoを上書き */
        max-height: none;
        /* ←PC版の90vhを上書き */
      }

      .modal-left img {
        max-height: none;
        width: 100%;
        height: auto;
        display: block;
      }

      .modal-close {
        top: 10px;
        right: 15px;
        font-size: 28px;
      }

      .detail-button {
        width: 100%;
        font-size: 16px;
        padding: 12px 0;
      }
    }


    /* モーダル箇所ここまで */