@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1p:wght@300;400&display=swap');
    .hidden {
      display: none !important;
    }
    :root {
      --primary: #2E7D32;
      /* メインの濃い緑 */
      --secondary: #66BB6A;
      /* サブの明るい緑 */
      --background: #E8F5E9;
      /* 背景用の非常に淡い緑 */
      --card-bg: #FFFFFF;
      /* カードの背景 */
      --border: #A5D6A7;
      /* 境界線の緑 */
      --hover-bg: #C8E6C9;
      /* ホバー時の背景 */
      --text-color: #1B5E20;
      /* 文字色（濃い緑） */
    }

    body {
      font-family: "M PLUS 1p", serif;
      font-weight: 400;
      font-style: normal;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      margin: 0;
      padding: 0;
      position: relative;
      background-color: var(--background);
      color: var(--text-color);
      transition: background-color 0.3s ease;
    }

    /* 以下、日報関連のスタイル */
    #report-textarea {
      width: 100%;
      min-height: 150px;
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: 5px;
      margin-bottom: 10px;
      font-family: inherit;
      resize: vertical;
      box-sizing: border-box;
    }
    
    .report-input-container {
      margin-bottom: 20px;
      padding: 15px;
      background-color: var(--card-bg);
      border-radius: 8px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      width: 100%;
      box-sizing: border-box;
    }
    
    /* 日報ヘッダーとボタンの構成 */
    .report-header {
      margin: 20px 0 15px 0;
    }
    
    .report-header-content {
      display: flex;
      align-items: center;
    }
    
    .report-header-content button.back-button {
      white-space: nowrap !important;
      margin-right: 15px !important;
      flex-shrink: 0 !important;
      letter-spacing: 1px;
      padding: 8px 15px !important;
      text-align: center !important;
    }
    
    .report-header-content h3 {
      margin: 0;
      flex-grow: 1;
    }
    
    #report-history-list {
      margin-top: 15px;
    }
    
    .report-item {
      padding: 15px;
      margin-bottom: 15px;
      background-color: var(--card-bg);
      border-radius: 8px;
      border-left: 4px solid var(--primary);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .report-date {
      display: block;
      color: #666;
      font-size: 0.9em;
      margin-bottom: 10px;
    }
    
    .report-content {
      white-space: pre-wrap;
      margin-bottom: 10px;
    }
    
    .feedback-container {
      margin-top: 15px;
      padding: 10px;
      background-color: #f5f5f5;
      border-radius: 5px;
      border-left: 3px solid var(--secondary);
    }
    
    .feedback-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-weight: bold;
      margin-bottom: 5px;
      color: var(--primary);
    }

    .feedback-header .feedback-date {
      font-size: 0.8em;
      color: #666;
    }
    
    .feedback-content {
      white-space: pre-wrap;
    }
    
    /* レスポンシブ対応 */
    @media screen and (max-width: 480px) {
      #report-textarea {
        min-height: 120px;
      }
      
      .report-item {
        padding: 10px;
      }
    }
    .logincontainer {
      width: 300px;
      margin: 80px auto;
      background: #fff;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      position: relative;
      text-align: center;
    }
    .logininput{
      width: 100%;
      padding: 8px;
      box-sizing: border-box;
      border: 2px solid #4caf50;
      border-radius: 4px;
    }
    .link {
      display: block;
      text-align: center;
      margin-top: 10px;
      color: #4caf50;
      cursor: pointer;
      text-decoration: underline;
    }

    details {
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.5em;
      background-color: var(--card-bg);
      transition: box-shadow 0.3s ease;
    }

    details:hover {
      box-shadow: 0 4px 8px rgba(46, 125, 50, 0.3);
    }

    details[open] summary {
      border-bottom: 1px solid var(--border);
    }

    .chat-container {
      width: 100%;
      max-width: 600px;
      background-color: var(--card-bg);
      border-radius: 12px;
      box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
      padding: 16px;
      display: flex;
      flex-direction: column;
      height: 90vh;
      box-sizing: border-box;
      margin: 20px auto;
      transition: transform 0.3s ease;
    }

    .chat-container:hover {
      transform: translateY(-4px);
    }

    .chat-log {
      height: 70vh;
      flex: 1;
      overflow-y: auto;
      padding: 16px;
      background-color: var(--background);
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
    }

    .partner-message p,
    .user-message p {
      padding: 1em;
      border-radius: 8px;
      margin-top: 50px;
    }

    .chat-log .partner-message,
    .chat-log .user-message {
      padding: 12px;
      max-width: 80%;
      word-wrap: break-word;
      white-space: pre-wrap;
      overflow-wrap: break-word;
      display: flex;
      position: relative;
      margin-bottom: 10px;
      opacity: 0;
      animation: fadeInUp 0.5s forwards;
    }

    .chat-log .user-message {
      align-self: flex-end;
      text-align: right;
    }

    .chat-log .partner-message {
      align-self: flex-start;
      text-align: left;
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .chat-log .user {
      background: linear-gradient(45deg, var(--secondary), var(--primary));
      color: #fff;
    }

    .chat-log .partner {
      background-color: var(--card-bg);
      border: 1px solid var(--border);
    }

    .typing-indicator {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 24px;
      margin: 10px 0;
      padding: 10px;
      border-radius: 12px;
      background-color: var(--card-bg);
      max-width: 80px;
      align-self: flex-start;
    }

    .typing-indicator span {
      display: inline-block;
      width: 8px;
      height: 8px;
      margin: 0 2px;
      background-color: var(--border);
      border-radius: 50%;
      animation: typing 1.5s infinite ease-in-out;
    }

    .typing-indicator span:nth-child(2) {
      animation-delay: 0.3s;
    }

    .typing-indicator span:nth-child(3) {
      animation-delay: 0.6s;
    }

    @keyframes typing {

      0%,
      100% {
        transform: scale(0.5);
        opacity: 0.5;
      }

      50% {
        transform: scale(1);
        opacity: 1;
      }
    }

    .input-container {
      display: flex;
      align-items: center;
      margin-top: 10px;
      padding: 8px;
    }

    .input-container input {
      flex: 1;
      padding: 12px;
      border-radius: 20px;
      border: 1px solid var(--border);
      margin-right: 10px;
      font-size: 16px;
      transition: border 0.3s ease;
      box-sizing: border-box;
    }

    .input-container textarea {
      flex: 1;
      padding: 12px;
      border-radius: 20px;
      border: 1px solid var(--border);
      margin-right: 10px;
      font-size: 16px;
      transition: border 0.3s ease;
      box-sizing: border-box;
      resize: vertical;
    }

    .input-container input:focus,
    .input-container textarea:focus {
      border: 1px solid var(--primary);
      outline: none;
    }

    /* ---------- ボタン共通スタイル ---------- */
    .btn {
      display: inline-block;
      padding: 10px 20px;
      border: none;
      border-radius: 20px;
      cursor: pointer;
      font-size: 16px;
      text-decoration: none;
      transition: background-color 0.3s ease, transform 0.2s ease;
      color: #fff;
      background: linear-gradient(45deg, var(--secondary), var(--primary));
    }

    .btn:hover:not(:disabled) {
      transform: scale(1.05);
    }

    .btn:active:not(:disabled) {
      transform: scale(1);
    }

    .btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .btn-green {
      background: linear-gradient(45deg, var(--secondary), var(--primary));
    }

    .btn-green:hover:not(:disabled) {
      background: linear-gradient(45deg, var(--primary), var(--secondary));
    }

    .btn-green:disabled {
      background-color: var(--border);
    }

    .btn-small {
      padding: 5px 10px;
      font-size: 14px;
    }

    .btn-lg {
      padding: 5px 10px;
      font-size: 25px;
      width: 150px;
      height: 50px;
      margin-right: 10px;
    }

    .back-button {
      margin-right: 10px;
    }

    .usericon,
    .partnericon {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      object-fit: cover;
      cursor: pointer;
      position: absolute;
      top: 0;
      outline: 1px solid var(--primary);
    }

    .usericon {
      right: 0;
    }

    .partnericon {
      left: 0;
    }

    .topbanner {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      background: linear-gradient(-45deg, var(--secondary), var(--primary));
      color: #fff;
      padding: 10px 20px;
      font-size: 1.5rem;
      z-index: 1000;
      margin: 0;
      text-align: left;
      overflow: hidden;
      box-sizing: border-box;
    }

    #token {
      padding: 10px;
      margin-bottom: 10px;
      width: 80%;
      max-width: 300px;
      border-radius: 20px;
      border: 1px solid var(--border);
      transition: border 0.3s ease;
      box-sizing: border-box;
    }

    #token:focus {
      border: 1px solid var(--primary);
      outline: none;
    }

    .room-list {
      width: 100%;
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
    }

    .room-item {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 15px;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      text-align: left;
      box-sizing: border-box;
      font-size: 1em;
      transition: background-color 0.3s;
    }

    .room-item:last-child {
      border-bottom: none;
    }

    .room-item:hover {
      background-color: var(--hover-bg);
    }

    /* Chat room and report room item icon styling */
    .room-icon {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid var(--border);
      box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    }

    .chat-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
      padding: 5px;
    }

    #loading-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background-color: rgba(0, 0, 0, 0.705);
      display: flex;
      flex-flow: column;
      justify-content: center;
      align-items: center;
      z-index: 9999;
      font-size: 24px;
      color: #fff;
      text-align: center;
      padding: 20px;
      box-sizing: border-box;
    }

    .footer-menu {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100vw;
      height: 60px;
      display: flex;
      justify-content: space-around;
      align-items: center;
      background-color: var(--card-bg);
      z-index: 10000;
      border-top: 1px solid var(--border);
    }

    .menu-item {
      height: 60px;
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: background-color 0.3s, color 0.3s;
    }

    .menu-icon {
      line-height: 0;
      transition: transform 0.25s;
    }

    .menu-icon:hover {
      transform: scale(1.2);
    }

    .menu-item:not(:last-child) {
      border-right: 1px solid var(--border);
    }

    .menu-item.active {
      background: linear-gradient(45deg, var(--secondary), var(--primary));
      color: #fff;
    }

    .main-contents {
      padding: 50px 20px 100px 20px;
    }

    .underline {
      border-bottom: 3px solid;
      border-image: linear-gradient(45deg, var(--secondary), var(--primary)) 1;
      width: 100%;
    }

    #attendance-idform {
      text-align: center;
      padding: 40px;
    }

    #attendanceId {
      width: 200px;
      height: 50px;
      font-size: 50px;
      border-radius: 10px;
      border: 1px solid var(--border);
      box-sizing: border-box;
      text-align: center;
    }

    #attendanceId::placeholder {
      font-size: 25px;
      color: gray;
    }

    #attendances-history {
      margin-bottom: 100px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      margin: 20px auto;
      box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
    }

    thead {
      background-color: var(--hover-bg);
    }

    th,
    td {
      border: 1px solid var(--border);
      padding: 8px;
      text-align: center;
    }

    th {
      font-weight: bold;
      color: var(--text-color);
    }

    tbody tr:nth-child(even) {
      background-color: #f1f8f2;
    }

    tbody tr:nth-child(odd) {
      background-color: var(--card-bg);
    }

    @media screen and (max-width: 480px) {
      body {
        background-color: #fff;
        height: 100%;
      }

      table {
        display: block;
        overflow-x: auto;
        font-size: 12px;
      }

      .chat-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        padding: 0;
        padding-bottom: 60px;
        box-shadow: none;
        margin: 0;
      }

      #roomselect-container {
        max-width: 100vw;
        border-radius: 0;
        box-shadow: none;
        overflow-y: auto;
        margin: 0;
        justify-content: center;
      }

      .main-contents {
        padding: 50px 20px 100px 20px;
      }

      .room-item,
      .chat-header h3,
      .input-container input,
      .btn {
        font-size: 1em;
      }

      #loading-overlay {
        font-size: 1.2em;
        padding: 10px;
      }

      .footer-menu,
      .menu-item {
        height: 60px;
      }

      .container {
        display: none;
      }
    }

    .loader {
      border: 4px solid rgba(46, 125, 50, 0.1);
      border-top: 4px solid var(--secondary);
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    @keyframes l4-1 {
      0% {
        background-size: 0 4px, 4px 0, 0 4px, 4px 0, 0 4px, 4px 0, 0 4px;
      }

      7.14% {
        background-size: 25% 4px, 4px 0, 0 4px, 4px 0, 0 4px, 4px 0, 0 4px;
      }

      14.29% {
        background-size: 25% 4px, 4px 50%, 0 4px, 4px 0, 0 4px, 4px 0, 0 4px;
      }

      21.43% {
        background-size: 25% 4px, 4px 50%, 25% 4px, 4px 0, 0 4px, 4px 0, 0 4px;
      }

      28.57% {
        background-size: 25% 4px, 4px 50%, 25% 4px, 4px 100%, 0 4px, 4px 0, 0 4px;
      }

      35.71% {
        background-size: 25% 4px, 4px 50%, 25% 4px, 4px 100%, 25% 4px, 4px 0, 0 4px;
      }

      42.86% {
        background-size: 25% 4px, 4px 50%, 25% 4px, 4px 100%, 25% 4px, 4px 50%, 0 4px;
      }

      49%,
      51% {
        background-size: 25% 4px, 4px 50%, 25% 4px, 4px 100%, 25% 4px, 4px 50%, 25% 4px;
      }

      57.14% {
        background-size: 0 4px, 4px 50%, 25% 4px, 4px 100%, 25% 4px, 4px 50%, 25% 4px;
      }

      64.29% {
        background-size: 0 4px, 4px 0, 25% 4px, 4px 100%, 25% 4px, 4px 50%, 25% 4px;
      }

      71.43% {
        background-size: 0 4px, 4px 0, 0 4px, 4px 100%, 25% 4px, 4px 50%, 25% 4px;
      }

      78.57% {
        background-size: 0 4px, 4px 0, 0 4px, 4px 0, 25% 4px, 4px 50%, 25% 4px;
      }

      85.71% {
        background-size: 0 4px, 4px 0, 0 4px, 4px 0, 0 4px, 4px 50%, 25% 4px;
      }

      92.86% {
        background-size: 0 4px, 4px 0, 0 4px, 4px 0, 0 4px, 4px 0, 25% 4px;
      }

      100% {
        background-size: 0 4px, 4px 0, 0 4px, 4px 0, 0 4px, 4px 0, 0 4px;
      }
    }

    @keyframes l4-2 {

      0%,
      49.9% {
        background-position: 0 50%, bottom 20px left 16px, 20px 0, 50% 0, 40px 100%, bottom 0 right 16px, 60px 50%;
      }

      50%,
      100% {
        background-position: right 60px top 50%, 16px 0, right 40px top 0, 50% 100%, right 20px bottom 0, right 16px top 20px, 100% 50%;
      }
    }

    .menu-container {
      display: none;
      margin-bottom: 60px;
    }

    #roomselect-container {
      flex-direction: column;
      width: 100%;
    }

    /* カレンダーグリッド全体 */
    #calendar-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 5px;
      margin-top: 10px;
    }

    /* 曜日ヘッダー */
    .calendar-header {
      background-color: var(--hover-bg);
      padding: 5px;
      text-align: center;
      font-weight: bold;
      border: 1px solid var(--border);
    }

    /* 各日のセル */
    .calendar-cell {
      border: 1px solid var(--border);
      padding: 5px;
      min-height: 80px;
      max-height: 50px;
      position: relative;
      cursor: pointer;
      overflow: hidden;
    }

    .cell-date {
      font-weight: bold;
      margin-bottom: 5px;
    }

    .attendance-info {
      font-size: 0.8em;
      background-color: #d0f0d0;
      margin-top: 2px;
      padding: 2px;
      border-radius: 3px;
    }

    .blank {
      background-color: #fff;
      border: none;
      cursor: default;
    }

    #calendar-controls {
      text-align: center;
      margin-bottom: 10px;
    }

    /* モーダル用スタイル */
    .modal {
      display: none;
      position: fixed;
      z-index: 10000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(46, 125, 50, 0.4);
    }

    .modal-content {
      background-color: var(--card-bg);
      margin: 15% auto;
      padding: 20px;
      border: 1px solid var(--primary);
      width: 80%;
      max-width: 500px;
      position: relative;
    }

    .close {
      color: var(--border);
      float: right;
      font-size: 28px;
      font-weight: bold;
      cursor: pointer;
    }

    /* 評価表示 */
    #userinfo-rating-display {
      margin-bottom: 10px;
    }

    #userinfo-rating-display .rating-text {
      font-size: 16px;
      font-weight: bold;
      margin-bottom: 4px;
    }

    #userinfo-rating-display .star-indicator span {
      font-size: 20px;
      color: #FFD700;
    }

    #userinfo-rating-display .rating-comment {
      font-size: 14px;
      margin: 4px 0;
      padding: 5px 10px;
      background-color: #f0f0f0;
      border-radius: 5px;
    }

    /* 各画面用クラス（既存の.menu-container等と併用） */
    .page {
      display: none;
      /* 初期状態は非表示 */
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 60px;
      z-index: 1;
    }

    .page.active {
      display: block;
      z-index: 2;
    }

    /* スライドアウト */
    .slide-out {
      animation: slideOut 0.3s forwards;
    }

    /* スライドイン */
    .slide-in {
      animation: slideIn 0.2s forwards;
    }

    @keyframes slideOut {
      from {
        transform: translateY(0);
        opacity: 1;
      }

      to {
        transform: translateY(-100%);
        opacity: 0;
      }
    }

    @keyframes slideIn {
      from {
        transform: translateY(100%);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    /* 日報管理画面全体のスタイル */
    #report-management {
      padding-top: 10px;
    }

    .attendance-detail-record {
      border-bottom: 1px solid #ccc;
      margin-bottom: 5px;
      padding-bottom: 5px;
    }

    .margin-top-30 {
      margin-top: 30px !important;
    }
    .font-bold {
      font-weight: bold !important;
    }
    .font-size-1-2em {
      font-size: 1.2em !important;
    }
    .margin-top-10 {
      margin-top: 10px !important;
    }
    .min-width-40 {
      min-width: 40px !important;
    }
    .white-space-nowrap {
      white-space: nowrap !important;
    }
    .inline-block {
      display: inline-block !important;
    }
    .padding-4-8 {
      padding: 4px 8px !important;
    }
    .margin-right-12 {
      margin-right: 12px !important;
    }
    .font-size-12 {
      font-size: 12px !important;
    }
    .margin-0 {
      margin: 0 !important;
    }

    .position-absolute {
      position: absolute !important;
    }

  #userinfo-icon-preview,
#biz-icon-preview {
  /* 正方形を保証 */
  aspect-ratio: 1 / 1;        
  width: 50px !important;      
  height: 50px !important;
  object-fit: cover;          
  border-radius: 50%;          
  flex-shrink: 0;               
}

#userinfo-icon-preview img,
#biz-icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: inherit;          
  border-radius: inherit;
}

.password-requirements {
  font-size: 12px;
  color: #777;
  margin-top: 6px;
  text-align: left;
}

.timestamp {
  font-size: 0.75em;
  color: var(--border);
  margin-top: 4px;
  display: block;
  text-align: right;
}

.feedback-date {
  font-weight: normal;
  font-size: 0.85em;
  color: var(--border);
  margin-left: 4px;
}

/* アプリバージョン表示 */
.app-version {
  font-size: 1em;
  color: var(--text-color);
  font-weight: bold;
  margin-top: 6px;
}

/* === 評価・推薦コメント UI 改善 === */
#userinfo-rating,
#userinfo-recommendation {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-top: 15px;
}

#userinfo-rating h3,
#userinfo-recommendation h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.05em;
}

.rating_input,
.recommendation_input {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.rating_input label,
.recommendation_input label {
  font-weight: 600;
  margin-bottom: 6px;
}

.rating_input select,
.rating_input textarea,
.recommendation_input input,
.recommendation_input textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-sizing: border-box;
  font-family: inherit;
}

.rating_input select {
  max-width: 220px;
}

#userinfo-rating button,
#userinfo-recommendation button {
  align-self: flex-start;
  margin-top: 8px;
}

@media screen and (max-width: 480px) {
  .rating_input select {
    width: 100%;
  }
}