@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bitcount+Single:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=BIZ+UDGothic&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* Common */
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Inter", "BIZ UDGothic", sans-serif;
    font-size: 16px;
    line-height: 1.6em;
    -ms-overflow-style: none;
    scrollbar-width: none;
	overscroll-behavior-y: contain;
	backface-visibility: hidden;
}
body::-webkit-scrollbar {
    display: none;
}
a {
    color: #666666;
}
.logomark {
    z-index: 11;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: calc(1200px - 40px);
    height: 100px;
    margin: auto;
    padding: 15px 20px;
    text-align: left;
    font-family: "Pacifico", cursive;
    font-size: 1.4em;
    color: #222222;
    background: transparent;
    pointer-events: none;
}
.logomark a {
    color: #222222;
    text-decoration: none;
    pointer-events: auto;
}
.company {
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: calc(1200px - 30px);
    height: 100px;
    margin: auto;
    padding: 20px 15px;
    text-align: right;
    font-family: "Bitcount Single", system-ui;
    font-size: 0.7em;
    color: #222222;
    background: transparent;
    pointer-events: none;
}
.company a {
    text-decoration: none;
    color: #222222;
    pointer-events: auto;
}
.company img {
    width: auto;
    height: 7px;
}
.guide {
    z-index: 9;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100px;
    padding: 60px 0 0 0;
    text-align: center;
    font-size: 0.7em;
    color: #888888;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,1) 50%,
        rgba(255,255,255,0) 100%
    );
    pointer-events: none;
}
.return-guide {
    z-index: 9;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 40px;
    width: 160px;
    height: auto;
    margin: auto;
    padding: 8px 16px;
    border-radius: 25px;
    text-align: center;
    font-size: 0.7em;
    color: #888888;
    background: rgba(255,255,255,0.8);
}
.pwa-guide {
    z-index: 9;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 140px;
    width: 160px;
    height: auto;
    margin: auto;
    padding: 8px 16px;
    border-radius: 25px;
    text-align: center;
    font-size: 0.7em;
    color: #888888;
    background: rgba(255,255,255,0.8);
}
.guide a,
.pwa-guide a,
.return-guide a {
    color: #666666;
    pointer-events: auto;
}
.pwa-guide a,
.return-guide a {
    text-decoration: none;
}
h2 {
    margin: 60px auto 40px auto;
    text-align: center;
    font-size: 1.4em;
}
p {
    text-align: left;
    font-size: 0.85em;
}
hr {
    margin: 60px auto 40px auto;
    border: none;
    border-bottom: 2px dotted #222222;
}

 /* Page Design */
.column {
    width: calc(100% - 30px);
    max-width: calc(1200px - 30px);
    margin: 150px auto;
    padding: 0 15px;
    line-height: 1.4em;
}
.wrap {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: calc(100% - 220px);
    margin: 0 auto;
    padding: 100px 0 120px 0;
    display: flex;
    flex-direction: column;
}
.welcome-links {
    margin-top: 8px;
    font-size: 0.7em;
}
.chat {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.chat::-webkit-scrollbar {
    display: none;
}
.msg {
    position: relative;
    width: fit-content;
    margin: 20px 0;
    border-radius: 25px;
}
.msg.ai {
    margin-right: auto;
    padding: 25px 5px 25px 35px;
}
.msg.ai:before {
    content: "";
    position: absolute;
    top: 20px;
    left: -5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #EEEEEE url('sorataico.png');
    background-size: contain;
    background-repeat: no-repeat;
}
/* システム固定メッセージ用 */
.msg.sys {
    margin: 10px auto;
    padding: 10px 18px;
    background: #FFFBEA;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #555555;
    max-width: 90%;
}
.msg.user {
    margin-left: auto;
    padding: 16px 24px;
    background: #EEEEEE;
    text-align: left;
    border-bottom-right-radius: 1px;
    font-family: -apple-system, sans-serif;
}
.form-wrapper {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}
.form-area {
    position: relative;
    width: calc(100% - 60px);
    padding: 15px;
    border-radius: 12px;
    background: #F5F5F5;
}
.form-area form {
    display: flex;
    gap: 8px;
}
.form-area:focus-within {
    background: #FFFFFF;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15);
}
.form-area textarea {
    flex: 1;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
    line-height: 1.5;
    min-height: 1.4em;
    max-height: 8em;
    overflow-y: auto;
    font-family: -apple-system, Roboto, sans-serif;
}
.form-area textarea:focus {
    outline: none;
}
.form-area button {
    width: 35px;
    height: 35px;
    padding: 5px;
    border-radius: 50%;
    border: none;
    background: #EEEEEE;
    cursor: pointer;
}
.form-area button[type="submit"] {
    background: #222222;
}
.form-area button img {
    width: auto;
    height: 100%;
}
.form-area #counter {
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 0.8em;
}
.complete {
    min-width: 90px;
    border-radius: 9px !important;
    font-weight: bold;
    font-size: 1em;
    color: #FFFFFF;
}
.temp-view {
    margin-top: 10px;
    font-size: 12px;
}
/* AI Thinking Baloon */
.msg.ai .typing-dots {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.msg.ai .typing-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
    display: block;
    opacity: 0.25;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}
.msg.ai .typing-dots span:nth-child(1) {
    -webkit-animation: dot1 1.2s infinite ease-in-out;
    animation: dot1 1.2s infinite ease-in-out;
}
.msg.ai .typing-dots span:nth-child(2) {
    -webkit-animation: dot2 1.2s infinite ease-in-out;
    animation: dot2 1.2s infinite ease-in-out;
}
.msg.ai .typing-dots span:nth-child(3) {
    -webkit-animation: dot3 1.2s infinite ease-in-out;
    animation: dot3 1.2s infinite ease-in-out;
}
@-webkit-keyframes dot1 {
    0%, 60%, 100% {
        opacity: 0.25;
        -webkit-transform: translate3d(0, 0, 0);
    }
    30% {
        opacity: 1;
        -webkit-transform: translate3d(0, -3px, 0);
    }
}
@-webkit-keyframes dot2 {
    0%, 20%, 100% {
        opacity: 0.25;
        -webkit-transform: translate3d(0, 0, 0);
    }
    50% {
        opacity: 1;
        -webkit-transform: translate3d(0, -3px, 0);
    }
}
@-webkit-keyframes dot3 {
    0%, 40%, 100% {
        opacity: 0.25;
        -webkit-transform: translate3d(0, 0, 0);
    }
    70% {
        opacity: 1;
        -webkit-transform: translate3d(0, -3px, 0);
    }
}
@keyframes dot1 {
    0%, 60%, 100% {
        opacity: 0.25;
        transform: translate3d(0, 0, 0);
    }
    30% {
        opacity: 1;
        transform: translate3d(0, -3px, 0);
    }
}
@keyframes dot2 {
    0%, 20%, 100% {
        opacity: 0.25;
        transform: translate3d(0, 0, 0);
    }
    50% {
        opacity: 1;
        transform: translate3d(0, -3px, 0);
    }
}
@keyframes dot3 {
    0%, 40%, 100% {
        opacity: 0.25;
        transform: translate3d(0, 0, 0);
    }
    70% {
        opacity: 1;
        transform: translate3d(0, -3px, 0);
    }
}

/* PWA Modal */
#pwaModal {
    z-index: 9999;
    position: fixed;
    display: none;
    inset: 0;
    padding: 15px;
    background: rgba(0,0,0,0.45);
}
#pwaModal .window {
    max-width: 500px;
    margin: 15% auto;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
#pwaModal .title {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 10px;
}
#pwaModalBody {
    font-size: 14px;
    white-space:pre-line;
}
#pwaModalClose {
    padding: 10px 15px;
    border-radius: 12px;
    border: none;
    background: #222222;
    color: #FFFFFF;
    cursor: pointer;
}