:root{
	--font-sans: 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'ＭＳ Ｐゴシック', arial, helvetica, sans-serif;
	--bg: #f8fafc; /* bg-gray-50-ish */
	--surface: #ffffff;
	--text: #1f2937; /* text-gray-800 */
	--muted: #6b7280; /* text-gray-500 */
	--blue-600: #2563eb;
	--blue-700: #1d4ed8;
	--blue-400: #60a5fa;
	--gray-200: #e5e7eb;
	font-family: var(--font-sans);
	color: var(--text);
}

/* Apply unified font to page and form controls for consistent rendering */
html, body, input, select, textarea, button {
	font-family: var(--font-sans);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Page */
body{
  background:var(--bg);
  margin:0;
  padding:24px;
  font-size:16px;
  line-height:1.45;
  position:relative;
}
body::before{
  content:"";
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background-image:url('ichinosemaru-haikei.jpg');
  background-size:cover;
  background-position:center;
  background-attachment:fixed;
  filter:blur(8px);
  opacity:0.15;
  z-index:-1;
}
.app-container{max-width:980px;margin:0 auto;padding-bottom:50px;position:relative;z-index:1}
.top{margin-bottom:18px}
.logo{max-width:180px;height:auto;margin-bottom:12px;display:block}
.site-title{font-size:20px;margin:0 0 4px 0;color:var(--text);font-weight:700}
.lead{margin:0;color:var(--muted);font-size:14px}

/* layout */
.grid{display:grid;grid-template-columns:1fr 320px;gap:20px;align-items:start}
@media (max-width:880px){.grid{grid-template-columns:1fr}}

/* Card */
.card{background:var(--surface);padding:20px;border-radius:16px;box-shadow:0 6px 18px rgba(20,24,28,0.06);border:1px solid rgba(15,23,42,0.04)}
.form-card{padding:20px}
.reservation-summary{padding:18px}
.section-title{font-size:20px;margin:0 0 10px 0;color:#374151;font-weight:600}

/* fields */
.field{margin-bottom:12px}
label{display:block;padding-top:15px;margin-bottom:8px;font-weight:600;color:var(--text)}
.meta{color:var(--muted);font-size:13px}
.meta-time{font-size:15px}
.date-row{display:flex;gap:10px;align-items:center}
.plan-row{display:flex;gap:12px;align-items:center}

/* inputs */
.form-input{font-size: 15px;padding:12px;border:1px solid var(--gray-200);border-radius:12px;background:#fff;color:var(--text);box-sizing:border-box}
.form-input:focus{outline:none;box-shadow:0 0 0 4px rgba(96,165,250,0.18);border-color:var(--blue-600)}
.form-input.wide{min-width:120px;max-width:100%;height:44px;}
select.form-input{appearance:none}

/* select used for person counts */
.count-select{width:100px}

.row{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-start}
.row > div{display:flex;flex-direction:column}
.row > div > label{margin-bottom:6px}

.label-row{display:flex;justify-content:space-between;align-items:center;gap:8px}
.label-row > label{margin:0}
.unit-price{font-size:15px;color:var(--text);}
.people-inputs .col{min-width:120px}

/* render people inputs as list-like rows similar to rentals */
.people-inputs .row{flex-direction:column}
.people-inputs .col{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:10px 0px;border-bottom:1px solid var(--gray-200);min-width:0}
.people-inputs .col:last-child{border-bottom:none}
.people-inputs .label-row{display:flex;flex:1;gap:8px;align-items:center}
.people-inputs select.count-select{width:70px}
.people-col{ gap: 12px; width: 100%; }

.rentals{display:flex;flex-direction:column;margin-top:6px;padding:0;font-size: 15px}
.rental-item{display:flex;gap:12px;align-items:center;padding:10px 0px;border-bottom:1px solid var(--gray-200)}
.rental-item:last-child{border-bottom:none}
.rental-item .label{flex:1}
.rental-item select.count-select{width:70px}

/* actions */
.actions{display:flex;gap:10px;padding-top:20px;}
.btn{border-radius:10px;padding:10px 14px;border:1px solid transparent;cursor:pointer;font-weight:600}
.btn-primary{background:var(--blue-600);color:white;font-size: 16px;width:65%;}
.btn-primary:hover{background:var(--blue-700)}
.btn-secondary{background:var(--gray-200);color:#374151;font-size: 16px;width:35%;}
.btn-secondary:hover{background:#d1d5db}

/* summary box styles */
.ｆ{font-size:14px;color:var(--text);margin-bottom:12px}
.total-row{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.total{font-weight:800;font-size:20px}

/* breakdown styles */
.breakdown{font-family:var(--font-sans);font-size:15px;line-height:1.6;color:var(--text)}

.muted{color:var(--muted)}

/* accessibility helpers */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media (max-width:560px){
	.row{flex-direction:column}
	.grid{grid-template-columns:1fr}
	
	/* モバイル用フォーム調整 */
	.form-input{padding:12px 16px;height:44px}
	.form-input[type="date"]{width:100%;max-width:100%;text-align:left;height:44px;padding:12px 40px 12px 16px}
	
	/* モバイル用数量選択 */
	.count-select{font-size:16px}

	/* セレクトボックスの調整 */
	select.form-input{
		background-color:white;
		color:var(--text);
		background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
		background-position: right 12px center;
		background-repeat: no-repeat;
		background-size: 16px;
		padding-right: 40px;
		width: 100%;
		height: 44px;
	}
	
	/* プランと釣船種類のテキスト調整 */
	.plan-row{flex-direction:column;align-items:stretch;gap:8px}
	.plan-row select{width:100%}
	.meta-time{font-size:15px;margin-top:4px}
}

/* fixed total bar */
.fixed-total{
	position:fixed;
	left:0;
	right:0;
	bottom:0;
	background:var(--surface);
	border-top:1px solid var(--gray-200);
	box-shadow:0 -6px 18px rgba(20,24,28,0.06);
	z-index:60;
	padding-bottom:env(safe-area-inset-bottom);
}
.fixed-total-inner{max-width:980px;margin:0 auto;padding:14px 20px;display:flex;justify-content:space-between;align-items:center}
.fixed-amount{font-weight:800;font-size:18px}
.fixed-label{color:var(--muted)}

/* Footer */
#footer{
  margin-top:24px;
  padding:24px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
}
#f_left{
  flex:0 0 auto;
  margin:0;
  font-size:13px;
  color:var(--muted);
}
#f_center{
  flex:1;
  text-align:center;
}
#f_center p{
  margin:4px 0;
  color:var(--text);
}
#f_center .font24{
  font-size:18px;
  font-weight:700;
  margin-top:6px;
}
#f_right{
  flex:0 0 auto;
  margin:0;
  font-size:13px;
  text-align:right;
  line-height:1.6;
}
#f_right a{
  color:var(--blue-600);
  text-decoration:none;
}
#f_right a:hover{
  color:var(--blue-700);
  text-decoration:underline;
}
.clearfix::after{
  content:"";
  display:table;
  clear:both;
}

@media (max-width:768px){
  #footer{
    flex-direction:column;
    text-align:center;
    gap:16px;
		padding-bottom:6px;
  }
  #f_left,
  #f_right{
    text-align:center;
  }
}

@media (max-width:560px){
  .fixed-total-inner{padding:12px 24px}
  
  /* スマホでの安全領域対応を強化 */
  .fixed-total{
  	padding-bottom:max(env(safe-area-inset-bottom));
  }
  
  /* モバイル用セレクトボックス調整 */
  .select-dropdown{
    min-height:48px;
    background-position:right 14px center;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--surface);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

.modal-body .field {
  margin-bottom: 16px;
}

.modal-body .form-input {
  width: 100%;
  box-sizing: border-box;
}

.modal-note {
  font-size: 13px;
  margin: 24px 0 0 0;
  line-height: 1.6;
  background-color: #fff7d6;
  color: #8a6d00;
  padding: 10px 12px;
  border-radius: 8px;
}

.required {
  color: #dc2626;
  margin-left: 4px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 24px;
  border-top: 1px solid var(--gray-200);
  background-color: #f9fafb;
}

#modalCancelBtn {
  flex: 0 0 40%;
}

#modalSubmitBtn {
  flex: 0 0 60%;
}

@media (max-width: 560px) {
  .modal-content {
    max-width: 350px;
    width: 95%;
    border-radius: 12px;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-header h2 {
    font-size: 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-note {
    margin: 0;
  }

  .modal-footer {
    padding: 16px;
    gap: 8px;
  }

  .modal-footer .btn {
    max-width: none;
  }
}

/* Alert Modal (Compact) */
.alert-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 350px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.alert-modal-body {
  padding: 24px 24px 32px 24px;
  text-align: left;
}

.alert-modal-body p {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  color: var(--text);
  line-height: 1.6;
}

.alert-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 24px 24px 24px;
}

.alert-modal-footer .btn {
  min-width: 132px;
  max-width: 140px;
}